forked from jmnote/SimpleMathJax
-
Notifications
You must be signed in to change notification settings - Fork 0
/
SimpleMathJax.php
31 lines (27 loc) · 965 Bytes
/
SimpleMathJax.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
<?php
/**
* MediaWiki extension to render TeX
* Installation instructions can be found on
* http://www.mediawiki.org/wiki/Extension:SimpleMathJax
*
* @ingroup Extensions
* @author Jmkim dot com
* @license GNU Public License
*/
// Exit if called outside of MediaWiki
if( !defined( 'MEDIAWIKI' ) ) exit;
// Global Settings
$wgSimpleMathJaxSize = 100;
$wgExtensionCredits['parserhook'][] = array(
'path' => __FILE__,
'name' => 'SimpleMathJax',
'version' => '0.3',
'author' => 'Jmkim dot com',
'description' => 'render TeX between <nowiki><math></nowiki> and <nowiki></math></nowiki>',
'url' => '//www.mediawiki.org/wiki/Extension:SimpleMathJax'
);
// Register class
$dir = dirname(__FILE__) . '/';
$wgAutoloadClasses['SimpleMathJax'] = $dir.'SimpleMathJax.class.php';
$wgHooks['BeforePageDisplay'][] = 'SimpleMathJax::loadJS';
$wgExtensionFunctions[] = 'SimpleMathJax::init';