Beamer 类:缺少插入的 $,数学环境不好,数学模式应该以 $$ 结束

Beamer 类:缺少插入的 $,数学环境不好,数学模式应该以 $$ 结束

大家好,我是 LaTeX 的初学者,第一个问题,

以下代码是我论文演示的一部分。我不知道我做错了什么。检查了两次括号和 $ 符号。也许我在不知情的情况下做错了什么?这个框架破坏了演示,尽管昨天一切都正常。希望有人能帮助我。

错误:

Missing $ inserted. \end{frame}
Display math should end with $$. \end{frame}
Missing $ inserted. \end{frame}
Missing $ inserted. \end{frame}
Bad math environment delimiter. \end{frame}
You can't use '\eqno' in internal vertical mode. \end{frame}´
Missing $ inserted. \end{frame}
Display math should end with $$. \end{frame}
Undefined control sequence. \end{frame}
Undefined control sequence. \end{frame}

代码:

\documentclass [draft=on,t,compress,11pt,xcolor=dvipsnames]{beamer}
\usetheme{default}
\usepackage{amsmath}
\usepackage{tikz, graphicx}
\usepackage{lmodern}        % <--- those two packages help when you use
\usepackage[T1]{fontenc}    % the default font LaTeX font

\begin{document}

\begin{frame}{Explanation of the Papers Regression Function for Modern 
versus Traditional Manufacturing }

\vspace{-1cm}
\begin{equation}
%\begin{multline}

ln(wage_{jn}) =\beta_1 S_n+\beta_2 x I^{M}_j+\gamma_1h_n+\gamma_2h_n x 
I^{M}_j+\delta_1\boldsymbol{X}_n+\delta_2\boldsymbol{X}_n x 
I^{M}_j+\alpha_j\\
+\alpha_n +\xi_jn

%\end{multline}
\end{equation}



\vspace{+0.5cm} \begin{itemize}
\item{ $ln(wage_{jn})$ = Proxy for firm productivity.} 
\item{$S_n$ = Represents  proxies for knowledge elites in location n.}
\item {$I^{M}_j$ = Indicator variable that takes on value 1 if sector j is 
\glqq modern \grqq.}
\item{$h_n$ = Denotes proxies for average human capital, such as literacy 
and schooling.}
\item{$\boldsymbol{X}_n$ = Vector of control variables.}
\item{ $\alpha_j$ and $\alpha_n$ = Sector fixed effects ($\alpha_j$) and 
location fixed effects ($\alpha_n$).}
\item{$\xi_n$ = Error term.}
\end{itemize}

\end{frame}


\end{document}

答案1

主要问题:等式中不能有空行

进一步的评论:

  • 你不需要\usetheme{default},因为名称表明它是默认加载的

  • 你不需要\usepackge{graphicx}使用 beamer

  • 要将方程式拆分为多行,例如可以使用\begin{split}...\end{split}

  • 您是否误用x了乘法?

  • items 的语法是\item text(不带{}

  • \glqq并且\grqq未在您的代码中定义。

  • 用于\ln对数(感谢@Mico 发现这一点!)


 \documentclass[draft=on,t,compress,11pt,xcolor=dvipsnames]{beamer}
%\usetheme{default}
\usepackage{amsmath}
\usepackage{tikz}%, graphicx}
\usepackage{lmodern}        % <--- those two packages help when you use
\usepackage[T1]{fontenc}    % the default font LaTeX font

\begin{document}

\begin{frame}
\frametitle{Explanation of the Papers Regression Function for Modern versus Traditional Manufacturing}

\begin{equation}
\begin{split}
\ln(\text{wage}_{jn}) =\beta_1 S_n+\beta_2 \times I^{M}_j+\gamma_1h_n+\gamma_2h_n \times I^{M}_j+\delta_1\boldsymbol{X}_n+\\
\delta_2\boldsymbol{X}_n \times I^{M}_j+ \alpha_j +\alpha_n +\xi_jn
\end{split}
\end{equation}

\begin{itemize}
\item $\ln(\text{wage}_{jn})$ = Proxy for firm productivity. 
\item $S_n$ = Represents  proxies for knowledge elites in location n.
\item $I^{M}_j$ = Indicator variable that takes on value 1 if sector j is  ``modern''.
\item $h_n$ = Denotes proxies for average human capital, such as literacy and schooling.
\item $\boldsymbol{X}_n$ = Vector of control variables.
\item $\alpha_j$ and $\alpha_n$ = Sector fixed effects ($\alpha_j$) and location fixed effects ($\alpha_n$).
\item$\xi_n$ = Error term.
\end{itemize}

\end{frame}

\end{document}

enter image description here

相关内容