1

I installed the portable version (from Scoop) of MikTeX 2.9.6615-x64 on Windows 10 (as I did before with previous Miktex versions).

When I try to add a custom texmf directory for local packages in the MikTeX Console, it shows among the default paths (just above the default Install directory, as intended), but it disappears after I close the MikTeX Console. In other words, it doesn't store the change in the directory list.

My texmf directory worked in previous MikTeX version, and has the following structure: ../tex/latex/$packagename$

I tried the same with the old GUI, but the result is the same.

Any thoughts?

5
  • Is your miktex up-to-date? Did you run the update manager? Did you try to register the root in the miktex command line with initexmf --register-root=path-to-texmf? Feb 13, 2018 at 18:24
  • Yes, I did run the update manager and everything is up to date. I tried your suggestion, but it didn't work (directory doesn't show up in miktex configuration, and the custom texmf is not used when compiling a file).
    – bepoli
    Feb 13, 2018 at 18:49
  • 2
    Then make a bug report in the miktex issue tracker. (I can't test your issue, I don't have a portable installation). Feb 13, 2018 at 19:33
  • 1
    Since you are wisely using the portable version: From time to time, when everything is working well, make a zip archive of the entire installation. In the event of update problem, discard the bad installation, and revert to the un-zipped good one.
    – user139954
    Feb 14, 2018 at 2:16
  • Thanks for the suggestion Ulrike, I've got the answer after posting a bug report. @RobtAll you're right, I'll definitely make a backup of the working installation. Thanks for the tip.
    – bepoli
    Feb 14, 2018 at 10:25

2 Answers 2

1

Using portable MiKTeX Console 2.9.7015 (MiKTeX: 2.9.7000). Same symptom, custom TEXMF root directory doesn't survive a console restart.

  1. Using the old workaround doesn't help, exactly same symptom.

  2. Running the following commands doesn't help, exactly the same symptom.

    initexmf --user-roots="path\to\library" initexmf --update-fndb

I solved the problem by manually editing this file in the miktex-portable folder: texmfs\install\miktex\config\miktexstartup.ini

which only contains a [Auto] field. I manually add a [Path] field containing the following line

UserData=path\to\library

There are white spaces in my library path, and I did not do anything about it like any quotation mark. I do not put any white space around the equal sign.

I reboot console and my tex editor (TeXstudio) and it works again.

0

I've got a response after posting in the issue tracker (it's a bug) and a workaround as well:

cd \PATH\TO\MIKTEXPORTABLE
copy texmfs\config\miktex\config\miktexstartup.ini texmfs\install\miktex\config\miktexstartup.ini

This fixes the bug in the current MikTeX Portable version.

1
  • Using Version 2.9.6942, my MikTex broke over last night. Same symptom, tried this method. For one, there is no such miktexstartup.ini file anymore. I tried copying the only two files existing, console.ini and miktex.ini, and it didn't work either.
    – Yvon
    Apr 18, 2019 at 18:51

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .