biblatex:避免冗余信息

biblatex:避免冗余信息

我正在探索 biblatex 的巨大可能性......但仍有几个问题我无法解决。

我先从其中之一(编辑!)开始:)

我正在使用“crossref”引用一本书中的几个章节。目前,当引用同一本书的第二章时,有关出版商等的所有信息都会重印。我希望只有第一次引用这本书时才有完整的信息,下一章可以只包含“作者、章节、在:书名,同上。同上。

有东西告诉我这应该是可能的...你知道如何实现这一点吗?

提前致谢,Jos

这是一个小代码:

\documentclass[ngerman,french]{article}
\usepackage[T1]{fontenc}
\usepackage[latin9]{inputenc}

\makeatletter
\usepackage{lmodern}
\usepackage{perpage}
\MakePerPage{footnote}
%% Biblatex %%
\usepackage[language=french,%
autopunct=true,%
  citestyle=verbose-trad2,%
   strict,% 
   citepages=suppress,% 
   idemtracker=true,% 
   loccittracker=true,%
   opcittracker=true,%
  related=false,
      bibstyle=reading,entryhead=false,entrykey=false,annotation=false,abstract=false,library=false,file=false,%
backend=biber]%
{biblatex}%

\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 =   {Einzelausgabe des Bd. 5 der Gesamtausgabe},
  edition =      {8., unver\"{a}nderte Auflage},
  addendum =     {1. Publikation: 1950}}

@InBook{MH_Kunstwerk,
  keywords =     {MH,D},
  author =   {Martin Heidegger},
  title =    {Der Ursprung des Kunstwerkes},
  pages =    {1--74},
  crossref = {MH_Holzwege}
}

@InBook{MH_NietzscheGott,
  keywords =     {MH,D},
  author =   {Martin Heidegger},
  title =    {Nietzsches Wort `{Gott} ist tot'\,},
  pages =    {193--247},
  crossref = {MH_Holzwege}
}

@InBook{MH_Weltbild,
  keywords =     {MH,D},
  author =   {Martin Heidegger},
  title =    {Die Zeit des Weltbildes},
  pages =    {69--104},
  crossref = {MH_Holzwege}

@Book{MH_SZ,
  keywords =     {MH,D},
  author =   {Martin Heidegger},
  title =    {{Sein und Zeit}},
  address =      {T\"{u}bingen},
  publisher =    {Max Niemeyer},
  year =     2001,
  edition =      {18. Auflage},
  addendum =     {1. Publikation: 1927}}
    }

\end{filecontents}
\addbibresource{\jobname.bib}

\makeatother

\usepackage{babel}
\addto\extrasfrench{\providecommand{\og}{\leavevmode\flqq~}\providecommand{\fg}{\ifdim\lastskip>\z@\unskip\fi~\frqq}}

\begin{document}

\title{Titre}


\author{A. Teur}

\maketitle

Texte\footcite[20]{MH_Kunstwerk}.

Plus de texte \footcite{MH_Weltbild}.

Et hop \footcite{MH_SZ}

Une derni\`ere\footcite{MH_NietzscheGott}

\printbibliography[title={Oeuvres de Martin Heidegger},keyword=MH,keyword=D] 

\end{document}

答案1

我认为这是可以做到的,而且不会有太大困难。以下是概念证明:

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

基本上:我们修改它cite,以便它crossrefinbookincollection类型中查找。如果有,则使用(普通)方法查看是否crossref之前引用过,如果已经引用,则调用修改后的宏(反过来调用修订后的驱动程序)。如果之前没有引用crossref过(直接或间接),它会调用一个宏来记录对的引用,crossref就好像它已经被引用一样。

当然,这有点粗糙;“生产”代码需要处理(例如)

  • 简写(以及“op. cit”),也许还有 idem 和 ibid,但我认为没有什么难以克服的困难,尽管 cite 保存机制需要进行修改才能处理“note”类。

  • (也许)incollection类型与inbook(因为可能想要打印编辑者的名字)分开

  • xref领域以及crossref(这是我所用的,因为那是在 MWE 中)(而且xref无论如何我总是发现这种机制相当困难)

但它确实有某些优点:如果引用了“主要作品”,citetracker 会自动将其选中。如果有\citereset,它就会按应有的方式工作(即我们失去了 op.cit。)

\makeatletter ... \makeatother插入到上述 MWE之间的此代码给出以下内容。

输出

相关内容