mirror of
https://github.com/moderncv/moderncv.git
synced 2026-02-06 10:05:19 +01:00
[contemporary] Properly support qr and noqr options
This commit is contained in:
parent
1ac6c08efa
commit
b5d6a6e79f
2 changed files with 7 additions and 4 deletions
|
|
@ -120,9 +120,10 @@
|
||||||
\hspace*{\separatorcolumnwidth}\fi}%
|
\hspace*{\separatorcolumnwidth}\fi}%
|
||||||
% optional QR for homepage (pre-rendering)
|
% optional QR for homepage (pre-rendering)
|
||||||
\@initializebox{\makecvheadqrbox}%
|
\@initializebox{\makecvheadqrbox}%
|
||||||
\savebox{\makecvheadqrbox}{%
|
\if@headqr%
|
||||||
\ifthenelse{\isundefined{\@homepage}}{}{\tikz\node[inner sep=1ex,fill=white]{\qrcode[height=1.5cm]{\@homepage}};}%
|
\savebox{\makecvheadqrbox}{%
|
||||||
}%
|
\ifthenelse{\isundefined{\@homepage}}{}{\tikz\node[inner sep=1ex,fill=white]{\qrcode[height=1.5cm]{\@homepage}};}%
|
||||||
|
}\fi%
|
||||||
% name and title (pre-rendering)
|
% name and title (pre-rendering)
|
||||||
\@initializelength{\makecvheaddetailswidth}\settowidth{\makecvheaddetailswidth}{\usebox{\makecvheaddetailsbox}}%
|
\@initializelength{\makecvheaddetailswidth}\settowidth{\makecvheaddetailswidth}{\usebox{\makecvheaddetailsbox}}%
|
||||||
\@initializelength{\makecvheadpicturewidth}\settowidth{\makecvheadpicturewidth}{\usebox{\makecvheadpicturebox}}%
|
\@initializelength{\makecvheadpicturewidth}\settowidth{\makecvheadpicturewidth}{\usebox{\makecvheadpicturebox}}%
|
||||||
|
|
|
||||||
|
|
@ -17,9 +17,11 @@
|
||||||
\@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{qr} {\edef\moderncvstyleheadoptions{\moderncvstyleheadoptions,qr}}
|
||||||
|
\DeclareOption{noqr}{\edef\moderncvstyleheadoptions{\moderncvstyleheadoptions,noqr}}
|
||||||
|
|
||||||
\DeclareOption*{}% avoid choking on unknown options
|
\DeclareOption*{}% avoid choking on unknown options
|
||||||
\ExecuteOptions{left}
|
\ExecuteOptions{left,qr}
|
||||||
\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
|
||||||
|
|
||||||
%-------------------------------------------------------------------------------
|
%-------------------------------------------------------------------------------
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue