Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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} 

\frame{\frametitle{Table of contents}\tableofcontents} 

\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
           {\frametitle{Table of contents}\tableofcontents}
? 
! Undefined control sequence.
l.19 \frame{\frametitle
                       {Table of contents}\tableofcontents}
? 
! Undefined control sequence.
l.19 ...metitle{Table of contents}\tableofcontents
                                                  }
? 
! 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.

share|improve this question
    
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 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 at 14:40
1  
off-topic comment (I admit it ;-)) LaTeX is used outside academia as well ;-) –  Christian Hupfer Jul 10 at 14:47
1  
@Dox the recommend way is given in How to install "vanilla" TeXLive on Debian or Ubuntu? –  cmhughes Jul 10 at 14:53
2  
@yayu: Did you really run pdflatex presentation? The log file rather hints to pdftex presentation –  Christian Hupfer Jul 10 at 15:40
show 16 more comments

1 Answer 1

up vote 5 down vote accepted

The question is solved, it was just the wrong usage of pdftex which does not know of \documentclass command.

The error is not connected directly to Ubuntu but can occur on any operating system.

In order to compile beamer it is necessary to use latex, pdflatex, xelatex or lualatex instead.

For example call on commandline or corresponding menu command/button in a TeX editor

pdflatex foo 
share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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