matze / mtheme

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

Bigger progress bar in footer? Change background color of standout frames? #266

Closed Flo-Wo closed 7 years ago

Flo-Wo commented 7 years ago

Is there a possibility to get a bigger/higher progress bar (activated through \usetheme[outer/progressbar=foot]{metropolis}) in the footer?

How can I change the background color of the standout frames?

Thank you very much

benjamin-weiss commented 7 years ago

Here you go:

\documentclass{beamer}
\usetheme[outer/progressbar=foot]{metropolis}

\makeatletter
% change width of progressbar
\setlength{\metropolis@progressinheadfoot@linewidth}{10pt} % <-- insert desired value here

% redefine standout frame to set different background color
\define@key{beamerframe}{standout}[true]{%
  \booltrue{metropolis@standout}
  \begingroup
    \setkeys{beamerframe}{c}
    \metroset{numbering=none}
    \setbeamercolor{background canvas}{
      bg=gray % <-- set color here
      }
    \centering
    \usebeamercolor[fg]{palette primary}
    \usebeamerfont{standout}
}
\makeatother

\begin{document}

  \begin{frame}{Bigger progress bar in footer}
    Hello, world!
  \end{frame}

  \begin{frame}[standout]
    Different background color!
  \end{frame}

\end{document}

Some explanations:

@matze While testing the redefinition of the standout frame I discovered a bug. Actually the frame numbering is still active on a standout frame, because \setkeys{beamerframe}{noframenumbering} doesn't work anymore. It is just not visible as the same color as the canvas is used. It should be \metroset{numbering=none}. Feel free to fix it, I'm too lazy to do a pull request right now. 😏

And another thought: should we disable the header/footer completely for standout frames? I'm not sure.

Flo-Wo commented 7 years ago

Thank very much

benjamin-weiss commented 7 years ago

You are welcome!