summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/moderncv/moderncvheadv.sty
diff options
context:
space:
mode:
Diffstat (limited to 'macros/latex/contrib/moderncv/moderncvheadv.sty')
-rw-r--r--macros/latex/contrib/moderncv/moderncvheadv.sty57
1 files changed, 36 insertions, 21 deletions
diff --git a/macros/latex/contrib/moderncv/moderncvheadv.sty b/macros/latex/contrib/moderncv/moderncvheadv.sty
index c4d4084324..b783e10286 100644
--- a/macros/latex/contrib/moderncv/moderncvheadv.sty
+++ b/macros/latex/contrib/moderncv/moderncvheadv.sty
@@ -1,5 +1,5 @@
%% start of file `moderncvheadv.sty'.
-%% Copyright 2015-2015 Xavier Danaux (xdanaux@gmail.com), 2020-2022 moderncv maintainers (github.com/moderncv).
+%% Copyright 2015-2015 Xavier Danaux (xdanaux@gmail.com), 2020-2024 moderncv maintainers (github.com/moderncv).
%
% This work may be distributed and/or modified under the
% conditions of the LaTeX Project Public License version 1.3c,
@@ -10,7 +10,7 @@
% identification
%-------------------------------------------------------------------------------
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{moderncvheadv}[2022-02-21 v2.3.1 modern curriculum vitae and letter header variant: 5]
+\ProvidesPackage{moderncvheadv}[2024-07-08 v2.4.0 modern curriculum vitae and letter header variant: 5]
% details options: "details" (default) or "nodetails"
\@initializeif{\if@details}\@detailsfalse
@@ -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}}%
@@ -83,7 +85,8 @@
\collectionloop{phones}{% the key holds the phone type (=symbol command prefix), the item holds the number
\makenewline\csname\collectionloopkey phonesymbol\endcsname~\collectionloopitem}%
\ifthenelse{\isundefined{\@email}}{}{\makenewline\emailsymbol~\emaillink{\@email}}%
- \ifthenelse{\isundefined{\@homepage}}{}{\makenewline\homepagesymbol~\httpslink{\@homepage}}%
+ \ifthenelse{\isundefined{\@homepage}}{}{\makenewline\homepagesymbol~%
+ \ifthenelse{\equal{\@homepageprotocol}{http}}{\httplink{\@homepage}}{\httpslink{\@homepage}}}%
\collectionloop{socials}{% the key holds the social type (=symbol command prefix), the item holds the link
\makenewline\csname\collectionloopkey socialsymbol\endcsname~\collectionloopitem}%
\ifthenelse{\isundefined{\@extrainfo}}{}{\makenewline\@extrainfo}\fi}%
@@ -91,23 +94,32 @@
% name and optional title
\newlength{\makecvheadpictureboxskip}%
\setlength{\makecvheadpictureboxskip}{\totalheightof{\usebox{\makecvheadpicturebox}}}%
- \namestyle{\@firstname\ \@lastname}%
+ \firstnamestyle{\@firstname}~\lastnamestyle{\@lastname}%
\ifthenelse{\equal{\@title}{}}{
\ifthenelse{\isundefined{\@quote}}%
- {}%
- {\\[1.25em]\begin{minipage}{\quotewidth}\quotestyle{\@quote}\end{minipage}\\[2.5em]}
- }{
- \\[1.25em]\titlestyle{\@title}\\[2.5em]%
+ {}%
+ {%
+ \\[1.25em]%
+ \begin{minipage}{\quotewidth}%
+ \quotestyle{\@quote}%
+ \end{minipage}}%
+ }{%
+ \\[1.25em]%
+ \titlestyle{\@title}
% optional quote
\ifthenelse{\isundefined{\@quote}}%
- {}%
- {\begin{minipage}{\quotewidth}\quotestyle{\@quote}\end{minipage}\\[2.5em]}}}%
+ {\vspace{2.5em}}%
+ {%
+ \\[2.5em]%
+ \begin{minipage}{\quotewidth}%
+ \quotestyle{\@quote}
+ \end{minipage}}}}%
\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 +149,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%
@@ -146,9 +158,10 @@
\collectionloop{phones}{% the key holds the phone type (=symbol command prefix), the item holds the number
\makenewline\csname\collectionloopkey phonesymbol\endcsname\collectionloopitem}%
\ifthenelse{\isundefined{\@email}}{}{\makenewline\emailsymbol\emaillink{\@email}}%
- \ifthenelse{\isundefined{\@homepage}}{}{\makenewline\homepagesymbol\httpslink{\@homepage}}%
+ \ifthenelse{\isundefined{\@homepage}}{}{\makenewline\homepagesymbol%
+ \ifthenelse{\equal{\@homepageprotocol}{http}}{\httplink{\@homepage}}{\httpslink{\@homepage}}}%
\ifthenelse{\isundefined{\@extrainfo}}{}{\makenewline\@extrainfo}}\fi%
- \end{minipage}\\[1em]
+ \end{minipage}\\[2em]
% recipient block
\begin{minipage}[t]{.5\textwidth}
\raggedright%
@@ -159,7 +172,9 @@
% date
\hfill% US style
% \\[1em]% UK style
- \@date\\[2em]% US informal style: "January 1, 1900"; UK formal style: "01/01/1900"
+ \@date\\[3em]% US informal style: "January 1, 1900"; UK formal style: "01/01/1900"
+ % optional subject
+ \ifthenelse{\isundefined{\@subject}}{}{{\bfseries\@subject\\[2em]}}
% opening
\raggedright%
\@opening\\[1.5em]%