mirror of
https://github.com/moderncv/moderncv.git
synced 2026-02-06 10:05:19 +01:00
make colors user adjustable. expose hidden options.
- Systematize colors and make them user adjustable. See documentation for details. this requires the \moderncvcolor to be issued BEFORE \moderncvstyle. - all styles: make the head options 'details' and 'nodetails' available to the user. (previously they were hidden). Olystyle does not respond too well to nodetails.
This commit is contained in:
parent
e543cd7976
commit
5fd95656cf
22 changed files with 536 additions and 96 deletions
|
|
@ -459,4 +459,244 @@ Sometimes there is the need to add some lines at the end of the CV. For example,
|
|||
\end{center}
|
||||
\end{verbatim}
|
||||
|
||||
\section{Customization}
|
||||
\label{section:customization}
|
||||
\subsection{Styles and their options}
|
||||
\label{section:customization:stylesAndOptions}
|
||||
Each style allows fine tuning through passing options to the \Code{\\moderncvstyle} command. The general syntax
|
||||
\begin{lstlisting}
|
||||
\moderncvstyle[<option1>,<option2>,...]{<style>}
|
||||
\end{lstlisting}
|
||||
for passing options follows the usual \LaTeX\ scheme.
|
||||
Each style defines their own options and not all options are available for each style.
|
||||
Below is a list of all options available along with a short description.
|
||||
|
||||
\paragraph{\texttt{casual}.} This style allows the following options which \emph{only} affect footer and head style:\medskip
|
||||
|
||||
\begingroup
|
||||
\renewcommand{\arraystretch}{1.1}
|
||||
\begin{tabular}{r@{\hspace{2ex}}p{0.72\textwidth}}
|
||||
{\bfseries \code{head alignment}:} & values: \Code{left}, \Code{right} (default). This option allows to influence the alignment of the title and the picture if one is included. \\
|
||||
{\bfseries \texttt{name}:} & values: \Code{alternate}. Displays the name in all lowercase letters. Differentiation of the name is done by color (disabled by default). This feature is discouraged for longer names.\\
|
||||
{\bfseries \code{data in head}:} & values: \Code{details}, \Code{nodetails} (default). Show personal data in the header (\code{details}) or in the footer (\code{nodetails} (default)). \\
|
||||
{\bfseries \code{symbols:}} & values: \Code{symbols} (default), \code{nosymbols}. These options let you chose between the inclusion of icons for the personal data or text based abbreviations.
|
||||
\end{tabular}\medskip
|
||||
\endgroup
|
||||
|
||||
\paragraph{\texttt{classic}.} This style allows the following options which \emph{only} affect footer and head style:\medskip
|
||||
|
||||
\begingroup
|
||||
\renewcommand{\arraystretch}{1.1}
|
||||
\begin{tabular}{r@{\hspace{2ex}}p{0.75\textwidth}}
|
||||
{\bfseries \code{alignment}:} & values: \Code{left} (default), \code{right}. The option toggles the alignment of the address block and the picture. \\
|
||||
{\bfseries \code{data in head}:} & values: \Code{details}, \Code{nodetails} (default). Show personal data in the header (\code{details}) or in the footer (\code{nodetails} (default)). \\
|
||||
{\bfseries \code{symbols:}} & values: \Code{symbols} (default), \code{nosymbols}. These options let you chose between the inclusion of icons for the personal data or text based abbreviations.
|
||||
\end{tabular}\medskip
|
||||
\endgroup
|
||||
|
||||
\paragraph{\texttt{banking}.} This style allows the following options:\medskip
|
||||
|
||||
\begingroup
|
||||
\renewcommand{\arraystretch}{1.1}
|
||||
\begin{tabular}{r@{\hspace{2ex}}p{0.68\textwidth}}
|
||||
{\bfseries \code{alignment (body)}:} & values: \Code{left} (default), \Code{center}, \code{right}. This option allows to influence the alignment of the entries in the style. \\
|
||||
%
|
||||
{\bfseries \code{rule style}:} & values: \Code{fullrules}, \Code{shortrules}, \Code{mixedrules} (default), \code{norules}. This option allows to adjust the rules used in the style. \\
|
||||
{\bfseries \code{data in head}:} & values: \Code{details}, \Code{nodetails} (default). Show personal data in the header (\code{details}) or in the footer (\code{nodetails} (default)). \\
|
||||
{\bfseries \code{symbols:}} & values: \Code{symbols} (default), \code{nosymbols}. These options let you chose between the inclusion of icons for the personal data or text based abbreviations.
|
||||
\end{tabular}\medskip
|
||||
\endgroup
|
||||
|
||||
\paragraph{\texttt{oldstyle}.} This style allows the following options:\medskip
|
||||
|
||||
\begingroup
|
||||
\renewcommand{\arraystretch}{1.1}
|
||||
\begin{tabular}{r@{\hspace{2ex}}p{0.73\textwidth}}
|
||||
{\bfseries \code{data in head}:} & values: \Code{details}, \Code{nodetails} (default). Show personal data in the header (\code{details}) or in the footer (\code{nodetails} (default)). \\
|
||||
{\bfseries \code{symbols:}} & values: \Code{symbols} (default), \code{nosymbols}. These options let you chose between the inclusion of icons for the personal data or text based abbreviations.
|
||||
\end{tabular}\medskip
|
||||
\endgroup
|
||||
|
||||
\paragraph{\texttt{fancy}.} This style allows the following options:\medskip
|
||||
|
||||
\begingroup
|
||||
\renewcommand{\arraystretch}{1.1}
|
||||
\begin{tabular}{r@{\hspace{2ex}}p{0.73\textwidth}}
|
||||
{\bfseries \code{data in head}:} & values: \Code{details}, \Code{nodetails} (default). Show personal data in the header (\code{details}) or in the footer (\code{nodetails} (default)). \\
|
||||
{\bfseries \code{symbols:}} & values: \Code{symbols} (default), \code{nosymbols}. These options let you chose between the inclusion of icons for the personal data or text based abbreviations.
|
||||
\end{tabular}\medskip
|
||||
\endgroup
|
||||
|
||||
|
||||
\paragraph{Note.} From each option category only one of the possibilities listed can be passed at a time, e.g.:
|
||||
\begin{lstlisting}
|
||||
\moderncvstyle[left,nosymbols]{casual}
|
||||
\end{lstlisting}
|
||||
|
||||
|
||||
\subsection{Colors}
|
||||
The colors of each style can be readjusted.
|
||||
\todox{explain the three basic colors}
|
||||
|
||||
\paragraph{casual}
|
||||
\begin{lstlisting}
|
||||
%-------------------------------------------------------------------------------
|
||||
% Colors
|
||||
%-------------------------------------------------------------------------------
|
||||
% 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}
|
||||
% skillmatrix
|
||||
\colorlet{skillmatrixfullcolor}{color1}
|
||||
\colorlet{skillmatrixemptycolor}{color2!30}
|
||||
|
||||
\end{lstlisting}
|
||||
|
||||
|
||||
|
||||
\subsection{Modifying symbols and icons}
|
||||
\subsubsection{Icons}
|
||||
As we have seen in section \ref{section:customization:stylesAndOptions}, the use of icons can be
|
||||
influenced by the \code{symbols} and \Code{nosymbols} options that can be passed to the \Code{\\moderncvstyle} command. \medskip
|
||||
|
||||
The icons used in the display of the personal data (phone numbers, email, fax, social accounts, etc.) can be customized by redefining the internal commands representing the symbols.
|
||||
\begin{lstlisting}
|
||||
\renewcommand*{<\symbolcommand>}{{\small<\symbol>}~}
|
||||
\end{lstlisting}
|
||||
Using \code{\\small} is optional, but by default all icons are rendered using the small
|
||||
versions of the symbols used. \emph{The above command is what should be used if one merely whishes to
|
||||
replace an icon/symbol leaving the size consistent with the default icons}.
|
||||
The tilde ensures proper spacing after the symbols and is recommended as well.
|
||||
|
||||
Currently \moderncv supports the following commands as \code{<\\symbolcommand>}:
|
||||
\begin{itemize}
|
||||
\item \lstinline!\addresssymbol!
|
||||
\item \lstinline!\mobilephonesymbol!
|
||||
\item \lstinline!\fixedphonesymbol!
|
||||
\item \lstinline!\faxphonesymbol!
|
||||
\item \lstinline!\emailsymbol!
|
||||
\item \lstinline!\homepagesymbol!
|
||||
\item \lstinline!\linkedinsocialsymbol!
|
||||
\item \lstinline!\xingsocialsymbol!
|
||||
\item \lstinline!\twittersocialsymbol!
|
||||
\item \lstinline!\githubsocialsymbol!
|
||||
\item \lstinline!\gitlabsocialsymbol!
|
||||
\item \lstinline!\stackoverflowsocialsymbol!
|
||||
\item \lstinline!\bitbucketsocialsymbol!
|
||||
\item \lstinline!\skypesocialsymbol!
|
||||
\item \lstinline!\orcidsocialsymbol!
|
||||
\item \lstinline!\researchgatesocialsymbol!
|
||||
\item \lstinline!\researcheridsocialsymbol!
|
||||
\item \lstinline!\telegramsocialsymbol!
|
||||
\item \lstinline!\googlescholarsocialsymbol!
|
||||
\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 packages
|
||||
\code{academicons} and \Code{fontawesome5} are loaded if \Code{lualatex} or \Code{xelatex} are
|
||||
employed. The documentation including full lists of all available symbols and icons can be found
|
||||
in the respective package documentations \medskip
|
||||
|
||||
\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 substitute fixed phone symbol one would load the \Code{pifont} package in the preamble, then substitute the default symbol \Code{\\fixedphonesymbol} with the dingbat symbol \ding{38}\ by:
|
||||
\begin{lstlisting}
|
||||
\renewcommand*{\fixedphonesymbol}{\ding{38}~}
|
||||
\end{lstlisting}
|
||||
|
||||
\subsubsection{Listing labels}
|
||||
The labels used in \Code{itemize} environments or the \Moderncv macros \code{cvlistitem} and \Code{cvlistdoubleitem} can be affected in two different ways:
|
||||
|
||||
\begin{itemize}
|
||||
\item By redefining the internal commands \code{\\labelitemi}, \code{\\labelitemii} as well as
|
||||
\code{\\labelitemiii} and \code{\\labelitemiv}, e.g.
|
||||
\begin{lstlisting}
|
||||
\renewcommand{\labelitemi}{-}.
|
||||
\end{lstlisting}
|
||||
This will affect both, the \Code{itemize} environments as well as the macros \Code{cvlistitem} and \Code{cvlistdoubleitem}.
|
||||
\item If one only whishes to change the labels of the macros \Code{cvlistitem} and \Code{cvlistdoubleitem}, one needs to redefine the \code{\\listitemsymbol}, e.g.
|
||||
\begin{lstlisting}
|
||||
\renewcommand{\listitemsymbol}{-}.
|
||||
\end{lstlisting}
|
||||
This will leave the definitions of \Code{itemize} environments untouched.
|
||||
\end{itemize}
|
||||
|
||||
\subsection{Tips and Tricks}
|
||||
\subsubsection{Legal disclaimer at the end of CV}
|
||||
Some countries (e.g. Italy) require to add the permission to treat the personal data contained in the CV. This can be achieved by the command \code{\\vfill}. At the end of the last entry to your
|
||||
CV, add the following:%
|
||||
\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}
|
||||
\todox{Add explanation on how to create styles and and how to recombine headers, footers, bodies etc.}
|
||||
|
||||
\subsection{Required packages}
|
||||
\label{section:implementationDetails:requiredPackages}
|
||||
In addition to the packages that \Moderncv itself provides the following packages are loaded internally:
|
||||
|
||||
\begin{itemize}
|
||||
\item\code{etoolbox},
|
||||
\item\code{ifthen},
|
||||
\item\code{xcolor},
|
||||
\item\code{ifxetex,ifluatex},
|
||||
\item\code{fontenc},
|
||||
\item\code{url},
|
||||
\item\code{hyperref},
|
||||
\item\code{graphicx},
|
||||
\item\code{fancyhdr},
|
||||
\item\code{tweaklist},
|
||||
\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{itemize}
|
||||
|
||||
Note that the \Code{tweaklist} package has been altered for the development of \Moderncv and ships
|
||||
with \moderncv.
|
||||
|
||||
Most of the packages should be included in the \LaTeX\ distribution of your choice.
|
||||
|
||||
\subsection{Known conflicts with other packages}
|
||||
\begin{enumerate}
|
||||
\item The \Moderncv packages is incompatible with biber.
|
||||
\end{enumerate}
|
||||
|
||||
\subsection{Known bugs}
|
||||
\input{known_bugs}
|
||||
|
||||
\end{document}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue