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
This commit is contained in:
Albert Krewinkel 2021-05-18 22:55:47 +02:00
parent fa23effe25
commit eb3dff148e
No known key found for this signature in database
GPG key ID: 388DC0B21F631124
2 changed files with 13 additions and 2 deletions

View file

@ -894,8 +894,9 @@ inlineToLaTeX (Quoted qt lst) = do
then char '`' <> inner <> char '\''
else char '\x2018' <> inner <> char '\x2019'
where
isQuoted (Quoted _ _) = True
isQuoted _ = False
isQuoted (Span _ (x:_)) = isQuoted x
isQuoted (Quoted _ _) = True
isQuoted _ = False
inlineToLaTeX (Str str) = do
setEmptyLine False
liftM literal $ stringToLaTeX TextString str

10
test/command/6958.md Normal file
View file

@ -0,0 +1,10 @@
Add thin space between single and double quotes.
```
% pandoc -t latex+smart
---
lang: en-GB
---
'["On the Outside"]{}: Constructing Cycling Citizenship.'
^D
`\,{``On the Outside''}: Constructing Cycling Citizenship.'
```