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{}).
This commit is contained in:
parent
02e4b7da89
commit
581fc0130b
2 changed files with 2 additions and 2 deletions
|
@ -276,7 +276,7 @@ stringToLaTeX ctx (x:xs) = do
|
|||
'€' -> "\\euro{}" ++ rest
|
||||
'{' -> "\\{" ++ rest
|
||||
'}' -> "\\}" ++ rest
|
||||
'`' | ctx == CodeString -> "{`}" ++ rest
|
||||
'`' | ctx == CodeString -> "\\textasciigrave{}" ++ rest
|
||||
'$' | not isUrl -> "\\$" ++ rest
|
||||
'%' -> "\\%" ++ rest
|
||||
'&' -> "\\&" ++ rest
|
||||
|
|
|
@ -76,6 +76,6 @@ tests = [ testGroup "code blocks"
|
|||
, "single quotes" =:
|
||||
code "dog's" =?> "\\texttt{dog\\textquotesingle{}s}"
|
||||
, "backtick" =:
|
||||
code "`nu?`" =?> "\\texttt{{`}nu?{`}}"
|
||||
code "`nu?`" =?> "\\texttt{\\textasciigrave{}nu?\\textasciigrave{}}"
|
||||
]
|
||||
]
|
||||
|
|
Loading…
Add table
Reference in a new issue