moderncv/moderncvstylecasual.sty
David 87a6283824 make hidden head options available
casual style: make the head options 'alternate', 'details' and
'nodetails' available to the user. (previously they were hidden).
2021-01-26 18:40:59 +01:00

78 lines
3 KiB
TeX

%% start of file `moderncvstylecasual.sty'.
%% Copyright 2006-2015 Xavier Danaux (xdanaux@gmail.com), 2020-2021 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,
% available at http://www.latex-project.org/lppl/.
%-------------------------------------------------------------------------------
% identification
%-------------------------------------------------------------------------------
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{moderncvstylecasual}[2021/01/21 v2.1.0 modern curriculum vitae and letter style scheme: casual]
% head section alignment options: "left" (default) or "right"
\@initializecommand{\moderncvstyleheadoptions}{}
\DeclareOption{left} {\edef\moderncvstyleheadoptions{\moderncvstyleheadoptions,left}}
\DeclareOption{right}{\edef\moderncvstyleheadoptions{\moderncvstyleheadoptions,right}}
% head options alternate, details and no details
\DeclareOption{alternate}{\edef\moderncvstyleheadoptions{\moderncvstyleheadoptions,alternate}}
\@initializeif{\if@datainhead}\@datainheadfalse
\DeclareOption{details}{\@datainheadtrue\edef\moderncvstyleheadoptions{\moderncvstyleheadoptions,details}}
\DeclareOption{nodetails}{\edef\moderncvstyleheadoptions{\moderncvstyleheadoptions,nodetails}}
% toggle use of symbol fonts.
\@initializeif{\if@symbols}\@symbolsfalse
\DeclareOption{symbols} {\@symbolstrue}
\DeclareOption{nosymbols} {\@symbolsfalse}
\DeclareOption*{}% avoid choking on unknown options
\ExecuteOptions{right,symbols,nodetails}
\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
%-------------------------------------------------------------------------------
% fonts & icons
%-------------------------------------------------------------------------------
% Latin Modern fonts
%\ifxetexorluatex
% \setmainfont{Latin Modern Roman}
% \setsansfont{Latin Modern Sans}
% \setmathfont{Latin Modern Math}
%\else
% \IfFileExists{lmodern.sty}%
% {\RequirePackage{lmodern}}%
% {}
%\fi
% symbols
\if@symbols
\ifxetexorluatex
\moderncvicons{awesome} % use font-awesome symbols if lualatex or xelatex is used
\else
\moderncvicons{marvosym} % use marvosym symbols pdflatex is used
\fi
\else
\moderncvicons{letters} % do not use symbols, use letters
\fi
%-------------------------------------------------------------------------------
% header, body & footer
%-------------------------------------------------------------------------------
\moderncvhead[\moderncvstyleheadoptions]{2}
\moderncvbody{1}
% include foot only if nodetails option is active since otherwise we have two times the information
% on the page
\if@datainhead
% if data is shown in head, do not include the footer
\else
\moderncvfoot{1}
\fi
\endinput
%% end of file `moderncvstylecasual.sty'.