如果在長標題中使用,Beamer footcite 引文會出現兩次

如果在長標題中使用,Beamer footcite 引文會出現兩次

我注意到該\footcite命令在投影機內的字幕中使用時的奇怪行為。在工作範例中,假設第一幀有一個\footcite逐項項目,這將按預期工作。第二幀\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也為我奇怪的事情工作。

相關內容