I don't have the option of compiling using LaTeX engine in TeXworks, which I installed from MiKTeX. Take a look at the options I have:
How do I compile that TeX document using LaTeX?
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It only takes a minute to sign up.
Sign up to join this communityTeXworks doesn't support the DVI output format but the PDF output format in preview only, so you need to use pdfLaTeX here (or use something different which will produce PDF at the end).
If you want to work with DVI output format I would suggest picking a different LaTeX editor/shell.
latex myfile.tex
+ Enter. But are you sure you really want a .dvi file as output? That's what the latex
engine produces. Nowadays, pdflatex myfile.tex
can probably be considered standard.
– doncherry
Jan 4 '13 at 5:37
latex
and convert the .dvi
to a PDF, but as donchrrey says, directly creating the PDF is easier.
– Joseph Wright♦
Jan 4 '13 at 6:56
So.
LaTeX is the set of commands we use to create documents. For example \documentclass
and \begin{tabular}
, etc.
latex
is a program. When you type latex example.tex
into the command line, it will create a .dvi file from your .tex file. The same happens when you press a button named latex in an editor like TeXWorks, and the editor does the command line stuff for you.
If you want PDF output you have several choices. One of them is:
latex example.tex
dvips example.dvi
ps2pdf example.ps
You only need this if you used PSTricks or related packages in your code. Most people therefore use another program called pdflatex
. The only difference is that you get immediate PDF output instead of DVI. All the LaTeX document commands stay the same.
So you don't have to compile your .tex file with latex
. You can simply use pdflatex
, and everything will work the same, but you will get PDF output.
Note: latex
can only handle EPS graphics, while pdflatex
can handle JPG, PNG and PDF, but not EPS.
I am converting my comments into Answer
TeXworks documentation wiki gives you to configure LaTeX->dvi->ps2pdf route for PDF using .bat
Other approach of automation via .dvi is using Latexmk
LaTeX Wikibook always comes in handy
Even latex.exe
is nowadays just a link to pdflatex.exe
. You can generate a DVI by using \pdfoutput=0
in the first line of the document and compiling it with pdflatex
.
To get from DVI to PDF you can use dvipdfm 'inputfile.dvi'
pdflatex
engine has become standard route for PDF as it can handle .eps
, .jpg
,.png
and .pdf
.
– texenthusiast
Jan 4 '13 at 5:55
pdftex
cannot handle EPS, cf. Heiko Oberdiek’s answer in tex.stackexchange.com/a/72939/9237. You need a converter; in TeX Live this happens automatic AFAIK, in MiKTeX one must add this manually, see e.g. tex.stackexchange.com/a/52026/9237.
– Speravir
Jan 4 '13 at 16:25
.bat
. Other approach of automation via.dvi
is usingLatexmk
– texenthusiast Jan 4 '13 at 5:35pdflatex
is a command which uses LaTeX to produces PDF files directly: the more traditional use of thelatex
command to make.dvi
files requires subsequent steps to make PDF files. For most new users,pdflatex
is much more convenient than 'traditional'latex
, and indeed many experienced LaTeX users have moved to pdfLaTeX-only workflows. – Joseph Wright♦ Jan 4 '13 at 7:07