[NTG-context] breaking up long input into metapost pages

Hans van der Meer H.vanderMeer at uva.nl
Wed Mar 2 11:56:29 CET 2011


I now have a long input file with many independent sections.
For the moment it is processed as follows:

\starttext
\startTEXpage
\startMPcode
% variable declarations 
% macro definitions with drawing code
input input_data;
\stopMPcode
\stopTEXpage
\stoptext

Now this becomes a bit too large for one page, I tried a Metapost run in luatex but after taking some 12 GB of memory it gave up.
The idea is thus to have one contiguous input which at certain points produces a new startTEXpage. That will flush the internal memory I guess and makes long documents possible.
I'd rather not split the input_data in seperate files: making a thousand of more files seems no nice prospect to me.
Any ideas how to best structure things? I should mention that I have a lot of control over the writing of the input_data.

Hans van der Meer



More information about the ntg-context mailing list