# LaTeX Templates for CV and Cover Letter Generation in AI-Job-Search

> Discover LaTeX templates for AI job search CVs and cover letters. Learn how ModernCV and a custom class create professional documents using XeLaTeX or LuaLaTeX.

- Repository: [Mads Lorentzen/ai-job-search](https://github.com/MadsLorentzen/ai-job-search)
- Tags: how-to-guide
- Published: 2026-08-31

---

**The AI-Job-Search framework utilizes the ModernCV package in banking style for curriculum vitae generation and a custom `cover.cls` class for cover letters, both compiled via XeLaTeX or LuaLaTeX through the automated build pipeline.**

The MadsLorentzen/ai-job-search repository employs a dual-template LaTeX architecture to produce professional job application documents. This open-source system ships with stock LaTeX templates configured for immediate use, generating ATS-friendly PDFs through automated compilation workflows. Understanding these LaTeX templates reveals how the framework balances typographic quality with seamless content generation.

## CV Template: ModernCV Banking Style

The framework generates CVs using the **ModernCV** package, an external CTAN class actively maintained by the LaTeX community. In `cv/main_example.tex` (lines 9–14), the document preamble configures the **banking style** with a blue color scheme optimized for professional finance and technology sectors.

Key configuration parameters include:

- **Document class**: `\documentclass[11pt,a4paper,sans]{moderncv}`
- **Style directive**: `\moderncvstyle{banking}` for a clean, horizontal layout
- **Color profile**: `\moderncvcolor{blue}` for consistent branding
- **Geometry**: `\usepackage[scale=0.85]{geometry}` for balanced margins

```latex
\documentclass[11pt,a4paper,sans]{moderncv}
\moderncvstyle{banking}
\moderncvcolor{blue}
\usepackage[scale=0.85]{geometry}
% …personal data and sections…
\begin{document}
\makecvtitle
% …content…
\end{document}

```

The repository pins the ModernCV version via the Docker image defined in [`SETUP.md`](https://github.com/MadsLorentzen/ai-job-search/blob/main/SETUP.md) (lines 71 and 116), ensuring reproducible builds across environments.

## Cover Letter Template: Custom cover.cls

For cover letters, the framework eschews external packages in favor of a minimal custom class defined in `cover_letters/cover.cls` (line 2). This lightweight implementation provides precise control over page geometry and typography while maintaining compilation speed.

The **cover.cls** template utilizes the **Lato** font family (bundled under `cover_letters/OpenFonts/`) and exposes a simple macro surface via `\coverletter{…}` for body content injection. The `cover_letters/cover_example.tex` file (line 12) demonstrates the standard implementation:

```latex
\documentclass[]{cover}
\usepackage{fontspec}
\setmainfont{Lato}
\begin{document}
\coverletter{
  \section*{Dear Hiring Manager,}
  % body of the letter …
}
\end{document}

```

This custom class produces a strict one-page PDF, contrasting with the two-page CV output, ensuring cover letters remain concise and scannable.

## Build Pipeline and Compilation

The [`tools/verify_pdf.py`](https://github.com/MadsLorentzen/ai-job-search/blob/main/tools/verify_pdf.py) script orchestrates the compilation process, invoking **XeLaTeX** or **LuaLaTeX** engines to process these templates. These engines are required for advanced font handling via `fontspec` and modern OpenType font support.

The build workflow executes a **single-pass LaTeX** compilation for both document types, generating PDFs that are subsequently attached to job applications through the `/apply` command. This architecture eliminates the need for users to manage LaTeX compilation manually while ensuring consistent output formatting.

## Template Customization Architecture

According to [`templates/README.md`](https://github.com/MadsLorentzen/ai-job-search/blob/main/templates/README.md), the framework "works out of the box with its stock templates (moderncv for CVs, `cover.cls` for cover letters)." However, the system supports complete template substitution through the `/add-template` command documented in [`.claude/commands/add-template.md`](https://github.com/MadsLorentzen/ai-job-search/blob/main/.claude/commands/add-template.md).

Users may override defaults with:
- Custom LaTeX templates adhering to the same interface contracts
- Alternative typesetting systems such as Typst
- Modified style definitions while retaining the automated content injection pipeline

## Summary

- The CV template relies on the external **ModernCV** CTAN package configured with banking style and blue color scheme in `cv/main_example.tex`.
- The cover letter utilizes a minimal custom **cover.cls** located in `cover_letters/`, implementing the Lato font family and `\coverletter` macro interface.
- The [`tools/verify_pdf.py`](https://github.com/MadsLorentzen/ai-job-search/blob/main/tools/verify_pdf.py) utility manages compilation using XeLaTeX or LuaLaTeX engines for modern font support.
- Stock templates can be replaced via the `/add-template` command, supporting both LaTeX and Typst alternative implementations.

## Frequently Asked Questions

### Can I use custom LaTeX templates instead of the stock ones?

Yes. The `/add-template` command documented in [`.claude/commands/add-template.md`](https://github.com/MadsLorentzen/ai-job-search/blob/main/.claude/commands/add-template.md) allows users to register custom LaTeX or Typst templates while maintaining the framework's automated content generation pipeline. The system replaces the default `moderncv` and `cover.cls` references with user-provided alternatives.

### Which LaTeX engine handles the PDF compilation?

The framework uses **XeLaTeX** or **LuaLaTeX** as implemented in [`tools/verify_pdf.py`](https://github.com/MadsLorentzen/ai-job-search/blob/main/tools/verify_pdf.py). These engines are specifically required to support the `fontspec` package used by `cover.cls` for loading the Lato font family and handling modern OpenType font features.

### Where are the fonts stored for the cover letter template?

The **Lato** and **Raleway** font families are bundled within the `cover_letters/OpenFonts/` directory. The custom `cover.cls` loads these via `fontspec` to ensure consistent typography without requiring system-wide font installation, making the template portable across different operating systems.

### Is the ModernCV banking style compatible with ATS software?

Yes. The banking style in ModernCV produces a clean, horizontal-layout PDF that parses reliably by Applicant Tracking Systems. Unlike heavily designed CV templates that use complex tables or graphics, the banking style maintains a linear document structure while preserving professional aesthetics.