pandoc-templates

My custom Pandoc templates

Here you can get my custom Pandoc templates to create HTML (using Bootstrap 5 with dark-mode, and Font Awesome) and PDF format files using LuaLaTeX.

Final Results

You can see the final results in this page and in the example.pdf.

If you want to see real books/html made with this template, here you will see more examples.

Dependencies

There are two templates, the first one to generate HTML and the other to create a custom PDF using LuaLaTeX.

HTML template

The template is template/yuki.html, and it uses some files and dependencies from internet:

LaTeX template

The template is template/yuki.tex, which is a modification from my custom yukibook.cls class, that I have used to create my books.

The idea is to deprecate yukibook.cls and convert my books from LaTeX into Markdown, and use those templates to generate both versions.


How to use the templates

Copy the template/yuki.html and template/yuki.tex files into your ~/.pandoc/templates/ directory. Or you can use those templates cloning this repository.

In this repository there are few files to create an example HTML and PDF file:

To create the HTML file:

./book.sh | pandoc -o "example.html" -d defaults.yaml

If you want to create an embeded HTML file use the extra parameter --embed-resources=true.

To create the PDF file:

./book.sh | pandoc -o "example.pdf" -d defaults.yaml --template=template/yuki.tex