LaTeX writer: Use \textquotesingle
for '
in inline code.
Otherwise we get curly quotes in the PDF output. Closes #1364.
This commit is contained in:
parent
e03ed7377c
commit
87ab01637e
2 changed files with 3 additions and 0 deletions
|
@ -220,6 +220,7 @@ stringToLaTeX ctx (x:xs) = do
|
|||
'>' -> "\\textgreater{}" ++ rest
|
||||
'[' -> "{[}" ++ rest -- to avoid interpretation as
|
||||
']' -> "{]}" ++ rest -- optional arguments
|
||||
'\'' | ctx == CodeString -> "\\textquotesingle{}" ++ rest
|
||||
'\160' -> "~" ++ rest
|
||||
'\x2026' -> "\\ldots{}" ++ rest
|
||||
'\x2018' | ligatures -> "`" ++ rest
|
||||
|
|
|
@ -63,5 +63,7 @@ tests = [ testGroup "code blocks"
|
|||
strikeout (code "foo" <> space
|
||||
<> str "bar") =?>
|
||||
"\\sout{\\texttt{foo} bar}"
|
||||
, "single quotes" =:
|
||||
code "dog's" =?> "\\texttt{dog\\textquotesingle{}s}"
|
||||
]
|
||||
]
|
||||
|
|
Loading…
Add table
Reference in a new issue