mirror of
https://github.com/jgm/pandoc.git
synced 2026-09-25 00:45:47 +00:00
LaTeX writer: Use \textquotesingle for ' in inline code.
Otherwise we get curly quotes in the PDF output. Closes #1364.
This commit is contained in:
@@ -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}"
|
||||
]
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user