文章+beamer文章需要一些可以避免的調整

文章+beamer文章需要一些可以避免的調整

beamer的文件規定:

簡報的文章模式是透過指定articlebook或某個其他類別作為文檔類別而不是beamer然後載入套件來建立的beamerarticle

該套件beamerarticle以適合該article模式的方式定義了幾乎所有的投影機命令。

因此,人們可以期望實際上能夠article從最初使用類別完成的現有文件中建立一個版本,beamer用於演示,而只需使用\documentclass{article}\usepackage{beamerarticle}代替\documentclass{beamer}

但不幸的是,情況並非如此,正如以下範例所指出的:

% \documentclass{beamer}
\documentclass{article}\usepackage{beamerarticle}
%
\beamerdefaultoverlayspecification{<+->}
%
\begin{document}
\begin{frame}
  \begin{itemize}
  \item Foo
  \item Bar
  \end{itemize}
\end{frame}
\end{document}

它抱怨\beamerdefaultoverlayspecification未定義。

好的,我只能在presentation模式下使用此命令:

\mode<presentation>{%
  \beamerdefaultoverlayspecification{<+->}%
}

但為什麼這樣的指令沒有被重新定義為\relaxby beamerarticle

答案1

  • beamerarticle需要包beamerbasearticle
  • beamerbasearticle需要包beamerbaserequires
  • beamerbaserequires需要包beamerbaseoverlay
  • beamerbaseoverlay
    • 它更改為\mode<presentation>第 259 行
    • \beamerdefaultoverlayspecification在第 503 行定義
    • 它變回\mode<all>第 843 行

所以我最好的猜測是\beamerdefaultoverlayspecification在文章模式下故意保留未定義。

答案2

作為當前的beamer維護者,我可以推測過去的設計方法並要求您記錄問題請求任何具體更改。

我的建議是,您需要從這樣一個想法開始:沒有一個「真正的」原始檔案會同時包含這兩個內容

\documentclass{beamer}

\usepackage{beamerarticle}

相反,人們會預期兩個存根文件,其中一個的形式如下

\documentclass{beamer}
% Rest of preamble
\begin{document}
\input{document-body}
\end{document}

和第二個

\documentclass{article}
\usepackage{beamerarticle}
% Rest of preamble
\begin{document}
\input{document-body}
\end{document}

理由是,雖然內容可能是相同的,即設定對於這兩種情況來說是相當不同的。

在 的特定情況下\beamerdefaultoverlayspecification,該命令在文章中確實沒有意義(沒有覆蓋),只有在演示文稿中才有意義。因此,不會期望在“真實”前導碼中遇到該命令article,因此無需定義它。

您會發現許多其他beamer不適用於文章的概念也是如此。

相關內容