4

Following the style guidelines from a publisher, I need to tweak two aspects of biblatex' way of printing the incollection entry in the bibliography.

  1. I need to remove the period . that appears between the title of the collection and the list of editors, which should start with the word ed. with a lowercase e (I personally find this very odd, but who am I to disagree).

  2. The page sequence should directly precede the publisher's address, and the page sequence should be preceded be a comma.

The entry should in other words look like this:

Flemming, Edward (2004). "Contrast and perceptual distinctiveness". Phonetically based phonology ed. by Bruce Hayes, Robert Kirchner, and Donca Steriade, 232-276. Cambridge: Cambridge University Press.

\documentclass{article}
\usepackage[style=authoryear]{biblatex}
\renewbibmacro{in:}{}
\DeclareFieldFormat[article,incollection]{pages}{#1}
\begin{filecontents}{\jobname.bib}
@INCOLLECTION{flemming2004,
    AUTHOR = "Edward Flemming",
    BOOKTITLE = "Phonetically based phonology",
    EDITOR = "Bruce Hayes and Robert Kirchner and Donca Steriade",
    TITLE = "Contrast and perceptual distinctiveness",
    YEAR = "2004",
    LOCATION = "Cambridge",
    PAGES = "232--276",
    PUBLISHER = "Cambridge University Press"}
\end{filecontents}
\addbibresource{\jobname.bib}
\begin{document}
\nocite{flemming2004}
\printbibliography
\end{document}

enter image description here

1 Answer 1

5

This can be achieved quite easily with a little help of the wonderful xpatch package and its \xpatchbibdriver command.

We use xpatch to suppress the punctuation before the editors. Then we move the page to right after the series+number macro (which gives the appropriate position for your example, I'm not sure about others, so if you are not satisfied with the position, leave a comment below.): first we remove the macro from it's old position and then we insert it at the new one.

\xpatchbibdriver{incollection}
  {\usebibmacro{byeditor+others}}
  {\nopunct\usebibmacro{byeditor+others}}
  {}{\typeout{failed to patch bibmacro incollection to remove punctuation before byeditors}}

\xpatchbibdriver{incollection}
  {\newunit\newblock
   \usebibmacro{chapter+pages}}
  {}
  {}{\typeout{failed to patch bibmacro incollection to remove page macro}}

\xpatchbibdriver{incollection}
  {\usebibmacro{series+number}}
  {\usebibmacro{series+number}
   \newunit\newblock
   \usebibmacro{chapter+pages}}
  {}{\typeout{failed to patch bibmacro incollection to re-add page macro}}

The MWE

\documentclass{article}
\usepackage[style=authoryear]{biblatex}
\usepackage{xpatch}
\renewbibmacro{in:}{}
\DeclareFieldFormat[article,incollection]{pages}{#1}
\begin{filecontents}{\jobname.bib}
@INCOLLECTION{flemming2004,
    AUTHOR = "Edward Flemming",
    BOOKTITLE = "Phonetically based phonology",
    EDITOR = "Bruce Hayes and Robert Kirchner and Donca Steriade",
    TITLE = "Contrast and perceptual distinctiveness",
    YEAR = "2004",
    LOCATION = "Cambridge",
    PAGES = "232--276",
    PUBLISHER = "Cambridge University Press"}
\end{filecontents}
\addbibresource{\jobname.bib}

\xpatchbibdriver{incollection}
  {\usebibmacro{byeditor+others}}
  {\nopunct\usebibmacro{byeditor+others}}
  {}{\typeout{failed to patch bibmacro incollection to remove punctuation before byeditors}}

\xpatchbibdriver{incollection}
  {\newunit\newblock
   \usebibmacro{chapter+pages}}
  {}
  {}{\typeout{failed to patch bibmacro incollection to remove page macro}}

\xpatchbibdriver{incollection}
  {\usebibmacro{series+number}}
  {\usebibmacro{series+number}
   \newunit\newblock
   \usebibmacro{chapter+pages}}
  {}{\typeout{failed to patch bibmacro incollection to re-add page macro}}

\begin{document}
\nocite{flemming2004}
\printbibliography
\end{document}

yields

enter image description here

1
  • 1
    Great! This answer works great on other "change placement" -type problems, too.
    – Niko Fohr
    Jan 16, 2016 at 19:07

You must log in to answer this question.

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