asciimath plugin

asciimath plugin by J.Lauritsen
Plugin for translating ASCII math notation to MathML based on $$ as delimiter on wiki pages

Last updated on 2009-02-11. Provides Action.
Compatible with DokuWiki Tested with 2008 DokuWiki and 2009.1.30.

Similar to asciimathml, jsmath, math, math2.

Tagged with formula, latex, math.

    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.

    1) main.php generally
     
    plugin/asciimath.txt · Last modified: 2010/03/15 00:18 by 79.209.12.219
     
    Except where otherwise noted, content on this wiki is licensed under the following license:CC Attribution-Noncommercial-Share Alike 3.0 Unported
    Imprint Recent changes RSS feed Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki
    WikiForumIRCBugsGitXRefTranslate