Commit graph

21 commits

Author SHA1 Message Date
physikerwelt (Moritz Schubotz) 8d94d57d2d Move integration tests to a new special page
The integration tests depend on the presence of external servers
and the user settings.
First, people are bothered by  failing test due to problems with
those servers and second, administrators need to run phpunit tests
to verify the configuration settings.
Therefore, we move the integration tests to a special page.

Bug: T87389
Change-Id: If66f13fe7fa16868cd4b1d8f0e0a6e3d49448b27
2015-02-08 20:13:04 +01:00
Timo Tijhof dc12796ced Merge changes from master to debug
combine commits to avoid potential problems
with gerrit and jenkins

This is a combination of 30 commits.
ve.ce.MWMathNode: Remove reference to defunct ve.bind

Bug: 73627
Change-Id: I3dd6b520a24e5cecb272de8f9a4aa0ba231bee58

Localisation updates from https://translatewiki.net.

Change-Id: I6074394864ee7c61b416ae146c94c75d48f509af

Localisation updates from https://translatewiki.net.

Change-Id: I2fa13da30e606e1dfb1e13ae64fb125bf4bfadf6

Fix Mathoid integration test

A recent change in mathoid, i.e.
I8d3cec0ee8a8c9368b7dca89e1d5e0c5683f946c
removed the margins. This causes breaking unit tests.

Change-Id: I312d6226c6f24c84254b99ee6292564a421133c3

Localisation updates from https://translatewiki.net.

Change-Id: I053b90b6a583c411270c950ab6bc0d4e94db583f

Localisation updates from https://translatewiki.net.

Change-Id: Icc6d5d961ad97e19de3c4fbdb86e5aa9315998bb

Localisation updates from https://translatewiki.net.

Change-Id: I7b8faf72ba814154896cf5039e14d23f07509440

Localisation updates from https://translatewiki.net.

Change-Id: I83ca4e6eb8eef02e98ddc6f556d113942fa436df

Localisation updates from https://translatewiki.net.

Change-Id: Icb25e8b51409754130ce22c47474f644c087124e

Localisation updates from https://translatewiki.net.

Change-Id: I6dae3f8fc6723265bf47b721148d261b11828f33

Fix for fatal caused by static call to MathRenderer::getError

MathRenderer::getError() uses $this, so it should not be called statically.
MathInputCheckTexvc should instead call its convertTexvcError method, which
constructs a MathRenderer object so it can call its getError method.

This code is pretty awful. But this way it won't throw fatal errors all the time.

Change-Id: Ic438b307a3b464651363b4cc16698c7d4320b253

Add support for display and ID attributes to VisualEditor

Change-Id: Ie65ff26c9e214f74b0217238a3def2242505d4c2

Localisation updates from https://translatewiki.net.

Change-Id: I5f978989a57affa823632061300f5de7028b2ec0

Localisation updates from https://translatewiki.net.

Change-Id: I366383149cb56c90800e06f94aaa6c8895d2381c

Localisation updates from https://translatewiki.net.

Change-Id: I204cb407cfb417961da361b4eaa84af432e2bd29

Localisation updates from https://translatewiki.net.

Change-Id: Ib3f357a76752ce2cba8642a02ec4f5373ddabe52

Localisation updates from https://translatewiki.net.

Change-Id: Iec289070ab64e2014b4c7f371926c03466258e3c

Localisation updates from https://translatewiki.net.

Change-Id: Id297a13ca02524d9db16990b6cdd282b0b52fd73

Localisation updates from https://translatewiki.net.

Change-Id: I1b86d72690b5907ef438d69cf067da6dcc1891b2

Localisation updates from https://translatewiki.net.

Change-Id: Ib4eb016b1602d94a73c5e355f0ae4a744083b0c3

Localisation updates from https://translatewiki.net.

Change-Id: I6b0398be5ec8ba5bfc71c987f80973bf2bb8afe3

Localisation updates from https://translatewiki.net.

Change-Id: Ie485a03f09f1534071d18abf64bbfa446cdee754

Localisation updates from https://translatewiki.net.

Change-Id: I2445b8fbf1b35f437d6dba99d9fe081833ab5089

Localisation updates from https://translatewiki.net.

Change-Id: If1f94c16fd20feef3403e326d58526eeb17c6a86

Localisation updates from https://translatewiki.net.

Change-Id: I74dcb97bbb16bfc6e0700ed90fcf9705f7bdecf8

Localisation updates from https://translatewiki.net.

Change-Id: I0ac3c68f796cde959629d63079d212473ad5a729

Localisation updates from https://translatewiki.net.

Change-Id: I35f1687b4f4e7030a91bdc8aba3c04bbf71f55a4

Localisation updates from https://translatewiki.net.

Change-Id: I64dfcdedea5ed345f730fe7080c8b511fe21dc49

Localisation updates from https://translatewiki.net.

Change-Id: Ib5c89c89ba2091f7784cc1c1237150ec55741fd7

MWException -> Exception

Change-Id: I18da1baeb70387b96e30811a049185a264dec26d

Update MathParser tests

In the most recent version of ubuntu14 the outputhash of the
png images for some math objects has changed.
However, the rendered images seem to look ok.

Bug: T86309
Change-Id: I52dbdefdcfa19c10f1d9d1a43369aabe8bfd92bf

Correct wrong variable name

Change-Id: Iecfa0bfa5861e077d98f7bf06af0e98cda56220b

Remove unused global

Change-Id: I8f5f77015de266f5a5b751fd7cfe424784eb3864

Update LaTeXML test

* The LaTeXML server was updated. In the new version unneccary id's
  have been removed.

Change-Id: I25927912f1500ebfe6d61505c0e06ae2c24d6f6a

Update license headers

Change-Id: Ia38926b253e53a2cef5dfab623353e1dd79ad613

Make main code input area monospaced

A monospaced font is more suitable for writing LaTeX.

Change-Id: I1a6c7bbbe3618f43808be15eab1579de8b2ad59f

Whitespace fixes

Change-Id: Id22a4bfdc1b8c4074f6d7e6f21e8dbc2824d856e

Localisation updates from https://translatewiki.net.

Change-Id: I01c4bbe241c0842027b030ee912b8e481c90f625

Localisation updates from https://translatewiki.net.

Change-Id: Ie012febb53ee642520e71f18285d5b9e4133e224

Improve Math test generation

* Use the wikitext parser and not regexp to extract math
  tags from the page.
* Extract the attributes from the math tags as well

In a follow up a pseudo attribute in the math tag could
be introduced to provide a bug description.

Change-Id: I0dec18d4e3f87e7b58b097b2a08c4897ceaf29ac

Remove unused XML namespace

Bug: T87142
Change-Id: I1c900584aeafbeb5848a3300904710ee312d6223

Add type hinting for newFromMd5 constructor

Bug: T87142
Change-Id: I2989ff42e48e802c1eed1877f0f2ac9316b5fd21

Remove duplicate entry from .gitignore

Change-Id: I78c7e9b630c6e96a2f125f20461ff9e720754ec4

MathRenderer, SpecialMathShowImage: Correct phpdoc

Change-Id: Ibce076dfb6bd3676e288cf2d762ebcb55606246d

MathMathML, MathTexvc: Improve PhpDoc

Change-Id: I84af65e15bdae81f69f0444afdd9ffa5fe9fc326

Minor clean up, optimisations and documentation corrections

* Handle-error-first approach for consistent function body
  termination at the root with the main intend, and less indention.

* __DIR__ instead of dirname( __FILE__ )

* Single quotes.

* Correct pickHost documentation: wgMathMathMLUrl is not an array,
  and is not used in this method, that's at a different level
  of abstraction (via the constructor).

* White spacing.

* require_once is not a function.

Change-Id: Id4bec8415893245e2569a39ab5406a0820238ae4

Add dependency on mediawiki.toolbar

Follows-up Ibcda91bbb164b0.

ext.math.editbutton.enabler uses mw.toolbar. The toolbar interface
used to be part of mediawiki.action.edit but is now in its own module.

Bug: T86235
Change-Id: I37a0b8e84a9bd6a0de0386d5b9924bbbbbd7249c

Localisation updates from https://translatewiki.net.

Change-Id: I14cfdb2153121a9cbcd40345398dc84d3b17518f

Fix rendering issues in MathML mode

Force display:none on a hidden MathML rendering to avoid generating
focusable node highlights.
Move adding of class to setup to ensure it persists after render.

Bug: T87007
Change-Id: I5fc21afa61ccc07e9d2126846cf29ee898182a7c

Localisation updates from https://translatewiki.net.

Change-Id: I2cfa5bae2a6864548816934483cd2276e1071865

Localisation updates from https://translatewiki.net.

Change-Id: I7eb73bd36e5cd4461647bf05166fd2fd2fcbee07

Localisation updates from https://translatewiki.net.

Change-Id: I174400c5a3dad8f6bf8d03b7c738d5068682ceb3
2015-02-08 19:45:07 +01:00
Physikerwelt 2a20654ab9 Revert "Disable failing latexml integration tests"
This reverts commit 4c544f002b.

Change-Id: Ifafb5782e10e80240a282beb449ab069ad93c37f
2014-10-11 19:17:29 +02:00
Gabriel Wicke 4c544f002b Disable failing latexml integration tests
Change-Id: Ib0ea79155f87f036464756b3d303048f8df84897
2014-10-08 17:45:24 -07:00
physikerwelt (Moritz Schubotz) 5e2c1c5101 Displaystyle in Mathoid 0.2.5
Beginning from mathoid 0.2.5 displaystyle is the default
option. This property has to be removed as default.

Change-Id: I3c176f4227f32709f6db4014e1e3b435c3c853c4
2014-07-20 00:00:43 +00:00
physikerwelt (Moritz Schubotz) cbbf5453d1 Enable MathML rendering mode
This change allows to registered users
to test the new MathML rendering mode.
Invalid settings for math rendering mode
will default to MathMathML.

Change-Id: I75f24cb762609d6728247e3758fcc18f2ebfc6e6
2014-06-11 13:21:34 +02:00
physikerwelt 65642489ae Separate render and getHtml
Currently the method render always returns
a html string that can be a string that
represents the correct result or a rendered
error message.
This change splits rendering and
fetching of the HTML output.
This simplifies the logic of the rendering
and caching mechanism.
Now the render method returns a boolean that
indicates if the rendering was sucessful or
not.

Step 2/2

Warning: Errors in this change might affect
caching logic and squid caches.

Change-Id: I00502b84212ed70cdf63bd69916a35afbd6fdbc1
2014-06-09 23:21:44 +02:00
physikerwelt c390f6479a Add getHtmlOutput method
Currently the method render always returns
a html string that can be a string that
represents the correct result or a rendered
error message.
This change adds a mechanism that allows
to fetch the HTML output.
In a followup commit the rendering function
is changed to return a boolean value rather
than the rendering result.
This will simplify the error handling and caching.

Change-Id: I80760493e391911c41eb69d75a93c6a34db8852e
2014-06-06 21:52:35 +02:00
physikerwelt (Moritz Schubotz) 52656990b4 MathMathML
The LaTeXML class contains some code that is
not specific to LaTeXML but to MathML.
This code can be shared between LaTeXML and Mathoid.
This change introduces a new class called MathMathML
and moves the shared code from the LaTeXML class to this
new class.

Bug: 65973
Change-Id: I50517ba83f9a0d2aa8e237f062f18e4319ddbac8
2014-06-05 09:06:33 +00:00
Moritz Schubotz (Physikerwelt) 3a36b25ee3 Fix: Allow <div /> as valid Math output
Some simple math tags such as the rendering result of
$\mathcal{ABC}$
are converted to an HTML-div tag by LaTeXML if inline-mode
is used. This change
* makes the $wgMathDefaultLaTeXMLSetting easier to read
* improves the XML validation of the LaTeXML output.

Change-Id: I807dbfa3a45930deec8eb5615133be9a39f3f101
2014-04-08 16:13:28 +00:00
Moritz Schubotz (Physikerwelt) 58f913ecb0 $wgMathValidModes and orthogonal MathJax enabler
To adjust the selectable math rendering modes in user preferences $wgMathValidModes
is introduced.

* $wgUseLaTeXML becomes unnecessary use $wgMathValidModes[] = MW_MATH_LATEXML;
  to enable the LaTeXML rendering mode
* add $wgMathValidModes[] = MW_MATH_MATHJAX; to enable MathJax

Currently, MathJax is bound to the MW_MATH_SOURCE rendering mode.
This change makes the base mode user configurable.
That means before MathJax is loaded the png fallback image could
be displayed.

ATTENTION: This change modifies global variables as follows:
* MW_MATH_MATHJAX is deprecated.

Bug: 57981
Change-Id: Ibf705cb66754d04e4c7eafd1e98608b25d7dbb94
2014-04-08 15:29:42 +00:00
Moritz Schubotz (Physikerwelt) c5b0b15d8f Fix MathJax centers equations
* Removes the MathJax heuristics that decides
  if equations are centered or left-aligned.
* Introduces the attribute display to specify
  if the math element is rendered in inline,
  display, or inline-displaystyle.
* add css rules for display / inline math images

Bug: 61051
Change-Id: Iba69903f781f0cb1606b8ddcffb90fb86c9b229b
2014-04-06 21:58:30 +00:00
Moritz Schubotz (Physikerwelt) 0b6ed3ce2f Improvement of LaTeXML integration tests
* use setMwGlobals to set the globals

Change-Id: I253c75f93fe6fa098b1b6f462129148782db2fa7
2014-03-20 15:51:00 +00:00
addshore 80bf30ca45 Split up some long lines in tests
Change-Id: I45be8ea1b9a9a974614354c0199e3107a5cdc23e
2014-03-11 23:32:33 +00:00
physikerwelt 94b035b26a Coverage tests for the Math extension
* Include generated tests for a better test coverage
of the Math extension.
* Compiles texvc in testsuite (if required)
* Test generator now included
* Replaces the old parser tests
* Fixes whitspace issues

Bug: 61090
Change-Id: Iff7eeb5ee72137492c3f6659e4d4d106e5715586
2014-03-11 15:35:07 +00:00
physikerwelt dd4f911d87 Rename some global variables that violate the naming convention
* $wg(.*) variables from extension should start with the extension name
    i.e. for extension Math $wgMath(.*)
* But keep $wgUseMathJax, because it has been used for 2 years now.
* Add release notes

Change-Id: Ib70a9f7767890cc4618bc10c2610784f5b17e670
2014-02-01 11:56:07 +00:00
physikerwelt abba28949c Fix LaTeXML integration test
The XML attributes in LaTeXML are ordered alphabetically now.

Bug: 60279
Change-Id: Iba810f71a151fa2ae56140557cc902fe1f8c1062
2014-01-21 08:17:49 +00:00
physikerwelt (Moritz Schubotz) 12b43489ea Expose LaTeXML Settings
Make LaTeXML setting configurable with the new global
variable $wgDefaultLaTeXMLSetting.

PS: This variable can be specified as an array or a
string. If specified as an array, the
 array('a'=>'b','c'=>array('e','f'))
would be transformed to the equivalent setting
 a=b&c=e&c=f
,which is the input format for the LaTeXML daemon.

Change-Id: I2869df27cee83b426c6eb2312306fac9d6203ef2
2013-09-20 17:20:03 +00:00
physikerwelt 48461d0fca Check if media wiki core is capable of xml type checking
* new test for XML type checking function
* check if StrigUtils::isUtf8 exists in core (Thanks to Deyan Ginev for the hint.)

Bug: 50884
Change-Id: I86af95cbecc4b5c9c33fcd3a66a7fb2ccdde0194
2013-07-18 20:49:09 +00:00
physikerwelt (Moritz Schubotz) ffdd0f6c87 Fix: Added details to error message
The detailed information about the error messeage provided by the MW
HTTP libraries has not been passed to the end-user output.

Change-Id: I9cac67d8fc3a732a87c14e922670253e82f64bbb
2013-05-26 23:02:10 +00:00
physikerwelt 927340d345 New rendering option LaTeXML
Introduces a new rending option to render TeX to MathML
via LaTeXML.

Bug: 43222
Change-Id: I5d29e219c0d3b907e22ea0bb3b30f000d8a7a9f8
2013-05-26 12:12:51 +00:00