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}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}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}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}Pitfalls
moderncvloadshyperrefitself. A line such as\usepackage[hidelinks]{hyperref}in the preamble stops the run with Option clash for package geometry.- A
\cventrywith fewer than six arguments reads the following text as its missing arguments. If an empty line comes first, the run stops with the error Paragraph ended before \label was complete. - Without
lmodern, the log warns that the font size of the name is not available and that another size is used. Loadinglmoderntogether with\usepackage[T1]{fontenc}removes the warning.
Compiled with pdfLaTeX from TeX Live 2023.
Related pages
- How-to Write a letter in LaTeX
- Package
lmodern - Package
tabularx - Error Option clash for package geometry
- Error Paragraph ended before \label was complete
- Package
fontenc - Package
geometry