我在 Beamer 簡報中看到了一個漂亮的目錄。有一些公式、圖片、圖表位於整個框架的陰影背景中。知道如何做到這一點嗎?
答案1
您可以使用background
模板;背景是可以包含在常用命令中的圖像\includegraphics
;\node
透過將影像放入 a 中來控制不透明度TikZ
;在目錄之後,再次重新定義模板以抑制圖像:
\documentclass{beamer}
\usetheme{Boadilla}
\usepackage{tikz}
\begin{document}
\setbeamertemplate{background}{%
\tikz\node[opacity=0.3] at (current page.center) {\includegraphics[height=\paperheight]{ctanlion}};}
\begin{frame}
\frametitle{Outline}
\tableofcontents
\end{frame}
\setbeamertemplate{background}{}
\section{Test Section One}
\begin{frame}
Contents of section one
\end{frame}
\section{Test Section Two}
\begin{frame}
Contents of section two
\end{frame}
\section{Test Section Three}
\begin{frame}
Contents of section three
\end{frame}
\end{document}
CTAN 獅子由 Duane Bibby 繪製。
答案2
\documentclass{beamer}
\usepackage{filecontents}
\begin{filecontents*}{background.tex}
\documentclass[pstricks,border=0pt]{standalone}
\usepackage{pst-plot}
\begin{document}
\begin{pspicture}(-\psPi,-2)(\psPi,2)
\psplot[algebraic,plotpoints=1500]{-\psPi}{\psPi}{sin(15*x)*cos(13*x)+cos(5*x)}
\end{pspicture}
\end{document}
\end{filecontents*}
\usepackage{graphicx}
\AtBeginDocument
{
\immediate\write18{latex background}
\immediate\write18{dvips background}
\immediate\write18{ps2pdf background.ps}
}
\begin{document}
\bgroup
\usebackgroundtemplate{\includegraphics[width=\paperwidth]{background}}
\begin{frame}[t]{Table of Contents}
\tableofcontents
\end{frame}
\egroup
\section{Introduction}
\begin{frame}[t]{Who am I?}
I am a Garbage Collector.
\end{frame}
\section{At a glance}
\begin{frame}[t]{What is your hobby?}
Coding!
\end{frame}
\end{document}
編輯:使用 編譯程式碼pdflatex --shell-escape filename
。