Converts a tree of MkDocs .md files to LaTeX format, with table of contents, list of figures, list of tables and properly placed and dimensioned images.
Reads the whole documentation contents, adjusts it, converts it into LaTeX format using pandoc, adjusts that LaTeX content, writes the result to an output.tex
file.
- python3
- pandoc
python3 ./mkdocs2tex.py -i /path/to/mkdocs.yml
python3 ./mkdocs2tex.py -h
optional arguments:
-h, --help show this help message and exit
-i INPUT, --input INPUT
source MkDocs .yml configuration file
-o OUTPUT, --output OUTPUT
generated .tex file name
-t TMP, --tmp TMP directory for temporary files during conversion
Caveat: use absolute paths
- texlive
- texlive-latex-extra
- texlive-bibtex-extra
- texlive-font-utils
- lmodern
- latexmk
latexmk -f -pdf -interaction=nonstopmode output.tex
- @DDorch (original work)