# Ubuntu: beamer not working

I used to be a regular latex user but haven't touched it in the last two years due to being out of academia. So sorry for what might be a stupid question.

I want to create a beamer presentation. Here is what I start with:

\documentclass{beamer}
\begin{document}
\title{Simple Beamer Class}
\author{Sascha Frank}
\date{\today}

\frame{\titlepage}

\begin{frame}
hi
\end{frame}
\end{document}


For compiling and executing, I use pdflatex filename.tex as I remember doing.

I am getting the following errors:

l.11 \documentclass
{beamer}
?
! Undefined control sequence.
l.12 \begin
{document}
?
! Undefined control sequence.
l.13 \title
{Simple Beamer Class}
?
! Undefined control sequence.
l.14 \author
{Sascha Frank}
?
! Undefined control sequence.
l.15 \date
{\today}
?
! Undefined control sequence.
l.15 \date{\today
}
?
! Undefined control sequence.
l.17 \frame
{\titlepage}
?
! Undefined control sequence.
l.17 \frame{\titlepage
}
?
! Undefined control sequence.
l.19 \frame
?
! Undefined control sequence.
l.19 \frame{\frametitle
?
! Undefined control sequence.
}
?
! Undefined control sequence.
l.21 \begin
{frame}
?
[1{/var/lib/texmf/fonts/map/pdftex/updmap/pdftex.map}] )</usr/share/texlive/tex
mf-dist/fonts/type1/public/amsfonts/cm/cmr10.pfb>
Output written on presentation.pdf (1 page, 15084 bytes).


I have installed the texlive package from ubuntu's apt. Ubuntu tells me that latex-beamer, (and dependencies pgf latex-xcolor etc) are already installed. A pdf is produced but its just the text with no slides.

• I suggest you stick to \begin{frame} and \end{frame} and drop the \frame command. I'd also write the \title, \author and \date in the preamble. – Dox Jul 10 '14 at 14:38
• @Dox I made those changes, still the pdflatex compiler is giving me an error undefined control sequence on every single line command. – yayu Jul 10 '14 at 14:40
• off-topic comment (I admit it ;-)) LaTeX is used outside academia as well ;-) – user31729 Jul 10 '14 at 14:47
• @Dox the recommend way is given in How to install "vanilla" TeXLive on Debian or Ubuntu? – cmhughes Jul 10 '14 at 14:53
• @yayu: Did you really run pdflatex presentation? The log file rather hints to pdftex presentation – user31729 Jul 10 '14 at 15:40

The question is solved, it was just the wrong usage of pdftex which does not know of \documentclass command.
In order to compile beamer it is necessary to use latex, pdflatex, xelatex or lualatex instead.
pdflatex foo