tlmgr search output

Joseph Wright joseph at texdev.net
Wed Apr 24 13:05:23 CEST 2024


On 24/04/2024 09:22, Norbert Preining wrote:
> Hi Joseph,
>
>> 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.
>
> Yes, this is what I do regularly.
>
>> 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.
>>
>>    print("FOUND " .. os.execute("tlmgr search --global --file article.cls")
>
> Not sooooo bad:
>
> First, I would do
>
> 	tlmgr search --file /article.cls
>
> which gives on a texlive-full installed system:
>
> $ tlmgr search --file /article.cls
> latex:
>          texmf-dist/tex/latex/base/article.cls
> latex-base-dev:
>          texmf-dist/tex/latex-dev/base/article.cls
> $
>
> which is not that bad to parse:
>
> pkg:
> \tfull-path
>
> I can make a kind of machine readable
> format if you want, any preferences?

I think I've sorted it: needed to adjust my Lua a bit - many thanks!

Joseph




More information about the tex-live mailing list.