Jump to content

Wikipedia:Automated taxobox system/map

From Wikipedia, the free encyclopedia
Documentation for the automated taxobox system

Taxonomy templates

Taxobox templates

This page provides a map of the templates which act together to create a taxobox in the automated taxobox system. It is meant to assist editors maintaining the system.

Note that it may not always be up to date.

Overview

[edit]

Updated: 14 March 2020

The core part of the automatic taxobox system displays a taxonomy for a target taxon by retrieving the taxonomic hierarchy stored in "Taxonomy/taxon" templates. Module:Autotaxobox provides key support for the system. In particular, all traversals of the taxonomic hierarchy are coded in Lua in this module to avoid the expansion depth issues that were previously caused by using the template language. The main functions and templates involved in this process are outlined below.

  • {{Speciesbox}} and {{Automatic taxobox}}
    Generate a taxobox for all non-virus taxa from the rank of species upwards. They use the parameter taxon to determine the name of the taxon which is the target of the automated taxobox. They then invoke {{Taxobox/core}} with |parent=target_taxon, passing on any other taxobox-related parameters. {{Speciesbox}} retrieves the taxonomic hierarchy using only the genus name; {{Automatic taxobox}} uses the full name of the taxon. (The function of {{Automatic taxobox}} is implemented in Module:Automated taxobox.)
    • {{Taxobox/core}}
      Generates an automatic taxobox, but only when passed the parameter parent. (Otherwise it generates a manual taxobox.) It creates the structure of a taxobox and handles all the taxobox-related parameters, other than parent, that are passed to it.
      • Module:Autotaxobox|taxoboxColour
        First, the system has to find the correct colour for the taxobox. The Lua function taxoboxColour searches up the taxonomic hierarchy for the first taxon that sets a taxobox colour according to {{Taxobox colour}}.
      • Module:Autotaxobox|taxoboxList
        Second, the system has to generate the list of taxa shown in the taxobox. The Lua function taxoboxList makes a list of all the parent taxa of the target taxon, based on the taxonomy templates.
        • Module:Autotaxobox|showTaxon
          Each taxon in the list is then processed by showTaxon, which outputs a row for a single taxon if it is to be shown in the taxobox. The output consists of the name of the rank, the name of the taxon (italicized if required) and the authority if this was passed as a parameter. The template decides whether to display or omit a taxon based on various criteria: whether it is at a "principal rank", how many immediately higher ranks are to be displayed, and whether |always_display=yes is set in the taxonomy template.

Configuration

[edit]

The following templates and functions configure the system in some way:

  • Module:Autotaxobox|topLevelTaxon – defines which taxa act as the very top level of the taxonomic hierarchy (e.g. "Life")
  • {{Taxobox colour}} – defines which taxa set the taxobox colour and what those colours are (also used in manual taxoboxes)
  • {{Anglicise rank}} – converts the Latin form that is used in taxonomy templates to the English equivalent (also used in manual taxoboxes)
  • {{Principal rank}} – defines the Linnaean principal ranks that are shown by default
  • {{Is italic taxon}} – defines which ranks cause taxon names to be italicized
  • Module:Autotaxobox|getRankTable – gives ranks an arbitrary numerical value that is used to decide whether a taxonomic hierarchy defined in taxonomy templates has consistent ranks or not

Detailed map

[edit]

Updated 25 December 2018

Generally only those functions in Module:Autotaxobox that interact externally are shown below.

Top level

[edit]

The following templates can be used in articles to create an automated taxobox:

Displaying an automated taxobox

[edit]

The top level automated taxobox templates begin by calling {{Taxobox/core}} with |parent=target-taxon. Only those templates particularly concerned with an automated taxobox are shown below. The points marked "§" are where information is obtained from a taxonomy template – see Obtaining information from a taxonomy template below.

Displaying a taxonomy template

[edit]

The first line of every taxonomy template begins

{{Don't edit this line {{{machine code|}}} ...

When a taxonomy template is viewed as a page, {{Don't edit this line }} is invoked, since machine code defaults to the empty string. It shows the taxonomy encoded by the taxonomy template in the form of two tables: the left-hand table displays the taxonomy template itself; the right-hand table shows the taxonomic hierarchy starting from the taxon described by the taxonomy template. See, e.g., Template:Taxonomy/Pteranodon.

Obtaining information from a taxonomy template

[edit]

Ultimately, information is obtained from a taxonomy template, via {{Taxonomy/taxon|machine code=item}}, which in turn uses one of the {{Don't edit this line item}} variants, where item = parent, rank, etc. This is perhaps an unusual way of using the template coding language: the name of the template to be used next is constructed via a parameter. Thus {{Taxonomy/Acacia|machine code=parent}} expands via {{Taxonomy/Acacia}} to {{Don't edit this line parent |rank=genus |link=Acacia |parent=Acacieae }}, which then yields "Acacieae".

Taxonomy templates should never be used directly to access the taxonomic hierarchy; in a template, they must always be called via {{Taxon info}}; in the Lua module access to taxonomy templates is coded in getTaxonInfoItem. Then if |same_as= is present, this link is followed to fill in any information missing from the taxonomy template. Direct use of the taxonomy template does not follow a "same as" link. The exception is when viewing a taxonomy template, since the left-hand table has to show the actual parameter values in the template; these are accessed directly by {{Don't edit this line}}.

Preload templates

[edit]

When a taxonomy template is created, "preload templates" provide an introduction and can pre-fill the template.

Support templates

[edit]

Various "support templates" can be used in both automated and manual taxoboxes. Some are listed below.

Templates to generate special symbols
  • {{Extinct}} – generates the † symbol with no italic or bold formatting
  • {{Hybrid}} – generates the × symbol with no italic formatting
Templates to produce lists of taxa, including
Templates used to generate |subdivision_ranks= if it is missing but needed
[edit]

Most templates related to taxoboxes are used either only in automated taxoboxes, or in both manual and automated taxoboxes. The few templates used only in manual taxoboxes are highlighted in this colour below. Transclusion counts were as of 7 January 2019 with some high-use counts updated as of May 2020, but note that the tool did not correctly count calls from modules. Higher transclusion counts are highlighted from yellow to red.

Template Transclusions Notes
Top level – taxobox generating templates Counts updated 29 May 2020
{{Automatic taxobox}} 43,000 top level
{{Hybridbox}} 52 top level
{{Ichnobox}} 194 top level
{{Infraspeciesbox}} 460 top level
{{Oobox}} 97 top level
{{Paraphyletic group}} 83 top level
{{Speciesbox}} 172,000 top level
{{Subspeciesbox}} 1,300 top level
{{Taxobox}} 190,500 top level
{{Virusbox}} 1,500 top level
Templates used in top level taxobox templates Counts updated 29 May 2020
{{Automatic taxobox/is species}} 33,000 taxobox template support
{{Child rank}} 356 taxobox template support
{{Children rank}} 356 taxobox template support
{{Pluralise rank}} 356 taxobox template support
{{Select genus}} 53 taxobox template support (hybridbox only)
{{Select species}} 56 taxobox template support (hybridbox only)
{{Sets taxobox colour}} 190,500 taxobox template support
{{Speciesbox/name}} 172,000 taxobox template support
{{Taxon italics}} 173,000 taxobox template support
{{Taxobox name}} 127,000 taxobox template support
{{Taxonomy}} 365,000 taxobox template support
Core template generating all taxoboxes Count updated 13 March 2022
{{Taxobox/core}} 442,000 core taxobox
Components of the autotaxobox system Counts updated 29 May 2020
{{Anglicise rank}} 478,000 autotaxobox system
{{Don't edit this line}} over 63,000 autotaxobox system – transclusions not counted by tool
{{Don't edit this line all}} 200,000+ autotaxobox system – transclusions not counted by tool
{{Don't edit this line always display}} 200,000+ autotaxobox system – transclusions not counted by tool
{{Don't edit this line dagger}} 200,000+ autotaxobox system – transclusions not counted by tool
{{Don't edit this line extinct}} 200,000+ autotaxobox system – transclusions not counted by tool
{{Don't edit this line link target}} 200,000+ autotaxobox system – transclusions not counted by tool
{{Don't edit this line link text}} 200,000+ autotaxobox system – transclusions not counted by tool
{{Don't edit this line parent}} 200,000+ autotaxobox system – transclusions not counted by tool
{{Don't edit this line rank}} 200,000+ autotaxobox system – transclusions not counted by tool
{{Don't edit this line refs}} 200,000+ autotaxobox system – transclusions not counted by tool
{{Don't edit this line same as}} 200,000+ autotaxobox system – transclusions not counted by tool
{{Edit a taxon}} 69,000 autotaxobox system
{{Edit taxonomy}} 219,000 autotaxobox system
{{Is italic taxon}} 288,000 autotaxobox system
{{Principal rank}} 288,000 autotaxobox system
{{Taxobox colour}} 479,000 autotaxobox system
{{Taxobox/Error colour}} 409,000 autotaxobox system
{{Taxon info}} 243,000 autotaxobox system
{{Taxonomy key}} 69,000 autotaxobox system
{{Automatic taxobox/editintro/preload}} autotaxobox system – taxonomy creation
{{Automatic taxobox/editintro/preload/?}} autotaxobox system – taxonomy creation
{{Automatic taxobox/editintro/preload/??}} autotaxobox system – taxonomy creation
{{Automatic taxobox/editintro/preload/incertae sedis}} autotaxobox system – taxonomy creation
{{Automatic taxobox/editintro/sameas}} autotaxobox system – taxonomy creation
{{Create taxonomy}} autotaxobox system – taxonomy creation
{{Create taxonomy/link}} autotaxobox system – taxonomy creation
{{Taxonomy key/missing template}} autotaxobox system – taxonomy creation
{{Taxonomy preload}} autotaxobox system – taxonomy creation
{{Taxonomy/preload}} autotaxobox system – taxonomy creation
{{Taxonomy/preload/?}} autotaxobox system – taxonomy creation
{{Taxonomy/preload/??}} autotaxobox system – taxonomy creation
{{Taxonomy/preload/incertae sedis}} autotaxobox system – taxonomy creation
{{Taxonomy/sameas}} autotaxobox system – taxonomy creation
Utility and other templates
{{Bold species list}} utility
{{Collapsible taxon list}} utility
{{Extinct}} 15,000 utility
{{Hybrid}} utility
{{Incomplete taxon list}} utility
{{Linked species list}} utility
{{Linked taxon list}} utility
{{Nested taxon list}} utility
{{Species list}} 7,000 utility
{{Taxon link}} utility
{{Taxon list}} utility
{{Taxon rank}} utility
{{Taxobox authority}} extra
{{Taxobox colour scheme}} extra
{{Taxobox norank entry}} deprecated

Transclusion count summary

[edit]

Templates in Category:Taxobox templates can be used in three "systems": manual taxoboxes, automated taxoboxes (excluding taxonomy templates), and taxonomy templates. As of 29 May 2020, counts were approximately:

Manual taxoboxes 191,000 All taxoboxes 409,000 Total 479,000
Automated taxoboxes
(excluding taxonomy templates)
219,000 Automated
taxobox system
288,000
Taxonomy templates 69,000

See also

[edit]