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
|
||||
\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
|
||||
\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
|
||||
|
|
@ -115,6 +120,11 @@
|
|||
\namestyle{\@firstname\ \@lastname}%
|
||||
\ifthenelse{\equal{\@title}{}}{}{\\[1.25em]\titlestyle{\@title}}%
|
||||
\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
|
||||
\if@left%
|
||||
\usebox{\makecvheadnamebox}%
|
||||
|
|
|
|||
|
|
@ -16,6 +16,7 @@
|
|||
\@initializecommand{\moderncvstyleheadoptions}{}
|
||||
\DeclareOption{left} {\edef\moderncvstyleheadoptions{\moderncvstyleheadoptions,left}}
|
||||
\DeclareOption{right}{\edef\moderncvstyleheadoptions{\moderncvstyleheadoptions,right}}
|
||||
\DeclareOption{top}{\edef\moderncvstyleheadoptions{\moderncvstyleheadoptions,top}}
|
||||
|
||||
% toggle use of symbol fonts.
|
||||
\@initializeif{\if@symbols}\@symbolsfalse
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue