Template:AFDOs: Difference between revisions

From Xenharmonic Wiki
Jump to navigation Jump to search
BudjarnLambeth (talk | contribs)
ArrowHead294 (talk | contribs)
mNo edit summary
 
(2 intermediate revisions by the same user not shown)
Line 1: Line 1:
{{#if: {{{legend|}}} | [[AFDO]]s:&nbsp;}}{{#regex: {{{1|}}}|/(\d+)(\D+)?/|[[\1afdo|\1]]\2}}<noinclude>
{{#if: {{{legend|}}} | [[AFDO]]s:&nbsp;}}{{#rreplace: {{{1|}}}|/(\d+)(\D+)?/|[[\1afdo|\1]]\2}}<noinclude>
This template takes a collection of numbers and creates links to individual [[afdo]] pages from it.
{{documentation}}
 
== Usage examples ==
 
; You type:
* <code><nowiki>{{AFDOs|1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11}}</nowiki></code>
* <code><nowiki>{{AFDOs|1 2 3 4 5 6 7 8 9 10 11}}</nowiki></code>
* <code><nowiki>{{AFDOs|1 afdo, 2 afdo, up to 99 afdo 00}}</nowiki></code>
 
; You get (rendered):
* {{AFDOs|1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11}}
* {{AFDOs|1 2 3 4 5 6 7 8 9 10 11}}
* {{AFDOs|1 afdo, 2 afdo, up to 99 afdo 00}} - disputable if leading zeros should be removed
 
; To include a legend, type:
* <code><nowiki>{{AFDOs| legend=1 | 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 }}</nowiki></code>
 
; So you get (rendered):
* {{AFDOs| legend=1 | 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11}}
 
== Technical notes ==
* [https://www.mediawiki.org/wiki/Extension:Regex_Fun MediaWiki: Extension: Regex Fun]
 
== See also ==
* [[Template: IFDOs]]
* [[Template: EDOs]]
* [[Template: Optimal ET sequence]]


[[Category:Formatting templates]]
[[Category:Formatting templates]]
</noinclude>
</noinclude>

Latest revision as of 12:03, 5 April 2025

Template documentation[view] [edit] [history] [purge]

This template takes a collection of numbers and creates links to individual afdo pages from it.

Usage examples

You type
  • {{AFDOs|1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11}}
  • {{AFDOs|1 2 3 4 5 6 7 8 9 10 11}}
  • {{AFDOs|1 afdo, 2 afdo, up to 99 afdo 00}}
You get (rendered)
To include a legend, type
  • {{AFDOs| legend=1 | 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 }}
So you get (rendered)

Technical notes

See also