如果在长标题中使用,Beamer footcite 引用会出现两次

如果在长标题中使用,Beamer footcite 引用会出现两次

我注意到\footcite在 beamer 中的标题中使用命令时,命令的行为很奇怪。在提供的工作示例中,第一个框架\footcite在 itemize 项上有一个,这按预期工作。第二个框架\footcite在表格中的标题中有一个,这同样按预期工作。第三个框架与第二个框架相同,只是它的标题跨越两行(长标题)。当标题被推到下一行时,就像在第三帧中的情况一样,帧的底部会出现两个引用,而本来预计只会出现一次。这两个引文是相同的,但是足迹增加了(在这种情况下,#3 无处不在,但 #4 出现在标题中)。

有没有什么办法可以解决这种奇怪的行为?我真的不想把我的引文缩短到一行。我不确定这是否是一个奇怪的错误,还是我使用\footcite不当。

\documentclass{beamer}

\begin{filecontents*}{mybibfile.bib}
@ARTICLE{authora,
  author = {A. Aaaaa},
  title = {Some article},
  journal = {Journal of Dummy Article Names},
  year = {2012},
  volume = {99},
  pages = {1-5}
}

@ARTICLE{authorb,
  author = {B. Baaaa},
  title = {Another article},
  journal = {Journal of Dummy Article Names},
  year = {2012},
  volume = {99},
  pages = {6-10}
}

@ARTICLE{authorbb,
  author = {B. Baaaa},
  title = {Another dup article},
  journal = {Journal of Dummy Article Names},
  year = {2012},
  volume = {99},
  pages = {6-10}
}
\end{filecontents*}

\usepackage[style=verbose-note,autocite=footnote,abbreviate=true,backend=bibtex]{biblatex} 
\addbibresource{mybibfile.bib}

\usetheme{CambridgeUS}

\title{Beamer}
\author{Anyone}

\begin{document}

\begin{frame}
\frametitle{Introduction}
  \begin{itemize}
    \item ItemA~\footcite{authora} %This works
    \item ItemB
  \end{itemize}
\end{frame}

\begin{frame}
\frametitle{Introduction}
  \scriptsize
  \begin{table}[!tb]
    \centering
    \begin{tabular}{|l|l|}
      \hline 1 & 2 \\
      \hline a & b \\
      \hline
    \end{tabular}
    \caption{This only appears once~\footcite{authorb}.}
  \end{table}
\end{frame}

\begin{frame}
\frametitle{Introduction}
  \scriptsize
  \begin{table}[!tb]
    \centering
    \begin{tabular}{|l|l|}
      \hline 1 & 2 \\
      \hline a & b \\
      \hline
    \end{tabular}
    \caption{This only appears twice because the caption spans two lines blah blah blah blah?~\footcite{authorbb}.}
  \end{table}
\end{frame}

\end{document}

答案1

脚注和脚注引用在标题内部是有问题的;作为一种解决方法,您可以在标题\footnotemark内部\caption和外部使用:\footcitetext{<text>}

\documentclass{beamer}

\begin{filecontents*}{mybibfile.bib}
@ARTICLE{authora,
  author = {A. Aaaaa},
  title = {Some article},
  journal = {Journal of Dummy Article Names},
  year = {2012},
  volume = {99},
  pages = {1-5}
}

@ARTICLE{authorb,
  author = {B. Baaaa},
  title = {Another article},
  journal = {Journal of Dummy Article Names},
  year = {2012},
  volume = {99},
  pages = {6-10}
}

@ARTICLE{authorbb,
  author = {B. Baaaa},
  title = {Another dup article},
  journal = {Journal of Dummy Article Names},
  year = {2012},
  volume = {99},
  pages = {6-10}
}
\end{filecontents*}

\usepackage[style=verbose-note,autocite=footnote,abbreviate=true,backend=bibtex]{biblatex} 
\addbibresource{mybibfile.bib}

\usetheme{CambridgeUS}

\title{Beamer}
\author{Anyone}

\begin{document}

\begin{frame}
\frametitle{Introduction}
  \begin{itemize}
    \item ItemA~\footcite{authora} %This works
    \item ItemB
  \end{itemize}
\end{frame}

\begin{frame}
\frametitle{Introduction}
  \scriptsize
  \begin{table}
    \centering
    \begin{tabular}{|l|l|}
      \hline 1 & 2 \\
      \hline a & b \\
      \hline
    \end{tabular}
    \caption{This only appears once~\footnotemark.}
  \end{table}
\footcitetext{authorb}
\end{frame}

\begin{frame}
\frametitle{Introduction}
  \scriptsize
  \begin{table}
    \centering
    \begin{tabular}{|l|l|}
      \hline 1 & 2 \\
      \hline a & b \\
      \hline
    \end{tabular}
    \caption{This appears once~\footnotemark.}
  \end{table}
\footcitetext{authorbb}
\end{frame}

\end{document}

附注:beamer没有必要使用浮动的位置说明符,因为beamer内部停用了浮动机制。

答案2

如果有人在十年后还在这里,出于某种原因加载caption包似乎只是修复了它?

我不太了解 TeX,也许这会破坏其他东西......

...
\addbibresource{mybibfile.bib}

\usepackage{caption}

\usetheme{CambridgeUS}
...

enotez对我的奇怪的事情也起作用。

相关内容