Write a CV in LaTeX (moderncv)

The class moderncv sets a CV with a date column on the left: \name, \address, \phone and \email store the personal data, \makecvtitle prints it, and each station is one \cventry with six arguments. Without a special class, a table with a narrow date column gives a similar result.

Preamble

The snippets on this page need these lines before \begin{document}:

\moderncvstyle{classic}
\moderncvcolor{blue}
\usepackage[T1]{fontenc}
\usepackage{lmodern}
\name{Anna}{Schmidt}

The snippets use the document class moderncv.

A complete CV

\moderncvstyle selects the layout, and \moderncvcolor the colour of the headings and the name. The style line is required: without it, the run reports no error but produces no pages. \name takes first name and family name separately, and \address takes street, city and country as three arguments, of which the last two may be left out. The option scale=0.8 of geometry sets the text area to 80 percent of the page.

Complete document:

\documentclass[11pt, a4paper]{moderncv}
\moderncvstyle{classic}
\moderncvcolor{blue}
\usepackage[T1]{fontenc}
\usepackage{lmodern}
\usepackage[scale=0.8]{geometry}

\name{Anna}{Schmidt}
\title{Curriculum Vitae}
\address{Example Street 12}{12345 Example City}{Germany}
\phone[mobile]{01234 567890}
\email{anna.schmidt@example.org}

\begin{document}
\makecvtitle

\section{Education}
\cventry{2022--2024}{M.Sc. Physics}{Example University}{Example City}{Grade 1.3}{Thesis on ultrasonic wind sensors}
\cventry{2019--2022}{B.Sc. Physics}{Example University}{Example City}{}{}

\section{Languages}
\cvitem{German}{native}
\cvitem{English}{fluent}

\end{document}
Result
The compiled example

Open in the editor

The commands for entries

\cventry{years}{degree or job}{institution}{city}{grade}{description} always takes six arguments; those you do not need stay empty as {}. \cvitem{label}{text} is one line with its label in the left column, and \cvitemwithcomment adds a comment at the right edge. \cvdoubleitem sets two pairs of label and text side by side. \cvlistitem is a line with a bullet, and \cvlistdoubleitem sets two of them side by side.

\section{Experience}
\cventry{since 2024}{Test engineer}{Example Ltd}{Sampletown}{}{Calibration of wind sensors}
\cventry{2021--2022}{Student assistant}{Example University}{Example City}{}{}

\section{Skills}
\cvitem{Methods}{data analysis, statistics}
\cvitemwithcomment{English}{fluent}{one year abroad}
\cvdoubleitem{German}{native}{French}{basic}
\cvlistitem{Driving licence class B}
\cvlistdoubleitem{First aid course}{Lifeguard certificate}
Result
The compiled example

Open in the editor

Style, colour and photo

The styles are classic, casual, banking, oldstyle and fancy; the colours are black, blue, burgundy, green, grey, orange, purple and red. \photo[64pt][0.4pt]{file} adds a photo to the heading: the first value is its height, the second the thickness of the frame around it.

Complete document:

\documentclass[11pt, a4paper]{moderncv}
\moderncvstyle{classic}
\moderncvcolor{green}
\usepackage[T1]{fontenc}
\usepackage{lmodern}
\usepackage[scale=0.8]{geometry}

\name{Anna}{Schmidt}
\address{Example Street 12}{12345 Example City}
\email{anna.schmidt@example.org}
\photo[64pt][0.4pt]{image.png}

\begin{document}
\makecvtitle

\section{Education}
\cventry{2022--2024}{M.Sc. Physics}{Example University}{Example City}{}{}

\end{document}
Result
The compiled example

Without a special class

In article, a tabularx table with a fixed date column and an X column for the text gives the same structure. @{} at both ends removes the padding, so the table is as wide as the text. \newline starts a new line inside the X cell.

Complete document:

\documentclass[11pt, a4paper]{article}
\usepackage[T1]{fontenc}
\usepackage[margin=2.5cm]{geometry}
\usepackage{tabularx}
\pagestyle{empty}
\setlength{\parindent}{0pt}

\begin{document}

{\LARGE\bfseries Anna Schmidt}\\[1ex]
Example Street 12, 12345 Example City\\
anna.schmidt@example.org

\section*{Education}
\begin{tabularx}{\textwidth}{@{}p{3cm}X@{}}
2022--2024 & \textbf{M.Sc. Physics}, Example University\newline
	Thesis on ultrasonic wind sensors \\[1ex]
2019--2022 & \textbf{B.Sc. Physics}, Example University \\
\end{tabularx}

\section*{Skills}
\begin{tabularx}{\textwidth}{@{}p{3cm}X@{}}
Languages & German (native), English (fluent) \\
Programming & data analysis, statistics \\
\end{tabularx}

\end{document}
Result
The compiled example

Open in the editor

Pitfalls

Compiled with pdfLaTeX from TeX Live 2023.

Related pages