mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Math
synced 2024-11-27 17:01:07 +00:00
Fix liminf and limsup spacing
* and injlim projlim spacing Bug: T350491 Change-Id: I7e4491fbdd461a4583f5418ba1924c647bb2df94
This commit is contained in:
parent
ac1d7a9a7b
commit
7b03a170db
|
@ -30,8 +30,8 @@ class AMSMappings {
|
|||
"notag" => 'HandleNoTag',
|
||||
"eqref" => [ 'HandleRef', true ],
|
||||
"substack" => [ 'macro', '\\begin{subarray}{c}#1\\end{subarray}', 1 ],
|
||||
"injlim" => [ 'namedOp', 'inj lim' ],
|
||||
"projlim" => [ 'namedOp', 'proj lim' ],
|
||||
"injlim" => [ 'namedOp', 'inj lim' ],
|
||||
"projlim" => [ 'namedOp', 'proj lim' ],
|
||||
"varliminf" => [ 'macro', '\\mathop{\\underline{\\mmlToken{mi}{lim}}}' ],
|
||||
"varlimsup" => [ 'macro', '\\mathop{\\overline{\\mmlToken{mi}{lim}}}' ],
|
||||
// replaced underrightarrow here not supported
|
||||
|
|
|
@ -420,8 +420,8 @@ class BaseMappings {
|
|||
"ker" => 'namedFn',
|
||||
"lg" => 'namedFn',
|
||||
"lim" => 'namedOp',
|
||||
"liminf" => [ 'namedOp', 'lim inf' ],
|
||||
"limsup" => [ 'namedOp', 'lim sup' ],
|
||||
"liminf" => [ 'namedOp', 'lim inf' ],
|
||||
"limsup" => [ 'namedOp', 'lim sup' ],
|
||||
"ln" => 'namedFn',
|
||||
"log" => 'namedFn',
|
||||
"max" => 'namedOp',
|
||||
|
|
|
@ -638,9 +638,10 @@ class BaseParsing {
|
|||
$applyFct = MMLParsingUtil::renderApplyFunction();
|
||||
}
|
||||
}
|
||||
|
||||
if ( $node instanceof Literal ) {
|
||||
$mi = new MMLmi( "", $passedArgs );
|
||||
return $mi->encapsulateRaw( $name ) . $applyFct;
|
||||
return $mi->encapsulateRaw( $id ?? $name ) . $applyFct;
|
||||
}
|
||||
$mrow = new MMLmrow( TexClass::ORD, [] );
|
||||
$msub = new MMLmsub( "", $passedArgs );
|
||||
|
|
|
@ -15,6 +15,15 @@ use MediaWikiUnitTestCase;
|
|||
* @covers \MediaWiki\Extension\Math\TexVC\TexVC
|
||||
*/
|
||||
class MMLRenderTest extends MediaWikiUnitTestCase {
|
||||
public function testLimOperatorSpacing() {
|
||||
$input = "\liminf v, \limsup w \injlim x \projlim y";
|
||||
$mathMLtexVC = $this->generateMML( $input );
|
||||
$this->assertStringContainsString( "lim inf", $mathMLtexVC );
|
||||
$this->assertStringContainsString( "lim sup", $mathMLtexVC );
|
||||
$this->assertStringContainsString( "inj lim", $mathMLtexVC );
|
||||
$this->assertStringContainsString( "proj lim", $mathMLtexVC );
|
||||
}
|
||||
|
||||
public function testTrimNull() {
|
||||
$input = "\\bigl( \\begin{smallmatrix}a&b\\\\ c&d\\end{smallmatrix} \\bigr)";
|
||||
$mathMLtexVC = $this->generateMML( $input );
|
||||
|
|
Loading…
Reference in a new issue