How to fix kerning of comma/colon after quotes?
Hello, I’m a relative newbie in latex and am trying to reduce the space between closing quotes and colon/comma, but by a general way in the preamble, not by manual \kern
commands.
My document is actually in Portuguese, where it’s common to keep punctuation after the quotes (unlike English). Also, it is written in Markdown and translated into Latex by Pandoc; so it has a lot of \enquote
followed by \autocite
commands, which may be followed by colons/commas. Since I’m using biblatex’s footnote style, these cases are also problematic.
In the next sample, my current situation is in line 1, but want it to look more like lines 2 or 3.
\documentclass{article}
\usepackage[autocite=footnote]{biblatex}
\begin{document}
1) \enquote{something}\autocite{key}, or \enquote{something}.
2) \enquote{something}\kern-.3em,\autocite{key} or \enquote{something}\kern-.3em.
3) \enquote{something\makebox[0pt][l]{,}}\autocite{key} or \enquote{something\makebox[0pt][l]{.}}
\end{document}
Since Pandoc substitutes all quotes in my source file with \enquote
commands, maybe a patch to it could do (but I dunno if it can deal with the interposed \autocite
).
I'm using pdflatex as processor.
Best Answer
In this question it is shown how xetex and luatex can adjust font kerning automatically. I didn't test xetex's method, but this luatex code works like a charm:
But since I want to stick with pdflatex my current solution is to use a perl script. This is my current makefile: