aboutsummaryrefslogtreecommitdiff
path: root/src/Text
diff options
context:
space:
mode:
authorJesse Rosenthal <jrosenthal@jhu.edu>2016-09-19 16:23:28 -0400
committerJesse Rosenthal <jrosenthal@jhu.edu>2016-09-19 16:23:28 -0400
commit5b5f55a710f0d1187cf3c859ff5c422bcb6b9619 (patch)
treee618e5980f7c6ecb3273124b9052156b9fc27f5a /src/Text
parentfd4831dd03c8797af4bcb180dac775a08b7bf3d6 (diff)
downloadpandoc-5b5f55a710f0d1187cf3c859ff5c422bcb6b9619.tar.gz
LaTeX writer: enclose backtick in `{}` in verbatim
We don't want ligatures like ` ?` ` (which produces `¿`) inside `\texttt{}` environments, so we enclose the backtick in braces. This fixes #3121
Diffstat (limited to 'src/Text')
-rw-r--r--src/Text/Pandoc/Writers/LaTeX.hs1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/Text/Pandoc/Writers/LaTeX.hs b/src/Text/Pandoc/Writers/LaTeX.hs
index 73cd5a599..600685427 100644
--- a/src/Text/Pandoc/Writers/LaTeX.hs
+++ b/src/Text/Pandoc/Writers/LaTeX.hs
@@ -276,6 +276,7 @@ stringToLaTeX ctx (x:xs) = do
'€' -> "\\euro{}" ++ rest
'{' -> "\\{" ++ rest
'}' -> "\\}" ++ rest
+ '`' | ctx == CodeString -> "{`}" ++ rest
'$' | not isUrl -> "\\$" ++ rest
'%' -> "\\%" ++ rest
'&' -> "\\&" ++ rest