biblatex icon indicating copy to clipboard operation
biblatex copied to clipboard

Using \mkbibquote in postnote with \uspunctuation

Open dcpurton opened this issue 4 years ago • 1 comments

The following MWE demonstrates an odd quirk when using \mkbibquote in the postnote while \uspunctuation is active.

Is there a better way to get the first citation to output like the second one without extra braces (which are not so intuitive)?

\documentclass{article}
\usepackage[language=american]{biblatex}
\addbibresource{biblatex-examples.bib}
\begin{document}
\cite[\mkbibquote{here}, \mkbibquote{there}]{westfahl:space}

\cite[{\mkbibquote{here},} \mkbibquote{there}]{westfahl:space}
\end{document}

Output

output

dcpurton avatar Nov 21 '20 13:11 dcpurton

Thank you very much for reporting that issue.

It looks like this is caused by \mknormrange.

\documentclass{article}
\usepackage[T1]{fontenc}
\usepackage[language=american]{biblatex}
\addbibresource{biblatex-examples.bib}

% original
% \DeclareFieldFormat{postnote}{\mkpageprefix[pagination][\mknormrange]{#1}}
\DeclareFieldFormat{postnote}{\mkpageprefix[pagination]{#1}}

\begin{document}
\cite[\mkbibquote{here}, \mkbibquote{there}]{westfahl:space}

\cite[{\mkbibquote{here},} \mkbibquote{there}]{westfahl:space}

\cite[\mkbibquote{here}\addcomma\ \mkbibquote{there}]{westfahl:space}
\end{document}

I don't yet fully understand why, but since \mknormrange normalises commas to \bibrangesep I'm assuming something goes wrong there. Things work if you wrap the comma in braces because that hides the comma from the \mknormrange parser.

moewew avatar Nov 22 '20 14:11 moewew