# Reinstalled MikTeX and now latex.exe doesn't work on simple document

I reinstalled just now (updating packages seemed broken) in order to help look at fixing another question I posted.

\documentclass[varwidth]{standalone}
\usepackage{lmodern}
\usepackage{amsmath, amsthm, amssymb}

\begin{document}\fontsize{30}{36}\selectfont
$X$
\end{document}


Here's the output at command line:

latex.exe latex_input.tex
This is pdfTeX, Version 3.14159265-2.6-1.40.18 (MiKTeX 2.9.6350 64-bit)
(Fatal format file error; I'm stymied)


No log is produced. I just had it working with an old version of MikTeX. What's wrong with my document?

I opened up TeXWorks, pasted in the above code and ran with: pdfLaTeX + makeIndex + BibTeX in the combo box next to the play button. That works. The first two options: pdfTeX/LaTeX give the "stymied" errror.

So how do I select that option when running from the command line?

• your format is is wrong. Normally miktex handles the recreation, but perhaps some old format is in the way, or the build process fails for some reason. Try to recreate it in the miktex console (user mode), settings, tab format. – Ulrike Fischer Nov 30 '18 at 8:41
• @UlrikeFischer see my edit at the bottom – I Said Roll Up n Smoke Adjoint Nov 30 '18 at 8:50
• @UlrikeFischer I got it to work now. I guess when the user installs MikTeX we'll have to run a test to make sure my app can see it correctly. – I Said Roll Up n Smoke Adjoint Nov 30 '18 at 9:02
• Having similar problems myself, I discovered that the "Install just for you" (something like that) stores everything in different locations after which nothing worked right. The "install for all users" option is working (so far) but wiped out all my sty files (AGAIN!). – John Kormylo Nov 30 '18 at 14:42
• There seems to have been an issue with a mix recent latex.exe my current ends 2.6-1.40.19 (yours 40.18) and the core engine version mine is 2.9.6880 (yours was/is 2.9.6350) several users are experiencing issues with updates across such a wide time interval and you may ned to run update several times. Also the error message suggested the formats in such a case may need to be refreshed/rebuilt and that may include a system reboot before MiKTeX system stabilises. – KJO Nov 30 '18 at 17:37

## 1 Answer

Go to command line and type:

where latex

Be absolutely positive that the MikTeX you've just installed is listed first. Clean up old installs if you don't need them and edit your Path env variable accordingly.

• It is probably best to use where /r \ latex.exe on each possible drive that may contain tex files the /r will search recursively all folders starting from \ root – KJO Dec 30 '18 at 17:58