13

Here is a small example.

\documentclass{beamer}
\usepackage{multicol}
\usepackage{lipsum}
\setlipsumdefault{1-1}
\begin{document}
\begin{frame}
\tiny
\lipsum
\begin{multicols*}{2}
\lipsum
\end{multicols*}{1}
\lipsum
\end{frame}
\end{document}

It works nicely, but I still get a warning:

Package multicol Warning: multicols* inside a box does not make sense.
(multicol)                Going to balance anyway on input line 13.

DO I so something wrong here? Is there a correct way for using the package with beamer? What other options does one have for having text flow from one column to another in beamer?

This frame looks fine, doesn't it?

To make this clearer, I provide another example, in which it seems very natural to use multicols rather than the manual division of text into columns:

\documentclass{beamer}
\usepackage{multicol}\columnseprule 0.4pt\raggedcolumns
\begin{document} \begin{frame}
  The main programming paradigms are:
\begin{multicols*}{2}
  \begin{itemize}
    \item Imperative
    \item Object Oriented
    \item Functional
    \item Logical
    \item Aspect Oriented
    \item Constraints
    \item Parallel
  \end{itemize}
\end{multicols*}
However, there are many multi-paradigm programming languages.
\begin{multicols*}{2}
  \begin{itemize}
    \item Mathematica
    \item Oz
    \item F\#
    \item Visula Basic.Net
    \item C\#
    \item Scala
    \item Object Pascal
  \end{itemize}
\end{multicols*}
\end{frame}\end{document}

And the output isenter image description here

Yossi Gil
  • 15,951
  • 6
    You do know this is far too much text, I assume? The entire design approach of the code in beamer is based around Till's idea of a good presentation. – Joseph Wright Jan 01 '14 at 20:07
  • 3
    Yes, I know... but lipsum cannot produce just little text. Sometimes however I have an itemized list, which I would like to present in two columns, without the need to balance the columns myself. – Yossi Gil Jan 01 '14 at 20:20
  • The problem is interesting; but you can't use multicols* in a beamer frame for the reason expressed in the warning: the contents is typeset in a box. – egreg Jan 01 '14 at 20:29
  • Yes, but it still works, doesn't it? – Yossi Gil Jan 01 '14 at 20:30
  • 1
    I edited the question, adding an example in which it is very natural to use multicols, even if with the requirement of using minimal text. – Yossi Gil Jan 01 '14 at 20:52
  • so what you want is to move all the items on the left column? – d-cmst Jan 04 '14 at 23:07

2 Answers2

10

The warning is from the * form multicols* and it is saying it's going to use multicol instead, so to avoid the warning use multicols not multicols*

\documentclass{beamer}
\usepackage{multicol}
\usepackage{lipsum}
\setlipsumdefault{1-1}
\begin{document}
\begin{frame}
\tiny
\lipsum
\begin{multicols}{2}
\lipsum
\end{multicols}{1}
\lipsum
\end{frame}
\end{document}
David Carlisle
  • 757,742
0

If the starred version of multicols is used

all white space is automatically placed in the last column or columns. […] [I]nstead of the usual environment the columns on the last page are not balanced.

The manual, which is the source of the quote above, does also explain the warning you are seeing:

If we are not on the main galley, i.e., inside a box of some sort, that approach will not work since we don’t have a vertical size for the box so we better warn that we balance anyway.

Thus you need to remove the * or provide an environment that has some defined vertical size (apparently beamer frames are not detected as such, possibly related to the fact that its size is calculated rather late, cf. Is there a simple command for the available height in a beamer slide?).

Additionally one should know in this context that the beamer package provides a native mechanism for multiple columns: the columns and column environments.

stefanct
  • 841
  • 6
  • 16