About
This work is based on this section of the Quarto manual https://quarto.org/docs/journals/templates.html#replacing-partials To see the LaTeX templates that Quarto is using start here: https://github.com/quarto-dev/quarto-cli/blob/main/src/resources/formats/pdf/pandoc/template.tex
This template makes a custom title page using the information in the YAML (from the xyz.qmd
for an single doc and from index.qmd
for a Quarto book). The default document classes in Quarto are scrbook
and srcartcl
, but these templates work for other document classes too. There are some other classes in the cls
folder (krantz, svmono, elsevier). The static title pages are inspired from Latex Templates.
Audience
This is written assuming you are a LaTeX user and thus already know how to do what you want in LaTeX, but you need to figure out how to tell Quarto to do what you want. Skim the chapter on LaTeX document structure if you are unfamiliar with LaTeX so you know what I am talking about when I reference parts of a LaTeX document.
Quarto has included a variety of YAML options you can use to alter your LaTeX document by passing in things like fontenc package options or geometry options in the YAML. I largely ignore all that and just pass in the header file I want. As a LaTeX user, I find all those YAML options confusing and I spend hours digging through the Quarto source code to figure out exactly how they are using the YAML options.
That said, for quarto_titlepages, I am mainly just swapping out the before-body.tex
partial (the part that specs the title and front matter) and adding stuff to the header (before begin{document}
).
Approach I took
There are 2 approaches that I considered.
- Use the
title.tex
partial (which defines things like title and author) and then redefine the\maketitle
command. Google and you’ll find examples. I find\maketitle
really irritating and is a constant headache to make custom title pages with it. But maybe you love it; in which case, try that approach. - Use
before-body.tex
partial to get rid of the\maketitle
call and use my own\begin{frontmatter}...\end{frontmatter}
section. I find this much more straightforward for creating custom titlepages. So that’s the approach I took.
More notes
See the notes chapter for some notes I took along the way.