ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Using metapost figures in context
@ 2006-06-12 18:48 Aditya Mahajan
  2006-06-12 21:43 ` Hans Hagen
  0 siblings, 1 reply; 16+ messages in thread
From: Aditya Mahajan @ 2006-06-12 18:48 UTC (permalink / raw)


Hi,

  Does there exist a startstop command (say startMPfigure) for managing 
figures drawn using MP such that

1. I can use \startMPfigure{label} ...... \stopMPfigure and then use
\useexternalMPfigure{label} to include the figure.

2. The figures are converted into pdf once. If the code inside 
\startstop MPfigures changes, the pdf for each figure is recreated.

Basically, I want MPfigures to be converted into pdf for faster 
inclusion in the main document, the figure should be recompiled if 
necessary and I should be able to include the figure using a label 
(so that I can separate the figures from the main document).

uniqueMPgraphic provides the first functionality, but the figure is 
converted into pdf on runtime (thereby increasing the processing time 
of the document).

I can use a separate document with each figure inside a \startMPpage 
... \stopMPpage, but (i) I need to remember figure numbers manually, 
(ii) after making change in one figure, the whole file needs to be 
recompiled.

Another possibility is to use one tex file for each figure, compile 
them separately and then then use figure library to get a "label" for 
each figure. But this becomes difficult to manage, as soon as I get 
large number of files.

Is their something basic that I am missing here? How do others manage 
mpfigures?

To Hans: is it possible to have a \startMPfigure command such that

1. \startMPfigure[label]
      figure code
    \stopMPfigure

creates a \jobname-figure-\nofMPfigurefile file with

current MP environment
current MP inclusion
figure code (from inside \startstop MPfigure)

Convert this into \jobname-figure-\nofMPfigurefile.pdf only if 
something changes (similar to what is done in m-r module).


2. The resultant pdf can be included using \useMPfigure{label}.

Would such a feature make sense?

Aditya

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

end of thread, other threads:[~2006-06-16 10:10 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-06-12 18:48 Using metapost figures in context Aditya Mahajan
2006-06-12 21:43 ` Hans Hagen
2006-06-12 23:29   ` Aditya Mahajan
2006-06-13  0:16     ` Aditya Mahajan
2006-06-13  8:12     ` Hans Hagen
2006-06-14 15:00       ` Aditya Mahajan
2006-06-13  9:38     ` Hans Hagen
     [not found]       ` <Pine.WNT.4.63.0606131213490.892@nqvgln>
2006-06-13 20:16         ` Using metapost figures in context (offlist) Hans Hagen
2006-06-13 20:33           ` Aditya Mahajan
2006-06-13 21:16             ` Hans Hagen
2006-06-14  1:52               ` Aditya Mahajan
2006-06-14  2:03                 ` Aditya Mahajan
2006-06-14  7:35                   ` Hans Hagen
2006-06-14 14:41                     ` Aditya Mahajan
2006-06-16  9:47                     ` Uwe Koloska
2006-06-16 10:10                       ` Hans Hagen

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).