biblatex-ext 内の 2 つの別個の biblatex フィールドを結合する

biblatex-ext 内の 2 つの別個の biblatex フィールドを結合する

incollectionアイテムの年とページを結び付けて、書誌でそれらが 1 つの単位として表示されるようにしたいです。別のケース (articleアイテム内のジャーナル + ページ番号) では、新しい を作成しbibmacro、末尾の関連コマンドを の書誌ドライバに置き換えましたarticle。ただし、 が提供するスタイルを使用するとbiblatex-ext、この戦略をどのように実装すればよいかわかりません。別の質問それが私が使うようになったきっかけですbiblatex-ext、私はこのコードを受け取りました:

\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}

親エントリの短い引用では、編集者の名前を記載した後、年とページを括弧で囲み、コロンとスペースで区切ります。[2017、p.17–46 → (2017: 17–46)] 次のような形式を使用します。

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

のコードを見てbiblatex-ext、moewe からいくつかの指示を受け取ったのですが、相互参照やさまざまなトグルが関係しているため、どこに配置すればよいのかわかりません。誰かヒントをくれませんか?

答え1

のコードを修正して、 のbiblatex-extページ参照がxrefcite引用コマンドの追記に直接印刷されるようにし、 機能を使用するようにすることができます\textcite

まず、関連する bibdrivers からページを印刷する bibmacro を削除する必要があります。次に、フィールドを引用コマンドにcrosscite渡すように bibmacroを変更します。pages

\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}

ボッシュ、ゲルハルト、トルステン・カリナ(2017)。 「労働市場の観点から見たドイツの中堅企業の歴史」 Eicker-Wolf und Truger(2017:111–142)より。

関連情報