GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - wikimedia/mediawiki-extensions-Math: Github mirror of MediaWiki extension Math - our actual code is hosted with Gerrit (please see https://www.mediawiki.org/wiki/Developer_access for contributing)

BranchesTags
Open more actions menu

Latest commit

 

History

3,737 Commits
3,737 Commits

Folders and files

NameName
Last commit message
Last commit date
.phan
.phan
 
 
doc
doc
 
 
i18n
i18n
 
 
maintenance
maintenance
 
 
modules
modules
 
 
src
src
 
 
tests
tests
 
 
.eslintignore
.eslintignore
 
 
.eslintrc.json
.eslintrc.json
 
 
.gitattributes
.gitattributes
 
 
.gitignore
.gitignore
 
 
.gitreview
.gitreview
 
 
.mailmap
.mailmap
 
 
.phpcs.xml
.phpcs.xml
 
 
.stylelintrc.json
.stylelintrc.json
 
 
CODE_OF_CONDUCT.md
CODE_OF_CONDUCT.md
 
 
CONTRIBUTING.MD
CONTRIBUTING.MD
 
 
COPYING
COPYING
 
 
Gruntfile.js
Gruntfile.js
 
 
HISTORY
HISTORY
 
 
Math.alias.noTranslate.php
Math.alias.noTranslate.php
 
 
Math.alias.php
Math.alias.php
 
 
README
README
 
 
ServiceWiring.php
ServiceWiring.php
 
 
composer.json
composer.json
 
 
extension.json
extension.json
 
 
package-lock.json
package-lock.json
 
 
package.json
package.json
 
 
popupRestRoutes.json
popupRestRoutes.json
 
 

Repository files navigation

The version for MediaWiki 1.31+ has some changes since previous versions:

By default the math rendering service from the Wikimedia Foundation located at
https://wikimedia.org/api/rest_v1/
will be used for math rendering.
Therefore php-curl is required.
cf. https://www.mediawiki.org/wiki/Manual:CURL

Consult https://www.mediawiki.org/wiki/Extension:Math for further information and advanced settings.

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
composer phpunit:entrypoint -- extensions/Math/tests/phpunit/
from your MediaWiki home path.

== Logging ==
The math extension supports PSR-3 logging:
Configuration can be dona via
$wgDebugLogGroups['Math'] = [ 'level' => 'info', 'destination' => '/path/to/file.log' ];

== Regression references ==
tests/phpunit/integration/WikiTexVC/data/reference.json holds the expected
native MathML and client-side SVG per input, keyed by the MD5 of the input.
ChangesTest checks the MathML against it.

To add a case, run this from the MediaWiki root (needs Firefox for the SVG):
MW_SERVER=http://localhost MW_SCRIPT_PATH=/w php maintenance/run.php Math:FixNativeReferences --add 'a+\dots+b'
MW_SERVER and MW_SCRIPT_PATH are examples; set them to your local wiki.
Without --add it only regenerates the existing entries.
It fills "output" and "svg". It also rewrites every other entry, so review
the whole diff.

About

Github mirror of MediaWiki extension Math - our actual code is hosted with Gerrit (please see https://www.mediawiki.org/wiki/Developer_access for contributing)

gerrit.wikimedia.org

Resources

Readme
GPL-2.0 license

Code of conduct

Code of conduct

Contributing

Contributing
Activity
Custom properties

Stars

25 stars

Watchers

3 watching

Forks

23 forks
Report repository

Used by

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.