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:
physikerwelt 2014-05-05 16:13:43 +00:00 committed by physikerwelt (Moritz Schubotz)
parent a586c80083
commit 3b7ea6413c
2 changed files with 7 additions and 2 deletions

View File

@ -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,

View File

@ -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 );
}
}
}