Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/matcho/mkdocs2tex
Convert MkDocs .md files to LaTeX using pandoc
https://github.com/matcho/mkdocs2tex
latex mkdocs pandoc
Last synced: 7 days ago
JSON representation
Convert MkDocs .md files to LaTeX using pandoc
- Host: GitHub
- URL: https://github.com/matcho/mkdocs2tex
- Owner: matcho
- License: wtfpl
- Created: 2020-02-03T12:06:26.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2024-09-17T09:44:58.000Z (4 months ago)
- Last Synced: 2024-09-17T12:18:08.658Z (4 months ago)
- Topics: latex, mkdocs, pandoc
- Language: Python
- Homepage:
- Size: 5.86 KB
- Stars: 0
- Watchers: 2
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# mkdocs2tex
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.
## Requirements
* python3
* pandoc## Usage
`python3 ./mkdocs2tex.py -i /path/to/mkdocs.yml`
### Options
```
python3 ./mkdocs2tex.py -hoptional 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
## Build PDF from generated LaTeX
### Requirements
* texlive
* texlive-latex-extra
* texlive-bibtex-extra
* texlive-font-utils
* lmodern
* latexmk### Build PDF
`latexmk -f -pdf -interaction=nonstopmode output.tex`
## Contributors
* [@DDorch](https://github.com/DDorch) (original work)