2

Similarly to this question, I want to switch the field year and pages but for the @incollection entry, so the field year is always last.

MWE:

\documentclass{article}
\usepackage{filecontents}
\begin{filecontents}{test.bib}
    @incollection{schramm2017,
      title = {Medizintechnische Anwendungen der additiven Fertigung},
      booktitle = {Additive Fertigung von Bauteilen},
      author = {Schramm, Britta and Rupp, Nicola and Risse, Lena and Br\"uggemann, Jan-Peter and Riemer, Andre and Richard, Hans Albert and Kullmer, Gunter},
      editor = {Richard, Hans Albert and Schramm, Britta and Zipsner, Thomas},
      date = {2017},
      pages = {21--40},
      publisher = {{Springer Vieweg}},
      location = {{Wiesbaden}},
      keywords = {3D,Medizin},
      langid = {german}
    }
\end{filecontents}

\usepackage[backend=biber, style=ext-numeric]{biblatex}
\addbibresource{test.bib}

\begin{document}
    \autocite{schramm2017}
    \printbibliography
\end{document}

1 Answer 1

2

With biblatex there is no single recipe to rearrange fields in the bibliography output. Ultimately, the format of the bibliography is determined by the bibliography driver. The driver usually calls several reusable bibmacros that do the actual printing of the fields. If the two fields you want to swap are printed by the same bibmacro, then switching their order round is easily done by redefining that bibmacro. But if the fields are printed by different bibmacros, things can be more complicated: Sometimes it is nicer to just redefine the driver and swap the order of the relevant bibmacros, sometimes it is nicer to redefine the two bibmacros. In any case one always needs to keep in mind that the same bibmacros may be used by different entry types, so changes may affect several types at once.

In the biblatex standard styles and also in biblatex-ext the pages field is printed in a macro called chapter+pages for most entry types (the most notable exception being @article). The year is printed in the bibmacro publisher+location+date (which may become institution+location+date, organization+location+date or just location+date if appropriate).

So one method would be to tell the bibmacro chapter+pages to do nothing and then to modify publisher+location+date (and friends) to print the pages (we do that by copying the original definition of chapter+pages with \letbibmacro before we overwrite it).

\documentclass{article}

\usepackage[backend=biber, style=ext-numeric]{biblatex}

\letbibmacro*{print:chapter+pages}{chapter+pages}
\renewbibmacro*{chapter+pages}{}

\newcommand*{\datedelim}{\newunitpunct}

\renewbibmacro*{pubinstorg+location+date}[1]{%
  \printlist{location}%
  \iflistundef{#1}
    {\setunit*{\locdatedelim}}
    {\setunit*{\locpubdelim}}%
  \printlist{#1}%
  \newunit
  \usebibmacro{print:chapter+pages}%
  \setunit*{\datedelim}%
  \usebibmacro{date}%
  \newunit}

\renewbibmacro*{location+date}{%
  \printlist{location}%
  \newunit
  \usebibmacro{print:chapter+pages}%
  \setunit*{\datedelim}%
  \usebibmacro{date}%
  \newunit}


\begin{filecontents}{\jobname.bib}
@incollection{schramm2017,
  title     = {Medizintechnische Anwendungen der additiven Fertigung},
  booktitle = {Additive Fertigung von Bauteilen},
  author    = {Schramm, Britta and Rupp, Nicola and Risse, Lena
               and Brüggemann, Jan-Peter and Riemer, Andre
               and Richard, Hans Albert and Kullmer, Gunter},
  editor    = {Richard, Hans Albert and Schramm, Britta and Zipsner, Thomas},
  date      = {2017},
  pages     = {21--40},
  publisher = {Springer Vieweg},
  location  = {Wiesbaden},
  keywords  = {3D,Medizin},
  langid    = {german}
}
\end{filecontents}
\addbibresource{\jobname.bib}

\begin{document}
  \autocite{schramm2017}
  \printbibliography
\end{document}

Britta Schramm et al. “Medizintechnische Anwendungen der additiven Fertigung”. In: Additive Fertigung von Bauteilen. Ed. by Hans Albert Richard, Britta Schramm, and Thomas Zipsner. Wiesbaden: Springer Vieweg, pp. 21–40. 2017.

You must log in to answer this question.

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