Wikipedia:Automated taxobox system/map#Detailed map

{{Autotaxobox system navbox}}

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

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.

  • {{tl|Speciesbox}} and {{tl|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 {{tl|Taxobox/core}} with {{para|parent|target_taxon}}, passing on any other taxobox-related parameters. {{tl|Speciesbox}} retrieves the taxonomic hierarchy using only the genus name; {{tl|Automatic taxobox}} uses the full name of the taxon. (The function of {{tl|Automatic taxobox}} is implemented in Module:Automated taxobox.)
  • {{tl|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 {{tl|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 {{para|always_display|yes}} is set in the taxonomy template.

Configuration

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").
  • {{tl|Taxobox colour}} – defines which taxa set the taxobox colour and what those colours are (also used in manual taxoboxes).
  • Module:Taxobox ranks – defines the ranks that are accepted and converts the Latin form that is used in taxonomy templates to the English equivalent (also used in manual taxoboxes). It also gives a subset of ranks an arbitrary numerical value that is used to decide whether a taxonomic hierarchy defined in taxonomy templates has consistent ranks or not.
  • {{tl|Principal rank}} – defines the Linnaean principal ranks that are shown by default.
  • {{tl|Is italic taxon}} – defines which ranks cause taxon names to be italicized.

Detailed map

Updated May 2025

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

=Top level=

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

  • {{tl|Automatic taxobox}} – cases other than those below
  • {{tl|Hybridbox}} – animal hybrid species in the same genus
  • {{tl|Ichnobox}} – trace fossils
  • {{tl|Infraspeciesbox}} – plant ranks below species (subspecies, varieties)
  • {{tl|Oobox}} – egg fossils
  • {{tl|Speciesbox}} – species
  • {{tl|Subspeciesbox}} – animal subspecies
  • {{tl|Virusbox}} – virus taxa at all ranks

=Displaying an automated taxobox=

The top level automated taxobox templates begin by calling {{tl|Taxobox/core}} with {{para|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.

  • {{tl|Taxobox/core}}
  • {{tl|Edit taxonomy}} – produces the edit link at the top of the taxobox (a black pencil icon)
  • {{tl|Taxon info}} §
  • Module:Autotaxobox.taxoboxColour – determines the taxobox colour automatically
  • Module:Autotaxobox.getTaxonInfoItem §
  • {{tl|Taxobox colour}}
  • {{tl|Taxobox/Error colour}}
  • Module:Autotaxobox.taxoboxList – traverses the taxonomic hierarchy, displaying it line by line
  • Module:Autotaxobox.showTaxon – shows one line of the taxonomic hierarchy
  • {{tl|Create taxonomy}} – creation
  • Module:Autotaxobox.getTaxonInfoItem §
  • {{tl|Principal rank}} – is it a rank that is always displayed or not?
  • Module:Taxobox ranks.angliciseRank – gets the English version of the rank
  • Module:Autotaxobox.getTaxonLink – sets up the taxon name, appropriately italicized, wikilinked, etc.
  • Module:Autotaxobox.getTaxonInfoItem
  • {{tl|Is italic taxon}}

=Displaying a taxonomy template=

The first line of every taxonomy template begins

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

When a taxonomy template is viewed as a page, {{tl|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.

{{anchor|low}}

=Obtaining information from a taxonomy template=

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 {{tl|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 {{para|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}}.

  • {{tl|Taxon info}} – wrapper for the Lua function taxonInfo
  • Module:Autotaxobox|taxonInfo – gets parameter values for the Lua function getTaxonInfoItem
  • Module:Autotaxobox|getTaxonInfoItem – obtains an item of information from a taxonomy template, following one "same as" link
  • Template:Taxonomy/taxon with {{para|machine code|item}}
  • Template:Don't edit this line item – gets an item of information from a taxonomy template, using the following templates:
  • {{tl|Don't edit this line rank}}
  • {{tl|Don't edit this line parent}}
  • {{tl|Don't edit this line link text}}
  • {{tl|Don't edit this line always display}}
  • {{tl|Don't edit this line refs}}
  • {{tl|Don't edit this line same as}}

=Preload templates=

When a taxonomy template is created, "preload templates" provide an introduction and can pre-fill the template, starting from {{tl|Editnotices/Group/Template:Taxonomy}}. See Wikipedia:Editnotice for general information and help.

  • {{tl|Taxonomy preload}} – helps to select one of the following preload templates
  • {{tl|Automatic taxobox/editintro/preload}} → {{tl|Taxonomy/preload}} – default case
  • {{tl|Automatic taxobox/editintro/preload/?}} → {{tl|Taxonomy/preload/?}} – queried taxon
  • {{tl|Automatic taxobox/editintro/preload/??}} → {{tl|Taxonomy/preload/??}} – taxon and parent(s) queried
  • {{tl|Automatic taxobox/editintro/preload/incertae sedis}} → {{tl|Taxonomy/preload/incertae sedis}} – incertae sedis taxon
  • {{tl|Automatic taxobox/editintro/sameas}} → {{tl|Taxonomy/sameas}} – same as taxon

=Support templates=

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

;Templates to generate special symbols

  • {{tl|Extinct}} – generates the † symbol with no italic or bold formatting
  • {{tl|Hybrid}} – generates the × symbol with no italic formatting

;Templates to produce lists of taxa, including:

  • {{tl|Taxon list}}
  • {{tl|Linked taxon list}}
  • {{tl|Species list}}
  • {{tl|Bold species list}}
  • {{tl|Linked species list}}

;Templates used to generate {{para|subdivision_ranks}} if it is missing but needed

  • {{tl|Children rank}}
  • {{tl|Child rank}}
  • {{tl|Pluralise rank}}

=Transclusion count summary=

Templates in :Category:Taxobox templates can be used in three "systems": manual taxoboxes, automated taxoboxes (excluding taxonomy templates), and taxonomy templates. {{As of|2025|May|13}}, transclusion counts were approximately as shown below. Note that these counts include all namespaces, not just article space.

class="wikitable"
Manual taxoboxes35,000rowspan=2 align=right|All taxoboxesrowspan=2 align=right|475,000colspan=2|rowspan=3 |Totalrowspan=3 align=right|600,000
Automated taxoboxes
(excluding taxonomy templates)
align=right|440,000rowspan=2|Automated
taxobox system
rowspan=2 align=right|566,000
Taxonomy templatesalign=right|126,000

See also