Writing a de-psfagger

Paulo Ney de Souza pauloney at gmail.com
Thu Jan 23 21:29:12 CET 2020


Many thanks! Your recipe 1-4 worked beautifully!

Why the main installation directory (the one you choose under TeXLive
installation) is not a variable under kpsewhich?

Paulo Ney

On Thu, Jan 23, 2020 at 11:22 AM Karl Berry <karl at freefriends.org> wrote:

>     can I assume all full-path files are system files?
> Maybe this:
> 1) run kpsewhich -var-brace-value TEXMF; the output will be a long line
> that looks like:
> /home/karl/.texlive2019/texmf-config:/home/karl/.texlive2019/texmf-var:/home/karl/texmf:!!/home/texlive/karl/texmf-local:!!/home/texlive/karl/Master/texmf-config:!!/home/texlive/karl/Master/texmf-var:!!/home/texlive/karl/Master/texmf-dist
> 2) Split it on [:;] to get the individual directories. (They'll be
> separated by ; on Windows, if you need to support that.)
> 3) For each directory, remove a leading "!!" string if present.
> 4) In the -recorder output, if the file is under one of these
> directories (begins with that as a prefix), consider it a system
> file. If not, not.
> 5) I can imagine that files under TEXMFHOME may or may not be considered
> "system files", depending on the scenario. You'd have to separately look
> for the TEXMFHOME value (kpsewhich -var-value TEXMFHOME) and do what's
> needed.
> 6) Ditto for the "TEXMFAUXTREES" (usually empty).
> kpsewhich -var-brace-value TEXMFAUXTREES
> 6) It is technically possible for this to get messed up, e.g., if one of
> the purportedly "system" trees is defined to be a document directory
> (e.g., TEXMFHOME=.). I doubt it'll be a problem in practice, though.
> I think there can be no 100% reliable way to determine if an input file
> is a "system" file, because there is no definition of "system" at the
> file lookup level. It's just a list of directories.
> Hope this helps,
> Karl
> P.S. Of course Perl has plenty of ways to distinguish absolute
> vs. relative pathnames, e.g., Cwd::abs_path, but I'm guessing you
> are already well aware.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://tug.org/pipermail/texhax/attachments/20200123/f7c5820c/attachment.html>

More information about the texhax mailing list