From 28355cc56202e73ca0a41c50934a9a8a0a216b95 Mon Sep 17 00:00:00 2001 From: Virgil Griffith Date: Sat, 2 Apr 2016 19:44:24 +0800 Subject: [PATCH] Added allowable optional honorific in \name E.g., can now have: \name[Dr.]{Virgil}{Griffith} And have it display at the top but not at the bottom. There may be a better way to do the spacing between the \@honorific and the \@firstname in the \headerfirstnamestyle . I leave this to you great LaTeX master. --- awesome-cv.cls | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/awesome-cv.cls b/awesome-cv.cls index d76bbaa..149d4cb 100644 --- a/awesome-cv.cls +++ b/awesome-cv.cls @@ -33,7 +33,7 @@ % geometry and fancyhdr) %------------------------------------------------------------------------------- % Options for draft or final -\DeclareOption{draft}{\setlength\overfullrule{5pt}} +\DeclareOption{draft}{\setlengtfh\overfullrule{5pt}} \DeclareOption{final}{\setlength\overfullrule{0pt}} % Inherit options of article \DeclareOption*{% @@ -268,7 +268,10 @@ % Usage: \firstname{} % Usage: \lastname{} % Usage: \familyname{} -\newcommand*{\name}[2]{\def\@firstname{#1}\def\@lastname{#2}} + +\newcommand*{\name}[3][]{\def\@honorific{#1}\def\@firstname{#2}\def\@lastname{#3}} + +\newcommand*{\honorific}[1]{\def\@honorific{#1}} \newcommand*{\firstname}[1]{\def\@firstname{#1}} \newcommand*{\lastname}[1]{\def\@lastname{#1}} \newcommand*{\familyname}[1]{\def\@lastname{#1}} @@ -406,8 +409,8 @@ % Define a header for CV % Usage: \makecvheader \newcommand*{\makecvheader}{% - \begin{center} - \headerfirstnamestyle{\@firstname}\headerlastnamestyle{{}\acvHeaderNameDelim\@lastname}% + \begin{center} + \headerfirstnamestyle{\@honorific\ \@firstname}\headerlastnamestyle{{}\acvHeaderNameDelim\@lastname}% \\[\acvHeaderAfterNameSkip]% \ifthenelse{\isundefined{\@position}}{}{\headerpositionstyle{\@position\\[\acvHeaderAfterPositionSkip]}}% \ifthenelse{\isundefined{\@address}}{}{\headeraddressstyle{\@address\\[\acvHeaderAfterAddressSkip]}}%