Template:EDs: Difference between revisions
Jump to navigation
Jump to search
m Bugfix +1 |
Change regex rule for more complex wart notation. This also fixes numbers (often equaves) not being included as part of the link. |
||
| Line 1: | Line 1: | ||
<includeonly>{{#switch: {{{legend|}}}|1=[[ed{{{equave|o}}}]]s: |0=ed{{{equave|o}}}s: }}{{#rreplace: {{{1|}}}|/(\d+)(\ | <includeonly>{{#switch: {{{legend|}}}|1=[[ed{{{equave|o}}}]]s: |0=ed{{{equave|o}}}s: }}{{#rreplace: {{{1|}}}|/(\d+)([\w\*†′″]*)/|[[\1ed{{{equave|o}}}|\1\2]]}}</includeonly><noinclude> | ||
{{Documentation}} | {{Documentation}} | ||
[[Category:Formatting templates]] | [[Category:Formatting templates]] | ||
</noinclude> | </noinclude> | ||
Revision as of 17:30, 13 October 2026
| This template should not be substituted. |
The EDs template takes a collection of numbers and an equave to create links to individual equal division pages from it. Alphanumeric characters (e.g. ed5) immediately after a number are included in the link, as well as asterisk (*), slash (/), dagger (†), prime (′) and double-prime (″) to help with fraction notation and extended wart notation.
| Note: | For edos, edts, and edfs, use Template: EDOs, Template: EDTs, and Template: EDFs, respectively. |
Usage examples
- You type
{{EDs|equave=5| 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 }}{{EDs|equave=5| 1 2 3 4 5 6 7 8 9 10 11 }}{{EDs|equave=5| 1ed5, 2ed5, up to 99ed5 }}
- You get (rendered)
- To include a legend, type
{{EDs|equave=5|legend=0| 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 }}{{EDs|equave=5|legend=1| 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 }}
- So you get (rendered)
Technical notes
This template calls Extension: RegexFunctions to match the strings.