Beamer 框架脚注中的 BibLatex 引用编号错误。如何更正?

Beamer 框架脚注中的 BibLatex 引用编号错误。如何更正?

在这篇 SE 文章中,其中有代码lockstep展示如何在带有列的 Beamer 页面的脚注中放入 BibLatex 引用。

如果一个 Beamer 页面中只有一个引用,它似乎运行良好。

然而,似乎存在两个问题:

(1) 当一页中有多个引用时。脚注中的数字是错误的(脚注外的数字是可以的),如编译后的 Beamer PDF 中的第 2 和第 3 帧所示。具体来说,脚注中的条目具有相同的前导数字。您能帮忙评论如何解决这个问题吗?

(2)当同一引文在不同的 Beamer 页面上被引用时,引文编号会增加。单个引文可以使用相同的编号吗?

非常感谢 !

shell 命令运行

rm MWE1.aux MWE1.bbl MWE1.bcf MWE1.blg MWE1.log MWE1.nav MWE1.out MWE1.pdf MWE1.snm MWE1.toc MWE1.run.xml ; xelatex MWE1.tex && biber MWE1 && xelatex MWE1.tex && xelatex MWE1.tex

根据 的lockstep帖子修改的 MWE1.tex

\documentclass[10pt]{beamer}

\usetheme[width=4em]{PaloAlto}
\usecolortheme{crane}

\addtobeamertemplate{footnote}{\vspace{-6pt}\advance\hsize-0.5cm}{\vspace{6pt}}
\makeatletter
% Alternative A: footnote rule
\renewcommand*{\footnoterule}{\kern -3pt \hrule \@width 2in \kern 8.6pt}
% Alternative B: no footnote rule
% \renewcommand*{\footnoterule}{\kern 6pt}
\makeatother

\usepackage[utf8]{inputenc}
\usepackage[style=verbose,autocite=footnote,citestyle=authortitle]{biblatex}

\usepackage{filecontents}

\begin{filecontents}{\jobname.bib}
@Book{Taflove2000,
    Day = {30},
    Edition = {2},
    Month = {jun},
    Publisher = {Artech House Publishers},
    author = {Taflove, Allen and Hagness, Susan C.},
    title = {Computational Electrodynamics: The Finite-Difference Time-Domain Method},
    year = {2000},
}
@Book{label2,
    Day = {30},
    Edition = {2},
    Month = {jun},
    Publisher = {Artech House Publishers},
    author = {Jordan, Michael and James, LeBron},
    title = {Computational NBA},
    year = {2000},
}
\end{filecontents}

\addbibresource{\jobname.bib}

\begin{document}

\begin{frame}{The FDTD Method}
  \begin{columns}
    \begin{column}{0.4\textwidth}
      \begin{itemize}
      \item Discretization of both space and time by central differences.
      \item Yee Cell 1.\footnotemark 
      \end{itemize}
    \end{column}

    \begin{column}{0.5\textwidth}
      \begin{figure}
      \centering
      \rule{0.9\columnwidth}{2cm}% placeholder for graphic
      \caption{Unit Yee Cell.}
      \end{figure}
    \end{column}
  \end{columns}
\footcitetext{Taflove2000}
\end{frame}

\begin{frame}{The FDTD Method}
  \begin{columns}
    \begin{column}{0.4\textwidth}
      \begin{itemize}
      \item Discretization of both space and time by central differences.\footnotemark 
      \item Yee Cell 1.\footnotemark 
      \end{itemize}
    \end{column}

    \begin{column}{0.5\textwidth}
      \begin{figure}
      \centering
      \rule{0.9\columnwidth}{2cm}% placeholder for graphic
      \caption{Unit Yee Cell.}
      \end{figure}
    \end{column}
  \end{columns}
\footcitetext{Taflove2000}
\footcitetext{label2}
\end{frame}

\begin{frame}{The FDTD Method}
  \begin{columns}
    \begin{column}{0.4\textwidth}
      \begin{itemize}
      \item Discretization of both space and time by central differences.\footnotemark 
      \item Yee Cell 1.\footnotemark 
      \end{itemize}
    \end{column}

    \begin{column}{0.5\textwidth}
      \begin{figure}
      \centering
      \rule{0.9\columnwidth}{2cm}% placeholder for graphic
      \caption{Unit Yee Cell.}
      \end{figure}
    \end{column}
  \end{columns}
\footcitetext{Taflove2000}
\footcitetext{Taflove2000,label2}
\end{frame}

\end{document}

答案1

部分解决方案,仅针对您的第一个问题:

\documentclass[10pt]{beamer}

\usetheme[width=4em]{PaloAlto}
\usecolortheme{crane}

\addtobeamertemplate{footnote}{\vspace{-6pt}\advance\hsize-0.5cm}{\vspace{6pt}}
\makeatletter
% Alternative A: footnote rule
\renewcommand*{\footnoterule}{\kern -3pt \hrule \@width 2in \kern 8.6pt}
% Alternative B: no footnote rule
% \renewcommand*{\footnoterule}{\kern 6pt}
\makeatother

\usepackage[utf8]{inputenc}
\usepackage[style=verbose,autocite=footnote,citestyle=authortitle]{biblatex}

\newcounter{colcites}

\usepackage{filecontents}

\begin{filecontents}{\jobname.bib}
@Book{Taflove2000,
    Day = {30},
    Edition = {2},
    Month = {jun},
    Publisher = {Artech House Publishers},
    author = {Taflove, Allen and Hagness, Susan C.},
    title = {Computational Electrodynamics: The Finite-Difference Time-Domain Method},
    year = {2000},
}
@Book{label2,
    Day = {30},
    Edition = {2},
    Month = {jun},
    Publisher = {Artech House Publishers},
    author = {Jordan, Michael and James, LeBron},
    title = {Computational NBA},
    year = {2000},
}
\end{filecontents}

\addbibresource{\jobname.bib}

\begin{document}

\begin{frame}{The FDTD Method}
  \begin{columns}
    \begin{column}{0.4\textwidth}
      \begin{itemize}
      \item Discretization of both space and time by central differences.
      \item Yee Cell 1.\footnotemark 
      \end{itemize}
    \end{column}

    \begin{column}{0.5\textwidth}
      \begin{figure}
      \centering
      \rule{0.9\columnwidth}{2cm}% placeholder for graphic
      \caption{Unit Yee Cell.}
      \end{figure}
    \end{column}
  \end{columns}
\footcitetext{Taflove2000}
\end{frame}

\begin{frame}{The FDTD Method}
\setcounter{colcites}{0}
  \begin{columns}
    \begin{column}{0.4\textwidth}
      \begin{itemize}
      \item Discretization of both space and time by central differences.\footnotemark\addtocounter{colcites}{1} 
      \item Yee Cell 1.\footnotemark\addtocounter{colcites}{1}  
      \end{itemize}
    \end{column}

    \begin{column}{0.5\textwidth}
      \begin{figure}
      \centering
      \rule{0.9\columnwidth}{2cm}% placeholder for graphic
      \caption{Unit Yee Cell.}
      \end{figure}
    \end{column}
  \end{columns}

\addtocounter{footnote}{-\thecolcites}
\addtocounter{footnote}{1}
\footcitetext[\thefootnote]{Taflove2000}
\addtocounter{footnote}{1}
\footcitetext[\thefootnote]{label2}
\end{frame}

\end{document}

相关内容