matze / mtheme

A modern LaTeX Beamer theme
6.44k stars 846 forks source link

Allow section pages without progressbar #128

Closed maxheld83 closed 9 years ago

maxheld83 commented 9 years ago

sectionpage = progressbar or sectionpage = none is a bit confusing to me, because I initially expected that the option would control the progressbar, it does, however, control whether a sectionpage is produced at all.

Maybe separate this out into two options and/or provide more than just two?

I personally would love to use sectionpages without progressbar.

benjamin-weiss commented 9 years ago

Yes, to provide a built in section page template without a progress bar makes sense. But until we do, you can simply redefine the section page template on your own. Here is a very simple section page without a progress bar.

\documentclass{beamer}
\usetheme{m}
\usepackage{blindtext}

\setbeamertemplate{section page}{
  \centering
  \usebeamercolor[fg]{section title}
  \usebeamerfont{section title}
  \insertsectionhead\\[2em]
}

\begin{document}
\section{New Section without a progressbar}
\begin{frame}{First Frame}
  \blindtext
\end{frame}
\end{document}

But maybe keeping the progress bar line looks a bit nicer.

\documentclass{beamer}
\usetheme{m}
\usepackage{blindtext}

\setbeamertemplate{section page}{
  \centering
  \begin{minipage}{22em}
    \usebeamercolor[fg]{section title}
    \usebeamerfont{section title}
    \insertsectionhead\\[-1ex]
    \begin{tikzpicture}
      \usebeamercolor{progress bar}
      \draw[fg, fill=fg] (0,0) rectangle (\textwidth, 0.4pt);
    \end{tikzpicture}
  \end{minipage}
  \par
}

\begin{document}
\section{New Section}
\begin{frame}{First Frame}
  \blindtext
\end{frame}
\end{document}