1

I'm trying to customize the bibliography for a presentation. I'm running into trouble with the punctuation after the title. As a MWE, I wrote the following biblatex.cfg file:

\ExecuteBibliographyOptions{giveninits=true, uniquename=false}

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

\DeclareBibliographyDriver{book}{%
    \usebibmacro{bibindex}%
    \usebibmacro{begentry}%
    \usebibmacro{author}%
    \setunit{\labelnamepunct}%
    \usebibmacro{title}%
    \setunit{\addperiod\space}\newblock
    \usebibmacro{publisher+location+date}%
    \setunit{\addperiod\space}\newblock
    \printfield{note}%
    \usebibmacro{finentry}}

\newbibmacro*{volume+chapter+pages}{%
    \printfield{volume}%
    \newunit%
    \printfield{chapter}%
    \setunit{\bibpagespunct}%
    \printfield{pages}}

There should be a period after the title. However, Beamer inserts a comma. Other classes (e.g., scrartcl) do insert a period after the title. Beamer correctly inserts a period between the publisher and the note though.

I tried modifying the bibmacro title, removing all instances of \newunit, to no avail.

Does anyone know what's going on?

1 Answer 1

3

This has to do with how beamer patches some of biblatex's macros to include the colouring.

In beamerbaselocalstructure.sty we find

\AtBeginDocument{%
  \@ifpackageloaded{biblatex}
    {%[...]
     \apptocmd{\abx@macro@title}
       {\ifcsundef{abx@field@title}{}{\midsentence\newunitpunct}%
        \newblock\usebeamercolor[fg]{bibliography entry note}}{}{}}
    {}}

This shows that the title macro is changed to always print a \newunitpunct after the title (not even in a \setunit, the punctuation is printed immediately).

You can fix this by resetting the title macro in \AtBeginDocument to its original form from biblatex.def and adding the colouring macros.

\AtBeginDocument{%
  \renewbibmacro*{title}{%
    \usebeamercolor[fg]{bibliography entry title}%
    \ifboolexpr{
      test {\iffieldundef{title}}
      and
      test {\iffieldundef{subtitle}}
    }
      {}
      {\printtext[title]{%
         \printfield[titlecase]{title}%
         \setunit{\subtitlepunct}%
         \printfield[titlecase]{subtitle}}%
       \newunit}%
    \printfield{titleaddon}}
    \newblock\usebeamercolor[fg]{bibliography entry note}}

You must log in to answer this question.

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