FractionsPlus
Questions answered by this recipe
How do I write fractions (and other math symbols) in PmWiki?
Description
Fractions Plus adds a simple markup to generate arbitrary fractions, that work in any font.
Installation
Download fractionsplus.phpΔ and place it in your cookbook
directory. Then add such a line to config.php
:
include_once("$FarmD
/cookbook/fractionsplus.php");
Usage
This recipe adds the followup markups:
Fractions
Write a fraction in the normal way (numerator and denominator, separated with a slash), but precede it with a backtick (`
). (Example: `1/2
.)
Either part of a fraction can include separators (,
and/or .
).
Math symbols
New markup | Equivalent to |
---|---|
`- | − |
`* | × |
`/ | ÷ |
<= | <e; |
>= | >e; |
/= | ≠ |
`' | ′ |
`" | ″ |
Notes
Parts of the code for this recipe (the “plus” parts) was extracted from MarkupExtensions.
Change log / Release notes
- 2021-11-12: Added prime and double-prime.
- 2017-12-31: Initial release.
Contributors
- jr (original MarkupExtensions recipe; times, divide, lte, gte, and ne code)
- Said Achmiz
Comments
See discussion at FractionsPlus-Talk
User notes? : If you use, used or reviewed this recipe, you can add your name. These statistics appear in the Cookbook listings and will help newcomers browsing through the wiki.