@@ -281,8 +281,8 @@ local function isOperatorKind (tree, typeOfAtom)
281281 if tree .command ~= " mo" then
282282 return false
283283 end
284- -- Case \mo[atom=big ]{ops}
285- -- E.g. \mo[atom=big ]{lim}
284+ -- Case \mo[atom=xxx ]{ops}
285+ -- E.g. \mo[atom=op ]{lim}
286286 if tree .options and tree .options .atom == typeOfAtom then
287287 return true
288288 end
@@ -391,6 +391,7 @@ local function compileToMathML_aux (_, arg_env, tree)
391391 table.insert (stack , children )
392392 local mrow = {
393393 command = " mrow" ,
394+ is_paired = true , -- Internal flag to mark this re-wrapped mrow
394395 options = {},
395396 child ,
396397 }
@@ -454,7 +455,7 @@ local function compileToMathML_aux (_, arg_env, tree)
454455 end
455456 tree .options = {}
456457 -- Translate TeX-like sub/superscripts to `munderover` or `msubsup`,
457- -- depending on whether the base is a big operator
458+ -- depending on whether the base is an operator with moveable limits.
458459 elseif tree .id == " sup" and isMoveableLimits (tree [1 ]) then
459460 tree .command = " mover"
460461 elseif tree .id == " sub" and isMoveableLimits (tree [1 ]) then
@@ -628,20 +629,19 @@ compileToMathML(
628629 \def{dsi}{\mi[mathvariant=double-struck]{#1}}
629630 \def{vec}{\mover[accent=true]{#1}{\rightarrow}}
630631
631- \def{lim}{\mo[movablelimits=true]{lim}}
632-
633632 % From amsmath:
634633 \def{to}{\mo[atom=bin]{→}}
635- \def{gcd}{\mo[movablelimits=true]{gcd}}
636- \def{sup}{\mo[movablelimits=true]{sup}}
637- \def{inf}{\mo[movablelimits=true]{inf}}
638- \def{max}{\mo[movablelimits=true]{max}}
639- \def{min}{\mo[movablelimits=true]{min}}
634+ \def{lim}{\mo[atom=op, movablelimits=true]{lim}}
635+ \def{gcd}{\mo[atom=op, movablelimits=true]{gcd}}
636+ \def{sup}{\mo[atom=op, movablelimits=true]{sup}}
637+ \def{inf}{\mo[atom=op, movablelimits=true]{inf}}
638+ \def{max}{\mo[atom=op, movablelimits=true]{max}}
639+ \def{min}{\mo[atom=op, movablelimits=true]{min}}
640640 % Those use U+202F NARROW NO-BREAK SPACE in their names
641- \def{limsup}{\mo[movablelimits=true]{lim sup}}
642- \def{liminf}{\mo[movablelimits=true]{lim inf}}
643- \def{projlim}{\mo[movablelimits=true]{proj lim}}
644- \def{injlim}{\mo[movablelimits=true]{inj lim}}
641+ \def{limsup}{\mo[atom=op, movablelimits=true]{lim sup}}
642+ \def{liminf}{\mo[atom=op, movablelimits=true]{lim inf}}
643+ \def{projlim}{\mo[atom=op, movablelimits=true]{proj lim}}
644+ \def{injlim}{\mo[atom=op, movablelimits=true]{inj lim}}
645645
646646 % Standard spaces gleaned from plain TeX
647647 \def{thinspace}{\mspace[width=thin]}
0 commit comments