m3au's dev blog

How I Moved My CV to LaTeX (and Why You Should Too)

$ wc -l cv.tex
183 cv.tex
$ grep "itemize" cv.tex | wc -l
12

After maintaining my CV in Word for 13+ years, I finally made the switch to LaTeX. Here's how I did it, focusing on the technical setup and practical benefits.

The Setup

I use VS Code with the LaTeX Workshop extension (james-yu.latex-workshop) and TinyTeX - a lightweight LaTeX distribution that works great with VS Code. The extension provides real-time preview, syntax highlighting, and automatic compilation.

Setup is straightforward:

# Install TinyTeX
curl -sL "https://yihui.org/tinytex/install-bin-unix.sh" | sh

# Install the LaTeX Workshop extension
code --install-extension james-yu.latex-workshop

My CV is now a single .tex file:

% The core structure
\documentclass[11pt,a4paper]{article}
\usepackage[utf8]{inputenc}
\usepackage{geometry}
\usepackage{fontawesome}  % For those sweet icons

% Custom styling
\definecolor{primary}{RGB}{70,70,70}
\definecolor{accent}{RGB}{0,112,192}

The workflow is simple:

  1. Edit in VS Code with real-time preview
  2. Save triggers automatic compilation
  3. Review the PDF output
  4. Commit changes to git

Why It Works Better

If you're comfortable with code, you'll find LaTeX surprisingly natural. Here's what makes it effective:

  1. Version Control Friendly

Every change is tracked in git:

git diff cv.tex
- Senior Test Automation Engineer
+ Lead Test Automation Engineer
  1. Consistent Formatting

Each entry follows a consistent pattern:

\entry{Senior Test Automation Engineer}{XEMPUS}{May 2023 - Mar 2024}{
  \begin{itemize}
      \item Established cross-team QA department...
  \end{itemize}
}
  1. Reusable Components
% Define once, use everywhere
\newcommand{\entry}[4]{
  \noindent{\sffamily\bfseries#1}
  \hfill\mbox{\sffamily#2\hspace{2em}#3}
  \par\vspace{0.5em}
  {\sffamily#4}
  \par\vspace{1.5em}
}

The Tools

1. Text Editor Power

All your usual text editing tools work:

:%s/Engineer/Architect/g  # Mass update titles
:g/2020/d                # Remove all 2020 entries

2. Build System

You can compile directly from the command line:

# Basic compilation
pdflatex cv.tex

# For better output quality (resolves references and bibliography)
pdflatex cv.tex
pdflatex cv.tex  # Yes, twice - for proper cross-references

Or use a Makefile for convenience:

# Makefile
pdf:
  pdflatex cv.tex
  pdflatex cv.tex  # Run twice for proper cross-references
  open cv.pdf

clean:
  rm -f *.aux *.log *.out

3. Layout Settings

Set your margins and formatting once:

% Set it once
\geometry{
  a4paper,
  top=1.5cm,
  bottom=1.5cm,
  left=2cm,
  right=2cm
}

Quick Start

# macOS
brew install basictex
# Ubuntu
sudo apt install texlive-base

# Clone my template
git clone https://github.com/yourusername/latex-cv-template
cd latex-cv-template
make pdf

Pro Tips

  1. Basic .gitignore:
*.aux
*.log
*.out
*.pdf
  1. VS Code configuration:
{
  "latex-workshop.latex.tools": [
    {
      "name": "pdflatex",
      "command": "pdflatex",
      "args": ["-synctex=1", "-interaction=nonstopmode", "-file-line-error", "%DOC%"]
    }
  ],
  "latex-workshop.latex.autoBuild.run": "onSave",
  "latex-workshop.view.pdf.viewer": "tab",
  "latex-workshop.latex.clean.fileTypes": ["*.aux", "*.log", "*.synctex.gz"]
}

Automated Builds with GitHub Actions

I've set up GitHub Actions to automatically compile the PDF whenever changes are pushed to the repository. The workflow uses the same commands we'd use locally:

# .github/workflows/build-cv.yml
name: Build CV

on:
  push:
    paths:
      - "**.tex" # Trigger only on .tex file changes
    branches:
      - main

jobs:
  build:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4

      - name: Cache TinyTeX
        uses: actions/cache@v4
        with:
          path: ~/.TinyTeX
          key: tinytex-${{ runner.os }}-${{ hashFiles('**/*.tex') }}
          restore-keys: |
            tinytex-${{ runner.os }}-

      - name: Install TinyTeX
        uses: r-lib/actions/setup-tinytex@v2
        env:
          TINYTEX_INSTALLER: cached

      - name: Cache LaTeX packages
        uses: actions/cache@v4
        with:
          path: |
            ~/.texlive
            ~/.texmf
          key: latex-packages-${{ runner.os }}-${{ hashFiles('**/*.tex') }}

      - name: Build PDF
        run: |
          # Run twice for proper cross-references
          pdflatex -interaction=nonstopmode cv.tex
          pdflatex -interaction=nonstopmode cv.tex
          mv cv.pdf Bruno_Palma_Curriculum_Vitae.pdf

      - name: Upload PDF
        uses: actions/upload-artifact@v4
        with:
          name: CV
          path: Bruno_Palma_Curriculum_Vitae.pdf

      - name: Update Release
        uses: softprops/action-gh-release@v1
        if: startsWith(github.ref, 'refs/tags/')
        with:
          files: Bruno_Palma_Curriculum_Vitae.pdf

This workflow:

  1. Installs TinyTeX in the CI environment
  2. Compiles the PDF when tex files change
  3. Uploads the PDF as a build artifact
  4. Creates a release with the PDF when you tag a version

To use it, just push your changes and check the Actions tab for the latest build. For releases, tag your commit:

git tag v1.0.0
git push origin v1.0.0

The Result

My CV maintenance is now:

The initial setup takes about an hour, but the long-term benefits are worth it. Feel free to check out my template and adapt it to your needs.

#automation #cv #latex #tech-writing