1

I've been trying to install garamondx on MiKTeX (on a Windows 10 machine) after it was marked as obsolete and removed in a recent MiKTeX update.

Following the instructions on the garamondx README page, I downloaded garamondx.tds from CTAN, unzipped it, and run the two following instructions (after cding into the unzipped folder):

initexmf --update-fndb
initexmf --edit-config-file updmap

While the first one completes without warnings, the second one fails with the following message:

C:\Users\yourname\Downloads\garamondx.tds> initexmf.exe --edit-config-file updmap
Sorry, but "MiKTeX Configuration Utility" did not succeed.

The log file hopefully contains the information to get MiKTeX going again:

  C:/Users/yourname/AppData/Local/MiKTeX/2.9/miktex/log/initexmf.log

You may want to visit the MiKTeX project page, if you need help.

The relevant lines on the mentioned .log file are

2017-05-22 11:19:33,907+0100 INFO  initexmf - starting: MiKTeX Configuration Utility 2.9.6234 (MiKTeX 2.9.6210 64-bit)
2017-05-22 11:19:33,940+0100 FATAL initexmf - Windows API error 2: The system cannot find the file specified.

2017-05-22 11:19:33,940+0100 FATAL initexmf - Info: fileName="GitPad"
2017-05-22 11:19:33,940+0100 FATAL initexmf - Source: Libraries\MiKTeX\Core\Process\win\winProcess.cpp
2017-05-22 11:19:33,940+0100 FATAL initexmf - Line: 68

What am I doing wrong? Is this even supposed to work on Windows?


Given that from the log it emerges that miktex is trying to use GitPad, I checked and realized (after suggestion in the comments) that the system variable EDITOR was set to GitPad for me (for reasons unknown to me). Changing the value of this variable with $env:EDITOR = Notepad on powershell, I tried running the command again. It still fails with the same error, but now the log registers an error at a different line:

2017-05-22 15:33:01,899+0100 INFO  initexmf - starting: MiKTeX Configuration Utility 2.9.6234 (MiKTeX 2.9.6210 64-bit)
2017-05-22 15:33:01,954+0100 FATAL initexmf - Windows API error 193.
2017-05-22 15:33:01,954+0100 FATAL initexmf - Info: fileName="Notepad", commandLine="Notepad C:\Users\lk\AppData\Roaming\MiKTeX\2.9\miktex/config\updmap.cfg"
2017-05-22 15:33:01,954+0100 FATAL initexmf - Source: Libraries\MiKTeX\Core\Process\win\winProcess.cpp
2017-05-22 15:33:01,954+0100 FATAL initexmf - Line: 270

What is the expected value of the EDITOR variable?

  • 1
    Why is miktex trying to use "GitPad" as editor? Did you change this somewhere? Or did you set an environment variable? – Ulrike Fischer May 22 '17 at 10:57
  • @UlrikeFischer I definitely did not, I assume it was something internal to MiKTeX, but now I see it comes with git. Where does miktex take the program to use to open its files? Is it some internal variable? – glS May 22 '17 at 13:29
  • It uses the value of the EDITOR environment variable or some default if it isn't set. What do you get if you do echo %EDITOR%? – Ulrike Fischer May 22 '17 at 14:14
  • @UlrikeFischer it doesn't give anything because I think on windows 10 that is not the way you look at variables, but $env:EDITOR does give GitPad, and looking at the output of env confirms that this is the case. I have no idea where this setting came from. However, changing it to Notepad results in the same problem, only with the log now giving error at Line 270 instead of 68. What is the expected value of EDITOR? – glS May 22 '17 at 14:30
  • I'm on windows 10 and echo %EDITOR% works fine for me (when I set the variable). Are you using a standard command line? By default (if EDITOR is not set) miktex uses notepad.exe. – Ulrike Fischer May 22 '17 at 14:43
1

Having found what the problem was and how to solve it, I figured it may be useful for someone else landing here due to a similar issue.

The reason of malfunction was indeed very simple: I was using a non-standard windows shell (powershell and the linux bash shell on windows). In there, the EDITOR system variable was set to GitPad (probably set by some git installation, I'm not sure), but even setting it back to a different value, like Notepad, using $env:EDITOR = Notepad didn't work and gave the error reported in the edit in the main question.

The solution was to simply switch back to using cmd. In there, the EDITOR variable was not set, and initexmf --edit-config-file updmap opened a notepad window as expected, so that I could continue following the instructions on the README page.

To be fair though, those didn't really work, and garamondx.sty was still not found. Some more digging lend me here, where I learnt that I had to create a local texmf tree. I found the instructions to do this on this other answer: I opened MiKTeX Settings (Admin), there in the Roots tab I added the folder where I unzipped garamondx.tds, and then I clicked in the General tab Refresh FNDB and then Update Formats.

But this still wasn't enough! Files with \usepackage{garamondx} still didn't compile, and in the log file the following error (among others) was reported:

pdflatex.EXE (file zgmr8r): Font zgmr8r at 600 not found

Again, some more digging lend me to this last post. It turns out I probably run updmap instead of updmap-sys somewhere along the road (quite possible given that I've been trying a lot of things to make this work), which you apparently should absolutely avoid! Anyway, this resulted in 2 pdftex.map files on my computer, one in the TeX system and one in my personal tree. I removed the one in my personal tree and finally I could compile files with garamondx again.

What a ride!

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.