diff --git a/plugins/55/mathjax/README b/plugins/55/mathjax/README new file mode 100644 index 0000000..29f57ba --- /dev/null +++ b/plugins/55/mathjax/README @@ -0,0 +1,28 @@ +MathJax Plugin for DokuWiki + +Enables MathJax parsing of TeX math expressions in wiki pages +(See https://www.mathjax.org/) + +All documentation for this plugin can be found at +https://www.dokuwiki.org/plugin:mathjax + +If you install this plugin manually, make sure it is installed in +lib/plugins/mathjax/ - if the folder is named differently, it +will not work! + +Please refer to https://www.dokuwiki.org/plugins for additional info +on how to install plugins in DokuWiki. + +---- +Copyright (C) Mark Liffiton + +This program is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; version 2 of the License + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +See the COPYING file in your DokuWiki folder for details diff --git a/plugins/55/mathjax/action/enable.php b/plugins/55/mathjax/action/enable.php new file mode 100644 index 0000000..5063a5f --- /dev/null +++ b/plugins/55/mathjax/action/enable.php @@ -0,0 +1,68 @@ + + */ + +// must be run within Dokuwiki +if (!defined('DOKU_INC')) die(); + +/** + * Add scripts via an event handler + */ +class action_plugin_mathjax_enable extends DokuWiki_Action_Plugin { + + /** + * Registers our handler for the TPL_METAHEADER_OUTPUT event + */ + public function register(Doku_Event_Handler $controller) { + $controller->register_hook('TPL_METAHEADER_OUTPUT', 'BEFORE', $this, 'handle_tpl_metaheader_output'); + } + + /** + * Add