Commit graph

266 commits

Author SHA1 Message Date
Stegmujo 9abb258422
Fix genFrac bracket sizes
* genFrac renderMML function with bracket can produce false stretching
  on Chrome
* fixed for the cases with brackets (dbinom, tbinom, binom)

Bug: T350735
Change-Id: I0939de86963fa9c226346ce15e7edf7fc4e83c68
2023-11-20 16:32:44 +01:00
Stegmujo a4c3a365af Make distinction of bracket sizes
* \bigl( \Bigl( \biggl( \Biggl(

Bug: T350738
Change-Id: I557e6ff78255d0de28df1d6f6b6e78b76f9d8388
2023-11-17 15:54:10 +00:00
Stegmujo 7b03a170db
Fix liminf and limsup spacing
* and injlim projlim spacing

Bug: T350491
Change-Id: I7e4491fbdd461a4583f5418ba1924c647bb2df94
2023-11-03 18:37:27 +01:00
Stegmujo ac1d7a9a7b
Fix calls to trim null
Bug: T348936
Change-Id: I6e3fca041fb81975b175977b9a18d69fbf58620b
2023-11-03 17:02:22 +01:00
jenkins-bot 606f4347d1 Merge "Append invisible apply character" 2023-10-31 19:22:01 +00:00
Stegmujo 2c81f052c7
Append invisible apply character
* to named functions and named operators
* You can consider using that invisible apply character (U+2061) after other function names with known arguments (such as \sin, \cos...). Some accessibility tools take advantage of it, I am told, but it may also be used to provide correct spacing from the MathML operator dictionary. In Chrome <mi>sin</mi><mi>a</mi> will show up with no added spacing as sina, which is not ideal.

* namedFct with any succeeding macros/characters have an apply function

Bug : T350021

Change-Id: I7ee5fdd580fb018bc108a32500c17914dd5dc05f
2023-10-31 16:33:15 +01:00
jenkins-bot 83835f19e7 Merge "Add a possibility for creating a test wikipage for chemical formulas" 2023-10-30 16:22:48 +00:00
Moritz Schubotz (physikerwelt) bd474256a6 Remove functional dead code about PNG images
* PNG images are no longer displayed as of
  I595926027433182cc0396570bc3f1ce0cd2cafb3
* Remove functional dead code about PNG images
* Replace some type hints with type delcarations

Bug: T311620
Change-Id: I283c23e327ef908cfb4c827599fdcdb16252b08c
2023-10-30 10:46:08 +00:00
jenkins-bot 9ba97826f4 Merge "Fix incorrect child count of some element" 2023-10-27 14:00:30 +00:00
Stegmujo 9e9ba0241a Fix incorrect child count of some element
- munder: if only one child munder is not added as wrapping mml tag
- msup: renders an empty mi if there is no content for the superscript

This prevents some warnings in firefox browser dev-console.

Bug: T349825
Change-Id: Ia5efc1f33e3368e71527153d56160eee4ba3a46d
2023-10-27 13:17:55 +00:00
jenkins-bot 413b21d3be Merge "Remove too many rows in smallmatrix" 2023-10-27 10:53:49 +00:00
Stegmujo a53a5d58c8
Remove too many rows in smallmatrix
* From Feedback: The {smallmatrix} example has its fences wrapped in too many mrows I think, so it renders without stretching them in both Firefox and Chrome. Ideally you should be able to emit the <mo>(</mo> followed directly by an <mtable>, and trailed by <mo>)</mo>, and only wrap those 3 into a parent <mrow>.
* removes mrows and adds OPEN / CLOSE attributes
* tests MMLFullcoverage 194 to ~196 which cover the bigXYZ macros look
  ok

Bug: T348971
Change-Id: Ie444e5bb3e3f87fac915d2692b69e976d721582e
2023-10-27 11:19:06 +02:00
Stegmujo 8112c65a5d
Remove mstyle around spacing elements
* From Feedback: There is a curious use of <mstyle> around spacing elements, as in <mstyle scriptlevel="0"><mspace width="-0.167em"></mspace></mstyle>. I am not sure that wrapper element is needed? The mspace ought to be successful standalone.
* this is in the 'bmod' case

Bug: T349822
Change-Id: I9229ad73891d5000679761d3d4b2028d4a51ddf1
2023-10-27 10:35:59 +02:00
jenkins-bot 30c156a0a8 Merge "Make dataProvider in EnWikiFormulaeTest static" 2023-10-22 13:24:30 +00:00
jenkins-bot 9706ed33ba Merge "Make dataProvider in PopupTest static" 2023-10-22 05:02:42 +00:00
Moritz Schubotz (physikerwelt) de2913d960
Make dataProvider in EnWikiFormulaeTest static
Bug: T337160
Change-Id: I71205d564a3063e834a3cd0fc0075a3a6b7a19d2
2023-10-22 06:59:38 +02:00
Moritz Schubotz (physikerwelt) 7965a91ae5 Make dataProvider in PopupTest static
Bug: T337160
Change-Id: I1c5384d319d9e34397ed4d94b4d9888d46722b91
2023-10-21 21:06:06 +00:00
Moritz Schubotz (physikerwelt) 70ea8e0c88 Make dataProvider in MathWikibaseConnectorTest static
Bug: T337160
Change-Id: Idf24afec194b3bdf01dfcde0b9cac48faae2bb4d
2023-10-21 21:05:42 +00:00
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