Difference between revisions of "Template:Align Ticks"
Jump to navigation
Jump to search
(template for aligning ticks in tables) |
m |
||
Line 1: | Line 1: | ||
− | <includeonly>{{#ifexpr: {{#vardefineecho:ticks|{{formatnum:{{{1|}}}|R}}}} < 1000000 | {{#ifexpr: {{{2|6}}} > 6 | {{0|0,}} }} }}{{#ifexpr: {{# | + | <includeonly>{{#ifexpr: {{#vardefineecho:ticks|{{formatnum:{{{1|}}}|R}}}} < 1000000 | {{#ifexpr: {{{2|6}}} > 6 | {{0|0,}} }} }}{{#ifexpr: {{#var:ticks}} < 100000 | {{#ifexpr: {{{2|6}}} > 5 | {{0}} }} }}{{#ifexpr: {{#var:ticks}} < 10000 | {{#ifexpr: {{{2|6}}} > 4 | {{0}} }} }}{{#ifexpr: {{#var:ticks}} < 1000 | {{#ifexpr: {{{2|6}}} > 3 | {{0|0,}} }} }}{{#ifexpr: {{#var:ticks}} < 100 | {{#ifexpr: {{{2|6}}} > 2 | {{0}} }} }}{{#ifexpr: {{#var:ticks}} < 10 | {{#ifexpr: {{{2|6}}} > 1 | {{0}} }} }}{{Ticks|{{{1|}}}}}</includeonly><noinclude> |
{{Documentation}} | {{Documentation}} | ||
</noinclude> | </noinclude> |
Latest revision as of 22:17, 19 September 2022
Summary[edit]
This table can be used to align ticks. This might be useful in tables and lists. It has two parameters:
- The first parameter is the number of ticks. They will be converted using {{Ticks}}.
- The second parameter is the expected maximum length of the first parameter.
Examples[edit]
{{Align Ticks|1|2}} {{Align Ticks|10|2}}
tick (0.02 secs)
110 ticks (0.17 secs)
Default length is seven:
{{Align Ticks|10,000}} {{Align Ticks|100,000}}
ticks (2.78 mins)
10,000100,000 ticks (27.78 mins)
Maximum length is seven:
{{Align Ticks|1|7}} {{Align Ticks|10|7}} {{Align Ticks|100|7}} {{Align Ticks|1,000|7}} {{Align Ticks|10,000|7}} {{Align Ticks|100,000|7}} {{Align Ticks|1,000,000|7}}
tick (0.02 secs)
1ticks (0.17 secs)
10ticks (1.67 secs)
100ticks (16.67 secs)
1,000ticks (2.78 mins)
10,000ticks (27.78 mins)
100,0001,000,000 ticks (277.78 mins)
The above documentation is transcluded from Template:Align Ticks/doc. (edit | history) Editors can experiment in this template's sandbox (create | mirror) and testcases (create) pages. Please add categories to the /doc subpage. Subpages of this template. |