Difference between revisions of "Template:CelestialRefAll/doc"

From blackwiki
Jump to navigation Jump to search
imported>Robertinventor
imported>Robertinventor
Line 39: Line 39:
 
|-
 
|-
 
| siblings || show  || set to '''''show''''' to add link to siblings search
 
| siblings || show  || set to '''''show''''' to add link to siblings search
|-
 
| plotsiblings || 100 || Radius of siblings star plot (if omitted, no siblings star plot link added)
 
|-
 
| siblingsunits || arcsec || Measurement unit for radius for siblings star plot, '''''arcsec''''', '''''arcmin''''' or '''''deg''''' acceptable, default arcmin
 
 
|-
 
|-
 
|}
 
|}
Line 72: Line 68:
 
You can mix with other named parameters in any order, e.g.:  
 
You can mix with other named parameters in any order, e.g.:  
  
<nowiki>{{ CelestialRefAll | Epsilon Tauri | | siblings=show | plotsiblings=100 }}</nowiki> (same idea but added an extra named parameter at the end)<br>
+
<nowiki>{{ CelestialRefAll | M 42 | | bib=show }}</nowiki> (same idea but added an extra named parameter at the end)<br>
 
Yields:<br>
 
Yields:<br>
{{CelestialRef |Epsilon Tauri | | bib=show }}
+
{{CelestialRef | M 42 | | bib=show }}
  
 
Which you could then add to some text as Test <nowiki>{{ CelestialRef | M 42 | | bib=show }}</nowiki>
 
Which you could then add to some text as Test <nowiki>{{ CelestialRef | M 42 | | bib=show }}</nowiki>
Line 112: Line 108:
 
{{ CelestialRef | Epsilon Tauri | siblings = show}}
 
{{ CelestialRef | Epsilon Tauri | 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.
+
<nowiki>{{ CelestialRef | Gliese 146 | siblings = show}} </nowiki>
 
 
===Siblings Star Plot===
 
 
 
You can add a link for siblings star plot e.g.  <nowiki>{{ CelestialRef | Epsilon Tauri  | plotsiblings = 100}} </nowiki>
 
 
 
{{ CelestialRef | Epsilon Tauri | plotsiblings = 100}}
 
 
 
Default is arcmins, to show in other units use e.g..
 
 
 
<nowiki>{{ CelestialRef | Epsilon Tauri 2 | siblingsunits=deg}} </nowiki>
 
 
 
{{ CelestialRef | Epsilon Tauri | plotsiblings = 2 | siblingsunits=deg}}
 
 
 
===Inline===
 
 
 
Showing as inline instead of ref, and all on one line:<br>
 
<nowiki>{{CelestialRef| Crab Nebula | cds=short | all=show | inline=yes | newline=no }}</nowiki>
 
 
 
yields:<br>
 
{{CelestialRef| Crab Nebula | cds=short | all=show | inline=yes |newline=no }}
 
 
 
Or on a new line: <nowiki>{{CelestialRef| Crab Nebula  | all=show | inline=yes }}</nowiki>
 
 
 
yields:<br>
 
{{CelestialRef| Crab Nebula  | all=show | inline=yes }}
 
 
 
===Format for external links section===
 
 
 
This follows the example of {{t|JPL small body}}
 
 
 
I've made this into an easier to use external links template which calls this one with suitable defaults {{t|CelestialRefEx}}
 
  
<nowiki>* {{CelestialRefEx | Crab Nebula | plot=10 | units=arcsec }}</nowiki>
+
{{ CelestialRef |Gliese 146 | siblings = show}}
  
yields:<br>
+
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 cluster, and the Hyades super cluster.
* {{CelestialRefEx | Crab Nebula | plot=10 | units=arcsec }}
 
 
 
For details see {{t|CelestialRefEx/doc}}
 
 
 
You can also so the same here, by setting radio=yes | at=yes  | inline=yes . I've put this in as one of the test cases at the bottom if you want to check what it's like.
 
  
 
==Use in tables==
 
==Use in tables==
Line 164: Line 124:
 
All entries are set to add the extra Bibliography link to the refs, and with newline=no.
 
All entries are set to add the extra Bibliography link to the refs, and with newline=no.
  
Example: <nowiki>{{ CelestialRef | bib=show | newline=no | WASP-80b }}</nowiki>
+
Example: <nowiki>{{ CelestialRefAll | WASP-80b }}</nowiki>
  
 
{|class="wikitable"
 
{|class="wikitable"
Line 170: Line 130:
 
!Planet!!Mass (MJ)!!Period (d)!!SpT!!B - V!!Te?
 
!Planet!!Mass (MJ)!!Period (d)!!SpT!!B - V!!Te?
 
|-
 
|-
|{{CelestialRef|bib=show|newline=no|WASP-43b}}||2.03||0.813||K7||1.0||4400d
+
|{{CelestialRefAll|WASP-43b}}||2.03||0.813||K7||1.0||4400d
 
|-
 
|-
|{{CelestialRef|bib=show|newline=no|HAT-P-20b}}||7.25||2.88||K3||—||4619
+
|{{CelestialRefAll|HAT-P-20b}}||7.25||2.88||K3||—||4619
 
|-
 
|-
|{{CelestialRef|bib=show|newline=no|GJ 439 c}}||0.41e||32.0||K4||1.11||4640
+
|{{CelestialRefAll|GJ 439 c}}||0.41e||32.0||K4||1.11||4640
 
|-
 
|-
|{{CelestialRef|bib=show|newline=no|GJ 439 d}}||0.53e||431.7||-||-||-
+
|{{CelestialRefAll|GJ 439 d}}||0.53e||431.7||-||-||-
 
|-
 
|-
||{{CelestialRef|bib=show|newline=no|WASP-59b}}||0.0.86||7.92||K5||0.92||4650h
+
||{{CelestialRefAll|WASP-59b}}||0.0.86||7.92||K5||0.92||4650h
 
|-
 
|-
|{{CelestialRef|bib=show|newline=no|HD 113538b}}||0.27e||263.3||K9f||-||-
+
|{{CelestialRefAll|HD 113538b}}||0.27e||263.3||K9f||-||-
 
|-
 
|-
|{{CelestialRef|bib=show|newline=no|HD 113538c}}||0.71e||1657||-||-||-
+
|{{CelestialRefAll|HD 113538c}}||0.71e||1657||-||-||-
 
|-
 
|-
|{{CelestialRef|bib=show|newline=no|BD-17 63b}}||5.12e||655.6||K4||1.14||4714
+
|{{CelestialRefAll|BD-17 63b}}||5.12e||655.6||K4||1.14||4714
 
|-
 
|-
|{{CelestialRef|bib=show|newline=no|WASP-10b}}||3.06||3.09||K5||—||-
+
|{{CelestialRefAll|WASP-10b}}||3.06||3.09||K5||—||-
 
|-
 
|-
|{{CelestialRef|bib=show|newline=no|BD-08 2823b}}||0.33||237.6||K3||1.07||4746
+
|{{CelestialRefAll|BD-08 2823b}}||0.33||237.6||K3||1.07||4746
 
|-
 
|-
|{{CelestialRef|bib=show|newline=no|HD 20868b}}||1.99||380.85||K3/4||1.04||4795
+
|{{CelestialRefAll|HD 20868b}}||1.99||380.85||K3/4||1.04||4795
 
|-
 
|-
|{{CelestialRef|bib=show|newline=no|HD 63454b}}||0.38e||2.82||K4||1.06||4840
+
|{{CelestialRefAll|HD 63454b}}||0.38e||2.82||K4||1.06||4840
 
|-
 
|-
|{{CelestialRef|bib=show|newline=no|Qatar 1b}}||1.09||1.42||N/A||1.06||4861
+
|{{CelestialRefAll|Qatar 1b}}||1.09||1.42||N/A||1.06||4861
 
|-
 
|-
|{{CelestialRef|bib=show|newline=no|CD-23 395b}}||1.44e||345.6||K5||1.08||4962
+
|{{CelestialRefAll|CD-23 395b}}||1.44e||345.6||K5||1.08||4962
 
|}
 
|}
  
 
Data from [http://arxiv.org/pdf/1305.3228v1.pdf Giant Planets around Late K Dwarf Stars - Table 1]
 
Data from [http://arxiv.org/pdf/1305.3228v1.pdf Giant Planets around Late K Dwarf Stars - Table 1]
 
====Same table but with new lines in footnotes and all=show====
 
 
{|class="wikitable"
 
|-
 
!Planet!!Mass (MJ)!!Period (d)!!SpT!!B - V!!Te?
 
|-
 
|{{CelestialRef|bib=show|all=show|WASP-43b}}||2.03||0.813||K7||1.0||4400d
 
|-
 
|{{CelestialRef|bib=show|all=show|HAT-P-20b}}||7.25||2.88||K3||—||4619
 
|-
 
|{{CelestialRef|bib=show|all=show|GJ 439 c}}||0.41e||32.0||K4||1.11||4640
 
|-
 
|{{CelestialRef|bib=show|all=show|GJ 439 d}}||0.53e||431.7||-||-||-
 
|-
 
||{{CelestialRef|bib=show|all=show|WASP-59b}}||0.0.86||7.92||K5||0.92||4650h
 
|-
 
|{{CelestialRef|bib=show|all=show|HD 113538b}}||0.27e||263.3||K9f||-||-
 
|-
 
|{{CelestialRef|bib=show|all=show|HD 113538c}}||0.71e||1657||-||-||-
 
|-
 
|{{CelestialRef|bib=show|all=show|BD-17 63b}}||5.12e||655.6||K4||1.14||4714
 
|-
 
|{{CelestialRef|bib=show|all=show|WASP-10b}}||3.06||3.09||K5||—||-
 
|-
 
|{{CelestialRef|bib=show|all=show|BD-08 2823b}}||0.33||237.6||K3||1.07||4746
 
|-
 
|{{CelestialRef|bib=show|all=show|HD 20868b}}||1.99||380.85||K3/4||1.04||4795
 
|-
 
|{{CelestialRef|bib=show|all=show|HD 63454b}}||0.38e||2.82||K4||1.06||4840
 
|-
 
|{{CelestialRef|bib=show|all=show|Qatar 1b}}||1.09||1.42||N/A||1.06||4861
 
|-
 
|{{CelestialRef|bib=show|all=show|CD-23 395b}}||1.44e||345.6||K5||1.08||4962
 
|}
 
 
==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.
 
 
===Test of display for name===
 
 
Example: <nowiki>{{ CelestialRef | Barnard's star }}</nowiki>
 
 
yields {{ CelestialRef | Barnard's star }}
 
 
Example: <nowiki>{{ CelestialRef | Barnard's star |link=no}}</nowiki>
 
 
yields {{ CelestialRef | Barnard's star |link=no}}
 
 
Example: <nowiki>{{ CelestialRef | Barnard's star | }}</nowiki> for ref only
 
 
yields {{ CelestialRef | Barnard's star | }}
 
 
Example: <nowiki>{{ CelestialRef | M 31 | Andromeda Galaxy }}</nowiki> to display as Andromeda Galaxy but look up as M 31
 
 
yields {{ CelestialRef | M 31 | Andromeda Galaxy }}
 
 
Same example, name only, no internal link: <nowiki>{{ CelestialRef | M 31 | Andromeda Galaxy |link=no}} </nowiki>
 
 
yields {{ CelestialRef | M 31 | Andromeda Galaxy |link=no}}
 
 
Final example shows all the features in one ref
 
 
Example:  <nowiki>{{CelestialRef| Crab Nebula | cds=short | ids=show | bib=show | plot = 10 |units = arcsec | image=show | bwimage=show }}</nowiki>
 
 
yields {{CelestialRef| Crab Nebula | cds=short | ids=show | bib=show | plot = 10 |units = arcsec | image=show | bwimage=show }}
 
 
===Test that first - is omitted in list of extras ===
 
 
Tests code in {{t|CelestialRef/Extras}} which is done individually for each case depending on which is first in the line.
 
 
There should be no leading - in the second line for any of these:
 
 
<nowiki>* {{CelestialRef| Crab Nebula | | radio=yes | at=yes | ids=show | bib=show | siblings=show | plot=10 |units=arcsec | image=show | bwimage=show | inline=yes }}</nowiki>
 
 
yields:<br>
 
* {{CelestialRef| Crab Nebula | | radio=yes | at=yes | ids=show | bib=show | siblings=show | plot=10 |units=arcsec | image=show | bwimage=show | inline=yes }}
 
 
<nowiki>* {{CelestialRef| Crab Nebula | | radio=yes | at=yes | bib=show | siblings=show | plot=10 |units=arcsec | image=show | bwimage=show | inline=yes }}</nowiki>
 
 
yields:<br>
 
* {{CelestialRef| Crab Nebula | | radio=yes | at=yes | bib=show | siblings=show | plot=10 |units=arcsec | image=show | bwimage=show | inline=yes }}
 
 
<nowiki>* {{CelestialRef| Crab Nebula | | radio=yes | at=yes | siblings=show | plot=10 |units=arcsec | image=show | bwimage=show | inline=yes }}</nowiki>
 
 
yields:<br>
 
* {{CelestialRef| Crab Nebula | | radio=yes | at=yes | siblings=show | plot=10 |units=arcsec | image=show | bwimage=show | inline=yes }}
 
 
<nowiki>* {{CelestialRef| Crab Nebula | | radio=yes | at=yes |  plot=10 |units=arcsec | image=show | bwimage=show | inline=yes }}</nowiki>
 
 
yields:<br>
 
* {{CelestialRef| Crab Nebula | | radio=yes | at=yes | plot=10 |units=arcsec | image=show | bwimage=show | inline=yes }}
 
 
<nowiki>* {{CelestialRef| Crab Nebula | | radio=yes | at=yes | image=show | bwimage=show | inline=yes }}</nowiki>
 
 
yields:<br>
 
* {{CelestialRef| Crab Nebula | | radio=yes | at=yes | image=show | bwimage=show | inline=yes }}
 
 
<nowiki>* {{CelestialRef| Crab Nebula | | radio=yes | at=yes | bwimage=show | inline=yes }}</nowiki>
 
 
yields:<br>
 
* {{CelestialRef| Crab Nebula | | radio=yes | at=yes | bwimage=show | inline=yes }}
 
 
===Format for extra links section===
 
 
Normally you would use {{t|CelestialRefEx}} but is included here as a test case for the parameters called by {{t|CelestialRefEx}}
 
 
<nowiki>* {{CelestialRef| Crab Nebula | | radio=yes | at=yes | ids=show | bib=show | plot=10 |units=arcsec | image=show | bwimage=show | inline=yes }}</nowiki>
 
 
yields:<br>
 
* {{CelestialRef| Crab Nebula | | radio=yes | at=yes | ids=show | bib=show | plot=10 |units=arcsec | image=show | bwimage=show | inline=yes }}
 
 
If none of the extra options are set, then the new line or radio is ignored, as there would be nothing to put on the line after it:
 
 
<nowiki>* {{CelestialRef| Crab Nebula | | radio=yes | at=yes | inline=yes }}</nowiki>
 
 
yields:<br>
 
* {{CelestialRef| Crab Nebula | | radio=yes | at=yes | inline=yes }}
 
 
==SIMBAD urls documentation==
 
 
See [http://simbad.u-strasbg.fr/simbad/sim-help?Page=sim-url SIMBAD - Query by urls]/
 
  
 
== See also ==
 
== See also ==
* {{tl|CelestialRefAll}}
 
 
* {{tl|CelestialRefEx}}
 
* {{tl|CelestialRefEx}}
 +
* {{tl|CelestialRef}}
  
 
==References ==
 
==References ==

Revision as of 08:08, 25 July 2013

Documentation

CelestialRefAll creates

  • Name or internal link to the celestial object in Wikipedia
  • Footnote with links to the SIMBAD entry
  • Extra links to other entries for the object in online databases. These are added to the footnote.
  • It shows ids, bib, image, and bwimage (and any other options like that that may be added here in the future)

It is especially useful if you have a table of celestial objects and want to add footnotes to each one.

Alternative to this template

For an external links section, use Template:T which calls Template:T.

If you want more configuration options useTemplate:T which is called by Template:T

If you just want to add a SIMBAD footnote, without these extra options, you can use: Template:T.

Parameters

Parameter Example Usage
First unnamed parameter M 31 Name to pass to Simbad basic search
Second unnamed parameter Andromeda Galaxy Alternative name for internal link
if absent uses first param
If set blank, name is not shown.
plot 10 Radius of star plot (if omitted, no star plot link added)
units arcsec Measurement unit for radius for star plot, arcsec, arcmin or deg acceptable, default arcmin
siblings show set to show to add link to siblings search

Examples

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

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

Displayed as: M 31 [1], Crab Nebula [2], HD 189733b [3].

Using a different name for the internal link

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

{{ CelestialRefAll | M 31 |Andromeda Galaxy }}

yields: Andromeda Galaxy [4]

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

{{ CelestialRefAll | M 42 | }}
Yields:
[5]

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

{{ CelestialRefAll | M 42 | | bib=show }} (same idea but added an extra named parameter at the end)
Yields:
[6]

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

Test [7]

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: {{ CelestialRef | M 31 |Andromeda Galaxy | link=no}}

yields: Andromeda Galaxy [8]

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

yields: M 31 [9]

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: {{ CelestialRef | HD 189733b | plot = 5 }}

yields HD 189733b [10] to plot stars within 5 arcmins of HD 189733b

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

yields Alpha Centauri [11] to plot stars within 50 arcsecs of Alpha Centauri

Siblings

You can add a link for siblings e.g. {{ CelestialRef | Epsilon Tauri | siblings = show}}

Epsilon Tauri [12]

{{ CelestialRef | Gliese 146 | siblings = show}}

Gliese 146 [13]

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 cluster, and the Hyades super cluster.

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, and with newline=no.

Example: {{ CelestialRefAll | WASP-80b }}

Planet Mass (MJ) Period (d) SpT B - V Te?
WASP-43b [14] 2.03 0.813 K7 1.0 4400d
HAT-P-20b [15] 7.25 2.88 K3 4619
GJ 439 c [16] 0.41e 32.0 K4 1.11 4640
GJ 439 d [17] 0.53e 431.7 - - -
WASP-59b [18] 0.0.86 7.92 K5 0.92 4650h
HD 113538b [19] 0.27e 263.3 K9f - -
HD 113538c [20] 0.71e 1657 - - -
BD-17 63b [21] 5.12e 655.6 K4 1.14 4714
WASP-10b [22] 3.06 3.09 K5 -
BD-08 2823b [23] 0.33 237.6 K3 1.07 4746
HD 20868b [24] 1.99 380.85 K3/4 1.04 4795
HD 63454b [25] 0.38e 2.82 K4 1.06 4840
Qatar 1b [26] 1.09 1.42 N/A 1.06 4861
CD-23 395b [27] 1.44e 345.6 K5 1.08 4962

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

See also

References