我的脚本运行良好,直到我添加带有方程的框架。我的脚本:
\documentclass{beamer}
% Replace the \documentclass declaration above
% with the following two lines to typeset your
% lecture notes as a handout:
%\documentclass{article}
%\usepackage{beamerarticle}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{amsthm}
\usepackage{amsmath}
\usepackage{amsopn}
\section{Proposed Solution}
\subsection{ Model}
\begin{frame}{ Model}
\begin{block}{model XX}
three factors
\begin{itemize}
\item 1.
\item 2.
\item 3.
\end{itemize}
\end{block}
\begin{block}{Formula}
calculated in this equation
\begin{equation}
Total = \frac{1}{n}*\sum_{i=0}^n (eachnode_i)
\end{equation}
\end{block}
\end{frame}
答案1
- 您有问题的代码不完整:缺少
\begin{document}
和\end{document}
。 - 在方程式(数学环境)中不允许有空行
\documentclass{beamer}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{amsthm}
%\usepackage{amsfonts} % loaded by amssymb, see Mico comment
%\usepackage{amsopn} % loaded by amssymb
\begin{document} % <--- added
\section{Proposed Solution}
\subsection{ Model}
\begin{frame}
\frametitle{Model}
\begin{block}{model XX}
three factors
\begin{itemize}
\item 1.
\item 2.
\item 3.
\end{itemize}
\end{block}
\begin{block}{Formula}
calculated in this equation
\begin{equation} % <--- deleted empty lines
Total = \frac{1}{n}*\sum_{i=0}^n (eachnode_i)
\end{equation}
\end{block}
\end{frame}
\end{document} % <--- added
- 考虑到上述情况,我无法重现您的错误。它适用于
xelatex
宽度pdflatex
: