FractionsPlus

Summary: Adds simple markup to write fractions.
Version: 2021-11-12
Prerequisites: Recent PmWiki version (tested on 2.2.144)
Status: Maintained
Maintainer: Said Achmiz
License: GPL
Categories: Markup Math
Users: (view? / edit)
Discussion: FractionsPlus-Talk

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 markupEquivalent to
`-−
`*×
`/÷
<=&lte;
>=&gte;
/=&ne;
`'&prime;
`"&Prime;

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

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.