Commit graph

3066 commits

Author SHA1 Message Date
physikerwelt eb3fe78fc5
Fix: handling of named operators
In I94887f6ccb45072180a318776ae96aead8658a18 named operators that render
 as their tex command e.g. \gcd -> gcd, were not taken into account.

Remove additional \ in operator names.

Bug: T380184
Change-Id: If21cbd091cc9437715b10e3e6e7ffc86d6436010
2024-11-26 00:20:47 +01:00
physikerwelt cfe15c59b1
Fix: handling of array
In I94887f6ccb45072180a318776ae96aead8658a18 the array environment was missed.

Add the array environment in the same as matrix was added.

Bug: T380184
Change-Id: I92111829e7e93bc5abd40e01b6c036bbc01ee8a5
2024-11-25 23:24:25 +01:00
physikerwelt 4014491c39
Fix: handling of nullary macros
In I94887f6ccb45072180a318776ae96aead8658a18 nullary macros
such as $\AA$ were missed.

Instead of adding a backslash (cf. patch set 1) we move the
functionality to texutil.

Bug: T380184
Change-Id: Ie9947b48f03dac03612a5c33bce92bf00df70aa3
2024-11-25 23:21:03 +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
physikerwelt c89f8ad142 Add space after operatorname to extended tests
* in Ie374524dbdf6a753063172fb88e6f60e91b9212e parsing
  of operatorname was simplified. However, in this
  process a space after operatorname was introduced.
* This adjusts the reference files pointing to the
  latest release on zendo
https://doi.org/10.5281/zenodo.14209690

Bug: T375274
Change-Id: I29a797cdf16088d704c343dd66cc7bfafc519cd9
2024-11-25 12:29:38 +00:00
physikerwelt b758ae9d70 Extend MathML test coverage
Render all formulae from Wikipedia and make sure no errors
(that end up as wikimedia production errors in logstash)
are thrown.
Check that no merror tags are generated for the manual page
that intends to cover the full spectrum.
Currently, some merror tags are generated, which we ignore
for this commit.

Change-Id: Ifecbd8a1b0afabaa2f818e9241add92a9508bae9
2024-11-25 10:43:13 +00:00
jenkins-bot 0f8dcc02ae Merge "Move cancel callbacks to texutil" 2024-11-25 09:09:30 +00:00
jenkins-bot 0e1c367ac4 Merge "Add tests for AmsMappings" 2024-11-25 09:00:07 +00:00
physikerwelt e0acf58460
Move cancel callbacks to texutil
Currently, information regarding individual LaTeX
macros is distributed in various files. This is the
first to attempt to collect declarative information
regarding tex macros in the texutil.json file.
As a proof of concept we start with only the cancel
macros.

* Adjust texutil tests so that whitespaces are allowed
  in the payload

Change-Id: Iba2dfd5293ad96d8d8e4e2f555c8df9d1ae4d6ca
2024-11-22 21:43:31 +01:00
jenkins-bot d9572611a3 Merge "Add tests for BaseMappings" 2024-11-22 06:42:32 +00:00
jenkins-bot ee4e4ec5de Merge "Remove unused environment" 2024-11-22 06:42:32 +00:00
physikerwelt 6a46f2813c
Add tests for AmsMappings
Change-Id: Ia4fbba3cda087b17587a953a6c01c6fae2fe2b64
2024-11-21 23:01:09 +01:00
physikerwelt d68c302b71
Add tests for BaseMappings
Change-Id: I017815230c2709ef5933256ba430b5284022637f
2024-11-21 22:37:45 +01:00
physikerwelt 6d5ddff353
Remove unused environment
Change-Id: I8c94d04c58356afac901de5ed207f110f1b753f7
2024-11-21 17:26:14 +01:00
jenkins-bot 92ce5e257f Merge "WIP add \ when needed" 2024-11-21 07:53:21 +00:00
physikerwelt 62506236ec
WIP add \ when needed
Change-Id: I94887f6ccb45072180a318776ae96aead8658a18
2024-11-21 08:01:26 +01:00
Translation updater bot d1ff859f02
Localisation updates from https://translatewiki.net.
Change-Id: I6482ff7afa28701d3aa43150c523680b6dd92d52
2024-11-19 08:18:14 +01: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
Translation updater bot 8cded7d7fa
Localisation updates from https://translatewiki.net.
Change-Id: I476d81c4cd7a0c35ab17465612bc681e46550dc2
2024-11-11 08:23:15 +01: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
jenkins-bot a7f8306d18 Merge "Remove menclose in cancel rendering" 2024-11-08 07:27:47 +00:00
physikerwelt cc0a214f56
Remove menclose in cancel rendering
Chrome and similar browsers do not support the
menclose tag. This change introduces a css polyfill
suggested in

https://github.com/w3c/mathml-core/issues/245#issuecomment-2410676518

but keeps the mencose rendering since FF does not
support the polyfill

https://bugzilla.mozilla.org/show_bug.cgi?id=1929800

Bug: T376829
Change-Id: I860e2f2f9bf9eef8eeba35b0999ec50175fdfc4b
2024-11-08 07:58:08 +01:00
jenkins-bot f60ea98236 Merge "Treat \operatorname as a valid operator for limits" 2024-11-08 05:19:01 +00:00
jenkins-bot 0e0d5ff1f7 Merge "Ignore misplaced limits commands" 2024-11-08 05:06:17 +00: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 b058d88bf9 Ignore misplaced limits commands
Instead of rendering \limits or \nolimits when those
commands are misplaced the commands are ignored.

TeX does it the same way, but issues a warning in addition.
Issuing the warning will be taken care of in a follow-up commit.

Bug: T365170
Change-Id: Ic1c28be2a5669183c3dd5d15577a35a1b5a76971
2024-11-06 20:21:29 +00:00
Translation updater bot 4ce41fa717
Localisation updates from https://translatewiki.net.
Change-Id: I56f74ad53b729f7e3657104eb7de7ebd59915a14
2024-11-06 08:23:12 +01:00
physikerwelt 18df3d31a1
Add npm fix script
Change-Id: Iebd8d41d36a3a05d6ff9e07248716ce1ad19668d
2024-11-05 15:12:59 +01:00
Translation updater bot 28648ef9c9
Localisation updates from https://translatewiki.net.
Change-Id: Ibbb4c60dafbb7f2134de1a5ddb7265fe86ff89aa
2024-11-05 08:33:06 +01:00
jenkins-bot 794c5b256b Merge "ext.math.popup: Add mediawiki.user in dependencies" 2024-11-04 00:03:36 +00:00
Ammarpad dab41da0b1 ext.math.popup: Add mediawiki.user in dependencies
Dependency introduced in I46e7641

Bug: T378877
Change-Id: I27f28a7adebba16370ae7010a8dbf3d9e3c5c849
2024-11-03 20:47:03 +01:00
libraryupgrader 217e4c229a build: Updating mediawiki/mediawiki-codesniffer to 45.0.0
Change-Id: Iabfae5b9a80bf2b1d255f17b08085610e278dd66
2024-11-02 19:42:41 +00:00
Translation updater bot 9d31cca568
Localisation updates from https://translatewiki.net.
Change-Id: I1e8ab69cb50f2f4da5c3973cacf157d08388a1fb
2024-10-31 08:15:59 +01:00
physikerwelt 63b47f21ef
Add mathfraktur rendering for chrome
Chrome and similar browsers do not support the
mathvariant attribute that can be used to change
math fonts conveniently. Like for mathcal there is
a table that can be used to translate from latin
to mathfraktur chars.

Bug: T378433
Change-Id: Id8c3e121ed104ba3f08329b4151a7e3bec699754
2024-10-29 11:30:51 +01:00
jenkins-bot cc5c21dd54 Merge "Use cell based table rendering" 2024-10-29 05:22:13 +00: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
physikerwelt 8fa40914e9 Add more operators that render limit below
* Extend the list of operators that use munder instead
  of msub.
* Use rendering of main operator, as some artificial
  spaces might be added in the operator representation

Bug: T375907
Change-Id: I45e96257411bd7641ad6cc32aaac4c94bfcfa8a3
2024-10-28 08:12:30 +00:00
Translation updater bot 7acc46ef46
Localisation updates from https://translatewiki.net.
Change-Id: If8192290968bc630a5f1da8142297c52c8807daa
2024-10-28 08:23:21 +01:00
Umherirrender cf6271fa06 Replace isset() with null check
isset() should only be used to suppress errors, not for null check.
When the variable is always defined, there is no need to use isset.
Found by a new phan plugin (2efea9f989)
https://www.mediawiki.org/wiki/Manual:Coding_conventions/PHP#isset

Change-Id: I4e797c539d8d7868bfac63fcac6b2f78463f6475
2024-10-27 13:43:45 +01:00
Andre Klapper 5c6bc704a2 Use explicit nullable type on parameter arguments (for PHP 8.4)
Implicitly marking parameter $... as nullable is deprecated in PHP
8.4. The explicit nullable type must be used instead.

Bug: T376276
Change-Id: Idcd0b50c1c01a33c4cabeed3e31828f77c3f6443
2024-10-26 15:15:30 +02:00
Translation updater bot 47edd9b21d
Localisation updates from https://translatewiki.net.
Change-Id: Id88d7d02ecbbcc7ec728e9fcae31e7856a506c30
2024-10-25 09:50:33 +02:00
jenkins-bot 6f597a863a Merge "selenium: Replace Node.js Assert library with WebdriverIO Expect library" 2024-10-24 10:17:32 +00:00
Umherirrender 7038c68f13 Use namespaced classes
Changes to the use statements done automatically via script
Addition of missing use statement done manually

Change-Id: I4cf7903b9700e6366bdf349f99ffd4a04da0c087
2024-10-20 09:27:34 +02:00
Translation updater bot cecbd594d1
Localisation updates from https://translatewiki.net.
Change-Id: I034c2da50b5282ae9038054b3bda5c0921c1baf8
2024-10-18 09:25:18 +02:00