7

I am new to Beamer. When I run a sample code:

\begin{frame} 
\begin{itemize}
\item Assuming equal power allocation at the source \vspace{0.2cm}
\item Water-filling scheme at the relays over spatial \& temporal domains \vspace{0.1cm}
\item IAPC at each relay puts a lid on the water vessel
\end{itemize}
\begin{columns}[2]
\column{0.4\textwidth}
\begin{itemize}
    \item Relays are rarely used at very low \& high SNRs \vspace{0.2cm}
    \item Stronger relay is used more often \vspace{0.2cm}
\end{itemize}
\column{0.6\textwidth}
\includegraphics[scale=0.4]{Figures/Pon/Pon_naf1_c.eps}
\end{columns}
\end{frame}

I get error: Package keyval Error: 2 undefined \end{frame}. Anyone know what's wrong?

1
  • 2
    It's complaining about [2] you don't need to tell beamer how many columns there are, it just sees the nested column environments (which should be environments, not commands) Sep 1, 2013 at 16:02

2 Answers 2

10

Please always post complete documents, not just fragments. (Here I use draft so the figure is not included)

As noted in comments the error message is telling you that the [2] argument is incorrect, you do not specify the number of columns in beamer.

enter image description here

\documentclass[draft]{beamer}

\begin{document}


\begin{frame}
\begin{itemize}
\item Assuming equal power allocation at the source \vspace{0.2cm}
\item Water-filling scheme at the relays over spatial \& temporal domains \vspace{0.1cm}
\item IAPC at each relay puts a lid on the water vessel
\end{itemize}
\begin{columns}
\begin{column}{0.4\textwidth}
\begin{itemize}
    \item Relays are rarely used at very low \& high SNRs \vspace{0.2cm}
    \item Stronger relay is used more often \vspace{0.2cm}
\end{itemize}
\end{column}
\begin{column}{0.6\textwidth}
\includegraphics[scale=0.4]{Figures/Pon/Pon_naf1_c.eps}
\end{column}
\end{columns}
\end{frame}
\end{document}
10

In some cases I have found that more recent versions of beamer/keyval are more picky about what is defined or not. You can pass the option unknownkeysallowed to beamer to stop some of these messages.

Edit: to pass the option try

\documentclass[unknownkeysallowed]{beamer}

in the preamble.

3
  • You should add a example to your answer. As this, and for me, this is not an answer.in fact it's where you should add unknownkeysallowed ;) Jul 10, 2014 at 7:32
  • I can't find anything in the source suggesting that a simple number of columns here has every been allowed: do you know that it was?
    – Joseph Wright
    Aug 12, 2014 at 16:21
  • Perhaps also worth noting that this doesn't actually do anything at the beamer end, it just turns the keyval error into a piece of info in the log file.
    – Joseph Wright
    Aug 12, 2014 at 16:23

You must log in to answer this question.

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