Table of Contents

Syntax Highlighting

Changes to style in language file has no effect. Dokuwiki uses a single stylesheet for all languages. Comment out the following line in parserutils.php to disable.

...
760        // $geshi->enable_classes();
...

ASCIIMathML.js

Incorporating ASCIIMathML.js requires disabling JavaScript compression in the configuration settings.

/* DOKUWIKI:include ASCIIMathML.js */
$conf['compress'] = 0;   // for ASCIIMathML.js

Tiny Diagram

Incorporating the Tiny Diagram JavaScript renderer requires the following changes:

    // add formatting modes
    $fmt_modes = array('strong','emphasis','underline','monospace','diag',
            'subscript','superscript','deleted');
    function diag($match, $state, $pos) {
        $this->_nestingTag($match, $state, $pos, 'diag');
        return true;
    }
    /**
     * Start diag formatting
     */
    function diag_open() {
        $this->doc .= '<div class="diag">';
    }
 
    /**
     * Stop diag formatting
     */
    function diag_close() {
        $this->doc .= '</div>';
    }
    // modes for styling text -- footnote behaves similar to styling
    'formatting'   => array('strong', 'emphasis', 'underline', 'monospace','diag',
                            'subscript', 'superscript', 'deleted', 'footnote'),
        'diag'=> array (
            'entry'=>'<diag>(?=.*</diag>)',
            'exit'=>'</diag>',
            'sort'=>140
            ),
    /**
     * Start diag formatting
     */
    function diag_open() {
    }
 
    /**
     * Stop diag formatting
     */
    function diag_close() {
    }
/* DOKUWIKI:include tinydiagram.js */
$conf['typography'] = 0; // for Tiny Diagram