2

I'm new with beamer and I'm trying to use the template from the university to make a Master presentation. unfortunately, I encountered some troubles. This is the code!

\documentclass[fleqn,15pt]{beamer}

\usepackage[english]{babel}
\usepackage[utf8]{inputenc}
\usepackage{graphicx}
\usepackage{ragged2e}
\usepackage{etoolbox}
\usetheme[blue,dark,colorblocks,tocinheader,]{tubs}
\apptocmd{\frame}{}{\justifying}{}
\begin{document}
\section{Reliability, Availability, and Maintainability}
\subsection{Reliability}
\begin{frame}{Reliability}
bla bla bla bla 
\begin{center}
\begin{equation}
R\left ( t \right )=\exp ^{(- \lambda .t)}
\end{equation}
\label{eq1}
\end{center}
Where \lamda is the failure rate and can be expressed as:
\begin{center}
\begin{equation}
\lambda = \frac{k}{T}
\end{equation}
\label{eq2}
\end{center}
\end{frame}
\end{document}

and I'm getting this error message: ! Undefined control sequence. \beamer@doifinframe ...\end {center} Where \lamda is the failure rate and ca... l.49 \end{frame}

Anyone could help?

5

You can’t use the greek symbols outside of math mode and your command is missing a b, thus

Where \lamda is the failure rate and can be expressed as:

should be

Where $\lambda$ is the failure rate and can be expressed as:

Furthermore you should not use {center} around your equations. They are centered by default (you use the fleqn document class option, don’t us ist if you don't want flushing equations…) anyway and {center} adds extra vertical space.

Appending \justify to \frame in that way seems to be a bad idea … Just stick do ragged text and take the following advice from beamers manual serious:

Do not hyphenate words. If absolutely necessary, hyphenate words “by hand”, using the command \-.

I prefer having the \labels inside of the environment they belong to.

Full code

\documentclass[15pt]{beamer}

\usepackage[english]{babel}
\usepackage[utf8]{inputenc}
\usepackage{graphicx}
\usepackage{ragged2e}
\usepackage{etoolbox}
%\usetheme[blue,dark,colorblocks,tocinheader,]{tubs}
%\apptocmd{\frame}{}{\justifying}{}

\begin{document}
\section{Reliability, Availability, and Maintainability}
\subsection{Reliability}
\begin{frame}{Reliability}
bla bla bla bla 
\begin{equation}\label{eq1}
   R\left ( t \right )=\exp(- \lambda \cdot t)
\end{equation}
Where $\lambda$ is the failure rate and can be expressed as:
\begin{equation}\label{eq2}
   \lambda = \frac{k}{T}
\end{equation}
\end{frame}
\end{document}

I had to comment the line loading the theme, because it is not part of TeX Live and therefore not installed on my system …


Edit:

I just noticed it should be either \mathrm{e}^{x} or \exp(x) but not \exp^{x}. And your \lambda.t should probably be \lambda\cdot t, shouldn’t it?

  • @A.nechi You’re welcome :-) – Tobi Sep 16 '16 at 12:51
  • 1
    @A.nechi: I noticed two more things, please see my edit … – Tobi Sep 16 '16 at 13:25
  • yes you are right ! – A.nechi Sep 16 '16 at 20:21

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.