Previously, we were using div containers to SVG fallback images to
mimic the MathML behaviour. This had unintended side
effects as reported in T182041.
This change uses span containers for both display and inline math
fallback images.
Bug: T182041
Change-Id: I1d563f9f3cba8a10af2665518be6c672de174333
In MathML outer table boarders are represented with the
notation attribute of an menclose element. The inner
boarders are represented by the rowlines attribute
of the mtable element. The rowline element accepts
a space seperated list of row boarders. In LaTeX
the bottom line is represented by a new matrix row
that only contains \hline.
This change discover \hline elements in matrix cells
and then determines if it is in the first or last line.
When it is in the last line, the line is removed to avoid
an empty <mtr /> in the output.
Bug: T366417
Change-Id: I196e0d14a183a63696363f9e3006cf65571dc56c
Originally the parse tree was a binary tree, from that
time matrix element were put into that data structure.
This was partially undone, but not full which leads to some artifacts
in matrix cells.
One of the problem is that due to the binary parse
tree structure the postprocessing did not correctly
identfy \limits.
This change changes reduces nesting from matrix, and regards
matrix instances as two-dimensional TexArrays.
Bug: T362344
Change-Id: I66a31a09f204709a51d6b5c9ecefc083f7ee2d6d
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