12

I have a beamer template for a presentation. In this template, the headline shows the section name and the subsection to which the current slide belongs to. However, even if I have defined a short title as in

\section[Short title]{The very long title that surely is way too long}

the headline always shows the long title.

Here is the code from the style file which shows the section name

    \pgftext[at=\pgfpoint{\beamer@headline@lmargin}{-0.55\beamer@headline@height},left,center]{%
        \begin{beamercolorbox}[dp=0.5ex]{section in head/foot}
            \shadowtextline{\insertsection}
        \end{beamercolorbox}
    }

So my question: Is there any other command for \insertsection in order to show the short title? (I assume no, as googleing it I didn't really find anything). Additionally, does it matter if not all sections have short titles?

5
  • from section 10.2 in beameruserguide.pdf, looks like \inserttocsection is what you are looking for.
    – Ignasi
    Nov 14, 2013 at 15:28
  • This gives me a 'Undefined control sequence. <argument> \inserttocsection'
    – Chris
    Nov 14, 2013 at 15:45
  • Use braces {} for the mandatory (second) argument in the \section command. If this does not help, could you please provide a minimal working example.
    – crixstox
    Nov 14, 2013 at 16:06
  • Sorry, I actually did use curly braces in my code. An MWE would really be just something like \section[1]{Sec1} and then some slides
    – Chris
    Nov 14, 2013 at 16:17
  • A complete minimal example starts with \documentclass and finishes with \end{document}. And it contains a minimum number of packages, command/environment definitions, pages/frames to show your problem. Please, read the link provided by crixstox.
    – Ignasi
    Nov 14, 2013 at 16:35

1 Answer 1

13

Your outer theme should use \insertsectionhead instead of \insertsection:

\documentclass{beamer}
\begin{document}

\section[Short section 1 title]{Long section 1 title}

\begin{frame}
  \frametitle{F1}
  Long title: \insertsection

  Short title: \insertsectionhead
\end{frame}

\section[Short section 2 title]{Long section 2 title}

\begin{frame}
  \frametitle{F2}
  Long title: \insertsection

  Short title: \insertsectionhead
\end{frame}
\end{document}

enter image description here

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .