Introduction
Keeping a professional resume updated and adaptable for various applications can be a challenging. This post demonstrates how leveraging Markdown for content and Pandoc for conversion simplifies the process, enabling you to maintain a single, clean source file that effortlessly transforms into polished PDF, DOCX, or HTML outputs.
Why Markdown and Pandoc?
When it comes to resume management, using Markdown and Pandoc offers several advantages:
- Version Control: Your resume becomes easily trackable in Git and you can use tags or branches to preserve the versions that were sent to a job posting;
- Simple Syntax: Markdown is simple, human-readable syntax makes editing and maintaining your resume straightforward;
- Multiple Formats: Update your resume in one central Markdown file and generate multiple formats (PDF, DOCX, HTML, etc.). The source can even be rendered directly in platforms like GitHub;
- Separation of Concerns: Keep your resume content clean in Markdown while managing formatting externally through templates. This ensures consistent styling across all generated formats, unlike manually formatted documents where styles can drift over time;
- Multi-language Support: Facilitate multi-language resumes by managing different language versions of your content more easily;
- Automation with Filters: Extend functionality with Pandoc filters (written in Lua or Python) to automate tasks like citations, custom formatting, or conditional content inclusion.
Setting Up the Environment
To get started, youâll need Pandoc and a PDF rendering engine like LaTeX, wkhtmltopdf, or WeasyPrint. Note that each engine has specific dependencies; for instance, using LaTeX necessitates installing numerous packages (e.g., amsfonts
, amsmath
, graphicx
, hyperref
, babel
, etc.).
To avoid cluttering your system with numerous dependencies, consider running Pandoc within a Docker container. This approach isolates the environment while still allowing easy access to local templates, fonts, and assets via Docker volumes.
That said, in this post, I wonât cover installing Pandoc and will focus on using it in a container.
Pandoc has several container image variations (here is the official list), but I use pandoc/extra
, that comes with LaTeX and dependencies installed.
Pull the image:
docker pull pandoc/extra
And every time you run Pandoc, use a docker run --rm
to start a container and remove it afterwards:
docker run --rm -v "$(pwd):/data" -u $(id -u):$(id -g) pandoc/extra {pandoc-params}
Example:
docker run --rm -v "$(pwd):/data" -u $(id -u):$(id -g) pandoc/extra Resume.md -o Resume.pdf
âčïž For simplicityâs sake, for the rest of the post Iâll use just the
pandoc {params}
command.
Creating Your Resume in Markdown
Begin by creating a resume.md
file. Hereâs a fundamental structure to get you started:
|
|
Generating Your Resume
Use the following Pandoc commands to convert your Markdown resume into various formats:
To PDF
pandoc resume.md -o resume.pdf
To DOCX
pandoc resume.md -o resume.docx
To HTML
pandoc resume.md -o resume.html -s
Templates
Pandoc templates offer diverse styles and functionalities. Select one that matches your desired aesthetic and customization needs. Popular choices include Eisvogel for LaTeX/PDF and various options for HTML/CSS.
If you intend to generate in more than one format, you need to chose a template that support all of them or use one template for each format.
Using a built-in or installed template (e.g., Eisvogel for PDF)
To use a built-in template pass its name in the template
parameter:
pandoc resume.md -o resume.pdf --template eisvogel
Using a custom template file within a container
To use a custom template within a container, create a volume mapping a folder with the container and pass the relative path in the template
parameter:
docker run --rm \
--volume "$(pwd):/data" \
--volume "$(pwd)/custom-templates:/templates" \
--user "$(id -u):$(id -g)" \
pandoc/extra \
resume.md \
-o resume.pdf \
--template /templates/my-custom-template.latex
Frontmatter parameters
Pandoc utilizes variables defined in a YAML metadata block (frontmatter) at the beginning of your Markdown file. Templates often define custom variables for controlling layout, styling, or adding header/footer information â consult the specific templateâs documentation for details.
Here is an example of variables used by Pandoc:
|
|
Custom Styling (with LaTeX)
For fine-grained control PDF output via LaTeX, you can include custom LaTeX code snippets. Create a file (e.g., styling.tex
) with your customizations:
|
|
Then, include this file during conversion using the --include-in-header
flag:
pandoc resume.md -o resume.pdf --template eisvogel --include-in-header=styling.tex
Similarly, for HTML output, you can provide a custom CSS file using the --css
flag.
Tips and Best Practices
- Keep it Simple: Markdown is meant to be readable. Focus on content structure;
- Version Control: Use Git to track changes, experiment with branches, and tag versions sent to employers;
- Separate Content and Style: Manage styling externally using LaTeX includes/templates for PDF or CSS for HTML to keep your Markdown focused on content;
- Verify Output: Always check how your resume looks in each format (PDF, DOCX, HTML) to ensure correctness and the desired appearance;
- Use Templates and Variables: Leverage different templates and use metadata variables and Pandoc filters to easily generate tailored resume versions for specific job applications without duplicating the core content.
Exploring More Templates
Beyond the popular Eisvogel template, many other options exist on GitHub, offering different styles and features. Some uses YAML instead of Markdown for content.
Here are a few examples:
- john-bokma/resume-pandoc: LaTeX-based, uses YAML metadata;
- roguh/pandoc-resume: Simple template with scripts for PDF, DOCX, and HTML generation. Includes CSS and reference DOCX;
- plain-plain-text/simple-cv: Minimalist template using Bootstrap for HTML and memoir for LaTeX/PDF;
- florianschwanz/awesome-cv-pandoc: Integrates the well-regarded âAwesome CVâ LaTeX template with Pandoc;
- bmschmidt/CV-pandoc-healy: Focuses on separating YAML data from LaTeX styling;
- kjhealy/pandoc-templates: A collection of Pandoc templates for generating HTML, LaTeX, and PDF documents
- samijuvonen/pandoc_resume_template: Uses YAML for content, supports multiple outputs (PDF, HTML, Markdown, TXT) via XeLaTeX and includes a Makefile.
When choosing a template, consider its output formats, customization options, dependencies, and documentation.
References
- Pandoc Documentation
- Markdown Guide
- LaTeX Templates
- GitHub Topic: pandoc-templates - Discover more templates.