Module:Taxobox ranks
![]() | This Lua module is used on approximately 606,000 pages, or roughly 1% of all pages. To avoid major disruption and server load, any changes should be tested in the module's /sandbox or /testcases subpages, or in your own module sandbox. The tested changes can be added to this page in a single edit. Consider discussing changes on the talk page before implementing them. |
![]() | This module is rated as ready for general use. It has reached a mature form and is thought to be relatively bug-free and ready for use wherever appropriate. It is ready to mention on help pages and other Wikipedia resources as an option for new users to learn. To reduce server load and bad output, it should be improved by sandbox testing rather than repeated trial-and-error editing. |
![]() | This module is subject to page protection. It is a highly visible module in use by a very large number of pages, or is substituted very frequently. Because vandalism or mistakes would affect many pages, and even trivial editing might cause substantial load on the servers, it is protected from editing. |
Module:Taxobox ranks (talk · · hist · links · doc · sandbox · testcases)
This module provides support to the automated taxobox system – templates such as {{Automatic taxobox}}
or {{Speciesbox}}
. Part of it also supports manual taxoboxes.
It defines:
- The rank names that are acceptable and the way they are displayed in English.
- For a subset of the rank names, it defines arbitrary numerical values that are used to check the consistent ordering of ranks in a taxonomic hierarchy.
It is thus part of the configuration of taxoboxes and taxonomy templates.
To add a new rank
To add a new rank, edit the table that defines the local variable ranks
in this module. The rank name should be in Latin, where a Latin version exists, and should be all lower-case. The equivalent English name should be capitalised. 'Special cases' have italicized English names. The complete table can be seen at Module:Taxobox ranks/testcases#Anglicised rank names.
Some ranks should always be checked for consistent rank ordering in a taxonomic hierarchy. For example, a genus must not occur above a family, and a family must not occur above an order. If the new rank is one that should always be checked in this way, then edit the table that defines the local variable rankValTable
in this module. Use the table at Module:Taxobox ranks/testcases#Rank values to decide on a numerical value to be assigned to the rank to ensure correct ordering.
Usage
Functions angliciseRank
and lookupRankVal
are used in the automated taxobox system to access the two tables defined in this module. {{Anglicise rank}} provides a template interface to angliciseRank
. These functions are not intended for use outside the
automated taxobox system.
A table containing all the ranks defined in the module can be displayed via {{#invoke:Taxobox ranks|showRanks}}
.
A table containing all the rank values defined in the module can be displayed via {{#invoke:Taxobox ranks|showRankTable}}
.
See also
Further rank configuration for the automated taxobox system includes:
- {{Principal rank}} – defines the Linnaean principal ranks that are shown by default in automated taxoboxes
- {{Is italic taxon}} – defines which ranks cause taxon names to be italicized in automated taxoboxes
--[[*************************************************************************
*****************************************************************************]]
local TableRow = '|-\n'
local TableEnd = '|}\n'
local p = {} -- functions made public
local l = {} -- internal functions, kept separate
local ranks =
{
--Special cases, alphabetic order
alliance = '<i>Alliance</i>',
['basic shell type'] = '<i>Basic shell type</i>',
branch = '<i>Branch</i>',
clade = '<i>Clade</i>',
cladus= '<i>Clade</i>',
['form taxon'] = '<i>Form taxon</i>',
grade = '<i>Grade</i>',
gradus = '<i>Grade</i>',
informal = '<i>Informal group</i>',
['informal group'] = '<i>Informal group</i>',
morphotype = '<i>Morphotype</i>',
node = '<i>Node</i>',
plesion = '<i>Plesion</i>',
['plesion-group'] = '<i>Plesion-group</i>',
['possible clade'] = '<i>Clade?</i>',
['species complex'] = '<i>Species complex</i>',
['species group'] = '<i>Species group</i>',
['species subgroup'] = '<i>Species subgroup</i>',
['stem group'] = '<i>Stem group</i>',
['total group'] = '<i>Total group</i>',
--Special virus ranks
realm = 'Realm',
serotype = 'Serotype',
strain = 'Strain',
virus = 'Virus',
['virus group'] = 'Group',
--Linnaean taxonomy, alphabetic order
classis = 'Class',
cohort = 'Cohort',
divisio = 'Division',
domain = 'Domain',
epifamilia = 'Epifamily',
familia = 'Family',
forma = 'Form',
genus = 'Genus',
grandordo = 'Grandorder',
['grandordo-mb'] = 'Grandorder', --McKenna & Bell version
hyperfamilia = 'Hyperfamily',
infraclassis = 'Infraclass',
infralegio = 'Infralegion',
infralegion = 'Infralegion',
infraordo = 'Infraorder',
infraphylum = 'Infraphylum',
infraregnum = 'Infrakingdom',
infratribus = 'Infratribe',
legio = 'Legion',
legion = 'Legion',
magnordo = 'Magnorder',
micrordo = 'Microrder',
microphylum = 'Microphylum',
mirordo = 'Mirorder',
['mirordo-mb'] = 'Mirorder', --McKenna & Bell version
nanordo = 'Nanorder',
nanophylum = 'Nanophylum',
ordo = 'Order',
parafamilia = 'Parafamily',
parvclassis = 'Parvclass',
parvordo = 'Parvorder',
phylum = 'Phylum',
regnum = 'Kingdom',
sectio = 'Section',
series = 'Series',
species = 'Species',
subclassis = 'Subclass',
subcohort = 'Subcohort',
subdivisio = 'Subdivision',
subfamilia = 'Subfamily',
subgenus = 'Subgenus',
sublegio = 'Sublegion',
sublegion = 'Sublegion',
subordo = 'Suborder',
subphylum = 'Subphylum',
subregnum = 'Subkingdom',
subsectio = 'Subsection',
subseries = 'Subseries',
subspecies = 'Subspecies',
subterclassis = 'Subterclass', --used in WoRMS
subtribus = 'Subtribe',
superclassis = 'Superclass',
supercohort = 'Supercohort',
superdivisio = 'Superdivision',
superdomain = 'Superdomain',
superfamilia = 'Superfamily',
superlegio = 'Superlegion',
superlegion = 'Superlegion',
superordo = 'Superorder',
superphylum = 'Superphylum',
superregnum = 'Superkingdom',
supersectio = 'Supersection',
supertribus = 'Supertribe',
tribus = 'Tribe',
varietas = 'Variety',
zoodivisio = 'Division',
zoosectio = 'Section',
zooseries = 'Series',
zoosubdivisio = 'Subdivision',
zoosubsectio = 'Subsection',
--trace fossil taxonomy, alphabetic order-->',
ichnoclassis = 'Ichnoclass',
ichnocohort = 'Ichnocohort',
ichnodivisio = 'Ichnodivision',
ichnofamilia = 'Ichnofamily',
ichnogenus = 'Ichnogenus',
ichnograndordo = 'Ichnograndorder',
['ichnograndordo-mb'] = 'Ichnograndorder', --McKenna & Bell version
ichnoinfraclassis = 'Ichnoinfraclass',
ichnoinfradivisio = 'Ichnoinfradivision',
ichnoinfraordo = 'Ichnoinfraorder',
ichnolegio = 'Ichnolegion',
ichnolegion = 'Ichnolegion',
ichnomagnordo = 'Ichnomagnorder',
ichnomicrordo = 'Ichnomicrorder',
ichnoordo = 'Ichnoorder',
ichnoparvordo = 'Ichnoparvorder',
ichnospecies = 'Ichnospecies',
['ichnostem-group'] = 'Ichnostem-Group',
ichnosubclassis = 'Ichnosubclass',
ichnosubdivisio = 'Ichnosubdivision',
ichnosubfamilia = 'Ichnosubfamily',
ichnosublegio = 'Ichnosublegion',
ichnosublegion = 'Ichnosublegion',
ichnosubordo = 'Ichnosuborder',
ichnosuperclassis = 'Ichnosuperclass',
ichnosupercohort = 'Ichnosupercohort',
ichnosuperfamilia = 'Ichnosuperfamily',
ichnosuperordo = 'Ichnosuperorder',
--fossilized egg taxonomy, alphabetic order
ooclassis = 'Ooclass',
oocohort = 'Oocohort',
oofamilia = 'Oofamily',
oogenus = 'Oogenus',
oomagnordo = 'Oomagnorder',
oordo = 'Oorder',
oospecies = 'Oospecies',
oosubclassis = 'Oosubclass',
oosubgenus = 'Oosubgenus',
oosubspecies = 'Oosubspecies',
oosupercohort = 'Oosupercohort',
oosuperordo = 'Oosuperorder',
}
--[[========================== showRanks ================================
Returns a wikitable showing the ...
Usage: {{#invoke:...|showRanks}}
=============================================================================]]
function p.showRanks(frame)
local res = '{| class="wikitable sortable"\n|+ Ranks recognized in taxonomy templates\n!style="text-align: left;"|Rank !!style="text-align: left;"|Shown as\n'
for k, t in pairs(ranks) do
res = res .. TableRow .. '|' .. k .. '||' .. t .. '\n'
end
return res .. TableEnd
end
return p