3

I'm writing an article using the REVTeX documentclass, and use hyperref. The problem is that when I add URLs to my references, the linked titles aren't broken at all.

Minimal example:
.tex file:

\documentclass[twocolumn]{revtex4-1}
\usepackage{hyperref}
\begin{document}
\cite{reference, reference2}
\bibliography{references}
\end{document}

references:

@TECHREPORT{reference,
    AUTHOR      = {Firstname Lastname},
    TITLE       = {Extremely long and complicated title of something I want to reference several times in my very interesting article},    
    INSTITUTION = {Institution},
    YEAR        = {2013},
    URL         = {http://url/}
}

@TECHREPORT{reference2,
    AUTHOR      = {Firstname Lastname},
    TITLE       = {Regular reference},    
    INSTITUTION = {Institution},
    YEAR        = {2013},
    FILE        = {http://url/},
}

Compile using latex, bibtex, latex, latex, dvipdf.

The result:enter image description here

Does anyone know of a way to remedy this?

Filip S.
  • 335
  • 1
    Welcome to TeX.SX! You may have a look on our starter guide. Your sample code wraps correctly for me. Are you packages up-to-date? – Andrew Swann May 24 '13 at 08:34
  • Your code works for me. Maybe you use some old package versions. – mafp May 24 '13 at 08:36
  • How can I check what package versions I have? I'm on Ubuntu 12.04, using the default versions from the repos – Filip S. May 24 '13 at 08:46
  • @AndrewSwann Could you tell me what versions of the packages you have? I added \listfiles to my preamble, and got hyperref.cfg 2002/06/06 v1.2, revsymb4-1.sty 2010/07/25/20:33:00 4.1r, natbib.sty 2010/09/13 8.31b, url.sty 2006/04/12 ver 3.3, and lots of other packages I don't know if is relevant. – Filip S. May 24 '13 at 09:05
  • revtex4-1.cls 2010/07/25/20:33:00 4.1r and hyperref.sty 2012/11/06 v6.83m are probably the most relevant. May be also relevent is the fact that I compile with pdflatex. – Andrew Swann May 24 '13 at 09:15
  • Aha, I need to compile using latex, bibtex and dvipdf. Could you try that? It breaks correctly using pdflatex for me as well. – Filip S. May 24 '13 at 09:17
  • 1
    Using latex gives the problem. breakurl solutions as in http://tex.stackexchange.com/q/20768/15925 would be expected to help, but revtex writes an \href command in the bibliography rather than \url. Now breakurl provides \burlalt that has the same syntax as \href, but (a) I can't get the \burlalt command to work - it produces compilation errors even in simple article documents, (b) I don't see how to make the substitution of \href by \burlalt, except via an external processing of the .bbl. I think you are going to have to use pdflatex – Andrew Swann May 24 '13 at 11:08
  • I have been thinking about it, and I don't see any reason that I have to compile using latex, so I'll just use pdflatex. The REVTeX guide recommends latex, but... Thanks anyway! – Filip S. May 24 '13 at 13:01
  • This should be reopened, as it's still an issue without a solution. Note that the long links prevail on APS's end, and the editors of the journals request these are fixed by the submitter. – rubenvb Oct 08 '14 at 13:45
  • "This question is unlikely to help any future visitors" No kidding, it's been closed. Why are these questions left "up" so that anyone with the same problem (like me) will find them in google? If the question is left up, you might as well allow people to leave answers... – co9olguy May 27 '15 at 15:20
  • Seriously, why bother closing a question like this? It's a perfectly valid question, contains a working example, and other users (me) have this problem. Specifically, I compile locally fine using pdflatex, but when submitting to the arxiv, the file is remotely compiled and I get this line-wrapping problem. It would have been great to have had other answers available to help me solve the problem – co9olguy May 27 '15 at 15:32

0 Answers0