首页 > 解决方案 > 用于备份幻灯片的 Latex 宏

问题描述

我正在努力在 LaTeX beamer 中实现一个功能,这将有助于我准备演讲。我希望以下 MWE 为我创建一个备份幻灯片,将其链接并插入到 之后appendbackupframes,而不是将内容放入脚注:

\documentclass[handout]{beamer}
\newcommand{\additionalinfo}[2]{\beamerbutton{#1}\footnote{#2}}
\newcommand{\appendbackupframes}{}
\begin{document}
\begin{frame}
    \additionalinfo{Beyond the world}{Show me something fancy, like a theorem
    \begin{theorem}
        Hello!
    \end{theorem}}
\end{frame}
\appendbackupframes
\end{document}

换句话说,我希望这段代码以与以下相同的方式编译:

\documentclass{beamer}
\usepackage{hyperref}
\begin{document}
\begin{frame}
    \hyperlink{backup:1}{\beamerbutton{Beyond the world}}\label{backupback:1}
\end{frame}
\begin{frame}{Beyond the world}
\label={backup:1} Show me something fancy, like a theorem
    \begin{theorem}
        Hello!
    \end{theorem}
\hyperlink{backupback:1}{\beamergotobutton{Back}}
\end{frame}
\end{document}

对我来说,我可以在背页上制作的任何解决方案(即,在 XeLaTeX 或 LuaLaTeX 中编译没有问题,但运行外部脚本进行预处理很难)都会有所帮助,因为它可以轻松地与合作者合作。

标签: macroslatexbeamer

解决方案


看来您正在寻找该beamerappendixnote软件包:

\documentclass{beamer}
\usepackage{beamerappendixnote}
\begin{document}
\begin{frame}{Main title}
  Main content \vfill
  \appxnote{Beyond the world}{Show me something fancy, like a theorem
      \begin{theorem}
          Hello!
      \end{theorem}}
\end{frame}
\printappxnotes
\end{document}

在此处输入图像描述


推荐阅读