mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Math
synced 2024-11-24 07:34:22 +00:00
d8822169ab
Renders formulae via mathoid without to run mathoid as a service. Mathoid 0.7.1 or later must be installed locally and configured to be accessed directly from the math extension. It has been tested with the config.dev.yaml of version 0.7.1. If mathoid is installed in '/srv/mathoid' the following line might be added to LocalSettings.php $wgMathoidCli = ['/srv/mathoid/cli.js', '-c', '/srv/mathoid/config.dev.yaml']; i.e., make sure to specify the -c parameter with an absolute path. In addition mathoid uses more memory than the the default. With the config.dev.yaml a value of $wgMaxShellMemory = 2097152; has been tested to work well. Change-Id: I0600f056d21927963267cf979d342e313419e9fa |
||
---|---|---|
db | ||
i18n | ||
images | ||
maintenance | ||
math | ||
mathoid | ||
modules | ||
tests | ||
texvccheck | ||
.eslintrc.json | ||
.gitattributes | ||
.gitignore | ||
.gitreview | ||
.phpcs.xml | ||
.rubocop.yml | ||
.stylelintrc.json | ||
CODE_OF_CONDUCT.md | ||
composer.json | ||
COPYING | ||
extension.json | ||
Gemfile | ||
Gemfile.lock | ||
Gruntfile.js | ||
HISTORY | ||
Makefile | ||
Math.alias.noTranslate.php | ||
Math.alias.php | ||
Math.php | ||
MathChemSymbolsDataModule.php | ||
MathFormatter.php | ||
MathHooks.php | ||
MathInputCheck.php | ||
MathInputCheckRestbase.php | ||
MathInputCheckTexvc.php | ||
MathLaTeXML.php | ||
MathMathML.php | ||
MathMathMLCli.php | ||
MathMathSymbolsDataModule.php | ||
MathMLRdfBuilder.php | ||
mathParserTests.txt | ||
MathRenderer.php | ||
MathRestbaseInterface.php | ||
MathSource.php | ||
MathTexvc.php | ||
MathValidator.php | ||
MathWikidataHook.php | ||
package.json | ||
Rakefile | ||
README | ||
RELEASE-NOTES-3.0.0 | ||
SpecialMathShowImage.php | ||
SpecialMathStatus.php |
This version (for MediaWiki 1.19) has some changes since previous versions: * rendering options have been reduced to just 'Always PNG' and 'Leave it as TeX' ** all other rendering options will merge to PNG. * initial experimental support for integrating MathJax client-side rendering 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 $wgMathUseLaTeXML = true; It is possible to choose LaTeXML as default option (for anonymous user) by setting $wgDefaultUserOptions['math'] = 'latexml'; in the LocalSettings.php file. The LaTeXML option requires php5-curl to be installed. Without php5-curl no proper error handling can be guaranteed. Furthermore, a core version of wmf/1.22wmf7 or newer is recommended. Otherwise, errors in LaTeXML can lead to mal-formatted XML output and disturb the page layout. MathJax configuration: Client-side configuration of MathJax can be done by specifying a mathJax.config table, which takes a table as described in: http://docs.mathjax.org/en/v1.1-latest/options/index.html#configuration Example: if ( typeof mathJax === 'undefined' ) { mathJax = {}; mathJax.config = { showProcessingMessages: true }; } Attributes of the <math /> element: attribute "display": possible values: "inline", "block" or "inline-displaystyle" (default) "display" reproduces the old texvc behavior: The equation is rendered with large height operands (texvc used $$ $tex $$ to render) but the equation printed to the current line of the output and not centered in a new line. In Wikipedia users use :<math>$tex</math> to move the math element closer to the center. "inline" renders the equation in with small height operands by adding {\textstyle $tex } to the users input ($tex). The equation is displayed in the current text line. "inline-displaystyle" renders the equation in with large height operands centered in a new line by adding {\displaystyle $tex } to the user input ($tex). For testing your installation run php tests/phpunit/phpunit.php extensions/Math/tests/ from your MediWiki home path. == Logging == The math extension supports PSR-3 logging: Configuration can be dona via $wgDebugLogGroups['Math'] = [ 'level' => 'info', 'destination' => '/path/to/file.log' ];