TexArray is an array of tex nodes. To improve
readability and type hinting we make TexArray
iterable.
Change-Id: I5b9b2ca63400400bc399c08445ff911f8e20a0d1
When collecting user feedback regarding the native
rendering option on the German Wikipedia (T346795)
it became apparent that some power users aim for bigger
and bolder fonts and a more LaTeX-like layout.
MathML, however, aims to format math as an integral part
of the text with uniform fonts and spacing.
To match both user needs, this patch adds a new rendering
option that uses client-side MathJax (without a need for
restbase or mathoid).
* Adjust MathJax`s loader to be compatible with the mw loader
* Add new rendering mode
* Copy MathJax source to resource module as foreign repo
Bug: T354136
Change-Id: I1ecf9c77fefc3b0f717107d81979276023f6cb84
Remove call from FUN_ARopt as the inner
expression of class expr_nosqc is of TexArray
and no unwrapping is needed.
* might reduce the number of extra curly brackets
Bug: T362344
Change-Id: If5e700e0e17c646669a0b52552e51a8b3d0b7617
As expr is of type TexArray there is
no need to wrap this into another TexArray.
Additionally, this makes it makes calls to
lst2arr that unwrap the extra structure useless.
* Use fluent setters for methods used in
grammar
For testing, one should add an assertion
to check that lst2arr is not called on
non (right-skewed) binary trees.
It is, however, not recommended
T276940 to keep the assertions in the code.
Bug: T362344
Bug: T276940
Change-Id: I037495bd0f0be6f1d634a057391fd202f5cafc86
The math equations in the article
https://en.m.wikipedia.org/wiki/0.999...?minervanightmode=1
are not showing when rendered via MathML.
After a quick look I noticed this is using mw-invert rather than
skin-invert class.
Change-Id: I7d1722c49227705fbfc0cf093c7ebe49eaeebcc5
There was only a single caller. Maybe a mistake or just old code
that was never updated.
As well as:
* Avoid the separate open/closeElement when possible, usually in
favor of a single rawElement.
* Note this patch also fixes one place where a message was added to
the HTML output without escaping.
Bug: T341775
Change-Id: I51a29b47fbd8e0269c065e4277ef775f1d659ff6
Unfortunately, in Idcb58694022831113bdc437576bb9f48658fff2f
there is one case where the isCurly was called on an object
that can be null. The fix ensures that the method
is only called on objects that have the respective
method.
Bug: T333973
Change-Id: Ibbbc5851b37e2290616057c46859dd2f19e1c5e7
Configuring parser-factory-callback is not necessary here because it's
the same as the default for the string value type. Setting a data type
specific custom parser will soon allow for data type specific overrides
of the parser whenever a statement value is deserialized, and setting
it may result in additional data type lookups.
Bug: T360603
Change-Id: I6a859b8d9cf25d8a837b366434380169e404fe6b
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
If the Special Page is removed in onSpecialPage_initList, it
is not accessible, so the same logic that is duplicated in
SpecialMathWikibase is redundant.
Remove math-wikibase-special-error-no-wikibase, but leave
math-wikibase-special-error-header because it's used for another
error too.
Change-Id: I62d67a6f39591cc3c8d3b1af80380a6c758ff44f
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
Before PHP 8.2 properties were created dynamically, this is deprecated now. This change patches the class definition and defines the dynamic properties upfront.
Bug: T314099
Bug: T360709
Change-Id: Ic197369647fbd6649daebe994bae39165e3882cc