mptopdf output file not numbered.

Andreas Scherer andreas_tex at freenet.de
Sun Dec 15 12:01:28 CET 2019


Hello, Karl,

> Andreas, do you understand what the purported patch is supposed to be
> improving?

I _guess_ the patch wants to avoid "unnecessary" rename operations for
non-default MP output (with numeric extensions). It would be interesting
to see the accompanying message for "this patch ... via debian" as of
commit @50118 of 24 Feb 2019 (and @52258 of 02 Oct 2019).

> If I create a file two.dot.mp with two characters in it, your version
> creates output files which have the "two" trimmed off:
>   two.dot is converted to dot-0.pdf + dot-1.pdf

Yes, my pattern to disect the $base and the $suffix didn't account for
that. Fixed in the new version attached below.

Playing some more with 'mptopdf.pl', I think I have found a bug in the
_original_ version (of 01 Jun 2010 @18674, 25 Feb 2019 @50131, the
recent 14 Dec 2019 @53132, and TL 2019):

If I follow the example in the MetaPost manual
(www.tug.org/docs/metapost/mpman.pdf) and add the initial line

   outputtemplate := "%j-%c.mps";

to create *.mps files in the first place, the 'original' mptopdf[.pl]
fails with the error message

   MPtoPDF 1.4.1 : no filename matches example

because '@files' missed the dashed filenames from the mpost run. The new
version eliminates the dot in 'glob "$pattern*"'.

> (Also, mptopdf.pl in particular is in turn intended
> to be a slave copy of the original in ConTeXt.)  I've copied it over, again.

Sorry, I wasn't aware of the upstream dependency. If you like, you can
submit my second 'mptopdf.pl' to the Context team for consideration.

Best,
Andreas
-------------- next part --------------
A non-text attachment was scrubbed...
Name: mptopdf.pl
Type: text/x-perl
Size: 4254 bytes
Desc: not available
URL: <https://tug.org/pipermail/tex-live/attachments/20191215/f69b3786/attachment.bin>


More information about the tex-live mailing list