Quarto extension for a template to generate a PDF with (pretty) styling using LaTeX. Use PrettyPDF-pdf
as the format if using LaTeX.
To install the Quarto extension, create a directory, and use the template file:
quarto use template nrennie/PrettyPDF
To use the extension in an existing project without installing the template file:
quarto install extension nrennie/PrettyPDF
Note that you will need to update the output format to format: PrettyPDF-pdf
to enable use of the extension. For book projects, add:
project:
type: PrettyPDF
to the _quarto.yml
file.
If you want to update the LaTeX version of this template to use a different colour or logo, open up the _extensions/nrennie/PrettyPDF/PrettyPDF.tex
file after you have installed the extension.
Either replace the logo.png
file with a new file of your choosing, or change the file path on line 28 to point to a different logo file. Note that the file path is relative to your .qmd file.
Lines 14-16 define three colours used in the template: light
, dark
, and highlight
. Change the hex colours in these lines to update the colours. The light
colour changes the sidebar and code block background colours. The dark
colour changes the text. The highlight
colour changes the link colours.
Read more about this extension, how it was built, and how to make your own in my blog post at nrennie.rbind.io/blog/making-pretty-pdf-quarto.