git.iko.soy/typeable/pandoc
on master help sign in
LaTeX writer: change braced backtick to \textasciigrave{}

Backticks in verbatim environments are converted to open-single-quotes. This change makes them appear as backticks. This corresponds to how we treat `'' in verbatim environments (with \textquotesingle{}).

commit581fc0130b635123521471236cd7c391f8f260df authorJesse Rosenthal <jrosenthal@jhu.edu> dateTue 20 Sep 2016, 09:44 (10 years ago) parent02e4b7d
2 files changed+2−2
src/Text/Pandoc/Writers/LaTeX.hs+1−1 tests/Tests/Writers/LaTeX.hs+1−1
src/Text/Pandoc/Writers/LaTeX.hs+1−1
@@ -276,7 +276,7 @@ stringToLaTeX ctx (x:xs) = do
276276 '€' -> "\\euro{}" ++ rest
277277 '{' -> "\\{" ++ rest
278278 '}' -> "\\}" ++ rest
279− '`' | ctx == CodeString -> "{`}" ++ rest
279+ '`' | ctx == CodeString -> "\\textasciigrave{}" ++ rest
280280 '$' | not isUrl -> "\\$" ++ rest
281281 '%' -> "\\%" ++ rest
282282 '&' -> "\\&" ++ rest
tests/Tests/Writers/LaTeX.hs+1−1
@@ -76,6 +76,6 @@ tests = [ testGroup "code blocks"
7676 , "single quotes" =:
7777 code "dog's" =?> "\\texttt{dog\\textquotesingle{}s}"
7878 , "backtick" =:
79− code "`nu?`" =?> "\\texttt{{`}nu?{`}}"
79+ code "`nu?`" =?> "\\texttt{\\textasciigrave{}nu?\\textasciigrave{}}"
8080 ]
8181 ]