Discussion:
Problem with hyperref in Bibliography - url extends beyond text width
dustin_vaselaar
2006-12-22 19:28:31 UTC
Permalink
Hello,
I am having an issue with using hyperref in a bibliography. I have a
reference that uses a url with an underscore character, '_', if I
compile the document using pdflatex, the url link breaks properly fits
into the page margins. However, if I use plain latex and output a DVI
file, the url link breaks right after the '_' character.

I am using the following setting for my hyperref setup:

\ifpdf
\usepackage[pdftex,hyperindex=true,backref=page,colorlinks=true,linkcolor=CustomBlue,breaklinks=true]{hyperref}
\else
\usepackage[dvips,hyperindex=true,backref=page,colorlinks=true,linkcolor=CustomBlue,breaklinks=true]{hyperref}
\fi


Any thoughts or suggestions?
-Dustin
dustin_vaselaar
2006-12-25 06:49:57 UTC
Permalink
FYI:
It turns out that I needed to include the breakurl package after the
non-pdftex version of the \usepackage[...]{hyperref} command.

i.e.

\ifpdf
\usepackage[pdftex,hyperindex=true,backref=page,colorlinks=true,linkcolor=CustomBlue,breaklinks=true]{hyperref}
\else
\usepackage[dvips,hyperindex=true,backref=page,colorlinks=true,linkcolor=CustomBlue,breaklinks=true]{hyperref}

\usepackage{breakurl}
\fi

-Dustin
Post by dustin_vaselaar
Hello,
I am having an issue with using hyperref in a bibliography. I have a
reference that uses a url with an underscore character, '_', if I
compile the document using pdflatex, the url link breaks properly fits
into the page margins. However, if I use plain latex and output a DVI
file, the url link breaks right after the '_' character.
\ifpdf
\usepackage[pdftex,hyperindex=true,backref=page,colorlinks=true,linkcolor=CustomBlue,breaklinks=true]{hyperref}
Post by dustin_vaselaar
\else
\usepackage[dvips,hyperindex=true,backref=page,colorlinks=true,linkcolor=CustomBlue,breaklinks=true]{hyperref}
Post by dustin_vaselaar
\fi
Any thoughts or suggestions?
-Dustin
Loading...