1

How can I persuade biblatex (style footnote-dw) to use a comma instead of a colon in follow-up citations?

Here is a MWE.

\documentclass{article}
\usepackage[style=footnote-dw]{biblatex}

\begin{filecontents}{mwe.bib}
@BOOK{foo,
  author = {User, Joe},
  title = {Foo},
}
@BOOK{bar,
  author = {User, Joe},
  title = {Bar},
}
\end{filecontents}

\addbibresource{mwe.bib}


\begin{document}
Test\cite[p.~1]{foo}
Test\cite[p.~2]{bar}
\newpage
Test\cite[p.~3]{foo}
Test\cite[p.~4]{bar}

\printbibliography
\end{document}

The citation on page two should start with 'User, Foo and Bar...' instead of the current 'User: Foo and Bar...'.

Right now I use

\AtEveryCitekey{%
  \ifciteseen
    {\renewcommand\citenamepunct{\addcomma\space}}
    {}}

which works, but I'm quite sure that this is not the 'right' solution...

1

footnote-dw has a lot of customisation features, but that can make it a bit harder to modify certain things should you wish for something more complicated.

\nametitledelim defaults to \citenamepunct. footnote-dw defines \labelnamepunct to be \nametitledelim in citations. \labelnamepunct is used in full citations to separate the name and title. In short citations the separator is \nametitledelim. So if we change \citenamepunct we change things for first citations and for follow-ups as well.

We can set \citenamepunct to \addcomma\spcae and reset \labelnamepunct to be a colon in the fullcite macro.

To get idem citations right we need to explicitly modify the value in the punctuation buffer with \ifbool{cbx:idemfull}{\setunit{\addcolon\space}}{}.

\documentclass{article}
\usepackage[style=footnote-dw]{biblatex}
\begin{filecontents}{\jobname.bib}
@BOOK{foo,
  author = {User, Joe},
  title = {Foo},
  location = {BAZ},
}
@BOOK{bar,
  author = {User, Joe},
  title = {Bar},
  location = {BAZ},
}
\end{filecontents}
\addbibresource{\jobname.bib}

\renewcommand\citenamepunct{\addcomma\space}

\renewbibmacro*{cite:full}{%
  \usebibmacro{cite:full:citepages}%
  \usebibmacro{footref}%
  \ifbool{cbx:idemfull}{\setunit{\addcolon\space}}{}%
  \printtext[bibhypertarget]{%
    \usedriver
      {\renewcommand*{\labelnamepunct}{\addcolon\space}%
       \DeclareNameAlias{sortname}{default}}
      {\thefield{entrytype}}%
    \iffieldundef{shorthand}
      {}
      {\ifbool{cbx:citedas}
        {\addspace\usebibmacro{shorthandintro}}
        {}}}}

\begin{document}
Test\cite[1]{foo}
Test\cite[2]{bar}
\newpage
Test\cite[3]{foo}
Test\cite[4]{bar}
\printbibliography
\end{document}

enter image description here

  • Thanks! This works – almost. With this changed definition, a first cite from another document with the same author uses a comma also instead of the expected colon. I've updated the MWE to exhibit this issue. – lemzwerg Jan 13 '18 at 15:38
  • @lemzwerg Ah yes, indeed. Have a look at the edited answer. – moewe Jan 13 '18 at 15:59
  • I've also opened ticket sourceforge.net/p/biblatex-dw/tickets/29 – maybe this gets eventually added to biblatex-dw :-) – lemzwerg Jan 14 '18 at 8:38

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.