On Mon, Aug 23, 2004 at 10:48:42PM -0400, skhilji@tampabay.rr.com wrote:
I don't have any experience in metapost. I would appreciate if someone would please answer this question without me having to do thru tutorials and metapost source code.
I was wondering how does metapost talk to TeX? Quicky glancing through the metafun book, I found out that you can super-impose text typeset by TeX on top of a diagram. I imagine you could do the same with mathematical equations too.
The following is as I understand it; others can I'm sure correct any misunderstandings: Metapost dumps out a TeX file, consisting of any header commands specified in the Metapost file, and whatever is between btex and etex tags. It also puts in stuff so that what's between each pair of tags gets put on its own page. (This is actually done with the mpto command, rather than in Metapost itself; if you just run that, you can examine the output to see what TeX commands it uses.) TeX is then run on this file, creating a .dvi file. Metapost then reads in the .dvi file, using that to create the typeset text that appears in the output Postscript file. - Brooks