A sound and versatile pandoc LaTeX boilerplate to produce academic books using Markdown files featuring YAML, KOMA-Script, BibLaTeX and CSL
A sound and versatile pandoc LaTeX boilerplate to produce academic books (in PDF) utilising solely modular Markdown files, featuring YAML, KOMA-Script, BibLaTeX and CSL.
For typesetting an article please see the robusta boilerplate.
The arabica boilerplate is inspired by the pandoc latex template eisvogel by Wandmalfarbe and was built with the help of the following sources and tools: References and Credits. For other projects like the one at hand please see the list of user contributed templates at the pandoc wiki and the list of pandoc boilerplates at the pandoc wiki.
./controls/
and ./settings/
)./settings/
)./core/
) where you can organise them intuitively.
The pandoc template itself lives in ./controls/
.Default title page | Default info page | Default example page |
---|---|---|
Go to ./examples/
to view a list of complete example book projects.
cd /path/to/your/templates/
.git clone https://github.com/qualiacode/arabica.git
cp /path/to/your/templates/arabica/* /path/to/your/projects/projectname/
cd /path/to/your/projects/projectname/
./examples
:
rm -vrf examples/*
./settings/00_01_metadata.yaml
'()(meta)data)'
.title: &title 'Short title'
subtitle: &subtitle ~
author: &author
- 'Jane Roe'
- 'John Doe'
year: '2018'
./settings/00_01_settings.yaml
.classoption:
- 'twoside'
- 'twocolumn'
- 'parskip=full'
custom_title_page: false
...
toc: true
./bib/
Bib(La)TeX
format (.bib
) in the file ./bib/.references.bib
../settings/00_01_settings.yaml
..bib
file by adding the corresponding path of your .bib
file as value
to the corresponding key
.bibliography: './bib/references.bib'
.bib
file:@article{Cantor1984,
langid = {german},
title = {Ein Beitrag zur Mannigfaltigkeitslehre},
volume = {1877},
doi = {10.1007/978-3-7091-9516-1_3},
journaltitle = {Über unendliche, lineare Punktmannigfaltigkeiten},
date = {1984},
pages = {25-44},
author = {Cantor, Georg}
}
cite key
for this bibliographic entry is Cantor1984
.chicago-author-date-de.csl
..csl
fiile to: ./csl/
./settings/00_01_settings.yaml
..csl
file by adding the corresponding path of your .csl
file as value
to the corresponding key
.csl: './csl/chicago-author-date-de.csl'
./core/
and write you markdown files.01_introduction.md
02_mainpart.md
03_conclusion.md
[@citekey]
to your markdown file(s) where ever you need them.„Cantor once said: ‚Wenn zwei wohldefinirte Mannigfaltigkeiten ...‘ [@Cantor1984]“
pandoc \
-s \
-o ./output/projectname.pdf \
--data-dir=$HOME/path/to/your/projects/projectname/ \
--filter pandoc-crossref \
--filter pandoc-citeproc \
--pdf-engine=xelatex \
--top-level-division=chapter \
--number-sections \
--template $HOME/path/to/your/projects/projectname/controls/arabica.latex \
./core/*.md \
./settings/*.yaml \
./metadata/*.yaml
Done!
Alternatively you can omit the long path in the --template
option by copying the arabica.latex
template located at ./controls/arabica.latex
to the default directory of your pandoc templates located at ~/.pandoc/templates/
.
If you have copied the arabica.latex
template into the directory of your default pandoc templates, then you can execute pandoc like this:
pandoc \
-s \
-o ./output/projectname.pdf \
--data-dir=$HOME/path/to/your/projects/projectname/ \
--filter pandoc-crossref \
--filter pandoc-citeproc \
--pdf-engine=xelatex \
--top-level-division=chapter \
--number-sections \
--template arabica.latex \
./core/*.md \
./settings/*.yaml \
./metadata/*.yaml
.tex
file by runing pandoc with-o ./output/projectname.tex
Please note, though: the arabica boilerplate is designed to be used with the given directory structure respectively file structure indicated in BODYPLAN.md.
Of particular importance are the metadata and settings files: ./metadata/00_01_metadata.yaml
./settings/00_02_settings.yaml
.
The boilerplate should work even if you change its inner structure but keep in mind to change all the paths and variables accordingly.
The arabica.template
file may work as long as you provide some basic variables used in this template file.
./output/
and enjoy your results.pandoc -D latex > default.latex
.MIT License
Copyright (c) 2018 Martin Maga
Go to ./LICENSE.md.