3

If an article title ends with .) the comma that is supposed to follow isn't there. If there is only a closing parenthesis there is also the comma. See the screenshot below.

How can this be fixed? \DeclarePunctuationPairs{<identifier>}{<characters>} doen't work since parentheses are not allowed for the character part.

MWE:

\documentclass{book}
\usepackage[utf8]{inputenc}
\usepackage[french, english]{babel}
\usepackage[backend=biber,
  bibstyle=ext-authoryear,
  articlein=false,
]{biblatex}
  \addbibresource{TEST-Bib-Sorting.bib}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\renewcommand*{\newunitpunct}{\addcomma\space}

\newbibmacro*{pages}{
  \printfield{pages}%
}

\DeclareFieldFormat[article]{title}{#1}

\DeclareBibliographyDriver{article}{%
  \usebibmacro{begentry}%
  \usebibmacro{author/translator+others}%
  \setunit{\printdelim{nametitledelim}}\newblock
  \usebibmacro{title}%
  \newunit\newblock
  \iftoggle{bbx:articlein}{\usebibmacro{in:}}{}%
  \usebibmacro{journal+issuetitle}%
  \newunit
  \usebibmacro{pages}%
  \newunit\newblock
  \usebibmacro{finentry}}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%


\begin{filecontents}{TEST-Bib-Sorting.bib}
@Article{Meunier:2012,
  author   = {Meunier, L. J.},
  year     = {2012},
  title    = {\foreignlanguage{english}{Ennius, les astres et les théories anciennes de la vision. À propos de \emph{Sol albus} et \emph{radiis icta lux} (v. 84–85 Sk.)}},
  journal  = {RPh},
  volume   = {86},
  pages    = {101–21},
}

@Article{Soubiran:1992,
  author   = {Soubiran, J.},
  year     = {1992},
  title    = {Mythologie et astronomie: la longue nuit de Jupiter et d’Alcmène (Plaute, Amph., 272–276)},
  journal  = {Pallas},
  volume   = {38},
  pages    = {345–58},
}
\end{filecontents}

\begin{document}

\nocite{*}

\printbibliography

\end{document}

enter image description here

1 Answer 1

3

biblatex's punctuation tracker suppresses double punctuation such as .,. In this case you don't really have double punctuation since there is a closing parenthesis in between the two clashing punctuation commands .),. The tracker, however, ignores the parentheses.

For your particular issue there is a simple workaround: biblatex distinguishes abbreviation dots and sentence-ending periods (full stops). Usually . in the input is interpreted as a sentence-ending period, which can not clash with a comma. But an abbreviation dot can be combined with a comma. Hence, it is enough to tell biblatex that in this case the . signifies an abbreviation. This can be done by adding \isdot after the ..

@article{Meunier:2012,
  author   = {Meunier, L. J.},
  year     = {2012},
  title    = {\foreignlanguage{french}{Ennius, les astres et les théories anciennes de la vision.
              À propos de \emph{Sol albus} et \emph{radiis icta lux} (v. 84–85 Sk.\isdot)}},
  journal  = {RPh},
  volume   = {86},
  pages    = {101–21},
}

produces

Meunier, L. J. (2012), Ennius, les astres et les théories anciennes de la vision. À propos de Sol albus et radiis icta lux (v. 84–85 Sk.), RPh 86, pp. 101–21.


It would be possible to add the \isdot automatically in the field format with

 \DeclareFieldFormat[article]{title}{#1\isdot}

Indeed, the standard setting for @article et al. is

\DeclareFieldFormat
  [article,inbook,incollection,inproceedings,patent,thesis,unpublished]
  {title}{\mkbibquote{#1\isdot}}

which does that already. But this means that every . at the end of the title field is interpreted as an abbreviation dot and not as a sentence-ending period.


As mentioned above biblatex's punctuation tracker ignores parentheses characters. You can un-ignore them by adding

\makeatletter
\def\blx@setsfcodes{%
  \let\blx@setsfcodes\relax
  \let\frenchspacing\blx@setfrcodes
  \let\nonfrenchspacing\blx@setencodes
  \ifnum\sfcode`\.>2000
    \blx@setencodes
  \else
    \blx@setfrcodes
  \fi
  \@setquotesfcodes
  \sfcode`\(=\@m
  \sfcode`\)=\@m
  \sfcode`\[=\@m
  \sfcode`\]=\@m
  \sfcode`\<=\@m
  \sfcode`\>=\@m}
\makeatother

to your preamble. That means that the punctuation tracker does not jump over ) and friends any more and instead goes back to seeing no punctuation before and after those characters.

2
  • Thanks for your quick response! I'm impressed that there is usually such a clear and easy solution. Do you happen to know how to fix this globally? I have way more than 2500 entries in my .bib file. Finding all of these cases would be a pain.
    – rsa-krypto
    Apr 11, 2019 at 5:21
  • I will just add your last code snippet to my preamble. That'll do it.
    – rsa-krypto
    Apr 11, 2019 at 5:40

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .