[metapost] latex text along a curve

Stephan Hennig mailing_list at arcor.de
Sat Aug 4 00:59:08 CEST 2007


Manuel Yguel schrieb:

>> result here: http://cjoint.com/?ido4XwnH3g

Thank you for the example!


> But Stephan is right to point me out that his package is really much more
> powerfull, especially with the square roots and the fractions
> [...]
> directly ask Stephan if he thinks that porting his work in asymptote
> will be a complexe challenge.

Well, powerful ...  The textpath.mp package has originally been written
with a much simpler application in mind:  annotating plain text labels
to radial trees.

That is, since I've never needed mathematical formulae, but found a way
to handle horizontal rules (after I noticed ugly results as shown in
figure 15 in the manual) it shouldn't be too hard to do the same in
Asymptote.  Since I didn't have a closer look at Asymptote so far, I
have to ask some basic questions about that tool:

(i)  Can a picture held in a picture variable be decomposed into basic
elements such as characters (textual items), rules (stroked items), etc.
and can those elements be recognized as such?  That is, can you iterate
over the elements of a picture and distinguish characters and rules?

(ii)  Is it possible to access properties of those basic items, e.g.,
bounding box, font name, ASCII value, etc.?

(iii)  Are there means to

  (a)  get the direction at a point on a path and to
  (b)  build paths from Beziér elements (or what's the basic curved path
element) with a determined direction at the endpoints?

If all those questions can be answered "Yes.", then it should be
possible to implement the same features textpath.mp has in an Asymptote
package.  I can't help much with that, but I can certainly assist with
outlining the approach taken in textpath.mp.

Best regards,
Stephan Hennig


More information about the metapost mailing list