Commit graph

281 commits

Author SHA1 Message Date
jenkins-bot db160076f0 Merge "Improve performance: remove redundant inputPreparation calls" 2023-03-31 09:27:46 +00: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 9213f93b88 Improve performance: arrange methods by call probability
* checked this with: EnWikiFormulaeTest.php
* remove finding chem macro from BaseMethods::checkAndParse, because
  this will be used somewhere else
* minor: remove mi from mathFont parsing function

Bug: T321599
Change-Id: I472e3ebdebfc91f97c9391268a384f788571612e
2023-03-28 17:29:03 +00:00
Stegmujo 7cd58420f7 Improve performance: remove redundant inputPreparation calls
Bug: T321599
Change-Id: I215b8883ace411933e7cbcd59b97df10dcc68d38
2023-03-28 12:39:08 +00: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
jenkins-bot c8cdfcadcc Merge "Fix spaces defined by tilde and backslash" 2023-03-22 16:13:52 +00: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
Stegmujo 95816376c1
Fix spaces defined by tilde and backslash
* MMLFullCoverageTest case: 261

Bug: T327391
Change-Id: I99def9fe47ceb4471826e96e25562c070c0f1303
2023-03-22 11:31:51 +01:00
jenkins-bot 6e0181335f Merge "Fix spaces not rendering if within mtext" 2023-03-21 18:46:03 +00:00
jenkins-bot 0f154e86b7 Merge "Split latex_function_names and braces" 2023-03-21 18:41:04 +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 e2f1e86ec0
Split latex_function_names and braces
* see also cid: If78e1506e17afeed23de446ca9b929c2d1366c44
* testindices Fullcoveragetest: 21
* also remove workaround for checking parentheses
* contains a postfix for limits, so the nested TexArray("\lim","") are
  read

Bug: T332183

Change-Id: If8d8487e33b762631fd90ce27baa6866e3539cc6
2023-03-20 16:21:30 +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
jenkins-bot abedeeef19 Merge "Fix varstigma" 2023-03-16 09:46:19 +00:00
Stegmujo f534da7558 Fix varstigma
* index in MMLTexUtilTest: 655

Bug: T331998
Change-Id: I57e5dfc843d04c85f3807c80ba6c24e5b4e5d3f9
2023-03-16 09:08:07 +00:00
Stegmujo 55068c5839 Fix a glitch in rendering style arguments
* now renders the succeeding elements instead of the style-info itself

* index in MMLTexUtilTest: 530

Bug: T331998
Change-Id: I0ad330157fa7687a2ad68a3d97b4c9cc942ea3ab
2023-03-16 07:52:40 +00:00
jenkins-bot c0281a9237 Merge "Fix gcd, min, max statements" 2023-03-15 15:15:34 +00:00
Stegmujo 89c9bb770e
Fix gcd, min, max statements
* with and without succeeding parentheses
* indices in FullCoverageTest: 21,22,33

Bug: T331998
Change-Id: I3a14db18764cc6df9b83249d19ed7de3b6489b1b
2023-03-15 10:42:46 +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
jenkins-bot d7c931fbaa Merge "Add minimal native MML mode" 2023-03-07 11:45:31 +00:00
Moritz Schubotz (physikerwelt) aa828066df
Catch all exception during rendering
When switching to native MathML rendering more code is
beeing executed and Errors might be thrown. We want to make sure
that bugs in individual formulae don't break the display for the
entire page. Therefore, we extend the the catch clause to catch all
throwables.

Change-Id: I3deda42950bee75d9257135854535dd41a5e18dc
2023-03-02 22:19:38 +01: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
jenkins-bot 35257884ea Merge "Fix for tex-statement definecolor" 2023-03-02 11:16:20 +00:00
jenkins-bot 76686aa904 Merge "Introduce method to get checker" 2023-03-02 11:16:18 +00:00
Moritz Schubotz (physikerwelt) daadfad9ae
Introduce method to get checker
Allow MathRenderers to overwrite the way how the checker is initalized.
This will be needed for native MathML where LocalChecker will be used.

Change-Id: I358bef495675f7f8f9028f81484c4e535b9336f8
2023-03-02 11:41:15 +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 b9011e8e5b Fix for tex-statement "\pagecolor{red} e^{i \pi}"
* case 2 phabricator: "colors"
* index: 17

Bug: T327391
Change-Id: I202e13de8c07b63b0dfbff28036c9eb7fcc52db8
2023-03-01 15:26:03 +00:00
Stegmujo d23c6dc84d Fix for tex-statement "a {b \\color{red} c} d"
* case 2 phabricator: "colors"
* index: 16

Bug: T327391
Change-Id: I0c19dcc3819372c464d2ac0742160cec3bb8757a
2023-03-01 15:25:55 +00:00
jenkins-bot 64c3f6893a Merge "Add native MathML rendering mode to MathConfig" 2023-03-01 14:25:05 +00:00
jenkins-bot 567bd826e3 Merge "Fix for state forwarding" 2023-03-01 13:52:41 +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
Stegmujo 00fd80f56d Fix for state forwarding
Bug: T327391
Change-Id: I71ed330b866b945c7ec91e6d43831029c63e78a5
2023-03-01 12:01:52 +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
Stegmujo ef2f59eed5
Fix exceptions thrown by LocalChecker
* for more consistency with the other Checker initialisations in
InputCheckFactory

Bug: T327098
Change-Id: Ia85775dea6a7dda5fcf42d66a161da49515ba0aa
2023-02-27 17:52:28 +01:00
Stegmujo 6ffaed440c
Remove additional mi for Hbox cases in TexUtilTest
* fix results for tests
* testindices 53 to 58
* formerly this contained a comparator fix (rolled back)

Bug: T327392
Change-Id: I1af65d5d8a4625d164630254da285830f4c9e0a3
2023-02-16 20:25:48 +01:00
Stegmujo 14c38c8f46
Fix vline in Matrix in TexUtilTest
* case index 654

Bug: T327392
Change-Id: I3f7d22ff501a30eef79baf82236406d8f5e450ae
2023-02-16 17:16:19 +01:00
jenkins-bot 1259375bfd Merge "Add state array to MathML rendering tree" 2023-02-16 09:17:51 +00:00
Stegmujo 65b3114e5b
Allow \circ command in bonds in TexVCPHP
Add \circ to mhchem macros to allow them in bonds.

Bug: T328833
Change-Id: I3100033904e28a181a2e674da388832678eb0db3
2023-02-15 14:25:30 +01:00
Moritz Schubotz (physikerwelt) 6efbf4dd00
Add state array to MathML rendering tree
For conditional rendering a state variable is needed.

Change-Id: Iac1a1058fecf89c58a02ca3b643e973b4742f51f
2023-02-15 11:04:20 +01:00
Stegmujo f760f896b2 Fix binom and dbinom in TexUtilTest
*indices: 79, 82

Bug: T327392
Change-Id: Ib1c19a52eea5f6433f52e440007cf6ba4ba4d48c
2023-02-14 11:53:58 +00:00
jenkins-bot e776fc32be Merge "Fix underline overline cases in TexUtilTest" 2023-02-13 20:03:40 +00:00
Stegmujo 448d1bb658 Fix underline overline cases in TexUtilTest
* indices: 48, 59

Bug: T327392
Change-Id: I6962b238485e03a7e2f65fd10d20377dbc2c5892
2023-02-13 18:14:03 +00:00
Stegmujo 0a3a4a4ff2
Fix parsing of 'P' operator
* index 219

Bug: T327392
Change-Id: Ie820c303ef0fcaa86d10022982023cebfc0e8046
2023-02-13 14:25:05 +01:00