aboutsummaryrefslogtreecommitdiff
path: root/data
diff options
context:
space:
mode:
authorAlbert Krewinkel <albert@zeitkraut.de>2021-05-16 21:33:32 +0200
committerGitHub <noreply@github.com>2021-05-16 12:33:32 -0700
commitd92622ba3cae5ced69a256472d367a53fc5878a1 (patch)
tree47c5ee2f2700ac4e5a45e797fe05f536fb07af00 /data
parent5a6399d9f62c4306fa073ae1311675158dd6a203 (diff)
downloadpandoc-d92622ba3cae5ced69a256472d367a53fc5878a1.tar.gz
LaTeX template: define commands for zero width non-joiner character
Closes: #6639 The zero-width non-joiner character is used to avoid ligatures (e.g. in German).
Diffstat (limited to 'data')
-rw-r--r--data/templates/default.latex19
1 files changed, 19 insertions, 0 deletions
diff --git a/data/templates/default.latex b/data/templates/default.latex
index 142fe3e55..04784b971 100644
--- a/data/templates/default.latex
+++ b/data/templates/default.latex
@@ -156,6 +156,25 @@ $if(CJKmainfont)$
\fi
$endif$
\fi
+$if(zero-width-non-joiner)$
+%% Support for zero-width non-joiner characters.
+\makeatletter
+\def\zerowidthnonjoiner{%
+ % Prevent ligatures and adjust kerning, but still support hyphenating.
+ \texorpdfstring{%
+ \textormath{\nobreak\discretionary{-}{}{\kern.03em}%
+ \ifvmode\else\nobreak\hskip\z@skip\fi}{}%
+ }{}%
+}
+\makeatother
+\ifPDFTeX
+ \DeclareUnicodeCharacter{200C}{\zerowidthnonjoiner}
+\else
+ \catcode`^^^^200c=\active
+ \protected\def ^^^^200c{\zerowidthnonjoiner}
+\fi
+%% End of ZWNJ support
+$endif$
$if(beamer)$
$if(theme)$
\usetheme[$for(themeoptions)$$themeoptions$$sep$,$endfor$]{$theme$}