One of the nicest features of Pandoc is its ability to combine structured data (like YAML) with a LaTeX template to generate professional-looking PDFs. This makes it especially useful for creating a curriculum vitae (CV), where you may want to keep your personal information separate from the style. That way, updating your CV is as simple as editing a .yaml file rather than touching your LaTeX template every time.
In this article, I’ll explain how to set up such a system: a .yaml file for your personal info, a .tex file for the design of your CV, and Pandoc with pdflatex to compile everything into a polished PDF.
Why use Pandoc + LaTeX for a CV?
- Separation of content and style: Your data (education, work experience, skills) lives in a simple YAML file, while the look of the CV is controlled in a LaTeX template.
- Easy updates: Update your details in the YAML and regenerate the PDF without worrying about formatting.
- Consistency: You can maintain multiple CV styles (academic, industry, one-page résumé) without duplicating content.
- Automation: Generate CVs with a single command in the terminal.
Step 1. Install the required tools
You’ll need:
- Pandoc – install instructions
- TeX distribution (e.g., TeX Live, MikTeX) with
pdflatexavailable
Check your setup by running:
| |
Step 2. Create your YAML file
Let’s call it cv.yaml. This file will store your personal information and CV sections. For example:
| |
This structured format makes it very easy to maintain.
Step 3. Create your LaTeX CV template
Now let’s create a file cv.tex that defines the style of your CV. Pandoc treats this as a template, where variables from the YAML will be injected.
A minimal example could look like this:
| |
Here, the $variables$ will be replaced by the contents of your YAML file. Loops like $for(experience)$ … $endfor$ let you repeat blocks for each item in a list.
Step 4. Generate your PDF
With everything set up, you can generate your CV PDF with:
| |
This command tells Pandoc to:
- Load the data from
cv.yaml. - Use
cv.texas the template. - Produce a PDF with
pdflatex.
Step 5. Customize the style
The real power of this setup comes from LaTeX. You can:
- Add color with
xcolor - Use modern fonts with
fontspec(if you use XeLaTeX or LuaLaTeX) - Adjust layout with
parskip,titlesec, or custom commands - Even create multiple templates (
cv-academic.tex,cv-industry.tex) while keeping a singlecv.yaml
Wrapping up
Using Pandoc + LaTeX templates + YAML data gives you a maintainable, automated way to build CVs. Instead of copy-pasting between Word files, you just update your structured YAML and rebuild.
This approach is not only cleaner and more flexible but also scales if you want to create multiple styles of CVs for different purposes.
