Download METAOBJ Manual - (La)TeX Navigator

Transcript
11
Memory requirements –
metapost bug
The metaobj package is very large. It uses a lot of strings and causes many
“string compactions” in metapost. When I started to write it, I quickly ran
into a strange error, which didn’t appear as a standard array overflow. None of
the numbers output when tracingstats is set to 1 had reached their limits, and
none was near its limits. However, the strange errors vanished when increasing
the value of pool_size. The error was observed on linux with a Web2C 7.3.1
installation and metapost 0.641 and on Solaris with the TEXlive 5 setup. It
is likely that the bug is still around in the TEXlive 6 setup. So far, I was unable
to get a small file demonstrating the bug, which might have something to do
with the “string compactions.”
Increasing pool_size should be attempted only when the limit is explicitely
reached, or it is not reached, but you are sure your source is correct and still
have a strange error. Other values may also need to be increased, but the bug
I suspect seems related with pool_size.
If you increase pool_size, you are on your own. I have no idea how much
it should be increased to avoid the bug.
If you can get a small file demonstrating the bug, let me know.
setObjectDefaultOption("Tree")("treemode")("D");
setCurveDefaultOption("arrows")("drawarrow");
t:=T_(new_Polygon_(btex root etex)(4)("name(top)"))
(new_Box_(btex x etex)("framed(false)","name(lx)"),
new_Box_(btex y etex)("framed(false)","name(ly)"),
new_Box_(btex z etex)("framed(false)","name(lz)"))
("edge(none)","vsep(1.5cm)");
ncbar.Obj(t)("top")("lx") "angleA(180)","armA(1cm)";
ncline.Obj(t)("top")("ly");
ncbar.Obj(t)("top")("lz") "angleA(0)","armA(1cm)";
Obj(t).c=origin;
draw_Obj(t);
\begin{metaobj}
\mosetO{Tree}{treemode=D}
\mosetC{arrows=drawarrow}
\setObj{t}{\Tree{\Polygon{root}{4}[name=top]}
{\Box{x}[framed=false,name=lx],
\Box{y}[framed=false,name=ly],
\Box{z}[framed=false,name=lz]}
[edge=none,vsep=1.5cm]}
\ncbar[t]{top}{lx}[angleA=180,armA=1cm]
\ncline[t]{top}{ly}
\ncbar[t]{top}{lz}[angleA=0,armA=1cm]
\pos{t.c}{origin}
\draw{t}
\end{metaobj}
Figure 45: Example of possible embedding of metaobj in LATEX; above, a
typical metaobj code; below, a possible TEX representation. (The TEX frontend does not yet exist and the commands shown here are imaginary.)
123