从表格调用时不显示脚注引用(\notefullcite)

从表格调用时不显示脚注引用(\notefullcite)

因此,我为拨款申请进行了相当繁重的自定义设置,我需要将引用显示为脚注。我已经很好地完成了设置,但当我尝试从表格环境中引用某些内容时,出现了问题。也就是说,引用正确显示在表格中,但参考文献未出现在脚注中。那些数字就这么消失了……

我给出了一个最低限度的工作示例:

\begin{filecontents}{mytestbib.bib}
@article{ref1,
Author = {SoAndSo, One},
Title = {Somearticle 1},
Year = {1993},
}
@article{ref2,
Author = {SoAndSo, Two},
Title = {Somearticle 2},
Year = {1994},
}
\end{filecontents}
\documentclass[a4paper, 11pt]{article}
\usepackage{bibentry}
\usepackage[backend=bibtex, firstinits=true, maxnames=99,bibstyle=numeric-comp, citestyle=custom-numeric-comp]{biblatex}
\addbibresource{mytestbib.bib}
\renewcommand{\thefootnote}{[\arabic{footnote}]}

\begin{document}
\noindent Paper: \notefullcite{ref1}\\
\begin{tabular}{cc}
  Paper: & \notefullcite{ref2}
\end{tabular}

\end{document}

当我编译时,我只得到脚注中出现的第一个参考资料...有什么想法吗?从相关问题中我可以看出,表格中的脚注很乱...我确实发现在找到尊重我所有 bibtex 内容的解决方法时遇到了一些麻烦...

[编辑修订:] \notefullcite 命令定义如下:

\DeclareCiteCommand{\notefullcite}[\mkbibbrackets]% 
  {\usebibmacro{cite:init}%
   \usebibmacro{prenote}}
  {\usebibmacro{citeindex}%
   \usebibmacro{notefullcite}%
   \usebibmacro{cite:comp}}
  {}
  {\usebibmacro{cite:dump}%
   \usebibmacro{postnote}}

\newbibmacro*{notefullcite}{%
  \ifciteseen
    {}
    {\footnotetext[\thefield{labelnumber}]{%
       \usedriver{}{\thefield{entrytype}}.}}}

答案1

这里有一个解决方案,您可以根据所使用的自定义样式进行调整。它基于numeric-comp我认为相似的样式。它定义了一个\footfullcitetext介于\footfullcite和之间的新命令\footcitetext。需要使用通常的技巧来排版脚注,即将其放在环境之外tabular

\begin{filecontents}{mytestbib.bib}
  @article{ref1,
    Author = {SoAndSo, One},
    Title = {Somearticle 1},
    Year = {1993},
  }
  @article{ref2,
    Author = {SoAndSo, Two},
    Title = {Somearticle 2},
    Year = {1994},
  }
\end{filecontents}
\documentclass[a4paper, 11pt]{article}
\usepackage{bibentry}
\usepackage[backend=bibtex, firstinits=true, maxnames=99,bibstyle=numeric-comp, citestyle=numeric-comp]{biblatex}
\addbibresource{mytestbib.bib}
\renewcommand{\thefootnote}{[\arabic{footnote}]}

\DeclareCiteCommand{\footfullcitetext}[\mkbibfootnotetext]
  {\usebibmacro{prenote}}
  {\usedriver
     {\DeclareNameAlias{sortname}{default}}
     {\thefield{entrytype}}}
  {\multicitedelim}
  {\usebibmacro{postnote}}

\begin{document}
\noindent Paper: \footfullcite{ref1}

\noindent\begin{tabular}{cc}
  Paper: & \footnotemark
\end{tabular}
\footfullcitetext{ref2}
\end{document}

脚注引用,包括来自表格的引用

答案2

天哪,我找到了一个超级黑客的解决方法。我所做的就是定义一个新的宏 \hidefullcite,它会产生一个不可见的引用;参考文献将作为脚注出现,但文本中不会出现任何内容。然后我可以引用表格之前的所有内容。在表格中,参考文献看起来是正确的,因为它们指的是已经被引用的内容。例如,

\DeclareCiteCommand{\hidefullcite}
  {\usebibmacro{cite:init}}
  {\usebibmacro{citeindex}
   \usebibmacro{notefullcite}}
  {}
  {}

\newbibmacro*{notefullcite}{
  \ifciteseen
    {}
    {\footnotetext[\thefield{labelnumber}]{
       \usedriver{}{\thefield{entrytype}}.}}}

然后我就打电话

\noindent Paper: \notefullcite{ref1}\\
\hidefullcite{ref2}
\begin{tabular}{cc}
  Paper: & \notefullcite{ref2}
\end{tabular}

一切都很顺利。感谢 cfr 的帮助,你的修复对我的自定义混乱不起作用,但它给了我一点探索的动力。(如果有人知道如何修改 cfr 的修复或类似于自定义引用格式的东西,我仍然有兴趣看到更好的修复。)

相关内容