9

I have a \url{some.edu/page} that breaks just before .edu I would like to have it break at the / at worst, or not at all. How can I do that?

2
  • Thank you for editing. I'm new, will try to format better in the future.
    – Max
    Nov 16, 2012 at 0:07
  • 1
    You're very welcome :) Welcome to TeX.SE!
    – cmhughes
    Nov 16, 2012 at 0:14

1 Answer 1

8

The characters, where breaks are allowed, can be changed. See documentation of package url, section "5.2 Changing linebreaks". In this case the dot is part of \UrlBreaks. The following redefines it without the dot:

\usepackage{url}
\renewcommand*{\UrlBreaks}{\do\@\do\\\do\/\do\!\do\_\do\|\do\;\do\>\do\]%
  \do\)\do\,\do\?\do\'\do+\do\=\do\#}%

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .