9

I'm trying to use the breakurl package with xelatex but can't get even the following minimum working example to compile.

\documentclass{article}
% dvips added as per breakurl manual
% also fails without it
\usepackage[dvips]{hyperref}
\usepackage{breakurl}
\begin{document}
\end{document}

Compile with xelatex and you get the following error:

! Undefined control sequence.
<argument> \headerps@out 
                         {/burl@stx null def /BU.S { /burl@stx null def } de...
l.311 }

Is this package just incompatible or am I missing some special incantation?

1 Answers1

8

You don't need it. Only the dvips driver has problems to break links and needs breakurl. xdvipdfmx (used by xetex) works without it:

\documentclass{article}
\usepackage{hyperref}
\textwidth=2cm
\begin{document}
\url{http://tex.stackexchange.com/questions/218196/breakurl-doesnt-work-with-xelatex}
\end{document}
Ulrike Fischer
  • 327,261
  • I was hoping to use it since I inherited a file with multiple burlalt commands where the alt text includes underscores. Guess I'll have to manually swap the arguments and escape the underscores. – jkeirstead Dec 16 '14 at 10:39
  • You could say \let\burlalt\href. – Ulrike Fischer Dec 16 '14 at 10:41
  • Yes, I think I'll have to try that. Escaping the underscores might be tricky but let is a good fix for swapping the arguments. Thanks. – jkeirstead Dec 16 '14 at 10:44