Commit graph

14 commits

Author SHA1 Message Date
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
physikerwelt 4ca287b43a Improve MathML error handling
This change improves the error handling for MathML.

* Make MathHooks::getMathNames public
* Allow to use the same error messages for LaTeXML and Mathoid
* unify the string delimiter in error messages to "

Change-Id: I6568e6a3c98cb008f45f887d42e446daafe0ed3c
2014-06-04 07:38:48 +00:00
physikerwelt bf33d51320 Add separate database table for LaTeXML (step 3)
Currently the PNG and the LaTeXML rendering mode
use a common table in the database. If both rendering
modes are allowed in a wiki simultaneously this causes
problems, because the fields are continuously overwritten.

This change adds the method getMathTableName that will
allow renderers to access their specific table in the
database.

Change-Id: I8b11ffd0a39fadd7d3c8de1e94e74ff5f490430d
2014-05-27 05:33:20 +00:00
physikerwelt 3b7ea6413c Change default value for $wgMathLaTeXMLUrl
new LaTeXML instance.
Sponsored by https://www.xsede.org/

Cherry-Pick from Id92ef141c7921a82528b3ba4384e026322499312

Change-Id: Idd1de9da348d473acc6cea8d2d1a855f1f6b07fa
2014-05-09 11:06:39 +02: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) 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
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
Max Semenik 4d68c31de1 Add profiling
Change-Id: I9066f6b2606044412a9b91ca395e841550d7e787
2013-11-18 14:46:00 +04: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 233d285264 Replace SimpleXml by Mediawiki library
This replaces the SimpleXML library by
the internal class XmlTypeCheck

Needs at least that version
 https://gerrit.wikimedia.org/r/#/c/66365/

Change-Id: Iafbd820f7130c8eb8d4f19824632b4ac89f214a9
2013-06-18 08:35:01 +00:00
physikerwelt 443c7ef95a Calculate HTTP POST data in separate method for debugging
To check if the renderer works correctly it is desired to be able to
separate the test of the renderer and the function of the extension
PHP code. Therefore the method getPostData can be used to get
the values can be sent to the renderer directly via
curl –d 'POSTDATA' URL

Change-Id: I530f5fcba46364458643914bca81cf0bc1b60a58
2013-05-30 07:59:27 +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