[NTG-context] underbraces get progressively more misaligned (w/ minimal example)

Sanjoy Mahajan sanjoy at MIT.EDU
Sun Jun 29 12:13:57 CEST 2014


Dear list,

As I copyedited my book, I noticed examples where the underbraces in
math formulas were not aligned vertically, especially toward the end of
the book.  Eventually I realized it was not due to my growing
copyediting skill, and I have made the following minimal example showing
the problem (I am using 2014.05.17 MkIV):

\setupformulas[indentnext=auto, spacebefore=none, spaceafter=none]

\starttext

\dorecurse{3000}{
\placeformula\startformula
\underbrace{\hbox{yyyy}}_{\rho} =
\underbrace{\hbox{yyyy yyyy yyyy}}_{\rho}
\stopformula
}

\stoptext

It'll produce a 162-page file.  On the formulas on page 1, the two
underbraces in each equation are aligned.  But there seems to be some
kind of slow leak, because the underbraces become ever more misaligned.
By page 162, they are visibly misaligned by maybe 3pt.  If I increase
the recursion count to 30000, on page 2129 the misalignment is about 30pt.

Taking out the \placeformula makes the misalignment go away.

I tried to reproduce the problem with plain LuaTeX, using the tex file
below, but the underbraces came out aligned.

\newcount\foo
\foo=3000
\loop
$$
\underbrace{\hbox{yyyy}}_{\rho} =
\underbrace{\hbox{yyyy yyyy yyyy}}_{\rho}
$$
\advance \foo -1
\ifnum \foo>0
\repeat

\end

Any thoughts on this very strange issue?

-Sanjoy


More information about the ntg-context mailing list