From 7aef19de22420294e2896b3ecee11c4f2c33e12b Mon Sep 17 00:00:00 2001 From: h4llow3En Date: Tue, 30 May 2017 12:24:15 +0200 Subject: [PATCH] allow multiple \makecvheader in documents --- awesome-cv.cls | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/awesome-cv.cls b/awesome-cv.cls index d1c1074..9db0ad8 100644 --- a/awesome-cv.cls +++ b/awesome-cv.cls @@ -401,7 +401,8 @@ % Define a header for CV % Usage: \makecvheader \newcommand*{\makecvheader}[1][C]{% - \newcommand*{\drawphoto}{% + \ifthenelse{\isundefined{\drawphoto}}{ + \newcommand*{\drawphoto}{% \ifthenelse{\isundefined{\@photo}}{}{% \newlength{\photodim} \ifthenelse{\equal{\@photoshape}{circle}}% @@ -414,9 +415,9 @@ \node[\@photoshape, draw=\@photoborder, line width=0.3mm, inner sep=\photodim, fill overzoom image=\@photo] () {}; \end{tikzpicture} }% - } - \newlength{\headertextwidth} - \newlength{\headerphotowidth} + }}{} + \ifthenelse{\isundefined{\headertextwidth}}{\newlength{\headertextwidth}}{} + \ifthenelse{\isundefined{\headerphotowidth}}{\newlength{\headerphotowidth}}{} \ifthenelse{\isundefined{\@photo}}{ \setlength{\headertextwidth}{\textwidth} \setlength{\headerphotowidth}{0cm}