# breakurl doesn't work with xelatex

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.
{/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?

• You shouldn't be using the dvips option to begin with. – egreg Dec 16 '14 at 10:33
• The breakurl manual explicitly recommends it if you get the above error. But it doesn't compile without it either. – jkeirstead Dec 16 '14 at 10:34
• You don't need breakurl, that's all! – egreg Dec 16 '14 at 10:35
• Yes you do...without it (just with hyperref using XeLaTeX0 URIs will not break on the slash. – Peter Flynn Jun 28 '18 at 12:02

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}
• 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