[metapost] Bug?
Pétiard François
petiard.francois at free.fr
Wed Dec 22 18:36:10 CET 2021
Hello
My config: windows10 pro, MiKTeX 2.9 updated
The file:
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
vardef TEX primary s =
write "verbatimtex" to "mptextmp.mp";
write "%&latex" to "mptextmp.mp";
write "\documentclass[12pt,french]{article}" to "mptextmp.mp";
write "\usepackage[T1]{fontenc}" to "mptextmp.mp";
write "\usepackage{babel}" to "mptextmp.mp";
write "\pagestyle{empty}" to "mptextmp.mp";
write "\begin{document}" to "mptextmp.mp";
write "\sffamily\Huge\bfseries" to "mptextmp.mp";
write "etex;" to "mptextmp.mp";
write "btex "&s&" etex" to "mptextmp.mp";
write EOF to "mptextmp.mp";
scantokens "input mptextmp"
enddef;
prologues:=3;
outputformat:="eps";
outputtemplate:="%j_%3c.mps";
for i=1 upto 502:
beginfig(i);
label(TEX("i: $"&decimal(i)&"$"),(0,0));
endfig;
endfor;
end;
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
compiles without problem (mpost -tex=latex) and I obtain 502 pictures
but the file (note \usepackage{kpfonts}):
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
vardef TEX primary s =
write "verbatimtex" to "mptextmp.mp";
write "%&latex" to "mptextmp.mp";
write "\documentclass[12pt,french]{article}" to "mptextmp.mp";
write "\usepackage[T1]{fontenc}" to "mptextmp.mp";
write "\usepackage{kpfonts}" to "mptextmp.mp";
write "\usepackage{babel}" to "mptextmp.mp";
write "\pagestyle{empty}" to "mptextmp.mp";
write "\begin{document}" to "mptextmp.mp";
write "\sffamily\Huge\bfseries" to "mptextmp.mp";
write "etex;" to "mptextmp.mp";
write "btex "&s&" etex" to "mptextmp.mp";
write EOF to "mptextmp.mp";
scantokens "input mptextmp"
enddef;
prologues:=3;
outputformat:="eps";
outputtemplate:="%j_%3c.mps";
for i=1 upto 502:
beginfig(i);
label(TEX("i: $"&decimal(i)&"$"),(0,0));
endfig;
endfor;
end;
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
makes an error after 250 pictures and the log is:
This is MetaPost, version 2.01 (MiKTeX 21.12.10) 22 DEC 2021 18:24
**test.mp
(C:/Program Files/MiKTeX/metapost/base/mpost.mp (C:/Program
Files/MiKTeX/metapost/base/plain.mp
Preloading the plain mem file, version 1.005) ) (./test.mp
(./mptextmp.mp) [1{psfonts.map}{8r.enc}<j
kpssbn8a.pfb><jkpmn8a.pfb>] (./mptextmp.mp)
[2<jkpssbn8a.pfb><jkpmn8a.pfb>] (./mptextmp.mp) [3<jkpss
bn8a.pfb><jkpmn8a.pfb>] (./mptextmp.mp) [4<jkpssbn8a.pfb><jkpmn8a.pfb>]
(./mptextmp.mp) [5<jkpssbn8a
.pfb><jkpmn8a.pfb>] (./mptextmp.mp) [6<jkpssbn8a.pfb><jkpmn8a.pfb>]
(./mptextmp.mp) [7<jkpssbn8a.pfb
><jkpmn8a.pfb>] (./mptextmp.mp) [8<jkpssbn8a.pfb><jkpmn8a.pfb>]
(./mptextmp.mp) [9<jkpssbn8a.pfb><jk
pmn8a.pfb>] (./mptextmp.mp) [10<jkpssbn8a.pfb><jkpmn8a.pfb>]
(./mptextmp.mp) [11<jkpssbn8a.pfb><jkpm
n8a.pfb>] (./mptextmp.mp) [12<jkpssbn8a.pfb><jkpmn8a.pfb>]
(./mptextmp.mp) [13<jkpssbn8a.pfb><jkpmn8
a.pfb>] (./mptextmp.mp) [14<jkpssbn8a.pfb><jkpmn8a.pfb>] (./mptextmp.mp)
[15<jkpssbn8a.pfb><jkpmn8a.
pfb>] (./mptextmp.mp) [16<jkpssbn8a.pfb><jkpmn8a.pfb>] (./mptextmp.mp)
[17<jkpssbn8a.pfb><jkpmn8a.pf
b>] (./mptextmp.mp) [18<jkpssbn8a.pfb><jkpmn8a.pfb>] (./mptextmp.mp)
[19<jkpssbn8a.pfb><jkpmn8a.pfb>
] (./mptextmp.mp) [20<jkpssbn8a.pfb><jkpmn8a.pfb>] (./mptextmp.mp)
[21<jkpssbn8a.pfb><jkpmn8a.pfb>]
[...]
(./mptextmp.mp) [250<jkpssbn8a.pfb><jkpmn8a.pfb>] (./mptextmp.mp
>> mptextmp.mp
>> mptextmp.mpx
! ! Unable to read mpx file.
l.11 btex
i: $251$ etex
The two files given above are one of your source files
and an auxiliary file I need to read to find out what your
btex..etex blocks mean. If you don't know why I had trouble,
try running it manually through MPtoTeX, TeX, and DVItoMP
250 output files written: test_001.mps .. test_250.mps
I don't understand:
* why it's OK with cm fonts and not with kpfonts
* why it's OK for 250 pictures and not after...
???
Best regards
François Pétiard
More information about the metapost
mailing list.