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 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:

enter image description here

How do I compile that TeX document using LaTeX?

share|improve this question
    
TeXworks documentation wiki gives you to configure LaTeX->dvi->ps2pdf route for PDF. –  texenthusiast Jan 4 '13 at 5:26
    
My above comment was using .bat. Other approach of automation via .dvi is using Latexmk –  texenthusiast Jan 4 '13 at 5:35
1  
@piratepartypumpkin Reading the comments on the answers, I suspect you are slightly confused about things. 'LaTeX' is a general name a system used to typeset documents, and defines the input syntax used. pdflatex is a command which uses LaTeX to produces PDF files directly: the more traditional use of the latex 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
    
Since you have some responses below that seem to answer your question, please consider marking one of them as ‘Accepted’ by clicking on the tickmark below their vote count (see How do you accept an answer?). This shows which answer helped you most, and it assigns reputation points to the author of the answer (and to you!). It's part of this site's idea to identify good questions and answers through upvotes and acceptance of answers. –  Martin Schröder Jan 15 '13 at 9:30

4 Answers 4

TeXworks 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.

share|improve this answer
    
Thanks. Is there any easy way to compile it with latex? I tried looking around for tutorials and I couldn't find anything really. –  piratepartypumpkin Jan 4 '13 at 5:12
    
@piratepartypumpkin Open the command line, navigate to the directory of your file, type 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
    
@piratepartypumpkin It's possible to create a 'LaTeX + dvips + ps2pdf` entry in TeXworks to run 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

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'

share|improve this answer
    
How can I go from having a .tex to a .pdf, but compiling using latex. Because if you see my post here: tex.stackexchange.com/posts/89224/revisions It looks like I need to compile a pdf with latex. But I guess if Using latex only gets me dvi, I would have to somehow convert the dvi to pdf. –  piratepartypumpkin Jan 4 '13 at 5:15
    
I don't get it. If you want a PDF why don't you use pdflatex? What is the original requirement you want to fulfill? Concerning the example the website says 'last edited in 2006'. Since then the LaTeX world has evolved I recommend you to have a close look on other options for such a letter. –  Uwe Ziegenhagen Jan 4 '13 at 5:31
2  
@piratepartypumpkin I think you are confused about what LaTeX is. Perhaps it would be useful for you and those answering your question if you were explicit about what you want to achieve (include your code in the question if not too big, say what result you expect - dvi, pdf, etc) –  Vivi Jan 4 '13 at 5:47
2  
@piratepartypumpkin check my comments above. perhaps you might be misunderstanding with this answer for your earlier closed question. In the recent MikTeX and TexLive 2012 pdflatex engine has become standard route for PDF as it can handle .eps, .jpg,.png and .pdf. –  texenthusiast Jan 4 '13 at 5:55
1  
@texenthusiast: No, 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

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

share|improve this answer

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.

share|improve this answer

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.