Re: footnotes in nodes

Jim Diamond via ntg-context <[email protected]> Mon, 3 Aug 2026 13:05:59 -0300
Newsgroups gmane.comp.tex.context
Message-ID <[email protected]>
On Mon, Aug  3, 2026 at 09:40 (+0200), Hans Hagen via ntg-context wrote:

> On 8/3/2026 2:24 AM, Jim Diamond via ntg-context wrote:
>> On Sun, Aug  2, 2026 at 23:20 (+0200), Hans Hagen via ntg-context wrote:

>>> On 8/2/2026 8:07 PM, Jim Diamond via ntg-context wrote:
>>> > On Sun, Aug  2, 2026 at 12:27 (+0200), juh+ntg-context--- via ntg-context wrote:

<snip>

>> Hans,

>> thanks for that.  Is it expected that the first footnotes are numbered
>>          1 2 2
>> rather than 1 2 3?

> Yes, we hash content and render once ... keep in mind that we're talking
> graphics and when you have multiple copies you want them the same. In this
> case, if you really want a different number add something  ({} will do).

Ah, that's an easy work-around.

> Most of these interfaces originate in mkii, so decades old, and we always
> try to be compatible when possible.

That makes perfect sense.

> Keep in mind that mp doesn't really do text out of its own. You can add to
> the bottom of your already long list "look into the way mp typesets text,
> btex/etec and such".

If I don't die until my to-do list is cleared off, I'm going to live for a
very long time.


>> Bonus question: why does having a footnote marker ("superscript") adjust
>> the vertical position of the baseline of the text?  That is, in

>> \enabletrackers[metapost.textexts]

>> \starttext

>> \enabledirectives[metapost.text.fasttrack]

<snip>

>> \stoptext

>> we can see that the "two"s without footnotes have a baseline a tiny bit
>> lower than the other words.

> textext ... one with suffixes .top .left etc and also one normally will add
> a \strut in the text

Indeed.  For anyone eagerly awaiting an answer to "how do I align all the
baselines", here is an answer (fixed only for the top row):

\enabletrackers[metapost.textexts]

\starttext

\enabledirectives[metapost.text.fasttrack]

\startMPcode
draw textext("one \footnote{one}\strut") withcolor red ;
draw textext("two\strut") xshifted 1cm ;
draw textext("two \footnote{two}\strut") xshifted 2cm ;
\stopMPcode

\disabledirectives[metapost.text.fasttrack]

\startMPcode
draw textext("one \footnote{one}") withcolor red ;
draw textext("two") xshifted 1cm ;
draw textext("two \footnote{two}") xshifted 2cm ;
\stopMPcode

\stoptext

I hadn't noticed before that the bottom of "o" is lower than the bottom
serifs of "n" in LM.  The above "solution" aligns the bottom of the "o" (of
"one") with the bottom of the "w" (of "two").  Aligning the bottom serifs
of "n" (in "one") to the bottom of "w" (in "two") is left as an exercise to
the diligent student.

                                Jim

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : [email protected] / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki     : https://wiki.contextgarden.net
___________________________________________________________________________________