Mingzhang Michael Yin (imported from SE)
Hello when I use the section page in Beamer theme Metropolis, I have long section but the content are narrowed in the middle of the page.

\section{blablablablablablablablablablablablablabla}

I want to reduce the margins in the section page, and only in section page.

This commend \setbeamersize{text margin left=0mm,text margin right=0mm} reduces the margin for all pages, EXCEPT the section page. Please help. Thanks!

samcarter
Changing the text margin won't help for the metropolis theme because it hard codes the with of the section title to 22em. This also means that not even a smaller font would help.

However the definition of the section page can be slightly adjusted to occupy the whole text width instead of the hard coded value:


\documentclass{beamer}

\usetheme{metropolis}

\makeatletter
\setbeamertemplate{section page}{
\centering
\begin{minipage}{\linewidth}
\raggedright
\usebeamercolor[fg]{section title}
\usebeamerfont{section title}
\usebeamertemplate*{progress bar in section page}
\par
\usebeamercolor[fg]{subsection title}%
\usebeamerfont{subsection title}%
\fi
\end{minipage}
\par
\vspace{\baselineskip}
}
\makeatother

\begin{document}

\section{blablablablablablablablablablablablablabla}

\begin{frame}
test
\end{frame}

\end{document}


In case the normally available text width is not enough, your \setbeamersize{text margin left=0mm,text margin right=0mm} will now also change the margin of the section page.