From: Aditya Mahajan <adityam@umich.edu>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Re: metapost to pdf on the fly
Date: Thu, 29 Sep 2011 15:21:50 -0400 (EDT) [thread overview]
Message-ID: <alpine.LNX.2.02.1109291517571.17969@nqv-gnoyrg> (raw)
In-Reply-To: <C86401DD-56E1-4FC4-AEC7-E23045B5DEEC@uva.nl>
On Thu, 29 Sep 2011, Meer, H. van der wrote:
> I would like to generate metapost figures in separate pdf-files (in some convenient directory, they are reused elsewhere). This as part of a project structure. I know that on a separate run such a pdf can be generated with:
> context figurefile running on input
> \input some-metapost-inclusions
> \starttext
> \startMPpage
> ..
> \stopMPpage
> \stoptext
>
> But the idea is to do it on the fly while typesetting a project (using mode=*first to prevent further iterations):
> ..
> \component figurefile
> ..
> And in the figurefile
> \startcomponent figurefile
> \environment some-metapost-inclusions
> \starttext
> .. BUT THEN WHAT?
>
> As such it is not sufficient for the goal proposed. Can this be done at all?
What I usually do is have all the figures in separate buffers:
\startenvironment figures
\startbuffer[fig-1]
...
\stopbuffer
\stopenvironment
and in the main file
\environment figures
\starttext
....
\processMPbuffer[fig-1]
....
\stoptext
This way you can also combine multiple figures using
\processMPbuffer[fig-common,fig-1]
etc.
The metapost processing is fast enough that there is no noticable speed
difference.
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
___________________________________________________________________________________
next prev parent reply other threads:[~2011-09-29 19:21 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-09-29 18:37 Meer, H. van der
2011-09-29 19:21 ` Aditya Mahajan [this message]
2011-10-03 7:05 ` Meer, H. van der
2011-10-03 7:09 ` Wolfgang Schuster
2011-10-03 8:12 ` Meer, H. van der
2011-10-03 9:33 ` Mojca Miklavec
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=alpine.LNX.2.02.1109291517571.17969@nqv-gnoyrg \
--to=adityam@umich.edu \
--cc=ntg-context@ntg.nl \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).