Create a CV in LaTeX

starting from step 1

Posted on July 02, 2020 · 5 mins read

This post is a copy from my (Randy) personal website, but I thought it would be helpful to copy it here

Here is how I created my CV using the moderncv LaTeX package. This tutorial is designed for a Unix environment (such as that in a MacOS terminal).

Install LaTeX

See The LaTeX Project

Create folder for your CV

If you already have a folder for your CV, you can just use that one. Otherwise, I recommend creating a folder just for your CV. For example, here I create one within my Documents and move into it with cd:

mkdir ~/Documents/CV
cd ~/Documents/CV

Download moderncv files

From Xavier Danaux's moderncv GitHub repository, copy and paste the text from the template.tex file into a new file titled CV.tex within your CV directory. Also copy and paste the text from the publications.bib file into a new file within your CV directory titled pubs.bib

Changes to Pubs.bib

Open your pubs.bib document and add your publications. For an understanding of how to format .bib references, this site will be helpful: BibTex.org/Format

Changes to the CV.tex preamble

(The preamble is the region in a LaTeX document before \begin{document})

I prefer the "banking" style, so I changed "casual" to "banking" at line 12.
\moderncvstyle{banking}

Now add all of the packages you'll be using, which are as follows:
\usepackage[backend=biber,style=authoryear-comp, sorting=ydnt, maxbibnames=99]{biblatex} % bibliography
\usepackage[american]{babel} % helps convert TeX to American English
\usepackage{tabto} % spacing package

You'll also want to add your references (pubs.bib). (Optional: If you want to have multiple bibliographies (e.g., a different bibliography with conference presentations), copy the pubs.bib format in a different .bib file [such as pres.bib] and use the same command as that below to add the resource.)

\addbibresource{pubs.bib}

Optional: Add a function to bold last author name in bibliography
\newcommand{\makeauthorbold}[1]{
\DeclareNameFormat{author}{
\ifthenelse{\value{listcount}=1}
{
{\expandafter\ifstrequal\expandafter{\namepartfamily}{#1}{\mkbibbold{\namepartfamily\addcomma\addspace \namepartgiveni}}{\namepartfamily\addcomma\addspace \namepartgiveni}}
}{\ifnumless{\value{listcount}}{\value{liststop}}
{\expandafter\ifstrequal\expandafter{\namepartfamily}{#1}{\mkbibbold{\addcomma\addspace \namepartfamily\addcomma\addspace \namepartgiveni}}{\addcomma\addspace \namepartfamily\addcomma\addspace \namepartgiveni}}
{\expandafter\ifstrequal\expandafter{\namepartfamily}{#1}{\mkbibbold{\addcomma\addspace \namepartfamily\addcomma\addspace \namepartgiveni\addcomma\isdot}}{\addcomma\addspace \namepartfamily\addcomma\addspace \namepartgiveni\addcomma\isdot}}
}
\ifthenelse{\value{listcount}<\value{liststop}}
{\addcomma\space}
}
}
\makeauthorbold{Klabacka}

For lines 27-43, add and remove personal information sections as desired. I change the title from resumé to curriculum vitae and include my name, work address, email, homepage, twitter, and GitHub, and delete or comment out the other lines. In the end, my personal information section looks like this:
\name{Randy}{Klabacka}
\title{\Large{curriculum vitae}}
\address{331 Funchess Hall}{Auburn, AL}{USA}
\email{klabacka.randy@auburn.edu}
\homepage{randyklabacka.com}
\social[twitter]{HumbleHerper}
\social[github]{rklabacka}

Changes to the document

(These changes should be after \begin{document} in CV.tex)

In similar fashion, add in your education, experience, skills, and other sections in the order desired. You may wish to modify some of the formats on these- which will take some internet searching to get exactly what your looking for. In this tutorial I won't provide detailed information for every section I modified for my own CV (for that, feel free to check out the code for my CV on GitHub), but I will go over some broad things that I think are helpful.

To add your publications bibliography:
\section{Publications}
\begin{refsection}[pubs.bib]
\nocite{*}
\printbibliography[heading=none]
\end{refsection}

Delete the following lines (they will interfere with biblatex):
\nocite{*}
\bibliographystyle{plain}
\bibliography{publications}

Compile your CV!

On the command line, in the directory with your CV.tex and pubs.bib, execute the following commands in the provided sequence:
pdflatex CV.tex
biber CV
pdflatex CV.tex

Opening your newly created CV.pdf, it should look something like this: CV.pdf

Here are the final versions of CV.tex and pubs.bib that were used to create CV.pdf