2

This question already has an answer here:

I'm trying to call pdftex.exe from the command-line with a simple document that looks as follows

\documentclass{article}
\begin{document}
test
\end{document}

But instead of my PDF I get the following output

This is pdfTeX, Version 3.1415926-2.4-1.40.13 (MiKTeX 2.9)
entering extended mode
(c:/temp/1884874639.tex
! Undefined control sequence.
l.1 \documentclass
                  {article}
?
! Emergency stop.
l.1 \documentclass
                  {article}
!  ==> Fatal error occurred, no output PDF file produced!
Transcript written on c:/temp/1884874639.log.

Is there some command-line switch that I'm missing? My invocation is pdftex.exe -output-directory="c:\temp" 123.tex.

marked as duplicate by Martin Schröder, mafp, Ludovic C., barbara beeton, Qrrbrbirlbel Oct 28 '13 at 1:19

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.

  • 7
    Are you sure you do not want pdflatex instead? – moewe Oct 26 '13 at 21:21
7

Try

% this file name is filename.tex
hello world
\bye

with pdftex filename.tex

Or try

% this file name is filename.tex
\documentclass{article}
\begin{document}
hello world
\end{document}

with pdflatex filename.tex

  • Thanks, went with pdflatex. Sucks that I have to post a Q on SE to figure this out. – Dmitri Nesteruk Oct 27 '13 at 10:37

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