As suggested here, I use symbols drawn with tikz to indicate hyperlinks in my cv.
However when used in the cventry
command of the modern cv package, this caused an error.
Here is the minimal non-working example
\documentclass[11pt,a4paper,color,final]{moderncv}
\usepackage{tikz}
\newcommand{\ExternalLink}{%
\tikz[x=1.2ex, y=1.2ex, baseline=-0.05ex]{%
\begin{scope}[x=1ex, y=1ex]
\clip (-0.1,-0.1)
--++ (-0, 1.2)
--++ (0.6, 0)
--++ (0, -0.6)
--++ (0.6, 0)
--++ (0, -1);
\path[draw,
line width = 0.5,
rounded corners=0.5]
(0,0) rectangle (1,1);
\end{scope}
\path[draw, line width = 0.5] (0.5, 0.5)
-- (1, 1);
\path[draw, line width = 0.5] (0.6, 1)
-- (1, 1) -- (1, 0.6);
}
}
\moderncvtheme[black]{classic}
\firstname{FirstName}
\familyname{Name}
\begin{document}
\maketitle
\section{Section}
\cventry{2014}{\href{http://example.com/ \ExternalLink}{My great position}}{My great company}{My great city}{}{}
\end{document}
Edit following Salim Bou's answer. The following works
\cventry{2014}{\href{http://example.com/}{My great position \ExternalLink}}{My great company}{My great city}{}{}
(The symbol shoulb be placed in the string not in the url).
However this still produces an error
\cventry{2014}{My great position}{\href{http://example.com/}{My great company \ExternalLink}}{My great city}{}{}
Looking at the log the error looks quite similar. Latex is complaining about some error message being undefined.
\cventry{2014}{My great position}{\href{http://example.com/}{My great company \protect\ExternalLink}}{My great city}{}{}
– Salim Bou Dec 27 '16 at 15:25