This is my first question here, so apologies if I miss any conventions.
I'm writing a dissertation in LaTeX. My sources are in Mendeley, which is generating a BibTeX file. I'm using the
natbib package with the
The first problem that I faced with this was that most of the URLs in the bibliography went off the edge of the page because TeX didn't know how to linebreak them. The natbib documentation suggested that if the
url package was loaded, this would Just Work. It mostly did, but it left me with a more subtle problem:
With the url package loaded, URLs are treated similarly to
\verb environments - in particular, it is no longer necessary to escape special characters such as
_. This means that I have two options:
- I can turn on the Mendeley option that escapes special characters in its BibTeX export. This means that my printed URLs contain things like
- I can turn off that Mendeley option so that it doesn't escape the special characters. This means that all the other fields in the bibliography have trouble (e.g.
&characters getting lost as they're not escaped).
So, ways that occur to me to go about fixing this:
(a) Find a way to stop the url package from treating things like
\_ as verbatim
(b) Find a different way to get URLs to linebreak in the bibliography
(c) Manually edit my
.bib file before compiling for the last time, removing escapes from URLs.
I would really love to not do (c) ;-) Any ideas?