I would like to use \section and \subsection and add them into separates slides into my beamer presentation.

Doing :

\AtBeginSection{\frame{\sectionpage}}

Automatically creates the slide with current slide. How could I delete the "Section 1" above it ? Also, I could I set the language in french instead of english? Futhermore, how could I add what I want above the section title like "Partie 1"?

Same for \subsection : the following does't work :

\begin{frame}
\selectlanguage{french}
\subsectionpage
\end{frame}
up vote 8 down vote accepted

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:

  1. \AtBeginSection and \AtBeginSubsection are used in the beginning, to automatically call \sectionpage and \subsectionpage whenever a section or subsection is defined.
  2. Translations of "Section" and "Subsection" to Greek are provided.
  3. 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.
  4. \selectlanguage is used and the section/subsection frames are automatically generated in the right language.
  5. 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. :-)

slides

  • Wow, thanks for this detailled analysis nickie ; in fact : \newtranslation[to=french]{Section}{Sous-section} seems to be enough in my case ! – bela413 Oct 8 '13 at 17:03

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.