Template:Infobox interval/doc: Difference between revisions

Update documentation
Fredg999 (talk | contribs)
Harmonic entropy is now hidden by default
 
(One intermediate revision by one other user not shown)
Line 1: Line 1:
{{dochead}}{{lua}}
{{Dochead}}{{lua}}
The '''Infobox Interval''' template was built to help presenting basic information about [[interval]]s in a unified form, to make them obvious by glance. Also the formatting of the wiki text itself is easier to read and improve when it is obviously structured by this template.
The '''Infobox Interval''' template was built to help presenting basic information about [[interval]]s in a unified form, to make them obvious by glance. Also the formatting of the wiki text itself is easier to read and improve when it is obviously structured by this template.


=== Usage ===
=== Usage ===
There are three different ways to use this template:
The template should be placed at the beginning of an interval page. There are three different ways to use this template:
* Small ratios: <code><nowiki>{{Infobox Interval}}</nowiki></code> (the ratio is inferred from page name), <code><nowiki>{{Infobox Interval|7/4}}</nowiki></code>, <code><nowiki>{{Infobox Interval|Ratio=7/4}}</nowiki></code>.
* Small ratios: <code><nowiki>{{Infobox Interval}}</nowiki></code> (the ratio is inferred from page name), <code><nowiki>{{Infobox Interval|7/4}}</nowiki></code>, <code><nowiki>{{Infobox Interval|Ratio=7/4}}</nowiki></code>.
** When use this form? In most cases, whenever both numerator and denominator of the ratio are small enough to fit within Lua numbers as integers. You should not encounter any problems with integers up to {{nowrap|2<sup>32</sup> &minus; 1}}, and you might happen to not encounter any problems when those are 2<sup>53</sup>. With larger numbers, you are almost guaranteed to get inaccurate results.
** When use this form? In most cases, whenever both numerator and denominator of the ratio are small enough to fit within Lua numbers as integers. You should not encounter any problems with integers up to {{nowrap|2<sup>32</sup> &minus; 1}}, and you might happen to not encounter any problems when those are 2<sup>53</sup>. With larger numbers, you are almost guaranteed to get inaccurate results.
Line 79: Line 79:
|-
|-
| [[Harmonic entropy]]
| [[Harmonic entropy]]
|
| Harmonic entropy
| Harmonic entropy approximation (Shannon, <math>\sqrt{nd}</math> weights, <math>200\text{-integer limit} \cap \left\lbrace x \mid \left\Vert x \right\Vert \leq 100 \right\rbrace</math>). Derived from '''Ratio''', '''Monzo''', or '''Cents'''.
| Harmonic entropy approximation (Shannon, <math>\sqrt{nd}</math> weights, <math>200\text{-integer limit} \cap \left\lbrace x \mid \left\Vert x \right\Vert \leq 100 \right\rbrace</math>). Derived from '''Ratio''', '''Monzo''', or '''Cents'''. Harmonic entropy is hidden by default, pass the value of <code>yes</code> to display it.
|-
|-
| [[Comma|Comma size]]
| [[Comma|Comma size]]