mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Math
synced 2024-11-28 01:10:09 +00:00
Change default value for $wgMathLaTeXMLUrl
new LaTeXML instance. Sponsored by https://www.xsede.org/ Cherry-Pick from Id92ef141c7921a82528b3ba4384e026322499312 Change-Id: Idd1de9da348d473acc6cea8d2d1a855f1f6b07fa
This commit is contained in:
parent
a586c80083
commit
3b7ea6413c
2
Math.php
2
Math.php
|
@ -134,7 +134,7 @@ $wgUseMathJax = false;
|
|||
* servers in an array e.g $wgMathLaTeXMLUrl = array ( 'http://latexml.example.com/convert',
|
||||
* 'http://latexml2.example.com/convert');
|
||||
*/
|
||||
$wgMathLaTeXMLUrl = 'http://latexml.mathweb.org/convert';
|
||||
$wgMathLaTeXMLUrl = 'http://gw125.iu.xsede.org:8888'; // Sponsored by https://www.xsede.org/
|
||||
|
||||
/**
|
||||
* The timeout for the HTTP-Request sent to the LaTeXML to render an equation,
|
||||
|
|
|
@ -234,6 +234,11 @@ class MathLaTeXML extends MathRenderer {
|
|||
wfProfileIn( __METHOD__ );
|
||||
$host = self::pickHost();
|
||||
$post = $this->getPostData();
|
||||
// There is an API-inconsistency between different versions of the LaTeXML daemon
|
||||
// some versions require the literal prefix other don't allow it.
|
||||
if ( ! strpos( $host, '/convert' ) ){
|
||||
$post = preg_replace( '/&tex=/' , '&tex=literal:', $post , 1);
|
||||
}
|
||||
$this->lastError = '';
|
||||
if ( $this->makeRequest( $host, $post, $res, $this->lastError ) ) {
|
||||
$result = json_decode( $res );
|
||||
|
@ -342,4 +347,4 @@ class MathLaTeXML extends MathRenderer {
|
|||
return Xml::tags( 'span', $attribs, $mml );
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue