0

I set up MediaWiki in Ubuntu under Windows 10 WSL2 environment with the math extension up and running. Everything seems fine but I cannot get the latex format \mathscr working.

Software setup

Ubuntu (Ubuntu 20.04.2 LTS) under Windows 10 (build 19043.1110) WSL2
Appache (2.4.41-4ubuntu3.3)
MySQL (mysql-8.0)
MediaWiki (1:1.31.7-1)

Configuration

I installed the math extension according to the instruction on the MediaWiki official page, by downloading the package associated with the latest stable version v1.36.

The following is the related modification in the LocalSettings.php file

wfLoadExtension( 'Math' );
// Set MathML as default rendering option
$wgDefaultUserOptions['math'] = 'mathml';
$wgMathFullRestbaseURL = 'https://en.wikipedia.org/api/rest_';
$wgMathMathMLUrl = 'https://mathoid-beta.wmflabs.org/';
// Rendering options
$wgMathValidModes[] = array('png', 'source', 'mathml', 'latexml');
$wgMathDirectory = "/var/lib/mediawiki/images/math" ;
$wgMathPath = "/var/lib/mediawiki/images/math" ;
$wgTmpDirectory = "/var/lib/mediawiki/images/tmp" ;
$wgUploadPath = "/var/lib/mediawiki/images" ;
$wgUploadDirectory = "/var/lib/mediawiki/images";
$wgShowExceptionDetails = true ;

Problem

The Mediawiki works fine using latex highlights <math></math>, as it properly renders most latex equations. However, among others, it does not recognize the command \mathscr, such as <math>\delta\mathscr{F}</math>. Instead, it echoes

Failed to parse (unknown function "\mathscr"): {\displaystyle \delta\mathscr{F}}

I understand that \mathscr belongs to the latex package mathrsfs, so I got the impression that it is not included by default in the standard math extension? But the format does work on other public MediaWiki servers such as Wikipedia (where the equations are rendered!) and miraheze.

3
  • 1
    Have you asked in the MediaWiki support forum? mediawiki.org/wiki/Project:Support_desk
    – Steve
    Jul 20, 2021 at 2:47
  • @Steve Thanks for the comment! I post the question on the support forum you suggested, and realized that the very forum has the same problem I mentioned above, which does not occur for the Wikipedia or the miraheze sites.
    – gamebm
    Aug 2, 2021 at 3:01
  • Then they must have a custom setup that you will have to research.
    – Steve
    Aug 2, 2021 at 4:17

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.