Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
O
ots-doctools
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
ots
ots-doctools
Commits
3e2cc6e7
Commit
3e2cc6e7
authored
1 year ago
by
Karl Fogel
Browse files
Options
Downloads
Patches
Plain Diff
Document some more LaTeX idiosyncracies
parent
cec5bf3e
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
README.md
+34
-0
34 additions, 0 deletions
README.md
with
34 additions
and
0 deletions
README.md
+
34
−
0
View file @
3e2cc6e7
...
...
@@ -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
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment