Difference between revisions of "Template:Asteroid table sorting"
Jump to navigation
Jump to search
blackwiki>WDGraham m (WDGraham moved page Template:Ats to Template:Asteroid table sorting: didn't notice the other page names were only shortcuts) |
blackwiki>WDGraham (switch to handle dwarf planets) |
||
| Line 1: | Line 1: | ||
| − | <includeonly>{{#ifexpr: {{#if:{{{1|}}}|1|0}} + {{#if:{{{2|}}}|1|0}} = 2|{{ntsh|{{{1}}}}}[[{{{1}}} {{{2}}}|{{#switch:{{{3|1}}} | + | <includeonly>{{#ifexpr: {{#if:{{{1|}}}|1|0}} + {{#if:{{{2|}}}|1|0}} = 2|{{ntsh|{{{1}}}}}<!-- |
| + | |||
| + | -->[[{{#switch:{{{1}}} | ||
| + | |1 = Ceres (dwarf planet) | ||
| + | |134340 = Pluto | ||
| + | |136108 = Haumea (dwarf planet) | ||
| + | |136199 = Eris (dwarf planet) | ||
| + | |136472 = Makemake (dwarf planet) | ||
| + | |{{{1}}} {{{2}}}}}|{{#switch:{{{3|1}}} | ||
|1 = ({{{1}}}) {{{2}}} | |1 = ({{{1}}}) {{{2}}} | ||
|2 = {{{1}}} {{{2}}} | |2 = {{{1}}} {{{2}}} | ||
Revision as of 17:16, 18 April 2013
This template simplifies the inclusion of asteroids and minor planets in sortable tables. The template adds a sort key, and displays the asteroid name and/or number in a specified format.
Usage
- {{ats|[Minor Planet Number]|[Name]|[Format (optional)]}}
- {{ats/p|[Minor Planet Number]|[Year]|Letter designation|Subscript (if applicable)|[Format (optional)]}}
Four formats are supported:
- (number) name - {{ats|2110|Moore-Sitterly|1}} produces (2110) Moore-Sitterly (default)
- number name- {{ats|4765|Wasserburg|2}} produces 4765 Wasserburg
- name - {{ats|10484|Hecht|3}} produces Hecht
- number - {{ats|15107|Toepperwein|4}} produces 15107
For minor planets with provisional designations, use:
- {{ats/p|35144|1992|YE|1|1}} produces (35144) 1992 YE1
- {{ats/p|35144|1992|YE|1|5}} produces (35144) 1992 YE1
Formats 5, 6 and 7 produce the same output as 1, 2 and 3, but without the subscript
If the asteroid's designation does not include a subscript, leave that field blank:
- {{ats/p|163249|2002|GT||1}} produces (163249) 2002 GT
| The above documentation is transcluded from Template:Asteroid table sorting/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. |