1

Problem description

After a recent TeXLive upgrade on a Debian testing system, I experience a change in how Beamer (version 3.40) interprets empty frame titles in <article> mode.

It appears that Beamer used to interpret an empty frame title, e.g.,

\begin{frame}{}
   Foo
\end{frame}

in the same manner as a frame with no title at all, i.e.,

\begin{frame}
   Foo
\end{frame}

In Beamer version 3.40, however, Beamer seems to instead treat an empty frame title as "invisible", i.e., it does not print any title, but nevertheless leaves vertical space for it and indents the text that follows the title.

Minimal working example (MWE)

Save the following example to a .tex file and compile with pdflatex.

\documentclass{article}

\usepackage{beamerarticle}


\begin{document}


\section{Beamer frame with non-empty title}

\begin{frame}{Foo}%
Text after \verb|\begin{frame}{Foo}| is indented.
\end{frame}


\section{Beamer frame with no title at all}

\begin{frame}%
Text after \verb|\begin{frame}| is \emph{not} indented.
\end{frame}


\section{Beamer frame with empty title}

\begin{frame}{}%
Text after \verb|\begin{frame}{}| is indented, and vertical space
is left for the (empty) title. Neither appears to have been the case
in previous versions of Beamer -- I first encountered it under
Beamer v3.40.
\end{frame}


\end{document}

MWE output

MWE output

Solution that I am looking for

I am looking for a solution that restores the status quo. In other words, I would like example 3 in the above MWE to generate output that looks identical to the output of example 2.

The reason for this is my use of a custom macro \autoframetitle, which is empty in <article>, but non-empty in <presentation> modes, and which I use as

\begin{frame}{\autoframetitle}

I wrote this macro because I want to ignore frame titles in <article> mode entirely, while printing them in <presentation> modes.

1 Answer 1

1

With a little help from https://tex.stackexchange.com/a/53091/36296

To repair this, you could add a test to the frametitle, that tells you if the frametitle contains text:

\documentclass{article}

\usepackage{beamerarticle}

\makeatletter
\mode<article>{%
\setbeamertemplate{frametitle}{%
    \setbox0=\hbox{\insertframetitle\unskip}\ifdim\wd0=0pt
        \relax
    \else%
        \paragraph*{\insertframetitle}\ \par\noindent\emph{\insertframesubtitle}\par
    \fi%
}
}
\makeatother

\begin{document}


\section{Beamer frame with non-empty title}

\begin{frame}{Foo}%
Text after \verb|\begin{frame}{Foo}| is indented.
\end{frame}


\section{Beamer frame with no title at all}

\begin{frame}%
Text after \verb|\begin{frame}| is \emph{not} indented.
\end{frame}


\section{Beamer frame with empty title}

\begin{frame}{}%
Text after \verb|\begin{frame}{}| is indented, and vertical space is left for the (empty) title. Neither appears to have been the case in previous versions of Beamer -- I first encountered it under Beamer v3.40.
\end{frame}


\end{document}

enter image description here

2
  • This workaround does the trick. What would be nice to know is whether Beamer's new behavior is actually intended. (IMHO, the old behavior made more sense.)
    – Florian H.
    Feb 25, 2017 at 20:31
  • @FlorianH. You would have to ask the beamer maintainer in order to know if this is intended. Feb 25, 2017 at 22:23

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .