git.iko.soy/typeable/pandoc
on master help sign in
LaTeX writer: separate successive quote chars with thin space

Successive quote characters are separated with a thin space to improve readability and to prevent unwanted ligatures. Detection of these quotes sometimes had failed if the second quote was nested in a span element. Closes: #6958

commiteb3dff148e67e84362632e63848d40ba808940f4 authorAlbert Krewinkel <albert@zeitkraut.de> dateTue 18 May 2021, 22:55 (5 years ago) parentfa23eff
2 files changed+13−2
src/Text/Pandoc/Writers/LaTeX.hs+3−2 test/command/6958.md+10
src/Text/Pandoc/Writers/LaTeX.hs+3−2
@@ -894,8 +894,9 @@ inlineToLaTeX (Quoted qt lst) = do
894894 then char '`' <> inner <> char '\''
895895 else char '\x2018' <> inner <> char '\x2019'
896896 where
897− isQuoted (Quoted _ _) = True
898− isQuoted _ = False
897+ isQuoted (Span _ (x:_)) = isQuoted x
898+ isQuoted (Quoted _ _) = True
899+ isQuoted _ = False
899900inlineToLaTeX (Str str) = do
900901 setEmptyLine False
901902 liftM literal $ stringToLaTeX TextString str
test/command/6958.mdnew file+10
@@ -0,0 +1,10 @@
1+Add thin space between single and double quotes.
2+```
3+% pandoc -t latex+smart
4+---
5+lang: en-GB
6+---
7+'["On the Outside"]{}: Constructing Cycling Citizenship.'
8+^D
9+`\,{``On the Outside''}: Constructing Cycling Citizenship.'
10+```