To reduce the complexity of the parse tree we remove the curly
element which is used for grouping in TeX. Instead, we use
use an attribute which defines if the group is put into curly
brackets or not. The functionality of the curly element
is transferred to the TexArray which was the only possible
child of the curly element before. To ease the transition,
we add a special constructor to TexArray.
We could not measure any performance implications of this change.
Bug: T333973
Change-Id: Idcb58694022831113bdc437576bb9f48658fff2f
The LaTeXML reference variant seems to be generated
with a slightly different version than before
Bug: T354057
Change-Id: I3d51dc06664120a1c7f9a933d7328210b7c6817f
While investigating the dependency between
Math and Wikibase, it turned out there was
a hard dependency in the test code.
This change makes the availability of the Wikibase
Extension optional and conditionally skips tests.
Bug: T362027
Change-Id: I9401d7d4a3277b6923dcd81f411ac5a08f1242d2
Excluded Generic.WhiteSpace.ScopeIndent as
it impact many lines in switch/case syntax
Also disable BraceNotOnOwnLine due to T347440
Change-Id: Ia0c8072da9b7bff6a4010d3fb70cb0e576cdf98a
Expecting E_ERROR and E_USER_ERROR is deprecated and will no longer be
possible in PHPUnit 10.
Bug: T342110
Change-Id: I713460ef62f1dbdf1332916965e833e7f9074e3c
`$this->createMock( User::class )` will return a mock User object
with all fields defaulting to null and this will fail when the
`onGetPreferences()` hook fires in CA since that gets consumed by
`getFormDescriptor()` in PreferencesFactory.
This patch changes the mock user object to a test user object and
this is fine because it's already an integration test.
Bug: T357854
Change-Id: I3d80fc1e59ff00a1a08def41c53d82bc093b6e00
Adding action=purge to the url did not bypass cache
in native mode, because the check request was performed
before the purge information was passed.
* Move purge property to the base class
* Pass purge option via the checker constructor
* Add cache checking for mathoid checker
* Adjust method signatures accordingly
Change-Id: I6f545060ae72dac8b12fb0f85662c4048059b2e9
Following the same argument as for accents,
font options should also be passed in underOver
constructs.
* Pass options
* Add test
* In I6924d712db6852f99d7896b1f11cfbd22851d757
curly learned to encapsulate its output in a
mrow. Thus, the if-clause is no longer needed.
Bug: T352609
Change-Id: I6dd3303d9b5ef9ae32ad33c91a4cc1bbdad46109
Accents such as \widetilde did not pass
their font options to their child element.
* Pass options
* Add test
* In I6924d712db6852f99d7896b1f11cfbd22851d757
curly learned to encapsulate its output in a
mrow. Thus, the if-clause is no longer needed.
Bug: T352609
Change-Id: I81ecda09d017c73a4593ae36c630426229c7559f
instead of testing if an operator starts
with the letter \o we keep an explicit
dictonary of operators which should
be rendered using mover instead of
msub.
Bug: T352699
Change-Id: I916acf2f71d747a31a882fecfccac832436ea991
* Uses BagOfStuff caching instead of custom-made DB cache
* By configuring the BagOfStuff cache in a way that
it writes to the database no performance implications are expected
* For WMF-use this should have no effect since restbase
is used to cache stuff
* Replaces Ib2c216f54e6817ee2c3be0355ba72bd4769ba6ea
Bug: T349442
Change-Id: I1ce8ad9cf4c1a9ae71f447e4e067b39ee2601640
Changes to the use statements done automatically via script
Addition of missing use statement done manually
Change-Id: I8fad94b215664fb77acf8cd8140232271d2c2837
In TeX display math mode \sum_a^b is rendered as
munderover, however \alpha_a^b is redndered as
msubsup.
This changes improves the heuristics to differentiate
between munderover operators such as sum prod and
other macros such as alpha, beta ...
Bug: T352697
Change-Id: I5a993e379791edeb3623171265e5be2651ee1359
When rendering subscripts font arguments such as upright
font were not passed to the child nodes.
This changes passes the parameters.
Bug: T353340
Change-Id: I487bb01afa0d64c809affc4b8a466337d71a1c76
* make intent annotations possible in TeX math items
* introduce a new command to annotate as well as node and translation
* Adds a parser expression grammar to validate intent attributes for
* it basically adds the previous, now abandoned changeset: https://gerrit.wikimedia.org/r/c/mediawiki/extensions/Math/+/949964
Bug: T327098
Change-Id: I21adfac4c3580e238f059721fdf0c1566cb4e857
* map to literals to corresponding unicode characters when a double-struck state is recognized
Bug: T352196
Change-Id: I9b9e1d87c10858789751cd14f23d2feea3b928dd
* genFrac renderMML function with bracket can produce false stretching
on Chrome
* fixed for the cases with brackets (dbinom, tbinom, binom)
Bug: T350735
Change-Id: I0939de86963fa9c226346ce15e7edf7fc4e83c68
* to named functions and named operators
* You can consider using that invisible apply character (U+2061) after other function names with known arguments (such as \sin, \cos...). Some accessibility tools take advantage of it, I am told, but it may also be used to provide correct spacing from the MathML operator dictionary. In Chrome <mi>sin</mi><mi>a</mi> will show up with no added spacing as sina, which is not ideal.
* namedFct with any succeeding macros/characters have an apply function
Bug : T350021
Change-Id: I7ee5fdd580fb018bc108a32500c17914dd5dc05f
* PNG images are no longer displayed as of
I595926027433182cc0396570bc3f1ce0cd2cafb3
* Remove functional dead code about PNG images
* Replace some type hints with type delcarations
Bug: T311620
Change-Id: I283c23e327ef908cfb4c827599fdcdb16252b08c
- munder: if only one child munder is not added as wrapping mml tag
- msup: renders an empty mi if there is no content for the superscript
This prevents some warnings in firefox browser dev-console.
Bug: T349825
Change-Id: Ia5efc1f33e3368e71527153d56160eee4ba3a46d
* From Feedback: The {smallmatrix} example has its fences wrapped in too many mrows I think, so it renders without stretching them in both Firefox and Chrome. Ideally you should be able to emit the <mo>(</mo> followed directly by an <mtable>, and trailed by <mo>)</mo>, and only wrap those 3 into a parent <mrow>.
* removes mrows and adds OPEN / CLOSE attributes
* tests MMLFullcoverage 194 to ~196 which cover the bigXYZ macros look
ok
Bug: T348971
Change-Id: Ie444e5bb3e3f87fac915d2692b69e976d721582e
* From Feedback: There is a curious use of <mstyle> around spacing elements, as in <mstyle scriptlevel="0"><mspace width="-0.167em"></mspace></mstyle>. I am not sure that wrapper element is needed? The mspace ought to be successful standalone.
* this is in the 'bmod' case
Bug: T349822
Change-Id: I9229ad73891d5000679761d3d4b2028d4a51ddf1