#4281·KaTeX

buildHTML 仅在根元素恰好有两个元素时才提升方程标签

作者: AtsushSaito创建于 2026年9月5日更新于 2026年9月5日

**Why it is easy to trip over.** An environment whose html builder returns more than two root elements — say a left-hand side, a delimiter, the alignment and the tag — renders with no number anywhere, and nothing throws. Working out why means reading `buildHTML.ts`: neither the environment API nor any comment mentions the constraint. The workaround is to collapse the other parts into one span purely so the count comes to two.