DokuWiki

It's better when it's simple

User Tools

Site Tools


plugin:asciimath

asciimath Plugin

Compatible with DokuWiki

Tested with 2008 DokuWiki and 2009.1.30, Anteater, Rincewind

plugin Plugin for translating ASCII math notation to MathML based on $$ as delimiter on wiki pages. Based on http://www1.chapman.edu/~jipsen/mathml/asciimath.html

Last updated on
2009-02-11
Provides
Action

This extension has not been updated in over 2 years. It may no longer be maintained or supported and may have compatibility issues.

Similar to asciimathml, jsmath, math, math2

Tagged with formula, math, mathml

Download and Installation

Refer to Plugins on how to install plugins manually.

  • Download “asciimath plugin” and unzip file locally
  • Transfer to server holding DokuWiki. Two files: action.php and asciimathml148r.js
    • Either: Copy with subfolder to: ..your..dokuwiki…/lib/plugins
    • or create the subfolder: ..your..dokuwiki…/lib/plugins/asciimath and copy the action.php and js file there

How to write code for showing as math formulae

Use the syntax shown in R-project documentation or the EpiData Implementation adapted from the R-project (also see: further commands e.g. mapsto)

Notice that this implementation uses $$ as delimiter rather than <acm> or <acmath>

This plugin was inspired by the asciimathml which uses a syntax approach, whereas this one uses the action approach.

Issues

  • If you use slideshows with [plugin:s5] it is important to either add this *asciimath* plugin first and then S5 or edit the header of the S5 and add the reference to your asciimath JavaScript directly in the renderer.php for the s5 plugin. Add the line
    <script type="text/javascript" charset="utf-8" src="/dokuwiki/lib/plugins/asciimath/asciimathml148r.js" ></script>

    in the …/lib/plugins/s5/renderer.php, before the line

    <!-- S5 JS --> 

    .

  • On some PC's it seems as if for a short moment the $$ is shown, and thereafter the formulae, but possibly this is a cache issue.

if these hints aren´t successful try to use these:

  • install both plugins (don´t mind the order)
  • open s5/render.php and change like these files
    <!-- S5 JS -->
    <script src="'.$this->base.'../../asciimath/asciimathml148r.js" type="text/javascript" charset="utf-8"></script> //added
    <script src="'.$this->base.'default/slides.js" type="text/javascript"></script>

– deshi

Syntax

Comments

  • U Avalos: superscripts don't work in tables. DokuWiki interprets them as headers. Is there a workaround? Same problem if you use the original ASCII math implementation.
    • Re: When you put %% round the expression it won´t be interpreted as part of the table (poor workaround!)
  • H. Ibrahim: On Internet Explorer you need the MathPlayer to display asciimath formulas. This extension works on IE 6 and above.
    IMPORTANT NOTE for IE 8: You have to activate the compatibility mode of Internet Explorer 8 or IE 8 crashes while rendering asciimath-code!

    Alternately you can put

    <meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />

    in the head section of your template file1) to force IE 8 running in IE 7 compatibility mode.

  • L. Canducci: plugin is not working here (fresh install of Adora Belle). No problems with older versions. Is there a compatibility issue with dokuwiki latest version? My fault (permissions or cache issue). It works as usual on Adora Belle.
1)
main.php generally
plugin/asciimath.txt · Last modified: 2016-01-24 19:01 by Aleksandr