[tex-k] Problem with latxmk
John Collins
jcc8 at psu.edu
Fri May 10 17:22:53 CEST 2024
Hi Karl,
> 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.
Actually mktexpk (and presumably the other mktex scripts) changes directory to
a process-specific temporary directory. See texmf-dist/web2c/mktex.opt lines
38-44 and lines 62, 63. (That file is sourced by mktexpk.)
> 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.
I don't think so. The output directory is something that the user has
specified to pdflatex (etc) for the run-specific output files. As a user, I
think I expect automatically generated font files to be placed in their
standard locations (under TEXMFVAR) independently of the setting of the output
directory. I think that is especially true if the fonts themselves (or their
source files) are provided as part of the TL 2024 distribution, as with those
in the ifsym package.
If I understand the motivation correctly, TEXMF_OUTPUT_DIRECTORY is set so as
to communicate the output directory to programs that are called by the \write18
mechanism. I think we are just seeing an unintended side effect of that.
Maybe the appropriate place to unset TEXMF_OUTPUT_DIRECTORY is in
texmf-dist/web2c/mktex.opt, since that is common to all the mktex scripts, and
is setting directory names.
John
More information about the tex-k
mailing list.