Skip to content
Snippets Groups Projects
Commit 3e2cc6e7 authored by Karl Fogel's avatar Karl Fogel
Browse files

Document some more LaTeX idiosyncracies

parent cec5bf3e
No related branches found
No related tags found
No related merge requests found
......@@ -82,6 +82,40 @@ plugins.
Mostly you should just use standard LaTeX in OTS Doctools documents.
However, there are some things you should know:
### You can set jinja variables at the top of your document.
You can put jinja variables in a special block at the very top of your
input file:
```
---
title: "My Life as an Eggplant Hunter:\\\\Nobody Told Me They Could Run So Fast"
date: 31 Nov 2023
draft: true
fish: halibut
---
```
Certain variables will be treated specially. For example, the values
of `title` and `date` will be displayed on the title page. (Remember,
backslashes are doubled here because they need to be quoted for
jinja.) If the value of `draft` is `true`, then every page will get a
large, light gray "DRAFT" diagonal watermark.
Other variables are just there to be referred to later. For example,
in the above example, the value of `fish` is `halibut`, so if you put
this in your latex:
```
I always ate eggplant, even when offered \VAR{fish}.
```
It will render as this in the output:
```
I always ate eggplant, even when offered halibut.
```
### Avoid accidentally triggering jinja
If you start a LaTeX comment using two or more percent signs together
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment