Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I tried this is example found in a previous question here:

\documentclass[11pt,a4paper,sans]{moderncv}

\moderncvstyle{casual}
\usepackage{etoolbox} \makeatletter \newcommand*{\homepageA}[1]{\def\@homepageA{#1}} \newcommand*{\homepageB}[1]{\def\@homepageB{#1}} \patchcmd{\maketitle}% {\ifthenelse{\isundefined{\@homepage}}{}{\addtomaketitle{\homepagesymbol\httplink{\@homepage}}}}% {\ifthenelse{\isundefined{\@homepageA}}{}{\addtomaketitle{\homepagesymbol\httplink{\@homepageA}}}% \ifthenelse{\isundefined{\@homepageB}}{}{\addtomaketitle{\homepagesymbol\httplink{\@homepageB}}} }% {}{}% \makeatother

\firstname{John} \familyname{Doe} \address{aa}{bb} \homepage{em1} \homepageA{emA} \homepageB{emB}

%-----------------------------------------------------------------------------

\begin{document}

\maketitle

\section{Education} \cventry{year--year}{Degree}{Institution}{City}{\textit{Grade}}{Description} % arguments 3 to 6 can be left empty

\end{document}

it does not give errors, but the new e-mail addresses do not appear. Why?

share|improve this question

1 Answer 1

The casual theme in moderncv sets the email addresses in the footer (as part of \makecvfooter), not the title (in \maketitle or \makecvtitle). I've updated the etoolbox` patch to correct the addition in the footer below:

enter image description here

\documentclass[11pt,a4paper,sans]{moderncv}

\moderncvstyle{casual}
\usepackage{etoolbox}
\makeatletter
\newcommand*{\homepageA}[1]{\def\@homepageA{#1}}
\newcommand*{\homepageB}[1]{\def\@homepageB{#1}}
\patchcmd{\makecvfooter}% <cmd>
  {\ifthenelse{\isundefined{\@homepage}}{}{\addtofooter{\homepagesymbol\httplink{\@homepage}}}}% <search>
  {\ifthenelse{\isundefined{\@homepageA}}{}{\addtofooter{\homepagesymbol\httplink{\@homepageA}}}% <replace>
   \ifthenelse{\isundefined{\@homepageB}}{}{\addtofooter{\homepagesymbol\httplink{\@homepageB}}}}%
  {}{}% <success><failure>
\makeatother

\firstname{John}
\familyname{Doe}
\address{aa}{bb}
%\homepage{em1} Not needed
\homepageA{emA}
\homepageB{emB}

%-----------------------------------------------------------------------------

\begin{document}

\makecvtitle

\section{Education}
\cventry{year--year}{Degree}{Institution}{City}{\textit{Grade}}{Description} % arguments 3 to 6 can be left empty

\end{document}
share|improve this answer
    
Still not working; I copied and paste your code but still produce the following error: (/usr/local/texlive/2010/texmf-dist/tex/latex/lm/t1lmss.fd) ! Undefined control sequence. l.26 \makecvtitle ? Seems that i can not do any modification in moderncv –  Cesare Jun 25 at 9:02
    
@Cesare: My suspicion is that you have an outdated TeX distribution. What do you have? You may find some relevant help in How do I update my TeX distribution? –  Werner Jun 25 at 14:06
    
Hi, I have texlive 2010 (i'm a mac user); however, the same error append also with lualatex and the version for ubuntu 12.04 precise (after updating all the packages, in order to be sure that latex was updated), but the problem persist (same error code). Are those version outdated? –  Cesare Jun 25 at 14:59
    
@Cesare: TeX Live 2010 is old, since 2013 is currently available, with 2014 being released shortly. I am running with moderncv 2013/04/29 v1.5.1. See Which package version am I using? –  Werner Jun 25 at 16:40
    
I updated to texlive 2014 now and works, thanks. May be it was too old. Strange that neither with lualatex works, theoretically should be newer –  Cesare Jun 25 at 19:06

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.