On 7/16/06, Hans van der Meer wrote:
Thus while textext delivers a picture sometxt does not. This seems strange, because I understood that sometxt was meant as a dropin replacement for textext (except for MP loops, as Hans Hagen mentioned in a previous email). Is this correct or do I have to make more changes to switch over from textext to sometxt?
I don't know if sometxt is meant to be used as a metapost command. I use it as \setupcolors[state=start] \def\nicecommand#1{nice \quotation{#1}} \starttext \startMPcode draw \sometxt{abc \color[red]{def} $\sqrt{x}$ and quote: " \nicecommand{text}}; \stopMPcode \stoptext textext had to write the text in a separate file, run its own instance of ConTeXt and include that one into metapost and consequently into the original document. It meant: - being slow - \def's don't work - you have to specify everything in MPenvironment since those labels don't see your earlier definitions in the document But with \sometxt you can't use mp variables. To some extent you can so something. See http://archive.contextgarden.net/message/20060623.224940.fa179b0b.en.html. Citing myself (from discussion about gnuplot): I love the new Hans's \sometxt feature, because: - it uses the same font as in the document without the need to specify the font separately in MP environment - no need for uncomfortable way of specifying the definitions/style in gnuplot-locals.tex (simply all the definitions from the document work, even \section-s) - no need for 'verbatimtex ... etex' or for '\def-s' inside metapost or inside MP environment (which didn't work) - external figures can be used for points (YUPI :) !!! - no problems with math and double quotes: I wasn't able to insert double quotes with textext, now it's trivial - text is still part of the graphic: can easily be positioned, colored, shrinked & stretched, ... if I would have to separate it (according to my first idea), I couldn't use metapost to control the color, size, ... but I would have to remember the color for each label separately and the outcome would be different (now I can still place graphic over text) - extremely fast - extremely efficient - extremely elegant to write Hope that it can clarify you at least some things, Mojca