2

Hello guys first question and beginner in LaTeX,

the following code presents part of my thesis presentation. I have no idea what i did wrong. Checked for brackets and $-signs twice. Maybe i did something wrong without knowing? This frame is the one that breaks the presentation, despite yesterday everything worked fine. Hope someone can help me.

The errors:

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}

The code:

\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}
  • Don't use empty lines inside of equations – user36296 Dec 12 '18 at 11:13
  • Tried that but didn't helped. The equation is to long for the frame and neither \split nor \multline helped to fix that. Only by adding this two empty lines the code compiled in a presentable format. – mugdi Dec 12 '18 at 11:17
  • 1
    You will also need to use some package that defines \glqq and \grqq – user36296 Dec 12 '18 at 11:21
  • 1
    I think you should write \xi_{jn} instead of \xi_jn. Also, \ln(\text{wage})_{jn} looks better than \ln(\text{wage}_{jn}). – Mico Dec 12 '18 at 14:52
  • 1
    Also, instead of \beta_2 x I^{M}_j, shouldn't it be \beta_2 S_n x I^{M}_j? Optional: replace x with \times. – Mico Dec 12 '18 at 15:25
6

The main problem: You must not have empty lines within equation

Some further comments:

  • you don't need \usetheme{default}, as the name says it is loaded by default

  • you don't need \usepackge{graphicx} with beamer

  • to split your equation over multiple lines, you can for example use \begin{split}...\end{split}

  • are you misusing x for multiplication?

  • the syntax for items is \item text (without {})

  • \glqq and \grqq are not defined in your code.

  • use \ln for logarithm (Thanks to @Mico for spotting this!)


 \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

  • Thanks for the great comment. Fixed everything the way you said and it works perfect. PS: The authors of the paper used x as a connection indicator of two variables. Questioned myself if this is a good way to state things but since it is published in one of the main economic journals, this seems to be on purpose. – mugdi Dec 12 '18 at 11:41
  • 1
    Thanks a lot to both of you. Especially @Mico might saved my ass by the comment of the \beta_2 S_n. Definitly forget this! – mugdi Dec 12 '18 at 15:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.