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.
Any solutions?
Thank you
Best Answer
At last I see two big missunderstandings here.
First you used command
\hypersetup
without loading packagehyperref
. In the documentation ofhyperref
(texdoc hyperref
on your console/terminal) you can read that\hypersetup
is used to set options for packagehyperref
.The second is that with field
url
in your bib file and loadedhyperref
(that implicit loads packageurl
) you have not to mask an underscore with\
.Please try the following MWE:
and see the result: