# Creating two columns in beamer

I have searched the stackexchange for a resolution of this problem, but I am still getting an error message when I put in the following (for now neglecting other things in my document, such as documentclass, begin{document}, etc.):

\begin{frame}
\frametitle{explanation}
\begin{columns}
\begin{column}{width=0.5\textwidth}
some text here
\end{column}
\begin{column}
\begin{center}
\includegraphics[width=0.5\textwidth]{image1.jpg}
\end{center}
\end{column}
\end{columns}
\end{frame}


When compiled, I get the error: Missing number, treated as zero. I should appreciate any help.

• Welcome to TeX.SX! Please help us to help you and add a minimal working example (MWE) that illustrates your problem. It will be much easier for us to reproduce your situation and find out what the issue is when we see compilable code, starting with \documentclass{...} and ending with \end{document}. – user31729 Feb 15 '15 at 16:02
• You don't need to use width=, you just enter the width directly. – tparker Dec 4 '17 at 6:04

You forgot to give the mandatory width to the second column.

\documentclass[demo]{beamer}
\begin{document}
\begin{frame}
\frametitle{explanation}
\begin{columns}
\begin{column}{0.5\textwidth}
some text here some text here some text here some text here some text here
\end{column}
\begin{column}{0.5\textwidth}  %%<--- here
\begin{center}
\includegraphics[width=0.5\textwidth]{image1.jpg}
\end{center}
\end{column}
\end{columns}
\end{frame}
\end{document}


Also note that the graphics need not be scaled down as much in the second column. The column becomes a minipage, so \textwidth is already adjusted to its width.

\documentclass[demo]{beamer}
\begin{document}
\begin{frame}
\frametitle{explanation}
\begin{columns}
\begin{column}{0.5\textwidth}
some text here some text here some text here some text here some text here
\end{column}
\begin{column}{0.5\textwidth}
\begin{center}
%%%%% this is a minipage, so \textwidth is already adjusted to the size of the column
\includegraphics[width=\textwidth]{image1.jpg}
\end{center}
\end{column}
\end{columns}
\end{frame}
\end{document}