From c7310a545ce08560c0c2cd314603e4d695c2b10c Mon Sep 17 00:00:00 2001 From: Martin Mares Date: Tue, 20 Aug 2019 21:42:07 +0200 Subject: [PATCH] ucw-link: "--" in URLs should not produce a ligature --- ucw-link.tex | 4 ++++ 1 file changed, 4 insertions(+) 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\\{}% -- 2.39.2