Difference between revisions of "Template:CelestialRef/doc"
imported>Robertinventor |
|||
Line 382: | Line 382: | ||
== See also == | == See also == | ||
+ | * {{tl|CelesitalRefAll}} | ||
+ | * {{tl|CelesitalRefEx}} | ||
− | + | <!-- references--> | |
− | <!-- | ||
− | |||
− | |||
− | |||
{{Template reference list}} | {{Template reference list}} | ||
Revision as of 05:52, 25 July 2013
![]() | This is a documentation subpage for Template:CelestialRef. It contains usage information, categories and other content that is not part of the original template page. |
![]() | Work in Progress This template is a work in progress. Comments should be made at Template talk: CelestialRef. |
![]() | This is a documentation subpage for Template:CelestialRef. It contains usage information, categories and other content that is not part of the original template page. |
Contents
Documentation
CelestialRef creates
- Name or internal link to the celestial object in Wikipedia
- Footnote with links to the SIMBAD entry
- Optionally, extra links to other entries for the object in online databases. These are added to the footnote.
It is especially useful if you have a table of celestial objects and want to add footnotes to each one, and maybe add extra entries in the footnotes such as pre-expanded SIMBAD bibliography, star plot, or link to a photograph of the object, as appropriate.
Alternative to this template
For an external links section, use Template:T which calls 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. |
all | show | set to show to show ids, bib, image, and bwimage (and any other options like that that may be added here in the future)
siblings and plot need to be set separately if required, because many objects don't have siblings, and because the plot needs its radius set otherwise may be either too dense, or have nothing in it. |
ids | show | set to show to add link to ids section of SIMBAD page. Shown for all=show. |
bib | show | set to show to add link to pre-expanded bibliography section, Shown for all=show. |
image | show | set to show to add link to aladin preview image, colour, Shown for all=show. |
bwimage | show | set to show to add link to aladin preview image, B&w, Shown for all=show. |
plot | 10 | Radius of star plot (if omitted, no star plot link added) |
units | arcsec | Measurement unit for radius, arcsec, arcmin or deg acceptable, default arcmin |
siblings | show | set to show to add link to siblings search |
cds | short | set to short to display as "CDS" instead of "Centre de données astronomiques de Strasbourg" |
inline | yes | Does everything inline, not as a footnote |
radio | yes | Adds the extra links as an indented radio followed by Links: suitable for use in Extra References section of a page |
newline | no | Set to no to show the extra links on the same line.
Default is newline=yes: adds the extra links as new line, then indented, suitable for footnotes. |
Note, radio overrides newline if both are set, so radio=yes | newline=no will still show newline + radio
Convention: - attributes in this template are assigned "yes" or "no" if to do with formatting and "show" if to do with display of various elements. That seems to help with readability when you have many params to pass.
Rarely used parameters
These are mainly included for possible use in other templates that call this one, and most are used in Template:T, but can be set directly as well.
Parameter | Example | Usage |
---|---|---|
at | yes | shows as "at the SIMBAD Astronomical Database" similar to the JPL small bodies external links section, better for external links than the footnote style method of presentation. |
extrasep | . :* |
Adds any text you like at the start of the extra links such as ids, bibliography etc. The example shown here gives same effect as radio=yes . This parameter is ignored if none of the extra links are shown. Overrides newline and radio. |
sep | , | Separator for the extra entries. Default currently is to separate with dashes using  - This method, using   for the white space prevents it getting stripped by the template. You can also use   for non breaking white space. Is followed by a space |
Techy note: uses Template:T for the contents of the footnote (shown inline for inline=yes ) also uses Template:T for the newline=yes, radio=yes and extrasep logic.
Examples
Any identifier recognized by Simbad for its sim-basic will do.
So, these are all possible: {{CelestialRef | M 31}}, {{CelestialRef | Crab Nebula}}, {{CelestialRef | HD 189733b}} etc.
Displayed as: M 31 [1], Crab Nebula [2], HD 189733b [3].
all=show option
This adds ids, bib, image, and bwimage (and anything else added in future relevant for all objects) all in one go. Here it is with new line:
{{ CelestialRef | Crab Pulsar | all=show }}
Extras as radio in footnote
You can use the radio in a footnote like this:
E.g. {{ CelestialRef | Crab Pulsar | all=show | radio=yes }}
Footnote all as one line
Tp put the links all on one line in the footnote, set newline=no: {{ CelestialRef | Crab Pulsar | all=show | newline=no }}
Using a different name for the internal link
You can use a different name for the internal link and the SIMBAD lookup.
{{ CelestialRef | M 31 |Andromeda Galaxy }}
yields: Andromeda Galaxy [7]
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
{{ CelestialRef | M 42 | }}
Yields:
[8]
You can mix with other named parameters in any order, e.g.:
{{ CelestialRef | M 42 | | bib=show }} (same idea but added an extra named parameter at the end)
Yields:
[9]
Which you could then add to some text as Test {{ CelestialRef | M 42 | | bib=show }}
Test [10]
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 [11]
{{ CelestialRef | M 31 | link=no}}
yields: M 31 [12]
Siblings
You can add a link for siblings e.g. {{ CelestialRef | 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.
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 [14] to plot stars within 5 arcmins of HD 189733b
Example: {{ CelestialRef | Alpha Centauri | plot = 50 | units = arcsec }}
yields Alpha Centauri [15] to plot stars within 50 arcsecs of Alpha Centauri
Inline
Showing as inline instead of ref, and all on one line:
{{CelestialRef| Crab Nebula | cds=short | all=show | inline=yes | newline=no }}
yields:
Crab Nebula: Crab Nebula at SIMBAD - Ids - Bibliography - Image.
Or on a new line: {{CelestialRef| Crab Nebula | all=show | inline=yes }}
yields:
Crab Nebula: Crab Nebula at SIMBAD - Ids - Bibliography - Image.
Format for external links section
This follows the example of Template:T
I've made this into an easier to use external links template which calls this one with suitable defaults Template:T
* {{CelestialRefEx | Crab Nebula | plot=10 | units=arcsec }}
yields:
- Ids - Bibliography - Star plot - Image - B&W Image.
For details see Template:T
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
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: {{ CelestialRef | bib=show | newline=no | WASP-80b }}
Planet | Mass (MJ) | Period (d) | SpT | B - V | Te? |
---|---|---|---|---|---|
WASP-43b [16] | 2.03 | 0.813 | K7 | 1.0 | 4400d |
HAT-P-20b [17] | 7.25 | 2.88 | K3 | — | 4619 |
GJ 439 c [18] | 0.41e | 32.0 | K4 | 1.11 | 4640 |
GJ 439 d [19] | 0.53e | 431.7 | - | - | - |
WASP-59b [20] | 0.0.86 | 7.92 | K5 | 0.92 | 4650h |
HD 113538b [21] | 0.27e | 263.3 | K9f | - | - |
HD 113538c [22] | 0.71e | 1657 | - | - | - |
BD-17 63b [23] | 5.12e | 655.6 | K4 | 1.14 | 4714 |
WASP-10b [24] | 3.06 | 3.09 | K5 | — | - |
BD-08 2823b [25] | 0.33 | 237.6 | K3 | 1.07 | 4746 |
HD 20868b [26] | 1.99 | 380.85 | K3/4 | 1.04 | 4795 |
HD 63454b [27] | 0.38e | 2.82 | K4 | 1.06 | 4840 |
Qatar 1b [28] | 1.09 | 1.42 | N/A | 1.06 | 4861 |
CD-23 395b [29] | 1.44e | 345.6 | K5 | 1.08 | 4962 |
Data from Giant Planets around Late K Dwarf Stars - Table 1
Same table but with new lines in footnotes and all=show
Planet | Mass (MJ) | Period (d) | SpT | B - V | Te? |
---|---|---|---|---|---|
WASP-43b [30] | 2.03 | 0.813 | K7 | 1.0 | 4400d |
HAT-P-20b [31] | 7.25 | 2.88 | K3 | — | 4619 |
GJ 439 c [32] | 0.41e | 32.0 | K4 | 1.11 | 4640 |
GJ 439 d [33] | 0.53e | 431.7 | - | - | - |
WASP-59b [34] | 0.0.86 | 7.92 | K5 | 0.92 | 4650h |
HD 113538b [35] | 0.27e | 263.3 | K9f | - | - |
HD 113538c [36] | 0.71e | 1657 | - | - | - |
BD-17 63b [37] | 5.12e | 655.6 | K4 | 1.14 | 4714 |
WASP-10b [38] | 3.06 | 3.09 | K5 | — | - |
BD-08 2823b [39] | 0.33 | 237.6 | K3 | 1.07 | 4746 |
HD 20868b [40] | 1.99 | 380.85 | K3/4 | 1.04 | 4795 |
HD 63454b [41] | 0.38e | 2.82 | K4 | 1.06 | 4840 |
Qatar 1b [42] | 1.09 | 1.42 | N/A | 1.06 | 4861 |
CD-23 395b [43] | 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: {{ CelestialRef | Barnard's star }}
yields Barnard's star [44]
Example: {{ CelestialRef | Barnard's star |link=no}}
yields Barnard's star [45]
Example: {{ CelestialRef | Barnard's star | }} for ref only
yields [46]
Example: {{ CelestialRef | M 31 | Andromeda Galaxy }} to display as Andromeda Galaxy but look up as M 31
yields Andromeda Galaxy [47]
Same example, name only, no internal link: {{ CelestialRef | M 31 | Andromeda Galaxy |link=no}}
yields Andromeda Galaxy [48]
Final example shows all the features in one ref
Example: {{CelestialRef| Crab Nebula | cds=short | ids=show | bib=show | plot = 10 |units = arcsec | image=show | bwimage=show }}
yields Crab Nebula [49]
Test that first - is omitted in list of extras
Tests code in Template:T 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:
* {{CelestialRef| Crab Nebula | | radio=yes | at=yes | ids=show | bib=show | siblings=show | plot=10 |units=arcsec | image=show | bwimage=show | inline=yes }}
yields:
- Crab Nebula at SIMBAD.
* {{CelestialRef| Crab Nebula | | radio=yes | at=yes | bib=show | siblings=show | plot=10 |units=arcsec | image=show | bwimage=show | inline=yes }}
yields:
- Crab Nebula at SIMBAD.
- Bibliography - Siblings - Star plot - Image - B&W Image.
* {{CelestialRef| Crab Nebula | | radio=yes | at=yes | siblings=show | plot=10 |units=arcsec | image=show | bwimage=show | inline=yes }}
yields:
- Crab Nebula at SIMBAD.
* {{CelestialRef| Crab Nebula | | radio=yes | at=yes | plot=10 |units=arcsec | image=show | bwimage=show | inline=yes }}
yields:
- Crab Nebula at SIMBAD.
* {{CelestialRef| Crab Nebula | | radio=yes | at=yes | image=show | bwimage=show | inline=yes }}
yields:
- Crab Nebula at SIMBAD.
* {{CelestialRef| Crab Nebula | | radio=yes | at=yes | bwimage=show | inline=yes }}
yields:
- Crab Nebula at SIMBAD.
Format for extra links section
Normally you would use Template:T but is included here as a test case for the parameters called by Template:T
* {{CelestialRef| Crab Nebula | | radio=yes | at=yes | ids=show | bib=show | plot=10 |units=arcsec | image=show | bwimage=show | inline=yes }}
yields:
- Crab Nebula at SIMBAD.
- Ids - Bibliography - Star plot - Image - B&W Image.
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:
* {{CelestialRef| Crab Nebula | | radio=yes | at=yes | inline=yes }}
yields:
- Crab Nebula at SIMBAD.
SIMBAD urls documentation
References
- ↑ M 31 at SIMBAD.
- ↑ Crab Nebula at SIMBAD.
- ↑ HD 189733b at SIMBAD.
- ↑ Crab Pulsar at SIMBAD - Ids - Bibliography - Image.
- ↑ Crab Pulsar at SIMBAD.
- Ids - Bibliography - Image.
- ↑ Crab Pulsar at SIMBAD - Ids - Bibliography - Image.
- ↑ M 31 at SIMBAD.
- ↑ M 42 at SIMBAD.
- ↑ M 42 at SIMBAD - Bibliography.
- ↑ M 42 at SIMBAD - Bibliography.
- ↑ M 31 at SIMBAD.
- ↑ M 31 at SIMBAD.
- ↑ Gliese 146 at SIMBAD - Siblings.
- ↑ HD 189733b at SIMBAD - Star plot.
- ↑ Alpha Centauri at SIMBAD - Star plot.
- ↑ WASP-43b at SIMBAD - Bibliography.
- ↑ HAT-P-20b at SIMBAD - Bibliography.
- ↑ GJ 439 c at SIMBAD - Bibliography.
- ↑ GJ 439 d at SIMBAD - Bibliography.
- ↑ WASP-59b at SIMBAD - Bibliography.
- ↑ HD 113538b at SIMBAD - Bibliography.
- ↑ HD 113538c at SIMBAD - Bibliography.
- ↑ BD-17 63b at SIMBAD - Bibliography.
- ↑ WASP-10b at SIMBAD - Bibliography.
- ↑ BD-08 2823b at SIMBAD - Bibliography.
- ↑ HD 20868b at SIMBAD - Bibliography.
- ↑ HD 63454b at SIMBAD - Bibliography.
- ↑ Qatar 1b at SIMBAD - Bibliography.
- ↑ CD-23 395b at SIMBAD - Bibliography.
- ↑ WASP-43b at SIMBAD - Ids - Bibliography - Image.
- ↑ HAT-P-20b at SIMBAD - Ids - Bibliography - Image.
- ↑ GJ 439 c at SIMBAD - Ids - Bibliography - Image.
- ↑ GJ 439 d at SIMBAD - Ids - Bibliography - Image.
- ↑ WASP-59b at SIMBAD - Ids - Bibliography - Image.
- ↑ HD 113538b at SIMBAD - Ids - Bibliography - Image.
- ↑ HD 113538c at SIMBAD - Ids - Bibliography - Image.
- ↑ BD-17 63b at SIMBAD - Ids - Bibliography - Image.
- ↑ WASP-10b at SIMBAD - Ids - Bibliography - Image.
- ↑ BD-08 2823b at SIMBAD - Ids - Bibliography - Image.
- ↑ HD 20868b at SIMBAD - Ids - Bibliography - Image.
- ↑ HD 63454b at SIMBAD - Ids - Bibliography - Image.
- ↑ Qatar 1b at SIMBAD - Ids - Bibliography - Image.
- ↑ CD-23 395b at SIMBAD - Ids - Bibliography - Image.
- ↑ Barnard's star at SIMBAD.
- ↑ Barnard's star at SIMBAD.
- ↑ Barnard's star at SIMBAD.
- ↑ M 31 at SIMBAD.
- ↑ M 31 at SIMBAD.
- ↑ Crab Nebula at SIMBAD - Ids - Bibliography - Star plot - Image - B&W Image.
See also
- {{CelesitalRefAll}}
- {{CelesitalRefEx}}
References