Following the excellent advice in this site, I have started using moderncv
for writing the new version of my CV.
Unfortunately, after converting to PDF, my http links work (clicking on them leads to the site), but they are formatted as normal text without underline and blue color.
Following some searches, I've tried:
\hypersetup{linkcolor=blue}
\href{http://www.wikibooks.org}{wikibooks home}
And some other tags, but nothing seems to work. Any idea how to format the links?
Minimal working example:
\documentclass[11pt,a4paper]{moderncv}
\moderncvtheme[blue]{casual}
\usepackage[utf8]{inputenc} % replace by the encoding you are using
\usepackage[scale=0.8]{geometry}
\firstname{Adam}
\familyname{Matan}
\email{adam@matan.name} % optional, remove the line if not wanted
\homepage{www.matan.name} % optional, remove the line if not wanted
\makeatletter
\renewcommand*{\bibliographyitemlabel}{\@biblabel{\arabic{enumiv}}}
\makeatother
\begin{document}
\maketitle
\section{Professional network}
% ********************************************
% *********** Link part ***********
% ********************************************
\cvline{Linkedin.com} {\small \href{http://www.linkedin.com/in/adamatan} {Adam Matan} - Professional profile and links. }
\cvline{Stackoverflow.com} {\small \href{http://stackoverflow.com/users/51197/adam-matan} {Adam Matan} - My software questions and answers. }
\cvline{twitter.com} {\small \href{http://twitter.com/justnoticed} {@justnoticed} - My tech tweets.}
% ********************************************
% *********** /Link part ***********
% ********************************************
\renewcommand{\listitemsymbol}{-} % change the symbol for lists
% Publications from a BibTeX file without multibib\renewcommand*{\bibliographyitemlabel}{\@biblabel{\arabic{enumiv}}}% for BibTeX numerical labels
\nocite{*}
\bibliographystyle{plain}
\bibliography{publications} % 'publications' is the name of a BibTeX file
\end{document}
Best Answer
That is because
moderncv.cls
setspdfborder
to0 0 0
at the beginning of the document; here's the relevant code:EDIT: now I understand the request a little bit better (I hope); initially I thought that all the urls should have a colored border and I proposed some solution, now I see that it's just about some urls being colored. Taking this into account, I offer another solution:
I defined a new command
\Colorhref
with one optional argument (the color for the urls, default=cyan
) and two mandatory arguments that will be passed to the standard\href
command (\Colorhref
also takes care of the change in font size). In your document you can use\Colorhref
if you want your url with color and\href
otherwise. Use the standardmoderncv
class:Here's the result of the compilation of the above example code: