<HTML><BODY style="word-wrap: break-word; -khtml-nbsp-mode: space; -khtml-line-break: after-white-space; ">Metapost problem: It seems that sometxt and textext behave different.<DIV>This is my macro:</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>% Label with text and centerposition</DIV><DIV>vardef theLabel@#(expr labeltext, pos) = </DIV><DIV><SPAN class="Apple-tab-span" style="white-space:pre">        </SPAN>save pic; picture pic;</DIV><DIV><SPAN class="Apple-tab-span" style="white-space:pre">        </SPAN>if picture labeltext:</DIV><DIV><SPAN class="Apple-tab-span" style="white-space:pre">                </SPAN>pic := labeltext;</DIV><DIV><SPAN class="Apple-tab-span" style="white-space:pre">        </SPAN>else:</DIV><DIV><SPAN class="Apple-tab-span" style="white-space:pre">                </SPAN>if labeltext = "":</DIV><DIV><SPAN class="Apple-tab-span" style="white-space:pre">                        </SPAN>pic := nullpicture;</DIV><DIV><SPAN class="Apple-tab-span" style="white-space:pre">                </SPAN>else:</DIV><DIV><SPAN class="Apple-tab-span" style="white-space:pre">                        </SPAN>% prevent wobbling of text boxes with uneven depth</DIV><DIV>% TEXTEXT line:</DIV><DIV><SPAN class="Apple-tab-span" style="white-space:pre">                        </SPAN>pic := textext("\setbox0=\hbox{"&amp;labeltext&amp;"}\dp0=0pt\box0");</DIV><DIV><SPAN class="Apple-tab-span" style="white-space:pre">                        </SPAN>% since ConTeXt 14-7-2006 textext =&gt; sometxt</DIV><DIV>% SOMETXT line:</DIV><DIV><SPAN class="Apple-tab-span" style="white-space:pre">                        </SPAN>%pic := sometxt("\setbox0=\hbox{"&amp;labeltext&amp;"}\dp0=0pt\box0");</DIV><DIV><SPAN class="Apple-tab-span" style="white-space:pre">                </SPAN>fi</DIV><DIV><SPAN class="Apple-tab-span" style="white-space:pre">        </SPAN>fi</DIV><DIV><SPAN class="Apple-tab-span" style="white-space:pre">        </SPAN></DIV><DIV><SPAN class="Apple-tab-span" style="white-space:pre">        </SPAN>% calculate labelshift from suffix</DIV><DIV><SPAN class="Apple-tab-span" style="white-space:pre">        </SPAN>save shift; pair shift;</DIV><DIV><SPAN class="Apple-tab-span" style="white-space:pre">        </SPAN>shift = ((penX/2 + labeloffset) * xpart laboff@#,</DIV><DIV><SPAN class="Apple-tab-span" style="white-space:pre">                                </SPAN>(penY/2 + labeloffset) * ypart laboff@#)</DIV><DIV><SPAN class="Apple-tab-span" style="white-space:pre">                                </SPAN>- (labxf@# * lrcorner pic + labyf@# * ulcorner pic</DIV><DIV><SPAN class="Apple-tab-span" style="white-space:pre">                                </SPAN>+ (1 - labxf@# - labyf@#) * llcorner pic);</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV><SPAN class="Apple-tab-span" style="white-space:pre">        </SPAN>% deliver picture shifted in position</DIV><DIV><SPAN class="Apple-tab-span" style="white-space:pre">        </SPAN>pic shifted (pos + shift)</DIV><DIV>enddef;</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>With textext enabled it just works as I intend.</DIV><DIV>With sometxt enabled I get:</DIV><DIV>&gt;&gt; unknown picture pic</DIV><DIV>&gt;&gt; sometxt</DIV><DIV>! Equation cannot be performed (unknown picture=numeric).</DIV><DIV>&lt;to be read again&gt; </DIV><DIV>                   (</DIV><DIV>theLabel-&gt;...":pic:=nullpicture;else:pic:=sometxt(</DIV><DIV>                                                  "\setbox0=\hbox{"&amp;(EXPR3)&amp;...</DIV><DIV>l.211 Label("TEXTEXT", (w/2,h/2))</DIV><DIV>                                  withcolor red;</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>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).</DIV><DIV>Is this correct or do I have to make more changes to switch over from textext to sometxt?<BR><DIV> <SPAN class="Apple-style-span" style="border-collapse: separate; border-spacing: 0px 0px; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-align: auto; -khtml-text-decorations-in-effect: none; text-indent: 0px; -apple-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><DIV><BR class="khtml-block-placeholder"></DIV><DIV>Hans van der Meer</DIV><DIV><BR class="khtml-block-placeholder"></DIV><BR class="Apple-interchange-newline"></SPAN> </DIV><BR></DIV></BODY></HTML>