Gerben Wierda schrieb am 05.04.2020 um 12:27:
On 5 Apr 2020, at 11:34, Hans Hagen
wrote: On 4/5/2020 12:29 AM, Gerben Wierda wrote:
I have a series of startMPpage—stopMPpage pairs (with MP code inbetween). These now become separate pages in a single PDF. But I need them to become separate PDF’s each during my ConTeXt run, with a name of my own choosing. Is this possible? I guess this will be problematic, but one can hope (maybe some very low level TeX trickery)... no (i would probably cook up something but it's not worth the trouble and it would add lots of ugly code deep down) but
Yes, I was thinking about some low level open/writeout stuff in TeX but was scared to try.
Still, a \startMPfile{pdffilename}..\stopMPfile (instead of page) would have been great...
Something like this: \starttext \startbuffer[square] \startMPpage draw fullsquare scaled 10 withcolor red ; \stopMPpage \stopbuffer \typesetbufferonly[square] \startbuffer[circle] \startMPpage draw fullcircle scaled 10 withcolor green ; \stopMPpage \stopbuffer \typesetbuffer[circle] \startbuffer[triangle] \startMPpage draw fulltriangle scaled 10 withcolor blue ; \stopMPpage \stopbuffer \savebuffer[list=triangle,prefix=no,file=triangle.tex] \typesetfile[triangle.tex][] \stoptext Wolfgang