0

I would like to center only the section titles in the beamer metropolis theme, without changing the other defaults (in particular I would like to keep the progress bar).

I have tried the following, which did not work

\usepackage{sectsty}
\allsectionsfont{\centering}

and the following which worked for the normal titlepage but not for section titles (perhaps I'm using the wrong name?)

\setbeamertemplate{section page}{ % also used section and section title
%  \raggedright%  % <-- Comment here
  \linespread{1.0}%
  \inserttitle%
  \par%
  \vspace*{0.5em}
}

1 Answer 1

1

Answer: I was able to do it by removing the \raggedright command from the section page and include \centering instead before the section title

 % Center Section titles 
    \setbeamertemplate{section page}{
    \begin{center} % add center if missing
    \begin{minipage}{22em}
    \usebeamercolor[fg]{section title}
    \usebeamerfont{section title}
    %\raggedright % comment out raggedright
    \centering % add centering here to center title
    \insertsectionhead\\[-1ex]
    \usebeamertemplate*{progress bar in section page}
    \par
    \ifx\insertsubsectionhead\@empty\else%
    \usebeamercolor[fg]{subsection title}%
    \usebeamerfont{subsection title}%
    \insertsubsectionhead
    \fi
    \end{minipage}
    \end{center}
    \par
    \vspace{\baselineskip}
    }

You must log in to answer this question.

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