%% moderncv_userguide.tex as shipped with 2024-07-18 v2.4.1 modern curriculum vitae and letter document class (moderncv)
%% 2021 David Seus, cryptointerest@posteo.de
%
% This work may be distributed and/or modified under the
% conditions of the LaTeX Project Public License version 1.3c,
% available at http://www.latex-project.org/lppl/.

\documentclass[a4paper, 11pt]{article}

\title{%
  \texttt{moderncv} User Guide\\
  {\small Package v2.4.1}%
}
% Cristina Sambo,
\author{%
  Package by Xavier Danaux\\
  and\\
  moderncv community\\
  {\small Documentation by David Seus}%
}
\date{\today}

% Language and encoding options
\usepackage[english]{babel}
\usepackage{ifxetex, ifluatex}
\newif\ifxetexorluatex
\ifxetex
  \xetexorluatextrue
\else
  \ifluatex
    \xetexorluatextrue
  \else
    \xetexorluatexfalse
  \fi
\fi

% PDFLaTeX or LUALaTeX/XeLaTeX
\ifxetexorluatex
  % \usepackage{luatextra}
  % \usepackage{lualatex-math}
  \usepackage{shellesc}   % Fix a bug for lualatex shellescape
  % \usepackage{unicode-math}
  % \setmathfont{xits-math.otf}
\else
  \usepackage[utf8]{inputenx}   % Uncomment if using pdflatex, comment if using lualatex
\fi
\PassOptionsToPackage{T1}{fontenc}  % T2A for Cyrillic
\usepackage[T1]{fontenc}

% Font options
\usepackage{txfonts}
\usepackage{marvosym}
\usepackage{pifont}

% Margins, spacing and page layout
\usepackage[pdftex, colorlinks=true]{hyperref}  % hyperref must be loaded before geometry
\usepackage[pdftex, marginparwidth=50pt]{geometry}
\geometry{top=2.5cm, bottom=3cm}
\usepackage{parskip}  % Replace paragraph indentation with vertical spacing
\frenchspacing  % Suppress additional space after a full stop
\renewcommand{\arraystretch}{1.1}

% Packages
\usepackage{graphicx}
\usepackage{xcolor}
\usepackage[labelfont=sl, font=small, width=0.9\textwidth]{caption}
\usepackage{marvosym}
\usepackage{latexsym}
\usepackage{url}
\usepackage{scrhack}  % Fix warnings when using KOMA with listings package
\usepackage{xspace}   % Fix spacing after macros
\usepackage{mparhack}   % Fix marginpar
\usepackage{microtype}
\usepackage{multicol}   % Multicolumn text for long lists

% Code listings
\usepackage{listings}
% \lstset{emph={trueIndex, root}, emphstyle=\color{BlueViolet}}% \underbar}   % Special keywords
\lstset{%
  language=[LaTeX]Tex, % C++,
  morekeywords={PassOptionsToPackage, selectlanguage},
  keywordstyle=\color{cvblue}, % \bfseries,
  basicstyle=\small\ttfamily,
  % identifierstyle=\color{NavyBlue},
  commentstyle=\color{gray}\ttfamily,
  stringstyle=\rmfamily,
  numbers=none, % left,
  numberstyle=\scriptsize, % \tiny
  stepnumber=5,
  numbersep=8pt,
  showstringspaces=false,
  breaklines=true,
  % frameround=ftff,
  % frame=single,
  belowcaptionskip=0.75\baselineskip,
  % frame=L,
  emph={
    cvitem, cventry, cvdoubleentry, cvdoubleitem, cvtripleitem, cvlistitem, cvlistdoubleitem, cvcolumns, moderncvstyle, moderncvcolor,
    cvskill, cvskilllegend, cvskillplainlegend, cvskillhead, cvskillentry, nopagenumbers,
    name, born, address, email, link, social, phone, homepage, extrainfo, photo, quote, section, subsection, setlength, NewDocumentCommand, definecolor, colorlet, cvitemwithcomment,
    recipient, subject, opening, closing, signature, enclosure
  },
  emphstyle={\color{cvblue}},
  emph={[2]
    familydefault, sfdefault, rmdefault, inputenc, moderncv, document, bibliographyitemlabel,
    addresssymbol, mobilephonesymbol, fixedphonesymbol, faxphonesymbol, emailsymbol, homepagesymbol, linkedinsocialsymbol,
    xingsocialsymbol, twittersocialsymbol, githubsocialsymbol, gitlabsocialsymbol,
    stackoverflowsocialsymbol, bitbucketsocialsymbol, skypesocialsymbol, orcidsocialsymbol, researchgatesocialsymbol, arxivsocialsymbol, inspiresocialsymbol,
    researcheridsocialsymbol, telegramsocialsymbol, whatsappsocialsymbol, signalsocialsymbol, matrixsocialsymbol, googlescholarsocialsymbol, cvstretchability, bornsymbol
  },
  emphstyle={[2]\color{cvblue!60!cvgrey}\bfseries},
  literate={{é}{{\'e}}1},
}

% Hyperlinks
\usepackage{hyperref}
\hypersetup{
  unicode=true,
  % draft,  % Draft mode for printing (see below)
  colorlinks=true, linktocpage=true, pdfstartpage=3, pdfstartview=FitV,
  % colorlinks=false, linktocpage=false, pdfstartpage=3, pdfstartview=FitV, pdfborder={0 0 0},  % Black links (e.g., for printing)
  breaklinks=true, pageanchor=true,
  pdfpagemode=UseNone,
  % pdfpagemode=UseOutlines,
  plainpages=false, bookmarksnumbered, bookmarksopen=true, bookmarksopenlevel=1,
  hypertexnames=true, pdfhighlight=/O, % nesting=true, frenchlinks,
  urlcolor=cvblue, linkcolor=cvblue, citecolor=cvblue, % pagecolor=RoyalBlue,
  % urlcolor=Black, linkcolor=Black, citecolor=Black, % pagecolor=Black,
  % pdfborder={0 0 1},  % Width of PDF link border 0 0 1, 0 0 0 = colorlinks
  % linkbordercolor=gray!15,
  % citebordercolor=green!15,
}

% Colors
\definecolor{cvblue}{rgb}{0.22, 0.45, 0.70}
\definecolor{cvgreen}{rgb}{0.35, 0.70, 0.30}
\definecolor{cvred}{rgb}{0.95, 0.20, 0.20}
\definecolor{cvorange}{rgb}{0.95, 0.55, 0.15}
\definecolor{cvgrey}{rgb}{0.75, 0.75, 0.75}
\definecolor{cvburgundy}{rgb}{0.596078, 0, 0}   % burgundy: 139/255 (0.545098) or 152/255 (0.596078)
\definecolor{cvgrey}{rgb}{0.55, 0.55, 0.55}
\definecolor{cvpurple}{rgb}{0.50, 0.33, 0.80}

% Macros
\newcommand{\todo}[1]{\marginpar{\raggedright \textcolor{red}{[\textbf{TODO:} #1]}}}
\newcommand{\todox}[1]{\textcolor{red}{[\textbf{TODO:} #1]}}
\newcommand{\note}{\paragraph{Note.}}
\newcommand{\code}[1]{\lstinline!#1!}
\newcommand{\moderncv}{\code{moderncv}}
\newcommand{\Moderncv}{\moderncv~}
\newcommand{\github}{GitHub}
\newcommand{\Github}{\github~}
\newcommand{\ctan}{CTAN}
\newcommand{\Ctan}{\ctan~}
\newcommand{\cvtemplate}{\code{template.tex}}
\newcommand{\Cvtemplate}{\cvtemplate~}
\newcommand{\Latex}{\LaTeX~}
\newcommand{\biblatex}{BibLaTeX}
\newcommand{\Biblatex}{\biblatex~}
\newcommand{\cvdoccolorbox}[1]{{\color{#1}\rule{4ex}{2ex}}}
\newcommand{\moderncvGithub}{\url{https://github.com/moderncv/moderncv}}
\newcommand{\moderncvCtan}{\url{https://ctan.org/pkg/moderncv}}





% ==================
% DOCUMENT BEGINNING
% ==================
\begin{document}
\maketitle
\begin{abstract}
  \noindent
  The \Moderncv package provides a document class for typesetting modern curriculum vit\ae{} and cover letters in various styles.
  Five predefined styles are available, each of which can be adjusted through various options for headings, footers and colors.
  It is fairly customizable, allowing the user to adjust the look and feel of each style to their liking.
  Several macros allow the user to add content to the CV and format it in a consistent way.
  A letter of motivation consistent with the style is part of the template as well.
\end{abstract}
\tableofcontents



\section{Getting started}
\subsection{How to read this manual}
This manual is organized as follows.
The current section explains on how to get started with the \Moderncv package, i.e. how to install required packages.
% \emph{Note that it is assumed that you know how to install \Latex packages in case some are missing.}
Section \ref{section:moderncvTemplate} explains how to work with the \Moderncv template file step by step.
Section \ref{section:customization} details the customizations that the user can make: the different styles, their options, colors and tips and tricks.
Section \ref{section:implementationDetails} details the packages that \Moderncv uses, known problems and possible solutions to those problems.

\subsection{Installation instructions}
If the \Moderncv package does not ship with your \Latex distribution or if the installed version is too old, grab the \Moderncv code from \Ctan or \github:

\begin{tabular}{l}
  \moderncvCtan \\% [.5ex]
  \moderncvGithub
\end{tabular}

\note Depending on your \Latex distribution, you may have to install some additional packages.
Section \ref{section:implementationDetails:requiredPackages} lists all the packages that \Moderncv requires to be installed on your system.



\section{The \texttt{moderncv} template step by step}
This section is a quick reference to the \Moderncv package and should contain enough information to typeset a first working CV.
\label{section:moderncvTemplate}
The easiest way to get started with \Moderncv is to use the template that comes with the package.
If \Moderncv is part of your \Latex distribution, search for the folder \Moderncv on your system, which should contain all the files for the package.
In this folder, there should be a file called \cvtemplate.
If you downloaded the package from \Github or \ctan, look for \Cvtemplate in the folder of the newly downloaded (and possibly extracted) package.

\note If you downloaded \Moderncv from \Github or \Ctan and moved \Cvtemplate to another folder, make sure to adjust the \code{TEXINPUTS} variable to find the newly downloaded package.
Otherwise, either the package version provided by your \Latex distribution gets used or \Latex throws an error if there is no other version installed.

Test your setup by compiling \Cvtemplate and looking at the result.

\note The \Moderncv package should compile with \code{pdflatex}, \code{lualatex} and \code{xelatex}.
However, not all icons are available when using \code{pdflatex}, so using either \code{lualatex} or \code{xelatex} \emph{is highly recommended.}

\subsection{Basic setup}
A document using the \Moderncv document class is set up like any other document class.
We will go through the template step by step.

\subsubsection*{Configuring document class options}
The \Moderncv document class is loaded as per usual, by
\begin{lstlisting}
  \documentclass[<options>]{moderncv}
\end{lstlisting}
where at most one value for each option can be passed to the document class:

\begin{tabular}{r@{\hspace{2ex}}p{0.55\textwidth}}
  \textbf{\code{paper}:}       & \code{a4paper} (default), \code{a5paper}, \code{b5paper}, \code{letterpaper},
  \code{legalpaper}, \code{executivepaper}, \code{landscape} \\
  \textbf{\code{font family}:} & \code{sans}, \code{roman} \\
  \textbf{\code{font size}:}   & \code{10pt}, \code{11pt} (default), \code{12pt} \\
  \textbf{\code{draft/final}:} & \code{draft}, \code{final} (default)
\end{tabular}

\subsubsection*{Choosing a \texttt{moderncv} style and color}
Choose a \Moderncv style and color by adjusting the commands
\begin{lstlisting}
  \moderncvstyle{<style>}
  \moderncvcolor{<color>}
\end{lstlisting}
As explained in \cvtemplate, the possible values are

\begin{tabular}{r@{\hspace{2ex}}p{0.65\textwidth}}
  \textbf{\code{style}:} & \code{casual} (default), \code{classic}, \code{banking}, \code{oldstyle},
  \code{fancy} \\
  \textbf{\code{color}:} & \code{black} \cvdoccolorbox{black}, \code{blue} \cvdoccolorbox{cvblue} (default), \code{burgundy} \cvdoccolorbox{cvburgundy}, \code{green} \cvdoccolorbox{cvgreen}, \code{grey} \cvdoccolorbox{cvgrey}, \code{orange} \cvdoccolorbox{cvorange}, \code{purple} \cvdoccolorbox{cvpurple}, \code{red} \cvdoccolorbox{cvred}
\end{tabular}

\note Some of the styles take additional options to fine-tune their appearance.
To keep this overview short, these options will be described in section \ref{section:customization:stylesAndOptions}.

\subsubsection*{Font family and page numbering}
The default font family is set by the line \code{\\renewcommand\{\\familydefault\}\{\\sfdefault\}} in \cvtemplate.
Use \code{\\sfdefault} for the default sans-serif font, \code{\\rmdefault} for the default roman font, and likewise for any \TeX{} font name.
The general syntax is
\begin{lstlisting}
  \renewcommand{\familydefault}{<fontfamily>}
  % \nopagenumbers{}
\end{lstlisting}
Uncommenting \code{\%\\nopagenumbers\{\}} suppresses automatic page numbering for CVs longer than one page.

\subsubsection*{Adjusting input encoding}
If you are not using \code{xelatex} or \code{lualatex}, which both use \code{utf8} encoding by default, uncomment the \code{\\usepackage[utf8]\{inputenc\}} import and change the encoding as needed.

\subsubsection{Language-specific setup}
The \code{babel} package can be loaded in the preamble of your CV.

\note \Moderncv doesn't work with \code{babel} in Spanish (see this \href{https://github.com/moderncv/moderncv/issues/103}{GitHub issue}).

For CJK users, uncomment the \code{\\usepackage\{CJKutf8\}} import.

\subsection{Personal data}
Edit the personal data section to reflect your personal information.
This data will appear in the header of the first page of the CV and/or in the footer of every page, as well as on the cover letter.
Most of the commands are optional, so try out what you like and see what you need.

\paragraph{\code{\\name}}
A command for your name. Takes the given name and surname as arguments.
\begin{lstlisting}
  \name{<given name>}{<surname>}
\end{lstlisting}

\paragraph{\code{\\title}}
A command for a document title. Could be used for a generic CV title, job title, etc.
\begin{lstlisting}
  \title{<title>}
\end{lstlisting}

\paragraph{\code{\\born}}
A command for a birth date.
\begin{lstlisting}
  \born{<birth date>}
\end{lstlisting}

\paragraph{\code{\\address}}
A command for a three-lined street address.
\begin{lstlisting}
  \address{<street address>}{<city and postcode>}{<country>}
\end{lstlisting}

\paragraph{\code{\\phone}}
A command for a phone number. Takes the phone type as an optional argument.
\begin{lstlisting}
  \phone[<type>]{<phone number>}
\end{lstlisting}
The allowed values for \code{<type>} are \code{fax}, \code{fixed} and \code{mobile}.

\paragraph{\code{\\email}}
A command for an email address.
\begin{lstlisting}
  \email{<email address>}
\end{lstlisting}

\paragraph{\code{\\homepage}}
A command for a personal website.
\begin{lstlisting}
  \homepage{<web address>}
\end{lstlisting}

\paragraph{\code{\\social}}
A command for a social media account.
Takes the platform as an optional argument.
\begin{lstlisting}
  \social[<platform>]{<username or handle>}
\end{lstlisting}
The following values are supported for \code{<platform>}:
\begin{itemize}
  \begin{multicols}{4}
    \item \code{arxiv}
    \item \code{battlenet}
    \item \code{bitbucket}
    \item \code{codeberg}
    \item \code{discord}
    \item \code{github}
    \item \code{gitlab}
    \item \code{googlescholar}
    \item \code{inspire}
    \item \code{instagram}
    \item \code{linkedin}
    \item \code{mastodon}
    \item \code{matrix}
    \item \code{orcid}
    \item \code{playstation}
    \item \code{researcherid}
    \item \code{researchgate}
    \item \code{signal}
    \item \code{skype}
    \item \code{soundcloud}
    \item \code{stackoverflow}
    \item \code{steam}
    \item \code{telegram}
    \item \code{tiktok}
    \item \code{twitch}
    \item \code{twitter}
    \item \code{whatsapp}
    \item \code{xbox}
    \item \code{xing}
    \item \code{youtube}
  \end{multicols}
\end{itemize}

\paragraph{\code{\\extrainfo}}
A command for any extra information.
\begin{lstlisting}
  \extrainfo{<extra information>}
\end{lstlisting}

\paragraph{\code{\\photo}}
A command for a photo.
Takes the image file name as a required argument.
Takes the height of the photo and the thickness of the photo frame as optional arguments.
\begin{lstlisting}
  \photo[<photo height>][<frame thickness>]{<photo file name>}
\end{lstlisting}

\paragraph{\code{\\quote}}
A command for a quote.
\begin{lstlisting}
  \quote{<quote>}
\end{lstlisting}

\note{Long names and URLs can break some CVs and cover letters depending on the used style. Manually inserting line breaks for names with \code{\\\\} can help for \texttt{oldstyle} or \texttt{fancy}. Adjusting lengths as described in section \ref{subsection:adjusting:lengths} could help to mitigate issues with long URLs.}

\paragraph{Pictures.}
For some occasions you may need to include pictures besides the portrait photo. For this task it is helpful to know basic lengths used in \moderncv. For a more detailed description of lengths see section \ref{subsection:adjusting:lengths}.
For instance, pictures can be included with \code{\\includegraphics}:
\begin{lstlisting}
  \hspace{\hintscolumnwidth + \separatorcolumnwidth}\includegraphics[<scale>]{<file name picture>}
\end{lstlisting}
Adding \code{\\hspace} in units of basic \code{moderncv} lengths will fit them more naturally into the CV or resume.  

\paragraph{Bibliography.}
In case BibTeX is used, the bibliography settings are adjusted in the lines
\begin{lstlisting}
  % to show numerical labels in the bibliography (default is to show no labels)
  % \renewcommand*{\bibliographyitemlabel}{[\arabic{enumiv}]}
  % \renewcommand{\refname}{Articles}

  % bibliography with mutiple entries
  % \usepackage{multibib}
  % \newcites{book, misc}{{Books}, {Others}}
\end{lstlisting}
By default, no labels are shown for bibliography entries.
Uncommenting the line \code{\%\\renewcommand*\{\\bibliographyitemlabel\}\{[\\arabic\{enumiv\}]\}}
allows one to fine-tune the labels.
Uncommenting the line \code{\%\\renewcommand\{\\refname\}\{Articles\}} allows one to redefine the bibliography heading string ``Publications'' that is shown by default.
Finally, adjustments using the \code{multibib} package can be done in the last two lines shown here.

\note \Biblatex is currently not supported.

\subsection{Modifying CV content}
\subsubsection{Structuring the CV}
As with any other document style, the CV can be structured into sections and subsections using \code{\\section} and \code{\\subsection}.

The \Moderncv package provides some macros to add content to your CV.
The easiest way to understand their intended use is to look at how they're used in the template.
Nonetheless, we list the macros here along with a short description of their intended use.

\subsubsection{General macros}

\paragraph{\code{\\cvitem}}
A flexible command for a single CV entry.
Takes the descriptor and body text as required arguments.
Can be used to list job experiences and similar.
\begin{lstlisting}
  \cvitem{<descriptor>}{<body>}
\end{lstlisting}

\paragraph{\code{\\cvdoubleitem}}
A two-column variation of \code{\\cvitem}.
Takes four required arguments: the descriptor and body text of the first column and the descriptor and body text of the second column.
Can be used to enter skills, such as computer skills or language skills, in a two-column fashion.
\begin{lstlisting}
  \cvdoubleitem{<descriptor 1>}{<body 1>}{<descriptor 2>}{<body 2>}
\end{lstlisting}

\paragraph{\code{\\cvtripleitem}}
A three-column variation of \code{\\cvitem}.
Takes six required arguments: the descriptor and body text of the first column, second and third column.
Can be used to enter skills, such as computer skills or language skills, in a three-column fashion.
\begin{lstlisting}
  \cvtripleitem{<descriptor 1>}{<body 1>}{<descriptor 2>}{<body 2>}{<descriptor 3>}{<body 3>}
\end{lstlisting}

\paragraph{\code{\\cvitemwithcomment}}
A variation of \code{\\cvitem} with an additional argument for a comment.
Can be used to enter skills such as computer skills or language skills.
\begin{lstlisting}
  \cvitemwithcomment{<descriptor>}{<skill level>}{<comment>}
\end{lstlisting}

\paragraph{\code{\\cventry}}
A command for entering an education or job experience.
Takes six required arguments: date(s), degree/job title, educational institution/employer, city, academic grade and description.
While arguments 3 to 6 aren't optional, they can be left empty.
If line breaks in argument 6 aren't done properly, a minipage can be used.
Alternatively, \code{\\newline\{\}} can be used to break lines in argument 6.
\begin{lstlisting}
  \cventry{<year--year>}{<degree/job title>}{<institution/employer>}
      {<city>}{<grade>}{<description>}
\end{lstlisting}

\paragraph{\code{\\cvlistitem}}
A command for a single bullet-list item.
Very long lines get broken.
\begin{lstlisting}
  \cvlistitem{<item>}
\end{lstlisting}

\paragraph{\code{\\cvlistdoubleitem}}
A two-column variation of \code{\\cvlistitem}.
\begin{lstlisting}
  \cvlistdoubleitem{<item 1>}{item 2>}
\end{lstlisting}

\paragraph{\code{\\cvcolumns}}
An environment typesetting multicolumn \code{\\cvitem}s.
This can be combined with the \code{itemize} environment.
\begin{lstlisting}
  \begin{cvcolumns}
    \cvcolumn{<category 1>}{<content>}
    \cvcolumn{<category 2>}{<content>}
    \cvcolumn[<width>]{<content>}
  \end{cvcolumns}
\end{lstlisting}
\code{<width>} is a number between 0 and 1 controling the width of the column.

\subsubsection{Skill matrix macros}
The skill matrix is a table for displaying skills such as computer skills or project management skills graphically.
The skill matrix table consists of several elements:
\begin{itemize}
  \item the graphical representation of the skill on a scale from 0 to 5,
  \item the legend to explain the meaning of the scale,
  \item a header line to explain the meaning of the table columns and
  \item the actual skill entries.
\end{itemize}

\paragraph{\code{\\cvskill}}
A command for the graphical representation of a single skill.
The required argument must be a number from 0 to 5.
\begin{lstlisting}
  \cvskill{<0-5>}
\end{lstlisting}
This command can be used outside of the skill matrix, too.

\paragraph{\code{\\cvskilllegend}}
A command for a legend for the skill matrix.
Takes six optional arguments: post-padding width and the descriptions for the five skill levels.
\begin{lstlisting}
  \cvskilllegend
  \cvskilllegend*[<post-padding>][<level 1>][<level 2>][<level 3>]
      [<level 4>][<level 5>]{<descriptor>}
\end{lstlisting}
The command with no arguments inserts the legend in its standard form: without a descriptor or any lines.
An optional asterisk toggles the inclusion of a dashed line.
\code{<post-padding>} must be a valid length like \code{1em} or \code{1ex}.

The most general form of this command can be used to translate the legend descriptions into other languages or to add a name descriptor:
\begin{lstlisting}
  % Example: German translation
  \cvskilllegend[0.2em][Grundkenntnisse]
      [Grundkenntnisse und eigene Erfahrung in Projekten]
      [Umfangreiche Erfahrung in Projekten]
      [Vertiefte Expertenkenntnisse][Experte/Guru]{Legende}
\end{lstlisting}

\paragraph{\code{\\cvskillplainlegend}}
A variation of \code{\\cvskilllegend} with the first three skill levels in the first column.
\begin{lstlisting}
  \cvskillplainlegend
  \cvskillplainlegend*[<post-padding>][<level 1>][<level 2>]
      [<level 3>][<level 4>][<level 5>]{<descriptor>}
\end{lstlisting}

\paragraph{\code{\\cvskillhead}}
A command for a header line for the skill matrix.
Takes five optional arguments: post-padding width, level, skill label, years of experience and a comment.
\begin{lstlisting}
  \cvskillhead[<post-padding>][<level>][<skill>][<years of experience>][<comment>]
\end{lstlisting}
\code{<post-padding>} must be a valid length like \code{1em} or \code{1ex}.

\paragraph{\code{\\cvskillentry}}
A command for an entry in the skill matrix.
Takes five required arguments: skill category, skill level (0 to 5), skill name, years of experience and a comment.
Takes a single optional argument for the post-padding width.
\begin{lstlisting}
  \cvskillentry*[<post-padding>]{<skill category>}{<0-5>}
      {<skill name>}{<years of experience>}{<comment>}
\end{lstlisting}
An optional asterisk toggles the inclusion of a dashed line.
\code{<post-padding>} must be a valid length like \code{1em} or \code{1ex}.

How to make length adjustments to the skill matrix will be explained in section \ref{section:length:skillmatrix}.

\subsection{Letter of motivation}

In order to provide additional information for a job application, {\moderncv} provides a motivation letter. Define the following recipient data fields to customize your letter:
\paragraph{\code{\\recipient}}
A command for the letter's recipient. This allows line breaks to properly format the recipient's address.
\begin{lstlisting}
  \recipient{<Team or contact person>}{<company>\\<street>\\<city>}
\end{lstlisting}

\paragraph{\code{\\date}}
A command to set the letter's date.
\begin{lstlisting}
  \date{<your custom date>}
\end{lstlisting}

\paragraph{\code{\\subject}}
A command to define the job application subject.
\begin{lstlisting}
  \subject{<subject>}
\end{lstlisting}

\paragraph{\code{\\opening}}
A command to set your opening (e.g. ``Dear X,'' or ``To whom it may concern,'').
\begin{lstlisting}
  \opening{<greeting>}
\end{lstlisting}

\paragraph{\code{\\closing}}
A command to set your closing (e.g. ``Sincerely,'' or ``Yours truly,'').
\begin{lstlisting}
  \closing{<closing>}
\end{lstlisting}

\paragraph{\code{\\signature}}
An optional command to include your signature after the closing. This feature is defined using the \code{\\includegraphics}. The first argument is the scale and the second argument is the filename of your scanned signature.
\begin{lstlisting}
  \signature{<scale>}{<signature filename>}
\end{lstlisting}

\paragraph{\code{\\enclosure}}
A command to list the attached documents. The first optional parameter allows a redefinition of the default ``Enclosure'' label.
\begin{lstlisting}
  \enclosure[<optional alternative label>]{<list of documents>}
\end{lstlisting}

\note If typesetting the resume in Chinese using CJK an additional \code{\\clearpage} is required after the \code{\\makeletterclosing} command. This helps \code{fancyhdr} to work correctly with CJK. Otherwise it will remove the page numbering by making \code{lastpage} undefined.

\section{Customization}
\label{section:customization}
\subsection{Styles and their options}
\label{section:customization:stylesAndOptions}
Each style allows fine-tuning via options passed into the \code{\\moderncvstyle} command:
\begin{lstlisting}
  \moderncvstyle[<option 1>, <option 2>, ...]{<style>}
\end{lstlisting}
Each style defines its own options, and not all options are available for each style.
Below is a list of all the options available for each style:

\paragraph{\code{casual}}
This style allows the following options which \emph{only} affect header and footer styles:

\begin{tabular}{r@{\hspace{2ex}}p{0.72\textwidth}}
  \textbf{\code{head alignment}} & values: \code{left}, \code{right} (default).
  Aligns the title and the picture if one is included. \\
  \textbf{\code{name}}           & values: \code{alternate}.
  Displays the name in all lowercase.
  Differentiation of the name is done by color (disabled by default).
  This feature is discouraged for longer names. \\
  \textbf{\code{data in head}}   & values: \code{details}, \code{nodetails} (default).
  Toggles between the header and footer as the location of personal data on the page. \\
  \textbf{\code{symbols}}        & values: \code{symbols} (default), \code{nosymbols}.
  Toggles between inclusion of icons or text-based abbreviations for personal data.
\end{tabular}

\paragraph{\code{classic}}
This style allows the following options which \emph{only} affect header and footer styles:

\begin{tabular}{r@{\hspace{2ex}}p{0.75\textwidth}}
  \textbf{\code{alignment}}    & values: \code{left} (default), \code{right}.
  Aligns the address block and the picture. \\
  \textbf{\code{data in head}} & values: \code{details}, \code{nodetails} (default).
  Toggles between the header and footer as the location of personal data on the page. \\
  \textbf{\code{symbols}}      & values: \code{symbols} (default), \code{nosymbols}.
  Toggles between inclusion of icons or text-based abbreviations for personal data.
\end{tabular}

\paragraph{\code{banking}}
This style allows the following options:

\begin{tabular}{r@{\hspace{2ex}}p{0.68\textwidth}}
  \textbf{\code{alignment (body)}} & values: \code{left} (default), \code{center}, \code{right}.
  Aligns the entries in the style. \\
  \textbf{\code{rule style}}       & values: \code{fullrules}, \code{shortrules}, \code{mixedrules} (default), \code{norules}.
  Adjusts the rules used in the style. \\
  \textbf{\code{data in head}}     & values: \code{details}, \code{nodetails} (default).
  Toggles between the header and footer as the location of personal data on the page. \\
  \textbf{\code{symbols}}          & values: \code{symbols} (default), \code{nosymbols}.
  Toggles between inclusion of icons or text-based abbreviations for personal data.
\end{tabular}

\paragraph{\code{oldstyle}}
This style allows the following options:

\begin{tabular}{r@{\hspace{2ex}}p{0.73\textwidth}}
  \textbf{\code{data in head}} & values: \code{details}, \code{nodetails} (default).
  Toggles between the header and footer as the location of personal data on the page. \\
  \textbf{\code{symbols}}      & values: \code{symbols} (default), \code{nosymbols}.
  Toggles between inclusion of icons or text-based abbreviations for personal data.
\end{tabular}

\paragraph{\code{fancy}}
This style allows the following options:

\begin{tabular}{r@{\hspace{2ex}}p{0.73\textwidth}}
  \textbf{\code{data in head}} & values: \code{details}, \code{nodetails} (default).
  Toggles between the header and footer as the location of personal data on the page. \\
  \textbf{\code{symbols}}      & values: \code{symbols} (default), \code{nosymbols}.
  Toggles between inclusion of icons or text-based abbreviations for personal data.
\end{tabular}

\note Only one option from each option category can be passed in at a time, e.g.
\begin{lstlisting}
  \moderncvstyle[left, nosymbols]{casual}
\end{lstlisting}

\paragraph{\code{contemporary}}
This style allows the following options which \emph{only} affect header and footer styles:

\begin{tabular}{r@{\hspace{2ex}}p{0.75\textwidth}}
  \textbf{\code{alignment}}    & values: \code{left} (default), \code{right}.
  Aligns the address block and the picture. \\
  \textbf{\code{data in head}} & values: \code{details} (default), \code{nodetails}.
  Toggles between the header and footer as the location of personal data on the page. \\
  \textbf{\code{qr}}      & values: \code{qr} (default), \code{noqr}.
  Enables or disables the inclusion of a QR code of your personal website.
\end{tabular}
\note For the \code{contemporary} style it is recommended to use the \code{\\moderncvcolor\{cerulean\}} color scheme. The \code{contemporary} style is even more appealing with reduced margins. Use this in your preamble:
\begin{lstlisting}
  \usepackage[hmargin=0.5in,vmargin=10pt]{geometry}
\end{lstlisting}

\subsection{Adjusting colors}
The colors of each style can be adjusted.

\note The color theme must be loaded \emph{before} \code{\\moderncvstyle}, i.e.
\begin{lstlisting}
  \moderncvcolor{blue}
  \moderncvstyle{casual}
\end{lstlisting}

\paragraph{Base colors.}
Each style defines three main colors: \code{color0}, \code{color1} and \code{color2}.
\code{color0} is black and the main text color.
\code{color1} is the main theme color, like blue, green, etc.
\code{color2} is a some form of grey used for the user data, etc.
These colors can be redefined by using either \code{\\definecolor} or \code{\\colorlet}:
\begin{lstlisting}
  \definecolor{color1}{rgb}{0.55, 0.55, 0.55}   % dark grey
  \colorlet{color1}{black}
\end{lstlisting}
Any mechanism for naming and defining colors used by the \code{xcolor} package can be used to redefine the colors of a \Moderncv style.

\paragraph{Fine tuning.}
If an even finer control over the color scheme of the style is desired, the following color settings are used internally for the \code{casual} style and can be redefined:
\begin{lstlisting}
  % Head and footer
  \colorlet{lastnamecolor}{color1}
  \colorlet{namecolor}{lastnamecolor}
  \colorlet{headrulecolor}{color1}
  \colorlet{firstnamecolor}{lastnamecolor!50}
  \colorlet{titlecolor}{color2}
  \colorlet{addresscolor}{color2}
  \colorlet{quotecolor}{color1}
  \colorlet{pictureframecolor}{color1}
  % Body
  \colorlet{bodyrulecolor}{color1}
  \colorlet{sectioncolor}{color1}
  \colorlet{subsectioncolor}{color1}
  \colorlet{hintstylecolor}{color0}
  % Letter
  \colorlet{letterclosingcolor}{color2}
  % Skill matrix
  \colorlet{skillmatrixfullcolor}{color1}
  \colorlet{skillmatrixemptycolor}{color2!30}
\end{lstlisting}


\subsection{Modifying symbols and icons}
\subsubsection{Icons}
As stated in section \ref{section:customization:stylesAndOptions}, the use of icons is toggled by the \code{symbols} option that can be passed to \code{\\moderncvstyle}.

The icons used in the display of the personal data (phone numbers, email, fax, social media accounts, etc.) can be customized by redefining the internal commands for the symbols:
\begin{lstlisting}
  \renewcommand*{<\symbolcommand>}{{\small<\symbol>}~}
\end{lstlisting}
Using \code{\\small} is optional, but the default behavior is to render all icons using \code{\\small}.
Use \code{\\small} if one merely wishes to replace an icon/symbol while keeping the size consistent with the default icons/symbols.
The tilde ensures proper spacing after the symbols and is recommended as well.

Currently \Moderncv supports the following commands as \code{<\\symbolcommand>}:
\begin{itemize}
  \begin{multicols}{2}
    \item \code{\\addresssymbol}
    \item \code{\\mobilephonesymbol}
    \item \code{\\fixedphonesymbol}
    \item \code{\\faxphonesymbol}
    \item \code{\\emailsymbol}
    \item \code{\\homepagesymbol}
    \item \code{\\linkedinsocialsymbol}
    \item \code{\\xingsocialsymbol}
    \item \code{\\twittersocialsymbol}
    \item \code{\\githubsocialsymbol}
    \item \code{\\gitlabsocialsymbol}
    \item \code{\\stackoverflowsocialsymbol}
    \item \code{\\googlescholarsocialsymbol}
    \item \code{\\telegramsocialsymbol}
    \item \code{\\whatsappsocialsymbol}
    \item \code{\\signalsocialsymbol}
    \item \code{\\matrixsocialsymbol}
    \item \code{\\orcidsocialsymbol}
    \item \code{\\researchgatesocialsymbol}
    \item \code{\\researcheridsocialsymbol}
    \item \code{\\bitbucketsocialsymbol}
    \item \code{\\skypesocialsymbol}
    \item \code{\\bornsymbol}
    \item \code{\\arxivsocialsymbol}
    \item \code{\\inspiresocialsymbol}
  \end{multicols}
\end{itemize}
The possible options for \code{<\\symbol>} depend on the package that is used.
By default, the \code{marvosym} package is loaded if \code{pdflatex} is used, and the \code{academicons} and \code{fontawesome5} packages are loaded if either \code{lualatex} or \code{xelatex} is used.
Full lists of all available symbols and icons can be found in the documentation of each respective package:

\begin{tabular}{l}
  \url{https://ctan.org/pkg/marvosym} \\[1ex]
  \url{https://ctan.org/pkg/fontawesome5} \\[1ex]
  \url{https://ctan.org/pkg/academicons}
\end{tabular}

\paragraph{Example.}
If one wanted to use the dingbat fonts to replace the default phone symbol, one should load the \code{pifont} package in the preamble and then substitute the default symbol with the dingbat symbol \ding{38}\ with
\begin{lstlisting}
  \renewcommand*{\fixedphonesymbol}{\ding{38}~}
\end{lstlisting}

\paragraph{Alternative to icons}
In case you do not want \texttt{symbols} (default) for the icons, there is also the option to replace icons with \texttt{letters} instead. This is set by the macro \code{\\moderncvicons}, which must be called after setting the style in the preamble.
\begin{lstlisting}
  \moderncvicons{<symbols|letters>}
\end{lstlisting}
This mechanism is also used to determine the icon set. In principle the \code{\\moderncvicons} can be used to determine the icon set with the possible values \texttt{marvosym}, \texttt{awesome} or \texttt{academic}, but it is recommended to let {\moderncv} decide the correct icon set due to differing \Latex compiler support.

\subsubsection{Listing labels}
The labels used in \code{itemize} environments, \code{cvlistitem} and \code{cvlistdoubleitem} can be changed in two different ways:

\begin{itemize}
  \item Redefining \code{\\labelitemi}, \code{\\labelitemii}, \code{\\labelitemiii} and \code{\\labelitemiv} changes the labels for \code{itemize} environments as well as for \code{cvlistitem} and \code{cvlistdoubleitem}, e.g.
  \begin{lstlisting}
  \renewcommand{\labelitemi}{-}
  \end{lstlisting}
  \item Redefining \code{\\listitemsymbol} changes the labels for \code{cvlistitem} and \code{cvlistdoubleitem} but \emph{not} for \code{itemize} environments, e.g.
  \begin{lstlisting}
  \renewcommand{\listitemsymbol}{-}
\end{lstlisting}
\end{itemize}

\subsection{Adjusting lengths}\label{subsection:adjusting:lengths}
Some lengths in \Moderncv can be adjusted.

The hints column can be adjusted by setting \code{\\hintscolumnwidth}:
\begin{lstlisting}
  \setlength{\hintscolumnwidth}{3cm}
\end{lstlisting}

For the \code{classic} style, the amount of horizontal space for the name can be adjusted by setting \code{\\makecvheadnamewidth} to avoid breaks:
\begin{lstlisting}
  \setlength{\makecvheadnamewidth}{10cm}
\end{lstlisting}
One should be careful though, as the length is normally calculated to avoid any overlap with the personal information.
This should be used at one's own typographical risk.

The spacing between the hints column and the CV entries can be adjusted by setting\\
\code{\\separatorcolumnwidth}. The default value is \code{0.025\\textwidth}.
\begin{lstlisting}
  \setlength{\separatorcolumnwidth}{0.05\textwidth}
\end{lstlisting}

The spacing between the list symbol and the text item of \code{\\cvlistitem} and \code{\\cvlistdoubleitem} can be adjusted by setting \code{\\listitemsymbolspace} in the preamble. The default value is set to \code{0pt}.
\begin{lstlisting}
  \setlength{\listitemsymbolspace}{5pt}
\end{lstlisting}

The width of the footer can be adjusted by setting \code{\\footwidth}. Due to internal calculations \code{\\renewcommand} is needed. The default value is \code{0.8\\textwidth}.
\begin{lstlisting}
  \renewcommand*{\recomputefootlengths}{%
  \setlength{\footwidth}{0.9\textwidth}}
\end{lstlisting}

The width of the quote can be adjusted by setting \code{\\quotewidth}. Due to internal calculations \code{\\renewcommand} is needed. The default value is \code{0.65\\textwidth}.
\begin{lstlisting}
  \renewcommand*{\recomputecvheadlengths}{%
  \setlength{\quotewidth}{0.5\textwidth}}
\end{lstlisting}


% The different lengths used by moderncv are customizable by
% \begin{lstlisting}
% \setlength{<length>}{<new_dimensions>}
% \end{lstlisting}
% where \code{<length>} are \code{maincolumnwidth}, \code{doubleitemmaincolumnwidth}, \code{listitemsymbolwidth}, \code{listdoubleitemmaincolumnwidth},


\subsubsection{Lengths in the skill matrix}
\label{section:length:skillmatrix}
Both the width of the skill matrix legend and the width of the skill matrix columns can be adjusted.

The width of the skill matrix legend can be adjusted as follows:
\begin{lstlisting}
  \setcvskilllegendcolumns[<width>][<factor>]
  % Examples:
  \setcvskilllegendcolumns[][0.45]
  \setcvskilllegendcolumns[\widthof{``Legend''}][0.45]
  \setcvskilllegendcolumns[0ex][0.46] % useful for the banking style
\end{lstlisting}
\code{<width>} should be a length smaller than \code{\\textwidth}, and \code{<factor>} must be between 0 and 1.

The width of the skill matrix columns can be adjusted as follows:
\begin{lstlisting}
  \setcvskillcolumns[<width>][<factor>][<exp_width>]
  % Examples:
  \setcvskillcolumns[5em][][]   % adjust first column, same as \setcvskillcolumns[5em]
  \setcvskillcolumns[][0.45][]  % adjust third (skill) column, same as \setcvskillcolumns[][0.45]
  \setcvskillcolumns[][][\widthof{``Year''}]  % adjust fourth (years of experience) column
  \setcvskillcolumns[][0.45][\widthof{``Year''}]
  \setcvskillcolumns[\widthof{``Language''}][0.48][]
  \setcvskillcolumns[\widthof{``Language''}]
\end{lstlisting}
\code{<width>} and \code{<exp_width>} should be lengths smaller than \code{\\textwidth}, and \code{<factor>} must be between 0 and 1.

\subsection{Additional link commands}%% adapted from Cristina Sambo's documentation
To create links to a website or a email address, use the following commands:

A general weblink with optional text.  
\begin{lstlisting}
  \link[<text>]{<link>}
  %% example
  \link[name of the link]{ftp://ftp.somesite.org}
\end{lstlisting}

An HTTP link. The HTTP prefix is generated automatically and is not needed in the link argument.
\begin{lstlisting}
  \link[<text>]{<link>}
  %% example
  \link[goto HTTP site]{www.somehttpsite.org}
\end{lstlisting}

A HTTPS link. The HTTPS prefix is generated automatically and is not needed in the link argument.
\begin{lstlisting}
  \link[<text>]{<link>}
  %% example
  \httpslink[goto HTTPS site]{www.somesecuresite.org}
\end{lstlisting}

An email link. The mailto prefix is generated automatically and is not needed in the link argument.
\begin{lstlisting}
  \link[<text>]{<link>}
  %% example
  \emaillink[my email]{jdoe@website.org}
\end{lstlisting}

\subsection{Page breaks and orphaned section headers}
If \Latex breaks pages just after \code{\\section} or \code{\\subsection} commands, try adjusting the stretchability of the page with \code{\\cvsectionstretchability} or \code{\\cvsubsectionstretchability}:
\begin{lstlisting}
  \setlength{\cvsectionstretchability}{\baselineskip}
  \setlength{\cvsubsectionstretchability}{100pt}
\end{lstlisting}
These two lengths tell \Latex how much extra length it needs after \code{\\section} and \code{\\subsection} commands.
By default, \Moderncv sets both lengths to \code{0.9\\baselineskip}.

This should solve orphaned \code{\\section} and \code{\\subsection} commands that are used alone for most users.
However, \Latex does not check for content.
For example, writing
\begin{lstlisting}
  \section{blub}
  \subsection{blubblub}
\end{lstlisting}
one after the other may cause \Latex to place the section and subsection headers on separate pages.
Since \Latex considers the subsection header to not be orphaned, it may place the section header at the bottom of a page if there is enough space to do so while placing the subsection header on the next page.
One solution is to increase \code{\\cvsectionstretchability} to force the break of the section header.
However, this changes the behaviour for all \code{\\section} commands in your CV and might cause unnecessary page breaks.
It is therefore recommended to force the page break manually with a \code{\\newpage} in this case.

\paragraph{Experts only:}
Internally, \Moderncv uses a custom \code{\\needspace} command:
\begin{lstlisting}
  \NewDocumentCommand\@cvneedspace{m}{%
    \begingroup
      \setlength{\dimen@}{#1}%
      \vskip\z@\@plus\dimen@
      \penalty \withinstretchpenalty\vskip\z@\@plus -\dimen@
      \vskip\dimen@
      \penalty \poststretchpenalty%
      \vskip -\dimen@
      \vskip\z@skip % hide the previous |\vskip| from |\addvspace|
    \endgroup
  }
\end{lstlisting}
Thus, instead of setting \code{\\cvsectionstretchability} and/or \code{\\cvsubsectionstretchability}, page break behavior can be adjusted by redefining the following internal penalties:
\begin{lstlisting}
 \renewcommand{\withinstretchpenalty}{<-100...9999>}
 \renewcommand{\poststretchpenalty}{<-100...9999>}.
\end{lstlisting}
By default, \Moderncv sets \code{\\withinstretchpenalty} to 0 and \code{\\poststretchpenalty} to 9999.
The higher the penalties are, the less likely a page break will occur.
A good explanation of \code{\\needspace} can be found at \url{https://tex.stackexchange.com/questions/348994/understanding-needspace}.


\subsection{Tips and Tricks}
\subsubsection{Legal disclaimer at the end of the CV}
Some countries (e.g. Italy) require you to add a legal disclaimer authorizing the use of the personal data in your CV.
To add such a disclaimer, add the following to the bottom of your CV:%
\footnote{Example provided by Cristina Sambo}%
\begin{lstlisting}
  \vfill
  \begin{center}
    \textit{\small Ai sensi del D. Lgs. 196/2003 ...}
  \end{center}
\end{lstlisting}



\section{Implementation details}
\label{section:implementationDetails}

\subsection{Creating your own styles}
Currently {\moderncv} ships with six different styles: \texttt{casual} (default), \texttt{classic}, \texttt{banking}, \texttt{oldstyle}, \texttt{fancy} and \texttt{contemporary}. Internally, these styles are numbered 1, 2, 3, 4, 5 and 6, respectively. All styles except \texttt{oldstyle} and \texttt{fancy} possess additional option parameters which were described in section \ref{section:customization:stylesAndOptions}.

Different styles' head, body and foot can be combined to create custom styles. This is done by setting \code{\\moderncvhead}, \code{\\moderncvbody} and \code{\\moderncvfoot} in the preamble. Here is an example of a custom style with a \texttt{banking} head, an \texttt{oldstyle} body and a \texttt{casual} foot:
\begin{lstlisting}
  \moderncvhead{3}
  \moderncvbody{4}
  \moderncvfoot{1}
\end{lstlisting}
Furthermore, options for each part of {\moderncv} parts can be set as well in such combinations. To get a CV with a \texttt{classic} head and a \texttt{banking} body with full rules, define the following in the preamble:
\begin{lstlisting}
  \moderncvhead{2}
  \moderncvbody[fullrules]{3}
  \moderncvfoot{1}
\end{lstlisting}


\subsection{Required packages}
\label{section:implementationDetails:requiredPackages}
In addition to the packages that \Moderncv provides, the following packages are loaded internally:
\begin{itemize}
  \begin{multicols}{3}
    \item \code{etoolbox}
    \item \code{ifthen}
    \item \code{xcolor}
    \item \code{ifxetex} or \code{ifluatex}
    \item \code{fontenc}
    \item \code{url}
    \item \code{hyperref}
    \item \code{graphicx}
    \item \code{fancyhdr}
    \item \code{tweaklist}%
    \footnote{The \code{tweaklist} package has been altered for the development of \Moderncv and ships with \moderncv.}
    \item \code{calc}
    \item \code{xparse}
    \item \code{microtype}
    \item \code{expl3}
    \item \code{tikz}
    \item \code{changepage}
    \item \code{fontawesome5}
    \item \code{academicons}
    \item \code{tgpagella}
    \item \code{ebgaramond}
    \item \code{kurier}
    \item \code{multirow}
    \item \code{arydshln}
  \end{multicols}
\end{itemize}

Most of these packages should be included in your \Latex distribution of choice.

\subsection{Known conflicts with other packages}
\begin{enumerate}
  \item \Moderncv is incompatible with \code{biber}.
  \item \Moderncv is incompatible with \biblatex.
  \item \Moderncv is incompatible with \code{babel} in Spanish
\end{enumerate}

\subsection{Known bugs}
\begin{enumerate}
  \item Skill matrices don't break automatically in \texttt{fancy} style.
  \item Long names break the \texttt{oldstyle} style and possibly other styles (needs testing).
  \item Long URLs in \texttt{classic} style can make the name break line.
  Fixed width for the address part must be implemented.
  \item When using the \texttt{fancy} style, undesired space is added between the bibliography head and the first entry, as well as after the last entry.
  \item Footnotes generate errors, but the output seems correct when running with \code{-interaction=nonstopmode}.
  \item When using CJK, the last \code{\\clearpage} required for the \code{fancyhdr} package to work properly kills the ``lastpage'' counter, and therefore also the page numbering.
  \item \Moderncv produces the error ``\code{lonely \\item--perhaps a missing list environment}'' when used with the \code{bibentry} package, though the output is actually correct.
  Among other things, this causes compilation by LyX to stop.
  \item The space after a \code{\\cventry} gets eaten up when the last argument contains a nested \code{itemize} environment.
  An ugly hack and incomplete solution was implemented by including a \code{\\strut} in every item label, but this doesn't solve the problem for multi-line items.
  Ideally, the \code{\\strut} should end the item, but there seems to be no way to do this.
\end{enumerate}

\end{document}
