The commands \sectionpage
and \subsectionpage
generate an introductory frame for your sections and subsections. The format of these frames is given by the templates section page
and subsection page
. You will need to redefine those, if you don't like their defaults.
The following example should tell you what you need to know, perhaps more. I took the liberty to use the Greek language (instead of French) in the example, mainly because the words "section" and "subsection" translate the same in French. A few things to notice:
\AtBeginSection
and \AtBeginSubsection
are used in the beginning, to automatically call \sectionpage
and \subsectionpage
whenever a section or subsection is defined.
- Translations of "Section" and "Subsection" to Greek are provided.
- Two custom editions of the templates for section and subsection pages are defined. They are both given the code name
mine
but they are not used by default. Both templates omit the numbering and replace it with whatever is provided in their (optional) argument.
\selectlanguage
is used and the section/subsection frames are automatically generated in the right language.
- Using
\setbeamertemplate
with the option mine
, you can switch to the custom slides. Notice how you can pass the optional argument, which is displayed above the section/subsection title.
Here's the beamer code:
\documentclass[12pt]{beamer}
\usepackage[english,greek]{babel}
\AtBeginSection{\frame{\sectionpage}}
\AtBeginSubsection{\frame{\subsectionpage}}
\newtranslation[to=greek]{Section}{En'othta}
\newtranslation[to=greek]{Subsection}{Upoen'othta}
\defbeamertemplate{section page}{mine}[1][]{%
\begin{centering}
{\usebeamerfont{section name}\usebeamercolor[fg]{section name}#1}
\vskip1em\par
\begin{beamercolorbox}[sep=12pt,center]{part title}
\usebeamerfont{section title}\insertsection\par
\end{beamercolorbox}
\end{centering}
}
\defbeamertemplate{subsection page}{mine}[1][]{%
\begin{centering}
{\usebeamerfont{subsection name}\usebeamercolor[fg]{subsection name}#1}
\vskip1em\par
\begin{beamercolorbox}[sep=8pt,center,#1]{part title}
\usebeamerfont{subsection title}\insertsubsection\par
\end{beamercolorbox}
\end{centering}
}
\begin{document}
\selectlanguage{english}
\section{First}
\begin{frame}
This frame is in the first section.
\end{frame}
\selectlanguage{greek}
\section{De'uterh}
\subsection{M'esa sth de'uterh}
\begin{frame}
Aut'h h diaf'aneia e'inai sth de'uterh upoen'othta.
\end{frame}
\setbeamertemplate{section page}[mine]
\setbeamertemplate{subsection page}[mine]
\selectlanguage{english}
\section{First again}
\begin{frame}
This frame is again in the first section.
\end{frame}
\setbeamertemplate{section page}[mine][Look out!]
\section{After the first}
\begin{frame}
This frame is in the section that is after the first.
\end{frame}
\setbeamertemplate{section page}[mine]
\setbeamertemplate{subsection page}[mine][Prosoq'h!]
\selectlanguage{greek}
\section{De'uterh p'ali}
\subsection{M'esa sth de'uterh p'ali}
\begin{frame}
Aut'h h diaf'aneia p'ali e'inai sth de'uterh upoen'othta.
\end{frame}
\end{document}
The slides from left to right and top to bottom --- by right-clicking the image and opening in a new tab you can even make it readable. :-)
