jolars / moloch

A LaTeX Beamer theme, forked from the metropolis theme
https://ctan.org/pkg/moloch
Creative Commons Attribution Share Alike 4.0 International
91 stars 6 forks source link

Fix vbox overflow warning for title slide #10

Closed jolars closed 8 months ago

jolars commented 8 months ago

The current use of a minipage on the title slide causes a vbox overflow warning. I'm not sure what the purpose of using a minipage (that covers the entire page) is in any case.

samcarter commented 8 months ago

If I had to guess, I'd say the minipage is there to make the title page layout independent of the frame alignment, e.g. to make sure the title page looks the same for \documentclass[t]{beamer} and \documentclass[b]{beamer}?

samcarter commented 8 months ago

Maybe a minipage of \textheight would do a similar job without the overfull box (also notice the missing %)?

\documentclass{beamer}
\usetheme{moloch}

\makeatletter
\setbeamertemplate{title page}{
  \begin{minipage}[b][\textheight]{\textwidth}
    \ifx\inserttitlegraphic\@empty\else\usebeamertemplate*{title graphic}\fi
    \vfill%
    \ifx\inserttitle\@empty\else\usebeamertemplate*{title}\fi
    \ifx\insertsubtitle\@empty\else\usebeamertemplate*{subtitle}\fi
    \usebeamertemplate*{title separator}
    %    \end{macrocode}
    %
    % Beamer's definition of |\insertauthor| is always nonempty, so we have
    % to test another macro initialized by |\author{...}| to see if the user has
    % defined an author. This solution was suggested by Enrico Gregorio in an
    % answer to \href{https://tex.stackexchange.com/questions/241306/}{this
    % Stack Exchange question}.
    %
    %    \begin{macrocode}
    \ifx\beamer@shortauthor\@empty\else\usebeamertemplate*{author}\fi
    \ifx\insertinstitute\@empty\else\usebeamertemplate*{institute}\fi
    \ifx\insertdate\@empty\else\usebeamertemplate*{date}\fi
    \vfill
    \null
  \end{minipage}% <- missing %
}
\makeatother

\begin{document}

\maketitle

\end{document}
jolars commented 8 months ago

Thanks, that helped a bit but it seems I was wrong. The culprit is the definition of the title graphic, namely the 0 height vbox

https://github.com/jolars/moloch/blob/726430149bebefb30caff08c3d2d00bb58d721f5/src/beamerinnerthememoloch.dtx#L169-L175