Commit graph

25 commits

Author SHA1 Message Date
physikerwelt 0781935316
Fix: Don't render ' inside LR structures
$\left(a\right)'$ produced rendered MathML output that
looked like $\left(a'\right)'$.

* Remove the deriv (') state when rendering the element
within the brackets.

Bug: T381102
Change-Id: Id7f192c1f6b7bf4109e735e393e2546e5a39efd7
2024-11-29 01:13:15 +01:00
physikerwelt 0458ea160e Parse row height specification in multiline environments
* Transform structure rich information on LaTeX length
 specifications introduced in I08996129beca9ad852d23f28d7136c982707aea1
 into new TexNode class
* Adjust rows, i.e., arrays to hold length information
* Add tests

Bug: T380654
Change-Id: I1aff53c7a5782c1333ed4c16639dfc660802931c
2024-11-25 14:22:15 +00:00
jenkins-bot 44243ad466 Merge "Overwrite spacing for divide" 2024-11-14 09:13:21 +00:00
jenkins-bot fb4e72d64c Merge "Treat ! as operator" 2024-11-14 09:13:19 +00:00
jenkins-bot 0bfd22b57b Merge "Don't stretch delimiters and operators when used as literals" 2024-11-14 09:11:45 +00:00
jenkins-bot 5fbcff7819 Merge "Treat colon as operator" 2024-11-10 21:43:02 +00:00
physikerwelt 758f9c987a
Overwrite spacing for divide
This overwrite should be removed once this is the
default in all browsers.

Bug: T375337
Change-Id: I5ab133f0368ed6eef94b0a87281bb9129fca406c
2024-11-10 16:45:23 +01:00
physikerwelt 5cde747b49
Treat ! as operator
Bug: T375935
Change-Id: Iec8e69d28fa3cc32b2c2e87f81707b9fd7af5576
2024-11-09 08:05:22 +01:00
physikerwelt aee95695b8
Don't stretch delimiters and operators when used as literals
* Adjust tests

Bug: T375959
Change-Id: I02de8244b73c4b98a1467011a0035df059917c13
2024-11-09 08:04:24 +01:00
physikerwelt fcb667f733
Treat colon as operator
Bug: T375974
Change-Id: Ia553e77a04edfee12fa0f236375d67a88eefee67
2024-11-09 06:33:07 +01:00
physikerwelt 775fec5450
Treat \operatorname as a valid operator for limits
* Extend logic for checking for valid operators
* Add tests

Bug: T365170
Change-Id: I4d3762e3258c78ac5fae8b923f12aabcd2175f3d
2024-11-06 23:04:13 +01:00
physikerwelt dab5364b31
Use cell based table rendering
* Add hline search in matrix construction:
** This avoids a second scan later for the cost of some
   memory overhead
* Parse | in array column specification
* Add CSS based table lines as done by TMML, cf.
https://github.com/w3c/mathml-core/issues/245

Bug: T377167
Change-Id: I6e29b47b1731638ea9b06de3006ce2834e4f0c68
2024-10-29 05:48:34 +01:00
jenkins-bot 9c9c20e09e Merge "Use munder instead of msub for large operators" 2024-10-16 12:38:21 +00:00
physikerwelt 87632766e0 Squash literals in operatornames
Chains of single letter mi elements are rendered with no
space but one mi element with multiple letters gets
space. For example, the operator log will be translated
to <mi>log</mi> rather than <mi>l</mi><mi>o</mi><mi>g</mi>
as done by wikitexvc.

* Squash literals into single element, iff they don't
contain commands

Following the implementation of the literal rendering
it seems that all literals with special behaviour have
a command.

Bug: T375861
Change-Id: I97adf5f5132180503cbeb59d32fdb8d45b08aaa7
2024-10-14 16:02:17 +00:00
physikerwelt ec44827976
Use munder instead of msub for large operators
* Add new class to identify what a (large) operator is
* Add some IDE hints about what methods exist in texutil
* Add tests for operators in display and block style

Bug: T375907
Change-Id: If734f194cd8fa30efaf6d8c8d89f85e3e1c96276
2024-10-13 21:13:56 +02:00
physikerwelt ca10252923
Add \| to list of special operators
Bug: T376546
Change-Id: Ibf57c995c2381fea095600c31ce6432a1e8fd4fd
2024-10-05 23:00:34 +02:00
Umherirrender 419ce56d27 Add missing documentation to class properties
Add doc-typehints to class properties found by the PropertyDocumentation
sniff to improve the documentation and to remove the exclusion of the
sniff.
The activated sniff avoids that new code is missing doc-typehints or
real-typehints.

Change-Id: Id7fcfd086cdbb3f040091e1d1a81472e7a524091
2024-08-31 11:48:46 +00:00
Moritz Schubotz (physikerwelt) 5fa3d6bfe5 Clean matrix arguments
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
2024-06-03 09:25:15 +00:00
Moritz Schubotz (physikerwelt) 9c13fd1ccd
Make TexArray iterable
TexArray is an array of tex nodes. To improve
readability and type hinting we make TexArray
iterable.

Change-Id: I5b9b2ca63400400bc399c08445ff911f8e20a0d1
2024-05-27 09:54:44 +02:00
Moritz Schubotz (physikerwelt) a102a4ed52
Remove curly
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
2024-04-09 11:36:34 +02:00
Moritz Schubotz (physikerwelt) 57dbaeda39
Add over_operators group
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
2024-01-24 16:49:29 +01:00
jenkins-bot 3a2011c3b7 Merge "Fix missing argument passing in DQ and FQ" 2024-01-06 21:43:41 +00:00
Moritz Schubotz (physikerwelt) a512710cf0
Improve operator recognition heuristic
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
2024-01-03 00:17:47 +01:00
Moritz Schubotz (physikerwelt) d25acea9c7
Fix missing argument passing in DQ and FQ
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
2024-01-02 20:36:49 +01:00
Stegmujo a82727f61f
Rename TexVC in PHP to WikiTexVC
Change-Id: Idd98205ea291640b01946374f15c807da7fc26e5
2023-11-24 16:41:30 +01:00