plugin:masciimath
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
plugin:masciimath [2011-08-03 04:33] – 87.73.100.138 | plugin:masciimath [2022-07-29 23:30] (current) – Klap-in | ||
---|---|---|---|
Line 2: | Line 2: | ||
---- plugin ---- | ---- plugin ---- | ||
- | description: | + | description: |
author | author | ||
email : mortenb@gmail.com | email : mortenb@gmail.com | ||
type : syntax | type : syntax | ||
- | lastupdate : 2011-08-03 | + | lastupdate : 2014-04-22 |
- | compatible : Tested with 2011-05-25a “Rincewind” | + | compatible : Weatherwax |
depends | depends | ||
conflicts | conflicts | ||
Line 13: | Line 13: | ||
tags : Formula, Math | tags : Formula, Math | ||
- | downloadurl: | + | downloadurl: |
- | bugtracker : # eg. http:// | + | bugtracker : https:// |
- | sourcerepo : # eg. http:// | + | sourcerepo : https:// |
donationurl: | donationurl: | ||
---- | ---- | ||
Line 21: | Line 21: | ||
=== Description === | === Description === | ||
- | This is an implementation of [[http:// | + | This is an implementation of Peter Jipsen' |
- | It's similar to [[plugin:asciimathml]] but doesn' | + | To try it out: |
- | + | * Install the plugin, i.e. create | |
- | === Installation and Plugin Code === | + | * Create a wikipage with the following ASCIIMathML code in it: <code>`x_(1,2)=(-b+-sqrt(b^2-4a c))/(2a)`</code> |
- | + | * View your wiki using Firefox | |
- | Create | + | |
- | - '' | + | |
- | - '' | + | |
- | - '' | + | |
- | + | ||
- | <file php syntax.php> | + | |
- | <?php | + | |
- | /** | + | |
- | * @license | + | |
- | * @author | + | |
- | */ | + | |
- | + | ||
- | if(!defined(' | + | |
- | if(!defined(' | + | |
- | require_once(DOKU_PLUGIN.' | + | |
- | include_once(dirname(__FILE__).'/ | + | |
- | + | ||
- | class syntax_plugin_masciimath extends DokuWiki_Syntax_Plugin { | + | |
- | + | ||
- | function getInfo(){ | + | |
- | return array( | + | |
- | ' | + | |
- | ' | + | |
- | ' | + | |
- | ' | + | |
- | ' | + | |
- | ' | + | |
- | ); | + | |
- | } | + | |
- | + | ||
- | function getType(){ return ' | + | |
- | function getSort(){ return 300; } | + | |
- | function connectTo($mode) { $this-> | + | |
- | + | ||
- | function handle($match, $state, $pos, & | + | |
- | $txt = $match; | + | |
- | $txt = str_replace(' | + | |
- | $txt = preg_replace ('/" | + | |
- | include(dirname(__FILE__).'/ | + | |
- | $math_object | + | |
- | $math_object-> | + | |
- | $math_object-> | + | |
- | $txt = $math_object-> | + | |
- | $txt = preg_replace ('/(< | + | |
- | $raw = $match; | + | |
- | $raw = str_replace | + | |
- | return array($txt, $raw); | + | |
- | } | + | |
- | + | ||
- | function render($mode, | + | |
- | if ($mode!=' | + | |
- | list($txt, $raw) = $data; | + | |
- | $renderer-> | + | |
- | return true; | + | |
- | } | + | |
- | } | + | |
- | ?> | + | |
- | </ | + |
plugin/masciimath.1312338818.txt.gz · Last modified: 2011-08-03 04:33 by 87.73.100.138