Keyval 未定义错误

Keyval 未定义错误

我是 Beamer 的新手。当我运行示例代码时:

\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}

我收到错误:Package keyval Error: 2 undefined \end{frame}。有人知道哪里出了问题吗?

答案1

请始终发布完整的文档,而不仅仅是片段。(这里我使用了,draft所以图中没有包括)

正如评论中指出的那样,错误消息告诉您参数[2]不正确,您没有指定 beamer 中的列数。

在此处输入图片描述

\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}

答案2

在某些情况下,我发现较新版本的beamer/keyval对于定义的内容更加挑剔。您可以将选项传递unknownkeysallowed给 beamer 以停止其中一些消息。

编辑:传递选项尝试

\documentclass[unknownkeysallowed]{beamer}

在序言中。

相关内容