Difference between revisions of "Template:CelestialRef/test/doc"

From blackwiki
Jump to navigation Jump to search
imported>Robertinventor
imported>Anthony Appleyard
m (Anthony Appleyard moved page Template:CelestialRefTest/doc to Template:CelestialRef/test/doc: Requested at WP:RM as uncontroversial (permalink))
(No difference)

Revision as of 20:20, 23 July 2013


50px Template documentation[create]


Examples

Any identifier recognized by Simbad for its sim-basic will do.

So, these are all possible: {{CelestialRefTest | M 31}}, {{CelestialRefTest | Crab Nebula}}, {{CelestialRefTest | HD 189733b}} etc.

Displayed as: Template:CelestialRefTest, Template:CelestialRefTest, Template:CelestialRefTest.

This shows all the features in use: Example: {{CelestialRefTest| Crab Nebula | cds=short | ids=show | bib=show | plot=10 |units=arcsec | image=show | bwimage=show }}

yields Template:CelestialRefTest

Same example with commas instead of dashes : {{CelestialRefTest| Crab Nebula | sep=, |cds=short | ids=show | bib=show | plot=10 |units=arcsec | image=show | bwimage=show }}

yields Template:CelestialRefTest

That might be useful in an article for a single celestial object, for instance, to add all those links in a footnote for the object which is the subject of the article.

Inline

Showing all the optoins, as inline instead of ref:

* {{CelestialRefTest| Crab Nebula | cds=short | ids=show | bib=show | plot=10 |units=arcsec | image=show | bwimage=show | inline=yes }}

yields:

Using a different name for the internal link

You can use a different name for the internal link and the SIMBAD lookup.

{{ CelestialRefTest | M 31 |Andromeda Galaxy }}

yields: Template:CelestialRefTest

Ref only

If you just want the ref without the name, use the same approach, but make the different name for the internal link blank, as in

{{ CelestialRefTest | M 42 | }}
Yields:
Template:CelestialRefTest

You can miix with other named parameters in any order, e.g.:

{{ CelestialRefTest | M 42 | | bib=show }} (same idea but added an extra named parameter at the end)
Yields:
Template:CelestialRefTest

Which you could then add to some text as Test {{ CelestialRefTest | M 42 | | bib=show }}

Test Template:CelestialRefTest

It doesn't matter where you put this blank field amongst the other parameters, so long as it goes after the object name.

Techy details - the template recognizes your blank field as parameter 2, the second unnamed parameter.

No internal link

If you just want the name without an internal link, add link=no as: {{ CelestialRefTest | M 31 |Andromeda Galaxy | link=no}}

yields: Template:CelestialRefTest

{{ CelestialRefTest | M 31 | link=no}}

yields: Template:CelestialRefTest

Siblings

You can add a link for siblings e.g. {{ CelestialRefTest | GL 146 |siblings = show}}

This may be useful if the object is part of a larger group and this is relevant to the article citing it, in this case the Hyades super cluster.

Template:CelestialRefTest

Star plot

The advantage of the star plot extra link is that it lets the author of the page preset the radius for the plot. For some objects this needs to be large, e.g. 20 arcmins or more. For others, that shows far too many objects and a smaller radius in arcsecs is appropriate.

Example: {{ CelestialRefTest | HD 189733b | plot = 5 }}

yields Template:CelestialRefTest to plot stars within 5 arcmins of HD 189733b

Example: {{ CelestialRefTest | Alpha Centauri | plot = 50 | units = arcsec }}

yields Template:CelestialRefTest to plot stars within 50 arcsecs of Alpha Centauri

Use in tables

The template can be used in tables. This was the original motivation for this template - to have an easy way to add footnotes anad add extra links to the footnotes, for every entry in a table.

Here is an example to test it.

Confirmed Giant Planets around Mid- and Late-K-type Dwarf Stars

All entries are set to add the extra Bibliography link to the refs.

Example: {{ CelestialRefTest | bib=show | WASP-80b }}

Planet Mass (MJ) Period (d) SpT B - V Te?
Template:CelestialRefTest 2.03 0.813 K7 1.0 4400d
Template:CelestialRefTest 7.25 2.88 K3 4619
Template:CelestialRefTest 0.41e 32.0 K4 1.11 4640
Template:CelestialRefTest 0.53e 431.7 - - -
Template:CelestialRefTest 0.0.86 7.92 K5 0.92 4650h
Template:CelestialRefTest 0.27e 263.3 K9f - -
Template:CelestialRefTest 0.71e 1657 - - -
Template:CelestialRefTest 5.12e 655.6 K4 1.14 4714
Template:CelestialRefTest 3.06 3.09 K5 -
Template:CelestialRefTest 0.33 237.6 K3 1.07 4746
Template:CelestialRefTest 1.99 380.85 K3/4 1.04 4795
Template:CelestialRefTest 0.38e 2.82 K4 1.06 4840
Template:CelestialRefTest 1.09 1.42 N/A 1.06 4861
Template:CelestialRefTest 1.44e 345.6 K5 1.08 4962

Data from Giant Planets around Late K Dwarf Stars - Table 1

Test cases

Included mainly to check all the features are working correctly, check this after editing the code and add more test cases if nec if you add new features.

Example: {{ CelestialRefTest | Barnard's star }}

yields Template:CelestialRefTest

Example: {{ CelestialRefTest | Barnard's star |link=no}}

yields Template:CelestialRefTest

Example: {{ CelestialRefTest | Barnard's star | }} for ref only

yields Template:CelestialRefTest

Example: {{ CelestialRefTestTest | M 31 | Andromeda Galaxy }} to display as Andromeda Galaxy but look up as M 31

yields Template:CelestialRefTest

Same example, name only, no internal link: {{ CelestialRefTest | M 31 | Andromeda Galaxy |link=no}}

yields Template:CelestialRefTest

Final example shows all the features in one ref

Example: {{CelestialRefTest| Crab Nebula | cds=short | ids=show | bib=show | plot = 10 |units = arcsec | image=show | bwimage=show }}

yields Template:CelestialRefTest

References

See also