mirror of
https://github.com/moderncv/moderncv.git
synced 2026-02-06 10:05:19 +01:00
add option to classic style to align header elements to the top
This commit is contained in:
parent
d8bc48733c
commit
bf73a93718
2 changed files with 11 additions and 0 deletions
|
|
@ -23,6 +23,11 @@
|
||||||
\@initializeif{\if@right}\@rightfalse
|
\@initializeif{\if@right}\@rightfalse
|
||||||
\DeclareOption{right} {\@leftfalse\@righttrue}
|
\DeclareOption{right} {\@leftfalse\@righttrue}
|
||||||
|
|
||||||
|
% top options: align header elements by their top instead of their bottom
|
||||||
|
% default: bottom
|
||||||
|
\@initializeif{\if@top}\@topfalse
|
||||||
|
\DeclareOption{top}{\@toptrue}
|
||||||
|
|
||||||
\DeclareOption*{}% avoid choking on unknown options
|
\DeclareOption*{}% avoid choking on unknown options
|
||||||
\ExecuteOptions{details,left}
|
\ExecuteOptions{details,left}
|
||||||
\ProcessOptions*\relax% \ProcessOptions* processes the options in the order provided (i.e., with the later ones possibly overriding the former ones), while \ProcessOptions processes them in the order of the package
|
\ProcessOptions*\relax% \ProcessOptions* processes the options in the order provided (i.e., with the later ones possibly overriding the former ones), while \ProcessOptions processes them in the order of the package
|
||||||
|
|
@ -115,6 +120,11 @@
|
||||||
\namestyle{\@firstname\ \@lastname}%
|
\namestyle{\@firstname\ \@lastname}%
|
||||||
\ifthenelse{\equal{\@title}{}}{}{\\[1.25em]\titlestyle{\@title}}%
|
\ifthenelse{\equal{\@title}{}}{}{\\[1.25em]\titlestyle{\@title}}%
|
||||||
\end{minipage}}%
|
\end{minipage}}%
|
||||||
|
% raise boxes if top option is set
|
||||||
|
\if@top%
|
||||||
|
\savebox{\makecvheadnamebox}{\raisebox{-\height+\baselineskip}{\usebox{\makecvheadnamebox}}}%
|
||||||
|
\savebox{\makecvheaddetailsbox}{\raisebox{-\height+\baselineskip}{\usebox{\makecvheaddetailsbox}}}%
|
||||||
|
\savebox{\makecvheadpicturebox}{\raisebox{-\height+\baselineskip}{\usebox{\makecvheadpicturebox}}}\fi%
|
||||||
% rendering
|
% rendering
|
||||||
\if@left%
|
\if@left%
|
||||||
\usebox{\makecvheadnamebox}%
|
\usebox{\makecvheadnamebox}%
|
||||||
|
|
|
||||||
|
|
@ -16,6 +16,7 @@
|
||||||
\@initializecommand{\moderncvstyleheadoptions}{}
|
\@initializecommand{\moderncvstyleheadoptions}{}
|
||||||
\DeclareOption{left} {\edef\moderncvstyleheadoptions{\moderncvstyleheadoptions,left}}
|
\DeclareOption{left} {\edef\moderncvstyleheadoptions{\moderncvstyleheadoptions,left}}
|
||||||
\DeclareOption{right}{\edef\moderncvstyleheadoptions{\moderncvstyleheadoptions,right}}
|
\DeclareOption{right}{\edef\moderncvstyleheadoptions{\moderncvstyleheadoptions,right}}
|
||||||
|
\DeclareOption{top}{\edef\moderncvstyleheadoptions{\moderncvstyleheadoptions,top}}
|
||||||
|
|
||||||
% toggle use of symbol fonts.
|
% toggle use of symbol fonts.
|
||||||
\@initializeif{\if@symbols}\@symbolsfalse
|
\@initializeif{\if@symbols}\@symbolsfalse
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue