Created
September 23, 2012 01:46
-
-
Save alexras/3768495 to your computer and use it in GitHub Desktop.
Fix URL breaks in LaTeX
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
% Allow breaking at both hyphens and spaces | |
\usepackage[hyphens,spaces]{url} | |
% A sequence of BigBreaks will be treated as one break, so it will only be able to break after :// | |
\renewcommand{\UrlBigBreaks}{\do\:\do\/} | |
% (Less aggressive) Treat both / and - as breakable characters (don't know why this does something different than hyphens in the package declaration, but it does) | |
\renewcommand{\UrlBreaks}{\do\/\do\-} | |
% (More aggressive) Any letter and / are treated as breakable characters | |
\renewcommand{\UrlBreaks}{\do\/\do\a\do\b\do\c\do\d\do\e\do\f\do\g\do\h\do\i\do\j\do\k\do\l\do\m\do\n\do\o\do\p\do\q\do\r\do\s\do\t\do\u\do\v\do\w\do\x\do\y\do\z\do\A\do\B\do\C\do\D\do\E\do\F\do\G\do\H\do\I\do\J\do\K\do\L\do\M\do\N\do\O\do\P\do\Q\do\R\do\S\do\T\do\U\do\V\do\W\do\X\do\Y\do\Z} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment