File tree Expand file tree Collapse file tree 1 file changed +18
-2
lines changed Expand file tree Collapse file tree 1 file changed +18
-2
lines changed Original file line number Diff line number Diff line change @@ -560,7 +560,7 @@ export const AmsMethods: { [key: string]: ParseMethod } = {
560560 let arrow = parser . create (
561561 'token' ,
562562 'mo' ,
563- { stretchy : true , texClass : TEXCLASS . REL } ,
563+ { stretchy : true , texClass : TEXCLASS . ORD } , // REL is applied in a TeXAtom below
564564 String . fromCodePoint ( chr )
565565 ) ;
566566 if ( m ) {
@@ -588,7 +588,23 @@ export const AmsMethods: { [key: string]: ParseMethod } = {
588588 // @test Above Left Arrow, Above Right Arrow, Above Left Arrow in Context,
589589 // Above Right Arrow in Context
590590 NodeUtil . setProperty ( mml , 'subsupOK' , true ) ;
591- parser . Push ( mml ) ;
591+ //
592+ // Use an empty item to prevent the xarrow from further stretching (see #3457)
593+ // and enclose both in a TeXAtom to make the combination a REL.
594+ //
595+ parser . Push (
596+ parser . create (
597+ 'node' ,
598+ 'TeXAtom' ,
599+ [
600+ parser . create ( 'node' , 'TeXAtom' , [ ] , {
601+ texClass : TEXCLASS . NONE ,
602+ } ) ,
603+ mml ,
604+ ] ,
605+ { texClass : TEXCLASS . REL }
606+ )
607+ ) ;
592608 } ,
593609
594610 /**
You can’t perform that action at this time.
0 commit comments