文本和脚注的 ibidtracker 不同 - 脚注问题 (Biblatex)

文本和脚注的 ibidtracker 不同 - 脚注问题 (Biblatex)

我需要停用文本中的 ibidtracker 以防止同一作者的第二次引用出现“ibid”。我用找到的“foot”跟踪器解决了这个问题,但现在我遇到了 footcites 命令的问题,因为带有和之后的引用\footcites{A}{B}\footcite{B}导致脚注中出现“ibid” - 如果没有 foot-tracker 命令,脚注没问题,但文本不行。我认为,下面的例子可以更好地展示我的问题。

\begin{filecontents}{lit.bib}
@misc{Book1, author = {Author, A.}, year = {2001}, title = {Alpha},}
@misc{Book2, author = {Buthor, B.}, year = {2002}, title = {Bravo},}
\end{filecontents}

\documentclass{article}

 %own tracker i found on web
\makeatletter
\def\blx@opt@ibidtracker@foot{%
  \let\blx@imc@ifciteibid\blx@ifciteibid@foot
  \let\blx@ibidtracker\blx@ibidtracker@foot
  \let\blx@ibidreset\blx@ibidreset@foot
  \booltrue{citetracker}}
\def\blx@ifciteibid@foot{%
  \ifbool{citetracker}
    {\iftoggle{blx@footnote}
       {\blx@imc@iffieldequals{entrykey}\blx@lastkey@text}
       {\@secondoftwo}}
    {\@secondoftwo}}
\def\blx@ibidtracker@foot{%
  \ifbool{citetracker}
    {\iftoggle{blx@footnote}
       {\global\let\blx@lastkey@text\abx@field@entrykey}
       {\global\let\blx@lastkey@foot\abx@field@entrykey}}
    {}}
\def\blx@ibidreset@foot{%
  \iftoggle{blx@footnote}
    {\global\undef\blx@lastkey@text}}
    {}
\makeatother

\usepackage[bibstyle=authoryear,citestyle=authoryear-icomp,backend=bibtex,ibidtracker=foot]{biblatex}
\bibliography{lit}

\begin{document}

All fine --- Cite one author \cite{Book1} 
and thats it\footcite{Book1}. Now \cite{Book1} again\footcite{Book1}.

Problem --- Here are two authors\footcites{Book2}{Book1} 
and now the problem with cite the last author of the footcite again\footcite{Book1}.
\end{document}

我从以下网址获取的脚步追踪器: 仅在脚注中同上,而不在正文中

这是实际的输出: 正文 页脚

脚注 4 必须是“作者 2001”。

PS 我的第一个问题...

答案1

您似乎想要的是 的跟踪器的 ( con)strict行为biblatex,其中可能产生歧义的“ibid”(尤其是涉及多个引用的那些)被抑制。(参见biblatex)。

您对foot跟踪器的初始定义是基于context跟踪器的,我们现在可以基于它constrict。由于几乎所有命令都与原始命令相同,因此biblatex2.sty我们的重新定义可以非常短

\makeatletter
\def\blx@opt@ibidtracker@foot{%
  \let\blx@imc@ifciteibid\blx@ifciteibid@foot
  \let\blx@ibidtracker\blx@ibidtracker@constrict
  \let\blx@ibidreset\blx@ibidreset@constrict
  \booltrue{citetracker}}

\def\blx@ifciteibid@foot{%
  \ifbool{citetracker}
    {\blx@ifcitesingle
       {\iftoggle{blx@footnote}
          {\blx@ifmpfncheck
             {\blx@imc@iffieldequals{entrykey}\blx@lastkey@foot}
             {\@secondoftwo}}
          {\@secondoftwo}}
       {\@secondoftwo}}
    {\@secondoftwo}}
\makeatother

您可以看到我们重新使用了原始的ibidtrackeribidreset命令并且只做了ifciteibid一点点改动。

平均能量损失

\documentclass{scrbook}
\makeatletter
\def\blx@opt@ibidtracker@foot{%
  \let\blx@imc@ifciteibid\blx@ifciteibid@foot
  \let\blx@ibidtracker\blx@ibidtracker@constrict
  \let\blx@ibidreset\blx@ibidreset@constrict
  \booltrue{citetracker}}

\def\blx@ifciteibid@foot{%
  \ifbool{citetracker}
    {\blx@ifcitesingle
       {\iftoggle{blx@footnote}
          {\blx@ifmpfncheck
             {\blx@imc@iffieldequals{entrykey}\blx@lastkey@foot}
             {\@secondoftwo}}
          {\@secondoftwo}}
       {\@secondoftwo}}
    {\@secondoftwo}}
\makeatother

\usepackage[style=authortitle-icomp,backend=biber,ibidtracker=foot]{biblatex}
\addbibresource{biblatex-examples.bib}

\begin{document}

All fine --- Cite one author \cite{cicero} 
and thats it\footcite{cicero}. Now \cite{cicero} again\footcite{cicero}.

Problem --- Here are two authors\footcites{wilde}{cicero} 
and now the problem with cite the last author of the footcite again\footcite{cicero}.
\end{document}

在此处输入图片描述

相关内容