2010-07-01 76 views
6

我想創建一個使用LaTeX Beamer的演示文稿,它具有兩種不同類型的幻燈片模板/佈局:一個用於帶有背景圖片的幻燈片和一個用於沒有指定幻燈片的佈局/模板背景圖。LaTeX Beamer中有多個幻燈片模板

有沒有什麼竅門可以用beamer來做到這一點?

+0

你有沒有試過在這裏問:http://tex.stackexchange.com/? – pgb 2010-11-25 22:05:42

回答

1

基本上,我歸結爲\usebackgroundtemplate之前,每\begin{frame}...\end{frame}

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.pdfPresentationWithoutBG.pdf

請注意%&pdftexPresentation.tex確保無論哪個版本的TeX正在運行切換到正確的模式。你可以用pdflatex來運行它。

1

如果你想爲一個幻燈片特定的背景圖像,只是你\begin{frame}前加上一個

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

直接。