Tbpgr Blog

Employee Experience Engineer tbpgr(てぃーびー) のブログ

MediaWiki | MathJax Extensionで数式を利用可能にする

概要

MathJax Extensionで数式を利用可能にする

詳細

Version

MediaWiki 1.22
MathJax 0.7

インストール手順

・下記URLからファイルをダウンロードして、/extensions/MathJax 配下に保存する
http://people.cs.kuleuven.be/~dirk.nuyens/Extension_MathJax/MathJax.php.txt
http://people.cs.kuleuven.be/~dirk.nuyens/Extension_MathJax/mwMathJaxConfig.js

・ファイルをリネームする
リネーム前:MathJax.php.txt
リネーム後:MathJax.php

・LocalSettings.phpに下記を追記

require_once( "$IP/extensions/MathJax/MathJax.php" );
/** There is a bug in Extension:MathJax with MediaWiki 1.19.0, 1.20.0 and 1.21.1
*   If you are using any form of PHP caching on your wiki and you have setup
*   your wiki to use variable caching like $wgMainCacheType = CACHE_ACCEL; 
*   you could encounter issues with rendering of formulas. 
*   If so uncomment the last line.
*/
#$wgParserCacheType = CACHE_NONE;

バージョン情報ページでインストールされたことを確認
http://xxxx/wiki/index.php/特別:バージョン情報

動作確認

任意のページに以下の数式を設定する

$$
  \sum f(x) = F(x) + g(x)
$$
画像