我可以保留文档中定义的页面作为附录吗?

我可以保留文档中定义的页面作为附录吗?

我有一个简化的幻灯片类,基本上将每张幻灯片创建为文章类文档中的新页面。我想添加将幻灯片定义为“袖珍幻灯片”的功能,这种幻灯片的内容应位于文档中间,但只有在提问时才会显示。因此,我想将幻灯片定义为文档中间,但幻灯片放在最后。有人能给一个包/机制提出建议来“保留”页面以供以后使用吗?

例子:

\documentclass[english,20pt]{puslides}
\begin{document}
\titleslide{Some Title Here}
\onecolumnslide{Introduction Content}
\onecolumnslide{Parenthetical Content}
\onecolumnslide{Conclusions}
\end{document}

输出将按以下顺序呈现幻灯片:

+------------+     +----------+      +-------------+     +---------------+
|            |     |          |      |             |     |               |
|            |     |          |      |             |     |               |
|    Title   +---->+  Intro   +----->+ Conclusions +---->+ Parenthetical |
|            |     |          |      |             |     |               |
|            |     |          |      |             |     |               |
+------------+     +----------+      +-------------+     +---------------+

答案1

在没有实际的幻灯片制作器的情况下,我仅展示基本概念,使用\g@addto@macro将内容附加到现有内容\def,可以在最后调用。

\documentclass{article}
\makeatletter
\def\pocketslides{}
\newcommand\savepocketslide[1]{\g@addto@macro\pocketslides{#1}}
\makeatother
\newcommand\titleslide[1]{TITLE: #1\clearpage}
\newcommand\onecolumnslide[1]{ONECOLUMNSLIDE: #1\clearpage}
\begin{document}
\titleslide{Some Title Here}
\savepocketslide{\onecolumnslide{Parenthetical Content}}
\onecolumnslide{Introduction Content}
\savepocketslide{\onecolumnslide{More Parenthetical Content}}
\onecolumnslide{Conclusions}
\pocketslides
\end{document}

相关内容