1

I would like to connect the year and pages of an incollection-item so that in the bibliography they are displayed as a unit. In a different case (journal + page-number in an article-item) I wrote a new bibmacro and replaced the relevant command at the end the bibliography-driver for article. However, using a style provided by biblatex-ext, I’m not sure how to implement this strategy. In another question that led me to use biblatex-ext, I received this code:

\documentclass[ngerman]{article}
\usepackage{babel}
\usepackage{csquotes}

\usepackage[backend=biber, style=ext-authoryear-ibid, citexref=true]{biblatex}

\usepackage{libertinus}

\begin{filecontents}{\jobname.bib}
@collection{EickerWolf2017,
  title    = {Ungleichheit in Deutschland – ein »gehyptes Problem«?},
  editor   = {Eicker-Wolf, Kai and Truger, Achim},
  location = {Marburg},
  year     = {2017},
}
@incollection{Schreiner2017,
  author   = {Schreiner, Patrick},
  title    = {Löhne und Verteilung},
  crossref = {EickerWolf2017},
  pages    = {47--78},
}
@incollection{Bosch2017,
  author   = {Bosch, Gerhard and Kalina, Thorsten},
  title    = {Die deutsche Mittelschicht aus der Arbeitsmarktperspektive},
  crossref = {EickerWolf2017},
  pages    = {111--142},
}
\end{filecontents}
\addbibresource{\jobname.bib}

\begin{document}
\cite{Bosch2017,Schreiner2017}
\printbibliography
\end{document}

For the short-citation of the parent-entry, after giving the editor’s names I would like to place year and pages in parentheses, separated by a colon and space [2017, p.17–46 → (2017: 17–46)] I would use something along these lines:

\newbibmacro*{year+pages}{%
  \space\printtext[parens]{\printfield{year}: \printfield{pages}}%
  \newunit}

After browsing through the code of biblatex-ext and receiving a few pointers from moewe, I just don’t get where I am supposed to place it, as crossreferencing and various toggles are involved. Could somebody give me a hint?

1 Answer 1

1

You can modify the code in biblatex-ext so that the page references for xrefcite are directly printed in the postnote of the citation command and make the feature use \textcite.

First we have to remove the bibmacro that prints the pages from the relevant bibdrivers. Then we modify the crosscite bibmacro so that it passes the pages field on to the citation command.

\documentclass[ngerman]{article}
\usepackage{babel}
\usepackage{csquotes}

\usepackage[backend=biber, style=ext-authoryear-ibid, citexref=true]{biblatex}

\usepackage{libertinus}

\DeclareDelimFormat{postnotedelim}{\addcolon\space}
\DeclareFieldFormat{postnote}{\mknormrange{#1}}

\usepackage{xpatch}
\newcommand*{\removechapterpages}[1]{%
  \xpatchbibdriver{#1}
    {\newunit\newblock
     \usebibmacro{chapter+pages}}
    {}
    {}{}}
\removechapterpages{inbook}
\removechapterpages{incollection}
\removechapterpages{inproceedings}

\renewbibmacro*{crosscite}[1]{%
  \iftoggle{bbx:citexref}
    {\iffieldundef{crossref}
       {\iffieldundef{xref}
          {\usebibmacro{#1}%
           \newunit\newblock
           \usebibmacro{chapter+pages}}
          {\usebibmacro{xrefcitewithpages}{xref}}}
       {\usebibmacro{xrefcitewithpages}{crossref}}}
    {\usebibmacro{#1}%
     \newunit\newblock
     \usebibmacro{chapter+pages}}}

\makeatletter
\newbibmacro{xrefcitewithpages}[1]{%
  \printtext{%
    \iffieldundef{pages}
      {\bbx@xrefcite{\thefield{#1}}}
      {\expandafter\bbx@xrefcite\expandafter[\abx@field@pages]{\thefield{#1}}}}%
}

\renewcommand*{\bbx@xrefcite}{%
  \AtNextCite{%
    \boolfalse{citetracker}%
    \boolfalse{pagetracker}%
    \boolfalse{backtracker}}%
  \textcite}
\makeatother

\begin{filecontents}{\jobname.bib}
@collection{EickerWolf2017,
  title    = {Ungleichheit in Deutschland – ein »gehyptes Problem«?},
  editor   = {Eicker-Wolf, Kai and Truger, Achim},
  location = {Marburg},
  year     = {2017},
}
@incollection{Schreiner2017,
  author   = {Schreiner, Patrick},
  title    = {Löhne und Verteilung},
  crossref = {EickerWolf2017},
  pages    = {47--78},
}
@incollection{Bosch2017,
  author   = {Bosch, Gerhard and Kalina, Thorsten},
  title    = {Die deutsche Mittelschicht aus der Arbeitsmarktperspektive},
  crossref = {EickerWolf2017},
  pages    = {111--142},
}
\end{filecontents}
\addbibresource{\jobname.bib}

\begin{document}
\cite{Bosch2017,Schreiner2017}
\printbibliography
\end{document}

Bosch, Gerhard und Thorsten Kalina (2017). ”Die deutsche Mittelschicht aus der Arbeitsmarktperspektive“. In: Eicker-Wolf und Truger (2017: 111–142).

You must log in to answer this question.

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