mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Math
synced 2024-11-27 17:01:07 +00:00
Fix integral command namings
* Remove \strokeint which was probably a typo and should be \strokedint * Add \intBar command Not done: * Implement rendering of \intBar and \intbar, it would make sense to wait for the mathoid reference rending here, which is just around the corner Bug: T137787 Bug: T348373 Change-Id: I19d24fc23f59dda87c7c39a265f17efddb9fee8f
This commit is contained in:
parent
f4c91856bc
commit
272f39ca2d
|
@ -1184,8 +1184,13 @@
|
|||
"\\int": {
|
||||
"nullary_macro": true
|
||||
},
|
||||
"\\intBar": {
|
||||
"nullary_macro": true,
|
||||
"stix_required": true
|
||||
},
|
||||
"\\intbar": {
|
||||
"nullary_macro": true
|
||||
"nullary_macro": true,
|
||||
"stix_required": true
|
||||
},
|
||||
"\\intercal": {
|
||||
"ams_required": true,
|
||||
|
@ -2175,9 +2180,6 @@
|
|||
"nullary_macro_in_mbox": true,
|
||||
"teubner_required": true
|
||||
},
|
||||
"\\strokeint": {
|
||||
"nullary_macro": true
|
||||
},
|
||||
"\\sub": {
|
||||
"nullary_macro_aliase": "\\subset"
|
||||
},
|
||||
|
|
|
@ -400,6 +400,7 @@
|
|||
"\\infty": "tex",
|
||||
"\\injlim": "tex",
|
||||
"\\int": "tex",
|
||||
"\\intBar": "tex",
|
||||
"\\intbar": "tex",
|
||||
"\\intercal": "tex",
|
||||
"\\iota": "tex",
|
||||
|
@ -574,7 +575,6 @@
|
|||
"\\sqsupseteq": "tex",
|
||||
"\\square": "tex",
|
||||
"\\star": "tex",
|
||||
"\\strokeint": "tex",
|
||||
"\\subset": "tex",
|
||||
"\\subseteq": "tex",
|
||||
"\\subseteqq": "tex",
|
||||
|
|
|
@ -12,12 +12,17 @@ use MediaWikiUnitTestCase;
|
|||
/**
|
||||
* This test is checking the MathML generation from LaTeX by TexVC.
|
||||
* It creates a list of basic LaTeX statements from the supported functions
|
||||
* of TexVC from TexUtil.php. Also it loads Reference MathML (mathoid,latexml) from a file
|
||||
* usually defined as "TexUtil-Ref.json"
|
||||
* of TexVC from TexUtil.php.
|
||||
*
|
||||
* This reference file can be generated by reading texutil.json with
|
||||
* the maintenance script: "JsonToMathML.php".
|
||||
*
|
||||
* For Re-Generating the testfile in case of change of macros in texutil.json:
|
||||
*
|
||||
* 1. Create a new ExportedTexUtilKeys.json by running this test with the ExportKeys flag
|
||||
* 2. Create a new TexUtil-Ref file from the new ExportedKeys.json file with maintenances scripts, by running such cmd:
|
||||
* "php extensions/Math/maintenance/JsonToMathML.php
|
||||
* /var/www/html/extensions/Math/tests/phpunit/unit/TexVC/ExportedTexUtilKeys.json
|
||||
* /var/www/html/extensions/Math/TexUtil-Ref.json -i 2"
|
||||
* 3. If generated correctly shift the TexUtil-Ref file in it's usual folder
|
||||
* WIP: This currently just generates MathML with TexVC, but does not do
|
||||
* a comparison.
|
||||
*
|
||||
|
|
|
@ -2405,6 +2405,12 @@
|
|||
"mmlMathoid": "<math xmlns=\"http:\/\/www.w3.org\/1998\/Math\/MathML\" display=\"block\" alttext=\"{\\displaystyle \\int }\">\n <semantics>\n <mrow class=\"MJX-TeXAtom-ORD\">\n <mstyle displaystyle=\"true\" scriptlevel=\"0\">\n <mo>∫<!-- \u222b --><\/mo>\n <\/mstyle>\n <\/mrow>\n <annotation encoding=\"application\/x-tex\">{\\displaystyle \\int }<\/annotation>\n <\/semantics>\n<\/math>",
|
||||
"mmlLaTeXML": "<math xmlns=\"http:\/\/www.w3.org\/1998\/Math\/MathML\" id=\"p1.1.m1.1\" class=\"ltx_Math\" alttext=\"{\\displaystyle{\\displaystyle\\int}}\" display=\"inline\">\n <semantics id=\"p1.1.m1.1a\">\n <mstyle displaystyle=\"true\" id=\"p1.1.m1.1.1\" xref=\"p1.1.m1.1.1.cmml\">\n <mo largeop=\"true\" symmetric=\"true\" id=\"p1.1.m1.1.1a\" xref=\"p1.1.m1.1.1.cmml\">\u222b<\/mo>\n <\/mstyle>\n <annotation-xml encoding=\"MathML-Content\" id=\"p1.1.m1.1b\">\n <int id=\"p1.1.m1.1.1.cmml\" xref=\"p1.1.m1.1.1\"\/>\n <\/annotation-xml>\n <annotation encoding=\"application\/x-tex\" id=\"p1.1.m1.1c\">{\\displaystyle{\\displaystyle\\int}}<\/annotation>\n <\/semantics>\n<\/math>"
|
||||
},
|
||||
{
|
||||
"tex": "\\intBar",
|
||||
"type": "tex",
|
||||
"mmlMathoid": "",
|
||||
"mmlLaTeXML": "<math xmlns=\"http:\/\/www.w3.org\/1998\/Math\/MathML\" id=\"p1.1.m1.1\" class=\"ltx_Math\" alttext=\"{\\displaystyle{\\displaystyle\\intBar}}\" display=\"inline\">\n <semantics id=\"p1.1.m1.1a\">\n <merror class=\"ltx_ERROR undefined undefined\" id=\"p1.1.m1.1.1\" xref=\"p1.1.m1.1.1b.cmml\">\n <mtext id=\"p1.1.m1.1.1a\" xref=\"p1.1.m1.1.1b.cmml\">\\intBar<\/mtext>\n <\/merror>\n <annotation-xml encoding=\"MathML-Content\" id=\"p1.1.m1.1b\">\n <ci id=\"p1.1.m1.1.1b.cmml\" xref=\"p1.1.m1.1.1\">\n <merror class=\"ltx_ERROR undefined undefined\" id=\"p1.1.m1.1.1.cmml\" xref=\"p1.1.m1.1.1\">\n <mtext id=\"p1.1.m1.1.1a.cmml\" xref=\"p1.1.m1.1.1\">\\intBar<\/mtext>\n <\/merror>\n <\/ci>\n <\/annotation-xml>\n <annotation encoding=\"application\/x-tex\" id=\"p1.1.m1.1c\">{\\displaystyle{\\displaystyle\\intBar}}<\/annotation>\n <\/semantics>\n<\/math>"
|
||||
},
|
||||
{
|
||||
"tex": "\\intbar",
|
||||
"type": "tex",
|
||||
|
@ -3449,12 +3455,6 @@
|
|||
"mmlMathoid": "<math xmlns=\"http:\/\/www.w3.org\/1998\/Math\/MathML\" display=\"block\" alttext=\"{\\displaystyle \\star }\">\n <semantics>\n <mrow class=\"MJX-TeXAtom-ORD\">\n <mstyle displaystyle=\"true\" scriptlevel=\"0\">\n <mo>⋆<!-- \u22c6 --><\/mo>\n <\/mstyle>\n <\/mrow>\n <annotation encoding=\"application\/x-tex\">{\\displaystyle \\star }<\/annotation>\n <\/semantics>\n<\/math>",
|
||||
"mmlLaTeXML": "<math xmlns=\"http:\/\/www.w3.org\/1998\/Math\/MathML\" id=\"p1.1.m1.1\" class=\"ltx_Math\" alttext=\"{\\displaystyle{\\displaystyle\\star}}\" display=\"inline\">\n <semantics id=\"p1.1.m1.1a\">\n <mo id=\"p1.1.m1.1.1\" xref=\"p1.1.m1.1.1.cmml\">\u22c6<\/mo>\n <annotation-xml encoding=\"MathML-Content\" id=\"p1.1.m1.1b\">\n <ci id=\"p1.1.m1.1.1.cmml\" xref=\"p1.1.m1.1.1\">\u22c6<\/ci>\n <\/annotation-xml>\n <annotation encoding=\"application\/x-tex\" id=\"p1.1.m1.1c\">{\\displaystyle{\\displaystyle\\star}}<\/annotation>\n <\/semantics>\n<\/math>"
|
||||
},
|
||||
{
|
||||
"tex": "\\strokeint",
|
||||
"type": "tex",
|
||||
"mmlMathoid": "",
|
||||
"mmlLaTeXML": "<math xmlns=\"http:\/\/www.w3.org\/1998\/Math\/MathML\" id=\"p1.1.m1.1\" class=\"ltx_Math\" alttext=\"{\\displaystyle{\\displaystyle\\strokeint}}\" display=\"inline\">\n <semantics id=\"p1.1.m1.1a\">\n <merror class=\"ltx_ERROR undefined undefined\" id=\"p1.1.m1.1.1\" xref=\"p1.1.m1.1.1b.cmml\">\n <mtext id=\"p1.1.m1.1.1a\" xref=\"p1.1.m1.1.1b.cmml\">\\strokeint<\/mtext>\n <\/merror>\n <annotation-xml encoding=\"MathML-Content\" id=\"p1.1.m1.1b\">\n <ci id=\"p1.1.m1.1.1b.cmml\" xref=\"p1.1.m1.1.1\">\n <merror class=\"ltx_ERROR undefined undefined\" id=\"p1.1.m1.1.1.cmml\" xref=\"p1.1.m1.1.1\">\n <mtext id=\"p1.1.m1.1.1a.cmml\" xref=\"p1.1.m1.1.1\">\\strokeint<\/mtext>\n <\/merror>\n <\/ci>\n <\/annotation-xml>\n <annotation encoding=\"application\/x-tex\" id=\"p1.1.m1.1c\">{\\displaystyle{\\displaystyle\\strokeint}}<\/annotation>\n <\/semantics>\n<\/math>"
|
||||
},
|
||||
{
|
||||
"tex": "\\subset",
|
||||
"type": "tex",
|
||||
|
|
|
@ -79,6 +79,7 @@ class TexUtilTest extends MediaWikiUnitTestCase {
|
|||
'other_delimiters2',
|
||||
'right_function',
|
||||
'teubner_required',
|
||||
'stix_required',
|
||||
];
|
||||
|
||||
// Reading data from TexUtil.
|
||||
|
|
Loading…
Reference in a new issue