File tree Expand file tree Collapse file tree 2 files changed +34
-0
lines changed
testsuite/tests/input/tex Expand file tree Collapse file tree 2 files changed +34
-0
lines changed Original file line number Diff line number Diff line change @@ -12198,6 +12198,33 @@ describe('Character Class Changes', () => {
1219812198
1219912199 /********************************************************************************/
1220012200
12201+ it('Mathop Apply', () => {
12202+ toXmlMatch(
12203+ tex2mml('\\mathop{F} x'),
12204+ `<math xmlns="http://www.w3.org/1998/Math/MathML" data-latex="\\mathop{F} x" display="block">
12205+ <mrow data-mjx-texclass="OP" data-latex="\\mathop{F}">
12206+ <mi data-latex="F">F</mi>
12207+ </mrow>
12208+ <mo data-mjx-texclass="NONE">⁡</mo>
12209+ <mi data-latex="x">x</mi>
12210+ </math>`
12211+ );
12212+ });
12213+
12214+ /********************************************************************************/
12215+
12216+ it('Mathop No Apply', () => {
12217+ toXmlMatch(
12218+ tex2mml('\\mathop{} x'),
12219+ `<math xmlns="http://www.w3.org/1998/Math/MathML" data-latex="\\mathop{} x" display="block">
12220+ <mrow data-mjx-texclass="OP" data-latex="\\mathop{}"></mrow>
12221+ <mi data-latex="x">x</mi>
12222+ </math>`
12223+ );
12224+ });
12225+
12226+ /********************************************************************************/
12227+
1220112228 it('Mathrel', () => {
1220212229 toXmlMatch(
1220312230 tex2mml('\\mathrel{R}'),
Original file line number Diff line number Diff line change @@ -787,6 +787,13 @@ export class FnItem extends BaseItem {
787787 return [ [ top , item ] , true ] ;
788788 }
789789 }
790+ // @test Mathop Apply, Mathop No Apply
791+ if (
792+ top . isKind ( 'TeXAtom' ) &&
793+ top . childNodes [ 0 ] ?. childNodes ?. length === 0
794+ ) {
795+ return [ [ top , item ] , true ] ;
796+ }
790797 // @test Named Function, Named Function Arg
791798 const node = this . create (
792799 'token' ,
You can’t perform that action at this time.
0 commit comments