tlmgr search output

Marei Peischl tex at
Wed Apr 24 09:02:07 CEST 2024

Hi Joseph,

On 4/24/24 8:36 AM, Joseph Wright wrote:
> Hello all,
> There was a question on TeX-sx yesterday about automatically determining
> 'CTAN' (TeX Live really) packages needed by a document. I started on a
> script with the idea of being to use --recorder, parse the .fls file
> then do a lookup for each line to list all of the TL packages needed.
> That would be handy for anyone using a deliberately minimised TeX system.
> However, I ran into the issue that
>     tlmgr search --global --file <filename>
> doesn't return anything I can use from a script - try e.g.

Do you need the --global here?

I use that via shell-escape in a container running a full TeX Live to 
detect without using --recorder

Then the output is by far more usable. Maybe that helps. Alternatively 
one can set the tlmgr repo to be able to predict the string before the 

We have some project within the islandoftex gitlab where I worked on 
that issue. to write down the dependencies on the fly. There are some 
issues with fonts leftover but I just didn't fine enough time to finish 
that yet.

Could turn that repo public already in case you think it might help but 
it's rather alpha state I guess and a bit chaotic atm.



> print("FOUND " .. os.execute("tlmgr search --global --file article.cls")
> from Lua.
> It seems that --machine-readable doesn't work here, as it's not
> implemented for the search command. Is there any way to get this
> information from a script at present?
> Regards,
> Joseph

More information about the tex-live mailing list.