1

This question already has an answer here:

I created a simple tex file: sample1.tex

\documentclass{article}
\begin{document}
  Hello World!
\end{document}

I used command:

pdftex sample1.tex

log file is:

This is pdfTeXk, Version 3.141592-1.40.3 (Web2C 7.5.6) (format=pdftex 2013.10.9)  17 MAR 2016 18:50

entering extended mode
 %&-line parsing enabled.
**sample1.tex
(./sample1.tex
! Undefined control sequence.
l.1 \documentclass
                  {article}
? 
! Undefined control sequence.
l.2 \begin
          {document}
? 
[1{/usr/share/texmf/fonts/map/pdftex/updmap/pdftex.map}] )</usr/share/texmf/fon
ts/type1/bluesky/cm/cmr10.pfb>

Output written on sample1.pdf (1 page, 6933 bytes).
PDF statistics:
 10 PDF objects out of 1000 (max. 8388607)
 0 named destinations out of 1000 (max. 131072)
 1 words of extra memory for PDF output out of 10000 (max. 10000000)

Output pdf is as: article document Hello World!

Results are not as expected

marked as duplicate by David Carlisle, Mike Renfro, user13907, Werner, darthbith Mar 17 '16 at 14:39

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

Browse other questions tagged or ask your own question.