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 wanted to include 2 websites in my resume which I am making using moderncv but it seems it allows only one website. How to show 2 websites in the header (showing the website icon for both)? I am using moderncv's banking style.

share|improve this question
    
Welcome to TeX.SX! Please add a minimal working example (MWE) that illustrates your problem. It will be much easier for us to reproduce your situation and find out what the issue is when we see compilable code, starting with \documentclass{...} and ending with \end{document}. –  Adam Liter Feb 26 at 4:17
    
I don't know what code to write, hence this question –  pratnala Feb 26 at 8:13
    
No worries! It looks like you got an answer anyway. But what an MWE is supposed to do is provide a basis for anyone who might try to help you. So even, in this case, putting together an MWE with just the one website and then indicating that you somehow want to have two websites would have been helpful, so that anyone who tries to help you doesn't have to go through that process her-/himself. –  Adam Liter Feb 26 at 17:23
    
Ah ok. Got it! :) –  pratnala Feb 27 at 7:59

1 Answer 1

up vote 8 down vote accepted

The following solution provides a general approach to adding two homepages and requires the following addition to your moderncv preamble:

\usepackage{etoolbox}% http://ctan.org/pkg/etoolbox
\makeatletter
\newcommand*{\homepageA}[1]{\def\@homepageA{#1}}
\newcommand*{\homepageB}[1]{\def\@homepageB{#1}}
\patchcmd{\maketitle}% <cmd>
  {\ifthenelse{\isundefined{\@homepage}}{}{\addtomaketitle{\homepagesymbol\httplink{\@homepage}}}}% <search>
  {\ifthenelse{\isundefined{\@homepageA}}{}{\addtomaketitle{\homepagesymbol\httplink{\@homepageA}}}%
   \ifthenelse{\isundefined{\@homepageB}}{}{\addtomaketitle{\homepagesymbol\httplink{\@homepageB}}}}% <replace>
  {}{}% <success><failure>
\makeatother

With the aid of etoolbox, the banking style \maketitle macro is patched to insert two homepages. These homepages are specified using \homepageA and \homepageB, which use a similar interface to the original \homepage (which now doesn't get used anymore).

enter image description here


This approach translates directly to the use of emails as well via the following set of instructions:

\usepackage{etoolbox}% http://ctan.org/pkg/etoolbox
\makeatletter
\newcommand*{\emailA}[1]{\def\@emailA{#1}}
\newcommand*{\emailB}[1]{\def\@emailB{#1}}
\patchcmd{\maketitle}% <cmd>
  {\ifthenelse{\isundefined{\@email}}{}{\addtomaketitle{\emailsymbol\emaillink{\@email}}}}% <search>
  {\ifthenelse{\isundefined{\@emailA}}{}{\addtomaketitle{\emailsymbol\emaillink{\@emailA}}}%
   \ifthenelse{\isundefined{\@emailB}}{}{\addtomaketitle{\emailsymbol\emaillink{\@emailB}}}}% <replace>
  {}{}% <success><failure>
\makeatother

Now two email addresses are specifier via \emailA and \emailB, respectively:

enter image description here

share|improve this answer
    
Can the same method be followed for 2 email addresses? –  pratnala Jul 15 at 13:52
1  
@pratnala: I've updated my answer to reflect this... –  Werner Jul 16 at 6:30

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.