mirror of
https://github.com/moderncv/moderncv.git
synced 2026-02-06 10:05:19 +01:00
make colors user adjustable.
- Systematize colors and make them user adjustable. See documentation for details. this requires the \moderncvcolor to be issued BEFORE \moderncvstyle.
This commit is contained in:
parent
1e320e465f
commit
85a0342e79
22 changed files with 485 additions and 93 deletions
|
|
@ -37,10 +37,12 @@
|
|||
\renewcommand*{\quotefont}{\large\slshape}
|
||||
|
||||
% styles
|
||||
\renewcommand*{\namestyle}[1]{{\namefont\textcolor{color0}{#1}}}
|
||||
\renewcommand*{\titlestyle}[1]{{\titlefont\textcolor{color2}{#1}}}
|
||||
\renewcommand*{\addressstyle}[1]{{\addressfont\textcolor{color2}{#1}}}
|
||||
\renewcommand*{\quotestyle}[1]{{\quotefont\textcolor{color1}{#1}}}
|
||||
\renewcommand*{\namestyle}[1]{{\namefont\textcolor{namecolor}{#1}}}
|
||||
\renewcommand*{\firstnamestyle}[1]{{\namefont\textcolor{firstnamecolor}{#1}}}
|
||||
\renewcommand*{\lastnamestyle}[1]{{\namefont\textcolor{lastnamecolor}{#1}}}
|
||||
\renewcommand*{\titlestyle}[1]{{\titlefont\textcolor{titlecolor}{#1}}}
|
||||
\renewcommand*{\addressstyle}[1]{{\addressfont\textcolor{addresscolor}{#1}}}
|
||||
\renewcommand*{\quotestyle}[1]{{\quotefont\textcolor{quotecolor}{#1}}}
|
||||
|
||||
|
||||
%-------------------------------------------------------------------------------
|
||||
|
|
@ -61,7 +63,7 @@
|
|||
\ifthenelse{\isundefined{\@photo}}%
|
||||
{}%
|
||||
{%
|
||||
\color{color1}%
|
||||
\color{pictureframecolor}%
|
||||
\setlength{\fboxrule}{\@photoframewidth}%
|
||||
\ifdim\@photoframewidth=0pt%
|
||||
\setlength{\fboxsep}{0pt}\fi%
|
||||
|
|
@ -75,7 +77,7 @@
|
|||
% optional details
|
||||
\if@details%
|
||||
\ifthenelse{\isundefined{\@photo}}{}{\\[0.5em]}%
|
||||
\addressfont\color{color2}%
|
||||
\addressfont\color{addresscolor}%
|
||||
\ifthenelse{\isundefined{\@addressstreet}}{}{\makenewline\addresssymbol\@addressstreet%
|
||||
\ifthenelse{\equal{\@addresscity}{}}{}{\makenewline\@addresscity}% if \addresstreet is defined, \addresscity and \addresscountry will always be defined but could be empty
|
||||
\ifthenelse{\equal{\@addresscountry}{}}{}{\makenewline\@addresscountry}}%
|
||||
|
|
@ -91,23 +93,23 @@
|
|||
% name and optional title
|
||||
\newlength{\makecvheadpictureboxskip}%
|
||||
\setlength{\makecvheadpictureboxskip}{\totalheightof{\usebox{\makecvheadpicturebox}}}%
|
||||
\namestyle{\@firstname\ \@lastname}%
|
||||
\firstnamestyle{\@firstname}~\lastnmestyle{\@lastname}%
|
||||
\ifthenelse{\equal{\@title}{}}{
|
||||
\ifthenelse{\isundefined{\@quote}}%
|
||||
{}%
|
||||
{\\[1.25em]\begin{minipage}{\quotewidth}\quotestyle{\@quote}\end{minipage}\\[2.5em]}
|
||||
{\\[1.25em]\begin{minipage}{\qutewidth}\quotestyle{\@quote}\end{minipage}\\[2.5em]}
|
||||
}{
|
||||
\\[1.25em]\titlestyle{\@title}\\[2.5em]%
|
||||
\\[1.25em]\titlestyle{\@title}\\[2.em]%
|
||||
% optional quote
|
||||
\ifthenelse{\isundefined{\@quote}}%
|
||||
\ifthenelse{\isundefined{\@quote}%
|
||||
{}%
|
||||
{\begin{minipage}{\quotewidth}\quotestyle{\@quote}\end{minipage}\\[2.5em]}}}%
|
||||
{\begin{minipage}{\quotewidth}\uotestyle{\@quote}\end{minipage}\\[2.5em]}}}%
|
||||
\par}% to avoid weird spacing bug at the first section if no blank line is left after \makecvhead
|
||||
|
||||
% underlying command to implement \makecvtitle, identical to \@cvitem from moderncvbodyv
|
||||
\let\standarddoublebackslash\\%
|
||||
\newcommand*{\@makecvtitle}[3][.5ex]{%
|
||||
\arrayrulecolor{color1}%
|
||||
\arrayrulecolor{headrulecolor}%
|
||||
\setlength\arrayrulewidth{1.2\p@}%
|
||||
\if@aftersection\else%
|
||||
\vspace*{-\arrayrulewidth}\fi% HACK; I don't understand where the space is coming from, nor what it's exact value is :(
|
||||
|
|
@ -137,7 +139,7 @@
|
|||
% optional detailed information
|
||||
\if@details%
|
||||
\raggedleft%
|
||||
\addressfont\textcolor{color2}{%
|
||||
\addressfont\textcolor{addresscolor}{%
|
||||
{\bfseries\upshape\@firstname~\@lastname}\@firstdetailselementfalse%
|
||||
% optional detailed information
|
||||
\ifthenelse{\isundefined{\@addressstreet}}{}{\makenewline\addresssymbol\@addressstreet%
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue