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 downloaded and installed MikTeX on my machine (Windows 7), then when I run the command:

latex ex.tex 

the outputs were:

  1. ex.aux
  2. ex.dvi
  3. ex.log

So my question is, what option could I use to produce ex.pdf? Any suggestion?

share|improve this question
1  
To produce PDF output, you have 2 choices: using pdflatex only or using latex followed by dvips followed by ps2pdf. The former pdflatex allows you to import PDF, JPG, and PNG images. The latter latex-dvips-ps2pdf allows you to import EPS images and PSTricks code. It is worth using an editor to write your input file .tex. There are many editors for Windows, such as TeXnicCenter, TeXStudio (formerly named as TeXMakerX), etc. –  xport Jun 22 '11 at 23:12

1 Answer 1

up vote 7 down vote accepted

Run pdflatex ex.tex to produce a pdf file from the tex file directly. Alternatively, after obtaining the dvi file from latex ex.tex, run dvips -P pdf ex.dvi followed by ps2pdf ex.ps to produce a ps file and then a pdf file, or dvipdfm ex.dvi to produce a pdf file.

It is much easier to do these using a LaTeX editor. You may also want to consider using automated processes provided by say latexmk which runs various executables the required number of times (sometimes one run is not sufficient) to give the right final output. Also note that some packages cannot work with some methods. For example, pstricks does not work with pdflatex or dvipdfm.

share|improve this answer
    
Thank you. In fact, I've just figured it out ^_^! Simple enough: "pdf" prefix. –  Chan Jun 22 '11 at 22:33
    
texify is preferred to latexmk in MiKTeX. And always use dvipdfmx instead of dvipdfm if possible. And there are xelatex and lualatex to produce PDF output with better Unicode support and many other features. –  Leo Liu Jun 23 '11 at 4:13
1  
@LeoLiu: Why is texify better for MiKTeX than latexmk? Perhaps you can share your experiences in texify or latexmk? –  doncherry Aug 20 '12 at 22:44

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.