[metapost] feature request: quiet mode / creation date

Niklas Beisert nbeisert at itp.phys.ethz.ch
Thu Jul 20 16:19:42 CEST 2017


Dear MetaPost developers,

Let me thank you first for providing and maintaining this great piece of
software which I've enjoyed using for many years now.

I hope it's appropriate to suggest a basic feature or two for the
MetaPost compiler via this mailing list. It's related to a package I
wrote ( https://www.ctan.org/pkg/mpostinl ) which automatically
generates metapost figures embedded in latex documents (there are also a
couple of packages with similar functionality). There are two issues,
admittedly minor, which however could be resolved with two minor
extensions of the standalone mpost compiler (I'm referring to the
updated version of texlive 2017 on linux):

a) The generated figure files contain a timestamp of the creation date:
 %%CreationDate: 2017.07.17:1654
I'm not sure what the actual benefit of this timestamp is besides
bookkeeping. However, one drawback is that the file CHANGES each time
mpost is run even though the content may not have changed. If metapost
is run automatically each time the latex document is compiled, this may
result in a great number of individual files being changed. Not a major
issue, but it becomes a bit of a hassle if the output files are being
synchronised or versioned. A simple solution would be a new command line
option to suppress this line (and ideally also the timestamp given in
the first line of .log files). As far as I can see, the output files
without such a timestamp would be stable, i.e. they change only if the
contained graphics changes.

b) The metapost compiler always outputs out a couple of lines "This is
MetaPost, ..." to the standard output when it starts. If mpost is
invoked for a large number of files as a subprogram of latex (depending
on the configuration of mpostinl this can well happen), this clutters
the overall output a lot. E.g. it becomes harder to spot whether there
are any compilation errors and what they may be. To that end, I'd
suggest a quiet/lean display switch to suppress the lines "This is
MetaPost, ..." up to "Preloading the plain mem file ...". It might also
be useful to tie this behaviour to -interaction batchmode, but I don't
know whether you'd be willing to consider going there... Anyway,
-q/-quiet is a standard switch for many programs and compilers.

c) Unrelated: for -interaction batchmode the metapost banner is
displayed without a final newline. Is this intentional? When invoked
this way by command line, it leaves the prompt after the metapost
output. Conversely, the latex compilers seems to write a final newline.

While the above issues could be addressed to some extent by
postprocessing, this would certainly be system-dependent, and that's why
I'd like to propose these additional command line options, hoping that
you might find them useful as well. If you can supply them, I'd surely
make my package support them. Thanks for considering.

Best Regards,
  Niklas


More information about the metapost mailing list