6

We are all familiar with MetaPost labels:

label.top(btex $a_t$ etex, z0);

The problem with the above is that the positioning is based on the entire label, including the subscript.

How do I calculate the positioning based on the baseline of the text, i.e. only the "a" part, and not the "t" subscript?

3

Smash the box:

label.top(btex \setbox0=\hbox{$a_t$}\dp0=0pt \box0 etex, z0);

However this will ignore the depth when computing the bounding box, so you may have to add something to it if the label is near the bottom of the image.

|improve this answer|||||

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.