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
This commit is contained in:
Jesse Rosenthal 2016-09-19 16:23:28 -04:00
parent fd4831dd03
commit 5b5f55a710

View file

@ -276,6 +276,7 @@ stringToLaTeX ctx (x:xs) = do
'€' -> "\\euro{}" ++ rest
'{' -> "\\{" ++ rest
'}' -> "\\}" ++ rest
'`' | ctx == CodeString -> "{`}" ++ rest
'$' | not isUrl -> "\\$" ++ rest
'%' -> "\\%" ++ rest
'&' -> "\\&" ++ rest