I'm looking to change the order of the fields in biblatex
for @inproceedings
and @incollection
so that the pages
field comes before the publisher
and address
fields. This ordering for book chapters and proceedings is a requirement for various Linguistics journals, and this is an example of how it should look (taken from Isogloss):
Baker, Mark C. 2008. The macroparameter in a microparametric world.
In T. Biberauer (ed.), The limits of syntactic variation, 351-373.
Amsterdam: John Benjamins.
The booktitle
field would be followed by a comma, and then 'pages'.
Here is a minimal example:
\documentclass[12pt, twoside]{article}
\usepackage[style=authoryear-comp]{biblatex}
\usepackage{filecontents}
\begin{filecontents}{\jobname.bib}
@incollection{baker2008,
AUTHOR = "Mark C. Baker",
BOOKTITLE = "The limits of syntactic variation",
EDITOR = "T. Biberauer",
TITLE = "The macroparameter in a microparametric world",
YEAR = "2008",
LOCATION = "Amsterdam",
PAGES = "351--373",
PUBLISHER = "John Benjamins"}
\end{filecontents}
\addbibresource{\jobname.bib}
\begin{document}
\nocite{*}
\printbibliography
\end{document}
Biblatex on the authoryear style produces this with 'pages' at the end:
I know that there are various other problems with this output, but I have managed to find fixes for them elsewhere and to include them all here would be too much. I just need the ordering change. I've seen that it can be done through xpatch
, but these kinds of edits are still beyond me. Would anyone know how to do it?
Best Answer
Generally speaking, it is not so easy to move around fields in
biblatex
output. See for example the discussion in How to swap bibliography fields in biblatex-philosophy?. It can be easy when the relevant fields are both called in the same bibmacro, but if that is not the case, a straightforward solution would often need a significant number of lines of code. Sometimes it is possible to cook something up by re- and slightly abusing other bibmacros.The general idea that we can use here is the same as in Changing part of a style in biblatex: The
editor
s are moved withbiblatex-ext
'sinnamebeforetitle
option (see e.g. Biblatex: formatting editor in incollection and Move names of editors followed by (Ed./Eds.) and a comma before title in biblatex) and thepages
field can be moved by modifying theedition
bibmacro to also printpages
(the\clearfield{pages}
then deletes the field so that the macro that would normally print the pages does not do so again later on).