mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Math
synced 2024-11-28 01:10:09 +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 );
|
||||
|
|
Loading…
Reference in a new issue