On Thu, 22 May 2003 11:47:14 +0200
Michal Kvasnicka
I'd like to join two point (E1 and E2) having the same ypart (ypart(E1)=ypart(E2)) with the TeX underbrace sign. To do it I have to tell TeX (via btex ... etex?) the horizontal distance of the two points. Do you know how can I do it?
%%% snip--> input TEX ; pair E[] ; numeric XShift ; XShift := 3cm ; E1 := (1,13) ; E2 := E1 shifted (XShift,0) ; beginfig(1); pickup pencircle scaled 2pt ; draw E1 ; label.top("E1",E1); draw E2 ; label.top("E2",E2); labeloffset := 0 ; label.bot( TEX("$\underbrace{\hbox to " & (decimal (xpart (E2-E1))) & "bp{}}$"), 0.5[E1,E2]) ; endfig; end %%%<--snap The example above is plain MP. Embedded in a ConTeXt document you should better use the "textext" macro instead of the "TEX" macro from TEX.mp. Jens