[tex-k] Problem with latxmk

Karl Berry karl at freefriends.org
Fri May 10 00:22:53 CEST 2024


Hi John,

    Isn't that the default setting?

Yes. In the binaries. I need to update texmf.cnf to show the actual
defaults as comments.

    Actually it does (or can) know about -output-directory, because
    pdflatex sets TEXMF_OUTPUT_DIRECTORY.

I know. It was a bit of a pain to implement that last year :).  I hope I
got it right.

    4. I notice that before invoking mf-nowin, mktexpk explicitly sets
    environment variables to specify the destination for PK files; I
    wonder whether in mf that clashes with the use of
    TEXMF_OUTPUT_DIRECTORY.

My guess is that the variables themselves in mktexpk are not the
problem, since they aren't anything built into mf.  Rather, mktexpk is
simply unaware of --output-directory. (It wasn't possible to know if
that option was being used before TL24.)

mktexpk runs mf in the cwd (I believe), but that's not writable when
running with TEXMF_OUTPUT_DIRECTORY. So it needs to cd to the output-dir
first. Also the "computation" of $PKDESTDIR needs to take the output-dir
into account. Probably it should just leave everything in the output-dir
itself; trying to construct a texmf tree there doesn't seem sensible.

That's my guess. I haven't tested it. Likely I got it wrong.

    I'm able to restore correct functioning by inserting
        unset TEXMF_OUTPUT_DIRECTORY

I would argue that if --output-directory=foo is specified, the correct
behavior is for mktexpk+mf to write under foo, not to the normal
$TEXMFVAR / whatever location. --thanks, karl.


More information about the tex-k mailing list.