true, "usemhchemtexified" => true ];
$warnings = [];
$res = $texVC->check( $input, $options, $warnings, true );
$this->assertStringContainsString( 'a',
$res['input']->renderMML() );
}
public function testMathchoiceTextstyle() {
$input = "\\textstyle{\\mathchoice{a}{b}{c}{d}}";
$texVC = new TexVC();
$options = [ "usemhchem" => true, "usemhchemtexified" => true ];
$warnings = [];
$res = $texVC->check( $input, $options, $warnings, true );
$this->assertStringContainsString( 'b',
$res['input']->renderMML() );
}
public function testMathchoiceScriptstyle() {
$input = "\\scriptstyle{\\mathchoice{a}{b}{c}{d}}";
$texVC = new TexVC();
$options = [ "usemhchem" => true, "usemhchemtexified" => true ];
$warnings = [];
$res = $texVC->check( $input, $options, $warnings, true );
$this->assertStringContainsString( 'c',
$res['input']->renderMML() );
}
public function testMathchoiceScriptScriptstyle() {
$input = "\\scriptscriptstyle{\\mathchoice{a}{b}{c}{d}}";
$texVC = new TexVC();
$options = [ "usemhchem" => true, "usemhchemtexified" => true ];
$warnings = [];
$res = $texVC->check( $input, $options, $warnings, true );
$this->assertStringContainsString( 'd',
$res['input']->renderMML() );
}
public function testMskip() {
$input = "\\ce{Cr^{+3}(aq)}";
$texVC = new TexVC();
$options = [ "usemhchem" => true, "usemhchemtexified" => true ];
$warnings = [];
$checkRes = $texVC->check( $input, $options, $warnings, true );
$this->assertStringContainsString( '',
$checkRes["input"]->renderMML() );
}
public function testMkern() {
$input = "\\ce{A, B}";
$texVC = new TexVC();
$options = [ "usemhchem" => true, "usemhchemtexified" => true ];
$warnings = [];
$checkRes = $texVC->check( $input, $options, $warnings, true );
$this->assertStringContainsString( '',
$checkRes["input"]->renderMML() );
}
public function testRaise() {
$input = "\\raise{.2em}{-}";
$texVC = new TexVC();
$warnings = [];
$checkRes = $texVC->check( $input, [ "usemhchem" => true, "usemhchemtexified" => true ],
$warnings, true );
$this->assertStringContainsString( '',
$checkRes["input"]->renderMML() );
}
public function testLower() {
$input = "\\lower{1em}{-}";
$texVC = new TexVC();
$warnings = [];
$checkRes = $texVC->check( $input, [ "usemhchem" => true, "usemhchemtexified" => true ],
$warnings, true );
$this->assertStringContainsString( '',
$checkRes["input"]->renderMML() );
}
public function testLower2() {
$input = "\\lower{-1em}{b}";
$texVC = new TexVC();
$warnings = [];
$checkRes = $texVC->check( $input, [ "usemhchem" => true, "usemhchemtexified" => true ],
$warnings, true );
$this->assertStringContainsString( '',
$checkRes["input"]->renderMML() );
}
public function testLlap() {
$input = "\\llap{4}";
$texVC = new TexVC();
$warnings = [];
$checkRes = $texVC->check( $input, [ "usemhchem" => true, "usemhchemtexified" => true ],
$warnings, true );
$this->assertStringContainsString( '4',
$checkRes["input"]->renderMML() );
}
public function testRlap() {
$input = "\\rlap{-}";
$texVC = new TexVC();
$warnings = [];
$checkRes = $texVC->check( $input, [ "usemhchem" => true, "usemhchemtexified" => true ],
$warnings, true );
$this->assertStringContainsString( '−',
$checkRes["input"]->renderMML() );
}
public function testSmash1() {
$input = "\\smash[t]{2}";
$texVC = new TexVC();
$warnings = [];
$checkRes = $texVC->check( $input, [ "usemhchem" => true, "usemhchemtexified" => true ],
$warnings, true );
$this->assertStringContainsString( '', $checkRes["input"]->renderMML() );
}
public function testSmash2() {
$input = "\\smash[b]{x}";
$texVC = new TexVC();
$warnings = [];
$checkRes = $texVC->check( $input, [ "usemhchem" => true, "usemhchemtexified" => true ],
$warnings, true );
$this->assertStringContainsString( '', $checkRes["input"]->renderMML() );
}
public function testSmash3() {
$input = "\\smash[bt]{2}";
$texVC = new TexVC();
$warnings = [];
$checkRes = $texVC->check( $input, [ "usemhchem" => true, "usemhchemtexified" => true ],
$warnings, true );
$this->assertStringContainsString( '',
$checkRes["input"]->renderMML() );
}
public function testSmash4() {
$input = "\\smash[tb]{2}";
$texVC = new TexVC();
$warnings = [];
$checkRes = $texVC->check( $input, [ "usemhchem" => true, "usemhchemtexified" => true ],
$warnings, true );
$this->assertStringContainsString( '',
$checkRes["input"]->renderMML() );
}
public function testSmash5() {
$input = "\\smash{2}";
$texVC = new TexVC();
$warnings = [];
$checkRes = $texVC->check( $input, [ "usemhchem" => true, "usemhchemtexified" => true ],
$warnings, true );
$ar = $checkRes["input"]->renderMML();
$this->assertStringContainsString( '