Commit graph

434 commits

Author SHA1 Message Date
Stegmujo 4750c45e06 Add a possibility for creating a test wikipage for chemical formulas
Bug: T329620
Change-Id: I5ca17dceb53bbf8ff148922088b2ba235d69e09a
2023-10-19 17:28:13 +00:00
Stegmujo 24bcd11e5b Fix ce statements and displaystyle for chem rendering on wikipages
* rollback some previous changes for ce env in Parserhookhandler
* some minor fixes for feedback in previous commit
* set tex mode for mhchem preprocessor, since MediaWiki Hooks add
  explicit ce tags: i.e. frormula coming to TexVC look like
  "{\displaystyle \ce{ C6H5-CHO }}"

Bug: T348975
Change-Id: Id06852b030f9ea77f016289d4f9e2258d5a9f0d4
2023-10-17 14:37:25 +00:00
Stegmujo 9360ca94c4
Fix table alignment to left
* currently, \begin{align} generates <mtable columnalign="right" but it should be <mtable columnalign="left"

Bug: T348791
Change-Id: Ic0df45aba4fdb6ffbdc790b5e4bc56e7daeca802
2023-10-13 15:08:34 +02:00
Stegmujo 1aae7cde53
Deactivate stretchy attribute in left and right
Bug: T348793
Change-Id: I5c7c1fd02c4fb42eb8478b744fea3dd06463401e
2023-10-13 13:58:57 +02:00
Stegmujo 00f47e8866 Fix issues in MMLmhchemTest with braces and macro longrightleftharpoons
* updating the braces since mkern, mskip etc are Fun1 functions in TexVC
* updating TexVC support flag in test
* added macro longrightleftharpoons to rendered cases
* nearly all tests render correct in HTML now

Bug: T329620
Change-Id: I78da466c88d41f794e81f7222c9a67c3f4d482d2
2023-10-12 15:55:43 +00:00
Stegmujo b26a8805c1
Add rendering to MathmL visual results to MathMLTest
* fix maintenance script in parametrization for generating correct
  reference MathML
* update MathML references for MMLmhchemTest
* and update the reference formulas, which not display MathML correctly
* tests which have math enviroment switch (which is currently not defined) are currently skipped

Bug: T329620
Change-Id: I09f2c393880daa8fef3e2763821df59048c3c98c
2023-10-12 14:36:57 +02:00
Stegmujo 846edd1611 Add intbar and intBar to MathML rendering
* added some tests
* removing intbar from skipped tests in MMLGenTexUtilTest

Bug: T348318
Bug: T137787
Change-Id: If0dd9beb36d52bc5305fdb66438f1ad2ca092aaf
2023-10-10 10:19:45 +00:00
Moritz Schubotz (physikerwelt) 272f39ca2d
Fix integral command namings
* Remove \strokeint which was probably a typo and should be \strokedint
* Add \intBar command

Not done:
* Implement rendering of \intBar and \intbar, it would make sense to wait for
the mathoid reference rending here, which is just around the corner

Bug: T137787
Bug: T348373
Change-Id: I19d24fc23f59dda87c7c39a265f17efddb9fee8f
2023-10-09 15:02:46 +02:00
Stegmujo f4c91856bc
Refine skipped indices in MMLGenerationTexUtilTest
* adapts skipped indices to represent all supported cmds and macros

Bug: T340024
Change-Id: Ib01f02c3b73dac80ee9878c22549740d728bdf57
2023-10-06 14:02:43 +02:00
jenkins-bot d5c48b8260 Merge "Render MathML for atop and choose" 2023-10-05 16:20:25 +00:00
Stegmujo bbe6c3df8b Render MathML for atop and choose
Bug: T340024
Change-Id: I19f471645b569db49a64e5dd4c82cfdbac7dbe77
2023-10-05 14:39:04 +00:00
Stegmujo d3c636883a
Render MathML for some letters used in mhchem
* \Alpha  \Beta  \Chi  \Epsilon  \Eta  \Iota  \Kappa  \Mu  \Nu  \Omicron  \Rho  \Tau  \Zeta
* \ca

Bug: T340024
Change-Id: I0d9d8314644927ccae0794ae8459a3f3893fc24a
2023-10-05 16:08:13 +02:00
Stegmujo 7dfb557b92
Render MathML for harpoons and arrows for mhchem
* macros: longRightleftharpoons, longLeftrightharpoons,
  longleftrightarrows
* added tests for these

Bug: T340024
Change-Id: Ib8487f242766cef63f7cf8564f2033d9f332e0a8
2023-10-04 18:47:14 +02:00
Stegmujo 0c493bbbed Render MathML for tripledash for mhchem
* rendering textemdash for tripledash with unicode +2014

Bug: T340024
Change-Id: I2c68858063d7fe4e1d673522f6a2d58107fa3f7e
2023-10-04 13:04:17 +00:00
Stegmujo 372bf72acd Render MathML for mathchoice for mhchem
* defaults mathchoice to displaystyle
* adds several tests and introduces new Fun4 element for mathchoice in
  grammar

Bug: T340024
Change-Id: I37c8fd35303e3b8a00faad18a3a131a716c7bb47
2023-10-04 11:23:02 +00:00
jenkins-bot a801869ebb Merge "Add mhchem-tex macros to MMLGenerationTexUtilTest" 2023-10-04 11:05:14 +00:00
Stegmujo 759e6166f6
Add mhchem-tex macros to MMLGenerationTexUtilTest
* adds the recently implemented cases for mhchem specific tex to check full macro coverage
* fix a minor issue with tripledash

Change-Id: Id3033fab7b3c3432bed6e11f7b50f7ff8e3906ea
2023-10-04 10:57:12 +02:00
jenkins-bot f15dd203ab Merge "Fix tilde spacing" 2023-09-29 11:48:36 +00:00
Stegmujo 414295cdc5
Fix tilde spacing
* tilde is rendered as non escaped mspace

Bug: T315978
Change-Id: I33a751eb5ae62a45c7bc3941ff49f30fa436b00c
2023-09-29 12:19:28 +02:00
jenkins-bot 5dd7d8cba3 Merge "Fix alignments" 2023-09-28 17:13:32 +00:00
Stegmujo 6c43c7563c Fix escape spacing
* In test "\text{if}~n\ \text{is even} "

Bug: T315978
Change-Id: I839b7e912bc95abff1f589467c848fc8b2fb0fe6
2023-09-28 15:54:19 +00:00
Stegmujo 07f7942ac5 Fix alignments
*  "\ln c, \lg d = \log e, \log_{10} f" : c d etc should have be more extra space
* "\Pr j, \hom l, \lVert z \rVert, \arg z ": same as above, specifically for \hom
* fixes expected result in LocalCheckerTest

Bug: T315978
Change-Id: I842b45b2d20dc267d828dca2040a3500ce06f45d
2023-09-28 15:48:18 +00:00
thiemowmde b4290c1634 Make use of upstream assertStatusGood/Error and such
These small convenience methods produce much better debug output.

Change-Id: I80d6f406c1605ed68eca8ec576ff98e7251da518
2023-09-28 15:15:43 +00:00
Stegmujo 093ecf7c0f
Fix bigcap and bigcup scripts not placed correctly
* All recognized macros are in category nullary macros, so this adds a
  rule
* In test "\bigcap_{i=_1}^n E_i"
* In test "\bigcup_{i=_1}^n E_i"

Bug: T315978
Change-Id: I09287879c1448e404473891985457349a62554a7
2023-09-27 14:17:53 +02:00
Stegmujo b3545c1994
Fix negation (not) for operatorname
* Test example in MathNativeTests: " "\not\operatorname{R}"
* fixed forwarding state in Fun1nb

Bug: T315978
Change-Id: Ia651b14ba16f39cc8cbc6b42e0598d959bf72989
2023-09-27 10:39:27 +02:00
Stegmujo ede31d01ed Fix k=1 should appear under sum in displaystyle
* In test MathNativeTests: "\sum_{k=1}^N k^2"
* also verify that textstyle variant works correctly

Bug: T315978
Change-Id: I8f6cd5ef1e4539616439542184cb7d9dc5cf2363
2023-09-26 16:07:20 +00:00
Stegmujo f85fda42da Fix MMLGenerationParserTest creating HTML file
* also fixes a warning in phan that there is a tainted parameter in args in BaseParsing
* this is to pass CI

Bug: T343636
Bug: T347320
Change-Id: I91328bf26e208bd4e0e939c4628def2f40e2f0b6
2023-09-26 15:26:30 +00:00
Stegmujo 5536b3f74a Fix underbrace
* In test MathNativeTests: "\underbrace{ a+b+\cdots+z }_{26}"
* Underbrace statement appear to right side

Bug: T315978
Change-Id: I3b1e1290ac07e7aa70ab5931d513984f011d3075
2023-09-21 14:57:40 +00:00
Stegmujo 586d15b046 Fix Pilcrow size
* Pilcrow was very big, see test on MatTestNative page:
* " \amalg \P \S \% \dagger \ddagger \ldots \cdots "
* and add specific testcase

Bug : T315978

Change-Id: I3074f3782ef821e7f9813b79a570bbd51ead28db
2023-09-21 10:28:31 +00:00
Stegmujo 83db0738b3 Fix rendering of "<" and ">" in MathML
Bug: T346731

Change-Id: I1f163dad73481664a336f09bc5608aad6d0b5761
2023-09-19 10:32:09 +00:00
Stegmujo b28d3da95a
Render MathML for smash command from texified mhchem
Bug: T340024
Change-Id: Id9ca073b51656dce2f48cef6c94a2281fe269418
2023-09-19 10:27:28 +02:00
Stegmujo ead9760e1f Render MathML for cmds: raise,lower,rlap,llap from texified mhchem
Bug: T340024

Change-Id: I9b3981c97b8158685ccc774f8435f7f1b36a42f2
2023-09-17 09:54:32 +00:00
Stegmujo cedca8b14e
Render MathML for mskip and mkern from texified mhchem
Bug: T340024

Change-Id: I2f9e0bbb98f33d6269009248861e4573dc9e6911
2023-09-17 10:16:39 +02:00
Stegmujo 6514c9d24e
Implement mhchemParser in PHP
* mhchemParser v4.2.2 in Typescript was used as blueprint for this:
* https://github.com/mhchem/mhchemParser
* The mhchemParserPHP component tests can be run locally on a machine with PHP without MediaWiki-Environment with the MMLmhchemTestLocal.php
* For the tests it is probably only necessary to review the json files (Mhchemv4mml.json, Mhchemv4tex.json).
* src/TexVC/MHChem/MhchemParser.php contains the basic functionality, Patterns, StateMachines, Texify functions are located in dedicated classes
* added extracted mhchem commands which have intermediately have been introduced to the
  texVC(PHP) grammar

Change-Id: I8cc3d04937b93339e352adc95c85a8a178b8825f
Bug: T329620
2023-09-16 09:40:14 +02:00
Lucas Werkmeister 6712685a9b Use EntityId::getSerialization() instead of serialize()
Bug: T345856
Change-Id: I3684677bff3587a1d5199a33752d46146b9e2e3e
2023-09-07 16:49:02 +02:00
jenkins-bot 008759c331 Merge "Remove references to VisualEditorFullRestbaseURL" 2023-08-25 11:21:39 +00:00
Umherirrender 530b9c695a Use namespaced TitleFactory
Bug: T321681
Change-Id: I6392fe93fc1ff244c1035a6da7f83b8f849c0a5a
2023-08-19 14:41:58 +02:00
jenkins-bot 207af66a10 Merge "Replace some moved Title class uses, now MediaWiki\Title\Title" 2023-08-19 06:14:08 +00:00
gerritbot fd1e7e2a67 Replace some moved Title class uses, now MediaWiki\Title\Title
Bug: T321681
Change-Id: I1c875fcf7456ea03420b316f58fcd18aa748301f
2023-08-19 04:17:34 +00:00
James D. Forrester f08789049b Use namespaced IDatabase class
Bug: T344536
Change-Id: Ia5fdf3242f9510e4f21670f3746d9364ae2935c6
2023-08-19 12:03:02 +08:00
Amir Sarabadani 88a24c402b Fix phpcs error
Change-Id: If047aa9a5cf26def9d1d9935294646f80ef92ffc
2023-08-19 04:51:28 +02:00
Bartosz Dziewoński 8c05a71beb Remove references to VisualEditorFullRestbaseURL
The VisualEditorFullRestbaseURL config variable is no longer used by
VisualEditor and is no longer set in Wikimedia production
configuration.

Bug: T344458
Change-Id: Ifd0b9f919f7a9bdceb8761125588fe72e8d1e50c
2023-08-18 20:17:48 +02:00
Umherirrender fb29f08e74 Use HookHandlers for core hooks
The use of "HookHandlers" attribute in extension.json makes it possible
to inject services into hook handler classes in a future patch.

Bug: T263364
Change-Id: Id8d9d0dcc6bb6ab60c5df3074803d132393415e9
2023-08-16 01:12:17 +00:00
Daimona Eaytoy ffa687bc64 Avoid DB access in non-Database tests
Bug: T155147
Change-Id: I25b627b85179fe0e72386351e53de322c7a9c850
2023-08-05 15:07:40 +00:00
jenkins-bot 2458e0d578 Merge "Avoid using TestUser in non-database tests" 2023-07-18 23:50:37 +00:00
jenkins-bot 7dfddfed75 Merge "Add remaining mhchemtexified macros:" 2023-07-18 20:49:51 +00:00
Moritz Schubotz (physikerwelt) ef145e7b50
Add remaining mhchemtexified macros:
\mkern -> \mkern #1 (fun_ar1)
    \mskip -> \mskip #1 (fun_ar1)
    \smash -> \smash[#1]{#2} (fun_ar1opt)
    \mathchoice -> \\mathchoice #1 #2 #3 #4 (fun_ar4)
    \rlap -> \rlap #1 (fun_ar1)
    \llap -> \llap #1 (fun_ar1)
    \raise -> \raise #2 #2 (fun_ar2)
    \lower -> \lower #1 #2 (fun_ar2)

Bug: T340023
Change-Id: I61f0bdae53a53d5d301645dc9aa099d3377bff1c
2023-07-18 21:08:36 +02:00
Moritz Schubotz (physikerwelt) 88482a5e60
Extend test coverage for TexUtil to 100%
Change-Id: I74226a31f0fd5fb45066215d1075e6f42223f03c
2023-07-18 12:55:52 +02:00
Moritz Schubotz (physikerwelt) 26cfc111f9 Add usemhchemtexified option for mhchem texified output
Add a config option to enable passing special macros needed to
handle the output from the mhchem texify process.

Bug: T340023
Change-Id: I3553931c252184b54e7a13938e030825e5d45e59
2023-07-18 09:34:35 +00:00
jenkins-bot f6832d0235 Merge "Eliminate duplicate file" 2023-07-18 09:17:03 +00:00
Daimona Eaytoy 34d8441bc8 Avoid using TestUser in non-database tests
It needs a database connection to create the user, which is unnecessary
here.

Depends-On: I80723b886b2b5a5d75cbb73571e1b19ea4a09af5
Change-Id: I260b8ca433733b7754616e6e24778935597981a5
2023-07-17 23:36:23 +02:00
jenkins-bot 7af0761091 Merge "Add tex node with 4 arguments" 2023-07-17 12:39:14 +00:00
Moritz Schubotz (physikerwelt) 2d76cc24ac
Eliminate duplicate file
texutil.json exists twice with identical contents in
test and main sections.

Delete the redundant copy in the test section and access
the main file in tests.

Change-Id: Ie1eba9ed599d6826f1efe2d37bf8370f8e9dd036
2023-07-16 10:04:51 +02:00
Daimona Eaytoy a5c334fdbc Mock ExtensionRegistry in MathTest
The test doesn't need to depend on what extensions are
available/installed. Also pass the test config more explicitly to
ServiceOptions.

Needed-by: I0a04c82250582fed7a66c1e10868d9b4f3823a28
Change-Id: Id2587fe7d31fcd652c26e5dd0a8cfcae3161efcc
2023-07-15 19:11:18 +02:00
Moritz Schubotz (physikerwelt) 5677e7992c
Add tex node with 4 arguments
For the mathchoice command we need a syntax tree element that can
store 4 arguments.

Bug: T340023
Change-Id: Ieddd10e54240a4def6bed30cd299d804e8a121f9
2023-07-14 17:31:04 +02:00
Umherirrender 94ec268cb8 tests: Use correct expect message function in MathWikibaseConnectorTest
expectException needs expectExceptionMessage to be useful

Change-Id: Ic0b9d2e9ab05e958d86082886f1cef3f213919ad
2023-07-10 20:41:57 +02:00
Moritz Schubotz (physikerwelt) 16d1fdacf4
Add WAN Cache for native MathML rendering
* Cache results for checked tex and MathML string in one cache.
* Remove access to parsetree
* Introduce run method to speed up service wiring

Note that the indirection table used in previous versions was
abandoned here. texvc does only little unification's of the
input string so that it is not expected that the overall savings
in space and compute time warrant the additional table.

Change-Id: Ib9ce3d2ab02bd9a2a0f9926db6b937435b7e5458
2023-06-19 23:04:08 +02:00
Moritz Schubotz (physikerwelt) fc425b977c
Add MathML interface to LocalChecker
In preparation for caching we store the MathML fragment returned by
local checker. The rational is that the string serialization of the
parse tree is better chachable as the parsetree.

Change-Id: Ice2ef1f4f7b83ed187507d4d067f446603d0d6a5
2023-06-19 17:39:49 +02:00
Daimona Eaytoy d06bd18532 Replace deprecated MWException
Introduce new classes for checked exceptions, and use SPL exceptions
for the unchecked ones.

Bug: T328220
Change-Id: Ic44463e910911afe6395c38fd2f59b9bfa02a4f0
2023-06-09 13:00:46 +02:00
Moritz Schubotz (physikerwelt) 7c7b3324be Remove additional v1 suffix when computing internalRestbaseURL
Remove additional /v1 when computing internalRestbaseURL from
virtualRestConfig as this will be added in getUrl in MathRestbaseInterface.

internalRestbaseURL was introduced in I2fbc441955a1fe417f264f31f3729ce0715f7f16.

Bug: T334842
Bug: T338381
Change-Id: If2719fb9106e1414ce8814a2fbafa5dcedb84e39
2023-06-08 01:10:30 +00:00
jenkins-bot 03b185078b Merge "Create HookRunner class and the hook handler interfaces" 2023-06-07 09:39:56 +00:00
Ed Sanders bf9d8cef1d Always use the strict equality flag when using in_array
Change-Id: I555be3a62ee545304ea1ff7fdcffa3c4fbd25ab1
2023-06-06 13:35:12 +01:00
Umherirrender 28c5a67697 Create HookRunner class and the hook handler interfaces
Bug: T263353
Change-Id: I7ee943a262eba7d2f00fd05925676cc2351b7be9
2023-06-05 22:47:33 +02:00
Umherirrender a967557107 tests: Call TestCase::createMock with $this
createMock is not a static function (like atLeastOnce)
It is easier to spot that this needs a TestCase when using $this

Change-Id: I6b738e31f43fd7ee2ecd608d0bb853a3ebac3121
2023-05-31 23:00:27 +00:00
jenkins-bot a4911d2283 Merge "Introduce MathInternalRestbaseURL setting." 2023-05-31 06:28:39 +00:00
daniel 43dd9c7f63 Introduce MathInternalRestbaseURL setting.
This new MathInternalRestbaseURL setting allows the internal URL of
Mathoid to be configured directly, instead of relying on
VirtualRestConfig.

This patch moves the fallback logic for the internal and external API
URL into an extension registration callback. This way, we can keep the
application logic simple, and we can issue config warnings that will
cause the updater to fail, forcing wiki owners to update their config.

Bug: T334842
Change-Id: I2fbc441955a1fe417f264f31f3729ce0715f7f16
2023-05-30 09:48:03 +00:00
rrana-wmf c601e1d6f2 Add test case for MathRestbaseInterface.php
Add test case for getType() method.

This will improve the code coverage for this method from 0 to 100%.

Add test case for getTex() method.

This will improve the code coverage for this method from 0 to 100%.

Add test case for evaluateRestbaseCheckResponse() method.

This will improve the code coverage for this method from 0 to 100%.
And covers getIdentifiers(), getWarnings(), setErrorMessage(),
methods from 0 to 100%.

Change-Id: I6bdb6919126e5488838d4fba53eb2f74c89ee63d
2023-05-22 09:36:29 +00:00
Umherirrender 7a8d5b9dc4 tests: Make some PHPUnit data providers static
Initally used a new sniff with autofix (T333745)

Bug: T332865
Change-Id: I73d2903fed7523826b71fc452a846dc4c6e85802
2023-05-21 11:00:48 +02:00
rrana-wmf 5926f42b52 Use MultiHttpClient instead of VirtualRESTService.
This fixes the problems with If208753edfdb301 which was reverted
and adds a new test.

Bug: T335347
Co-Authored-By: <rrana-ctr@wikimedia.org>
Change-Id: I7ddb7b294cbccc4dab42e286fc270f438385bee5
2023-05-20 16:57:46 +00:00
Subramanya Sastry de76f99d3d Revert "Revert "Add getMultiHttpClient function to make HTTP requests to Mathoid.""
This reverts commit a38e56c3fc and
reapplies 38c73d9b7a

Bug: T335347
Change-Id: Ib5f82c022d6ff435a807f8f4128a308f3dacc455
2023-05-16 13:07:32 +00:00
Daniel Kinzler a38e56c3fc Revert "Add getMultiHttpClient function to make HTTP requests to Mathoid."
This reverts commit 38c73d9b7a.

Reason for revert: Breaks math on Beta, shouldn't go live.

Change-Id: I62c63e20c94ddc25c5c291ba42afd28e153b34a6
2023-05-12 10:23:31 +00:00
rrana-wmf 38c73d9b7a Add getMultiHttpClient function to make HTTP requests to Mathoid.
This add new function named "getMultiHttpClient" to the
MathRestbaseInterface.
The function creates a MultiHttpClient object using the HTTP
request factory.

This function will be useful for making HTTP requests to Mathoid.

Add test case for getUrl() method.

Bug: T335347
Change-Id: If208753edfdb3017f722c97cea7653170d05f8a5
2023-05-11 17:58:50 +00:00
daniel 3fa7837cee Add test case for MathRestbaseInterface::batchEvaluate
This test case ensures that responses from RESTbase are processed
correctly.

Change-Id: I5fbd45ac5e61a6294817617a6784846ae815fd6e
2023-05-11 19:58:26 +02:00
daniel 38e649c722 Math: test usage of URL in HttpMultiClient
Change-Id: I063319ad1b12d66d2054846e6c3b27c715ca3d31
Co-Authored-By: <rrana-ctr@wikimedia.org>
2023-05-08 18:19:30 +00:00
Stegmujo b1edd31543
Fix issues with DQ
Bug: T315978
Change-Id: I04c9178ce5785f29ab79de6dc82070465efca611
2023-04-20 10:57:04 +02:00
Stegmujo 6e0427c2ba
Fix for attributes in named Operator
Bug: T315978
Change-Id: I7277d03bae031ffcb2995c097f92c795cc2637dd
2023-04-06 13:44:58 +02:00
Stegmujo c9cf3814ac
Fix for carriage return
Bug: T315978
Change-Id: I06728d45daa060655e655bb07717f23eef61a955
2023-04-06 11:40:54 +02:00
jenkins-bot df0fbc7ebd Merge "Fix style tag imbalance" 2023-04-06 07:10:30 +00:00
Stegmujo fa1a5a4b3f
Fix style tag imbalance
* sometimes there have been more start-tags than end style tags

Bug: T315978
Change-Id: I6b20d45d7561b084376a54f4d6273a2ff5ed7bb4
2023-04-05 15:48:03 +02:00
Stegmujo 08b16c99df
Fix preceding subscript
* example: "{}_1^2\!\Omega_3^4"
* MMLFullcoverageTest cases: 119, 381
* Add isEmpty method to TexNode
* Add empty mrow for prescripts

Bug: T327391
Change-Id: If60e5211bf43e50465072c049d8c432e621832b8
2023-04-05 13:00:06 +02:00
Moritz Schubotz (physikerwelt) 8c6eeae82e
Remove images from native MathML
In native MathML we only display MathML, also get
rid of enclosing <div / <span container.

Bug: T182041
Change-Id: I26bc4ea88d360d53cc7a34a89bef78812b84b2ea
2023-03-31 08:57:55 +02:00
Stegmujo 5de6683c05
Fix colors
* some tests for checking colors

Bug: T327391
Change-Id: I437f8d72834f3cca7c21f97841ee4da2f1f36ed5
2023-03-27 14:42:27 +02:00
Stegmujo 030143cf14
Fix texstyle when rendering limits
* case index in FullCoverageTest: 144

Bug: T332183
Change-Id: I4bc427c00ffc83d53a91b094c7bde05a816f0f98
2023-03-24 16:15:45 +01:00
Stegmujo 0df4e38547
Fix derivatives
* indices in FullCoverageTest: 114, 124

Bug: T331998
Change-Id: I99724427b77e14044070d330758fb38a55032a10
2023-03-24 11:42:29 +01:00
Stegmujo 426a67fbd7
Fix P rendered as pilcrow
* contains a minor fix for spacings, so that they are rendered by spacer
* and some minor fixes for section sign
* MMLFullCoverageTest cases: 216

Bug: T327391
Change-Id: I124e7aec5552dec98a8292e5bdb9449a3009560a
2023-03-22 14:28:57 +01:00
jenkins-bot 6e0181335f Merge "Fix spaces not rendering if within mtext" 2023-03-21 18:46:03 +00:00
Stegmujo 5f9ca781d1
Fix spaces not rendering if within mtext
* MMLFullCoverageTest case: 260

Bug: T327391
Change-Id: Ifd858216b646efd53c401ac9bcddfc7fb1c1a933
2023-03-21 14:57:55 +01:00
Stegmujo ad2a6b7fef
Fix spaces and commas differentiation
* escaped semicolon/commas get rendered as spaces, non escaped get
  rendered as text
* MMLFullCoverageTest cases: 4,5,66

Bug: T327391
Change-Id: Icfa557fc43a8ac87fbf856795cb9c26d0fb2c456
2023-03-21 13:56:22 +01:00
Stegmujo 1fa5ad3217
Fix preceding not
* indices in FullCoverageTest: 58,59
* fix a minor issue with less and greater signs to escape case 58
correctly

Bug: T331998
Change-Id: I29265f7954552423924dfc898fd36ec1b387e198
2023-03-16 11:46:53 +01:00
Moritz Schubotz (physikerwelt) c560ff0cd8
Remove MathPlayer
* MathPlayer stopped working around IE8

Bug: T298971
Change-Id: I759a5dc61eaf27a99d952366cf9c4380748f8e82
2023-03-15 10:20:13 +01:00
Stegmujo b843a09e92
Fix for limits
* example: "\lim\limits_{x \to 2}"
* case 4 phabricator: "limits-case"
* index: 411

Bug: T327391
Change-Id: I9a91e4cf49c9df89fb610057484165069f5c7e50
2023-03-14 11:10:31 +01:00
jenkins-bot ad668a6e69 Merge "Fix for sideset case" 2023-03-13 15:57:52 +00:00
Stegmujo b7d909e0a2 Fix for sideset case
* example "\sideset{_1^2}{_3^4}\sum"
* case 3 phabricator "sideset"
* index: 90
* since result has multiscripts which is not generated by mathoid, there is an explicit test in MMLRenderTest and the previous test is in MMLTexVCUtilTest is skipped
* in MMLGenerationTexUtilTest test for sideset is deactivated
* adds a case from FullCoverageTest for sideset with FQ
* fixes an issue which occured during Phan checks for merging that genFrac throws an error

Bug : T327391

Change-Id: I4c5a5f5a901dbc906f5a1b168d3a8d04f25b9290
2023-03-13 15:38:04 +00:00
libraryupgrader dcce2100d0 build: Updating dependencies
composer:
* mediawiki/mediawiki-codesniffer: 39.0.0 → 41.0.0

npm:
* cookiejar: 2.1.3 → 2.1.4
  * https://github.com/advisories/GHSA-h452-7996-h45h
* http-cache-semantics: 4.1.0 → 4.1.1
  * https://github.com/advisories/GHSA-rc47-6667-2j5j
* ua-parser-js: 1.0.2 → 1.0.34
  * https://github.com/advisories/GHSA-fhg7-m89q-25r3

Change-Id: I4198e1cbdc115d27c9fe5b8d0ce813b514524796
2023-03-12 05:44:17 +00:00
Moritz Schubotz (physikerwelt) 88a4c8bc1d
Add minimal native MML mode
* Add minimal POC for native MathML rendering.
* (minor) convert string-based reference to MathConfig to proper access
  method.

Missing:
 *  Error handling
 *  Image fallbacks

Bug: T331047

Change-Id: I7e644c4688cca7fc9af0d54bdc260268c1f6b9df
2023-03-02 20:50:29 +01:00
Stegmujo 8101c8f136
Fix for tex-statement definecolor
* example "\definecolor{ultramarine}{RGB}{0,32,96} a {b \color{ultramarine} c} d"
* case 2 phabricator: "colors"
* index: 22
* some test for parsing color statements

Bug: T327391
Change-Id: I98fdf011a2089dad4e7cb5a7a6aa8433fafe4a94
2023-03-02 11:35:27 +01:00
Stegmujo 8f81eabc83 Add more detailed testcases for Color, Pagecolor and Definecolor
* case 2: "colors"
* in MMLGenerationTexUtilTest.php
* Updated the keyfiles etc

Bug: T327391
Change-Id: Id3232f21dea9813ec5adcacca58e912cf116ab72
2023-03-01 15:25:50 +00:00
jenkins-bot 64c3f6893a Merge "Add native MathML rendering mode to MathConfig" 2023-03-01 14:25:05 +00:00
Moritz Schubotz (physikerwelt) 642e54c51b Add native MathML rendering mode to MathConfig
Add a new rendering mode option.

Change-Id: I36e2cc542ae89bff03f779a71ddceb77dfac99a9
2023-03-01 13:39:35 +00:00
Moritz Schubotz (physikerwelt) 9340b09c03
Expose parsetree in local checker
In perparation to the PHP only native MathML rendering mode, we expose
the parsetree of the checker.

Change-Id: I8da8d0e236c2b001e664ce707c7469ebe8a91eb8
2023-03-01 08:30:46 +01:00