ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Standalone MetaPost Graphics from ConTeXt
@ 2012-08-30 20:57 Troy Henderson
  2012-08-30 21:13 ` luigi scarso
  2012-08-30 21:38 ` Aditya Mahajan
  0 siblings, 2 replies; 4+ messages in thread
From: Troy Henderson @ 2012-08-30 20:57 UTC (permalink / raw)
  To: mailing list for ConTeXt users, MetaPost List


[-- Attachment #1.1: Type: text/plain, Size: 655 bytes --]

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

[-- Attachment #1.2: Type: text/html, Size: 739 bytes --]

[-- Attachment #2: Type: text/plain, Size: 485 bytes --]

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Standalone MetaPost Graphics from ConTeXt
  2012-08-30 20:57 Standalone MetaPost Graphics from ConTeXt Troy Henderson
@ 2012-08-30 21:13 ` luigi scarso
  2012-08-30 21:38 ` Aditya Mahajan
  1 sibling, 0 replies; 4+ messages in thread
From: luigi scarso @ 2012-08-30 21:13 UTC (permalink / raw)
  To: mailing list for ConTeXt users


[-- Attachment #1.1: Type: text/plain, Size: 951 bytes --]

On Thu, Aug 30, 2012 at 10:57 PM, Troy Henderson <thenders@gmail.com> wrote:

> 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

[-- Attachment #1.2: Type: text/html, Size: 1504 bytes --]

[-- Attachment #2: Type: text/plain, Size: 485 bytes --]

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Standalone MetaPost Graphics from ConTeXt
  2012-08-30 20:57 Standalone MetaPost Graphics from ConTeXt Troy Henderson
  2012-08-30 21:13 ` luigi scarso
@ 2012-08-30 21:38 ` Aditya Mahajan
  2012-08-30 21:44   ` Troy Henderson
  1 sibling, 1 reply; 4+ messages in thread
From: Aditya Mahajan @ 2012-08-30 21:38 UTC (permalink / raw)
  To: mailing list for ConTeXt users; +Cc: MetaPost List

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
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Standalone MetaPost Graphics from ConTeXt
  2012-08-30 21:38 ` Aditya Mahajan
@ 2012-08-30 21:44   ` Troy Henderson
  0 siblings, 0 replies; 4+ messages in thread
From: Troy Henderson @ 2012-08-30 21:44 UTC (permalink / raw)
  To: mailing list for ConTeXt users; +Cc: MetaPost List


[-- Attachment #1.1: Type: text/plain, Size: 22 bytes --]

Thank you both!

Troy

[-- Attachment #1.2: Type: text/html, Size: 32 bytes --]

[-- Attachment #2: Type: text/plain, Size: 485 bytes --]

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2012-08-30 21:44 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-08-30 20:57 Standalone MetaPost Graphics from ConTeXt Troy Henderson
2012-08-30 21:13 ` luigi scarso
2012-08-30 21:38 ` Aditya Mahajan
2012-08-30 21:44   ` Troy Henderson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).