12

How can I generate a list of all installed LaTeX packages, classes, and fonts on the command line with MikTeX? Raw output is fine for my use case.

Related, with a TeXlive solution: Diagnostics about LaTeX installation.

krlmlr
  • 12,530

3 Answers3

11

If you have not installed tools like grep on your windows computer (they are not installed with windows) you can use the old ms-dos pipe to create a file test.txt containing all installed packages with MiKTeX.

Use on your console/terminal:

mpm --list >test.txt

--list creates the list of installed packages, > directs the output in the file named afterwards test.txt.

If you have installed cygwin or other programs containing the unix-like tools like grep etc. you can use them of course. My solution is working with "pure" windows ...

Mensch
  • 65,388
  • How to interpret the exported list? I see i 00008 211297 a0poster in a line, but the a0poster package is labeled as Version 1.22b when I look up for its package information. Is there a master list that can translate either 00008 or 221297 to be a specific version number? Thx! – llinfeng Dec 23 '21 at 14:40
  • 1
    @llinfeng please see my answer https://tex.stackexchange.com/a/434205/16550 ... – Mensch Aug 10 '22 at 16:04
3

With mpm being moved to miktex the the following works:

miktex packages list  --template "{isInstalled} {id} {version}" | grep "^true" | sed -e "s/^true //"

See https://docs.miktex.org/manual/miktex-packages.html for other information you might want to put into the template.

Morty
  • 211
0

I am using MiKTeX 21.2 on Win 10. The previous command did not work for me. However, a similar command did. Specifically, starting miktex console and then clicking on the packages tab, displayed a long list with dates marked for those packages that have been installed. Strictly, speaking that list does not answer the original question. I have a hunch that it would not be hard to write a macro that would select those items on the list that have a date next to them. But this is only a hunch. Please let me know.

  • Your answer could be improved with additional supporting information. Please [edit] to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers in the help center. – Community Sep 19 '21 at 03:09
  • A surprising problem in programming is that it's annoyingly difficult to transform text on your screen to text in a file. MikTeX is pulling that information from somewhere; and it will be much easier to figure out where that information is than to parse a GUI. – Teepeemm Sep 19 '21 at 03:14