Standalone MetaPost Graphics from ConTeXt
Is there a way to output several MetaPost PDF graphics from a single ConTeXt source file. For example, \startMPpage draw fullcircle scaled 72; \stopMPpage \startMPpage draw unitsquare scaled 72; \stopMPpage and have a separate output PDF generated for each MPpage? It seems that this ConTeXt code generates a single PDF which contains only the first graphic. I would like to have either 1) two separate PDF's with each containing their own graphic 2) a single two page PDF where each page corresponds to the appropriate graphic. Of course, the "holy grail" would be to be able to "compile" a MetaPost source file with ConTeXt. Troy Henderson
On Thu, Aug 30, 2012 at 10:57 PM, Troy Henderson
Is there a way to output several MetaPost PDF graphics from a single ConTeXt source file. For example,
\startMPpage draw fullcircle scaled 72; \stopMPpage
\startMPpage draw unitsquare scaled 72; \stopMPpage
and have a separate output PDF generated for each MPpage? It seems that this ConTeXt code generates a single PDF which contains only the first graphic. I would like to have either
1) two separate PDF's with each containing their own graphic 2) a single two page PDF where each page corresponds to the appropriate graphic.
Of course, the "holy grail" would be to be able to "compile" a MetaPost source file with ConTeXt.
for 2) save this in test.mkiv \starttext \startMPpage draw fullcircle scaled 72; \stopMPpage \startMPpage draw unitsquare scaled 72; \stopMPpage \stoptext $>context test.mkiv -- luigi
On Thu, 30 Aug 2012, Troy Henderson wrote:
Is there a way to output several MetaPost PDF graphics from a single ConTeXt source file. For example,
\starttext
\startMPpage draw fullcircle scaled 72; \stopMPpage
\startMPpage draw unitsquare scaled 72; \stopMPpage \stoptext
and have a separate output PDF generated for each MPpage? It seems that this ConTeXt code generates a single PDF which contains only the first graphic. I would like to have either
If you add \starttext ... \stoptext, then ConTeXt generates a single PDF with all pages.
1) two separate PDF's with each containing their own graphic
You can use external tools like pdftk to split a pdf file into multiple files.
2) a single two page PDF where each page corresponds to the appropriate graphic.
See above.
Of course, the "holy grail" would be to be able to "compile" a MetaPost source file with ConTeXt.
(Relevant? http://article.gmane.org/gmane.comp.tex.context/78007) With a recent beta, you can use: context file.mp to compile a ConTeXt file. Aditya
participants (3)
-
Aditya Mahajan
-
luigi scarso
-
Troy Henderson