mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Math
synced 2024-11-24 07:34:22 +00:00
Merge "Change default value for $wgMathLaTeXMLUrl"
This commit is contained in:
commit
86617af1db
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