Template:IFDOs: Difference between revisions

From Xenharmonic Wiki
Jump to navigation Jump to search
ArrowHead294 (talk | contribs)
mNo edit summary
ArrowHead294 (talk | contribs)
mNo edit summary
 
Line 1: Line 1:
{{#if: {{{legend|}}} | [[ifdo]]s:&nbsp;}}{{#rreplace: {{{1|}}}|/(\d+)(\D+)?/|[[\1ifdo|\1]]\2}}<noinclude>
{{#if: {{{legend|}}} | [[ifdo]]s:&nbsp;}}{{#rreplace: {{{1|}}}|/(\d+)(\D+)?/|[[\1ifdo|\1]]\2}}<noinclude>
This template takes a collection of numbers and creates links to individual [[ifdo]] pages from it.
{{documentation}}
 
== Usage examples ==
 
; You type:
* <code><nowiki>{{IFDOs|1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11}}</nowiki></code>
* <code><nowiki>{{IFDOs|1 2 3 4 5 6 7 8 9 10 11}}</nowiki></code>
* <code><nowiki>{{IFDOs|1 ifdo, 2 ifdo, up to 99 ifdo 00}}</nowiki></code>
 
; You get (rendered):
* {{IFDOs|1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11}}
* {{IFDOs|1 2 3 4 5 6 7 8 9 10 11}}
* {{IFDOs|1 ifdo, 2 ifdo, up to 99 ifdo 00}} - disputable if leading zeros should be removed
 
; To include a legend, type:
* <code><nowiki>{{IFDOs| legend=1 | 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 }}</nowiki></code>
 
; So you get (rendered):
* {{IFDOs| 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: AFDOs]]
* [[Template: EDOs]]
* [[Template: Optimal ET sequence]]


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

Latest revision as of 11:58, 5 April 2025

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

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

Usage examples

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

Technical notes

See also