7

我想使用 LaTeX beamer 创建一个演示文稿,它有两种不同类型的幻灯片模板/布局:一种用于带有背景图像的幻灯片,另一种用于没有指定背景图像的幻灯片的布局/模板。

使用投影仪有什么技巧吗?

4

4 回答 4

1

基本上我归结为\usebackgroundtemplate在每个\begin{frame}...\end{frame}.

于 2010-12-08T07:29:48.713 回答
1

如果您想要一张幻灯片的特定背景图像,只需放置一个

{\usebackgroundtemplate{\includegraphics[width=\paperwidth]{background.jpg}}

直接在你的\begin{frame}.

于 2013-02-28T12:59:47.437 回答
0

如果我理解正确,问题是如何同时生成两个演示文稿副本。为此,您需要使用一些低级 tex 命令和几个文件。

Presentation.tex你可能有

%&pdftex
\relax
\immediate\write18{pdflatex -synctex=1 PresentationWithBG.tex}
\relax
\immediate\write18{pdflatex -synctex=1 PresentationWithoutBG.tex}
\end

这是您实际上必须在其上运行乳胶的唯一文件,您可以使用pdftex --shell-escape Presentation.tex. 但是您还需要以下内容。

PresentationWithBG.tex(请注意,您实际上并不需要\usebackgroundtemplate在每一帧之前):

\documentclass{beamer}
\setbeamercolor{background canvas}{bg=}
\usebackgroundtemplate{\includegraphics[width=\paperwidth]{<your_background_fig>}}
\input{PresentationContent}

PresentationWithoutBG.tex

\documentclass{beamer}
\input{PresentationContent}

PresentationContent.tex

\begin{document}
[All your actual presentation goes here...]
\end{document}

当你运行时pdftex --shell-escape Presentation.tex,你会得到PresentationWithBG.pdfand PresentationWithoutBG.pdf

请注意,%&pdftexinPresentation.tex确保正在运行的任何版本的 TeX 都切换到正确的模式。您实际上可以使用pdflatex.

于 2012-02-13T04:38:49.750 回答
0

这可以通过新的框架选项轻松完成:

\documentclass{beamer}

\defbeamertemplate{background canvas}{mydefault}{%
  \includegraphics[width=1cm]{example-image-duck}
}
\defbeamertemplate{background canvas}{fullimage}{%
  \includegraphics[width=\paperwidth]{example-image-duck}
}

\BeforeBeginEnvironment{frame}{%
  \setbeamertemplate{background canvas}[mydefault]%
}

\makeatletter
\define@key{beamerframe}{fullimage}[true]{%
  \setbeamertemplate{background canvas}[fullimage]%
}
\makeatother

\begin{document}

\begin{frame}
  left
\end{frame} 

\begin{frame}[fullimage]
  right
\end{frame}

\begin{frame}
  is left again
\end{frame}

\end{document}
于 2019-02-28T10:38:26.463 回答