From 85b9551985ed592ddc076915d28255124960bcf5 Mon Sep 17 00:00:00 2001 From: David Date: Sun, 24 Jan 2021 14:56:39 +0100 Subject: [PATCH] add symbol and nosymbol option to all styles to toggle between using symbols or not. --- moderncvstyleempty.sty | 24 ++++++++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) diff --git a/moderncvstyleempty.sty b/moderncvstyleempty.sty index cadc930..cb68526 100644 --- a/moderncvstyleempty.sty +++ b/moderncvstyleempty.sty @@ -12,20 +12,40 @@ \NeedsTeXFormat{LaTeX2e} \ProvidesPackage{moderncvstyleempty}[2021/01/21 v2.1.0 modern curriculum vitae scheme: empty] - %------------------------------------------------------------------------------- % required packages %------------------------------------------------------------------------------- - %------------------------------------------------------------------------------- % package options %------------------------------------------------------------------------------- +% toggle use of symbol fonts. +\@initializeif{\if@symbols}\@symbolsfalse +\DeclareOption{symbols} {\@symbolstrue} +\DeclareOption{nosymbols} {\@symbolsfalse} +\DeclareOption*{}% avoid choking on unknown options +\ExecuteOptions{symbols} +\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 %------------------------------------------------------------------------------- % style definition %------------------------------------------------------------------------------- + +%------------------------------------------------------------------------------- +% fonts & icons +%------------------------------------------------------------------------------- +% 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 + % see moderncv.cls for command declarations that needs to be implemented, e.g. \maketitle, \section, \subsections, \cvline, etc \endinput