4

Here is my Latex file:

\documentclass{beamer}
\title{Here is my Title}
\author{}
\date{}

\begin{document}

\begin{frame}
\begin{columns}[t] % contents are top vertically aligned
\begin{column}[5cm] % each column can also be its own environment
Contents of first column \\ split into two lines
\end{column}
\begin{column}[T]{5cm} % alternative top-align that's better for graphics Line 13
Contents of second column \\ split into two lines
\end{column}
\end{columns}
\end{frame} % Line 17

\end{document}

This is the output of compilation:

line 17: Missing number, treated as zero \end{frame}
line 17: Illegal unit of measure (pt inserted) \end{frame}
line 17: Missing number, treated as zero \end{frame}
line 17: Illegal unit of measure (pt inserted) \end{frame}
line 13:  This package is obsolete and no longer needed on input line 13. This package is obsolete and no longer needed
line 0:  Option `pdfpagelabels' is turned off(hyperref) because \thepage is undefined.
line 17: Overfull \hbox (33.76253pt too wide) in paragraph
line 17: Overfull \hbox (8.82085pt too wide) in paragraph
line 17: Overfull \hbox (17.76335pt too wide) in paragraph
line 17: Overfull \hbox (16.6075pt too wide) in paragraph
line 17: Overfull \hbox (20.01422pt too wide) in paragraph
line 17: Overfull \hbox (19.04083pt too wide) in paragraph
line 17: Overfull \hbox (17.70251pt too wide) in paragraph
line 17: Overfull \hbox (16.30333pt too wide) in paragraph
line 17: Overfull \hbox (19.95334pt too wide) in paragraph
line 17:  Font shape `OT1/cmss/m/n' in size <4> not available(Font) size <5> substituted on input line 17. Font shape `OT1/cmss/m/n' in size <4> not available(Font) size <5> substituted
line 0:  Size substitutions with differences(Font) up to 1.0pt have occurred.

If I remove the parts between \begin{column} and \end{column}, all will be fine. I wonder how I can fix the errors? Thanks and regards!


Update:

After changing \begin{column}[5cm] to \begin{column}{5cm}, here is the new error

line 0: Emergency stop
line 13:  This package is obsolete and no longer needed on input line 13. This package is obsolete and no longer needed
line 0:  Option `pdfpagelabels' is turned off(hyperref) because \thepage is undefined.
line 17:  Font shape `OT1/cmss/m/n' in size <4> not available(Font) size <5> substituted on input line 17. Font shape `OT1/cmss/m/n' in size <4> not available(Font) size <5> substituted

2 Answers 2

3

In the first column you have

\begin{column}[5cm]

which should be

\begin{column}{5cm}

as the width of a column is a mandatory argument that should be in curly braces.

3
  • Thanks! There is a new error after I made the change you suggested.
    – Tim
    Commented Oct 3, 2011 at 14:13
  • @Tim I do not get that error, with a recently updated TeXLive 2011. Edit: Don't know what causes it either, perhaps some old version of a package? Commented Oct 3, 2011 at 14:17
  • @Tim perhaps update your beamer version. Btw. the other warnings can be avoided--If you would like to know how, perhaps post a follow-up question.
    – Stefan Kottwitz
    Commented Oct 3, 2011 at 14:50
1

Most of the Overfull \hbox are just warnings. Some can be ignored and won't alter much the outcome.

I saw this particular combination once but I cannot remember where. The trick is to give the columns environment the option of totalwidth according to \linewidth. Also give each column call a similar scaled width:

\documentclass{beamer}
\usepackage{lipsum}
\begin{document}

\begin{frame}
 \begin{columns}[totalwidth=\linewidth]
  \begin{column}{.5\linewidth}
   \lipsum[1]
  \end{column}
  \begin{column}{.5\linewidth}
   \lipsum[2]
  \end{column}
 \end{columns}
\end{frame}
\end{document}

You must log in to answer this question.

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