...
760 // $geshi->enable_classes();
...
====== ASCIIMathML.js ======
Incorporating [[https://github.com/asciimath/asciimathml|ASCIIMathML.js]] requires disabling JavaScript compression in the configuration settings.
* Copy ''ASCIIMathML.js'' to the ''conf/'' directory.
* Create or update ''userscript.js'' to include ''ASCIIMathML.js''.
/* DOKUWIKI:include ASCIIMathML.js */
* Update ''local.php'' to disable JavaScript compression:
$conf['compress'] = 0; // for ASCIIMathML.js
====== Tiny Diagram ======
Incorporating the [[http://www.fourthwoods.com/utils/tinydiagram/tinydiagram.js|Tiny Diagram]] JavaScript renderer requires the following changes:
* Add ''diag'' to the list of formatting modes in ''inc/parserutils.php''.
// add formatting modes
$fmt_modes = array('strong','emphasis','underline','monospace','diag',
'subscript','superscript','deleted');
* Add the following function to ''inc/parser/handler.php''.
function diag($match, $state, $pos) {
$this->_nestingTag($match, $state, $pos, 'diag');
return true;
}
* Add the following functions to ''/inc/parser/xhtml.php''.
/**
* Start diag formatting
*/
function diag_open() {
$this->doc .= '';
}
/**
* Stop diag formatting
*/
function diag_close() {
$this->doc .= '';
}
* Add ''diag'' to the ''formatting'' modes in ''src/parser/parser.php''.
// modes for styling text -- footnote behaves similar to styling
'formatting' => array('strong', 'emphasis', 'underline', 'monospace','diag',
'subscript', 'superscript', 'deleted', 'footnote'),
* and the following entry in the formatting array:
'diag'=> array (
'entry'=>'(?=.* )',
'exit'=>'',
'sort'=>140
),
* Add the following functions to ''inc/parser/renderer.php''.
/**
* Start diag formatting
*/
function diag_open() {
}
/**
* Stop diag formatting
*/
function diag_close() {
}
* Copy ''tinydiagram.js'' to the ''conf/'' directory.
* Create or update ''userscript.js'' to include ''tinydiagram.js''.
/* DOKUWIKI:include tinydiagram.js */
* Dokuwiki tries to convert quotes to "smart quotes". This breaks the diagram JSON. Update ''local.php'' to disable quotation character conversion:
$conf['typography'] = 0; // for Tiny Diagram