[dvipdfmx] silencing mktexpk

Karl Berry karl at freefriends.org
Sun Jan 24 23:57:31 CET 2021

Hi Shunsaku. Igor asked me:

    could you please say if there is a way to silence this message
    which I get on stderr from "dvipdfmx -q"? (notice the `-q' - I want it
    to be quiet!)

        kpathsea: Running mktexpk --mfmode / --bdpi 600 --mag 1+0/600
    --dpi 600 manfnt

    (2 lines in total - the first line is empty)

I don't believe there's a way to silence this msg to stderr with a
user-set envvar. But it can be made silenceable with a change in the
code. In dvipdfmx.c, after the kpse_init_prog call, insert (I think):

  kpse_make_tex_discard_errors = really_quiet;

This should translate to setting the kpse->make_tex_discard_errors
member in the kpse instance, and thus the code in tex-make.c that
outputs that progress report will be skipped:

  if (!kpse->make_tex_discard_errors) {
    fprintf (stderr, "\nkpathsea: Running");

I suggest that place in the code (or maybe it should be after the 
/* Setup Options */ comment following, after the second pass over the
args, I'm not sure), merely dvips does it then. In dvips.c:

   kpse_init_prog ("DVIPS", actualdpi, mfmode, "cmr10");
   kpse_make_tex_discard_errors = quiet;

I admit I have not tested any of the above. I hope you can take a look.


P.S. I noticed the PRODUCER string in dvipdfmx.c has Copyright...2020.
Should be updated. Also in xbb.c, any source files that have been
updated this year, and wherever else ...

More information about the dvipdfmx mailing list.