脚注在区块中的放置不当

脚注在区块中的放置不当

根据 的主题beamer-document,脚注将放置在块环境内部或外部。它希望结合一种样式,将脚注放置在里面Copenhagen例如带有脚注的块环境 外部块。奇怪的是,我尝试过的选项\setbeamertemplate{blocks}[option]似乎都没有做到这一点 - 无论我是否使用了default, circles, rectangles,inmargin。还有其他方法可以告诉 beamer 脚注应该放在框架的底部吗?

在左侧,您可以看到使用主题的期望结果Berlin,两个脚注都在框架的底部。在右侧,您可以看到使用主题的结果,Copenhagen不幸的是,它将一个脚注放在了块环境中,我希望避免这种情况。

在此处输入图片描述

更新:这是我的新 MWE,其中包含一些代码这里

\documentclass{beamer}
\usepackage[english]{babel}
\usepackage{csquotes}
\usetheme{Copenhagen}
\usepackage[style=numeric-comp, backend=biber, citetracker=true,sorting=none]{biblatex}
\usepackage{hyperref}
\addbibresource{biblatex-examples.bib}
\setbeamertemplate{navigation symbols}{}

\makeatletter
\newtoggle{cbx@togcite}
% Citation number in brackets
\renewcommand\@makefntext[1]{%
  \iftoggle{cbx@togcite}
    {{\normalfont[\@thefnmark]}\enspace #1}
    {{\normalfont\@thefnmark}\enspace #1}%
  \global\togglefalse{cbx@togcite}}

\DeclareCiteCommand{\sfcite}[\cbx@superscript]%
  {\usebibmacro{cite:init}%
   \let\multicitedelim=\supercitedelim
   \iffieldundef{prenote}
     {}
     {\BibliographyWarning{Ignoring prenote argument}}%
   \iffieldundef{postnote}
     {}
     {\BibliographyWarning{Ignoring postnote argument}}}
  {\usebibmacro{citeindex}%
   \usebibmacro{sfcite}%
   \usebibmacro{cite:comp}}
  {}
  {\usebibmacro{cite:dump}}

\newbibmacro*{sfcite}{%
  \ifciteseen
  {}
  {\xappto\cbx@citehook{%
   \global\toggletrue{cbx@togcite}%
   \noexpand\footnotetext[\thefield{labelnumber}]{%
     \fullcite{\thefield{entrykey}}\addperiod}}}}

\newrobustcmd{\cbx@superscript}[1]{%
  \mkbibsuperscript{\mkbibbrackets{#1}}%
  \cbx@citehook%
  \global\let\cbx@citehook=\empty}

\let\cbx@citehook=\empty
\makeatother

\begin{document}
    \begin{frame}{A frame}
\begin{block}{Classic theory}
  As we already know from classic theory\sfcite{reese}, ...
  \begin{itemize}
    \item Fact 1
    \item Fact 2
  \end{itemize}
\end{block}
Now there are some new developments\sfcite{bertram} challenging the classic view.
\end{frame}
\end{document}

更新 24.02。

我发现beamerbaseboxes.sty这个 minipage 似乎负责块环境里面的脚注。

\newcommand\beamerboxesrounded[2][]{%
  [...]
  % line 120
  \setbox\bmb@box=\hbox\bgroup\begin{minipage}[b]{\bmb@width}%
  \vskip2pt%
  \usebeamercolor[fg]{\bmb@lower}%
  \colorlet{beamerstructure}{upper.bg}%
  \colorlet{structure}{upper.bg}%
  %\color{.}%
}

\def\endbeamerboxesrounded{%
  \end{minipage}\egroup%

但是删除小页面并不是一个好的解决方案,因为它会打乱布局。此外,将\end{minipage}\egroup%脚注\newcommand\beamerboxesrounded放在幻灯片底部,但会打乱布局。

答案1

这个问题和这个

您需要\footnotemarkblock环境内部并使用\foocitetext{reese}

\begin{frame}{A frame}
  \begin{block}{Classic theory}
    As we already know from classic theory\footnotemark, ...
    \begin{itemize}
      \item Fact 1
      \item Fact 2
    \end{itemize}
  \end{block}\footcitetext{reese}
Now there are some new developments\footcite{bertram} challenging the classic view.
\end{frame}

根据您的具体风格,可以将这个基本思想融入其中。这里使用etoolbox 包中的钩子\sfcite设置块外的脚注。\AfterEndEnvironment

\documentclass{beamer}
\usepackage[english]{babel}
\usepackage{csquotes}
\usepackage[style=numeric-comp,citetracker=true,sorting=none]{biblatex}
\usepackage{hyperref}

\usetheme{Copenhagen}
\setbeamertemplate{navigation symbols}{}

\DeclareCiteCommand{\footfullcitetext}
  [\let\thefootnote\relax\mkbibfootnotetext]
  {\usebibmacro{prenote}}
  {\mkbibbrackets{\thefield{labelnumber}}%
   \addnbspace%
   \usedriver
     {\DeclareNameAlias{sortname}{default}}
     {\thefield{entrytype}}}
  {\multicitedelim}
  {\usebibmacro{postnote}}

\makeatletter
\let\cbx@citehook=\empty
\newtoggle{cbx@blockcite}

\renewcommand{\@makefntext}[1]{%
  \noindent\normalfont\@thefnmark#1}

\DeclareCiteCommand{\sfcite}[\cbx@superscript]%
  {\usebibmacro{cite:init}%
   \let\multicitedelim=\supercitedelim
   \iffieldundef{prenote}{}{\BibliographyWarning{Ignoring prenote argument}}%
   \iffieldundef{postnote}{}{\BibliographyWarning{Ignoring postnote argument}}}
  {\usebibmacro{citeindex}%
   \ifciteseen
     {\ifnumequal{\value{page}}{\csuse{cbx@page@\thefield{entrykey}}}
       {}
       {\ifnumequal{\value{framenumber}}{\csuse{cbx@frame@\thefield{entrykey}}}
          {\usebibmacro{sfcite}}
          {}}}
     {\usebibmacro{sfcite}}%
   \usebibmacro{cite:comp}}
  {}
  {\usebibmacro{cite:dump}}

\newbibmacro*{sfcite}{%
  \csnumgdef{cbx@page@\thefield{entrykey}}{\value{page}}%
  \csnumgdef{cbx@frame@\thefield{entrykey}}{\value{framenumber}}%
  \xappto\cbx@citehook{%
    \noexpand\footfullcitetext{\thefield{entrykey}}}}

\newrobustcmd*{\cbx@superscript}[1]{%
  \mkbibsuperscript{\mkbibbrackets{#1}}%
  \iftoggle{cbx@blockcite}
    {}
    {\cbx@citehook%
     \global\let\cbx@citehook=\empty}}

\BeforeBeginEnvironment{block}{\global\toggletrue{cbx@blockcite}}

\def\metabox#1{\edef\theprevdepth{\the\prevdepth}\nointerlineskip
  \vbox to0pt{#1\vss}\prevdepth=\theprevdepth}

\AfterEndEnvironment{block}
  {\metabox{%
     \global\togglefalse{cbx@blockcite}%
     \cbx@citehook%
     \global\let\cbx@citehook=\empty}}

\makeatother

\addbibresource{biblatex-examples.bib}
\begin{document}
\begin{frame}[b]{First Frame}
\begin{itemize}[<+->]
  \item First citation.\sfcite{reese} Recurrent citation.\sfcite{reese}
  \item Second citation.\sfcite{springer}
  \item Recurrent citation.\sfcite{springer}
\end{itemize}
\end{frame}
\begin{frame}[b]{Second Frame}
\begin{itemize}[<+->]
  \item Third citation.\sfcite{glashow}
  \item Recurrent citation.\sfcite{reese,springer,glashow}
\end{itemize}
\end{frame}
\begin{frame}{Third frame}
\begin{block}{Block title}
Recurrent citation.\sfcite{reese} New citation.\sfcite{companion}
\end{block}
New citation.\sfcite{bertram}
Recurrent citation.\sfcite{bertram,companion}
\end{frame}
\end{document}

在此处输入图片描述

如果你愿意手动跟踪脚注,最好采用更简单的方法。添加仅有的序言中的内容如下:

\makeatletter
\renewcommand\@makefnmark{\hbox{\@textsuperscript{\normalfont[\@thefnmark]}}}
\renewcommand\@makefntext[1]{{\normalfont[\@thefnmark]}\enspace #1}
\makeatother

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

然后输入你的框架作为

\begin{frame}{A frame}
  \begin{block}{Classic theory}
    As we already know from classic theory\footnotemark\ ...
    \begin{itemize}
      \item Fact 1
      \item Fact 2
    \end{itemize}
  \end{block}\footfullcitetext{reese}

Now there are some new developments\footfullcite{bertram} challenging the classic view. 
\end{frame}

相关内容