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:
physikerwelt 2014-02-10 21:48:55 +00:00
parent e0b3883c55
commit dcc3f0fd3c
4 changed files with 9 additions and 3 deletions

View file

@ -34,6 +34,7 @@ $messages['en'] = array(
'math_bad_tmpdir' => 'Cannot write to or create math temp directory',
'math_bad_output' => 'Cannot write to or create math output directory',
'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_latexml_timeout' => 'LaTeXML timeout from \'$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}}.',
'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}}.',
'math_output_error' => 'Used as error message if the texvc output file could not be stored.

View file

@ -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';
/**
* The link to the texvc executable
* The link to the texvccheck executable
*/
$wgMathTexvcCheckExecutable = dirname( __FILE__ ) . '/texvccheck/texvccheck';
/**

View file

@ -59,7 +59,7 @@ class MathInputCheckTexvc extends MathInputCheck {
public function doValidCheck() {
global $wgMathTexvcCheckExecutable;
if ( !is_executable( $wgMathTexvcCheckExecutable ) ) {
$msg = wfMessage( 'math_notexvc' )->inContentLanguage()->escaped();
$msg = wfMessage( 'math_notexvccheck' )->inContentLanguage()->escaped();
trigger_error( $msg, E_USER_NOTICE );
wfDebugLog( 'Math', $msg );
return true;

4
README
View file

@ -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
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:
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
$wgUseLaTeXML = true;
$wgMathUseLaTeXML = true;
It is possible to choose LaTeXML as default option (for anonymous user) by setting
$wgDefaultUserOptions['math'] = MW_MATH_LATEXML;
in the LocalSettings.php file.