[tex-k] Problem with latxmk

John Collins jcc8 at psu.edu
Thu May 9 01:56:48 CEST 2024


On 5/8/24 6:22 PM, Karl Berry wrote:
> Hi Josef,
> 
>      The following example runs flawlessly with pdflatex, but an error
>      occurs when using pdflatex with an output directory:
> 
> I assume you've also configured MKTEXPK=1 one way or another.

Isn't that the default setting?  On my TL 2024 installation, I haven't 
explicitly made any setting of MKTEXPK, and the behavior of pdflatex with a 
missing font is to invoke mktexpk.


>      pdflatex --output-directory=/tmp/t t.tex
>      This is pdfTeX, Version 3.141592653-2.6-1.40.26 (TeX Live 2024) (preloaded format=pdflatex)
>      ...
>      mktexpk: `mf-nowin -progname=mf \mode:=ljfour; mag:=1+0/600; nonstopmode; input ifsym10' failed to make ifsym10.600pk.
> 
> For the record, the ... above is what contains the actual error message,
> which is:
> 
>    This is METAFONT, Version 2.71828182 (TeX Live 2024) (preloaded base=mf)
>    ! I can't write on file `ifsym10.log'.
> 
> I'm not sure what specifically is going wrong, but the general problem
> is that mktexpk doesn't know anything about -output-dir. It's not being
> passed along to the mf-nowin invocation, as shown in your msg. That
> might be fixable, but not quickly (at least not by me).

Actually it does (or can) know about -output-directory, because pdflatex sets 
TEXMF_OUTPUT_DIRECTORY.  I can reproduce the problem at the level of mktexpk as 
follows:

1. Set the environment variable TEXMF_OUTPUT_DIRECTORY to a chosen output 
directory, which in my case is named 'output'.  Make sure the directory exists.

2. Ensure the file ifsym10.600pk doesn't exist (as reported by kpsewhich).

3. Run mktexpk with exactly the command line that is reported in the output 
from pdflatex, and that is copied to missfont.log.  That command is

     mktexpk --mfmode / --bdpi 600 --mag 1+0/600 --dpi 600 ifsym10

It gives the reported error, i.e., "I can't write on file `ifsym10.log'."

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.

I'm able to restore correct functioning by inserting

    unset TEXMF_OUTPUT_DIRECTORY

near the start of the mktexpk script.  (I assume that some corresponding fix is 
needed in the Windows version.)

John Collins



More information about the tex-k mailing list.