I am currently running the following command to populate my latex template.
pandoc -s --top-level-division=chapter --template=template.tex metadata.md content/*.md -o frommarkdown.tex
The content of the latex-ized *.md files are populating the template via the
However this happens verbatim, the
$body$variable gets in-place substituted with the tex code generated from the md files. This generated a huge latex file with all my thesis chapters in one big file concatenated.
My ideal case would look like that I can
\include all of the on the fly generated tex-files in my document, allowing me to keep a clean latex document which can come in handy when debugging or altering a larger project (e.g thesis).
I would ideally like to have something like that:
My hunch was now to achieve this with a two step solution by first generating standalone tex files per *.md file (without the usage of a template). Then I would like to dynamically include these generated tex files in my main tex "template".
Can this be achieved with pandoc or do i need to write a custom shell script for this?