mirror of
https://github.com/Kaffesky/kaffesky-markdown-templates.git
synced 2026-04-18 12:37:30 +02:00
Updates
This commit is contained in:
parent
e3e4f46cf1
commit
3b9daef024
4 changed files with 33 additions and 8 deletions
|
|
@ -57,9 +57,16 @@ sudo tlmgr install \
|
|||
xcolor \
|
||||
fontspec \
|
||||
geometry \
|
||||
babel
|
||||
babel \
|
||||
pgf \
|
||||
currfile \
|
||||
filehook
|
||||
```
|
||||
|
||||
- `pgf` — provides TikZ, used to draw the vertical colour bar on the title page
|
||||
- `currfile` — resolves the template's directory at compile time, used to locate the logo file
|
||||
- `filehook` — required by `currfile`
|
||||
|
||||
### 5. Install fontconfig
|
||||
|
||||
`fc-list` and `fc-cache` are needed for font verification and are not included on macOS by default:
|
||||
|
|
@ -129,8 +136,19 @@ Then compile with:
|
|||
```bash
|
||||
pandoc input.md -o output.pdf \
|
||||
--pdf-engine=xelatex \
|
||||
--template=template_first-skyfritt-example.tex \
|
||||
--shift-heading-level-by=-1
|
||||
--template=./path/to/template_first-skyfritt-example.tex \
|
||||
--shift-heading-level-by=-1 \
|
||||
-V templatedir=./path/to/template_first-skyfritt-example.tex
|
||||
```
|
||||
|
||||
### Why `-V templatedir=...`?
|
||||
|
||||
The template includes a logo image (`skyfritt-logo_borderless.pdf`) referenced by filename only. XeLaTeX resolves bare filenames relative to the working directory where pandoc is invoked — not the template's own directory. Passing `-V templatedir=` tells the template where to look for the logo, so it is found regardless of which directory you run pandoc from.
|
||||
|
||||
The value should be the directory containing the template and logo files, e.g.:
|
||||
|
||||
```bash
|
||||
-V templatedir=./convertion_templates_pandoc/template_pdf-via-xelatex
|
||||
```
|
||||
|
||||
### Why `--shift-heading-level-by=-1`?
|
||||
|
|
@ -156,9 +174,10 @@ If you prefer LaTeX to number sections automatically (and write headings without
|
|||
```bash
|
||||
pandoc input.md -o output.pdf \
|
||||
--pdf-engine=xelatex \
|
||||
--template=template_first-skyfritt-example.tex \
|
||||
--template=./path/to/template_first-skyfritt-example.tex \
|
||||
--shift-heading-level-by=-1 \
|
||||
--number-sections
|
||||
--number-sections \
|
||||
-V templatedir=./path/to/template_first-skyfritt-example.tex
|
||||
```
|
||||
|
||||
You can also control the depth of numbering with the `secnumdepth` metadata variable:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue