I want to automatically insert the section title with its number in each beamer frame (or in just some of them). How can we achieve this?

  • 1
    \insertsection gives you the title of the current section, \thesection the number – user36296 Nov 20 '15 at 19:41
  • thank you very much! samcarter But how to get this done automatically (if possible ) in each frame ? – Hafid Boukhoulda Nov 20 '15 at 20:34
  • I did it by reading the documentation. Just look through the themes and pick one you like. – cfr Nov 21 '15 at 3:36
  • @BoukhouldaHafid depends on where you want to put the information. It would be helpfull if you would provide a minimal working example – user36296 Nov 21 '15 at 10:44
  • \section{section one} \begin{frame} 1. section one .... .... \end{frame} \section{section two} \begin{frame} 2. section two .... ..... \end{frame} I want this to be done automatically for all the frames – Hafid Boukhoulda Nov 21 '15 at 13:31




\section{section one} 

\section{section two} 


enter image description here


In the Latex beamer document class, the frame title (and subtitle) for a frame are defined in beamerouterthemedefault.

To override the definition, you can copy the definition into your Latex file and enclose it with \makeatletter and \makeatother.

For example, to add the section number before the title, change the following line and add \thesection.~\insertsection:~ before \insertframetitle:


Full Example:



  \advance\@tempdima by\beamer@leftmargin%
  \advance\@tempdima by\beamer@rightmargin%
    \if@tempswa\else\csname beamer@fte#1\endcsname\fi%
    % The following line was modified to insert
    % section number (\thesection)
    % and section title (\insertsection).
    \if@tempswa\else\vskip-.3cm\fi% set inside beamercolorbox... evil here...


\section{Section Title}

\begin{frame}{Frame Title}
Some text.



Latex beamer frame with section number and title

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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