A small python program to create multiple-language LaTeX documents (like resumes) from a single XML file.
- python3
- lxml (
pip install lxml)
- Create a (or modify the attached)
template_LANG.texfile. WhereLANGis the two-letter language code (e.g.enfor English,defor German, ...). Use the Cheetah3 template engine syntax.- To get a printable ampersand
&, use&
- To get a printable ampersand
- Edit your personal data in
resume_data.xml- If you want a data field to have a different value in a certain language, use the
lang="en"attribute to specify which language is meant.
- If you want a data field to have a different value in a certain language, use the
- Execute resumetolatex:
python .\resumetolatex lang1 lang2 .... This will generate a filefilledTemplate_LANG.texfor each language - Compile the file(s) with your favorite LaTeX compiler.
Full chain (example)
python .\resumetolatex de en; latexmk -pdf -silent "filledTemplate_de.tex"; latexmk -pdf -silent "filledTemplate_en.tex"; latexmk -c; rm filledTemplate_de.tex; rm filledTemplate_en.tex;This repository also includes a hook.php file.
By renaming and editing the corresponding config.php.example file, you can setup a GitHub webhook to automatically re-make your resume when the master branch changes.