]> mj.ucw.cz Git - ucwmac.git/commitdiff
ucw-link: "--" in URLs should not produce a ligature
authorMartin Mares <mj@ucw.cz>
Tue, 20 Aug 2019 19:42:07 +0000 (21:42 +0200)
committerMartin Mares <mj@ucw.cz>
Tue, 20 Aug 2019 19:42:07 +0000 (21:42 +0200)
ucw-link.tex

index 79594ced38f25be36d530be464b111fe6e52b5b2..ef229c483653a1e183a890f7aef8e2b5418c5998 100644 (file)
@@ -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
        \replacestrings{?}{\urlquestion}%
        \replacestrings{&}{\urlamp}%
        \replacestrings{=}{\urlequal}%
+       \replacestrings{-}{\urlminus}%
 }
 
 % Style switches at the beginning/end of an URL (feel free to re-define them)
 \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
        \def\urlquestion{?}%
        \def\urlamp{C}%
        \def\urlequal{=}%
+       \def\urlminus{-}%
        \def\%{D}%
        \def\#{E}%
        \def\\{}%