The LyX-bundle 2.0.7 install was a thing of beauty. It “Simply Worked” for the most part. I was completely delighted. No stopping to ask the user about whether they want MikTeX, not mysteries.
Over the years, I have installed LyX for many Windows users and this was by far the best. Some folks in the LyX group have really invested a lot of effort to make this work well.
I stink there are still problems where communication between LyX and MikTeX gets stuck, I’ll describe below. For sure, I’ve learned that one should not have the MikTeX admin panels open when LyX tries to compile something. That’s bad, since files are locked by one.
1. Toward the end of the install, a MikTeX updater panel appears and it asks which packages you want to install. We wondered why those packages were not just included in this “brand new” version of LyX. I know, just a detail
2. At the end, the green progress bar said we were at 100% and the installer spent quite a bit of time after that downloading LaTeX packages from a server in Europe. It didn’t follow our request to use the American one in the MikTeX update chooser.
3. On the first document we tried to compile–the beamer template example–we got an error, the amsmath.sty file was missing. We used the MikTeX Maintenance(Admin) menu to go choose some packages. That seemed to fix it.
A little while later, I came back an tried same, and error message from MikTex was “Update helper could not be found”. I googled way to a suggested fix. I a terminal (Start MS DOS Command box “as administrator”) navigate to C:\Program Files (x86)\MikTeX\miktex\bin and run
mpm --admin --verbose --update
Note, these are double dashes, although the blog software makes them look single. It appeared that this fixed the problem the first time I came to use the MikTeX GUI updater, but just now I’ve tried again and got the update helper error. I’m almost ready to download a new copy of miktex-2.9 and install it to see if it adds some component that I’ve apparently damaged.
A similar problem happened when a user tried to compile the LyX APA6 template document. Error was that etex.sty was missing. We compiled again and the document succeeded
I suspect the following happened. LyX triggered the package installation behind the scenes? I notice now in MikTeX settings, the “install on fly” option is checked. I should have left it at that.
I caused a wild goose chase. I went into the MikTeX package manager and manually installed “miktex-etex-base”. I did not read any documents, just installed it. After that, nothing at all complies in this system. I gather now that etex is extended LaTeX, and once that is installed, then base classes like “article.cls” are not found anymore. So I’m removing miktex-etex-base to see if I can make LyX basics work again.
Recall that LyX suggests the MikTeX “Update on the Fly” option. I think that makes for hangups of non-admin users who are not allowed to install packages.
As I close this note, I’m leaving this document uncompiled, and feeling sorry I went into MikTeX and added packages. The symptom I see is that “View PDF” in LyX causes pdftex to run, you can see it in the bottom bar in LyX. But no pdf ever appears for viewing. And I can’t close LyX, error says “LyX could not be closed because documents are being processed by LyX.”
Students have described this to me, but I’m not sure I’d ever seen it quite like this before. Maybe a system restart will help.
I’ve just been testing this on more windows computers. On a fresh LyX install, the first compiles take a really long time because LyX is trying to get MikTeX to install desired packages.
IF (only IF) I am logged in with administrative powers, then the work gets done, more or less in a hidden way. You can see it if, in LyX, you open the View Messages window when you try to compile the document. I just compiled the Beamer template document for the first time. Here’s what I see:
Running: pdflatex "newfile4.tex" > nul 17:44:43.106: 17:44:43.106: ====================================================================== 17:44:43.106: starting package maintenance... 17:44:43.106: installation directory: "C:\Program Files\MiKTeX" 17:44:43.106: package repository: http://ftp.fernuni-hagen.de/ftp-dir/pub/mirrors/www.ctan.org/systems/win32/miktex/tm/packages/ 17:44:43.106: lightweight database digest: b5794978d47214eb6d50dd647fd52e29 17:44:43.106: going to download 168929 bytes 17:44:43.122: going to install 22 file(s) (1 package(s)) 17:44:43.122: downloading http://ftp.fernuni-hagen.de/ftp-dir/pub/mirrors/www.ctan.org/systems/win32/miktex/tm/packages/sansmathaccent.tar.lzma... 17:44:43.122: 168929 bytes, 104.74 KB/Sec 17:44:43.122: extracting files from sansmathaccent.tar.lzma... 17:44:43.137: ====================================================================== 17:44:45.852: 17:44:45.852: ====================================================================== 17:44:45.852: starting package maintenance... 17:44:45.852: installation directory: "C:\Program Files\MiKTeX" 17:44:45.852: package repository: http://ftp.fernuni-hagen.de/ftp-dir/pub/mirrors/www.ctan.org/systems/win32/miktex/tm/packages/ 17:44:45.867: lightweight database digest: b5794978d47214eb6d50dd647fd52e29 17:44:45.867: going to download 275811 bytes 17:44:45.867: going to install 10 file(s) (1 package(s)) 17:44:45.867: downloading http://ftp.fernuni-hagen.de/ftp-dir/pub/mirrors/www.ctan.org/systems/win32/miktex/tm/packages/filehook.tar.lzma... 17:44:45.883: 275811 bytes, 166.06 KB/Sec 17:44:45.883: extracting files from filehook.tar.lzma... 17:44:45.883: ====================================================================== 17:44:49.627: Trying to make PK font ecss1000 at 600 DPI... 17:44:49.627: Creating ecss1000.pk... 17:44:49.627: Running miktex-mf.exe... 17:44:49.721: This is METAFONT, Version 2.718281 (MiKTeX 2.9)
What’s slow about that? well, first, it is using a server in Germany. I had told MikTeX to use the KU math department’s server, but it doesn’t.
If I were not the administrator, this would “hang” because MikTeX is set to “install requested packages on fly” but the user who lacks admin privileges is stuck. I’ve argued in the LyX community the right answer to set LyX to refuse packages and thus provoke an error when LyX tries to run. I’d much rather get a message saying “a package is missing” than wait indefinitely while LyX argues with MikTeX.
Sometimes, the effort to beautify and simplify things for users is worse than leaving things the old-fashioned, hard to use way! I realize that’s hypocritical. If I really thought that, I’d prefer to prepare LaTeX documents with a flat text editor, rather than LyX.