0

Currently, my document only uses a section's short title and looks like following

enter image description here

I would like to have it, however, like following

enter image description here

My doument declaration

\documentclass[11pt]{beamer}

\usetheme[progressbar=frametitle]{metropolis} \newcommand{\themename}{\textbf{\textsc{metropolis}}\xspace}

%########################################################### % Presenter's mode notes %########################################################### \usepackage{pgfpages} \setbeamertemplate{note page}[plain] \setbeameroption{show notes on second screen=right}

%########################################################### % https://tex.stackexchange.com/questions/364904/adding-section-indicator-to-metropolis-theme %########################################################### \makeatletter \setbeamertemplate{headline}{% \begin{beamercolorbox}[colsep=1.5pt]{upper separation line head} \end{beamercolorbox} \begin{beamercolorbox}{section in head/foot} \vskip2pt\insertnavigation{\paperwidth}\vskip2pt \end{beamercolorbox}% \begin{beamercolorbox}[colsep=1.5pt]{lower separation line head} \end{beamercolorbox} } \makeatother \setbeamercolor{section in head/foot}{fg=normal text.bg, bg=structure.fg}

\begin{document} \section[Short text 1]{Long text 1} \begin{frame}{Frame 1} \end{frame}

\section[Short text 2]{Long text 2} \begin{frame}{Frame 2} \end{frame} \end{document}

What can I do? Thank in advance.

1 Answers1

2

The metropolis theme has different options for the section page template. Unfortunately, none of them use the full section title if the short version is available.

It looks like you're using the "progressbar" option for the section page. You can find the template in beamerinnerthememetropolis.sty, and create a modified template that uses \insertsection in place of \insertsectionhead.

In your preamble, you might put something like:

\makeatletter
\defbeamertemplate{section page}{myprogressbar}{
  \centering
  \begin{minipage}{22em}
    \raggedright
    \usebeamercolor[fg]{section title}
    \usebeamerfont{section title}
    \insertsection\\[-1ex]
    \usebeamertemplate*{progress bar in section page}
    \par
    \ifx\insertsubsection\@empty\else%
      \usebeamercolor[fg]{subsection title}%
      \usebeamerfont{subsection title}%
      \insertsubsection
    \fi
  \end{minipage}
  \par
  \vspace{\baselineskip}
}
\makeatother

Then after \begin{document}, put in:

\setbeamertemplate{section page}[myprogressbar]

That shouldn't affect the headers/footers, so it should still be the short title there if that's what you prefer.

long name section page in metropolis theme

frabjous
  • 41,473