Use of &$this doesn't work in PHP 7.1. For callbacks to methods like
array_map() it's completely unnecessary, while for hooks we still need
to pass a reference and so we need to copy $this into a local variable.
Bug: T153505
Change-Id: Ib31f3bbffdd6b25ad9a21498294644e4dde33bd1
The signature of the Hook function is not respected.
Thus parameters need to be passed by reference explicitly.
For syntax validation to pass, this requires
mediawiki-codesniffer to 0.6.0
Change-Id: I90b6501000200c1b462407b769113358eb5c762f
* Use string constants instead of integers
* Derive new names from old via conversion of constant
naming convention to CamelCase.
* Replace old constant string e.g. 'MW_MATH_ABC_DEF'
with new string 'abcDef'
* Replace old constant value with new string.
* Tests to demonstrates what is actually done.
* Rename constants
Bug: T106630
Bug: T106631
Bug: T87941
Change-Id: I6d1094ece79e912d9ddbef6681a25196c7a6e801
* MathDebug was intended to provide advanced debugging functionality
for the math extension. However, the interesting debugging and
logging feature never made it from the debug branch to the master.
* The current debug functionality is mostly useless. Only some values
are written to memory and never used thereafter.
* This change moves the existing functionality to the MathSearch
extension and introduced the required hook for that.
Details:
* $wgMathDebug is removed
* A new Hook MathRenderingResultRetrieved is created
* The math rendering object is printed to the svg error
page if wgDebugComments is active (instead of wgMathDebug)
Change-Id: I6fad69b5d9b9ca8a7d12c7e410d3ae6180fbddbf
MathMathML::renderingRequired called the getSvg
function in MathLaTeXML that caused an automatic
rerendering of the SVG image if it was not cached.
That this rendering is triggered from the function
renderingRequired is contra intutive and should be
avoided.
Change-Id: Ifa14f50193a05b3058624a18974c56897fcec09e
Use the cached function isInDatabase rather than readFromDatabase to
avoid unnecessary read operations on the database.
Currently, readFromDatabase is usually called only once during instance
livetime. But after I455b41c8b8d918f4c34f6c115194d227a8394e0a has bben
merged chances are that it's called twice.
Change-Id: I6434195ad1d323a578a8fdca1b4555e11ab30a15
Currently SVGs are generated only in
MathML mode but not in LaTeXML mode.
Since LaTeXML can benefit from the
SVGs as well this change introduces
the functionality to generate SVG
images from LaTeXML MathML input.
Generating SVG images for LaTeXML is an essential
part of Math 2.0. It enables to include LaTeXMLs Content
MathML and provides fallback
images for visitors with MathML disabled browsers.
Change-Id: If13a8b0825bf12dbfe4920ddb7ad552df9bc095f
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
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
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
new LaTeXML instance.
Sponsored by https://www.xsede.org/
Cherry-Pick from Id92ef141c7921a82528b3ba4384e026322499312
Change-Id: Idd1de9da348d473acc6cea8d2d1a855f1f6b07fa
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
* 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
* 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
* $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
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
* 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
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
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