DokuWiki

It's better when it's simple

User Tools

Site Tools


plugin:mathpublish

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
plugin:mathpublish [2014-05-18 15:04] – version upped andiplugin:mathpublish [2024-03-29 09:09] (current) – added FIXME to outdated link 61.132.94.34
Line 4: Line 4:
 description: PHP only solution for including mathematical formulae into DokuWiki description: PHP only solution for including mathematical formulae into DokuWiki
 author     : Andreas Gohr  author     : Andreas Gohr 
-email      : wiki@cosmocode.de+email      : dokuwiki@cosmocode.de
 type       : syntax type       : syntax
-lastupdate : 2012-02-18 +lastupdate : 2023-01-02 
-compatible : rincewindanguaAdora Belle+compatible : Frusterick Manners, GreeboHogfatherIgor
 depends    :  depends    : 
 conflicts  conflicts 
Line 13: Line 13:
 tags       : math, formula tags       : math, formula
  
-downloadurl: http://github.com/cosmocode/dokuwiki-plugin-mathpublish/zipball/master +downloadurl: https://github.com/cosmocode/dokuwiki-plugin-mathpublish/zipball/master 
-bugtracker : http://github.com/cosmocode/dokuwiki-plugin-mathpublish/issues +bugtracker : https://github.com/cosmocode/dokuwiki-plugin-mathpublish/issues 
-sourcerepo : http://github.com/cosmocode/dokuwiki-plugin-mathpublish/+sourcerepo : https://github.com/cosmocode/dokuwiki-plugin-mathpublish/
 donationurl:  donationurl: 
 ---- ----
  
-This [[plugins|plugin]] is based on [[http://www.xm1math.net/phpmathpublisher/|phpmathpublisher]] by  Pascal Brachet to allow inclusion of properly rendered mathematical formulae in DokuWiki pages.+This plugin is based on [[http://www.xm1math.net/phpmathpublisher/|phpmathpublisher]] by  Pascal Brachet to allow inclusion of properly rendered mathematical formulae in DokuWiki pages.
  
 This plugin was originally written by [[chris@jalakai.co.uk|Christopher Smith]] and named math2. This plugin was originally written by [[chris@jalakai.co.uk|Christopher Smith]] and named math2.
Line 25: Line 25:
 This is a completely self-contained PHP solution. It requires no third party packages. It makes use of [[http://uk2.php.net/manual/en/ref.image.php|php's GD library]] and freely available fonts(([[http://www.nongnu.org/freefont/|freeserif]] from the [[http://www.gnu.org/|Free Software Foundation]] and several fonts made freely available by the [[http://www.ams.org/tex/amsfonts.html|American Mathematical Association]])) to create an images for each formula. The plugin script, phpmathpublisher and the required fonts are all included in the download package. This is a completely self-contained PHP solution. It requires no third party packages. It makes use of [[http://uk2.php.net/manual/en/ref.image.php|php's GD library]] and freely available fonts(([[http://www.nongnu.org/freefont/|freeserif]] from the [[http://www.gnu.org/|Free Software Foundation]] and several fonts made freely available by the [[http://www.ams.org/tex/amsfonts.html|American Mathematical Association]])) to create an images for each formula. The plugin script, phpmathpublisher and the required fonts are all included in the download package.
  
 +[[https://www.cosmocode.de/en/open-source/dokuwiki-plugins/|{{ https://www.cosmocode.de/static/img/dokuwiki/dwplugins.png?recache|A CosmoCode Plugin}}]]
  
 ===== Installation ===== ===== Installation =====
-[[http://www.cosmocode.de/en/wiki/dokuwiki/plugins|{{ http://www.cosmocode.de/_media/en/wiki/dokuwiki/cosmologo.png?recache|A CosmoCode Plugin}}]] + 
-Install the plugin using the [[plugin:plugin|Plugin Manager]] and the download URL above, which points to latest version of the plugin. Refer to [[:Plugins]] on how to install plugins manually.+Search and install the plugin using the [[plugin:extension|Extension Manager]]. Refer to [[:Plugins]] on how to install plugins manually.
  
 ==== Change Log ==== ==== Change Log ====
  
-{{rss>https://github.com/cosmocode/dokuwiki-plugin-mathpublish/commits/master.atom date}}+{{rss>https://github.com/cosmocode/dokuwiki-plugin-mathpublish/commits/master.atom author date}}
  
 ==== PHP Requirements ==== ==== PHP Requirements ====
Line 55: Line 56:
 <m 32>delim{|}{{1/N} sum{n=1}{N}{gamma(u_n)} - 1/{2 pi} int{0}{2 pi}{gamma(t) dt}}{|} <= epsilon/3</m></code> <m 32>delim{|}{{1/N} sum{n=1}{N}{gamma(u_n)} - 1/{2 pi} int{0}{2 pi}{gamma(t) dt}}{|} <= epsilon/3</m></code>
  
-Result((note: the plugin is not installed at this site, these images are the actual images generated by the plugin taken from a site where the plugin is installed.)):+Result((Note: the plugin is not installed at this site, these images are the actual images generated by the plugin taken from a site where the plugin is installed.)):
  
-{{http://www.cdsmith.plus.com/images/formula1.png}} \\ +{{https://trello.com/1/cards/659c222395b12c00785cd0de/attachments/659c22f0f57a89441cbe61a8/download/mathpublish-plugin-screenshot.png?recache|screenshot}}
-{{http://www.cdsmith.plus.com/images/formula2.png}} \\ +
-{{http://www.cdsmith.plus.com/images/formula3.png}}+
  
 ===== Syntax ===== ===== Syntax =====
Line 70: Line 69:
   * //alignment// can be controlled in the same way as DokuWiki images, one space to the left to right align, one to the right to left align, one on each side to centre.   * //alignment// can be controlled in the same way as DokuWiki images, one space to the left to right align, one to the right to left align, one on each side to centre.
  
-For a complete list of what mathematical terms can be used, refer to the  [[http://www.xm1math.net/phpmathpublisher/doc/help.html|original mathpublisher documentation]] or this [[:plugin:mathpublish:syntax|DokuWiki-compatible formulae syntax page]]((You may want to copy that page to your wiki as a help page for your users)) +For a complete list of what mathematical terms can be used, refer to the  [[http://www.mylovewill.com/ya/phpmathpublisher/doc/help.html|original mathpublisher documentation]] FIXME or this [[:plugin:mathpublish:syntax|DokuWiki-compatible formulae syntax page]]((You may want to copy that page to your wiki as a help page for your users))
- +
-===== Cyrillic support ===== +
-Modification of //expression.php// for cyrillic support: +
-<file php expression.php.diff> +
-162,185c162,250 +
-<         'tanh' => 'tanh' +
-<     ); +
-<  +
-<     /** +
-<      * Symbol to font assignment +
-<      */ +
---- +
->         'tanh' => 'tanh', +
-> //cyrillic +
->         'А' => '&#1040;', +
->         'а' => '&#1072;', +
->         'Б' => '&#1041;', +
->         'б' => '&#1073;', +
->         'В' => '&#1042;', +
->         'в' => '&#1074;', +
->         'Г' => '&#1043;', +
->         'г' => '&#1075;', +
->         'Д' => '&#1044;', +
->         'д' => '&#1076;', +
->         'Е' => '&#1045;', +
->         'е' => '&#1077;', +
->         'Ж' => '&#1046;', +
->         'ж' => '&#1078;', +
->         'З' => '&#1047;', +
->         'з' => '&#1079;', +
->         'И' => '&#1048;', +
->         'и' => '&#1080;', +
->         'Й' => '&#1049;', +
->         'й' => '&#1081;', +
->         'К' => '&#1050;', +
->         'к' => '&#1082;', +
->         'Л' => '&#1051;', +
->         'л' => '&#1083;', +
->         'М' => '&#1052;', +
->         'м' => '&#1084;', +
->         'Н' => '&#1053;', +
->         'н' => '&#1085;', +
->         'О' => '&#1054;', +
->         'о' => '&#1086;', +
->         'П' => '&#1055;', +
->         'п' => '&#1087;', +
->         'Р' => '&#1056;', +
->         'р' => '&#1088;', +
->         'С' => '&#1057;', +
->         'с' => '&#1089;', +
->         'Т' => '&#1058;', +
->         'т' => '&#1090;', +
->         'У' => '&#1059;', +
->         'у' => '&#1091;', +
->         'Ф' => '&#1060;', +
->         'ф' => '&#1092;', +
->         'Х' => '&#1061;', +
->         'х' => '&#1093;', +
->         'Ц' => '&#1062;', +
->         'ц' => '&#1094;', +
->         'Ч' => '&#1063;', +
->         'ч' => '&#1095;', +
->         'Ш' => '&#1064;', +
->         'ш' => '&#1096;', +
->         'Щ' => '&#1065;', +
->         'щ' => '&#1097;', +
->         'Ъ' => '&#1066;', +
->         'ъ' => '&#1098;', +
->         'Ы' => '&#1067;', +
->         'ы' => '&#1099;', +
->         'Ь' => '&#1068;', +
->         'ь' => '&#1100;', +
->         'Э' => '&#1069;', +
->         'э' => '&#1101;', +
->         'Ю' => '&#1070;', +
->         'ю' => '&#1102;', +
->         'Я' => '&#1071;', +
->         'я' => '&#1103;' +
->          ); +
->              +
->              /** +
->               * Symbol to font assignment +
->               */ +
-</file> +
- +
- +
-===== Discussion ===== +
-How about replacing the - with &#x2212; (the &minus; sign) by adding in ''expression.php'' to ''protected $symboles = array('' something like '''-' => '&#x2212;',''? I don't know if this should go upstream ...+
  
-Hi, I From Perú, the plug in work awessome but i need to change the color of the formula to white, the background color of my template es black and look very bad, It's possible something to fix this? Thanks! 
  
-Excellent Plugin!!!  I especially like the self contained nature and the fact the formulas will export in the pdf export as well!!  Thanks and well done.  Blake 
plugin/mathpublish.1400418269.txt.gz · Last modified: 2014-05-18 15:04 by andi

Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Share Alike 4.0 International
CC Attribution-Share Alike 4.0 International Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki