Template:Infobox star/doc

Infobox star is an Infobox-based template designed to present a summary of important facts about a specified star. It is intended to be used at the top of an article about a star, but may also be used in a section about a star in an article about a broader or loosely related topic, if appropriate. Designed as a replacement for the Starbox begin series, it features an integrated star map and interchangeable sections that can be activated by simple cell parameters, with support for a summary of double and triple star systems. It is an intricate template that is made up of inputs for 25 parameters, with up to 24 additional parameters for expansion when summarising information about a two or three-star system. A  phrase is used to create the frameless location map that appears as the default lead image, and 37   parser functions are used for the template's interchangeable sections.

Syntax
Infobox star's syntax features a base of 25 parameters for an article or section describing a single star. An additional 12 parameters can be used to convert the infobox into one that describes a two-star system. It can also be expanded by another 12 parameters to convert the infobox into one that describes a three-star system. These additional parameters are shown below in the example code, separated by line breaks from the base parameters. The examples presented at right show the template as it appears when the base parameters are used for the pulsar PSR B1257+12, and when the first expanded set of 12 parameters are used for the Alpha Centauri system, with Proxima Centauri excluded due to it having its own article. The syntax for this template, in its intended order and spacing, is presented below.

Header and image
The name parameter sets the name of the template, displayed in large, bold font at its heading. Infobox star features a location map as a default lead image if image is not active. It uses an English-language map of a constellation specified in constellation, created by Torsten Bronger. For example, a map of Orion will be displayed if the parameter is set to Orion. This is achieved by fixing the infobox image to, taking advantage of the maps' harmonised filenames under Wikimedia Commons guidelines. The minimalist design of these vector maps are preferred over the maps published by the International Astronomical Union as they are hard to read at a thumbnail level. A  phrase is used to create the location map instead of Location map+, as the template, along with its variants, do not have support for frameless thumbnails, which allow users to display thumbnail sizes according to their preferences as advised by the Manual of Style. The Location map templates are by default fixed to 250px width, and any attempt to set it to a frameless width will result in a Lua error. A caption for the map is also fixed and the corresponding caption parameter disabled if image is not active. Its syntax is written as "Location of in (circled)". Coordinates for the location map's circle will have to be inputted as well, through map x and map y. The circle used for the location map, File:Red circle.svg, is set to a width of 12px as default. This can be changed through a map circle parameter, where its width in pixels, excluding the "px" affix, can be inputted.

When an input for image is detected, the location map is disabled entirely, through the use of an  parser function. In this instance, image is used to input the filename of an image to be displayed as the lead image, excluding its "File:" prefix. Per the Manual of Style's image size guidelines, the width of the image is fixed to, to ensure that users' preferences for thumbnail sizes are respected. Both caption and alt are also made active when image is, with caption intended to be used to input an appropriate descriptive caption for the image displayed in image, and alt intended to be used to input an alt caption for the same image. The use of Longitem is highly encouraged if the caption is larger than a single line.

Expansion cells
For articles or sections describing a star system, it would be appropriate to expand Infobox star with a suite of parameters that add support for information on two-star and three-star systems. This is possible by simply adding a "b" or "c" to the end of parameter names under "Characteristics" and "Orbit", such as radius b or eccentricity c. "b" parameters help describe a secondary star in the system, while "c" parameters help describe a tertiary star in the system. Additionally, the proper name parameter can be expanded with "b" and "c" names as well. When any "b" or "c" cell is active, the infobox design is rearranged from a structure describing a single star to that describing a star system. The "Characteristics" headings become title headers with the Bayer designation for the stars displayed; the "Orbit" headers remain consistent, however. When any particular "b" or "c" cell is active,  parsers check to see if a wikilink to that cell's label already exists in the infobox. If it does, the wikilink is removed, and if there is not, a wikilink is placed onto the label. An example on the right shows how the wikilink for spectral b's label is removed if one already exists for spectral's label. This is to comply with the Manual of Style's guidelines on overlinking.

Succession
Infobox star was designed to be a replacement for the "Starbox" series of templates that were primarily used as summary boxes prior to the standardisation of Infoboxes. They were used from 2005 to 2019. The series was made up of 15 separate templates, of which their purpose has now been succeeded by. The "Starbox" series as a whole featured many more cells than, and often went into detail that exceeded the purpose of an infobox as a summary (and not supplant) of key facts that appear in an article. This inspired and informed the selection of 's limited amount of parameters and cells, in order to resolve this issue. The 15 templates of the "Starbox" series are presented below.


 * Starbox begin
 * Starbox image
 * Starbox observe
 * Starbox observe 2s
 * Starbox observe 3s


 * Starbox character
 * Starbox astrometry
 * Starbox orbit
 * Starbox detail
 * Starbox relpos


 * Starbox catalog
 * Starbox reference
 * Starbox sources
 * Starbox end
 * Starbox short