[NTG-context] maximum of \externalfigure in MP
taco at elvenkind.com
Tue Nov 8 12:24:15 CET 2005
andrea valle wrote:
> (Taco, thanks for all the infos. Now, just trying to understand).
> Why the bug manifest itself in this particular tex file? I mean: I have
> made other pieces, both with far less either with far more included pdfs
> and everything was ok.
> What's special in the bug-raiser tex we discussed about?
For every pdf you include, about 80 bytes is added to an internal
string. There is a macro that checks the length of this string, and
it sets a special "there are included pdfs" flag when the strings
length is larger than zero. However, the primitive metapost operation
to get the length of a string is rather stupid, it wraps without ever
checking anything. Just run this bit of metapost code and watch the
s := "";
s := s & " ";
message decimal length s;
(you'll have to kill the process manually)
So, my patch checks for 'not zero', which has a far smaller
chance of being incorrect. Not completely nil, unfortunately.
'length' can actually wrap back to being zero, I'll have to
fix that in metapost itself.
More information about the ntg-context