====== Ad-Hoc MathML Plugin ====== ---- plugin ---- description: Enables MathML tags with the Ad-Hoc HTML plugin. author : sascha-leib email : ad@hominem.info type : syntax lastupdate : 2023-05-08 compatible : Kaos, Igor, Jack Jackrum depends : adhoctags conflicts : similar : tags : html, syntax, math, formula, mathml downloadurl: https://github.com/saschaleib/dokuwiki-plugin-adhocmathml/archive/refs/heads/main.zip bugtracker : https://github.com/saschaleib/dokuwiki-plugin-adhocmathml/issues sourcerepo : https://github.com/saschaleib/dokuwiki-plugin-adhocmathml donationurl: screenshot_img : https://fallacies.online/img/AdHocMathML.png ---- Extends the [[plugin:adhoctags|Ad-Hoc HTML]] plugin by adding support for [[https://developer.mozilla.org/en-US/docs/Web/MathML|MathML]] tags. :!: This plugin is still in an early development stage. Please test it thoroughly and report errors! ===== Installation ===== :!: **External requirements:** This plugin requires the following additional components that must be installed separately: * [[plugin:adhoctags|Ad-Hoc HTML]] Install the plugin using the [[plugin:plugin|Plugin Manager]] and the download URL above, which points to the latest version of the plugin. Refer to [[:Plugins]] on how to install plugins manually. ===== Examples/Usage ===== In a simple example, you could add an inline maths expression as follows: x2 Of course, you could achieve the same result using some smart Unicode characters, like ''𝑥²''. It becomes more interesting once you want to lay out more complex formulae. For more complex examples, please see the [[https://fallacies.online/wiki/playground/adhocplugins#ad-hoc_mathml|Ad-Hoc Plugins Tests]] page on my server. :!: **Note:** Browser-support for MathML has significantly improved in recent years, but is still [[https://caniuse.com/mathml|not perfect]]. Please test your pages thoroughly before publishing complex formulae. ===== Syntax ===== Please see the [[plugin:adhoctags|Ad-Hoc HTML]] plugin page for syntax information. In brief, all //official// MathML tags are supported and can be inserted as expected. However, there are special syntax rules for attributes: * IDs are inserted with a ''#'' prefix (e.g. ''#myformula'') * Classes are just inserted without any prefixes or attribute names (e.g. ''no-print'', etc.) * Languages are prefixed with a '':'' (e.g. '':fr'') * All other attributes are enclosed in square brackets, without quotation marks (e.g. ''[display=inline]'') This plugin follows a “strict” rule for attributes, as it only allows official and widely supported ones and checks for valid values and characters. All attributes that don’t match these rules are discarded. ===== Configuration and Settings ===== There are currently no configuration settings for this plugin. **Note**: This plugin is still under development and should be considered experimental and unfinished.