diff options
author | Jesse Rosenthal <jrosenthal@jhu.edu> | 2016-09-19 16:23:28 -0400 |
---|---|---|
committer | Jesse Rosenthal <jrosenthal@jhu.edu> | 2016-09-19 16:23:28 -0400 |
commit | 5b5f55a710f0d1187cf3c859ff5c422bcb6b9619 (patch) | |
tree | e618e5980f7c6ecb3273124b9052156b9fc27f5a /src/Text | |
parent | fd4831dd03c8797af4bcb180dac775a08b7bf3d6 (diff) | |
download | pandoc-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.hs | 1 |
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 |