我很高兴使用 Paul Stanley 找到的解决方案来解决我去年提出的问题: https://tex.stackexchange.com/a/172777/50288
但是,有一个细节困扰着我,我不知道该如何解决。citepages
在这种情况下,verbose-trad2 中的选项似乎没有任何效果。无论我选择 哪种选项,我都会得到:
“in: Holzwege. Op. cit., pp. 75–113, p. 90。”理想的解决方案是隐藏“pp. 75–113”。citepages
工作示例(抱歉,很长):
\documentclass{memoir}
\usepackage[T1]{fontenc}
\makeatletter
%% Biblatex %%
\usepackage[style=verbose-trad2,%
strict,%
citepages=suppress,%
related=true,%
backend=biber]%
{biblatex}%
\newbibmacro*{cite:seen:related}{%
{\xifinlistcs{\thefield{crossref}}{blx@bsee@\the\c@refsection}
{}
{\listcsxadd{blx@bsee@\the\c@refsection}{\thefield{crossref}}}}}
\newcommand{\ifrelatedunseen}[2]{%
\xifinlistcs{\thefield{crossref}}{blx@bsee@\the\c@refsection}
{#2}
{#1}}
\renewbibmacro*{cite}{%
\usebibmacro{cite:citepages}%
\global\togglefalse{cbx:fullcite}%
\global\togglefalse{cbx:loccit}%
\bibhypertarget{cite\the\value{instcount}}{%
\ifciteseen
{\iffieldundef{shorthand}
{\ifciteibid
{\usebibmacro{cite:ibid}}
{\ifthenelse{\ifciteidem\AND\NOT\boolean{cbx:noidem}}
{\usebibmacro{cite:idem}}
{\usebibmacro{cite:name}}%
\usebibmacro{cite:title}}%
\usebibmacro{cite:save}}
{\usebibmacro{cite:shorthand}}}
{\ifboolexpr {
test {\iffieldundef{crossref}}
or not ( test {\ifentrytype{inbook}}
or test {\ifentrytype{incollection}} ) }
{\usebibmacro{cite:full}%
\usebibmacro{cite:save}}
{\ifrelatedunseen
{\usebibmacro{cite:seen:related}%
\usebibmacro{cite:full}%
\usebibmacro{cite:save}}
{\usebibmacro{related:info}}}}}}
\newbibmacro*{related:info}{%
\usedriver{}{inbook:rel}}
\DeclareBibliographyDriver{inbook:rel}{%
\usebibmacro{bibindex}%
\usebibmacro{begentry}%
\usebibmacro{author/translator+others}%
\setunit{\labelnamepunct}\newblock
\usebibmacro{title}%
\newunit
\printlist{language}%
\newunit\newblock
\usebibmacro{byauthor}%
\newunit\newblock
\usebibmacro{in:}%
\usebibmacro{maintitle+booktitle}%
\newunit%
\bibstring{opcit}%
\newunit\newblock
\usebibmacro{chapter+pages}%
\newunit\newblock
\setunit{\bibpagerefpunct}\newblock
\usebibmacro{pageref}%
\newunit\newblock
\iftoggle{bbx:related}
{\usebibmacro{related:init}%
\usebibmacro{related}}
{}%
\usebibmacro{finentry}}
\usepackage{filecontents}
\begin{filecontents}{\jobname.bib}
@Book{MH_Holzwege,
keywords = {MH,D},
author = {Martin Heidegger},
title = {Holzwege},
publisher = {Vittorio Klostermann},
address = {Frankfurt a. M.},
year = 2003,
series = {Gesamtausgabe},
number = 5,
edition = {8},
addendum = {\autocap{p}remi\`{e}re publication: 1950},
related = {MH_Kunstwerk,MH_Weltbild},
relatedtype = {bookchapters},
relatedstring = {textes :}}
@InBook{MH_Kunstwerk,
keywords = {MH,D},
author = {Martin Heidegger},
title = {Der Ursprung des Kunstwerkes},
pages = {1--74},
crossref = {MH_Holzwege}
}
@InBook{MH_Weltbild,
keywords = {MH,D},
author = {Martin Heidegger},
title = {Die Zeit des Weltbildes},
pages = {75--113},
crossref = {MH_Holzwege}
}
\end{filecontents}
\addbibresource{\jobname.bib}
\makeatother
\begin{document}
\title{Titre}
\author{A. Teur}
\maketitle
Texte\footcite{MH_Kunstwerk}
Plus\footcite[90]{MH_Weltbild}
\end{document}
在第一个引用中,“pp. 1-74”确实被抑制了。如何citepages
在第二个案例中恢复影响?
答案1
幸运的是,这里的答案只需要一行。由于宏的核心是“fullcite”,因此在选项related:info
方面也需要“fullcite”处理citepages
\newbibmacro*{related:info}{%
\usebibmacro{cite:full:citepages}%
\usedriver{}{inbook:rel}}
pages
这将根据选项来处理字段citepages
。
平均能量损失
\documentclass{memoir}
\usepackage[T1]{fontenc}
\makeatletter
%% Biblatex %%
\usepackage[style=verbose-trad2,%
strict,%
citepages=omit,%
related=true,%
backend=biber]%
{biblatex}%
\newbibmacro*{cite:seen:related}{%
{\xifinlistcs{\thefield{crossref}}{blx@bsee@\the\c@refsection}
{}
{\listcsxadd{blx@bsee@\the\c@refsection}{\thefield{crossref}}}}}
\newcommand{\ifrelatedunseen}[2]{%
\xifinlistcs{\thefield{crossref}}{blx@bsee@\the\c@refsection}
{#2}
{#1}}
\renewbibmacro*{cite}{%
\usebibmacro{cite:citepages}%
\global\togglefalse{cbx:fullcite}%
\global\togglefalse{cbx:loccit}%
\bibhypertarget{cite\the\value{instcount}}{%
\ifciteseen
{\iffieldundef{shorthand}
{\ifciteibid
{\usebibmacro{cite:ibid}}
{\ifthenelse{\ifciteidem\AND\NOT\boolean{cbx:noidem}}
{\usebibmacro{cite:idem}}
{\usebibmacro{cite:name}}%
\usebibmacro{cite:title}}%
\usebibmacro{cite:save}}
{\usebibmacro{cite:shorthand}}}
{\ifboolexpr {
test {\iffieldundef{crossref}}
or not ( test {\ifentrytype{inbook}}
or test {\ifentrytype{incollection}} ) }
{\usebibmacro{cite:full}%
\usebibmacro{cite:save}}
{\ifrelatedunseen
{\usebibmacro{cite:seen:related}%
\usebibmacro{cite:full}%
\usebibmacro{cite:save}}
{\usebibmacro{related:info}}}}}}
\newbibmacro*{related:info}{%
\usebibmacro{cite:full:citepages}\usedriver{}{inbook:rel}}
\DeclareBibliographyDriver{inbook:rel}{%
\usebibmacro{bibindex}%
\usebibmacro{begentry}%
\usebibmacro{author/translator+others}%
\setunit{\labelnamepunct}\newblock
\usebibmacro{title}%
\newunit
\printlist{language}%
\newunit\newblock
\usebibmacro{byauthor}%
\newunit\newblock
\usebibmacro{in:}%
\usebibmacro{maintitle+booktitle}%
\newunit%
\bibstring{opcit}%
\newunit\newblock
\usebibmacro{chapter+pages}%
\newunit\newblock
\setunit{\bibpagerefpunct}\newblock
\usebibmacro{pageref}%
\newunit\newblock
\iftoggle{bbx:related}
{\usebibmacro{related:init}%
\usebibmacro{related}}
{}%
\usebibmacro{finentry}}
\usepackage{filecontents}
\begin{filecontents}{\jobname.bib}
@Book{MH_Holzwege,
keywords = {MH,D},
author = {Martin Heidegger},
title = {Holzwege},
publisher = {Vittorio Klostermann},
address = {Frankfurt a. M.},
year = 2003,
series = {Gesamtausgabe},
number = 5,
edition = {8},
addendum = {\autocap{p}remi\`{e}re publication: 1950},
related = {MH_Kunstwerk,MH_Weltbild},
relatedtype = {bookchapters},
relatedstring = {textes :}}
@InBook{MH_Kunstwerk,
keywords = {MH,D},
author = {Martin Heidegger},
title = {Der Ursprung des Kunstwerkes},
pages = {1--74},
crossref = {MH_Holzwege}
}
@InBook{MH_Weltbild,
keywords = {MH,D},
author = {Martin Heidegger},
title = {Die Zeit des Weltbildes},
pages = {75--113},
crossref = {MH_Holzwege}
}
\end{filecontents}
\addbibresource{\jobname.bib}
\makeatother
\begin{document}
\title{Titre}
\author{A. Teur}
\maketitle
Texte\footcite{MH_Kunstwerk}
Plus\footcite[90]{MH_Weltbild}.
\end{document}