-
What is the best way to specify formatting options for the pdf output? For example, if you want to change the title 1 / title font size and colour, in a book would it be best to do this via the |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 8 replies
-
Use Pandoc template syntax. https://pandoc.org/MANUAL.html#template-syntax In your yaml: margin: 3cm In you partial (tex): $if(margin)$
\usepackage[margin=$margin$]{geometry}
$endif$ |
Beta Was this translation helpful? Give feedback.
-
This depends on the document class. The default document classes for Quarto are scrartcl and scrbook which are KOMA classes. In this case putting something like
in your header would/should change the title size. I am pretty subtitle works similarly. The, ah, problem with this is that everything breaks once you switch to a non-koma document class. Note, I don't know if there is a yaml variable for the title size, if there is it is likely to be tied to the KOMA classes that are default. So don't be surprised if it breaks if you switch to another document class. For this reason, latex users often ditch Here is an example title page where the title size is customized: How do you force Pandoc to use this title page and not use whatever it is using? First, you need to know that Pandoc runs a template partial called So we pass in our own Here is a simple example, where we make a static title page. Static means it is not going to use things like YAML
before-body.tex
The tex file that Pandoc generates will look like so
Hopefully this also helps you see how you can include the preface. There are many different ways that one might include a preface in a book. One way is add
I added some tips on customizing PDF frontmatter here: |
Beta Was this translation helpful? Give feedback.
-
I tested in a non-Quarto project and adding yaml parameter worked. This is the yaml at top of the doc
|
Beta Was this translation helpful? Give feedback.
I tested in a non-Quarto project and adding yaml parameter worked.
This is the yaml at top of the doc