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. So how does metapost interact with TeX? Let me guess: 1) Metapost could first write down to a file the text that it wan't TeX to typeset. It could then run TeX on the file. TeX produces a DVI file and metapost reads it back. It can then superimpose it on top of a picture. 2) Metapost could also be including within itself a simplified version of TeX. But that would be reinventing the wheel. So how does it happen in reality? The reason that I am asking is that I am interested in producing some diagrams using the libHARU PDF library (a C++ library to produce PDF files). Beautiful Text support, however, is missing from the library. I was wondering if I could hack it up so that I could somehow use TeX for the text part and C++ calls for the graphics part.