[Tex/LaTex] Problem with the underscore ‘_’ caracter with natbib and footnotebackref package

bibliographiesbibtexnatbib

I am having a problem with the underscore with LaTeX + natbib + footnotebackref.

Here is my MWE:

\documentclass[a4paper,12pt]{report}
\usepackage{footnotebackref} %%%
\usepackage{natbib}
\bibliographystyle{abbrvnat}
\hypersetup{colorlinks=true, breaklinks=true, urlcolor= blue, linkcolor= blue, citecolor=blue, } %%%
\begin{document}
hello \citep{Potter1994}
\bibliography{library}
\end{document}

and the bib file:

@article{Potter1994,
abstract = {deleted for short},
author = {Potter, Ma and Jong, Ka De},
doi = {10.1007/3-540-58484-6{\_}269},
file = {:home/me/ppsn94.pdf:pdf},
isbn = {3-540-58484-6},
journal = {Parallel Problem Solving from Nature},
pages = {249 -- 257},
title = {{A cooperative coevolutionary approach to function       optimization}},
url = {http://link.springer.com/chapter/10.1007/3-540-58484-6{\_}269},
year = {1994}
}

It works properly when I remove the two lines marked with %%% but I'd like to keep coloring links, URLs and citations.Here is what I get like this

Any solutions?
Thank you

Best Answer

At last I see two big missunderstandings here.

First you used command \hypersetup without loading package hyperref. In the documentation of hyperref (texdoc hyperref on your console/terminal) you can read that \hypersetup is used to set options for package hyperref.

The second is that with field url in your bib file and loaded hyperref (that implicit loads package url) you have not to mask an underscore with \.

Please try the following MWE:

\RequirePackage{filecontents}
\begin{filecontents*}{\jobname.bib}
@article{Potter1994,
  abstract = {deleted for short},
  author   = {Potter, Ma and Jong, Ka De},
  doi      = {10.1007/3-540-58484-6_269},
  file     = {:home/me/ppsn94.pdf:pdf},
  isbn     = {3-540-58484-6},
  journal  = {Parallel Problem Solving from Nature},
  pages    = {249--257},
  title    = {{A cooperative coevolutionary approach to function optimization}},
  url      = {http://link.springer.com/chapter/10.1007/3-540-58484-6_269},
  year     = {1994},
}
\end{filecontents*}


\documentclass[a4paper,12pt]{report}

\usepackage{xcolor}
%\usepackage{footnotebackref} %%%
\usepackage{natbib}
\bibliographystyle{abbrvnat}
\usepackage{hyperref}
\hypersetup{%
  colorlinks=true, 
  breaklinks=true, 
  urlcolor=blue, 
  linkcolor=blue, 
  citecolor=blue, 
} %%%

\begin{document}
hello \citep{Potter1994}
\bibliography{\jobname}
\end{document}

and see the result:

enter image description here