From e8461140ac0ff62fcd394c893963cc8a74c84f0d Mon Sep 17 00:00:00 2001 From: James Ray <16969914+jamesray1@users.noreply.github.com> Date: Fri, 19 Jan 2018 17:30:51 +1100 Subject: [PATCH] Formatting fixes for URLs breaking over lines --- Paper.tex | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/Paper.tex b/Paper.tex index ba8d7c43..a09e5e44 100644 --- a/Paper.tex +++ b/Paper.tex @@ -21,6 +21,31 @@ \usepackage{afterpage} \usepackage{tikz} + +%Put after \PassOptionsToPackage PR +% info on the above command: . Note that the three preceding lines, as well as \PassOptionsToPackage{hyphens}{url}\usepackage{hyperref} did not fix the error where if a URL breaks over a page, it shows a snippet in the header as shown here: . +\makeatletter +\g@addto@macro{\UrlBreaks}{\UrlOrds} +\makeatother + +%The following command did fix this error, however only because it happened to compact the text, preventing a URL from breaking over a page. If you force a URL to break over a page, the error still occurs. +\expandafter\def\expandafter\UrlBreaks\expandafter{\UrlBreaks% save the current one + \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} +% More info: . +% These don't appear to make a difference with the preceding use of the \hypens package and \expandafter: +%\sloppy +%\setlength{\emergencystretch}{2pt} +% https://tex.stackexchange.com/a/59131/143781 +% + +% You can use tables instead of this package, but it might be worthwhile considering. +%\usepackage{glossaries} + \input{Version.tex} \newcommand{\hcancel}[1]{%