3

I would like to be able to use lengths with fill glue inside a Beamer column (or, for that matter, inside a minipage) in such a way that the finally assigned length is consistent inside and outside the column.

An MWE:

\documentclass[xcolor=dvipsnames,compress,9pt]{beamer}

\setlength{\parskip}{0pt plus 1fill}

\begin{document}
\maketitle

\begin{frame}{Propagating \textsc{fill} values to columns}
Lorem ipsum dolor sit amet, consectetuer adipiscing elit.
\par
Lorem ipsum dolor sit amet, consectetuer adipiscing elit.
\vspace*{\parskip}
\begin{columns}[t]
\begin{column}{\textwidth}
Lorem ipsum dolor sit amet, consectetuer adipiscing elit.
\par
Lorem ipsum dolor sit amet, consectetuer adipiscing elit.
\end{column}
\end{columns}
\end{frame}
\end{document}

enter image description here

Observe how nominally the value of the \parskip between the 3rd and 4th paragraphs, and the values between other paragraphs are the same, but the outcome is quite different.

I guess this is due to Beamer columns being implemented as minipages, and then again when a minipage is built, its own value for fill is computed.

Any ideas on a workaround?

Jaeya
  • 423
  • 2
    To propagate \parskip inside a column one can use \newcommand{\@minipagerestore}{\setlength{\parskip}{1cm}}, but this won't work with fill, as it is inside a minipage. And to solve this, I guess, you would have to rewrite columns environment ... – samcarter_is_at_topanswers.xyz May 16 '16 at 15:17
  • Yes, to clarify my point, I am trying to do this without actually rewriting the Beamer columns environment... – Jaeya May 29 '16 at 07:04
  • I assumed that :) But then I think your problem is impossible to solve as there is one conceptional problem: A beamer column is only as high as its content (which is good, because one can add other things below it). So it cannot be filled up until the end of the frame. – samcarter_is_at_topanswers.xyz May 29 '16 at 09:42
  • If you look at my example, I don't intend to fill it up until the end of the frame. I just want the space between paragraphs to be equally distributed among every paragraph in the slide. But yes, I notice that the semantics of my problem are not entirely well defined :) – Jaeya May 31 '16 at 05:36
  • Well, if you would be happy with a fixed value for \parskip, see my first comment. – samcarter_is_at_topanswers.xyz May 31 '16 at 08:14

1 Answers1

1

\vfill will not give stretchable space in beamer columns for the same reason as Why does \vfill not work inside minipage?

Two workarounds:

minipage with specified height:

\documentclass[xcolor=dvipsnames,compress,9pt]{beamer}

\setlength{\parskip}{0pt plus 1fill}

\makeatletter
\newcommand{\@minipagerestore}{\setlength{\parskip}{0pt plus 1fill}}
\makeatother

\begin{document}

\begin{frame}{Propagating \textsc{fill} values to columns}
Lorem ipsum dolor sit amet, consectetuer adipiscing elit.
\par
Lorem ipsum dolor sit amet, consectetuer adipiscing elit.

\begin{minipage}[t][.2\textheight][t]{\textwidth}
Lorem ipsum dolor sit amet, consectetuer adipiscing elit.
\par
Lorem ipsum dolor sit amet, consectetuer adipiscing elit.
\end{minipage}
\end{frame}

\end{document}

With a fixed \parskip:

\documentclass[xcolor=dvipsnames,compress,9pt]{beamer}

\setlength{\parskip}{1cm}
\makeatletter
\newcommand{\@minipagerestore}{\setlength{\parskip}{1cm}}
\makeatother

\begin{document}

\begin{frame}{Propagating \textsc{fill} values to columns}
Lorem ipsum dolor sit amet, consectetuer adipiscing elit.
\par
Lorem ipsum dolor sit amet, consectetuer adipiscing elit.
\vspace*{\parskip}
\begin{columns}[t]
\begin{column}{\textwidth}
Lorem ipsum dolor sit amet, consectetuer adipiscing elit.
\par
Lorem ipsum dolor sit amet, consectetuer adipiscing elit.
\end{column}
\end{columns}
\end{frame}

\end{document}