I have a very simple .tex file:


When I tried to compile this file with pdflatex, it generates a .dvi file instead of a .pdf file. My question is:

How to force pdflatex to run in pdf mode instead of dvi mode? (I am using WinEdt to edit and compile my .tex file.)

This bothered me a lot. Because I have some other larger files need to be run in pdf mode. But now whenever I ran pdflatex, lots of error messages were issued by pdflatex. This happened right after I installed the latest MiKTeX 2.9.7000. Before that everything was fine. Thank you for the help in advance.

The screenshot of the MiKTeX console is shown below: enter image description here

The input file name for the pdflatex is "latex.ltx" instead of "pdflatex.ini". So my question is: how to change the setting of the pdflatex compiler in MiKTeX console? Any suggestion will be appreciated.

I also tried to change replace "latex.ltx" by "pdflatex.ini" manually. But MiKTeX returned me an erroor message "Built-in format definitions may not be changed." Saddly.

Then I uninstalled and re-installed the MiKTeX again, right after the installation, the "input file name" for the setting of pdflatex is "pdflatex.ini". However, just after I ran pdflatex, the setting changed to "latex.ltx". Why this happened? I didn't do any change in the setting.

  • 4
    Welcome to TeX.SE! It seems that you started in WinEDT to compile with the wrong compiler. Please show in a screenshot in your question what you are doing to compile the file mwe.tex ...
    – Mensch
    Apr 30, 2019 at 3:31
  • 1
    the most likely cause is running latex instead of pdflatex, please show the log file that you get from running the above test file. Apr 30, 2019 at 8:07
  • What David Carlisle said. pdflatex creates PDFs by default - the clue is in the name!
    – alephzero
    Apr 30, 2019 at 10:13
  • Based on your statement that you expected different prior to changed MiKTeX it sounds like settings have become destabilised Using MiKTeX-console ensure you run TASKS update filenames and fonts then test again. If problem persists, at a command prompt try compiling with pdfLaTeX a copy of AnySmall.tex file that worked before to compare then if it is MiKTeX pdfLaTeX rather than winedt at fault run pdfLaTeX on your simple test file above then post its short log
    – user170109
    Apr 30, 2019 at 12:48

1 Answer 1


(To long for a comment because of the picture)

Can you show the first line of your log-file? It should look something like this:

This is pdfTeX, Version 3.14159265-2.6-1.40.20 (MiKTeX 2.9.7000 64-bit) (preloaded format=pdflatex 2019.4.26) 

Can you show how the setting for pdflatex looks in your miktex console:

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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