ModernCV Banking Style vs cover.cls: LaTeX Compile Engine Differences Explained

The ModernCV banking style CV requires LuaLaTeX to render fontawesome5 icons reliably, while the custom cover.cls cover letter requires XeLaTeX for its fontspec-dependent OpenType font loading, making them incompatible with a single compile engine.

The AI Job Search repository by MadsLorentzen provides two stock LaTeX templates optimized for automated job applications. Understanding the distinct moderncv banking style and cover.cls LaTeX compile engines is critical because each template relies on fundamentally different font handling architectures that dictate specific engine requirements.

Base Class Architecture

Each template builds on a different LaTeX foundation that determines its compile-time behavior.

ModernCV Banking Style

The CV template uses the standard moderncv class with the banking aesthetic. In cv/main_example.tex, the document loads with:

\documentclass[11pt,a4paper,sans]{moderncv}
\moderncvstyle{banking}
\moderncvcolor{blue}

This configuration provides predefined macros like \cventry and \section while handling color accents internally. The class relies on the standard LaTeX font system but requires modern engine support for icon packages.

cover.cls Custom Class

The cover letter template implements a thin wrapper around the base article class. According to the source in cover_letters/cover.cls, the class declaration uses:

\LoadClass{article}

This custom class imports a suite of layout packages including geometry, hyperref, xcolor, titlesec, and textpos. It exposes high-level macros such as \namesection, \companyname, and \lettercontent that abstract away low-level formatting commands.

Compile Engine Requirements

The divergence in compile engines stems from incompatible font handling requirements between the two templates.

LuaLaTeX for the ModernCV Banking CV

The LuaLaTeX engine is the default choice for the CV template because it handles the fontawesome5 package reliably across platforms. The fontawesome5 icons often trigger font-expansion errors when processed with pdfLaTeX, particularly on recent MiKTeX installations. While XeLaTeX can technically render the CV, the repository’s CI smoke test explicitly runs lualatex on cv/main_example.tex to ensure consistent builds.

XeLaTeX for the Cover Letter

The XeLaTeX engine is mandatory for the cover letter because cover.cls imports the fontspec package to load bundled OpenType fonts. As documented in SETUP.md, the class requires XeLaTeX (or LuaLaTeX) to process the \setmainfont and \setsansfont commands. The README explicitly states that the cover letter "compiles with xelatex because cover.cls requires fontspec".

Font Handling and Package Dependencies

Font architecture represents the primary technical constraint separating these templates.

  • ModernCV Banking: Relies on the traditional LaTeX font system with fontawesome5 providing scalable icons. No explicit font loading commands are required in the user-facing template.

  • cover.cls: Loads OpenType fonts directly via fontspec. Lines 30–34 in cover_letters/cover.cls define the specific font families (Lato and Raleway) using commands like \setmainfont{Lato} and \setsansfont{Raleway}.

Page Limits and Workflow Integration

Both templates enforce strict page constraints within the /apply workflow:

  • CV: Hard-coded to 2 pages maximum
  • Cover Letter: Hard-coded to 1 page maximum

These limits are validated during the automated compilation phase regardless of which engine processes the files.

Compilation Commands and Minimal Examples

Compiling the ModernCV Banking CV

Execute from the repository root:

cd cv
lualatex -interaction=nonstopmode -halt-on-error main_example.tex

Minimal working example:

\documentclass[11pt,a4paper,sans]{moderncv}
\moderncvstyle{banking}
\moderncvcolor{blue}
\name{John}{Doe}
\begin{document}
\makecvtitle
\section{Experience}
\cventry{2020--2023}{Data Scientist}{Acme Corp}{New York}{}{Developed ML pipelines.}
\end{document}

Compiling the cover.cls Cover Letter

Execute from the repository root:

cd cover_letters
xelatex -interaction=nonstopmode -halt-on-error cover_example.tex

Minimal working example:

\documentclass[]{cover}
\begin{document}
\namesection{John}{Doe}{john.doe@example.com}
\companyname{Acme Corp}
\companyaddress{123 Business Rd\\Metropolis}
\currentdate{\today}
\lettercontent{Dear Hiring Manager,}
\lettercontent{I am excited to apply for the Data Scientist role…}
\closing{Sincerely,}
\signature{John Doe}
\end{document}

Summary

  • ModernCV banking uses the moderncv class with LuaLaTeX to support fontawesome5 icons reliably
  • cover.cls extends the article class via \LoadClass{article} and requires XeLaTeX for fontspec OpenType font loading
  • The CV template enforces a 2-page limit, while the cover letter enforces 1 page
  • Source definitions for cover.cls fonts reside in cover_letters/cover.cls lines 30–34
  • Reference SETUP.md for the CI smoke test configurations validating these engine requirements

Frequently Asked Questions

Can I use pdfLaTeX for either the ModernCV banking style or cover.cls?

No. pdfLaTeX fails on the CV due to font-expansion errors with fontawesome5 and cannot process the cover letter because cover.cls relies on fontspec, which requires XeLaTeX or LuaLaTeX.

Why does the CV use LuaLaTeX instead of XeLaTeX?

While XeLaTeX can compile the ModernCV banking template, the repository standardizes on LuaLaTeX for the CV because it provides more consistent cross-platform behavior when handling modern font packages like fontawesome5, particularly on MiKTeX distributions.

What happens if I compile the cover letter with LuaLaTeX instead of XeLaTeX?

LuaLaTeX can technically process the cover letter since it also supports fontspec. However, the repository documentation and smoke tests explicitly specify XeLaTeX to ensure the bundled Lato and Raleway OpenType fonts load correctly without microtypography conflicts.

Where are the font definitions located in cover.cls?

The font definitions appear in cover_letters/cover.cls at lines 30–34, where the class uses \setmainfont and \setsansfont commands from the fontspec package to configure the Lato and Raleway typefaces.

Have a question about this repo?

These articles cover the highlights, but your codebase questions are specific. Give your agent direct access to the source. Share this with your agent to get started:

Share the following with your agent to get started:
curl -s "https://instagit.com/install.md"

Works with
Claude Codex Cursor VS Code OpenClaw Any MCP Client

Maintain an open-source project? Get it listed too →