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.
2 Answers
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).
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:
-
-
1
To add an extra hompage there is a much easiers way, like this:
\extrainfo{\homepagesymbol\httplink{http://example.com}}
-
2Definitely much simpler! One ought to note though that you are only allowed one
extrainfo{}
command.– ChrisRMar 26, 2017 at 3:10
\documentclass{...}
and ending with\end{document}
.