Differentiate missing texvccheck from missing texvc
Introduce different error messages for missing texvccheck and texvc and update the README file. Bug: 61154 Change-Id: I52f796f181f6a3ab6d65a8e8d89f59d523d5b7b8
This commit is contained in:
parent
e0b3883c55
commit
dcc3f0fd3c
|
@ -34,6 +34,7 @@ $messages['en'] = array(
|
||||||
'math_bad_tmpdir' => 'Cannot write to or create math temp directory',
|
'math_bad_tmpdir' => 'Cannot write to or create math temp directory',
|
||||||
'math_bad_output' => 'Cannot write to or create math output directory',
|
'math_bad_output' => 'Cannot write to or create math output directory',
|
||||||
'math_notexvc' => 'Missing texvc executable; please see math/README to configure.',
|
'math_notexvc' => 'Missing texvc executable; please see math/README to configure.',
|
||||||
|
'math_notexvccheck' => 'Missing texvccheck executable; please see math/README to configure.',
|
||||||
'math_output_error' => 'Cannot store math image on filesystem.',
|
'math_output_error' => 'Cannot store math image on filesystem.',
|
||||||
'math_latexml_timeout' => 'LaTeXML timeout from \'$1\'',
|
'math_latexml_timeout' => 'LaTeXML timeout from \'$1\'',
|
||||||
'math_latexml_invalidresponse' => 'LaTeXML Invalid response (\'$2\') from server \'$1\':',
|
'math_latexml_invalidresponse' => 'LaTeXML Invalid response (\'$2\') from server \'$1\':',
|
||||||
|
@ -132,6 +133,9 @@ This message follows the message {{msg-mw|Math failure}}.',
|
||||||
This message follows the message {{msg-mw|Math failure}}.',
|
This message follows the message {{msg-mw|Math failure}}.',
|
||||||
'math_notexvc' => 'Used as error message.
|
'math_notexvc' => 'Used as error message.
|
||||||
|
|
||||||
|
This message follows the message {{msg-mw|Math failure}}.',
|
||||||
|
'math_notexvccheck' => 'Used as error message.
|
||||||
|
|
||||||
This message follows the message {{msg-mw|Math failure}}.',
|
This message follows the message {{msg-mw|Math failure}}.',
|
||||||
'math_output_error' => 'Used as error message if the texvc output file could not be stored.
|
'math_output_error' => 'Used as error message if the texvc output file could not be stored.
|
||||||
|
|
||||||
|
|
2
Math.php
2
Math.php
|
@ -132,7 +132,7 @@ $wgMathLaTeXMLTimeout = 240;
|
||||||
*/
|
*/
|
||||||
$wgMathDefaultLaTeXMLSetting = 'format=xhtml&whatsin=math&whatsout=math&pmml&cmml&nodefaultresources&preload=LaTeX.pool&preload=article.cls&preload=amsmath.sty&preload=amsthm.sty&preload=amstext.sty&preload=amssymb.sty&preload=eucal.sty&preload=[dvipsnames]xcolor.sty&preload=url.sty&preload=hyperref.sty&preload=[ids]latexml.sty&preload=texvc';
|
$wgMathDefaultLaTeXMLSetting = 'format=xhtml&whatsin=math&whatsout=math&pmml&cmml&nodefaultresources&preload=LaTeX.pool&preload=article.cls&preload=amsmath.sty&preload=amsthm.sty&preload=amstext.sty&preload=amssymb.sty&preload=eucal.sty&preload=[dvipsnames]xcolor.sty&preload=url.sty&preload=hyperref.sty&preload=[ids]latexml.sty&preload=texvc';
|
||||||
/**
|
/**
|
||||||
* The link to the texvc executable
|
* The link to the texvccheck executable
|
||||||
*/
|
*/
|
||||||
$wgMathTexvcCheckExecutable = dirname( __FILE__ ) . '/texvccheck/texvccheck';
|
$wgMathTexvcCheckExecutable = dirname( __FILE__ ) . '/texvccheck/texvccheck';
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -59,7 +59,7 @@ class MathInputCheckTexvc extends MathInputCheck {
|
||||||
public function doValidCheck() {
|
public function doValidCheck() {
|
||||||
global $wgMathTexvcCheckExecutable;
|
global $wgMathTexvcCheckExecutable;
|
||||||
if ( !is_executable( $wgMathTexvcCheckExecutable ) ) {
|
if ( !is_executable( $wgMathTexvcCheckExecutable ) ) {
|
||||||
$msg = wfMessage( 'math_notexvc' )->inContentLanguage()->escaped();
|
$msg = wfMessage( 'math_notexvccheck' )->inContentLanguage()->escaped();
|
||||||
trigger_error( $msg, E_USER_NOTICE );
|
trigger_error( $msg, E_USER_NOTICE );
|
||||||
wfDebugLog( 'Math', $msg );
|
wfDebugLog( 'Math', $msg );
|
||||||
return true;
|
return true;
|
||||||
|
|
4
README
4
README
|
@ -6,11 +6,13 @@ This version (for MediaWiki 1.19) has some changes since previous versions:
|
||||||
|
|
||||||
See the README in the math subdirectory for more info on setting up the
|
See the README in the math subdirectory for more info on setting up the
|
||||||
low-level conversion tools.
|
low-level conversion tools.
|
||||||
|
See the README in the texvccheck subdirectory for more info on setting up the
|
||||||
|
security checking tools for MathJax and LaTeXML.
|
||||||
|
|
||||||
MathML support:
|
MathML support:
|
||||||
If you prefer MathML rather than images you can use LaTeXML to convert the
|
If you prefer MathML rather than images you can use LaTeXML to convert the
|
||||||
math tags to MathML. To use that feature you have to enable LaTeXML by setting
|
math tags to MathML. To use that feature you have to enable LaTeXML by setting
|
||||||
$wgUseLaTeXML = true;
|
$wgMathUseLaTeXML = true;
|
||||||
It is possible to choose LaTeXML as default option (for anonymous user) by setting
|
It is possible to choose LaTeXML as default option (for anonymous user) by setting
|
||||||
$wgDefaultUserOptions['math'] = MW_MATH_LATEXML;
|
$wgDefaultUserOptions['math'] = MW_MATH_LATEXML;
|
||||||
in the LocalSettings.php file.
|
in the LocalSettings.php file.
|
||||||
|
|
Loading…
Reference in New Issue