Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Alignment on title page different for options t and c #920

Open
jolars opened this issue Nov 30, 2024 · 4 comments
Open

Alignment on title page different for options t and c #920

jolars opened this issue Nov 30, 2024 · 4 comments

Comments

@jolars
Copy link

jolars commented Nov 30, 2024

Options t and c change the alignment of the title page as well as the frames. Is this intentional?

\documentclass[c]{beamer}

\usepackage{xcolor}
\usepackage[grid, gridunit=mm, gridcolor=black!40, subgridcolor=black!20]{eso-pic}

\title{Title}

\begin{document}

\maketitle

\end{document}

align-center

Only changing \documentclass[t]{beamer} gives me:

align-top

@samcarter
Copy link
Collaborator

samcarter commented Nov 30, 2024

I don't know if that's intentional, but when I write a theme in which I want to make sure that the title page always looks the same, then I usually add a minipage of fixed height to the title page template (or position the elements relative to the page).

@jolars
Copy link
Author

jolars commented Nov 30, 2024

Yes, I remember you giving that suggestion for moloch, but it seems like it is not removing this effect completely, or I might be doing something wrong.

\documentclass[c]{beamer}

\setbeamertemplate{title page}{
  \begin{minipage}[b][\textheight]{\textwidth}
    \null\vfill%
    \usebeamertemplate{title}
    \vfill\null%
  \end{minipage}%
}

\usepackage{xcolor}
\usepackage[grid, gridunit=mm, gridcolor=black!40, subgridcolor=black!20]{eso-pic}

\title{Title}

\begin{document}

\maketitle

\end{document}

align-minipage-center

With t I see this:

align-minipage-top

@samcarter
Copy link
Collaborator

The remaining difference is the different topskip between top and centred frames. With the same topskip:

\documentclass[c]{beamer}

\setbeamertemplate{title page}{
  \begin{minipage}[b][\textheight]{\textwidth}
    \null\vfill%
    \usebeamertemplate{title}
    \vfill\null%
  \end{minipage}%
}

\makeatletter
\define@key{beamerframe}{c}[true]{% centered
  \beamer@frametopskip=0pt plus 1fill\relax%
  \beamer@framebottomskip=0pt plus 1.5fill\relax%
  \beamer@frametopskipautobreak=0pt plus .4\paperheight\relax%
  \beamer@framebottomskipautobreak=0pt plus .6\paperheight\relax%
}
\define@key{beamerframe}{t}[true]{% top
  \beamer@frametopskip=0pt plus .5\paperheight\relax%
  \beamer@framebottomskip=0pt plus 1fill\relax%
  \beamer@frametopskipautobreak=\beamer@frametopskip\relax%
  \beamer@framebottomskipautobreak=\beamer@framebottomskip\relax%
}
\makeatother

\usepackage{xcolor}
\usepackage[grid, gridunit=mm, gridcolor=black!40, subgridcolor=black!20]{eso-pic}

\title{Title}

\begin{document}

\begin{frame}[t]
\maketitle
\end{frame}

\begin{frame}[c]
\maketitle
\end{frame}

\end{document}

@jolars
Copy link
Author

jolars commented Dec 1, 2024

Thanks! But I guess it's not straightforward to have this apply only to the title page (without too much hacking).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants