Template:CelestialRef/doc

Documentation
CelestialRef creates an internal link to the object in wikipedia with attached footnote linking to its SIMBAD entry - that in turn gives observational details, often a photograph, and bibliography of articles referring to the object.

It 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 CelestialRefEx which calls CelestialRef/Extras.

If you want to add all the extra links, it may be easier to use CelestialRefAll which calls CelestialRef with all=yes, and has fewer options.

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

Parameters
Note, radio overrides newline if both are set, so radio=yes | newline=no will still show the radio, which of course is on a new line

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. Some are used in CelestialRefEx. They can be set directly as well.

Techy note: CelestialRef uses CelestialRef/Extras for the contents of the footnote (shown inline for inline=yes ) also uses CelestialRef/ExtraSep for the newline, radio and extrasep logic.

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

So, these are all possible:, , etc.

Displayed as:, ,.

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:

Extras as radio in footnote
You can use the radio in a footnote like this:

E.g.

Footnote on separate line
To put the links all on one line in the footnote, set newline=yes:

The long form of "at SIMBAD" could be useful in this situation:

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

yields:

You can also use a different display name for the internal link too:

yields:

So there,
 * M 31 = name to pass to SIMBAD
 * Andromeda Galaxy = name for internal link
 * Andromeda Spiral Galaxy = how to display the internal link,

The internal link wiki markup generated is

Andromeda Spiral Galaxy

If the display name and Simbad name are identical, internal link different, you can use:

Which gives you:

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

Yields:

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

(same idea but added an extra named parameter at the end) Yields:

Which you could then add to some text as Test

Test

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:

yields:

yields:

Siblings
You can add a link for siblings e.g.

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.

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:

yields  to plot stars within 5 arcmins of HD 189733b

Example:

yields  to plot stars within 50 arcsecs of Alpha Centauri

Inline
Showing as inline instead of ref, and all on one line:

yields:

Or on a new line:

yields:

Format for external links section
This follows the example of JPL small body

I've made this into an easier to use external links template which calls this one with suitable defaults CelestialRefEx

*

yields:

For details see 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
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:

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.

Test of display for name
Example:

yields

Example:

yields

Example: for ref only

yields

Example: to display as Andromeda Galaxy but look up as M 31

yields

Same example, name only, no internal link:

yields

Final example shows all the features in one ref

Example:

yields

Test that first - is omitted in list of extras
Tests code in 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:

*

yields:

*

yields:

*

yields:

*

yields:

*

yields:

*

yields:

Format for extra links section
Normally you would use CelestialRefEx but is included here as a test case for the parameters called by CelestialRefEx

*

yields:

*

yields:

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:

*

yields:

SIMBAD urls documentation
See SIMBAD - Query by urls/