|
Cookbook /
ASCIIMathSummary: Display MathML rendered ascii formula into PmWiki 2.x pages
Version: 20061028
Status: Stable
Prerequisites: pmwiki-2.0.beta24 and IE6 + MathPlayer or Netscape7.1/Mozilla/Firefox with appropriates fonts
Maintainer: Dfaure
Categories: Markup
Download: asciimath.zipΔ
Question addressed by this recipeWould you (or your students) like to easily produce good-looking math formulas on wiki pages using a simple calculator-style syntax ? Descriptionasciimath.zipΔ will help you incorporating mathematical formulas on PmWiki pages with a minimum of fuss.
Notes and CommentsASCIIMath recipe is based on ASCIIMathPHP by Steven Chan, a PHP port of ASCIIMathML.js from Peter Jipsen. Installation
Optionally, you may keep the provided Cookbook text pages content (including this one) for further references. MarkupOnce installed, the following markups are available:
with the following optional parameters:
The markup parameters are filtered and all Syntax(Excerpt from ASCIIMathML.js : Syntax and List of Constants. Please refer to original site for complete references): The syntax is very permissive and does not generate syntax errors. This allows mathematically incorrect expressions to be displayed, which is important for teaching purposes. It also causes less frustration when previewing formulas. The parser uses no operator precedence and only respects the grouping brackets, subscripts, superscript, fractions and (square) roots. This is done for reasons of efficiency and generality. The resulting MathML code can quite easily be processed further to ensure additional syntactic requirements of any particular application. The sample given on ASCIIMathML.js home page will be rendered with following page content:
Implementation considerations, LimitationsCurrently, formulas are handled in a two step process:
A formula file is generated only if it didn't previously exist or if formula text has changed. In edition mode ( An extra Each formula is anchored no its own page with the name
See also
ContributorsReleases Notes
CommentsIs there a way to render mathematical expressions inline? --jody (April 22, 2008) As far as I can see from the source code, not yet. The result is put into a I found another way to display math formula by wiky, which is a Markup Converter. The author is Stefan Goessner, http://goessner.net/articles/wiky/(approve links). Would someone like to write a recipt for this? Just simply input [$\pi$] to produce the math formula? Thanks! --xhf Nothing is planned for now. --Dfaure I am getting the following error: Warning: file_put_contents(/.../pub/asciimath/Main. ... .xml) [function.file-put-contents]: failed to open stream: Permiso denegado in /opt/lampp/htdocs/envmod/cookbook/asciimath.php on line 91 Warning: Cannot modify header information - headers already sent by (output started at /opt/lampp/htdocs/envmod/cookbook/asciimath.php:91) in /opt/lampp/htdocs/envmod/pmwiki.php on line 885 Any idea about what the problem is? Thanks! Magdiel The recipe should be able to write its temporary files into the ' What happens to the xml files created in pub/asciimath when I remove an equation from a page? Is it deleted or not? The xml will stay there, until you trigger the action I was using asciimath with no problem. But now I see only Greek letters in equations instead of Latin, in my page and in this page also! This happens when I browse the page with firefox (I have version 2.0.0.8) but not with IE. I have Greek language installed in my system but not as default. Please see: http://img251.imageshack.us/my.php?image=asciimathgreekhb8.png(approve links) |
||||||