# [NTG-context] Line numbering inside display math with mathalign and splitformula

śrīrāma citturs at gmail.com
Mon Mar 28 09:14:49 CEST 2022

Hi everyone,

I have a document with lots of maths. I am using \start...\stoplinenumbering to place line numbers in the inner margins with
\setuplinenumbering
[location=inner,
style=\ttx]

The weird thing is I have many display math blocks that break across page(s) using \start...\stopsplitformula with \start...\stopmathalignment. Curiously, the line numbering does not appear in these splitformula blocks alone. (It works for \start...\stopformula) blocks[*]. Below is a MWE:

%%% start example
\starttext
\startlinenumbering

\input knuth

\startformula\startmathalignment
\NC {\mathcal H}_0 \NC : \text { the null hypothesis } \NR
\NC {\mathcal H}_1 \NC : \text { the alternate hypothesis } \NR
\stopmathalignment \stopformula

\startsplitformula\startmathalignment
\NC t \NC = f_t(x) \NR
\NC m_t \NC = f_m(x) \NR
\stopmathalignment\stopsplitformula

\stoplinenumbering
\stoptext
%%% stop example

Further, [*]when \start...\stopmathalignment is used, only one (vertically centered) line number appears for the entire block. Is there a way to have the 'usual' line numbering inside the math blocks also? It is not a big problem as such: I can do without it since important equations are numbered anyway in the document (and I can use that to refer to them) but I was just curious if it is possible and/or I have missed something.

Many thanks,
Sreeram