mirror of
https://github.com/Kaffesky/kaffesky-markdown-templates.git
synced 2026-04-18 10:47:31 +02:00
Updates
This commit is contained in:
parent
e3e4f46cf1
commit
3b9daef024
4 changed files with 33 additions and 8 deletions
Binary file not shown.
Binary file not shown.
|
|
@ -57,9 +57,16 @@ sudo tlmgr install \
|
||||||
xcolor \
|
xcolor \
|
||||||
fontspec \
|
fontspec \
|
||||||
geometry \
|
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
|
### 5. Install fontconfig
|
||||||
|
|
||||||
`fc-list` and `fc-cache` are needed for font verification and are not included on macOS by default:
|
`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
|
```bash
|
||||||
pandoc input.md -o output.pdf \
|
pandoc input.md -o output.pdf \
|
||||||
--pdf-engine=xelatex \
|
--pdf-engine=xelatex \
|
||||||
--template=template_first-skyfritt-example.tex \
|
--template=./path/to/template_first-skyfritt-example.tex \
|
||||||
--shift-heading-level-by=-1
|
--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`?
|
### Why `--shift-heading-level-by=-1`?
|
||||||
|
|
@ -156,9 +174,10 @@ If you prefer LaTeX to number sections automatically (and write headings without
|
||||||
```bash
|
```bash
|
||||||
pandoc input.md -o output.pdf \
|
pandoc input.md -o output.pdf \
|
||||||
--pdf-engine=xelatex \
|
--pdf-engine=xelatex \
|
||||||
--template=template_first-skyfritt-example.tex \
|
--template=./path/to/template_first-skyfritt-example.tex \
|
||||||
--shift-heading-level-by=-1 \
|
--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:
|
You can also control the depth of numbering with the `secnumdepth` metadata variable:
|
||||||
|
|
|
||||||
|
|
@ -133,6 +133,9 @@ $endif$
|
||||||
|
|
||||||
%% ── Graphics & figures ────────────────────────────────────────────────────────
|
%% ── Graphics & figures ────────────────────────────────────────────────────────
|
||||||
\usepackage{graphicx}
|
\usepackage{graphicx}
|
||||||
|
$if(templatedir)$
|
||||||
|
\graphicspath{{$templatedir$/}}
|
||||||
|
$endif$
|
||||||
\usepackage{float}
|
\usepackage{float}
|
||||||
\makeatletter
|
\makeatletter
|
||||||
\def\maxwidth{\ifdim\Gin@nat@width>\linewidth\linewidth\else\Gin@nat@width\fi}
|
\def\maxwidth{\ifdim\Gin@nat@width>\linewidth\linewidth\else\Gin@nat@width\fi}
|
||||||
|
|
@ -185,15 +188,18 @@ $endif$
|
||||||
rectangle ++(1.27cm, -29.70cm);
|
rectangle ++(1.27cm, -29.70cm);
|
||||||
\end{tikzpicture}
|
\end{tikzpicture}
|
||||||
\raggedright
|
\raggedright
|
||||||
\vspace*{4cm}
|
\vspace*{0.3cm}
|
||||||
|
|
||||||
{\Huge\bfseries\color{accent} $title$ \par}
|
\includegraphics[width=5.5cm]{skyfritt-logo_borderless.pdf}\par
|
||||||
|
\vspace{1.3cm}
|
||||||
|
|
||||||
|
{\fontsize{38}{32}\selectfont\color{accent}\MakeUppercase{$title$} \par}
|
||||||
\vspace{0.5cm}
|
\vspace{0.5cm}
|
||||||
{\color{vertbar}\rule{3.31cm}{0.2cm}}
|
{\color{vertbar}\rule{3.31cm}{0.2cm}}
|
||||||
\vspace{1cm}
|
\vspace{1cm}
|
||||||
|
|
||||||
$if(subtitle)$
|
$if(subtitle)$
|
||||||
{\large\itshape $subtitle$ \par}
|
{\fontsize{15}{20}\selectfont $subtitle$ \par}
|
||||||
\vspace{1cm}
|
\vspace{1cm}
|
||||||
$endif$
|
$endif$
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue