make hidden head options available (#150)

add '(no)details' option to head in all styles, plus 'alternate' in casual

Co-authored-by: David <forenkram@gmx.de>
This commit is contained in:
Mark E Fuller 2024-05-08 19:48:05 +03:00 committed by GitHub
commit b15f06573e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 73 additions and 10 deletions

View file

@ -22,6 +22,8 @@ version 2.?.? (29 Jun 2023)
- New \social options: arXiv, INSPIRE (#185)
- Systematize colors and make them user adjustable. See documentation for details.
This requires the \moderncvcolor to be issued BEFORE \moderncvstyle.
- all styles: make the head options 'details' and 'nodetails' available to the user. (previously they were hidden). Oldstyle does not respond too well to nodetails.
- casual style: make the head options 'alternate', 'details' and 'nodetails' available to the user. (previously they were hidden).
version 2.3.1 (21 Feb 2022)
- Fix duplicate GitLab icon (#105).
@ -35,6 +37,7 @@ version 2.3.0 (16 Dec 2021)
version: 2.2.0 (28 Jul 2021)
- Remove dot in \cventry when using moderncvbodyi.
- Remove http baseurl in hyperref.
- Change font encoding to use fontspec with Latin Modern for LuaTeX and XeTeX,
else inputenc / fontenc / lmodern (https://tex.stackexchange.com/a/496643).

View file

@ -24,7 +24,7 @@
\DeclareOption{right} {\@leftfalse\@righttrue}
\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

View file

@ -24,6 +24,12 @@
\DeclareOption{center} {\edef\moderncvstylebodyoptions{\moderncvstylebodyoptions,center}}
\DeclareOption{right} {\edef\moderncvstylebodyoptions{\moderncvstylebodyoptions,right}}
% head options
\@initializecommand{\moderncvstyleheadoptions}{}
\@initializeif{\if@datainhead}\@datainheadtrue
\DeclareOption{details}{\edef\moderncvstyleheadoptions{\moderncvstyleheadoptions,details}}
\DeclareOption{nodetails}{\@datainheadfalse\edef\moderncvstyleheadoptions{\moderncvstyleheadoptions,nodetails}}
% toggle use of symbol fonts.
\@initializeif{\if@symbols}\@symbolsfalse
\DeclareOption{symbols} {\@symbolstrue}
@ -86,9 +92,14 @@
%-------------------------------------------------------------------------------
% header, body & footer
%-------------------------------------------------------------------------------
\moderncvhead{3}
\moderncvhead[\moderncvstyleheadoptions]{3}
\moderncvbody[\moderncvstylebodyoptions]{3}
\if@datainhead
% if data is shown in head, do not include the footer
\else
\moderncvfoot{1}
\fi
\endinput

View file

@ -16,6 +16,12 @@
\@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
@ -23,7 +29,7 @@
\DeclareOption{nosymbols} {\@symbolsfalse}
\DeclareOption*{}% avoid choking on unknown options
\ExecuteOptions{right,symbols}
\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
%-------------------------------------------------------------------------------
@ -75,7 +81,13 @@
%-------------------------------------------------------------------------------
\moderncvhead[\moderncvstyleheadoptions]{2}
\moderncvbody{1}
\moderncvfoot{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

View file

@ -18,13 +18,17 @@
\DeclareOption{right}{\edef\moderncvstyleheadoptions{\moderncvstyleheadoptions,right}}
\DeclareOption{top}{\edef\moderncvstyleheadoptions{\moderncvstyleheadoptions,top}}
\@initializeif{\if@datainhead}\@datainheadtrue
\DeclareOption{details}{\edef\moderncvstyleheadoptions{\moderncvstyleheadoptions,details}}
\DeclareOption{nodetails}{\@datainheadfalse\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{left,symbols}
\ExecuteOptions{left,symbols,details}
\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
%-------------------------------------------------------------------------------
@ -76,6 +80,13 @@
%-------------------------------------------------------------------------------
\moderncvhead[\moderncvstyleheadoptions]{1}
\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

View file

@ -12,13 +12,19 @@
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{moderncvstylefancy}[2022-02-21 v2.3.1 modern curriculum vitae and letter style scheme: fancy]
% headoptions
\@initializecommand{\moderncvstyleheadoptions}{}
\@initializeif{\if@datainhead}\@datainheadtrue
\DeclareOption{details}{\edef\moderncvstyleheadoptions{\moderncvstyleheadoptions,details}}
\DeclareOption{nodetails}{\@datainheadfalse\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{symbols}
\ExecuteOptions{symbols,details}
\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
%-------------------------------------------------------------------------------
@ -71,9 +77,16 @@
%-------------------------------------------------------------------------------
% header, body & footer
%-------------------------------------------------------------------------------
\moderncvhead{5}
\moderncvhead[\moderncvstyleheadoptions]{5}
\moderncvbody{5}
% 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

View file

@ -12,13 +12,20 @@
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{moderncvstyleoldstyle}[2022-02-21 v2.3.1 modern curriculum vitae and letter style scheme: oldstyle]
% headoptions
\@initializecommand{\moderncvstyleheadoptions}{}
\@initializeif{\if@datainhead}\@datainheadtrue
\DeclareOption{details}{\edef\moderncvstyleheadoptions{\moderncvstyleheadoptions,details}}
\DeclareOption{nodetails}{\@datainheadfalse\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{symbols}
\ExecuteOptions{symbols,details}
\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
%-------------------------------------------------------------------------------
@ -77,9 +84,15 @@
%-------------------------------------------------------------------------------
% header, body & footer
%-------------------------------------------------------------------------------
\moderncvhead{4}
\moderncvhead[\moderncvstyleheadoptions]{4}
\moderncvbody{4}
% 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