# How do I replace url text with a symbol in the bibliography of a CV (moderncv class)?

I want to include a link to my publication, using biblatex in a CV. But instead of the whole url, I just want a symbol which can be clicked.

My MWE is as follows:

\documentclass[11pt,a4paper]{moderncv}

% moderncv themes
\moderncvtheme[blue]{classic}

% character encoding
\usepackage[utf8]{inputenc}
\usepackage{bbding}

% personal data
\firstname{John}
\familyname{Doe}
\title{}

\email{some.thing@gmail.com}

\usepackage{filecontents}
\begin{filecontents}{pubs.bib}
@article{cazier_whole-genome_2014,
title = {My publication},
volume = {5},
url = {http://Somewebsite.html},        journal = {Nature},
author = {Doe, John. and Smith, John},
month = apr,
year = {2014},
}
\end{filecontents}

\AfterPreamble{
}

\usepackage[backend=biber, doi=false, isbn=false, style=nature, maxbibnames=20, defernumbers=true]{biblatex}

\begin{document}
\maketitle
\nocite{*}
\printbibliography[title={Publications}, type=article, resetnumbers=true]

\end{document}


What I have tried:

\AfterPreamble{
\let\orighref\href
\renewcommand{\href}[2]{\orighref{#1}{\ArrowBoldUpRight}} %I found this code on tex.SE
}


What I get:

As you can see, I get the little arrow replacing the email link. Whereas I want the url in the bibliography replaced with the arrow, without affecting the email link.

-

You should change the anything to do with the bibliography immediately before the bibliography, otherwise it would affect everything following the preamble as in your case.

\documentclass[11pt,a4paper]{moderncv}

% moderncv themes
\moderncvtheme[blue]{classic}

% character encoding
\usepackage[utf8]{inputenc}
\usepackage{bbding}

% personal data
\firstname{John}
\familyname{Doe}
\title{}

\email{some.thing@gmail.com}

\usepackage{filecontents}
\begin{filecontents}{pubs.bib}
@article{cazier_whole-genome_2014,
title = {My publication},
volume = {5},
url = {http://Somewebsite.html},        journal = {Nature},
author = {Doe, John. and Smith, John},
month = apr,
year = {2014},
}
\end{filecontents}

\usepackage[backend=biber, doi=false, isbn=false, style=nature, maxbibnames=20, defernumbers=true]{biblatex}

\begin{document}
\maketitle
\nocite{*}

\renewcommand{\url}[1]{\href{#1}{\ArrowBoldUpRight}}

\printbibliography[title={Publications}, type=article, resetnumbers=true]

\end{document}


In order to remove the surrounding <..>, replace \renewcommand{\url}[1]{..} above with

\DeclareFieldFormat{url}{%
\ifhyperref
{\href{#1}{\ArrowBoldUpRight}}
{\url{#1}}}


-
Thanks, this is quite helpful. But is there a way to remove the <>? I have tried another method from here: tex.stackexchange.com/questions/165656/… \DefineBibliographyStrings{english}{% url = {\P}, } \DeclareFieldFormat{url}{% \ifhyperref {\href{#1}{\bibstring{url}}} {\url{#1}}} but if I replace \P with \ArrowBoldUpRight it doesn't work... –  srao Jun 13 '14 at 22:02