我希望每次都显示目录幻灯片\section{}
,同时突出显示特定部分(与在 beamer 中使用一样\AtBeginSection[]{...}
),我希望在右侧显示图像也。
有人能告诉我怎么做吗?这是一个 TeX 文件,可以实现相同的效果,但我手动完成了,而不是使用 \AtBeginSection[]{...}` 命令。因此,我无法让其他部分以通常的 beamer 样式变暗。我希望问题已经解决。
\documentclass[blue,aspectratio=1610]{beamer}
\begin{document}
\section{New section}
\begin{frame}{Table of contents}
\begin{enumerate}
\item New Section
\item \textcolor{gray}{New New Section}
\item \textcolor{gray}{New New New Section}
\end{enumerate}
\vspace{0.3cm}
\hfill \includegraphics[scale=0.1]{pic1.png}
\end{frame}
\begin{frame}{some details about this section}
\end{frame}
\begin{frame}{some more details about this section}
\end{frame}
\section{New New section}
\begin{frame}{Table of contents}
\begin{enumerate}
\item \textcolor{gray}{New Section}
\item New New Section
\item \textcolor{gray}{New New New Section}
\end{enumerate}
\vspace{0.3cm}
\hfill \includegraphics[scale=0.1]{pic2.png}
\end{frame}
\begin{frame}{some details about this section}
\end{frame}
\begin{frame}{some more details about this section}
\end{frame}
\section{New New New section}
\begin{frame}{Table of contents}
\begin{enumerate}
\item \textcolor{gray}{New Section}
\item \textcolor{gray}{New New Section}
\item New New New Section
\end{enumerate}
\vspace{0.3cm}
\hfill \includegraphics[scale=0.3]{pic3.png}
\end{frame}
\begin{frame}{some details about this section}
\end{frame}
\begin{frame}{some more details about this section}
\end{frame}
\end{document}
抱歉字体太小,但希望您能明白我的意思。
答案1
这里,\insertsectionbumber
或者\thesection
很有用:
\documentclass{beamer}
\AtBeginSection[]{
\begin{frame}<beamer>
\begin{columns}
\column{.5\linewidth}
\tableofcontents[currentsection]
\column{.5\linewidth}
\includegraphics{pic\insertsectionnumber}
\end{columns}
\end{frame}
}
\begin{document}
\section{A}
\begin{frame}
\frametitle{A}
\end{frame}
\section{B}
\begin{frame}
\frametitle{B}
\end{frame}
\section{C}
\begin{frame}
\frametitle{C}
\end{frame}
\end{document}
答案2
您可以使用if
语句来控制给定部分的图像的显示。
代码
\documentclass[blue,aspectratio=1610]{beamer}
\usepackage{mwe} % provides images used in this example
\begin{document}
\AtBeginSection[] % Do nothing for \section*
{
\begin{frame}{Table of contents}
\tableofcontents[currentsection]
\hfill
\ifnum \thesection=1
\includegraphics[scale=0.3]{image-a}
\else
\ifnum \thesection=2
\includegraphics[scale=0.3]{image-b}
\else
\ifnum \thesection=3
\includegraphics[scale=0.3]{image-c}
\fi\fi\fi
\end{frame}
}
\section{New section}
\begin{frame}{some details about this section}
\end{frame}
\begin{frame}{some more details about this section}
\end{frame}
\section{New New section}
\begin{frame}{some details about this section}
\end{frame}
\begin{frame}{some more details about this section}
\end{frame}
\section{New New New section}
\begin{frame}{some details about this section}
\end{frame}
\begin{frame}{some more details about this section}
\end{frame}
\end{document}