From: Martin Mares Date: Tue, 20 Aug 2019 19:42:07 +0000 (+0200) Subject: ucw-link: "--" in URLs should not produce a ligature X-Git-Tag: v2.0~2 X-Git-Url: http://mj.ucw.cz/gitweb/?a=commitdiff_plain;h=c7310a545ce08560c0c2cd314603e4d695c2b10c;p=ucwmac.git ucw-link: "--" in URLs should not produce a ligature --- diff --git a/ucw-link.tex b/ucw-link.tex index 79594ce..ef229c4 100644 --- a/ucw-link.tex +++ b/ucw-link.tex @@ -44,6 +44,7 @@ % % - They can contain various characters considered special by TeX. % - We want to adjust appearance of "//", "_", "~" according to font. +% - "--" should not produce a ligature. % - We want to insert a breakpoint after "/", "?", "&". % - We need the raw form of the URL for PDF links. % - We cannot rely purely on changing catcodes, as we sometimes need @@ -105,6 +106,7 @@ \replacestrings{?}{\urlquestion}% \replacestrings{&}{\urlamp}% \replacestrings{=}{\urlequal}% + \replacestrings{-}{\urlminus}% } % Style switches at the beginning/end of an URL (feel free to re-define them) @@ -119,6 +121,7 @@ \def\urlquestion{?\penalty100\relax} \def\urlamp{\&\penalty100\relax} \def\urlequal{=\penalty100\relax} +\def\urlminus{\hbox{-}} \def\urlhack#1{#1} % Kern to place between "//" in an URL @@ -142,6 +145,7 @@ \def\urlquestion{?}% \def\urlamp{C}% \def\urlequal{=}% + \def\urlminus{-}% \def\%{D}% \def\#{E}% \def\\{}%