<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://sandbox.indicwiki.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Indicwiki</id>
	<title>IndicWiki Sandbox - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://sandbox.indicwiki.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Indicwiki"/>
	<link rel="alternate" type="text/html" href="https://sandbox.indicwiki.org/index.php/Special:Contributions/Indicwiki"/>
	<updated>2026-05-13T11:49:36Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.42.1</generator>
	<entry>
		<id>https://sandbox.indicwiki.org/index.php?title=Template:Speciesbox/checkgenus&amp;diff=66579</id>
		<title>Template:Speciesbox/checkgenus</title>
		<link rel="alternate" type="text/html" href="https://sandbox.indicwiki.org/index.php?title=Template:Speciesbox/checkgenus&amp;diff=66579"/>
		<updated>2026-05-11T08:16:41Z</updated>

		<summary type="html">&lt;p&gt;Indicwiki: 1 revision imported&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;noinclude&amp;gt;&amp;lt;!--&lt;br /&gt;
Only intended to be called from Template:Speciesbox/parameterCheck; determines whether its first parameter has the rank of genus in its taxonomy template.&lt;br /&gt;
--&amp;gt;&amp;lt;/noinclude&amp;gt;&amp;lt;nowiki/&amp;gt;{{#switch:{{Taxon info|{{{1|Felis}}}|rank}}|genus=|ichnogenus=|oogenus=|[[Category:Speciesboxes with genus parameter not a genus]]}}&amp;lt;noinclude&amp;gt;&lt;br /&gt;
{{documentation}}&amp;lt;/noinclude&amp;gt;&lt;/div&gt;</summary>
		<author><name>Indicwiki</name></author>
	</entry>
	<entry>
		<id>https://sandbox.indicwiki.org/index.php?title=Module:Taxobox_ranks&amp;diff=66577</id>
		<title>Module:Taxobox ranks</title>
		<link rel="alternate" type="text/html" href="https://sandbox.indicwiki.org/index.php?title=Module:Taxobox_ranks&amp;diff=66577"/>
		<updated>2026-05-11T08:16:40Z</updated>

		<summary type="html">&lt;p&gt;Indicwiki: 1 revision imported&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;--[[*************************************************************************&lt;br /&gt;
This module provides support to the automated taxobox system – the templates&lt;br /&gt;
Automatic taxobox, Speciesbox, Subspeciesbox, Infraspeciesbox, etc.&lt;br /&gt;
&lt;br /&gt;
In particular it is part of the configuration of the system, defining the&lt;br /&gt;
rank names that are recognized and the way they are displayed in English in&lt;br /&gt;
taxoboxes and viewed taxonomy templates.&lt;br /&gt;
*****************************************************************************]]&lt;br /&gt;
require(&#039;strict&#039;)&lt;br /&gt;
&lt;br /&gt;
local TableRow = &#039;|-\n&#039;&lt;br /&gt;
local TableEnd = &#039;|}\n&#039;&lt;br /&gt;
local p = {} -- functions made public&lt;br /&gt;
local l = {} -- internal functions, kept separate&lt;br /&gt;
&lt;br /&gt;
--*************************** CONFIGURATION *********************************&lt;br /&gt;
&lt;br /&gt;
--[[============================ ranks ======================================&lt;br /&gt;
Set up a constant to hold the rank names and their English equivalents.&lt;br /&gt;
If adding to this list, note that rank names containing spaces or - must be&lt;br /&gt;
enclosed in [&#039; &#039;].&lt;br /&gt;
=============================================================================]]&lt;br /&gt;
local ranks =&lt;br /&gt;
	{&lt;br /&gt;
		--Special cases, alphabetic order&lt;br /&gt;
		alliance = &#039;&amp;lt;i&amp;gt;Alliance&amp;lt;/i&amp;gt;&#039;,&lt;br /&gt;
		[&#039;basic shell type&#039;] = &#039;&amp;lt;i&amp;gt;Basic shell type&amp;lt;/i&amp;gt;&#039;,&lt;br /&gt;
		branch = &#039;&amp;lt;i&amp;gt;Branch&amp;lt;/i&amp;gt;&#039;,&lt;br /&gt;
		clade = &#039;&amp;lt;i&amp;gt;Clade&amp;lt;/i&amp;gt;&#039;,&lt;br /&gt;
		cladus= &#039;&amp;lt;i&amp;gt;Clade&amp;lt;/i&amp;gt;&#039;,&lt;br /&gt;
		[&#039;form taxon&#039;] = &#039;&amp;lt;i&amp;gt;Form taxon&amp;lt;/i&amp;gt;&#039;,&lt;br /&gt;
		grade = &#039;&amp;lt;i&amp;gt;Grade&amp;lt;/i&amp;gt;&#039;,&lt;br /&gt;
		gradus = &#039;&amp;lt;i&amp;gt;Grade&amp;lt;/i&amp;gt;&#039;,&lt;br /&gt;
		informal = &#039;&amp;lt;i&amp;gt;Informal group&amp;lt;/i&amp;gt;&#039;,&lt;br /&gt;
		[&#039;informal group&#039;] = &#039;&amp;lt;i&amp;gt;Informal group&amp;lt;/i&amp;gt;&#039;,&lt;br /&gt;
		morphotype = &#039;&amp;lt;i&amp;gt;Morphotype&amp;lt;/i&amp;gt;&#039;,&lt;br /&gt;
		node = &#039;&amp;lt;i&amp;gt;Node&amp;lt;/i&amp;gt;&#039;,&lt;br /&gt;
		plesion = &#039;&amp;lt;i&amp;gt;Plesion&amp;lt;/i&amp;gt;&#039;,&lt;br /&gt;
		[&#039;plesion-group&#039;] = &#039;&amp;lt;i&amp;gt;Plesion-group&amp;lt;/i&amp;gt;&#039;,&lt;br /&gt;
		[&#039;possible clade&#039;] = &#039;&amp;lt;i&amp;gt;Clade?&amp;lt;/i&amp;gt;&#039;,&lt;br /&gt;
		[&#039;species complex&#039;] = &#039;&amp;lt;i&amp;gt;Species complex&amp;lt;/i&amp;gt;&#039;,&lt;br /&gt;
		[&#039;species group&#039;] = &#039;&amp;lt;i&amp;gt;Species group&amp;lt;/i&amp;gt;&#039;,&lt;br /&gt;
		[&#039;species subgroup&#039;] = &#039;&amp;lt;i&amp;gt;Species subgroup&amp;lt;/i&amp;gt;&#039;,&lt;br /&gt;
		[&#039;stem group&#039;] = &#039;&amp;lt;i&amp;gt;Stem group&amp;lt;/i&amp;gt;&#039;,&lt;br /&gt;
		supergroup = &#039;&amp;lt;i&amp;gt;Supergroup&amp;lt;/i&amp;gt;&#039;,&lt;br /&gt;
		[&#039;total group&#039;] = &#039;&amp;lt;i&amp;gt;Total group&amp;lt;/i&amp;gt;&#039;,&lt;br /&gt;
		--Special virus ranks&lt;br /&gt;
		realm = &#039;Realm&#039;,&lt;br /&gt;
		serotype = &#039;Serotype&#039;,&lt;br /&gt;
		strain = &#039;Strain&#039;,&lt;br /&gt;
		virus = &#039;Virus&#039;,&lt;br /&gt;
		[&#039;virus group&#039;] = &#039;Group&#039;,&lt;br /&gt;
		--Linnaean taxonomy, alphabetic order&lt;br /&gt;
		classis = &#039;Class&#039;,&lt;br /&gt;
		cohort = &#039;Cohort&#039;,&lt;br /&gt;
		divisio = &#039;Division&#039;,&lt;br /&gt;
		domain = &#039;Domain&#039;,&lt;br /&gt;
		epifamilia = &#039;Epifamily&#039;,&lt;br /&gt;
		familia = &#039;Family&#039;,&lt;br /&gt;
		forma = &#039;Form&#039;,&lt;br /&gt;
		genus = &#039;Genus&#039;,&lt;br /&gt;
		grandordo = &#039;Grandorder&#039;,&lt;br /&gt;
		[&#039;grandordo-mb&#039;] = &#039;Grandorder&#039;, --McKenna &amp;amp; Bell version&lt;br /&gt;
		hyperfamilia = &#039;Hyperfamily&#039;,&lt;br /&gt;
		infraclassis = &#039;Infraclass&#039;,&lt;br /&gt;
		infrafamilia = &#039;Infrafamily&#039;,&lt;br /&gt;
		infralegio = &#039;Infralegion&#039;,&lt;br /&gt;
		infralegion = &#039;Infralegion&#039;,&lt;br /&gt;
		infraordo = &#039;Infraorder&#039;,&lt;br /&gt;
		infraphylum = &#039;Infraphylum&#039;,&lt;br /&gt;
		infraregnum = &#039;Infrakingdom&#039;,&lt;br /&gt;
		infratribus = &#039;Infratribe&#039;,&lt;br /&gt;
		legio = &#039;Legion&#039;,&lt;br /&gt;
		legion = &#039;Legion&#039;,&lt;br /&gt;
		magnordo = &#039;Magnorder&#039;,&lt;br /&gt;
		micrordo = &#039;Microrder&#039;,&lt;br /&gt;
		microphylum = &#039;Microphylum&#039;,&lt;br /&gt;
		mirordo = &#039;Mirorder&#039;,&lt;br /&gt;
		[&#039;mirordo-mb&#039;] = &#039;Mirorder&#039;, --McKenna &amp;amp; Bell version&lt;br /&gt;
		nanordo = &#039;Nanorder&#039;,&lt;br /&gt;
		nanophylum = &#039;Nanophylum&#039;,&lt;br /&gt;
		ordo = &#039;Order&#039;,&lt;br /&gt;
		parafamilia = &#039;Parafamily&#039;,&lt;br /&gt;
		parvclassis = &#039;Parvclass&#039;,&lt;br /&gt;
		parvordo = &#039;Parvorder&#039;,&lt;br /&gt;
		phylum = &#039;Phylum&#039;,&lt;br /&gt;
		regnum = &#039;Kingdom&#039;,&lt;br /&gt;
		sectio = &#039;Section&#039;,&lt;br /&gt;
		series = &#039;Series&#039;,&lt;br /&gt;
		species = &#039;Species&#039;,&lt;br /&gt;
		subclassis = &#039;Subclass&#039;,&lt;br /&gt;
		subcohort = &#039;Subcohort&#039;,&lt;br /&gt;
		subdivisio = &#039;Subdivision&#039;,&lt;br /&gt;
		subfamilia = &#039;Subfamily&#039;,&lt;br /&gt;
		subgenus = &#039;Subgenus&#039;,&lt;br /&gt;
		sublegio = &#039;Sublegion&#039;,&lt;br /&gt;
		sublegion = &#039;Sublegion&#039;,&lt;br /&gt;
		subordo = &#039;Suborder&#039;,&lt;br /&gt;
		subphylum = &#039;Subphylum&#039;,&lt;br /&gt;
		subregnum = &#039;Subkingdom&#039;,&lt;br /&gt;
		subsectio = &#039;Subsection&#039;,&lt;br /&gt;
		subseries = &#039;Subseries&#039;,&lt;br /&gt;
		subspecies = &#039;Subspecies&#039;,&lt;br /&gt;
		subterclassis = &#039;Subterclass&#039;, --used in WoRMS&lt;br /&gt;
		subtribus = &#039;Subtribe&#039;,&lt;br /&gt;
		superclassis = &#039;Superclass&#039;,&lt;br /&gt;
		supercohort = &#039;Supercohort&#039;,&lt;br /&gt;
		superdivisio = &#039;Superdivision&#039;,&lt;br /&gt;
		superdomain = &#039;Superdomain&#039;,&lt;br /&gt;
		superfamilia = &#039;Superfamily&#039;,&lt;br /&gt;
		superlegio = &#039;Superlegion&#039;,&lt;br /&gt;
		superlegion = &#039;Superlegion&#039;,&lt;br /&gt;
		superordo = &#039;Superorder&#039;,&lt;br /&gt;
		superphylum = &#039;Superphylum&#039;,&lt;br /&gt;
		superregnum = &#039;Superkingdom&#039;,&lt;br /&gt;
		supersectio = &#039;Supersection&#039;,&lt;br /&gt;
		supertribus = &#039;Supertribe&#039;,&lt;br /&gt;
		tribus = &#039;Tribe&#039;,&lt;br /&gt;
		varietas = &#039;Variety&#039;,&lt;br /&gt;
		zoodivisio = &#039;Division&#039;,&lt;br /&gt;
		zoosectio = &#039;Section&#039;,&lt;br /&gt;
		zooseries = &#039;Series&#039;,&lt;br /&gt;
		zoosubdivisio = &#039;Subdivision&#039;,&lt;br /&gt;
		zoosubsectio = &#039;Subsection&#039;,&lt;br /&gt;
		--trace fossil taxonomy, alphabetic order--&amp;gt;&#039;,&lt;br /&gt;
		ichnoclassis = &#039;Ichnoclass&#039;,&lt;br /&gt;
		ichnocohort = &#039;Ichnocohort&#039;,&lt;br /&gt;
		ichnodivisio = &#039;Ichnodivision&#039;,&lt;br /&gt;
		ichnofamilia = &#039;Ichnofamily&#039;,&lt;br /&gt;
		ichnogenus = &#039;Ichnogenus&#039;,&lt;br /&gt;
		ichnograndordo = &#039;Ichnograndorder&#039;,&lt;br /&gt;
		[&#039;ichnograndordo-mb&#039;] = &#039;Ichnograndorder&#039;, --McKenna &amp;amp; Bell version&lt;br /&gt;
		ichnoinfraclassis = &#039;Ichnoinfraclass&#039;,&lt;br /&gt;
		ichnoinfradivisio = &#039;Ichnoinfradivision&#039;,&lt;br /&gt;
		ichnoinfraordo = &#039;Ichnoinfraorder&#039;,&lt;br /&gt;
		ichnolegio = &#039;Ichnolegion&#039;,&lt;br /&gt;
		ichnolegion = &#039;Ichnolegion&#039;,&lt;br /&gt;
		ichnomagnordo = &#039;Ichnomagnorder&#039;,&lt;br /&gt;
		ichnomicrordo = &#039;Ichnomicrorder&#039;,&lt;br /&gt;
		ichnoordo = &#039;Ichnoorder&#039;,&lt;br /&gt;
		ichnoparvordo = &#039;Ichnoparvorder&#039;,&lt;br /&gt;
		ichnospecies = &#039;Ichnospecies&#039;,&lt;br /&gt;
		[&#039;ichnostem-group&#039;] = &#039;Ichnostem-Group&#039;,&lt;br /&gt;
		ichnosubclassis = &#039;Ichnosubclass&#039;,&lt;br /&gt;
		ichnosubdivisio = &#039;Ichnosubdivision&#039;,&lt;br /&gt;
		ichnosubfamilia = &#039;Ichnosubfamily&#039;,&lt;br /&gt;
		ichnosublegio = &#039;Ichnosublegion&#039;,&lt;br /&gt;
		ichnosublegion = &#039;Ichnosublegion&#039;,&lt;br /&gt;
		ichnosubordo = &#039;Ichnosuborder&#039;,&lt;br /&gt;
		ichnosuperclassis = &#039;Ichnosuperclass&#039;,&lt;br /&gt;
		ichnosupercohort = &#039;Ichnosupercohort&#039;,&lt;br /&gt;
		ichnosuperfamilia = &#039;Ichnosuperfamily&#039;,&lt;br /&gt;
		ichnosuperordo = &#039;Ichnosuperorder&#039;,&lt;br /&gt;
		--fossilized egg taxonomy, alphabetic order&lt;br /&gt;
		ooclassis = &#039;Ooclass&#039;,&lt;br /&gt;
		oocohort = &#039;Oocohort&#039;,&lt;br /&gt;
		oofamilia = &#039;Oofamily&#039;,&lt;br /&gt;
		oogenus = &#039;Oogenus&#039;,&lt;br /&gt;
		oomagnordo = &#039;Oomagnorder&#039;,&lt;br /&gt;
		oordo = &#039;Oorder&#039;,&lt;br /&gt;
		oospecies = &#039;Oospecies&#039;,&lt;br /&gt;
		oosubclassis = &#039;Oosubclass&#039;,&lt;br /&gt;
		oosubgenus = &#039;Oosubgenus&#039;,&lt;br /&gt;
		oosubspecies = &#039;Oosubspecies&#039;,&lt;br /&gt;
		oosupercohort = &#039;Oosupercohort&#039;,&lt;br /&gt;
		oosuperordo = &#039;Oosuperorder&#039;,&lt;br /&gt;
	}&lt;br /&gt;
	&lt;br /&gt;
--[[========================== rank values===================================&lt;br /&gt;
Constant to set up a table of numerical values corresponding&lt;br /&gt;
to &#039;Linnaean&#039; ranks, with upper ranks having higher values. In a valid&lt;br /&gt;
taxonomic hierarchy, a lower rank should never have a higher value than a&lt;br /&gt;
higher rank. The actual numerical values are arbitrary so long as they are&lt;br /&gt;
ordered.&lt;br /&gt;
The ranks should be a subset of those in Template:Anglicise ranks.&lt;br /&gt;
=============================================================================]]&lt;br /&gt;
local rankValTable =&lt;br /&gt;
	{&lt;br /&gt;
		classis = 1400,&lt;br /&gt;
		cohort = 1100,&lt;br /&gt;
		divisio = 1500,&lt;br /&gt;
		domain = 1700,&lt;br /&gt;
		epifamilia =  802,&lt;br /&gt;
		familia = 800,&lt;br /&gt;
		forma = 100,&lt;br /&gt;
		genus = 600,&lt;br /&gt;
		grandordo = 1005,&lt;br /&gt;
		[&#039;grandordo-mb&#039;] = 1002,&lt;br /&gt;
		hyperfamilia = 805;&lt;br /&gt;
		infraclassis = 1397,&lt;br /&gt;
		infrafamilia = 797,&lt;br /&gt;
&lt;br /&gt;
		infralegio = 1197,&lt;br /&gt;
		infralegion = 1197,&lt;br /&gt;
		infraordo = 997,&lt;br /&gt;
		infraphylum = 1497,&lt;br /&gt;
		infraregnum = 1597,&lt;br /&gt;
		infratribus = 697,&lt;br /&gt;
		legio = 1200,&lt;br /&gt;
		legion = 1200,&lt;br /&gt;
		magnordo = 1006,&lt;br /&gt;
		microphylum = 1495,&lt;br /&gt;
		micrordo = 995,&lt;br /&gt;
		mirordo = 1004,&lt;br /&gt;
		[&#039;mirordo-mb&#039;] = 1001,&lt;br /&gt;
		nanophylum = 1494,&lt;br /&gt;
		nanordo = 994,&lt;br /&gt;
		ordo = 1000,&lt;br /&gt;
		parafamilia = 800,&lt;br /&gt;
		parvclassis = 1396; -- same as subterclassis&lt;br /&gt;
		parvordo = 996,&lt;br /&gt;
		phylum = 1500,&lt;br /&gt;
		regnum = 1600,&lt;br /&gt;
		sectio = 500,&lt;br /&gt;
		--series = 400, used too inconsistently to check&lt;br /&gt;
		species = 300,&lt;br /&gt;
		subclassis = 1398,&lt;br /&gt;
		subcohort = 1098,&lt;br /&gt;
		subdivisio = 1498,&lt;br /&gt;
		subfamilia = 798,&lt;br /&gt;
		subgenus = 598,&lt;br /&gt;
		sublegio = 1198,&lt;br /&gt;
		sublegion = 1198,&lt;br /&gt;
		subordo = 998,&lt;br /&gt;
		subphylum = 1498,&lt;br /&gt;
		subregnum = 1598,&lt;br /&gt;
		subsectio = 498,&lt;br /&gt;
		subspecies = 298,&lt;br /&gt;
		subterclassis = 1396; -- same as parvclassis&lt;br /&gt;
		subtribus = 698,&lt;br /&gt;
		superclassis = 1403,&lt;br /&gt;
		supercohort = 1103,&lt;br /&gt;
		superdivisio = 1503,&lt;br /&gt;
		superdomain = 1703,&lt;br /&gt;
		superfamilia = 803,&lt;br /&gt;
		superlegio = 1203,&lt;br /&gt;
		superlegion = 1203,&lt;br /&gt;
		superordo = 1003,&lt;br /&gt;
		superphylum = 1503,&lt;br /&gt;
		superregnum = 1603,&lt;br /&gt;
		supersectio = 503,&lt;br /&gt;
		supertribus = 703,&lt;br /&gt;
		tribus = 700,&lt;br /&gt;
		varietas = 200,&lt;br /&gt;
		zoodivisio = 1300,&lt;br /&gt;
		zoosectio = 900,&lt;br /&gt;
		zoosubdivisio = 1298,&lt;br /&gt;
		zoosubsectio = 898,&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
--***************** Process ranks + English equivalents *********************&lt;br /&gt;
&lt;br /&gt;
--[[======================== angliciseRank ==================================&lt;br /&gt;
Returns the English language equivalent of a rank name used in a taxonomy&lt;br /&gt;
template.&lt;br /&gt;
If the rank name is not in the table of ranks, then the first letter&lt;br /&gt;
of the rank name is capitalized and used as the English name.&lt;br /&gt;
If checked=yes, then the generated English name is highlighted in red. If&lt;br /&gt;
called from a taxonomy template, the page is put in&lt;br /&gt;
Category:Taxonomy templates using capitalized rank parameters&lt;br /&gt;
=============================================================================]]&lt;br /&gt;
function p.doAngliciseRank(rankName, check)&lt;br /&gt;
	rankName = string.gsub(rankName, &#039;_&#039;, &#039; &#039;) -- replace all underscores by spaces&lt;br /&gt;
	-- is rankName capitalized?&lt;br /&gt;
	local testName = string.lower(string.sub(rankName,1,1)) .. string.sub(rankName,2)&lt;br /&gt;
	local wasCapitalized = testName ~= rankName&lt;br /&gt;
	if wasCapitalized then rankName = testName end -- try uncapitalized version&lt;br /&gt;
	if string.sub(rankName, 1,8) == &#039;unranked&#039; then return &#039;(unranked)&#039; end&lt;br /&gt;
	-- now look for an English version of the rank name&lt;br /&gt;
	local res = ranks[rankName]&lt;br /&gt;
	local notFound = not res&lt;br /&gt;
	if notFound then&lt;br /&gt;
		--rankName is not in the table of recognized ranks; just capitalize rankName&lt;br /&gt;
		res = string.upper(string.sub(rankName,1,1)) .. string.sub(rankName,2)&lt;br /&gt;
	end&lt;br /&gt;
	if check == &#039;no&#039; then&lt;br /&gt;
		return res&lt;br /&gt;
	elseif notFound then&lt;br /&gt;
		res = &#039;&amp;lt;span style=&amp;quot;background-color:#F99&amp;quot;&amp;gt;&#039; .. res .. &#039;&amp;lt;/span&amp;gt;&#039; -- highlight returned English name&lt;br /&gt;
	end&lt;br /&gt;
	-- tracking caegories required only if called from a taxonomy template&lt;br /&gt;
	local pageTitle =  mw.title.getCurrentTitle()&lt;br /&gt;
	if pageTitle.nsText == &#039;Template&#039; and pageTitle.rootText == &#039;Taxonomy&#039; then&lt;br /&gt;
		if notFound then res = res .. &#039;[[Category:Taxonomy templates using unrecognized rank parameters]]&#039;&lt;br /&gt;
		elseif wasCapitalized then res = res .. &#039;[[Category:Taxonomy templates using capitalized rank parameters]]&#039;&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
	return res&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function p.angliciseRank(frame)&lt;br /&gt;
	local rankName = frame.args[1]&lt;br /&gt;
	local check = frame.args[&#039;check&#039;] or &#039;no&#039;&lt;br /&gt;
	return p.doAngliciseRank(rankName, check)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
--[[========================== showRanks ====================================&lt;br /&gt;
Returns a wikitable showing all the recognized ranks, how they are shown in&lt;br /&gt;
taxoboxes, whether they are automatically italicized, and whether they are&lt;br /&gt;
checked for consistency of rank order.&lt;br /&gt;
Usage: {{#invoke:Taxobox ranks|showRanks}}&lt;br /&gt;
=============================================================================]]&lt;br /&gt;
function p.showRanks(frame)&lt;br /&gt;
	local res = &#039;{| class=&amp;quot;wikitable sortable&amp;quot;\n&#039;&lt;br /&gt;
	res = res ..&#039;|+ Ranks recognized in taxonomy templates\n&#039;&lt;br /&gt;
	res = res .. &#039;!style=&amp;quot;text-align: left;&amp;quot;|Rank name in&amp;lt;br/&amp;gt;taxonomy&amp;lt;br/&amp;gt;template&#039;&lt;br /&gt;
	res = res .. &#039;!!style=&amp;quot;text-align: left;&amp;quot;|Shown in&amp;lt;br/&amp;gt;taxobox as&#039;&lt;br /&gt;
	res = res .. &#039;!! style=&amp;quot;text-align: left;&amp;quot; |Taxon name&amp;lt;br/&amp;gt;automatically&amp;lt;br/&amp;gt;italicized?&#039;&lt;br /&gt;
	res = res .. &#039;!! style=&amp;quot;text-align: left;&amp;quot; |Rank checked&amp;lt;br/&amp;gt;for consistent&amp;lt;br/&amp;gt;order?&#039;&lt;br /&gt;
	res = res .. &#039;\n&#039;&lt;br /&gt;
	for k, t in pairs(ranks) do&lt;br /&gt;
		res = res .. TableRow .. &#039;|&#039; .. k .. &#039;||&#039; .. t .. &#039;||&#039; .. frame:expandTemplate{ title = &#039;Is italic taxon&#039;, args = { k } } .. &#039;||&#039; .. l.hasRankVal(k) .. &#039;\n&#039;&lt;br /&gt;
	end&lt;br /&gt;
	return res .. TableEnd&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
--************************* Process rank values *****************************&lt;br /&gt;
&lt;br /&gt;
--[[========================= lookupRankVal =================================&lt;br /&gt;
Function to look up the arbitrary numerical value of a rank in a rank value&lt;br /&gt;
table. &amp;quot;Ichno&amp;quot; and &amp;quot;oo&amp;quot; ranks are not stored separately, so if present the&lt;br /&gt;
prefix is removed.&lt;br /&gt;
=============================================================================]]&lt;br /&gt;
function p.lookupRankVal(rank)&lt;br /&gt;
	local rankVal = rankValTable[rank]&lt;br /&gt;
	if not rankVal then&lt;br /&gt;
		-- may be an &amp;quot;ichno&amp;quot; or &amp;quot;oo&amp;quot; rank; try removing &amp;quot;ichno-&amp;quot; or &amp;quot;oo-&amp;quot;&lt;br /&gt;
		local baseRank = mw.ustring.gsub(mw.ustring.gsub(rank, &#039;^ichno&#039;, &#039;&#039;), &#039;^oo&#039;, &#039;&#039;)&lt;br /&gt;
		if baseRank == &#039;rdo&#039; then baseRank = &#039;ordo&#039; end&lt;br /&gt;
		-- if an &amp;quot;ichno&amp;quot; or &amp;quot;oo&amp;quot; rank, lower rank value slightly so it is ok below the base rank&lt;br /&gt;
		rankVal = rankValTable[baseRank]&lt;br /&gt;
		if rankVal then&lt;br /&gt;
			rankVal = rankVal - 0.1&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
	return rankVal&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
--[[=========================== hasRankVal =================================&lt;br /&gt;
Utility function to determine whether the rank has a value in rank value&lt;br /&gt;
table. Returns &#039;yes&#039; or &#039;no&#039;.&lt;br /&gt;
=============================================================================]]&lt;br /&gt;
function l.hasRankVal(rank)&lt;br /&gt;
	if rank == &#039;&#039; then return &#039;no&#039; end&lt;br /&gt;
	local rankVal = p.lookupRankVal(rank)&lt;br /&gt;
	if not rankVal then rankVal = &#039;no&#039; else rankVal = &#039;yes&#039; end&lt;br /&gt;
	return rankVal&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
--[[========================== showRankTable ================================&lt;br /&gt;
Returns a wikitable showing the ranks and their values as set up in the&lt;br /&gt;
constant rankValTable.&lt;br /&gt;
Usage: {{#invoke:Taxobox ranks|showRankTable}}&lt;br /&gt;
=============================================================================]]&lt;br /&gt;
function p.showRankTable(frame)&lt;br /&gt;
	local res = &#039;{| class=&amp;quot;wikitable sortable&amp;quot;\n|+ Ranks checked in taxonomy templates\n! Rank !! Shown as !! Value\n&#039;&lt;br /&gt;
	for k, v in pairs(rankValTable) do&lt;br /&gt;
		local rankShown = p.doAngliciseRank(k, &#039;no&#039;)&lt;br /&gt;
		res = res .. TableRow .. &#039;|&#039; .. k .. &#039;||&#039; .. rankShown .. &#039;||&#039; .. v .. &#039;\n&#039;&lt;br /&gt;
	end&lt;br /&gt;
	return res .. TableEnd&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
return p&lt;/div&gt;</summary>
		<author><name>Indicwiki</name></author>
	</entry>
	<entry>
		<id>https://sandbox.indicwiki.org/index.php?title=Module:Article_stub_box/styles.css&amp;diff=66575</id>
		<title>Module:Article stub box/styles.css</title>
		<link rel="alternate" type="text/html" href="https://sandbox.indicwiki.org/index.php?title=Module:Article_stub_box/styles.css&amp;diff=66575"/>
		<updated>2026-05-11T08:16:40Z</updated>

		<summary type="html">&lt;p&gt;Indicwiki: 1 revision imported&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;/* {{pp-template}} */&lt;br /&gt;
/* Article stub message box styles */&lt;br /&gt;
.asbox {&lt;br /&gt;
	position: relative;&lt;br /&gt;
    overflow:hidden;&lt;br /&gt;
}&lt;br /&gt;
.asbox table {&lt;br /&gt;
	background: transparent;&lt;br /&gt;
}&lt;br /&gt;
.asbox p {&lt;br /&gt;
	margin: 0;&lt;br /&gt;
}&lt;br /&gt;
.asbox p + p {&lt;br /&gt;
	margin-top: 0.25em;&lt;br /&gt;
}&lt;br /&gt;
.asbox-body {&lt;br /&gt;
	font-style: italic;&lt;br /&gt;
}&lt;br /&gt;
.asbox-note {&lt;br /&gt;
	font-size: smaller;&lt;br /&gt;
}&lt;br /&gt;
.asbox .navbar {&lt;br /&gt;
	position: absolute;&lt;br /&gt;
	top: -0.75em;&lt;br /&gt;
	right: 1em;&lt;br /&gt;
	display: none;&lt;br /&gt;
}&lt;br /&gt;
:not(p):not(.asbox) + style + .asbox,&lt;br /&gt;
:not(p):not(.asbox) + link + .asbox {&lt;br /&gt;
	margin-top: 3em;&lt;br /&gt;
}&lt;/div&gt;</summary>
		<author><name>Indicwiki</name></author>
	</entry>
	<entry>
		<id>https://sandbox.indicwiki.org/index.php?title=Module:Article_stub_box&amp;diff=66573</id>
		<title>Module:Article stub box</title>
		<link rel="alternate" type="text/html" href="https://sandbox.indicwiki.org/index.php?title=Module:Article_stub_box&amp;diff=66573"/>
		<updated>2026-05-11T08:16:40Z</updated>

		<summary type="html">&lt;p&gt;Indicwiki: 1 revision imported&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;--[[&lt;br /&gt;
This module was created by User:CodeHydro (Alexander Zhikun He).&lt;br /&gt;
User:Jackmcbarn and User:Mr._Stradivarius provided a great deal of assistance in writting p.main()&lt;br /&gt;
&lt;br /&gt;
p.main() draw heavily from the following version of Template:Asbox of the English Wikipedia, authored primarily by User:Rich_Farmbrough&lt;br /&gt;
https://en.wikipedia.org/w/index.php?title=Template:Asbox&amp;amp;oldid=619510287&lt;br /&gt;
&lt;br /&gt;
p.templatepage() is derived from the following revision of Template:Asbox/templatepage, authored primarily by User:MSGJ&lt;br /&gt;
https://en.wikipedia.org/w/index.php?title=Template:Asbox/templatepage&amp;amp;oldid=632914791&lt;br /&gt;
&lt;br /&gt;
Both templates had significant contributions from numerous others listed in the revision history tab of their respective pages.&lt;br /&gt;
--]]&lt;br /&gt;
local WRAPPER_TEMPLATE, args = &#039;Template:Article stub box&#039;&lt;br /&gt;
local templatestyles = &#039;Module:Article stub box/styles.css&#039;&lt;br /&gt;
local p, Buffer, stubCats = {&lt;br /&gt;
	--Prevents dupli-cats... get it? Maybe not?&lt;br /&gt;
	cats = setmetatable({}, {__newindex = function(t, i, v)&lt;br /&gt;
		if not rawget(t, i) then&lt;br /&gt;
			rawset(t, i, v)&lt;br /&gt;
			table.insert(t, i)&lt;br /&gt;
		end&lt;br /&gt;
	end}),&lt;br /&gt;
	--initializes variables required by both p.main and p.templatepage&lt;br /&gt;
	init = function(self, frame, page)&lt;br /&gt;
		args, page = args or require(&#039;Module:Arguments&#039;).getArgs(frame, {&lt;br /&gt;
			wrappers = WRAPPER_TEMPLATE&lt;br /&gt;
		}), page or mw.title.getCurrentTitle()&lt;br /&gt;
		--Ensures demo parameter will never affect category() output for articles&lt;br /&gt;
		self.demo = self.demo or page.namespace ~= 0 and args.demo&lt;br /&gt;
		return args, page&lt;br /&gt;
	end&lt;br /&gt;
}, require(&#039;Module:Buffer&#039;)&lt;br /&gt;
&lt;br /&gt;
--[[&lt;br /&gt;
Formats category links. Stores them until called with cat.done=true&lt;br /&gt;
Takes multiple or single categories in the form of &#039;cat&#039;&lt;br /&gt;
or a table of strings and/or tables containing parts. (See below)&lt;br /&gt;
]]&lt;br /&gt;
local attention, catTag, catKey = Buffer&#039;Stub message templates needing attention&#039;, &#039;[[Category:%s]]&#039;, &#039;%s|%s%s&#039;&lt;br /&gt;
local function category(cat)&lt;br /&gt;
	for _, v in ipairs((tostring(cat) == cat or cat.t) and {cat} or cat) do&lt;br /&gt;
		--[[&lt;br /&gt;
		If v is a table:&lt;br /&gt;
			[1] = full category name; defaults to local attention if blank&lt;br /&gt;
			k = Category sort key. Prefix before v.t&lt;br /&gt;
			t = page.text or args.tempsort#; appended after k (or in its place if omitted). Required if v is not a string&lt;br /&gt;
		Basically the same as v = (v[1] or attention) .. &#039; | &#039; .. (v.k or &#039;&#039;) .. v.t&lt;br /&gt;
		]]&lt;br /&gt;
		if v and v ~= true then--reject v = nil, false, or true&lt;br /&gt;
			local thingToFormat&lt;br /&gt;
			if tostring(v) == v then&lt;br /&gt;
				thingToFormat = v&lt;br /&gt;
			else&lt;br /&gt;
				local buf&lt;br /&gt;
				if v[1] then&lt;br /&gt;
					buf = Buffer(v[1])&lt;br /&gt;
				else&lt;br /&gt;
					buf = attention&lt;br /&gt;
				end&lt;br /&gt;
				thingToFormat = buf:_in(v.k):_(v.t):_str(2, nil, nil, &#039;|&#039;)&lt;br /&gt;
			end&lt;br /&gt;
			p.cats[catTag:format(thingToFormat)] = true&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
	return cat.done and table.concat(p.cats, p.demo and &#039; | &#039; or nil) or &#039;&#039;&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
--[[&lt;br /&gt;
Makes an ombox warning;&lt;br /&gt;
Takes table {ifNot = Boolean, text, {cat. sort key, cat. sort name}}&lt;br /&gt;
Will return an empty string instead when ifNot evaluates to true &lt;br /&gt;
]]&lt;br /&gt;
local function ombox(v)&lt;br /&gt;
	if v.ifNot then return end&lt;br /&gt;
	p.ombox = p.ombox or require(&#039;Module:Message box&#039;).ombox&lt;br /&gt;
	category{v[2]}&lt;br /&gt;
	return p.ombox{&lt;br /&gt;
		type = &#039;content&#039;,&lt;br /&gt;
		text = v[1]&lt;br /&gt;
	}&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
--[[&lt;br /&gt;
Unlike original template, module now takes unlimited cats! This function also performs&lt;br /&gt;
most stub category error checks except for the ombox for when main |category= is omitted (See p.template())&lt;br /&gt;
]]&lt;br /&gt;
local function catStub(page, pageDoc)&lt;br /&gt;
	stubCats = {missing = {}, v = {}}&lt;br /&gt;
	-- zwj and zwnj have semantical use in other other wikis, don&#039;t remove them&lt;br /&gt;
	local zwj = &#039;\226\128\141&#039;  -- U+200D, E2 80 8D&lt;br /&gt;
	local zwnj = &#039;\226\128\140&#039; -- U+200C, E2 80 8C&lt;br /&gt;
	local disallowedUnicodeChars = &#039;[^%w%p%s&#039; .. zwj .. zwnj .. &#039;]&#039; -- for i18n we make this a separate string&lt;br /&gt;
	local code&lt;br /&gt;
	for k, _ in pairs(args) do&lt;br /&gt;
		--Find category parameters and store the number (main cat = &#039;&#039;)&lt;br /&gt;
		table.insert(stubCats, string.match(k, &#039;^category(%d*)$&#039;))&lt;br /&gt;
	end&lt;br /&gt;
	table.sort(stubCats)&lt;br /&gt;
	for k, v in ipairs(stubCats) do&lt;br /&gt;
		--Get category names and, if called by p.templatepage, the optional sort key&lt;br /&gt;
		local tsort, cat = args[&#039;tempsort&#039; .. v], mw.ustring.gsub(args[&#039;category&#039; .. v], disallowedUnicodeChars, &#039;&#039;)--remove all hidden unicode chars &lt;br /&gt;
		--Do not place template in main category if |tempsort = &#039;no&#039;. However, DO place articles of that template in the main category.&lt;br /&gt;
		table.insert(stubCats.v,&lt;br /&gt;
			 page and (--p.templatepage passes page; p.main does not, i.e. articles are categorized without sort keys.&lt;br /&gt;
				v==&#039;&#039; and tsort == &#039;no&#039;--if true, inserts &#039;true&#039; in table, which category() will reject&lt;br /&gt;
				or tsort and {cat, k = &#039; &#039;, t = tsort}&lt;br /&gt;
				or {cat, k = &#039; *&#039;, t = page.text}--note space in front of sort key&lt;br /&gt;
			)&lt;br /&gt;
			or cat&lt;br /&gt;
		)&lt;br /&gt;
		--Check category existance only if on the template page (i.e. stub documentation)&lt;br /&gt;
		if page then&lt;br /&gt;
			if not mw.title.new(&#039;Category:&#039; .. cat).exists then&lt;br /&gt;
				code = code or mw.html.create&#039;code&#039;:wikitext&#039;|category&#039;&lt;br /&gt;
				table.insert(stubCats.missing, tostring(mw.clone(code):wikitext(v)))&lt;br /&gt;
			end&lt;br /&gt;
			--[[&lt;br /&gt;
			Checks non-demo stub template for documentation and flags if doc is present.&lt;br /&gt;
			All stub cats names are checked and flagged if it does not match &#039;Category: [] stub&#039;.&lt;br /&gt;
			The main stub cat is exempt from the name check if the stub template has its own doc&lt;br /&gt;
			(presumably, this doc would have an explanation as to why the main stub cat is non-conforming).&lt;br /&gt;
			]]&lt;br /&gt;
			table.insert(stubCats.v, v == &#039;&#039; and not p.demo and pageDoc.exists and&lt;br /&gt;
				&#039;Stub message templates with documentation subpages&#039;&lt;br /&gt;
				or not cat:match&#039; stubs$&#039; and {k = &#039;S&#039;, t = page.text}&lt;br /&gt;
			)&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
	--Add category names after loop is completed&lt;br /&gt;
	category(stubCats.v)&lt;br /&gt;
	return #stubCats.missing &amp;gt; 0 and ombox{&lt;br /&gt;
		--Changed, original msg:&lt;br /&gt;
		--One or more of the stub categories defined in this template do not seem to exist!&lt;br /&gt;
		--Please double-check the parameters {{para|category}}, {{para|category1}} and {{para|category2}}.&lt;br /&gt;
		&#039;The following parameter&#039;&lt;br /&gt;
			.. (#stubCats.missing == 1 and &#039; defines a stub category that does&#039; or &#039;s define stub categories that do&#039;)&lt;br /&gt;
			.. &#039; not exist: &#039; .. mw.text.listToText(stubCats.missing),&lt;br /&gt;
		{k = &#039;N&#039;, t = page.text}&lt;br /&gt;
	}&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
--Shows population of categories found by catStub(). Outputs demo values if none&lt;br /&gt;
local function population()&lt;br /&gt;
	local wikitext, base = {}, &#039;* [[:Category:%s]] (population: %s)\n&#039;&lt;br /&gt;
	if not args.category and stubCats[1] ~= false then&lt;br /&gt;
		table.insert(stubCats, 1, false)&lt;br /&gt;
	end&lt;br /&gt;
	for _, v in ipairs(stubCats) do&lt;br /&gt;
		table.insert(wikitext, base:format(&lt;br /&gt;
			v and args[&#039;category&#039; .. v] or &#039;{{{category}}}&#039;,&lt;br /&gt;
			v and mw.site.stats.pagesInCategory(args[&#039;category&#039; .. v], &#039;all&#039;) or 0&lt;br /&gt;
		))&lt;br /&gt;
	end&lt;br /&gt;
	return table.concat(wikitext)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
--Includes standard stub documention and flags stub templates with bad parameter values.&lt;br /&gt;
function p.templatepage(frame, page)&lt;br /&gt;
	args, page = p:init(frame, page)&lt;br /&gt;
	local tStubDoc = mw.title.new&#039;Template:Stub documentation&#039;&lt;br /&gt;
	local pageDoc = page:subPageTitle(&#039;doc&#039;)&lt;br /&gt;
	--Reorganization note: Original Asbox alternates between outputting categories and checking on params |category#=.&lt;br /&gt;
	--Rather than checking multiple times and switching tasks, all stub category param operations have been rolled into catStub()&lt;br /&gt;
	return Buffer(&lt;br /&gt;
		ombox{--Show ombox warnings for missing args.&lt;br /&gt;
			ifNot = args.category,&lt;br /&gt;
			&#039;The &amp;lt;code&amp;gt;|category&amp;lt;/code&amp;gt; parameter is not set. Please add an appropriate stub category.&#039;,&lt;br /&gt;
			{k = &#039;C&#039;, t = page.text}&lt;br /&gt;
		})&lt;br /&gt;
		:_(ombox{&lt;br /&gt;
			ifNot = args.subject or args.article or args.qualifier,&lt;br /&gt;
			&#039;This stub template contains no description! At least one of the parameters &amp;lt;code&amp;gt;|subject&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;|article&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;|qualifier&amp;lt;/code&amp;gt; must be defined.&#039;,&lt;br /&gt;
			{k = &#039;D&#039;, t = page.text}&lt;br /&gt;
		})&lt;br /&gt;
		:_(catStub(page, pageDoc))--catStub() may also return an ombox if there are non-existing categories&lt;br /&gt;
		:_(category{&lt;br /&gt;
			done = p.demo ~= &#039;doc&#039;,--Outputs categories if not doc demo&lt;br /&gt;
			&#039;Stub message templates&#039;,&lt;br /&gt;
			args.icon and&lt;br /&gt;
				&#039;Stub message templates using icon parameter&#039;&lt;br /&gt;
				or args.image and (&lt;br /&gt;
					mw.title.new(&#039;Media:&#039; .. mw.text.split(args.image, &#039;|&#039;)[1]).exists--do nothing if exists. category() will reject true&lt;br /&gt;
					or {k = &#039;B&#039;, t = page.text}&lt;br /&gt;
				)&lt;br /&gt;
				or &#039;Stub message templates without images&#039;,&lt;br /&gt;
			args.imagealt and {k = &#039;I&#039;, t = page.text},&lt;br /&gt;
		})&lt;br /&gt;
		:_((not p.demo or p.demo == &#039;doc&#039;) and--Add standard stub template documentation&lt;br /&gt;
			require(&#039;Module:Documentation&#039;).main{&lt;br /&gt;
				content = Buffer(page.text ~= &#039;Stub&#039; and--This comparison performed in {{Asbox/stubtree}} before it invokes Module:Asbox stubtree&lt;br /&gt;
						-- TODO: update this instance of Asbox to Article stub box eventually&lt;br /&gt;
						require(&#039;Module:Asbox stubtree&#039;).subtree{args = {pagename = page.text}}&lt;br /&gt;
					)&lt;br /&gt;
					:_in&#039;\n== About this template ==\nThis template is used to identify a&#039;:_(args.subject):_&#039;stub&#039;:_(args.qualifier):_out&#039; &#039;--space&lt;br /&gt;
					:_&#039;. It uses {{[[Template:Article stub box|article stub box]]}}, which is a meta-template designed to ease the process of creating and maintaining stub templates.\n=== Usage ===\nTyping &#039;&lt;br /&gt;
					:_(mw.html.create&#039;code&#039;&lt;br /&gt;
						:wikitext( mw.text.nowiki( &#039;{{&#039; ), page.text == &#039;Stub&#039; and &#039;stub&#039; or page.text, &#039;}}&#039;)&lt;br /&gt;
					)&lt;br /&gt;
					:_&#039; produces the message shown at the beginning, and adds the article to the following categor&#039;&lt;br /&gt;
					:_(#stubCats &amp;gt; 1 and &#039;ies&#039; or &#039;y&#039;)&lt;br /&gt;
					:_&#039;:\n&#039;&lt;br /&gt;
					:_(population())&lt;br /&gt;
					:_(pageDoc.exists and--transclusion of /doc if it exists&lt;br /&gt;
						frame:expandTemplate{title = pageDoc.text}&lt;br /&gt;
					)&lt;br /&gt;
					:_&#039;\n== General information ==\n&#039;&lt;br /&gt;
					:_(frame:expandTemplate{title = tStubDoc.text})&lt;br /&gt;
					:_&#039;\n\n&#039;(),&lt;br /&gt;
				[&#039;link box&#039;] = Buffer&#039;This documentation is automatically generated by [[Module:Article stub box]].&#039;&lt;br /&gt;
					:_in&#039;The general information is transcluded from [[Template:Stub documentation]]. &#039;&lt;br /&gt;
						:_(mw.html.create&#039;span&#039;&lt;br /&gt;
							:cssText&#039;font-size:smaller;font-style:normal;line-height:130%&#039;&lt;br /&gt;
							:node((&#039;([%s edit] | [%s history])&#039;):format(&lt;br /&gt;
								tStubDoc:fullUrl(&#039;action=edit&#039;, &#039;relative&#039;),&lt;br /&gt;
								tStubDoc:fullUrl(&#039;action=history&#039;, &#039;relative&#039;)&lt;br /&gt;
							))&lt;br /&gt;
						)&lt;br /&gt;
						:_out()&lt;br /&gt;
					:_(page.protectionLevels.edit and page.protectionLevels.edit[1] == &#039;sysop&#039; and&lt;br /&gt;
						&amp;quot;This template is [[WP:PROTECT|fully protected]] and any [[WP:CAT|categories]] should be added to the template&#039;s [&amp;quot;&lt;br /&gt;
						.. pageDoc:fullUrl(&#039;action=edit&amp;amp;preload=Template:Category_interwiki/preload&#039;, &#039;relative&#039;)&lt;br /&gt;
						.. &#039;| /doc] subpage, which is not protected.&#039;&lt;br /&gt;
					)&#039; &amp;lt;br/&amp;gt;&#039;&lt;br /&gt;
			}&lt;br /&gt;
		)()&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function p.main(frame, page)&lt;br /&gt;
	args, page = p:init(frame, page)&lt;br /&gt;
	local output = mw.html.create&#039;div&#039;&lt;br /&gt;
		:attr{role = &#039;note&#039;}&lt;br /&gt;
		:addClass&#039;metadata plainlinks asbox stub&#039;&lt;br /&gt;
		:tag&#039;table&#039;&lt;br /&gt;
			:attr{role = &#039;presentation&#039;}&lt;br /&gt;
			:tag&#039;tr&#039;&lt;br /&gt;
				:addClass&#039;noresize&#039;&lt;br /&gt;
				:node((args.icon or args.image) and&lt;br /&gt;
					mw.html.create&#039;td&#039;&lt;br /&gt;
						:wikitext(args.icon or (&#039;[[File:%s|%spx|alt=%s|class=%s]]&#039;):format(&lt;br /&gt;
							args.image or &#039;&#039;,&lt;br /&gt;
							args.pix or &#039;40x30&#039;,&lt;br /&gt;
							args.imagealt or &#039;Stub icon&#039;,&lt;br /&gt;
							args.imageclass or &#039;&#039;&lt;br /&gt;
						))&lt;br /&gt;
				)&lt;br /&gt;
				:tag&#039;td&#039;&lt;br /&gt;
					:tag&#039;p&#039;&lt;br /&gt;
						:addClass&#039;asbox-body&#039;&lt;br /&gt;
						:wikitext(&lt;br /&gt;
							Buffer&#039;This&#039;:_(args.subject):_(args.article or &#039;article&#039;):_(args.qualifier)&#039; &#039;,--space&lt;br /&gt;
							&#039; is a [[Wikipedia:stub|stub]]. You can help Wikipedia by [&#039;,&lt;br /&gt;
							page:fullUrl(&#039;action=edit&#039;, &#039;relative&#039;),&lt;br /&gt;
							&#039; adding missing information].&#039;&lt;br /&gt;
						)&lt;br /&gt;
					:done()&lt;br /&gt;
					:node(args.note and&lt;br /&gt;
						mw.html.create()&lt;br /&gt;
							:tag&#039;p&#039;&lt;br /&gt;
								:addClass&#039;asbox-note&#039;&lt;br /&gt;
								:wikitext(args.note)&lt;br /&gt;
							:done()&lt;br /&gt;
					)&lt;br /&gt;
		:allDone()&lt;br /&gt;
		:node(args.name and&lt;br /&gt;
			require&#039;Module:Navbar&#039;._navbar{&lt;br /&gt;
				args.name,&lt;br /&gt;
				mini = &#039;yes&#039;,&lt;br /&gt;
			}&lt;br /&gt;
			)&lt;br /&gt;
	--[[&lt;br /&gt;
	Stub categories for templates include a sort key; this ensures that all stub tags appear at the beginning of their respective categories.&lt;br /&gt;
	Articles using the template do not need a sort key since they have unique names.&lt;br /&gt;
	When p.demo equals &#039;doc&#039;, the demo stub categories will appear as those for a stub template.&lt;br /&gt;
	Otherwise, any non-nil p.demo will emulate article space categories (plus any error cats unless set to &#039;art&#039;)&lt;br /&gt;
	]]&lt;br /&gt;
	if page.namespace == 0 then -- Main namespace&lt;br /&gt;
		category&#039;All stub articles&#039;&lt;br /&gt;
		catStub()&lt;br /&gt;
	elseif p.demo then&lt;br /&gt;
		if p.demo ~= &#039;doc&#039; then catStub() end&lt;br /&gt;
		--Unless p.demo is set to &#039;art&#039;, it will also include error categories normally only shown on&lt;br /&gt;
		--the template but not in the article. The elseif after namespace == 0 means demo cats will never show in article space.&lt;br /&gt;
		p.demodoc = p.demo ~= &#039;art&#039; and p.templatepage(frame, page)&lt;br /&gt;
		output = mw.html.create()&lt;br /&gt;
			:node(output)&lt;br /&gt;
			:tag&#039;small&#039;:wikitext(&lt;br /&gt;
				&#039;Demo categories: &#039;,&lt;br /&gt;
				(category{done = true}:gsub(&#039;(%[%[)(Category:)([^|%]]-)(%|)&#039;, &#039;%1%2%3|%2%3%4&#039;):gsub(&#039;(%[%[)(Category:)&#039;, &#039;%1:%2&#039;))&lt;br /&gt;
			):done()&lt;br /&gt;
			:wikitext(p.demo == &#039;doc&#039; and p.demodoc or nil)&lt;br /&gt;
	else&lt;br /&gt;
		--Checks for valid name; emulates original template&#039;s check using {{FULLPAGENAME:{{{name|}}}}}&lt;br /&gt;
		local normalizedName = mw.title.new(args.name or &#039;&#039;)&lt;br /&gt;
		if normalizedName and normalizedName.fullText == page.fullText then&lt;br /&gt;
			output = mw.html.create():node(output):wikitext(p.templatepage(frame, page))&lt;br /&gt;
		elseif not page.isSubpage and page.namespace == 10 then-- Template namespace and not a subpage&lt;br /&gt;
			category{{k = args.name and &#039;E&#039; or &#039;W&#039;, t = page.text}}&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
	return frame:extensionTag{ name = &#039;templatestyles&#039;, args = { src = templatestyles} } .. tostring(output:wikitext(not p.demo and category{done = true} or nil))&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
return p&lt;/div&gt;</summary>
		<author><name>Indicwiki</name></author>
	</entry>
	<entry>
		<id>https://sandbox.indicwiki.org/index.php?title=Template:Article_stub_box&amp;diff=66571</id>
		<title>Template:Article stub box</title>
		<link rel="alternate" type="text/html" href="https://sandbox.indicwiki.org/index.php?title=Template:Article_stub_box&amp;diff=66571"/>
		<updated>2026-05-11T08:16:40Z</updated>

		<summary type="html">&lt;p&gt;Indicwiki: 1 revision imported&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;includeonly&amp;gt;{{#invoke:Article stub box|main}}&amp;lt;/includeonly&amp;gt;&amp;lt;noinclude&amp;gt;&lt;br /&gt;
{{documentation}}&lt;br /&gt;
&amp;lt;!-- Add categories to the /doc subpage and interwikis to Wikidata. --&amp;gt;&lt;br /&gt;
&amp;lt;/noinclude&amp;gt;&lt;/div&gt;</summary>
		<author><name>Indicwiki</name></author>
	</entry>
	<entry>
		<id>https://sandbox.indicwiki.org/index.php?title=Template:Taxobox/core/styles.css&amp;diff=66569</id>
		<title>Template:Taxobox/core/styles.css</title>
		<link rel="alternate" type="text/html" href="https://sandbox.indicwiki.org/index.php?title=Template:Taxobox/core/styles.css&amp;diff=66569"/>
		<updated>2026-05-11T08:16:38Z</updated>

		<summary type="html">&lt;p&gt;Indicwiki: 1 revision imported&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;/* {{pp-template}} */&lt;br /&gt;
@media (max-width:640px) {&lt;br /&gt;
	body:not(.skin-minerva) .infobox {&lt;br /&gt;
	  width:100% !important;&lt;br /&gt;
	}&lt;br /&gt;
	body:not(.skin-minerva) .infobox th { &lt;br /&gt;
		width:50%;&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
@media screen {&lt;br /&gt;
	html.skin-theme-clientpref-night .infobox.biota tr {&lt;br /&gt;
	  background: transparent !important;&lt;br /&gt;
	}&lt;br /&gt;
	html.skin-theme-clientpref-night .infobox.biota img {&lt;br /&gt;
	  background: transparent;&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
@media screen and (prefers-color-scheme: dark) {&lt;br /&gt;
    html.skin-theme-clientpref-os .infobox.biota tr {&lt;br /&gt;
      background: transparent !important;&lt;br /&gt;
    }&lt;br /&gt;
    html.skin-theme-clientpref-os .infobox.biota img {&lt;br /&gt;
      background: white;&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
.infobox.biota .taxobox-edit-taxonomy img {&lt;br /&gt;
    background: transparent !important;&lt;br /&gt;
}&lt;br /&gt;
body.skin-vector table.biota.infobox {&lt;br /&gt;
	margin-top:0.5em;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
body.skin--responsive table.biota.infobox tr.taxonrow2 td {&lt;br /&gt;
	padding:2px 10px;&lt;br /&gt;
}&lt;/div&gt;</summary>
		<author><name>Indicwiki</name></author>
	</entry>
	<entry>
		<id>https://sandbox.indicwiki.org/index.php?title=Module:Cite_IUCN&amp;diff=66567</id>
		<title>Module:Cite IUCN</title>
		<link rel="alternate" type="text/html" href="https://sandbox.indicwiki.org/index.php?title=Module:Cite_IUCN&amp;diff=66567"/>
		<updated>2026-05-11T08:16:37Z</updated>

		<summary type="html">&lt;p&gt;Indicwiki: 1 revision imported&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;require(&#039;strict&#039;);&lt;br /&gt;
local getArgs = require (&#039;Module:Arguments&#039;).getArgs;&lt;br /&gt;
&lt;br /&gt;
local amendment_pattern = &#039;%s*%(amended version of (%d%d%d%d) assessment%)&#039;;&lt;br /&gt;
local errata_pattern = &#039;%s*%(errata version published in (%d%d%d%d)%)&#039;;&lt;br /&gt;
local green_status_pattern = &#039;%s*%((Green Status assessment)%)&#039;;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
--[[--------------------------&amp;lt; I U C N _ I D E N T I F I E R S _ G E T &amp;gt;--------------------------------------&lt;br /&gt;
&lt;br /&gt;
cs1|2 templates cite single sources;  when the identifiers in |doi=, |id=, and |article-number= are different from&lt;br /&gt;
each other then the template is attempting to cite multiple sources.  This function evaluates the identifier portions&lt;br /&gt;
of these parameters. returns seven values: identifyier parts (or nil when parameter not used) and a message (nil on&lt;br /&gt;
success, error message else)&lt;br /&gt;
&lt;br /&gt;
the identifier portions of the several parameters must be properly formed&lt;br /&gt;
&lt;br /&gt;
]]&lt;br /&gt;
&lt;br /&gt;
local function iucn_identifiers_get (args, error_msgs_t, maint_msgs_t)&lt;br /&gt;
	local doi_taxon_ID, doi_assesment_ID&lt;br /&gt;
	local art_num_taxon_ID, art_num_assesment_ID&lt;br /&gt;
	local url_taxon_ID, url_assesment_ID&lt;br /&gt;
&lt;br /&gt;
	if args.doi then&lt;br /&gt;
		local lang_tag&lt;br /&gt;
		doi_taxon_ID, doi_assesment_ID, lang_tag = args.doi:match (&#039;[Tt](%d+)[Aa](%d+)%.(%l%l)$&#039;)&lt;br /&gt;
		if not doi_taxon_ID or not ({[&#039;en&#039;] = true, [&#039;es&#039;] = true, [&#039;fr&#039;] = true, [&#039;pt&#039;] = true})[lang_tag] then&lt;br /&gt;
			table.insert (error_msgs_t, &#039;malformed |doi= identifier&#039;);&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
	local artnum = args[&#039;article-number&#039;] or args.page;							-- |page= is deprecated; one accepted; |article-number= preferred&lt;br /&gt;
	if artnum then&lt;br /&gt;
		art_num_taxon_ID, art_num_assesment_ID = artnum:match (&#039;^[eE]%.[Tt](%d+)[Aa](%d+)$&#039;)&lt;br /&gt;
		if not art_num_taxon_ID then&lt;br /&gt;
			table.insert (error_msgs_t, &#039;malformed |article-number= identifier&#039;);&lt;br /&gt;
		end&lt;br /&gt;
		if args.page then														-- maint message when |page= is used&lt;br /&gt;
			table.insert (maint_msgs_t, &#039;uses deprecated |page= identifier&#039;);&lt;br /&gt;
			args.page = nil;													-- unset as not used&lt;br /&gt;
			args[&#039;article-number&#039;] = artnum;									-- make sure that {{cite journal}} gets |article-number=&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
	if args.url then&lt;br /&gt;
		if args.url:match (&#039;https://www.iucnredlist.org/species/&#039;) then			-- must be a &#039;new-form&#039; url&lt;br /&gt;
			url_taxon_ID, url_assesment_ID = args.url:match (&#039;/species/(%d+)/(%d+)&#039;)&lt;br /&gt;
			if not url_taxon_ID then&lt;br /&gt;
				table.insert (error_msgs_t, &#039;malformed |url= identifier&#039;);&lt;br /&gt;
			end&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	if not error_msgs_t[1] then&lt;br /&gt;
		if doi_taxon_ID and art_num_taxon_ID then&lt;br /&gt;
			if (doi_taxon_ID ~= art_num_taxon_ID or ((doi_assesment_ID ~= art_num_assesment_ID) and not args.errata)) then&lt;br /&gt;
				table.insert (error_msgs_t, &#039;|doi= / |article-number= mismatch&#039;);&lt;br /&gt;
			end&lt;br /&gt;
		end&lt;br /&gt;
		if doi_taxon_ID and url_taxon_ID then&lt;br /&gt;
			if (doi_taxon_ID ~= url_taxon_ID or ((doi_assesment_ID ~= url_assesment_ID) and not args.errata)) then&lt;br /&gt;
				table.insert (error_msgs_t, &#039;|doi= / |url= mismatch&#039;);&lt;br /&gt;
			end&lt;br /&gt;
		end&lt;br /&gt;
		&lt;br /&gt;
		if art_num_taxon_ID and url_taxon_ID then&lt;br /&gt;
			if (art_num_taxon_ID ~= url_taxon_ID or ((art_num_assesment_ID ~= url_assesment_ID) and not args.errata)) then&lt;br /&gt;
				table.insert (error_msgs_t, &#039;|article-number= / |url= mismatch&#039;);&lt;br /&gt;
			end&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	return doi_taxon_ID, doi_assesment_ID, art_num_taxon_ID, art_num_assesment_ID;&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
--[[--------------------------&amp;lt; I U C N _ V O L U M E _ C H E C K &amp;gt;--------------------------------------------&lt;br /&gt;
&lt;br /&gt;
compares volume in |volume= (if present) against year in |date= or |year= (if present) against volume in |doi= (if present)&lt;br /&gt;
&lt;br /&gt;
returns nil if all that are present are correct; message else&lt;br /&gt;
&lt;br /&gt;
]]&lt;br /&gt;
&lt;br /&gt;
local function iucn_volume_check (args, maint_msgs_t)&lt;br /&gt;
	local vol = args.volume;&lt;br /&gt;
	local date = args.date or args.year;&lt;br /&gt;
	local doi = args.doi and args.doi:match (&#039;[Ii][Uu][Cc][Nn]%.[Uu][Kk]%.(%d%d%d%d)&#039;)&lt;br /&gt;
&lt;br /&gt;
	if vol and date and (vol ~= date) then&lt;br /&gt;
		table.insert (maint_msgs_t, &#039;|volume= / |date= mismatch&#039;);&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	if vol and doi and ((vol ~= doi) and not args.amends) then&lt;br /&gt;
		table.insert (maint_msgs_t, &#039;|volume= / |doi= mismatch&#039;);&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	if date and doi and ((doi ~= date) and not args.amends) then&lt;br /&gt;
		table.insert (maint_msgs_t, &#039;|date= / |doi= mismatch&#039;);&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
--[[--------------------------&amp;lt; _ C I T E &amp;gt;--------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
entry point for calls from another module&lt;br /&gt;
&lt;br /&gt;
Wraps {{cite journal}}:&lt;br /&gt;
     takes cite journal parameters but updates old style url using electronic article number number&lt;br /&gt;
     |article-number= should be in format e.T13922A45199653&lt;br /&gt;
     the url uses                13922/45199653&lt;br /&gt;
     so we need to extract the number between T and A (taxon ID) and the number after A (assessment ID)&lt;br /&gt;
     the target url is https://www.iucnredlist.org/species/13922/45199653&lt;br /&gt;
     usage: {{#invoke:iucn|cite}}&lt;br /&gt;
     template: {{Template:Cite iucn}}&lt;br /&gt;
&lt;br /&gt;
]]&lt;br /&gt;
&lt;br /&gt;
local function _cite (args, frame)&lt;br /&gt;
	local error_msgs_t = {};													-- holds error messages for rendering&lt;br /&gt;
	local maint_msgs_t = {};													-- holds hidden maint messages for rendering&lt;br /&gt;
	local namespace = mw.title.getCurrentTitle().namespace;						-- used for categorization&lt;br /&gt;
	frame = frame or mw.getCurrentFrame()										-- fetches frame if called from another module&lt;br /&gt;
&lt;br /&gt;
	if args.title and (args.title:match (errata_pattern) or args.title:match (amendment_pattern)) then&lt;br /&gt;
		table.insert (error_msgs_t, &#039;title has extraneous text&#039;);				-- announce that this template has has errata or amendment text&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	local doi_taxon_ID, doi_assesment_ID;										-- all of these contain the same identifying info in slightly&lt;br /&gt;
	local art_num_taxon_ID, art_num_assesment_ID;								-- different forms. when any combination of these is present,&lt;br /&gt;
&lt;br /&gt;
	doi_taxon_ID, doi_assesment_ID, art_num_taxon_ID, art_num_assesment_ID = iucn_identifiers_get (args, error_msgs_t, maint_msgs_t);&lt;br /&gt;
&lt;br /&gt;
	args.id = nil																-- unset; not supported&lt;br /&gt;
&lt;br /&gt;
	local url_taxon_ID = art_num_taxon_ID or doi_taxon_ID;						-- select for use in url that we will create&lt;br /&gt;
	local url_assesment_ID = art_num_assesment_ID  or doi_assesment_ID;&lt;br /&gt;
	&lt;br /&gt;
	local url = args.url;&lt;br /&gt;
	if url then&lt;br /&gt;
		if url:find (&#039;iucnredlist.org/details/&#039;, 1, true) then					-- old-form url&lt;br /&gt;
			if url_taxon_ID then												-- when there is an identifier&lt;br /&gt;
				url = nil														-- unset; we&#039;ll create new url below&lt;br /&gt;
			else																-- here when old-form but no identifier that we can use to create new url&lt;br /&gt;
				args.url = args.url:gsub (&amp;quot;http:&amp;quot;, &amp;quot;https:&amp;quot;)					-- sometimes works with redirect on iucn site&lt;br /&gt;
			end&lt;br /&gt;
			table.insert (maint_msgs_t, &#039;old-form url&#039;)							-- announce that this template has has an old-form url&lt;br /&gt;
		elseif url:find (&#039;iucnredlist.org/species/&#039;, 1, true) then				-- new-form url&lt;br /&gt;
--			table.insert (maint_msgs_t, &#039;new-form url&#039;)				--TODO: restore this line when most new-form urls have been removed from article space		-- announce that this template has has an new-form url&lt;br /&gt;
		else&lt;br /&gt;
			table.insert (error_msgs_t, &#039;unknown url&#039;)							-- emit error message&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	if not url then																-- when no url or unset old-form url&lt;br /&gt;
		if url_taxon_ID then&lt;br /&gt;
			args.url = &amp;quot;https://www.iucnredlist.org/species/&amp;quot; .. url_taxon_ID .. &#039;/&#039; .. url_assesment_ID&lt;br /&gt;
		else&lt;br /&gt;
			table.insert (error_msgs_t, &#039;no identifier&#039;)						-- emit error message&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	-- add journal if not provided (TODO decide if this should override provided value)&lt;br /&gt;
	if not args[&#039;journal&#039;] and not args[&#039;work&#039;] then&lt;br /&gt;
		args[&#039;journal&#039;] = &amp;quot;[[IUCN Red List|IUCN Red List of Threatened Species]]&amp;quot;&lt;br /&gt;
	end&lt;br /&gt;
	&lt;br /&gt;
	iucn_volume_check (args, maint_msgs_t);										-- |volume=, |year= (|date=), |doi= must all refer to the same volume&lt;br /&gt;
&lt;br /&gt;
	if not args.volume and (args.year or args.date) then&lt;br /&gt;
		args.volume = args.year or args.date&lt;br /&gt;
	end&lt;br /&gt;
	&lt;br /&gt;
	if args.errata then&lt;br /&gt;
		args[&#039;orig-date&#039;] = &#039;errata version of &#039; .. (args.year or args.date or args.volume) .. &#039; assessment&#039;;&lt;br /&gt;
		args.date = args.errata;												-- update publication data to errata year&lt;br /&gt;
		args.year = nil;														-- unset these as no longer needed&lt;br /&gt;
		args.errata = nil;&lt;br /&gt;
	elseif args.amends then&lt;br /&gt;
		args[&#039;orig-date&#039;] = &#039;amended version of &#039; .. args.amends .. &#039; assessment&#039;;&lt;br /&gt;
		args.amends = nil;														-- unset as no longer needed&lt;br /&gt;
	end&lt;br /&gt;
																				-- add free-to-read icon to mark a correctly formed doi&lt;br /&gt;
	if args.doi then&lt;br /&gt;
		args[&#039;doi-access&#039;] = args.doi:match (&#039;10%.2305/[Ii][Uu][Cc][Nn].+[Tt]%d+[Aa]%d+%.%a%a&#039;) and &#039;free&#039; or nil;&lt;br /&gt;
		args.language = args.language or args.lang or args.doi:match (&#039;10%.2305/[Ii][Uu][Cc][Nn].+[Tt]%d+[Aa]%d+%.(%a%a)&#039;);&lt;br /&gt;
		args.lang = nil;														-- unset; use canonical form&lt;br /&gt;
	end&lt;br /&gt;
	&lt;br /&gt;
	local out_t = {};&lt;br /&gt;
	if error_msgs_t[1] then&lt;br /&gt;
		table.insert (out_t, &#039; &amp;lt;span class=&amp;quot;error&amp;quot; style=&amp;quot;font-size:100%&amp;quot;&amp;gt;{{[[Template:cite iucn|cite iucn]]}}: error: &#039;);&lt;br /&gt;
		table.insert (out_t, table.concat (error_msgs_t, &#039;, &#039;));&lt;br /&gt;
		table.insert (out_t, &#039; ([[Template:Cite iucn#Error messages|help]])&#039;);&lt;br /&gt;
		if (0 == namespace) then&lt;br /&gt;
			table.insert (out_t, &#039;[[Category:cite IUCN errors]]&#039;);&lt;br /&gt;
		end&lt;br /&gt;
		table.insert (out_t, &#039;&amp;lt;/span&amp;gt;&#039;);&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	if maint_msgs_t[1] then&lt;br /&gt;
		table.insert (out_t, &#039;&amp;lt;span class=&amp;quot;citation-comment&amp;quot; style=&amp;quot;display: none; color: #085; margin-left: 0.3em;&amp;quot;&amp;gt;&#039;);&lt;br /&gt;
		if not error_msgs_t[1] then&lt;br /&gt;
			table.insert (out_t, &#039;{{[[Template:cite iucn|cite iucn]]}}: &#039;)&lt;br /&gt;
			table.insert (out_t, table.concat (maint_msgs_t, &#039;, &#039;));&lt;br /&gt;
			table.insert (out_t, &#039; ([[Template:Cite iucn#Maintenance messages|help]])&#039;);&lt;br /&gt;
			if (0 == namespace) then&lt;br /&gt;
				table.insert (out_t, &#039;[[Category:cite IUCN maint]]&#039;);&lt;br /&gt;
			end&lt;br /&gt;
		end&lt;br /&gt;
		table.insert (out_t, &#039;&amp;lt;/span&amp;gt;&#039;);&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	if (not args[&#039;doi-access&#039;]) and (0 == namespace) then&lt;br /&gt;
		table.insert (out_t, &#039;[[Category:cite IUCN without doi]]&#039;);&lt;br /&gt;
	end&lt;br /&gt;
	&lt;br /&gt;
	return require (&#039;Module:Citation/CS1&#039;)._citation (frame, args, {CitationClass=&#039;journal&#039;}) ..	-- invoke the module to bypass the call to {{cite journal}}&lt;br /&gt;
		table.concat (out_t);													-- error and maint messages and categories&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
--[[--------------------------&amp;lt; C I T E &amp;gt;----------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
entry point for template calls&lt;br /&gt;
&lt;br /&gt;
]]&lt;br /&gt;
&lt;br /&gt;
local function cite (frame)&lt;br /&gt;
	local args = getArgs (frame);												-- local copy of template arguments&lt;br /&gt;
	return _cite (args, frame);&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
--[=[-------------------------&amp;lt; E T _ A L _ P A T T E R N S &amp;gt;--------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
This adapted from Module:Citation/CS1/Configuration&lt;br /&gt;
&lt;br /&gt;
This table provides Lua patterns for the phrase &amp;quot;et al&amp;quot; and variants in a name.&lt;br /&gt;
&lt;br /&gt;
]=]&lt;br /&gt;
&lt;br /&gt;
local et_al_patterns = {&lt;br /&gt;
	&amp;quot;[;,]? *[\&amp;quot;&#039;]*%f[%a][Ee][Tt]%.? *[Aa][Ll][%.;,\&amp;quot;&#039;]*$&amp;quot;,						-- variations on the &#039;et al&#039; theme&lt;br /&gt;
	&amp;quot;[;,]? *[\&amp;quot;&#039;]*%f[%a][Ee][Tt]%.? *[Aa][Ll][Ii][AaIi][Ee]?[%.;,\&amp;quot;&#039;]*$&amp;quot;,		-- variations on the &#039;et alia&#039;, &#039;et alii&#039; and &#039;et aliae&#039; themes (false positive &#039;et aliie&#039; unlikely to match)&lt;br /&gt;
	&amp;quot;[;,]? *%f[%a]and [Oo]thers&amp;quot;,												-- an alternative to et al.&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
--[[---------------------&amp;lt; N A M E _ H A S _ E T A L &amp;gt;--------------------------&lt;br /&gt;
&lt;br /&gt;
This adapted from Module:Citation/CS1&lt;br /&gt;
&lt;br /&gt;
Evaluates the content of a name for variations on the theme of et al.  If found,&lt;br /&gt;
returns true; nil else&lt;br /&gt;
&lt;br /&gt;
]]&lt;br /&gt;
&lt;br /&gt;
local function name_has_etal (name)&lt;br /&gt;
	local etal;&lt;br /&gt;
&lt;br /&gt;
	if name then																-- name can be nil in which case just return&lt;br /&gt;
		name = name:gsub (&#039;%b&amp;lt;&amp;gt;&#039;, &#039;&#039;);											-- remove any html markup (typically &amp;lt;i&amp;gt;...&amp;lt;/i&amp;gt;)&lt;br /&gt;
		for _, pattern in ipairs (et_al_patterns) do							-- loop through all of the patterns&lt;br /&gt;
			if name:match (pattern) then										-- if this &#039;et al&#039; pattern is found in name&lt;br /&gt;
				return true;													-- has etal, so return true&lt;br /&gt;
			end&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
--[[--------------------------&amp;lt; A U T H O R _ L I S T _ M A K E &amp;gt;----------------------------------------------&lt;br /&gt;
&lt;br /&gt;
creates a list of individual |authorn= parameters from the list of names provided in the raw iucn citation.  names&lt;br /&gt;
must have the form: Surname, I. (more than one &#039;I.&#039; pair allowed but no spaces between I. pairs)&lt;br /&gt;
&lt;br /&gt;
assumes that parenthetical text at the end of the author-name-list is a collaboration&lt;br /&gt;
	Name, I.I., &amp;amp; Name, I.I. (Colaboration name)&lt;br /&gt;
&lt;br /&gt;
assumes that &amp;lt;i&amp;gt;et al.&amp;lt;/i&amp;gt; is the last name in a list of names&lt;br /&gt;
&lt;br /&gt;
]]&lt;br /&gt;
&lt;br /&gt;
--local function author_names_get (raw_iucn_cite)&lt;br /&gt;
local function author_names_get (raw_iucn_cite, params_t)						-- EXPERIMENT&lt;br /&gt;
	local list = {};															-- table that holds name list parts&lt;br /&gt;
	local author_names = raw_iucn_cite:match (&#039;^([^%d]-)%s+%d%d%d%d&#039;);			-- extract author name-list from raw iucn citation&lt;br /&gt;
	local collaboration = author_names:match (&#039;%s*(%b())$&#039;);					-- get collaboration name if it exists&lt;br /&gt;
&lt;br /&gt;
	if collaboration then														-- when there is a colaboration&lt;br /&gt;
		collaboration = collaboration:gsub (&#039;[%(%)]&#039;, &#039;&#039;);						-- remove bounding parentheses&lt;br /&gt;
		author_names = author_names:gsub (&#039;%s*(%b())$&#039;, &#039;&#039;);					-- and remove collaboration from author-name-list&lt;br /&gt;
	end&lt;br /&gt;
	&lt;br /&gt;
	local names = author_names:gsub (&#039;%.?,?%s+&amp;amp;%s+&#039;, &#039;.|&#039;);						-- replace &#039;separators&#039; (&amp;lt;optional dot&amp;gt;&amp;lt;optional comma&amp;gt;&amp;lt;space&amp;gt;&amp;lt;ampersand&amp;gt;&amp;lt;space&amp;gt;) with &amp;lt;dot&amp;gt;&amp;lt;pipe&amp;gt;&lt;br /&gt;
	names = names:gsub (&#039;%.,%s*&#039;, &#039;.|&#039;);										-- replace &#039;separators&#039; (&amp;lt;dot&amp;gt;&amp;lt;comma&amp;gt;&amp;lt;optional space&amp;gt;) with &amp;lt;dot&amp;gt;&amp;lt;pipe&amp;gt;&lt;br /&gt;
	names = names:gsub (&#039;(%.%u),&#039;, &#039;%1.|&#039;);										-- special case for when last initial is missing its trailing dot&lt;br /&gt;
	list = mw.text.split (names, &#039;|&#039;);											-- split the string on the pipes into entries in list{}&lt;br /&gt;
	&lt;br /&gt;
	if 0 == #list then&lt;br /&gt;
		params_t[&#039;author&#039;] = author_names;										-- EXPERIMENT&lt;br /&gt;
		return table.concat ({&#039;|author=&#039;, author_names}), params_t;				-- EXPERIMENT		-- no &#039;names&#039; of the proper form; return the original as a single |author= parameter&lt;br /&gt;
--		return table.concat ({&#039;|author=&#039;, author_names})						-- no &#039;names&#039; of the proper form; return the original as a single |author= parameter&lt;br /&gt;
	else&lt;br /&gt;
		for i, name in ipairs (list) do											-- spin through the list and &lt;br /&gt;
			if name_has_etal (name) then										-- if this name has some form of &#039;et al&#039;&lt;br /&gt;
				params_t[&#039;display-authors&#039;] = &#039;etal&#039;;							-- EXPERIMENT&lt;br /&gt;
				list[i] = &#039;|display-authors=etal&#039;;								-- add |dispaly-authors=etal parameter and &lt;br /&gt;
				break;															-- assume that the etal was the last &#039;name&#039; so stop processing names&lt;br /&gt;
			else&lt;br /&gt;
				params_t[&#039;author&#039; .. i] = name;									-- EXPERIMENT&lt;br /&gt;
				list[i] = table.concat ({&#039;|author&#039;, (i == 1) and &#039;&#039; or i, &#039;=&#039;, name});	-- add |authorn= parameter names; create |author= instead of |author1=&lt;br /&gt;
			end&lt;br /&gt;
		end&lt;br /&gt;
		if collaboration then&lt;br /&gt;
			params_t[&#039;collaboration&#039;] = collaboration;							-- EXPERIMENT&lt;br /&gt;
			table.insert (list, table.concat ({&#039;|collaboration&#039;, &#039;=&#039;, collaboration}));	-- add |collaboration= parameter&lt;br /&gt;
		end&lt;br /&gt;
		return table.concat (list, &#039; &#039;);										-- make a big string and return that&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
--[[--------------------------&amp;lt; T I T L E _ G E T &amp;gt;------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
extract and format citation title; attempts to get the italic right&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;binomen&#039;&#039; (amended or errata title)&lt;br /&gt;
&#039;&#039;binomen&#039;&#039;&lt;br /&gt;
&#039;&#039;binomen&#039;&#039; ssp. &#039;&#039;subspecies&#039;&#039;&lt;br /&gt;
&#039;&#039;binomen&#039;&#039; subsp. &#039;&#039;subspecies&#039;&#039;&lt;br /&gt;
&#039;&#039;binomen&#039;&#039; var. &#039;&#039;variety&#039;&#039;&lt;br /&gt;
&#039;&#039;binomen&#039;&#039; subvar. &#039;&#039;subvariety&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
all of the above may have trailing amended or errata text in parentheses&lt;br /&gt;
&lt;br /&gt;
TODO: are there others?&lt;br /&gt;
&lt;br /&gt;
]]&lt;br /&gt;
&lt;br /&gt;
local function title_get (raw_iucn_cite)&lt;br /&gt;
	local title = raw_iucn_cite:match (&#039;%d%d%d%d%.%s+(.-)%s*%. The IUCN Red List of Threatened Species&#039;);&lt;br /&gt;
&lt;br /&gt;
	local patterns = {															-- tables of string.match patterns [1] and string.gsub patterns [2]&lt;br /&gt;
		{&#039;(.-)%sssp%.%s+(.-)%s(%b())$&#039;, &amp;quot;&#039;&#039;%1&#039;&#039; ssp. &#039;&#039;%2&#039;&#039; %3&amp;quot;},				-- binomen ssp. subspecies (zoology) with errata or amended text&lt;br /&gt;
		{&#039;(.-)%sssp%.%s+(.+)&#039;, &amp;quot;&#039;&#039;%1&#039;&#039; ssp. &#039;&#039;%2&#039;&#039;&amp;quot;},							-- binomen ssp. subspecies (zoology)&lt;br /&gt;
		{&#039;(.-)%ssubsp%.%s+(.-)%s(%b())$&#039;, &amp;quot;&#039;&#039;%1&#039;&#039; subsp. &#039;&#039;%2&#039;&#039; %3&amp;quot;},			-- binomen subsp. subspecies (botany) with errata or amended text&lt;br /&gt;
		{&#039;(.-)%ssubsp%.%s+(.+)&#039;, &amp;quot;&#039;&#039;%1&#039;&#039; subsp. &#039;&#039;%2&#039;&#039;&amp;quot;},						-- binomen subsp. subspecies (botany)&lt;br /&gt;
		{&#039;(.-)%svar%.%s+(.-)%s+(%b())$&#039;, &amp;quot;&#039;&#039;%1&#039;&#039; var. &#039;&#039;%2&#039;&#039; %3&amp;quot;},				-- binomen var. variety (botany) with errata or amended text&lt;br /&gt;
		{&#039;(.-)%svar%.%s+(.+)&#039;, &amp;quot;&#039;&#039;%1&#039;&#039; var. &#039;&#039;%2&#039;&#039;&amp;quot;},							-- binomen var. variety (botany)&lt;br /&gt;
		{&#039;(.-)%ssubvar%.%s+(.-)%s(%b())$&#039;, &amp;quot;&#039;&#039;%1&#039;&#039; subvar. &#039;&#039;%2&#039;&#039; %3&amp;quot;},			-- binomen subvar. subvariety (botany) with errata or amended text&lt;br /&gt;
		{&#039;(.-)%ssubvar%.%s+(.+)&#039;, &amp;quot;&#039;&#039;%1&#039;&#039; subvar. &#039;&#039;%2&#039;&#039;&amp;quot;},						-- binomen subvar. subvariety (botany)&lt;br /&gt;
		{&#039;(.-)%s*(%b())$&#039;, &amp;quot;&#039;&#039;%1&#039;&#039; %2&amp;quot;},										-- binomen with errata or amended text&lt;br /&gt;
		{&#039;(.+)&#039;, &amp;quot;&#039;&#039;%1&#039;&#039;&amp;quot;},														-- binomen&lt;br /&gt;
		}&lt;br /&gt;
	&lt;br /&gt;
	for i, v in ipairs (patterns) do											-- spin through the patterns&lt;br /&gt;
		if title:match (v[1]) then												-- when a match&lt;br /&gt;
			title = title:gsub (v[1], v[2]);									-- add italics &lt;br /&gt;
			break;																-- and done&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
--	return table.concat ({&#039; |title=&#039;, title});									-- return the |title= parameter&lt;br /&gt;
	return title;																-- return the formatted title&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
--[[--------------------------&amp;lt; M A K E _ C I T E _ I U C N &amp;gt;--------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
parses apart an iucn-format citation copied from their webpage and reformats that into a {{cite iucn}} template for substing&lt;br /&gt;
&lt;br /&gt;
automatic substing by User:AnomieBOT/docs/TemplateSubster&lt;br /&gt;
&lt;br /&gt;
]]&lt;br /&gt;
&lt;br /&gt;
local function make_cite_iucn (frame)&lt;br /&gt;
	local args_t = getArgs (frame);&lt;br /&gt;
	local raw_iucn_cite = args_t[1];&lt;br /&gt;
&lt;br /&gt;
	local template_t = {&#039;{{cite iucn &#039;};										-- sequence that holds the {{cite iucn}} template as it is being assembled; for nowiki&#039;d output&lt;br /&gt;
	local params_t = {};														-- table of parameter/value pairs for substing&lt;br /&gt;
	&lt;br /&gt;
	local year, volume, artnum, doi, accessdate, language;&lt;br /&gt;
&lt;br /&gt;
	year = raw_iucn_cite:match (&#039;^%D+(%d%d%d%d)&#039;);&lt;br /&gt;
	volume, artnum = raw_iucn_cite:match (&#039;(%d%d%d%d):%s+(e%.T%d+A+%d+)%.%s?&#039;);&lt;br /&gt;
	doi = raw_iucn_cite:match (&#039;10%.2305/IUCN%.UK%.[%d%-]+%.RLTS%.T%d+A%d+%.%a%a&#039;);&lt;br /&gt;
	language = raw_iucn_cite:match (&#039;10%.2305/IUCN%.UK%.[%d%-]+%.RLTS%.T%d+A%d+%.(%a%a)&#039;);&lt;br /&gt;
&lt;br /&gt;
	accessdate = raw_iucn_cite:match (&#039;Accessed on (.-)%.?$&#039;) or raw_iucn_cite:match (&#039;Downloaded on (.-)%.?$&#039;);	-- &#039;Downloaded&#039; → &#039;Accessed&#039; change occured December 2021;&lt;br /&gt;
	accessdate = accessdate:gsub (&#039;^0&#039;, &#039;&#039;);									-- strips leading 0 in day 01 January 2020 -&amp;gt; 1 January 2020&lt;br /&gt;
&lt;br /&gt;
	table.insert (template_t, author_names_get (raw_iucn_cite, params_t));		-- add author name parameters; as a single string to &amp;lt;template_t&amp;gt;; as individual entries to &amp;lt;params_t&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	table.insert (template_t, table.concat ({&#039; |year=&#039;, year}));				-- add formatted year&lt;br /&gt;
	params_t.year = year;&lt;br /&gt;
	&lt;br /&gt;
	local title = title_get (raw_iucn_cite);&lt;br /&gt;
	local type_p = title:match (green_status_pattern);&lt;br /&gt;
	if type_p then&lt;br /&gt;
		title = title:match (&#039;^([^%(]+)%s*%(&#039;);&lt;br /&gt;
		table.insert (template_t, table.concat ({&#039; |type=&#039;, type_p}));			-- add formatted errata&lt;br /&gt;
		params_t.type = type_p;&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	local errata = title:match (errata_pattern);								-- nil unless IUCN citation has errata annotation; else year that this errata published (|date=)&lt;br /&gt;
	if errata then&lt;br /&gt;
		table.insert (template_t, table.concat ({&#039; |errata=&#039;, errata}));		-- add formatted errata&lt;br /&gt;
		params_t.errata = errata;&lt;br /&gt;
		title = title:gsub (errata_pattern, &#039;&#039;);								-- remove errata annotation&lt;br /&gt;
	end&lt;br /&gt;
	local amends = title:match (amendment_pattern);								-- nil unless IUCN citation has amendment annotation; else year that this assessment amends (|orig-date=)&lt;br /&gt;
	if amends then&lt;br /&gt;
		table.insert (template_t, table.concat ({&#039; |amends=&#039;, amends}));		-- add year of assessment that this assessment amends&lt;br /&gt;
		params_t.amends = amends;&lt;br /&gt;
		title = title:gsub (amendment_pattern, &#039;&#039;);								-- remove amendment annotation&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	table.insert (template_t, table.concat ({&#039; |title=&#039;, title}));				-- add formatted title&lt;br /&gt;
	params_t.title = title;&lt;br /&gt;
	table.insert (template_t, table.concat ({&#039; |volume=&#039;, volume}));			-- add formatted volume&lt;br /&gt;
	params_t.volume = volume;&lt;br /&gt;
	table.insert (template_t, table.concat ({&#039; |article-number=&#039;, artnum}));	-- add formatted article number&lt;br /&gt;
	params_t[&#039;article-number&#039;] = artnum;&lt;br /&gt;
	table.insert (template_t, table.concat ({&#039; |doi=&#039;, doi}));					-- add formatted doi&lt;br /&gt;
	params_t.doi = doi;&lt;br /&gt;
	table.insert (template_t, table.concat ({&#039; |language=&#039;, language}));		-- add formatted language&lt;br /&gt;
	params_t.language = language;&lt;br /&gt;
&lt;br /&gt;
	table.insert (template_t, table.concat ({&#039; |access-date=&#039;, accessdate}));	-- add formatted access-date&lt;br /&gt;
	params_t[&#039;access-date&#039;] = accessdate;&lt;br /&gt;
&lt;br /&gt;
	table.insert (template_t, &#039;}}&#039;);											-- close the template&lt;br /&gt;
&lt;br /&gt;
	if args_t[2] then															-- if anything in args_t[2], write a nowiki&#039;d version that editors can copy into &amp;lt;ref&amp;gt; tags&lt;br /&gt;
		return frame:preprocess (table.concat ({&#039;&amp;lt;syntaxhighlight lang=&amp;quot;wikitext&amp;quot; inline=&amp;quot;1&amp;quot;&amp;gt;&#039;, table.concat (template_t), &#039;&amp;lt;/syntaxhighlight&amp;gt;&#039;})); -- caveat lector: if left long enough anomiebot will subst this&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	if args_t[&#039;ref&#039;] then														-- enable subst of ref tags with name&lt;br /&gt;
		return frame:preprocess (&#039;&amp;lt;ref name=&#039; .. args_t[&#039;ref&#039;] .. &#039;&amp;gt;&#039; .. table.concat (template_t) .. &#039;&amp;lt;/ref&amp;gt;&#039;)&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	return frame:preprocess (table.concat (template_t));						-- render {{cite iucn}} template; substable&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
--[[--------------------------&amp;lt; E X P O R T E D   F U N C T I O N S &amp;gt;------------------------------------------&lt;br /&gt;
]]&lt;br /&gt;
&lt;br /&gt;
return {&lt;br /&gt;
	cite = cite,																-- wraps {{cite journal}}&lt;br /&gt;
	_cite = _cite,																-- for calling from other modules&lt;br /&gt;
	make_cite_iucn = make_cite_iucn,											-- wraps {{cite IUCN}}&lt;br /&gt;
	}&lt;/div&gt;</summary>
		<author><name>Indicwiki</name></author>
	</entry>
	<entry>
		<id>https://sandbox.indicwiki.org/index.php?title=Template:Taxonomy/Stegocephali&amp;diff=66565</id>
		<title>Template:Taxonomy/Stegocephali</title>
		<link rel="alternate" type="text/html" href="https://sandbox.indicwiki.org/index.php?title=Template:Taxonomy/Stegocephali&amp;diff=66565"/>
		<updated>2026-05-11T08:16:37Z</updated>

		<summary type="html">&lt;p&gt;Indicwiki: 1 revision imported&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;noinclude&amp;gt;{{pp-template|small=yes}}{{High-use}}&lt;br /&gt;
&amp;lt;/noinclude&amp;gt;{{Don&#039;t edit this line {{{machine code|}}}&lt;br /&gt;
|rank=clade&lt;br /&gt;
|link=Stegocephali&lt;br /&gt;
|parent=Elpistostegalia&lt;br /&gt;
|extinct=&lt;br /&gt;
|refs=&amp;lt;!--Shown on this page only; don&#039;t include &amp;lt;ref&amp;gt; tags --&amp;gt;&lt;br /&gt;
}}&lt;/div&gt;</summary>
		<author><name>Indicwiki</name></author>
	</entry>
	<entry>
		<id>https://sandbox.indicwiki.org/index.php?title=Template:Taxonomy/Podiata&amp;diff=66563</id>
		<title>Template:Taxonomy/Podiata</title>
		<link rel="alternate" type="text/html" href="https://sandbox.indicwiki.org/index.php?title=Template:Taxonomy/Podiata&amp;diff=66563"/>
		<updated>2026-05-11T08:16:36Z</updated>

		<summary type="html">&lt;p&gt;Indicwiki: 1 revision imported&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Don&#039;t edit this line {{{machine code|}}}&lt;br /&gt;
|rank=clade&lt;br /&gt;
|link=Podiata&lt;br /&gt;
|parent=Eukaryota&lt;br /&gt;
|refs={{Cite journal |last1=Yazaki |first1=Euki |last2=Shiratori |first2=Takashi |last3=Inagaki |first3=Yuji |date=2025-08-18 |title=Protists with Uncertain Phylogenetic Affiliations for Resolving the Deep Tree of Eukaryotes |journal=Microorganisms |language=en |volume=13 |issue=8 |pages=1926 |doi=10.3390/microorganisms13081926 |issn=2076-2607 |pmc=12388492 |pmid=40871430 |doi-access=free}}&lt;br /&gt;
}}&lt;/div&gt;</summary>
		<author><name>Indicwiki</name></author>
	</entry>
	<entry>
		<id>https://sandbox.indicwiki.org/index.php?title=Template:Taxonomy/Pseudophilautus&amp;diff=66561</id>
		<title>Template:Taxonomy/Pseudophilautus</title>
		<link rel="alternate" type="text/html" href="https://sandbox.indicwiki.org/index.php?title=Template:Taxonomy/Pseudophilautus&amp;diff=66561"/>
		<updated>2026-05-11T08:16:36Z</updated>

		<summary type="html">&lt;p&gt;Indicwiki: 1 revision imported&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Don&#039;t edit this line {{{machine code|}}}&lt;br /&gt;
|rank=genus&lt;br /&gt;
|link=Pseudophilautus&lt;br /&gt;
|parent=Rhacophorinae&lt;br /&gt;
|extinct=&lt;br /&gt;
|refs=&amp;lt;!--Shown on this page only; don&#039;t include &amp;lt;ref&amp;gt; tags --&amp;gt;&lt;br /&gt;
}}&lt;/div&gt;</summary>
		<author><name>Indicwiki</name></author>
	</entry>
	<entry>
		<id>https://sandbox.indicwiki.org/index.php?title=Template:Rhacophoridae-stub&amp;diff=66559</id>
		<title>Template:Rhacophoridae-stub</title>
		<link rel="alternate" type="text/html" href="https://sandbox.indicwiki.org/index.php?title=Template:Rhacophoridae-stub&amp;diff=66559"/>
		<updated>2026-05-11T08:16:36Z</updated>

		<summary type="html">&lt;p&gt;Indicwiki: 1 revision imported&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{asbox&lt;br /&gt;
| image     = Zhangixalus thaoae Holotype.jpg&lt;br /&gt;
| pix       = 40x30&lt;br /&gt;
| subject   = [[Rhacophoridae]] &lt;br /&gt;
| qualifier = &lt;br /&gt;
| category  = Rhacophoridae stubs&lt;br /&gt;
| tempsort  =  &lt;br /&gt;
| name      = Template:Rhacophoridae-stub&lt;br /&gt;
}}&lt;/div&gt;</summary>
		<author><name>Indicwiki</name></author>
	</entry>
	<entry>
		<id>https://sandbox.indicwiki.org/index.php?title=Module:Conservation_status&amp;diff=66557</id>
		<title>Module:Conservation status</title>
		<link rel="alternate" type="text/html" href="https://sandbox.indicwiki.org/index.php?title=Module:Conservation_status&amp;diff=66557"/>
		<updated>2026-05-11T08:16:35Z</updated>

		<summary type="html">&lt;p&gt;Indicwiki: 1 revision imported&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;local p = {}&lt;br /&gt;
&lt;br /&gt;
-- function main() - entry point for template&lt;br /&gt;
function p.main(frame)&lt;br /&gt;
    local system = mw.text.trim(frame:getParent().args[1]) -- needs trim() for unnamed parameters&lt;br /&gt;
	local status = mw.text.trim(frame:getParent().args[2]) &lt;br /&gt;
	local refs = mw.text.trim(frame:getParent().args[3] or &amp;quot;&amp;quot; ) &lt;br /&gt;
    &lt;br /&gt;
    --TODO add handling of extinct parameter&lt;br /&gt;
    &lt;br /&gt;
    return &#039;! colspan = 2 | &amp;lt;div style = &amp;quot;text-align:center;&amp;quot;&amp;gt;[[Conservation status]]&amp;lt;/div&amp;gt;&#039; -- header row&lt;br /&gt;
           .. &#039;\n|-&#039;&lt;br /&gt;
           .. &#039;\n| colspan = 2 | &amp;lt;div style = &amp;quot;text-align:center;&amp;quot;&amp;gt;&#039; &lt;br /&gt;
           .. p._main(frame, system, status, refs) -- status content &lt;br /&gt;
           .. &#039;&amp;lt;/div&amp;gt;&#039;&lt;br /&gt;
        &lt;br /&gt;
           &lt;br /&gt;
end&lt;br /&gt;
-- function status() - entry point for direct invoke testing (assumes table structure and adds cell content)&lt;br /&gt;
function p.status(frame) &lt;br /&gt;
	local system = mw.text.trim(frame.args[1])&lt;br /&gt;
	local status = mw.text.trim(frame.args[2])&lt;br /&gt;
	local refs = mw.text.trim(frame.args[3] or &amp;quot;&amp;quot; )&lt;br /&gt;
	--TODO if system and status then return&lt;br /&gt;
	return p._main(frame, system, status, refs)&lt;br /&gt;
end&lt;br /&gt;
function p._main(frame, system, status, refs)&lt;br /&gt;
    &lt;br /&gt;
    local output = &amp;quot;ERROR&amp;quot;&lt;br /&gt;
    system = string.upper(system)&lt;br /&gt;
    status = string.upper(status)&lt;br /&gt;
    local systemText = &amp;quot;&amp;quot;&lt;br /&gt;
    &lt;br /&gt;
    --TODO check for system; if none give needs handling with long list of possible statuses to match current system&lt;br /&gt;
   &lt;br /&gt;
    if system == &amp;quot;IUCN3.1&amp;quot; or system == &amp;quot;IUCN&amp;quot; then&lt;br /&gt;
       output = p.IUCN31(frame, system, status)&lt;br /&gt;
       systemText = &amp;quot;[[IUCN Red List|IUCN 3.1]]&amp;quot;&lt;br /&gt;
    elseif system == &amp;quot;IUCN2.3&amp;quot; then&lt;br /&gt;
       output = p.IUCN23(frame, system, status)&lt;br /&gt;
       systemText = &amp;quot;[[IUCN Red List|IUCN 2.3]]&amp;quot;&lt;br /&gt;
    elseif system == &amp;quot;CNCFLORA&amp;quot; then&lt;br /&gt;
       --output = p.CNCFlora(frame, system, status)&lt;br /&gt;
       output = p.UsesIUCN31(frame, system, status)    -- uses IUCN3.1 system and criteria (need to block catgories)&lt;br /&gt;
       systemText = &amp;quot;[[CNCFlora]]&amp;quot;&lt;br /&gt;
    elseif system == &amp;quot;TPWCA&amp;quot; then&lt;br /&gt;
       output = p.UsesIUCN31(frame, system, status)    -- uses IUCN3.1 system and criteria (need to block catgories)&lt;br /&gt;
       systemText = &amp;quot;[[NTFlora#TPWCA|TPWCA]]&amp;quot;&lt;br /&gt;
    elseif system == &amp;quot;SANBI&amp;quot; or system == &amp;quot;RLSAP&amp;quot; then&lt;br /&gt;
       output = p.SANBI(frame, system, status)    &lt;br /&gt;
       systemText = &amp;quot;[[Red List of South African Plants|SANBI Red List]]&amp;quot;&lt;br /&gt;
    elseif system == &amp;quot;NATURESERVE&amp;quot; or system == &amp;quot;TNC&amp;quot; then&lt;br /&gt;
       output = p.NatureServe(frame, system, status)&lt;br /&gt;
       systemText = &amp;quot;[[NatureServe conservation status|NatureServe]]&amp;quot;&lt;br /&gt;
    elseif system == &amp;quot;EPBC&amp;quot; then&lt;br /&gt;
       output = p.EPBC(frame, system, status)&lt;br /&gt;
       systemText = &amp;quot;[[Environment Protection and Biodiversity Conservation Act 1999|EPBC Act]]&amp;quot;&lt;br /&gt;
    elseif system == &amp;quot;ESA&amp;quot; then&lt;br /&gt;
       output = p.ESA(frame, system, status)&lt;br /&gt;
       systemText = &amp;quot;[[Endangered Species Act|ESA]]&amp;quot;&lt;br /&gt;
  	elseif system == &amp;quot;COSEWIC&amp;quot; then&lt;br /&gt;
       output = p.COSEWIC(frame, system, status)&lt;br /&gt;
       systemText = &amp;quot;[[Committee on the Status of Endangered Wildlife in Canada|COSEWIC]]&amp;quot;&lt;br /&gt;
 	elseif system == &amp;quot;DECF&amp;quot; then&lt;br /&gt;
       output = p.DECF(frame, system, status)&lt;br /&gt;
       systemText = &amp;quot;[[Declared Rare and Priority Flora List|DEC]]&amp;quot;&lt;br /&gt;
 	elseif system == &amp;quot;NSWBCA&amp;quot; then&lt;br /&gt;
        output = p.NSWBCA(frame, system, status)&lt;br /&gt;
 		systemText = &amp;quot;[[Biodiversity Conservation Act 2016 (NSW)|NSWBCA]]&amp;quot;&lt;br /&gt;
 	elseif system == &amp;quot;QLDNCA&amp;quot; then&lt;br /&gt;
       output = p.QLDNCA(frame, system, status)&lt;br /&gt;
       systemText = &amp;quot;[[Nature Conservation Act 1992|NCA]]&amp;quot;&lt;br /&gt;
 	elseif system == &amp;quot;CITES&amp;quot; then&lt;br /&gt;
       output = p.CITES(frame, system, status)&lt;br /&gt;
       --systemText = &amp;quot;[[CITES]]&amp;quot;&lt;br /&gt;
 	elseif system == &amp;quot;NZTCS&amp;quot; then&lt;br /&gt;
       output = p.NZTCS(frame, system, status)&lt;br /&gt;
       systemText = &amp;quot;[[New Zealand Threat Classification System|NZ TCS]]&amp;quot;&lt;br /&gt;
    elseif system ~= nil then&lt;br /&gt;
       output = p.SystemNotRecognised(frame, system, status)&lt;br /&gt;
       systemText = mw.text.trim(frame.args[1])   -- raw system in parameter (not uppercase as system variable )&lt;br /&gt;
    else -- no system parameter&lt;br /&gt;
    	mw.addWarning (&amp;quot;No conservation system provided&amp;quot;)&lt;br /&gt;
    end&lt;br /&gt;
    if output ~= &amp;quot;ERROR&amp;quot; then&lt;br /&gt;
    	--[=[  template code&lt;br /&gt;
    	       &amp;lt;small&amp;gt;&amp;amp;nbsp;({{#if:{{{status_text|}}}&lt;br /&gt;
    	          |[[{{{status_text|#Conservation status}}}|See text]]   --  links to section in article?&lt;br /&gt;
    	          |[[IUCN Red List|IUCN 3.1]]}}){{{3|}}}&amp;lt;/small&amp;gt;&lt;br /&gt;
        ]=]&lt;br /&gt;
        local statusText = frame:getParent().args[&#039;status_text&#039;]&lt;br /&gt;
        --local systemText = &amp;quot; [[IUCN Red List|IUCN 3.1]]&amp;quot;&lt;br /&gt;
        if statusText then &lt;br /&gt;
           if statusText == &amp;quot;&amp;quot; then statusText = &amp;quot;#Conservation status&amp;quot; end&lt;br /&gt;
    	   systemText = &amp;quot;[[&amp;quot; .. statusText .. &amp;quot;|See text]]&amp;quot;&lt;br /&gt;
        end&lt;br /&gt;
        if systemText ~= &amp;quot;&amp;quot; then&lt;br /&gt;
        	output = output ..  &amp;quot;&amp;lt;small&amp;gt;&amp;amp;nbsp;(&amp;quot; .. systemText .. &amp;quot;)&amp;quot; .. refs .. &amp;quot;&amp;lt;/small&amp;gt;&amp;quot; -- &amp;quot;&amp;lt;/div&amp;gt;&amp;quot;&lt;br /&gt;
        else&lt;br /&gt;
        	output = output ..  &amp;quot;&amp;lt;small&amp;gt;&amp;amp;#8239;&amp;quot; .. refs .. &amp;quot;&amp;lt;/small&amp;gt;&amp;quot; -- &amp;quot;&amp;lt;/div&amp;gt;&amp;quot;&lt;br /&gt;
        end&lt;br /&gt;
 &lt;br /&gt;
        return output&lt;br /&gt;
    end&lt;br /&gt;
end&lt;br /&gt;
--[[ OTHER SYSTEMS&lt;br /&gt;
        Territory Parks and Wildlife Conservation Act 2000 (TPWCA)&lt;br /&gt;
&lt;br /&gt;
]]&lt;br /&gt;
&lt;br /&gt;
function  p.SystemNotRecognised(frame, system, status)&lt;br /&gt;
	local output = system .. &#039; &#039; .. status&lt;br /&gt;
   if status == &amp;quot;EX&amp;quot; then&lt;br /&gt;
    	local extinct = &amp;quot;[[Extinction|Extinct]]&amp;quot;&lt;br /&gt;
    	if frame:getParent().args[&#039;extinction_date&#039;] and frame:getParent().args[&#039;extinction_date&#039;] ~= &amp;quot;&amp;quot; then &lt;br /&gt;
    		extinct = extinct .. &amp;quot;&amp;amp;nbsp;(&amp;quot; .. frame:getParent().args[&#039;extinction_date&#039;] .. &amp;quot;)&amp;quot; &lt;br /&gt;
    	end&lt;br /&gt;
    	output = p.addImage(&amp;quot;Status iucn3.1 EX.svg&amp;quot;, &#039;Extinct&#039;) .. extinct &lt;br /&gt;
    elseif status == &amp;quot;CR&amp;quot; then&lt;br /&gt;
    	output = &amp;quot;[[Critically endangered species|Critically Endangered]]&amp;quot; &lt;br /&gt;
    elseif status == &amp;quot;EN&amp;quot; then	&lt;br /&gt;
    	output = &amp;quot;[[Endangered species|Endangered]]&amp;quot; &lt;br /&gt;
    elseif status == &amp;quot;NT&amp;quot; then	&lt;br /&gt;
    	output = &amp;quot;[[Near Threatened]]&amp;quot; &lt;br /&gt;
    else&lt;br /&gt;
    	output = status&lt;br /&gt;
    end&lt;br /&gt;
	return output .. p.addCategory(&amp;quot;Taxoboxes with an unrecognised status system&amp;quot;)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
--***************************************** IUCN 3.1 **********************************&lt;br /&gt;
function p.IUCN31(frame, system, status)&lt;br /&gt;
	&lt;br /&gt;
    local output = system .. &#039; &#039; .. status&lt;br /&gt;
    if status == &amp;quot;EX&amp;quot; then&lt;br /&gt;
    	local extinct = &amp;quot;[[Extinction|Extinct]]&amp;quot;&lt;br /&gt;
    	if frame:getParent().args[&#039;extinction_date&#039;] and frame:getParent().args[&#039;extinction_date&#039;] ~= &amp;quot;&amp;quot; then &lt;br /&gt;
    		extinct = extinct .. &amp;quot;&amp;amp;nbsp;(&amp;quot; .. frame:getParent().args[&#039;extinction_date&#039;] .. &amp;quot;)&amp;quot; end&lt;br /&gt;
    	output = p.addImage(&amp;quot;Status iucn3.1 EX.svg&amp;quot;, &#039;Extinct&#039;) .. extinct .. p.addCategory(&amp;quot;IUCN Red List extinct species&amp;quot;)&lt;br /&gt;
    elseif status == &amp;quot;EW&amp;quot; then&lt;br /&gt;
    	output = p.addImage(&amp;quot;Status iucn3.1 EW.svg&amp;quot;, &#039;Extinct in the Wild&#039;) .. &amp;quot;[[Extinct in the Wild]]&amp;quot; .. p.addCategory(&amp;quot;IUCN Red List extinct in the wild species&amp;quot;)&lt;br /&gt;
    elseif status == &amp;quot;CR&amp;quot; then&lt;br /&gt;
    	output = p.addImage(&amp;quot;Status iucn3.1 CR.svg&amp;quot;, &#039;Critically Endangered&#039;) .. &amp;quot;[[Critically endangered species|Critically Endangered]]&amp;quot; .. p.addCategory(&amp;quot;IUCN Red List critically endangered species&amp;quot;)&lt;br /&gt;
    elseif status == &amp;quot;EN&amp;quot; then&lt;br /&gt;
    	output = p.addImage(&amp;quot;Status iucn3.1 EN.svg&amp;quot;, &#039;Endangered&#039;) .. &amp;quot;[[Endangered species (IUCN status)|Endangered]]&amp;quot; .. p.addCategory(&amp;quot;IUCN Red List endangered species&amp;quot;)&lt;br /&gt;
    elseif status == &amp;quot;VU&amp;quot; then&lt;br /&gt;
    	output = p.addImage(&amp;quot;Status iucn3.1 VU.svg&amp;quot;, &#039;Vulnerable&#039;) .. &amp;quot;[[Vulnerable species|Vulnerable]]&amp;quot; .. p.addCategory(&amp;quot;IUCN Red List vulnerable species&amp;quot;)&lt;br /&gt;
    elseif status == &amp;quot;NT&amp;quot; then&lt;br /&gt;
    	output = p.addImage(&amp;quot;Status iucn3.1 NT.svg&amp;quot;, &#039;Near Threatened&#039;) .. &amp;quot;[[Near Threatened]]&amp;quot; .. p.addCategory(&amp;quot;IUCN Red List near threatened species&amp;quot;)&lt;br /&gt;
    elseif status == &amp;quot;LC&amp;quot; then&lt;br /&gt;
    	output = p.addImage(&amp;quot;Status iucn3.1 LC.svg&amp;quot;, &#039;Least Concern&#039;) .. &amp;quot;[[Least Concern]]&amp;quot; .. p.addCategory(&amp;quot;IUCN Red List least concern species&amp;quot;)&lt;br /&gt;
    elseif status == &amp;quot;DD&amp;quot; then&lt;br /&gt;
    	output = p.addImage(&amp;quot;Status iucn3.1 blank.svg&amp;quot;, &#039;Data Deficient&#039;) .. &amp;quot;[[Data deficient|Data Deficient]]&amp;quot; .. p.addCategory(&amp;quot;IUCN Red List data deficient species&amp;quot;)&lt;br /&gt;
    elseif status == &amp;quot;NE&amp;quot; then&lt;br /&gt;
    	output = &amp;quot;[[Not evaluated]]&amp;quot; &lt;br /&gt;
    elseif status == &amp;quot;NR&amp;quot; then&lt;br /&gt;
    	output =  &amp;quot;&#039;&#039;Not recognized&#039;&#039;&amp;quot; &lt;br /&gt;
    elseif status == &amp;quot;NA&amp;quot; then            -- only used in regional assessments?&lt;br /&gt;
    	output =  &amp;quot;&#039;&#039;Not applicable&#039;&#039;&amp;quot; &lt;br /&gt;
    elseif status == &amp;quot;PE&amp;quot; then&lt;br /&gt;
    	output = p.addImage(&amp;quot;Status iucn3.1 CR.svg&amp;quot;, &#039;Critically endangered&#039;) .. &amp;quot;[[Critically endangered]], possibly extinct&amp;quot; .. p.addCategory(&amp;quot;IUCN Red List critically endangered species&amp;quot;)&lt;br /&gt;
    elseif status == &amp;quot;PEW&amp;quot; then&lt;br /&gt;
    	output = p.addImage(&amp;quot;Status iucn3.1 CR.svg&amp;quot;, &#039;Critically endangered&#039;) .. &amp;quot;[[Critically endangered]], possibly extinct in the wild&amp;quot; .. p.addCategory(&amp;quot;IUCN Red List critically endangered species&amp;quot;)&lt;br /&gt;
    else &lt;br /&gt;
    	-- | &#039;&#039;&#039;&#039;&#039;Invalid status&#039;&#039;&#039;&#039;&#039;{{#ifeq: {{NAMESPACEE}} | {{ns: 0}} | [[Category:Invalid conservation status]]|}}&lt;br /&gt;
    	output = &amp;quot;&#039;&#039;&#039;&#039;&#039;Invalid status&#039;&#039;&#039;&#039;&#039;&amp;quot; .. p.addCategory(&amp;quot;Invalid conservation status&amp;quot;)&lt;br /&gt;
    end  &lt;br /&gt;
 &lt;br /&gt;
 -- | &#039;&#039;&#039;&#039;&#039;Invalid status&#039;&#039;&#039;&#039;&#039;{{#ifeq: {{NAMESPACEE}} | {{ns: 0}} | [[Category:Invalid conservation status]]|}}&lt;br /&gt;
 --}}&amp;lt;small&amp;gt;&amp;amp;nbsp;({{#if:{{{status_text|}}}|[[{{{status_text|#Conservation status}}}|See text]]|[[IUCN Red List|IUCN 3.1]]}}){{{3|}}}&amp;lt;/small&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;!--&lt;br /&gt;
   &lt;br /&gt;
 --   local thirdParam = &amp;quot;&amp;quot; --mw.text.trim(frame:getParent().args[3] or &amp;quot;&amp;quot;)&lt;br /&gt;
 --   local statusText = frame:getParent().args[&#039;status_text&#039;]&lt;br /&gt;
  --  local systemText = &amp;quot; [[IUCN Red List|IUCN 3.1]]&amp;quot;&lt;br /&gt;
 --   if statusText then &lt;br /&gt;
 --   	systemText = &amp;quot;[[{{{status_text|#Conservation status}}}|See text]]&amp;quot;&lt;br /&gt;
 --   end&lt;br /&gt;
 --   output = output ..  &amp;quot;&amp;lt;small&amp;gt;&amp;amp;nbsp;(&amp;quot; .. systemText .. thirdParam .. &amp;quot;)&amp;lt;/small&amp;gt;&amp;lt;/div&amp;gt;&amp;quot;&lt;br /&gt;
    return output &lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
-- ********************************* IUCN 2.3 **********************************************&lt;br /&gt;
function p.IUCN23(frame, system, status)&lt;br /&gt;
	&lt;br /&gt;
    local output = system .. &#039; &#039; .. status&lt;br /&gt;
    if status == &amp;quot;EX&amp;quot; then&lt;br /&gt;
    	local extinct = &amp;quot;[[Extinction|Extinct]]&amp;quot;&lt;br /&gt;
    	local extinctionDate = frame:getParent().args[&#039;extinction_date&#039;] or &amp;quot;&amp;quot;&lt;br /&gt;
    	if extinctionDate ~= &amp;quot;&amp;quot; then extinct = extinct .. &amp;quot;&amp;amp;nbsp;(&amp;quot; .. frame:getParent().args[&#039;extinction_date&#039;] .. &amp;quot;)&amp;quot; end&lt;br /&gt;
    	output = p.addImage(&amp;quot;Status iucn2.3 EX.svg&amp;quot;, &#039;Extinct&#039;) .. extinct .. p.addCategory(&amp;quot;IUCN Red List extinct species&amp;quot;)&lt;br /&gt;
    elseif status == &amp;quot;EW&amp;quot; then&lt;br /&gt;
    	output = p.addImage(&amp;quot;Status iucn2.3 EW.svg&amp;quot;, &#039;Extinct in the Wild&#039;) .. &amp;quot;[[Extinct in the Wild]]&amp;quot; .. p.addCategory(&amp;quot;IUCN Red List extinct in the wild species&amp;quot;)&lt;br /&gt;
    elseif status == &amp;quot;CR&amp;quot; then&lt;br /&gt;
    	output = p.addImage(&amp;quot;Status iucn2.3 CR.svg&amp;quot;, &#039;Critically Endangered&#039;) .. &amp;quot;[[Critically endangered species|Critically Endangered]]&amp;quot; .. p.addCategory(&amp;quot;IUCN Red List critically endangered species&amp;quot;)&lt;br /&gt;
    elseif status == &amp;quot;EN&amp;quot; then&lt;br /&gt;
    	output = p.addImage(&amp;quot;Status iucn2.3 EN.svg&amp;quot;, &#039;Endangered&#039;) .. &amp;quot;[[Endangered species (IUCN status)|Endangered]]&amp;quot; .. p.addCategory(&amp;quot;IUCN Red List endangered species&amp;quot;)&lt;br /&gt;
    elseif status == &amp;quot;VU&amp;quot; then&lt;br /&gt;
    	output = p.addImage(&amp;quot;Status iucn2.3 VU.svg&amp;quot;, &#039;Vulnerable&#039;) .. &amp;quot;[[Vulnerable species|Vulnerable]]&amp;quot; .. p.addCategory(&amp;quot;IUCN Red List vulnerable species&amp;quot;)&lt;br /&gt;
    elseif status == &amp;quot;LR&amp;quot; then&lt;br /&gt;
    	output = p.addImage(&amp;quot;Status iucn2.3 blank.svg&amp;quot;, &#039;Lower risk&#039;) .. &amp;quot;Lower risk&amp;quot; .. p.addCategory(&amp;quot;Invalid conservation status&amp;quot;)&lt;br /&gt;
    elseif status == &amp;quot;CD&amp;quot; or status == &amp;quot;LR/CD&amp;quot; then&lt;br /&gt;
        output = p.addImage(&amp;quot;Status iucn2.3 CD.svg&amp;quot;, &#039;Conservation Dependent&#039;) .. &amp;quot;[[Conservation Dependent]]&amp;quot; .. p.addCategory(&amp;quot;IUCN Red List conservation dependent species&amp;quot;)&lt;br /&gt;
    elseif status == &amp;quot;NT&amp;quot; or status == &amp;quot;LR/NT&amp;quot; then&lt;br /&gt;
    	output = p.addImage(&amp;quot;Status iucn2.3 NT.svg&amp;quot;, &#039;Near Threatened&#039;) .. &amp;quot;[[Near Threatened]]&amp;quot; .. p.addCategory(&amp;quot;IUCN Red List near threatened species&amp;quot;)&lt;br /&gt;
    elseif status == &amp;quot;LC&amp;quot; or status == &amp;quot;LR/LC&amp;quot; then&lt;br /&gt;
    	output = p.addImage(&amp;quot;Status iucn2.3 LC.svg&amp;quot;, &#039;Least Concern&#039;) .. &amp;quot;[[Least Concern]]&amp;quot; .. p.addCategory(&amp;quot;IUCN Red List least concern species&amp;quot;)&lt;br /&gt;
    elseif status == &amp;quot;DD&amp;quot; then&lt;br /&gt;
    	output = p.addImage(&amp;quot;Status iucn2.3 blank.svg&amp;quot;, &#039;Data Deficient&#039;) .. &amp;quot;[[Data deficient|Data Deficient]]&amp;quot; .. p.addCategory(&amp;quot;IUCN Red List data deficient species&amp;quot;)&lt;br /&gt;
    elseif status == &amp;quot;NE&amp;quot; then&lt;br /&gt;
    	output = &amp;quot;[[Not evaluated]]&amp;quot; &lt;br /&gt;
    elseif status == &amp;quot;NR&amp;quot; then&lt;br /&gt;
    	output =  &amp;quot;&#039;&#039;Not recognized&#039;&#039;&amp;quot; &lt;br /&gt;
    elseif status == &amp;quot;PE&amp;quot; then&lt;br /&gt;
    	output = p.addImage(&amp;quot;Status iucn2.3 CR.svg&amp;quot;, &#039;Critically endangered&#039;) .. &amp;quot;[[Critically endangered]], possibly extinct&amp;quot; .. p.addCategory(&amp;quot;IUCN Red List critically endangered species&amp;quot;)&lt;br /&gt;
    elseif status == &amp;quot;PEW&amp;quot; then&lt;br /&gt;
    	output = p.addImage(&amp;quot;Status iucn2.3 CR.svg&amp;quot;, &#039;Critically endangered&#039;) .. &amp;quot;[[Critically endangered]], possibly extinct in the wild&amp;quot; .. p.addCategory(&amp;quot;IUCN Red List critically endangered species&amp;quot;)&lt;br /&gt;
    else     	-- | &#039;&#039;&#039;&#039;&#039;Invalid status&#039;&#039;&#039;&#039;&#039;{{#ifeq: {{NAMESPACEE}} | {{ns: 0}} | [[Category:Invalid conservation status]]|}}&lt;br /&gt;
    	output = &amp;quot;&#039;&#039;&#039;&#039;&#039;Invalid status&#039;&#039;&#039;&#039;&#039;&amp;quot; .. p.addCategory(&amp;quot;Invalid conservation status&amp;quot;)&lt;br /&gt;
    end  &lt;br /&gt;
 &lt;br /&gt;
    return output &lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
--******************************************* CNCFlora***************************************&lt;br /&gt;
&lt;br /&gt;
-- Note: this is not needed if using IUCN 3.1 system and criteria; just use that function with no catgories&lt;br /&gt;
-- alternatively rename this function as p.UsesIUCN31()&lt;br /&gt;
--function p.CNCFlora(frame, system, status)&lt;br /&gt;
function p.UsesIUCN31(frame, system, status)&lt;br /&gt;
	&lt;br /&gt;
&lt;br /&gt;
    local output = system .. &#039; &#039; .. status&lt;br /&gt;
    if status == &amp;quot;EX&amp;quot; then&lt;br /&gt;
    	output = p.addImage(&amp;quot;Status iucn3.1 EX.svg&amp;quot;, &#039;Extinct&#039;) .. &amp;quot;[[Extinction|Extinct]]&amp;quot; --.. p.addCategory(&amp;quot;IUCN Red List extinct species&amp;quot;)&lt;br /&gt;
    elseif status == &amp;quot;EW&amp;quot; then&lt;br /&gt;
    	output = p.addImage(&amp;quot;Status iucn3.1 EW.svg&amp;quot;, &#039;Extinct in the Wild&#039;) .. &amp;quot;[[Extinct in the Wild]]&amp;quot; --.. p.addCategory(&amp;quot;IUCN Red List extinct in the wild species&amp;quot;)&lt;br /&gt;
    elseif status == &amp;quot;CR&amp;quot; then&lt;br /&gt;
    	output = p.addImage(&amp;quot;Status iucn3.1 CR.svg&amp;quot;, &#039;Critically Endangered&#039;) .. &amp;quot;[[Critically endangered species|Critically Endangered]]&amp;quot; --.. p.addCategory(&amp;quot;IUCN Red List critically endangered species&amp;quot;)&lt;br /&gt;
    elseif status == &amp;quot;EN&amp;quot; then&lt;br /&gt;
    	output = p.addImage(&amp;quot;Status iucn3.1 EN.svg&amp;quot;, &#039;Endangered&#039;) .. &amp;quot;[[Endangered species|Endangered]]&amp;quot; --.. p.addCategory(&amp;quot;IUCN Red List endangered species&amp;quot;)&lt;br /&gt;
    elseif status == &amp;quot;VU&amp;quot; then&lt;br /&gt;
    	output = p.addImage(&amp;quot;Status iucn3.1 VU.svg&amp;quot;, &#039;Vulnerable&#039;) .. &amp;quot;[[Vulnerable species|Vulnerable]]&amp;quot; --.. p.addCategory(&amp;quot;IUCN Red List vulnerable species&amp;quot;)&lt;br /&gt;
    elseif status == &amp;quot;NT&amp;quot; then&lt;br /&gt;
    	output = p.addImage(&amp;quot;Status iucn3.1 NT.svg&amp;quot;, &#039;Near Threatened&#039;) .. &amp;quot;[[Near Threatened]]&amp;quot; --.. p.addCategory(&amp;quot;IUCN Red List near threatened species&amp;quot;)&lt;br /&gt;
    elseif status == &amp;quot;LC&amp;quot; then&lt;br /&gt;
    	output = p.addImage(&amp;quot;Status iucn3.1 LC.svg&amp;quot;, &#039;Least Concern&#039;) .. &amp;quot;[[Least Concern]]&amp;quot; --.. p.addCategory(&amp;quot;IUCN Red List least concern species&amp;quot;)&lt;br /&gt;
    elseif status == &amp;quot;DD&amp;quot; then&lt;br /&gt;
    	output = p.addImage(&amp;quot;Status iucn3.1 blank.svg&amp;quot;, &#039;Data Deficient&#039;) .. &amp;quot;[[Data deficient|Data Deficient]]&amp;quot; --.. p.addCategory(&amp;quot;IUCN Red List data deficient species&amp;quot;)&lt;br /&gt;
    elseif status == &amp;quot;NE&amp;quot; then&lt;br /&gt;
    	output = &amp;quot;&#039;&#039;Not evaluated&#039;&#039;&amp;quot; &lt;br /&gt;
    elseif status == &amp;quot;NR&amp;quot; then&lt;br /&gt;
    	output =  &amp;quot;&#039;&#039;Not recognized&#039;&#039;&amp;quot; &lt;br /&gt;
    elseif status == &amp;quot;PE&amp;quot; then&lt;br /&gt;
    	output = p.addImage(&amp;quot;Status iucn3.1 CR.svg&amp;quot;, &#039;Critically endangered&#039;) .. &amp;quot;[[Critically endangered]], possibly extinct&amp;quot; --.. p.addCategory(&amp;quot;IUCN Red List critically endangered species&amp;quot;)&lt;br /&gt;
    elseif status == &amp;quot;PEW&amp;quot; then&lt;br /&gt;
    	output = p.addImage(&amp;quot;Status iucn3.1 CR.svg&amp;quot;, &#039;Critically endangered&#039;) .. &amp;quot;[[Critically endangered]], possibly extinct in the wild&amp;quot; --.. p.addCategory(&amp;quot;IUCN Red List critically endangered species&amp;quot;)&lt;br /&gt;
    else &lt;br /&gt;
    	output = &amp;quot;&#039;&#039;&#039;&#039;&#039;Invalid status&#039;&#039;&#039;&#039;&#039;&amp;quot; .. p.addCategory(&amp;quot;Invalid conservation status&amp;quot;)&lt;br /&gt;
    end  &lt;br /&gt;
 &lt;br /&gt;
   return output &lt;br /&gt;
end&lt;br /&gt;
-- *************** Natureserve/TNC ********************************&lt;br /&gt;
function p.NatureServe(frame, system, status)&lt;br /&gt;
&lt;br /&gt;
   local output = system .. &#039; &#039; .. status&lt;br /&gt;
   if status == &amp;quot;GX&amp;quot; then&lt;br /&gt;
    	local extinct = &amp;quot;Presumed [[Extinction|Extinct]]&amp;quot;&lt;br /&gt;
    	if frame:getParent().args[&#039;extinction_date&#039;] and frame:getParent().args[&#039;extinction_date&#039;] ~= &amp;quot;&amp;quot; then extinct = extinct.. &amp;quot;&amp;amp;nbsp;(&amp;quot; .. frame:getParent().args[&#039;extinction_date&#039;] .. &amp;quot;)&amp;quot; end&lt;br /&gt;
    	output = p.addImage(&amp;quot;Status TNC GX.svg&amp;quot;, &#039;Extinct&#039;) .. extinct .. p.addCategory(&amp;quot;NatureServe presumed extinct species&amp;quot;)&lt;br /&gt;
   elseif status == &amp;quot;GH&amp;quot; then&lt;br /&gt;
    	output = p.addImage(&amp;quot;Status TNC GH.svg&amp;quot;, &#039;Possibly Extinct&#039;) .. &amp;quot;Possibly [[Extinction|Extinct]]&amp;quot; .. p.addCategory(&amp;quot;NatureServe possibly extinct species&amp;quot;)&lt;br /&gt;
   elseif status == &amp;quot;G1&amp;quot; then&lt;br /&gt;
    	output = p.addImage(&amp;quot;Status TNC G1.svg&amp;quot;, &#039;Critically Imperiled&#039;) .. &amp;quot;Critically Imperiled&amp;quot; .. p.addCategory(&amp;quot;NatureServe critically imperiled species&amp;quot;)&lt;br /&gt;
   elseif status == &amp;quot;G2&amp;quot; then&lt;br /&gt;
    	output = p.addImage(&amp;quot;Status TNC G2.svg&amp;quot;, &#039;Imperiled&#039;) .. &amp;quot;Imperiled&amp;quot; .. p.addCategory(&amp;quot;NatureServe imperiled species&amp;quot;)&lt;br /&gt;
   elseif status == &amp;quot;G3&amp;quot; then&lt;br /&gt;
    	output = p.addImage(&amp;quot;Status TNC G3.svg&amp;quot;, &#039;Vulnerable&#039;) .. &amp;quot;Vulnerable&amp;quot; .. p.addCategory(&amp;quot;NatureServe vulnerable species&amp;quot;)&lt;br /&gt;
   elseif status == &amp;quot;G4&amp;quot; then&lt;br /&gt;
    	output = p.addImage(&amp;quot;Status TNC G4.svg&amp;quot;, &#039;Apparently Secure&#039;) .. &amp;quot;Apparently Secure&amp;quot; .. p.addCategory(&amp;quot;NatureServe apparently secure species&amp;quot;)&lt;br /&gt;
   elseif status == &amp;quot;G5&amp;quot; then&lt;br /&gt;
    	output = p.addImage(&amp;quot;Status TNC G5.svg&amp;quot;, &#039;Secure&#039;) .. &amp;quot;Secure&amp;quot; .. p.addCategory(&amp;quot;NatureServe secure species&amp;quot;)&lt;br /&gt;
   elseif status == &amp;quot;GU&amp;quot; then&lt;br /&gt;
    	output = p.addImage(&amp;quot;Status TNC blank.svg&amp;quot;, &#039;Unrankable&#039;) .. &amp;quot;Unrankable&amp;quot;&lt;br /&gt;
   elseif status == &amp;quot;GNR&amp;quot; then&lt;br /&gt;
    	output = p.addImage(&amp;quot;Status TNC blank.svg&amp;quot;, &#039;Unranked&#039;) .. &amp;quot;Unranked&amp;quot;&lt;br /&gt;
   elseif status == &amp;quot;TX&amp;quot; then&lt;br /&gt;
    	local extinct = &amp;quot;Presumed [[Extinction|Extinct]]&amp;quot;&lt;br /&gt;
    	if frame:getParent().args[&#039;extinct&#039;] then extinct = &amp;quot;&amp;amp;nbsp;(&amp;quot; .. frame:getParent().args[&#039;extinct&#039;] .. &amp;quot;)&amp;quot; end&lt;br /&gt;
    	output = p.addImage(&amp;quot;Status TNC TX.svg&amp;quot;, &#039;Extinct&#039;) .. extinct .. p.addCategory(&amp;quot;NatureServe presumed extinct species&amp;quot;)&lt;br /&gt;
   elseif status == &amp;quot;TH&amp;quot; then&lt;br /&gt;
    	output = p.addImage(&amp;quot;Status TNC TH.svg&amp;quot;, &#039;Possibly Extinct&#039;) .. &amp;quot;Possibly [[Extinction|Extinct]]&amp;quot; .. p.addCategory(&amp;quot;NatureServe possibly extinct species&amp;quot;)&lt;br /&gt;
   elseif status == &amp;quot;T1&amp;quot; then&lt;br /&gt;
    	output = p.addImage(&amp;quot;Status TNC T1.svg&amp;quot;, &#039;Critically Imperiled&#039;) .. &amp;quot;Critically Imperiled&amp;quot; .. p.addCategory(&amp;quot;NatureServe critically imperiled species&amp;quot;)&lt;br /&gt;
   elseif status == &amp;quot;T2&amp;quot; then&lt;br /&gt;
    	output = p.addImage(&amp;quot;Status TNC T2.svg&amp;quot;, &#039;Imperiled&#039;) .. &amp;quot;Imperiled&amp;quot; .. p.addCategory(&amp;quot;NatureServe imperiled species&amp;quot;)&lt;br /&gt;
   elseif status == &amp;quot;T3&amp;quot; then&lt;br /&gt;
    	output = p.addImage(&amp;quot;Status TNC T3.svg&amp;quot;, &#039;Vulnerable&#039;) .. &amp;quot;Vulnerable&amp;quot; .. p.addCategory(&amp;quot;NatureServe vulnerable species&amp;quot;)&lt;br /&gt;
   elseif status == &amp;quot;T4&amp;quot; then&lt;br /&gt;
    	output = p.addImage(&amp;quot;Status TNC T4.svg&amp;quot;, &#039;Apparently Secure&#039;) .. &amp;quot;Apparently Secure&amp;quot; .. p.addCategory(&amp;quot;NatureServe apparently secure species&amp;quot;)&lt;br /&gt;
   elseif status == &amp;quot;T5&amp;quot; then&lt;br /&gt;
    	output = p.addImage(&amp;quot;Status TNC T5.svg&amp;quot;, &#039;Secure&#039;) .. &amp;quot;Secure&amp;quot; .. p.addCategory(&amp;quot;NatureServe secure species&amp;quot;)&lt;br /&gt;
   elseif status == &amp;quot;TU&amp;quot; then&lt;br /&gt;
    	output = p.addImage(&amp;quot;Status TNC blank.svg&amp;quot;, &#039;Unrankable&#039;) .. &amp;quot;Unrankable&amp;quot;&lt;br /&gt;
   else &lt;br /&gt;
    	output = &amp;quot;&#039;&#039;&#039;&#039;&#039;Invalid status&#039;&#039;&#039;&#039;&#039;&amp;quot; .. p.addCategory(&amp;quot;Invalid conservation status&amp;quot;)&lt;br /&gt;
   end  &lt;br /&gt;
   return output &lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
-- ********* EPBC: Environment Protection and Biodiversity Conservation Act 1999 (Australia) ************&lt;br /&gt;
function p.SANBI(frame, system, status)&lt;br /&gt;
&lt;br /&gt;
   local output = system .. &#039; &#039; .. status&lt;br /&gt;
   if status == &amp;quot;EX&amp;quot; then&lt;br /&gt;
    	local extinct = &amp;quot;[[Extinction|Extinct]]&amp;quot;&lt;br /&gt;
    	if frame:getParent().args[&#039;extinct&#039;] then extinct = &amp;quot;&amp;amp;nbsp;(&amp;quot; .. frame:getParent().args[&#039;extinct&#039;] .. &amp;quot;)&amp;quot; end&lt;br /&gt;
    	output = p.addImage(&amp;quot;Status SANBI EX.svg&amp;quot;, &#039;Extinct&#039;) .. extinct --.. p.addCategory(&amp;quot;SANBI Red List extinct biota&amp;quot;)&lt;br /&gt;
   elseif status == &amp;quot;EW&amp;quot; then&lt;br /&gt;
    	output = p.addImage(&amp;quot;Status SANBI EW.svg&amp;quot;, &#039;Extinct in the Wild&#039;) .. &amp;quot;[[Extinct in the Wild]]&amp;quot; --.. p.addCategory(&amp;quot;SANBI Red List extinct in the wild biota&amp;quot;)&lt;br /&gt;
   elseif status == &amp;quot;RE&amp;quot; then&lt;br /&gt;
    	output = p.addImage(&amp;quot;Status SANBI RE.svg&amp;quot;, &#039;Regionally Extinct&#039;) .. &amp;quot;Regionally Extinct&amp;quot; --.. p.addCategory(&amp;quot;SANBI Red List regionally extinct biota&amp;quot;)&lt;br /&gt;
   elseif status == &amp;quot;CR&amp;quot; then&lt;br /&gt;
    	output = p.addImage(&amp;quot;Status SANBI CR.svg&amp;quot;, &#039;Critically endangered&#039;) .. &amp;quot;[[Critically endangered species|Critically endangered]]&amp;quot; --.. p.addCategory(&amp;quot;SANBI Red List critically endangered biota&amp;quot;)&lt;br /&gt;
   elseif status == &amp;quot;EN&amp;quot; then&lt;br /&gt;
    	output = p.addImage(&amp;quot;Status SANBI EN.svg&amp;quot;, &#039;Endangered&#039;) .. &amp;quot;[[Endangered species|Endangered]]&amp;quot; --.. p.addCategory(&amp;quot;SANBI Red List endangered biota&amp;quot;)&lt;br /&gt;
   elseif status == &amp;quot;VU&amp;quot; then&lt;br /&gt;
    	output = p.addImage(&amp;quot;Status SANBI VU.svg&amp;quot;, &#039;Vulnerable&#039;) .. &amp;quot;[[Vulnerable species|Vulnerable]]&amp;quot; --.. p.addCategory(&amp;quot;SANBI Red List vulnerable biota&amp;quot;)&lt;br /&gt;
   elseif status == &amp;quot;NT&amp;quot;  then&lt;br /&gt;
    	output = p.addImage(&amp;quot;Status SANBI NT.svg&amp;quot;, &#039;Near Threatened&#039;) .. &amp;quot;[[Near Threatened]]&amp;quot; --.. p.addCategory(&amp;quot;SANBI Red List near threatened biota&amp;quot;)&lt;br /&gt;
   elseif status == &amp;quot;LC&amp;quot; then&lt;br /&gt;
    	output = p.addImage(&amp;quot;Status SANBI LC.svg&amp;quot;, &#039;Least Concern&#039;) .. &amp;quot;[[Least Concern]]&amp;quot; --.. p.addCategory(&amp;quot;SANBI Red List least concern biota&amp;quot;)&lt;br /&gt;
   elseif status == &amp;quot;RA&amp;quot; then&lt;br /&gt;
    	output = p.addImage(&amp;quot;Status SANBI Ra.svg&amp;quot;, &#039;Rare&#039;) .. &amp;quot;Rare&amp;quot; --  p.addCategory(&amp;quot;SANBI Red List rare biota&amp;quot;)&lt;br /&gt;
   else &lt;br /&gt;
    	output = &amp;quot;&#039;&#039;&#039;&#039;&#039;Invalid status&#039;&#039;&#039;&#039;&#039;&amp;quot; .. p.addCategory(&amp;quot;Invalid conservation status&amp;quot;)&lt;br /&gt;
   end  &lt;br /&gt;
  &lt;br /&gt;
   return output &lt;br /&gt;
end&lt;br /&gt;
function p.EPBC(frame, system, status)&lt;br /&gt;
&lt;br /&gt;
   local output = system .. &#039; &#039; .. status&lt;br /&gt;
   if status == &amp;quot;EX&amp;quot; then&lt;br /&gt;
    	local extinct = &amp;quot;[[Extinction|Extinct]]&amp;quot;&lt;br /&gt;
    	if frame:getParent().args[&#039;extinct&#039;] then extinct = &amp;quot;&amp;amp;nbsp;(&amp;quot; .. frame:getParent().args[&#039;extinct&#039;] .. &amp;quot;)&amp;quot; end&lt;br /&gt;
    	output = p.addImage(&amp;quot;Status EPBC EX.svg&amp;quot;, &#039;Extinct&#039;) .. extinct .. p.addCategory(&amp;quot;EPBC Act extinct biota&amp;quot;)&lt;br /&gt;
   elseif status == &amp;quot;EW&amp;quot; then&lt;br /&gt;
    	output = p.addImage(&amp;quot;Status EPBC EW.svg&amp;quot;, &#039;Extinct in the Wild&#039;) .. &amp;quot;[[Extinct in the Wild]]&amp;quot; .. p.addCategory(&amp;quot;EPBC Act extinct in the wild biota&amp;quot;)&lt;br /&gt;
   elseif status == &amp;quot;CR&amp;quot; then&lt;br /&gt;
    	output = p.addImage(&amp;quot;Status EPBC CR.svg&amp;quot;, &#039;Critically endangered&#039;) .. &amp;quot;[[Critically endangered species|Critically endangered]]&amp;quot; .. p.addCategory(&amp;quot;EPBC Act critically endangered biota&amp;quot;)&lt;br /&gt;
   elseif status == &amp;quot;EN&amp;quot; then&lt;br /&gt;
    	output = p.addImage(&amp;quot;Status EPBC EN.svg&amp;quot;, &#039;Endangered&#039;) .. &amp;quot;[[Endangered species|Endangered]]&amp;quot; .. p.addCategory(&amp;quot;EPBC Act endangered biota&amp;quot;)&lt;br /&gt;
   elseif status == &amp;quot;VU&amp;quot; then&lt;br /&gt;
    	output = p.addImage(&amp;quot;Status EPBC VU.svg&amp;quot;, &#039;Vulnerable&#039;) .. &amp;quot;[[Vulnerable species|Vulnerable]]&amp;quot; .. p.addCategory(&amp;quot;EPBC Act vulnerable biota&amp;quot;)&lt;br /&gt;
   elseif status == &amp;quot;CD&amp;quot; then&lt;br /&gt;
    	output = p.addImage(&amp;quot;Status EPBC CD.svg&amp;quot;, &#039;Conservation Dependent&#039;) .. &amp;quot;[[Conservation Dependent]]&amp;quot; .. p.addCategory(&amp;quot;EPBC Act conservation dependent biota&amp;quot;)&lt;br /&gt;
   elseif status == &amp;quot;DL&amp;quot;  or status == &amp;quot;DELISTED&amp;quot; then&lt;br /&gt;
    	output = p.addImage(&amp;quot;Status EPBC DL.svg&amp;quot;, &#039;Delisted&#039;) .. &amp;quot;Delisted&amp;quot; &lt;br /&gt;
   else &lt;br /&gt;
    	output = &amp;quot;&#039;&#039;&#039;&#039;&#039;Invalid status&#039;&#039;&#039;&#039;&#039;&amp;quot; .. p.addCategory(&amp;quot;Invalid conservation status&amp;quot;)&lt;br /&gt;
   end  &lt;br /&gt;
  &lt;br /&gt;
   return output &lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
-- *************** ESA ********************************&lt;br /&gt;
function p.ESA(frame, system, status)&lt;br /&gt;
&lt;br /&gt;
   local output = system .. &#039; &#039; .. status&lt;br /&gt;
   if status == &amp;quot;EX&amp;quot; then&lt;br /&gt;
    	local extinct = &amp;quot;[[Extinction|Extinct]]&amp;quot;&lt;br /&gt;
    	if frame:getParent().args[&#039;extinct&#039;] then extinct = &amp;quot;&amp;amp;nbsp;(&amp;quot; .. frame:getParent().args[&#039;extinct&#039;] .. &amp;quot;)&amp;quot; end&lt;br /&gt;
    	output = p.addImage(&amp;quot;Status ESA EX.svg&amp;quot;, &#039;Extinct&#039;) .. extinct &lt;br /&gt;
   elseif status == &amp;quot;LE&amp;quot; or status == &amp;quot;E&amp;quot; then&lt;br /&gt;
    	output = p.addImage(&amp;quot;Status ESA LE.svg&amp;quot;, &#039;Endangered&#039;) .. &amp;quot;[[Endangered species|Endangered]]&amp;quot;  .. p.addCategory(&amp;quot;ESA endangered species&amp;quot;)&lt;br /&gt;
   elseif status == &amp;quot;LT&amp;quot; or status == &amp;quot;T&amp;quot; then&lt;br /&gt;
    	output = p.addImage(&amp;quot;Status ESA LT.svg&amp;quot;, &#039;Threatened&#039;) .. &amp;quot;[[Threatened species|Threatened]]&amp;quot;  .. p.addCategory(&amp;quot;ESA threatened species&amp;quot;)&lt;br /&gt;
   elseif status == &amp;quot;DL&amp;quot;  or status == &amp;quot;DELISTED&amp;quot; then&lt;br /&gt;
    	output = p.addImage(&amp;quot;Status ESA DL.svg&amp;quot;, &#039;Delisted&#039;) .. &amp;quot;Delisted&amp;quot; &lt;br /&gt;
   else &lt;br /&gt;
    	output = &amp;quot;&#039;&#039;&#039;&#039;&#039;Invalid status&#039;&#039;&#039;&#039;&#039;&amp;quot; .. p.addCategory(&amp;quot;Invalid conservation status&amp;quot;)&lt;br /&gt;
   end        &lt;br /&gt;
&lt;br /&gt;
   return output &lt;br /&gt;
end&lt;br /&gt;
-- ********** COSEWIC: Committee on the Status of Endangered Wildlife in Canada **************&lt;br /&gt;
function p.COSEWIC(frame, system, status)&lt;br /&gt;
&lt;br /&gt;
   local output = system .. &#039; &#039; .. status&lt;br /&gt;
   if status == &amp;quot;X&amp;quot; then&lt;br /&gt;
    	local extinct = &amp;quot;[[Extinction|Extinct]]&amp;quot;&lt;br /&gt;
    	if frame:getParent().args[&#039;extinct&#039;] then extinct = &amp;quot;&amp;amp;nbsp;(&amp;quot; .. frame:getParent().args[&#039;extinct&#039;] .. &amp;quot;)&amp;quot; end&lt;br /&gt;
    	output = p.addImage(&amp;quot;Status COSEWIC X.svg&amp;quot;, &#039;Extinct&#039;) .. extinct &lt;br /&gt;
   elseif status == &amp;quot;XT&amp;quot; then&lt;br /&gt;
   	    output = p.addImage(&amp;quot;Status COSEWIC XT.svg&amp;quot;, &#039;Extirpated (Canada)&#039;) .. &amp;quot;Extirpated (Canada)&amp;quot;&lt;br /&gt;
   elseif status == &amp;quot;E&amp;quot; then&lt;br /&gt;
    	output = p.addImage(&amp;quot;Status COSEWIC E.svg&amp;quot;, &#039;Endangered&#039;) .. &amp;quot;[[Endangered species|Endangered]]&amp;quot; &lt;br /&gt;
   elseif  status == &amp;quot;T&amp;quot; then&lt;br /&gt;
    	output = p.addImage(&amp;quot;Status COSEWIC T.svg&amp;quot;, &#039;Threatened&#039;) .. &amp;quot;[[Threatened species|Threatened]]&amp;quot; &lt;br /&gt;
   elseif  status == &amp;quot;SC&amp;quot; then&lt;br /&gt;
    	output = p.addImage(&amp;quot;Status COSEWIC SC.svg&amp;quot;, &#039;Special Concern&#039;) .. &amp;quot;Special Concern&amp;quot; &lt;br /&gt;
   elseif  status == &amp;quot;DD&amp;quot; then&lt;br /&gt;
    	output = p.addImage(&amp;quot;Status_COSEWIC_blank.svg&amp;quot;, &#039;Data Deficient&#039;) .. &amp;quot;Data Deficient&amp;quot; &lt;br /&gt;
   elseif  status == &amp;quot;NAR&amp;quot; then&lt;br /&gt;
    	output = p.addImage(&amp;quot;Status COSEWIC NAR.svg&amp;quot;, &#039;Not at risk&#039;) .. &amp;quot;[[Least Concern|Not at risk]]&amp;quot; &lt;br /&gt;
   else &lt;br /&gt;
    	output = &amp;quot;&#039;&#039;&#039;&#039;&#039;Invalid status&#039;&#039;&#039;&#039;&#039;&amp;quot; .. p.addCategory(&amp;quot;Invalid conservation status&amp;quot;)&lt;br /&gt;
   end     &lt;br /&gt;
   return output &lt;br /&gt;
end&lt;br /&gt;
-- *************** DECF ********************************&lt;br /&gt;
function p.DECF(frame, system, status)&lt;br /&gt;
&lt;br /&gt;
   local output = system .. &#039; &#039; .. status&lt;br /&gt;
   if status == &amp;quot;X&amp;quot; then&lt;br /&gt;
    	local extinct = &amp;quot;Declared Rare&amp;amp;nbsp;— Presumed [[Extinction|Extinct]]&amp;quot;&lt;br /&gt;
    	if frame:getParent().args[&#039;extinct&#039;] then extinct = &amp;quot;&amp;amp;nbsp;(&amp;quot; .. frame:getParent().args[&#039;extinct&#039;] .. &amp;quot;)&amp;quot; end&lt;br /&gt;
    	output = p.addImage(&amp;quot;Status DECF X.svg&amp;quot;, &#039;Extinct&#039;) .. extinct &lt;br /&gt;
   elseif status == &amp;quot;R&amp;quot; then&lt;br /&gt;
    	output = p.addImage(&amp;quot;Status DECF R.svg&amp;quot;, &#039;Declared rare&#039;) .. &amp;quot;Declared [[Rare species|rare]]&amp;quot; &lt;br /&gt;
   elseif status == &amp;quot;P1&amp;quot;  then&lt;br /&gt;
    	output = p.addImage(&amp;quot;Status DECF P1.svg&amp;quot;, &#039;Priority One&amp;amp;nbsp;— Poorly Known Taxa&#039;) .. &amp;quot;Priority One&amp;amp;nbsp;— Poorly Known Taxa&amp;quot; &lt;br /&gt;
   elseif status == &amp;quot;P2&amp;quot;  then&lt;br /&gt;
    	output = p.addImage(&amp;quot;Status DECF P2.svg&amp;quot;, &#039;Priority Two&amp;amp;nbsp;— Poorly Known Taxa&#039;) .. &amp;quot;Priority Two&amp;amp;nbsp;— Poorly Known Taxa&amp;quot; &lt;br /&gt;
   elseif status == &amp;quot;P3&amp;quot;  then&lt;br /&gt;
    	output = p.addImage(&amp;quot;Status DECF P3.svg&amp;quot;, &#039;Priority Three&amp;amp;nbsp;— Poorly Known Taxa&#039;) .. &amp;quot;Priority Three&amp;amp;nbsp;— Poorly Known Taxa&amp;quot; &lt;br /&gt;
   elseif status == &amp;quot;P4&amp;quot;  then&lt;br /&gt;
    	output = p.addImage(&amp;quot;Status DECF P4.svg&amp;quot;, &#039;Priority Four&amp;amp;nbsp;— Rare Taxa&#039;) .. &amp;quot;Priority Four&amp;amp;nbsp;— Rare Taxa&amp;quot; &lt;br /&gt;
   elseif status == &amp;quot;DL&amp;quot;  or status == &amp;quot;DELISTED&amp;quot; then&lt;br /&gt;
    	output = p.addImage(&amp;quot;Status DECF DL.svg&amp;quot;, &#039;Delisted&#039;) .. &amp;quot;Delisted&amp;quot; &lt;br /&gt;
   else &lt;br /&gt;
    	output = &amp;quot;&#039;&#039;&#039;&#039;&#039;Invalid status&#039;&#039;&#039;&#039;&#039;&amp;quot; .. p.addCategory(&amp;quot;Invalid conservation status&amp;quot;)&lt;br /&gt;
   end        &lt;br /&gt;
&lt;br /&gt;
   return output &lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
-- *************** QLDNCA (Queensland Nature Conservation Act ********************************&lt;br /&gt;
-- https://www.data.qld.gov.au/dataset/conservation-status-of-queensland-wildlife/resource/d20c485d-b5dc-4c07-8304-df6a21783d4b &lt;br /&gt;
function p.QLDNCA(frame, system, status)&lt;br /&gt;
&lt;br /&gt;
   local output = system .. &#039; &#039; .. status&lt;br /&gt;
   if status == &amp;quot;EX&amp;quot;  then&lt;br /&gt;
    	output = &amp;quot;[[Extinct]]&amp;quot; .. p.addCategory(&amp;quot;Nature Conservation Act extinct biota&amp;quot;)&lt;br /&gt;
   elseif status == &amp;quot;EW&amp;quot; or status == &amp;quot;PE&amp;quot;   then  -- PE is the code used but keep EW for compatibility&lt;br /&gt;
    	output = &amp;quot;[[Extinct in the Wild]]&amp;quot; .. p.addCategory(&amp;quot;Nature Conservation Act extinct in the wild biota&amp;quot;)&lt;br /&gt;
   elseif status == &amp;quot;CR&amp;quot; then&lt;br /&gt;
    	output = &amp;quot;[[Critically endangered species|Critically Endangered]]&amp;quot; .. p.addCategory(&amp;quot;Nature Conservation Act critically endangered biota&amp;quot;)&lt;br /&gt;
   elseif status == &amp;quot;EN&amp;quot; or status == &amp;quot;E&amp;quot;  then&lt;br /&gt;
    	output = &amp;quot;[[Endangered species|Endangered]]&amp;quot; .. p.addCategory(&amp;quot;Nature Conservation Act endangered biota&amp;quot;)&lt;br /&gt;
   elseif status == &amp;quot;VU&amp;quot; or status == &amp;quot;V&amp;quot; then&lt;br /&gt;
    	output = &amp;quot;[[Vulnerable species|Vulnerable]] &amp;quot; .. p.addCategory(&amp;quot;Nature Conservation Act vulnerable biota&amp;quot;)&lt;br /&gt;
   elseif status == &amp;quot;R&amp;quot; then&lt;br /&gt;
    	output = &amp;quot;Rare&amp;quot; .. p.addCategory(&amp;quot;Nature Conservation Act rare biota&amp;quot;)&lt;br /&gt;
   elseif status == &amp;quot;NT&amp;quot; then&lt;br /&gt;
    	output = &amp;quot;[[Near Threatened]]&amp;quot; .. p.addCategory(&amp;quot;Nature Conservation Act near threatened biota&amp;quot;)&lt;br /&gt;
   elseif status == &amp;quot;SL&amp;quot; then&lt;br /&gt;
    	output = &amp;quot;[[Special Least Concern]]&amp;quot; .. p.addCategory(&amp;quot;Nature Conservation Act special least concern biota&amp;quot;)&lt;br /&gt;
   elseif status == &amp;quot;LC&amp;quot; or status == &amp;quot;C&amp;quot; then&lt;br /&gt;
    	output = &amp;quot;[[Least Concern]]&amp;quot; .. p.addCategory(&amp;quot;Nature Conservation Act least concern biota&amp;quot;)&lt;br /&gt;
   else &lt;br /&gt;
    	output = &amp;quot;&#039;&#039;&#039;&#039;&#039;Invalid status&#039;&#039;&#039;&#039;&#039;&amp;quot; .. p.addCategory(&amp;quot;Invalid conservation status&amp;quot;)&lt;br /&gt;
   end        &lt;br /&gt;
   &lt;br /&gt;
   return output &lt;br /&gt;
end&lt;br /&gt;
-- *************** NSWBCA ********************************&lt;br /&gt;
function p.NSWBCA(frame, system, status)&lt;br /&gt;
	local output = system .. &#039; &#039; .. status&lt;br /&gt;
	   if status == &amp;quot;EX&amp;quot;  then&lt;br /&gt;
    	output = &amp;quot;[[Extinct]]&amp;quot; &lt;br /&gt;
   elseif status == &amp;quot;EW&amp;quot;  then&lt;br /&gt;
    	output = &amp;quot;[[Extinct in the Wild]]&amp;quot; &lt;br /&gt;
   elseif status == &amp;quot;CR&amp;quot; then&lt;br /&gt;
    	output = &amp;quot;[[Critically endangered species|Critically Endangered]]&amp;quot; &lt;br /&gt;
   elseif status == &amp;quot;EN&amp;quot; then&lt;br /&gt;
    	output = &amp;quot;[[Endangered species|Endangered]]&amp;quot; &lt;br /&gt;
   elseif status == &amp;quot;VU&amp;quot; then&lt;br /&gt;
    	output = &amp;quot;[[Vulnerable species|Vulnerable]] &amp;quot; &lt;br /&gt;
--   elseif status == &amp;quot;R&amp;quot; then&lt;br /&gt;
--    	output = &amp;quot;Rare&amp;quot; &lt;br /&gt;
--   elseif status == &amp;quot;NT&amp;quot; then&lt;br /&gt;
--    	output = &amp;quot;[[Near Threatened]]&amp;quot; &lt;br /&gt;
   elseif status == &amp;quot;LC&amp;quot; then&lt;br /&gt;
    	output = &amp;quot;[[Least Concern]]&amp;quot; &lt;br /&gt;
   else &lt;br /&gt;
    	output = &amp;quot;&#039;&#039;&#039;&#039;&#039;Invalid status&#039;&#039;&#039;&#039;&#039;&amp;quot; .. p.addCategory(&amp;quot;Invalid conservation status&amp;quot;)&lt;br /&gt;
   end  &lt;br /&gt;
  	return output&lt;br /&gt;
end&lt;br /&gt;
-- *************** CITES ********************************&lt;br /&gt;
function p.CITES(frame, system, status)&lt;br /&gt;
	&lt;br /&gt;
   --colours: Animalia 	rgb(235,235,210)	Archaeplastida 	rgb(180,250,180)&lt;br /&gt;
   local colour = frame:getParent().args[&#039;colour&#039;]&lt;br /&gt;
&lt;br /&gt;
   local categoryPrefix = &amp;quot;Taxa&amp;quot;&lt;br /&gt;
   --mw.addWarning (tostring(colour))&lt;br /&gt;
   if colour == &#039;rgb(235,235,210)&#039; then categoryPrefix = &amp;quot;Fauna&amp;quot; &lt;br /&gt;
   elseif colour == &#039;rgb(180,250,180)&#039; then categoryPrefix = &amp;quot;Flora&amp;quot; &lt;br /&gt;
   else  mw.addWarning (tostring(colour))&lt;br /&gt;
   end&lt;br /&gt;
   &lt;br /&gt;
   local output = system .. &#039; &#039; .. status&lt;br /&gt;
   if status == &amp;quot;CITES_A1&amp;quot; then&lt;br /&gt;
    	output = &amp;quot;[[CITES]] Appendix I&amp;quot; .. p.addCategory(categoryPrefix .. &amp;quot; listed on CITES Appendix I&amp;quot;)&lt;br /&gt;
   elseif status == &amp;quot;CITES_A2&amp;quot; then&lt;br /&gt;
    	output = &amp;quot;[[CITES]] Appendix II&amp;quot; .. p.addCategory(categoryPrefix .. &amp;quot; listed on CITES Appendix II&amp;quot;)&lt;br /&gt;
   elseif status == &amp;quot;CITES_A3&amp;quot; then&lt;br /&gt;
    	output = &amp;quot;[[CITES]] Appendix III&amp;quot; .. p.addCategory(categoryPrefix .. &amp;quot; listed on CITES Appendix III&amp;quot;)&lt;br /&gt;
   else &lt;br /&gt;
    	output = &amp;quot;&#039;&#039;&#039;&#039;&#039;Invalid status&#039;&#039;&#039;&#039;&#039;&amp;quot; .. p.addCategory(&amp;quot;Invalid conservation status&amp;quot;)&lt;br /&gt;
   end &lt;br /&gt;
   return output &lt;br /&gt;
&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
-- *************** NZTCS ********************************&lt;br /&gt;
function p.NZTCS(frame, system, status)&lt;br /&gt;
&lt;br /&gt;
   local output = system .. &#039; &#039; .. status&lt;br /&gt;
   if status == &amp;quot;EX&amp;quot; then&lt;br /&gt;
    	local extinct = &amp;quot;[[Extinction|Extinct]]&amp;quot;&lt;br /&gt;
    	if frame:getParent().args[&#039;extinction_date&#039;] and frame:getParent().args[&#039;extinction_date&#039;] ~= &amp;quot;&amp;quot; then &lt;br /&gt;
    		extinct = extinct .. &amp;quot;&amp;amp;nbsp;(&amp;quot; .. frame:getParent().args[&#039;extinction_date&#039;] .. &amp;quot;)&amp;quot; &lt;br /&gt;
    	end&lt;br /&gt;
    	output = p.addImage(&amp;quot;Status 2019 NZTCS EX.svg&amp;quot;, &amp;quot;extinct&amp;quot;) .. extinct &lt;br /&gt;
   -- Threatened categories 2019 (NC,NE,NV,NI)&lt;br /&gt;
   elseif status == &amp;quot;NC&amp;quot; then&lt;br /&gt;
    	output = p.addImage(&amp;quot;Status 2019 NZTCS NC.svg&amp;quot;, &amp;quot;Nationally Critical&amp;quot;) .. &amp;quot;Nationally Critical&amp;quot; &lt;br /&gt;
   elseif status == &amp;quot;NE&amp;quot;  then&lt;br /&gt;
    	output = p.addImage(&amp;quot;Status 2019 NZTCS NE.svg&amp;quot;, &amp;quot;Nationally Endangered&amp;quot;) .. &amp;quot;Nationally Endangered&amp;quot; &lt;br /&gt;
   elseif status == &amp;quot;NV&amp;quot;  then&lt;br /&gt;
    	output = p.addImage(&amp;quot;Status 2019 NZTCS NV.svg&amp;quot;, &amp;quot;Nationally Vulnerable&amp;quot;) .. &amp;quot;Nationally Vulnerable&amp;quot; &lt;br /&gt;
   elseif status == &amp;quot;NI&amp;quot; or status == &amp;quot;ni&amp;quot; then&lt;br /&gt;
    	output = p.addImage(&amp;quot;Status 2019 NZTCS NI.svg&amp;quot;, &amp;quot;Nationally Increasing&amp;quot;) .. &amp;quot;Nationally Increasing&amp;quot; &lt;br /&gt;
   -- At Risk categories (2019 version): &lt;br /&gt;
   elseif status == &amp;quot;D&amp;quot; or status == &amp;quot;d&amp;quot; then&lt;br /&gt;
    	output = p.addImage(&amp;quot;Status 2019 NZTCS D.svg&amp;quot;, &amp;quot;Declining&amp;quot;) .. &amp;quot;Declining&amp;quot; &lt;br /&gt;
   elseif status == &amp;quot;REL&amp;quot; or status == &amp;quot;Rel&amp;quot; or status == &amp;quot;rel&amp;quot; then&lt;br /&gt;
    	output = p.addImage(&amp;quot;Status 2019 NZTCS REL.svg&amp;quot;, &amp;quot;Relict&amp;quot;) .. &amp;quot;Relict&amp;quot; &lt;br /&gt;
   elseif status == &amp;quot;NU&amp;quot; or status == &amp;quot;nu&amp;quot; then&lt;br /&gt;
    	output = p.addImage(&amp;quot;Status 2019 NZTCS NU.svg&amp;quot;,  &amp;quot;Naturally Uncommon&amp;quot;) .. &amp;quot;Naturally Uncommon&amp;quot; &lt;br /&gt;
   -- At Risk categories (2008 version): &lt;br /&gt;
   elseif status == &amp;quot;R&amp;quot; or status == &amp;quot;r&amp;quot; then&lt;br /&gt;
    	output = p.addImage(&amp;quot;Status NZTCS R.svg&amp;quot;, &amp;quot;Recovering&amp;quot;) .. &amp;quot;Recovering&amp;quot;  -- included in NI in 2019 category&lt;br /&gt;
&lt;br /&gt;
   --- other&lt;br /&gt;
   elseif status == &amp;quot;NT&amp;quot; or status == &amp;quot;nt&amp;quot; then&lt;br /&gt;
    	output = p.addImage(&amp;quot;Status 2019 NZTCS NT.svg&amp;quot;, &amp;quot;Not Threatened&amp;quot; ) .. &amp;quot;Not Threatened&amp;quot; &lt;br /&gt;
   elseif status == &amp;quot;DD&amp;quot; or status == &amp;quot;dd&amp;quot; then&lt;br /&gt;
    	output = p.addImage(&amp;quot;Status 2019 NZTCS DD.svg&amp;quot;, &amp;quot;Data Deficit&amp;quot; ) .. &amp;quot;Data Deficit&amp;quot; &lt;br /&gt;
   &lt;br /&gt;
   --  Older categories (version 2002): SD,GD,SP,RR&lt;br /&gt;
   elseif status == &amp;quot;SD&amp;quot;  then&lt;br /&gt;
    	output = p.addImage(&amp;quot;Status NZTCS SD.svg&amp;quot;, &#039;Serious Decline&#039;) .. &amp;quot;Serious Decline&amp;quot; &lt;br /&gt;
   elseif status == &amp;quot;GD&amp;quot;  then&lt;br /&gt;
    	output = p.addImage(&amp;quot;Status NZTCS GD.svg&amp;quot;, &#039;Gradual Decline&#039;) .. &amp;quot;Gradual Decline&amp;quot; &lt;br /&gt;
   elseif status == &amp;quot;SP&amp;quot;  then&lt;br /&gt;
    	output = p.addImage(&amp;quot;Status NZTCS SP.svg&amp;quot;, &#039;Sparse&#039;) .. &amp;quot;Sparse&amp;quot; &lt;br /&gt;
   elseif status == &amp;quot;RR&amp;quot;  then&lt;br /&gt;
    	output = p.addImage(&amp;quot;Status NZTCS RR.svg&amp;quot;, &#039;Range Restricted&#039;) .. &amp;quot;Range Restricted&amp;quot; &lt;br /&gt;
&lt;br /&gt;
   -- otherwise invalid conservation status&lt;br /&gt;
   else &lt;br /&gt;
    	output = &amp;quot;&#039;&#039;&#039;&#039;&#039;Invalid status&#039;&#039;&#039;&#039;&#039;&amp;quot; .. p.addCategory(&amp;quot;Invalid conservation status&amp;quot;)&lt;br /&gt;
   end        &lt;br /&gt;
   &lt;br /&gt;
   return output &lt;br /&gt;
&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
-- *************** functions  for image and category output ********&lt;br /&gt;
function p.addImage(file, alt)&lt;br /&gt;
    local statusNumber =	mw.getCurrentFrame():getParent().args[&#039;number&#039;] or 1&lt;br /&gt;
    --mw.addWarning (&amp;quot;statusNo=&amp;quot; .. statusNumber)&lt;br /&gt;
    &lt;br /&gt;
    if file ~= &amp;quot;&amp;quot; and tonumber(statusNumber)&amp;lt;3 then&lt;br /&gt;
    	return &amp;quot;[[File:&amp;quot; .. file .. &amp;quot;|frameless|alt=&amp;quot; .. ( alt or &#039;|link=&#039; ) .. &amp;quot;|class=skin-invert-image]]&amp;lt;br /&amp;gt;&amp;quot;&lt;br /&gt;
    end&lt;br /&gt;
    return &amp;quot;&amp;quot;&lt;br /&gt;
end&lt;br /&gt;
function p.addCategory(category)&lt;br /&gt;
	local ns = mw.title.getCurrentTitle().namespace&lt;br /&gt;
    -- ns = 0 -- to test category put on page&lt;br /&gt;
	if category ~= &amp;quot;&amp;quot; and ns == 0 then&lt;br /&gt;
		return &amp;quot;[[Category:&amp;quot; .. category .. &amp;quot;]]&amp;quot;&lt;br /&gt;
    end&lt;br /&gt;
    return &amp;quot;&amp;quot;&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
return p&lt;/div&gt;</summary>
		<author><name>Indicwiki</name></author>
	</entry>
	<entry>
		<id>https://sandbox.indicwiki.org/index.php?title=Template:Cite_IUCN&amp;diff=66555</id>
		<title>Template:Cite IUCN</title>
		<link rel="alternate" type="text/html" href="https://sandbox.indicwiki.org/index.php?title=Template:Cite_IUCN&amp;diff=66555"/>
		<updated>2026-05-11T08:16:35Z</updated>

		<summary type="html">&lt;p&gt;Indicwiki: 1 revision imported&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;includeonly&amp;gt;{{#invoke:cite IUCN|cite}}&amp;lt;/includeonly&amp;gt;&amp;lt;noinclude&amp;gt;&lt;br /&gt;
{{Documentation}}&lt;br /&gt;
&amp;lt;!-- Add categories to the /doc subpage, not here! --&amp;gt;&lt;br /&gt;
&amp;lt;/noinclude&amp;gt;&lt;/div&gt;</summary>
		<author><name>Indicwiki</name></author>
	</entry>
	<entry>
		<id>https://sandbox.indicwiki.org/index.php?title=Template:Taxonomy/Rhacophorinae&amp;diff=66553</id>
		<title>Template:Taxonomy/Rhacophorinae</title>
		<link rel="alternate" type="text/html" href="https://sandbox.indicwiki.org/index.php?title=Template:Taxonomy/Rhacophorinae&amp;diff=66553"/>
		<updated>2026-05-11T08:16:34Z</updated>

		<summary type="html">&lt;p&gt;Indicwiki: 1 revision imported&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Don&#039;t edit this line {{{machine code|}}}&lt;br /&gt;
|rank=subfamilia&lt;br /&gt;
|link=Rhacophorinae&lt;br /&gt;
|parent=Rhacophoridae&lt;br /&gt;
|extinct=&lt;br /&gt;
}}&lt;/div&gt;</summary>
		<author><name>Indicwiki</name></author>
	</entry>
	<entry>
		<id>https://sandbox.indicwiki.org/index.php?title=Template:Taxonomy/Rhacophoridae&amp;diff=66551</id>
		<title>Template:Taxonomy/Rhacophoridae</title>
		<link rel="alternate" type="text/html" href="https://sandbox.indicwiki.org/index.php?title=Template:Taxonomy/Rhacophoridae&amp;diff=66551"/>
		<updated>2026-05-11T08:16:34Z</updated>

		<summary type="html">&lt;p&gt;Indicwiki: 1 revision imported&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Don&#039;t edit this line {{{machine code|}}}&lt;br /&gt;
|rank=familia&lt;br /&gt;
|link=Rhacophoridae&lt;br /&gt;
|parent=Ranoidea&lt;br /&gt;
|extinct=&lt;br /&gt;
}}&lt;/div&gt;</summary>
		<author><name>Indicwiki</name></author>
	</entry>
	<entry>
		<id>https://sandbox.indicwiki.org/index.php?title=Template:Taxonomy/Ranoidea&amp;diff=66549</id>
		<title>Template:Taxonomy/Ranoidea</title>
		<link rel="alternate" type="text/html" href="https://sandbox.indicwiki.org/index.php?title=Template:Taxonomy/Ranoidea&amp;diff=66549"/>
		<updated>2026-05-11T08:16:34Z</updated>

		<summary type="html">&lt;p&gt;Indicwiki: 1 revision imported&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;noinclude&amp;gt;{{High-use}}&lt;br /&gt;
&amp;lt;/noinclude&amp;gt;{{Don&#039;t edit this line {{{machine code|}}}&lt;br /&gt;
|rank=superfamilia&lt;br /&gt;
|link=Ranoidea&lt;br /&gt;
|parent=Neobatrachia&lt;br /&gt;
}}&lt;/div&gt;</summary>
		<author><name>Indicwiki</name></author>
	</entry>
	<entry>
		<id>https://sandbox.indicwiki.org/index.php?title=Template:Taxonomy/Choanozoa&amp;diff=66547</id>
		<title>Template:Taxonomy/Choanozoa</title>
		<link rel="alternate" type="text/html" href="https://sandbox.indicwiki.org/index.php?title=Template:Taxonomy/Choanozoa&amp;diff=66547"/>
		<updated>2026-05-11T08:16:34Z</updated>

		<summary type="html">&lt;p&gt;Indicwiki: 1 revision imported&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Don&#039;t edit this line {{{machine code|}}}&lt;br /&gt;
|rank=cladus&lt;br /&gt;
|link=Choanozoa&lt;br /&gt;
|parent=Filozoa&lt;br /&gt;
|refs=*{{cite journal |last1=Brunet |first1=Thibaut |first2=Nicole |last2=King |title=The origin of animal multicellularity and cell differentiation |journal=Developmental Cell |volume=43 |issue=2 |date=2017 |pages=124–140 |doi=10.1016/j.devcel.2017.09.016 |url = https://www.cell.com/developmental-cell/pdf/S1534-5807(17)30769-4.pdf |doi-access = free |pmid=29065305 |pmc=6089241 |bibcode=2017DevCe..43..124B }}&lt;br /&gt;
*{{Cite journal |last1=Adl |first1=Sina M. |last2=Bass |first2=David |last3=Lane|first3=Christopher E. |last4=Lukeš |first4=Julius |last5=Schoch |first5=Conrad L. |last6=Smirnov |first6=Alexey |last7=Agatha |first7=Sabine |last8=Berney |first8=Cedric |last9=Brown |first9=Matthew W. |date=2018-09-26 |title=Revisions to the Classification, Nomenclature, and Diversity of Eukaryotes|journal=Journal of Eukaryotic Microbiology |volume=66 |issue=1 |pages=4–119 |doi=10.1111/jeu.12691|pmid=30257078 |pmc=6492006 }}&lt;br /&gt;
}}&lt;/div&gt;</summary>
		<author><name>Indicwiki</name></author>
	</entry>
	<entry>
		<id>https://sandbox.indicwiki.org/index.php?title=Template:Taxonomy/Salientia&amp;diff=66545</id>
		<title>Template:Taxonomy/Salientia</title>
		<link rel="alternate" type="text/html" href="https://sandbox.indicwiki.org/index.php?title=Template:Taxonomy/Salientia&amp;diff=66545"/>
		<updated>2026-05-11T08:16:34Z</updated>

		<summary type="html">&lt;p&gt;Indicwiki: 1 revision imported&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;noinclude&amp;gt;{{High-use}}&lt;br /&gt;
&amp;lt;/noinclude&amp;gt;{{Don&#039;t edit this line {{{machine code|}}}&lt;br /&gt;
|rank=clade&lt;br /&gt;
|link=Salientia&lt;br /&gt;
|parent=Batrachia&lt;br /&gt;
|refs=&amp;lt;!--Shown on this page only; don&#039;t include &amp;lt;ref&amp;gt; tags --&amp;gt;&lt;br /&gt;
}}&lt;/div&gt;</summary>
		<author><name>Indicwiki</name></author>
	</entry>
	<entry>
		<id>https://sandbox.indicwiki.org/index.php?title=Template:Taxonomy/Neobatrachia&amp;diff=66543</id>
		<title>Template:Taxonomy/Neobatrachia</title>
		<link rel="alternate" type="text/html" href="https://sandbox.indicwiki.org/index.php?title=Template:Taxonomy/Neobatrachia&amp;diff=66543"/>
		<updated>2026-05-11T08:16:34Z</updated>

		<summary type="html">&lt;p&gt;Indicwiki: 1 revision imported&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;noinclude&amp;gt;{{High-use}}&lt;br /&gt;
&amp;lt;/noinclude&amp;gt;{{Don&#039;t edit this line {{{machine code|}}}&lt;br /&gt;
|rank=subordo&lt;br /&gt;
|link=Neobatrachia&lt;br /&gt;
|parent=Anura&lt;br /&gt;
}}&lt;/div&gt;</summary>
		<author><name>Indicwiki</name></author>
	</entry>
	<entry>
		<id>https://sandbox.indicwiki.org/index.php?title=Template:Taxonomy/Lissamphibia&amp;diff=66541</id>
		<title>Template:Taxonomy/Lissamphibia</title>
		<link rel="alternate" type="text/html" href="https://sandbox.indicwiki.org/index.php?title=Template:Taxonomy/Lissamphibia&amp;diff=66541"/>
		<updated>2026-05-11T08:16:33Z</updated>

		<summary type="html">&lt;p&gt;Indicwiki: 1 revision imported&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;noinclude&amp;gt;{{High-use}}&lt;br /&gt;
&amp;lt;/noinclude&amp;gt;{{Don&#039;t edit this line {{{machine code|}}}&lt;br /&gt;
|rank=subclassis&lt;br /&gt;
|link=Lissamphibia&lt;br /&gt;
|parent=Amphibia&lt;br /&gt;
}}&lt;/div&gt;</summary>
		<author><name>Indicwiki</name></author>
	</entry>
	<entry>
		<id>https://sandbox.indicwiki.org/index.php?title=Template:Taxonomy/Batrachia&amp;diff=66539</id>
		<title>Template:Taxonomy/Batrachia</title>
		<link rel="alternate" type="text/html" href="https://sandbox.indicwiki.org/index.php?title=Template:Taxonomy/Batrachia&amp;diff=66539"/>
		<updated>2026-05-11T08:16:33Z</updated>

		<summary type="html">&lt;p&gt;Indicwiki: 1 revision imported&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;noinclude&amp;gt;{{High-use}}&lt;br /&gt;
&amp;lt;/noinclude&amp;gt;{{Don&#039;t edit this line {{{machine code|}}}&lt;br /&gt;
|rank=superordo&lt;br /&gt;
|link=Batrachia&lt;br /&gt;
|parent=Lissamphibia&lt;br /&gt;
|refs=&amp;lt;!--Shown on this page only; don&#039;t include &amp;lt;ref&amp;gt; tags --&amp;gt;&lt;br /&gt;
}}&lt;/div&gt;</summary>
		<author><name>Indicwiki</name></author>
	</entry>
	<entry>
		<id>https://sandbox.indicwiki.org/index.php?title=Template:Taxonomy/Anura&amp;diff=66537</id>
		<title>Template:Taxonomy/Anura</title>
		<link rel="alternate" type="text/html" href="https://sandbox.indicwiki.org/index.php?title=Template:Taxonomy/Anura&amp;diff=66537"/>
		<updated>2026-05-11T08:16:33Z</updated>

		<summary type="html">&lt;p&gt;Indicwiki: 1 revision imported&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;noinclude&amp;gt;{{High-use}}&lt;br /&gt;
&amp;lt;/noinclude&amp;gt;{{Don&#039;t edit this line {{{machine code|}}}&lt;br /&gt;
|rank=ordo&lt;br /&gt;
|link=Frog|Anura&lt;br /&gt;
|parent=Salientia&lt;br /&gt;
}}&lt;/div&gt;</summary>
		<author><name>Indicwiki</name></author>
	</entry>
	<entry>
		<id>https://sandbox.indicwiki.org/index.php?title=Module:Buffer&amp;diff=66535</id>
		<title>Module:Buffer</title>
		<link rel="alternate" type="text/html" href="https://sandbox.indicwiki.org/index.php?title=Module:Buffer&amp;diff=66535"/>
		<updated>2026-05-11T08:16:32Z</updated>

		<summary type="html">&lt;p&gt;Indicwiki: 1 revision imported&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;--[[=============================&lt;br /&gt;
This Module was written by Alexander Zhikun He, also known as User:Codehydro on the English Wikipedia&lt;br /&gt;
&lt;br /&gt;
All methods were developed independently and any resemblance to other string buffer libraries would be coincidental.&lt;br /&gt;
Furthermore, many methods will not work when compiled by standard Lua libraries as they depend on behaviors unique to&lt;br /&gt;
the MediaWiki Scribunto mod, which, for example, has a getmetatable() method that always returns nil on non-tables.&lt;br /&gt;
https://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual&lt;br /&gt;
&lt;br /&gt;
Source code comments may be thin at some points because they are intended to be supplemented by the documentation page:&lt;br /&gt;
https://en.wikipedia.org/wiki/Module:Buffer/doc&lt;br /&gt;
&lt;br /&gt;
Licensed under Creative Commons Attribution-ShareAlike 3.0 Unported License&lt;br /&gt;
https://en.wikipedia.org/wiki/Wikipedia:Text_of_Creative_Commons_Attribution-ShareAlike_3.0_Unported_License&lt;br /&gt;
&lt;br /&gt;
https://en.wikipedia.org/wiki/Module:Buffer&lt;br /&gt;
https://en.wikipedia.org/wiki/User:Codehydro&lt;br /&gt;
=============================--]]&lt;br /&gt;
local function Valid(v)--type validation&lt;br /&gt;
	if v and v~=true then--reject nil/boolean; faster than 2 type() comparisons&lt;br /&gt;
		local str = tostring(v)--functions not filtered since unlikely passed by accident (Scribunto does not have userdata/thread types)&lt;br /&gt;
		if str~=v and str==&#039;table&#039; then return rawget(v, 1) and table.concat(v) end--tostring(string-type) returns same ref; same refs compare faster than type()&lt;br /&gt;
		if str~=&#039;&#039; then return str end--numbers are coerced to string per table.concat op; appending in string form saves ops on repeat concat&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
local noOp, MBpairs = function()end do local iMap, vMap, oMap, pIter, pOther, pFast, Next--Map&lt;br /&gt;
	local function init()--init = noOp after first run&lt;br /&gt;
		function Next(t) return next, t end--slightly faster to do this than to use select()&lt;br /&gt;
		function pIter(t, k) k = (iMap[t] or MBpairs(t, true) and iMap[t])[not k and 1 or vMap[t][k]] return k, t[k] end--don&#039;t use rawget; accepting unmapped tables does not measurably affect performance.&lt;br /&gt;
		function pOther(t, k) k = (oMap[t] or MBpairs(t, true) and oMap[t])[nil==k and 1 or vMap[t][k]] return k, t[k] end--comparison to nil because false is a valid key&lt;br /&gt;
		function pFast(t, k) k = not k and 1 or k &amp;lt; (vMap[t] or #t) and k + 1 or nil return k, t[k] end--mapless iterator; almost as fast as native ipairs; slight performance penalty when length not cached&lt;br /&gt;
							   --k and k &amp;lt; (vMap[t] or #t) and k + 1 or not k and 1 or nil return k, t[k] end--mapless iterator; almost as fast as native ipairs; slight performance penalty when length not cached&lt;br /&gt;
		local mk = {__mode = &#039;k&#039;}--use mode &#039;k&#039;; found that mode &#039;kv&#039; sometimes garbage collects maps mid-loop (may not error because iterators auto re-map, but that&#039;s expensive)&lt;br /&gt;
		init, iMap, vMap, oMap = noOp, setmetatable({}, mk), setmetatable({}, mk), setmetatable({}, mk)--iMap is numeric keys, oMap is non-numeric keys, and vMap points to next key&lt;br /&gt;
	end&lt;br /&gt;
	function MBpairs(t, ...)--pairs always iterates in order&lt;br /&gt;
		local iter, ex = ...&lt;br /&gt;
		iter = iter==init()--nil&lt;br /&gt;
		if iter and not oMap[t] and ex==nil and rawget(t, 1)~=nil and next(t, #t)==nil then--while possible to miss keys, more thorough check would negate the benefit of pFast&lt;br /&gt;
			vMap[t] = #t return pFast, t, nil&lt;br /&gt;
		elseif ... or not vMap[t] or select(&#039;#&#039;, ...)~=1 then&lt;br /&gt;
			local ti, tn, to, n = {}, {}, {}, #t--reduces table lookups&lt;br /&gt;
			iMap[t], vMap[t], oMap[t] = ti, tn, to&lt;br /&gt;
			for k = 1, n do ti[k], tn[k] = k, k + 1 end--stage one avoids number type checking op in stage two for most numeric keys&lt;br /&gt;
			for k in (ex or Next)(t) do&lt;br /&gt;
				if not tn[k] then table.insert(tonumber(k)~=k and to or ti, k) end&lt;br /&gt;
			end&lt;br /&gt;
			if #ti~=n then&lt;br /&gt;
				table.sort(ti)&lt;br /&gt;
				for k = 1, #ti do tn[ti[k]] = k + 1 end--somewhat wasteful, but trying to avoid overwriting can be even more expensive&lt;br /&gt;
			end&lt;br /&gt;
			for k = 1, #to do tn[to[k]] = k + 1 end&lt;br /&gt;
		end&lt;br /&gt;
		return iter and pIter or oMap[t] and pOther or noOp, t--noOp for mapless&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
local parent, rawkey, spec do--new scope for variables not reused outside (reduces number of var names that need to checked outside of scope)&lt;br /&gt;
	local mkv = {__mode=&#039;kv&#039;, __call=function(t,k,v)t[k]=v return k end}--shared meta for Buffer parent property, raw mode, and specialized functions&lt;br /&gt;
	parent, rawkey, spec = setmetatable({}, mkv), setmetatable({}, mkv), setmetatable({}, mkv)--shared meta less memory&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
local MB, MBi, MBmix, buffHTML, gfuncs, noCache, Element do--minimize number of locals per scope to reduce time spent sifting through irrelevant variable names&lt;br /&gt;
	local _stream do local stream--keep stream near top of scope&lt;br /&gt;
		local function init(f)--init = noOp after first run&lt;br /&gt;
			local function each(self, ...)&lt;br /&gt;
				for k = 1, select(&#039;#&#039;, ...) do&lt;br /&gt;
					k = Valid(select(k, ...))--slightly faster than table.insert(self, (Valid(select(k, ...))))&lt;br /&gt;
					if k then table.insert(self, k) end&lt;br /&gt;
				end&lt;br /&gt;
				return self&lt;br /&gt;
			end&lt;br /&gt;
			init, stream, _stream = noOp, {&lt;br /&gt;
				__call = function(t, v) v = v and Valid(v) return v and table.insert(t, v) or t end,--last_concat cleared before entering stream mode&lt;br /&gt;
				__index = function(t, i) return i==&#039;each&#039; and each or MB.__index(t, i) and setmetatable(t, MB)[i] end,--no table look up minimizes resources to retrieve the only stream function&lt;br /&gt;
				__tostring = function(t) return setmetatable(t, MB)() end&lt;br /&gt;
			} for k, v in next, MB do stream[k] = stream[k] or v end&lt;br /&gt;
			setmetatable(stream, getmetatable(MB))&lt;br /&gt;
		end&lt;br /&gt;
		function _stream(self, ...) self.last_concat = init() return setmetatable(self, stream):each(...) end&lt;br /&gt;
	end&lt;br /&gt;
	local function isMBfunc(Buffer, s, ...)--helper for :getParent()-like methods (including getBuffer which does not return a parent)&lt;br /&gt;
		return s and (select(&#039;#&#039;, ...)==0 and--eventually should figure out to make this work for :getHTML which is very similar&lt;br /&gt;
				(not rawkey[s] and tostring(s):match&#039;^_.*&#039; and MB.__index(Buffer, s) and MB.__index(Buffer, s)(Buffer) or MBmix(Buffer, s))--unprefixed function names append as a string&lt;br /&gt;
				or assert(MB.__index(Buffer, s), (&#039;&amp;quot; %s &amp;quot; does not match any available Module:Buffer function&#039;):format(s))(Buffer, ...)--getParent is a one-way trip so one-time assert not expensive&lt;br /&gt;
			) or Buffer&lt;br /&gt;
	end&lt;br /&gt;
	local function MBselect(n, ...)--helper for :_out and :_str&lt;br /&gt;
		local n, seps = n - 1, {select(2, ...)}&lt;br /&gt;
		if type(seps[n])==&#039;table&#039; then &lt;br /&gt;
			if buffHTML and rawget(seps[n], buffHTML) then return ... end&lt;br /&gt;
			setmetatable(seps, {__index = setmetatable(seps[n], {__index = function(t) return rawget(t, 1) end})})[n] = nil&lt;br /&gt;
		end&lt;br /&gt;
		return ..., seps&lt;br /&gt;
	end&lt;br /&gt;
	local _inHTML do local lastBuffer, lastHTML&lt;br /&gt;
		local function init(...)--init replaced and new version called on return&lt;br /&gt;
			local create, mwFunc = mw.html.create do&lt;br /&gt;
				local mwHTMLmeta = getmetatable(create())&lt;br /&gt;
				buffHTML, mwFunc, _inHTML = setmetatable(mw.clone(mwHTMLmeta), getmetatable(MB)), mwHTMLmeta.__index--buffHTML declared near top of module; remove _inHTML from outer scope&lt;br /&gt;
				function init(nodes, ...)&lt;br /&gt;
					local name, args, tag = select(... and type(...)==&#039;table&#039; and 1 or 2, nil, ...)&lt;br /&gt;
					tag = create(Valid(name), args)&lt;br /&gt;
					if nodes then table.insert(nodes, tag.parent and tag or rawset(tag, &#039;parent&#039;, parent[nodes])) end&lt;br /&gt;
					if args then&lt;br /&gt;
						local a, b = args.selfClosing, args.parent&lt;br /&gt;
						args.selfClosing, args.parent = nil&lt;br /&gt;
						if next(args) then Element._add(parent(tag.nodes, tag), args) end&lt;br /&gt;
						args.selfClosing, args.parent = a, b--in case args is reused&lt;br /&gt;
					end&lt;br /&gt;
					return tag&lt;br /&gt;
				end&lt;br /&gt;
				for k, v in next, {[mw] = mwHTMLmeta,&lt;br /&gt;
					__call = function(h, v) return MBmix(spec[h.nodes] and h.nodes or spec(setmetatable(parent(h.nodes, h), MB), Element), v) end,&lt;br /&gt;
					__concat = false,--false means take from MB&lt;br /&gt;
					__eq = false&lt;br /&gt;
				} do buffHTML[k] = v or MB[k] end&lt;br /&gt;
			end&lt;br /&gt;
			local nonSelf, BHi = {tag=true,done=true,allDone=true}, buffHTML.__index do local g&lt;br /&gt;
				g = {__index = function(t, i)&lt;br /&gt;
					if gfuncs and gfuncs[i] then g.__index, gfuncs = gfuncs return g.__index[i] end&lt;br /&gt;
				end}&lt;br /&gt;
				setmetatable(nonSelf, g)&lt;br /&gt;
				setmetatable(BHi, g)&lt;br /&gt;
			end&lt;br /&gt;
			for k in next, nonSelf do--any HTML objects returned by these funcs will be granted Module:Buffer enhancements&lt;br /&gt;
				local func = mwFunc[k]&lt;br /&gt;
				BHi[k] = function(t, ...) local HTML = func(t, ...) return parent[HTML] and HTML or setmetatable(parent(HTML, t), buffHTML) end&lt;br /&gt;
			end&lt;br /&gt;
			do local function joinNode(HTML, sep)&lt;br /&gt;
					local nodes, join = HTML.nodes&lt;br /&gt;
					if noCache and rawkey[sep] or Valid(sep) then join, HTML.nodes = tostring(rawset(HTML, &#039;nodes&#039;, {MB.__call(nodes, sep)})), nodes end&lt;br /&gt;
					return join or tostring(HTML)&lt;br /&gt;
				end&lt;br /&gt;
				for k, v in next, {&lt;br /&gt;
					getParent = function(HTML, ...) lastHTML = HTML return MBi.getParent(HTML:allDone(), ...) end,--return to Buffer that created the HTML tree&lt;br /&gt;
					getBuffer = function(HTML, ...) lastHTML = HTML return isMBfunc(lastBuffer, ...) end,--return to last used&lt;br /&gt;
					killParent = function(HTML, ...) MBi.killParent(HTML:allDone(), ...) return HTML end,&lt;br /&gt;
					_out = function(HTML, ...)&lt;br /&gt;
						if ...==0 then MBi._out(HTML.nodes, ...) return HTML end&lt;br /&gt;
						lastHTML, HTML = HTML, HTML:allDone()&lt;br /&gt;
						local n, ops, seps = select(&#039;#&#039;, ...)&lt;br /&gt;
						if n &amp;gt; 1 then&lt;br /&gt;
							local ops, seps = MBselect(n, ...)&lt;br /&gt;
							return parent[HTML]:_in(joinNode(HTML, rawget(seps, 0))):_out(ops, rawset(seps, buffHTML, true))&lt;br /&gt;
						end&lt;br /&gt;
						return parent[HTML]:_(joinNode(HTML, ...))&lt;br /&gt;
					end,&lt;br /&gt;
					_str = function(HTML, ...)--does not set lastHTML&lt;br /&gt;
						if ...==0 then return joinNode(HTML, select(2, ...)) end--passing 0 strings without calling allDone()&lt;br /&gt;
						local HTML, n = HTML:allDone(), select(&#039;#&#039;, ...)&lt;br /&gt;
						if n &amp;gt; 1 then&lt;br /&gt;
							local ops, seps = MBselect(n, ...)&lt;br /&gt;
							return parent[HTML]:_in(joinNode(HTML, rawget(seps, 1))):_str(ops, rawset(seps, buffHTML, true))&lt;br /&gt;
						end&lt;br /&gt;
						return joinNode(HTML, ...)&lt;br /&gt;
					end,&lt;br /&gt;
					_parent = function(HTML, ...) table.insert(HTML.nodes, parent[HTML:allDone()]:_str(...)) return HTML end&lt;br /&gt;
				} do BHi[k] = v end&lt;br /&gt;
			end&lt;br /&gt;
			do local htmlArg, skip, outFuncs = {parent=true,selfClosing=true,tagName=true}, {}&lt;br /&gt;
				do local out local function func(nodes, ...) return out(parent[nodes], ...) end&lt;br /&gt;
					outFuncs = setmetatable({&lt;br /&gt;
						tag = function(nodes, ...) return parent(setmetatable(init(nodes, ...), buffHTML), parent[nodes]) end,&lt;br /&gt;
						done = function(b, ops)&lt;br /&gt;
							b = parent[b] &lt;br /&gt;
							while b.parent and ops~=0 do b, ops = b.parent, ops and ops - 1 or 0 end&lt;br /&gt;
							return b&lt;br /&gt;
						end&lt;br /&gt;
					}, {__index = function(nodes, i)&lt;br /&gt;
						if rawget(BHi, i) then out = BHi[i] return func end--rawget to exclude globals&lt;br /&gt;
					end})&lt;br /&gt;
				end&lt;br /&gt;
				Element = {&lt;br /&gt;
					_add = function(nodes, t)&lt;br /&gt;
						for k, v in MBpairs(t), t, skip[t] do (v~=true and MBmix or noOp)(nodes, v) end&lt;br /&gt;
						local HTML = parent[nodes] for k, v in MBpairs(t, false) do&lt;br /&gt;
							if htmlArg[k] then HTML[k] = v&lt;br /&gt;
							elseif v and v~=true then&lt;br /&gt;
								if nonSelf[k] then&lt;br /&gt;
									if k==&#039;tag&#039; then&lt;br /&gt;
										if type(v)==&#039;table&#039; then&lt;br /&gt;
											skip[v], k = 1, rawset(create(Valid(v[1])), &#039;parent&#039;, HTML)&lt;br /&gt;
											Element._add(spec(parent(k.nodes, k, table.insert(nodes, k)), Element), v)&lt;br /&gt;
											if k.selfClosing then k.nodes = nil else spec[k.nodes], parent[k.nodes] = nil end--free memory/reduce clutter; parent ref will auto-unset when k.nodes is nil&lt;br /&gt;
											if not k.tagName then k.styles, k.attributes = nil end&lt;br /&gt;
										else table.insert(nodes, create(v)) end&lt;br /&gt;
									elseif mwFunc[k] then&lt;br /&gt;
										if k==&#039;done&#039; and tonumber(v)~=v and v[1] and tonumber(v[1])==v[1] then skip[v] = 1 end&lt;br /&gt;
										MBmix(outFuncs[k](nodes, skip[v] and v[1]).nodes, v)&lt;br /&gt;
									elseif v[1] or v[2] then&lt;br /&gt;
										k = MBi[k](nodes, unpack(v, 1, rawset(skip, v, k==&#039;_B&#039; and 1 or 2)[v]))&lt;br /&gt;
										Element._add(getmetatable(k) and rawget(k, &#039;nodes&#039;) or k, v)--if k is not a table, then v should not contain any extra keys or this may error.&lt;br /&gt;
									else MBi[k](nodes, v) end--k probably == &#039;_G&#039; or &#039;_R&#039;&lt;br /&gt;
								elseif mwFunc[k] then&lt;br /&gt;
									if type(v)~=&#039;table&#039; or rawget(v, &#039;nodes&#039;) then mwFunc[k](HTML, v)&lt;br /&gt;
									else&lt;br /&gt;
										local css = k==&#039;css&#039;&lt;br /&gt;
										for x, y in MBpairs(v, true) do (y and y~=true and mwFunc[k] or noOp)(HTML, css and x:gsub(&#039;_&#039;, &#039;-&#039;) or x, y) end--iterate non-numbers first&lt;br /&gt;
										for _, y in MBpairs(v, nil) do (y and y~=true and mwFunc[k] or noOp)(HTML, y) end--don&#039;t bother with gsub since text must be quoted anyhow&lt;br /&gt;
									end&lt;br /&gt;
								elseif rawget(Element, k) or rawget(MBi, k) then&lt;br /&gt;
									if tonumber(v)==v or v[1]==nil or getmetatable(v) then (Element[k] or MBi[k])(nodes, v)--v is probably string-able object, or a table to be handled by :_all&lt;br /&gt;
									else (Element[k] or MBi[k])(nodes, unpack(v, 1, table.maxn(v))) end--v is definately a table&lt;br /&gt;
								else mwFunc.css(HTML, k:gsub(&#039;_&#039;, &#039;-&#039;, 1), tostring(v)) end--oddly enough, :_add clocked its fastest runtime after adding auto-gsub as a feature&lt;br /&gt;
								skip[v] = nil&lt;br /&gt;
							end&lt;br /&gt;
						end&lt;br /&gt;
						return nodes&lt;br /&gt;
					end&lt;br /&gt;
				}&lt;br /&gt;
				local tempMeta = {mode=&#039;v&#039;, copy={styles=true,attributes=true}}&lt;br /&gt;
				function tempMeta.__index(t, i) return tempMeta.copy[i] and rawset(t, i, MBi._cc(false, 0, t.orig[i]))[i] or t.orig[i] end&lt;br /&gt;
				rawkey[setmetatable(Element, {__index = outFuncs, __concat=function(Element, v) return setmetatable({nodes=spec({}, Element),orig=parent[v]}, tempMeta) end})] = math.huge&lt;br /&gt;
			end&lt;br /&gt;
			function MBi:getHTML(...)&lt;br /&gt;
				lastBuffer = self&lt;br /&gt;
				if ... then&lt;br /&gt;
					if select(&#039;#&#039;, ...)==1 then return not rawkey[s] and tostring(...):match&#039;^_&#039; and BHi[...] and BHi[...](lastHTML) or lastHTML(...)&lt;br /&gt;
					else return assert(BHi[...], (&#039;&amp;quot; %s &amp;quot; does not match any mw.html or Buffer-mw.html function&#039;):format(tostring(...)))(lastHTML, select(2, ...)) end&lt;br /&gt;
				end&lt;br /&gt;
				return lastHTML&lt;br /&gt;
			end&lt;br /&gt;
			function MBi:_html(...) return MBi._(self, lastHTML, select(spec[self]==Element and select(&#039;#&#039;, ...)==0 and 1 or 2, true, ...)) end&lt;br /&gt;
			return init(...)&lt;br /&gt;
		end&lt;br /&gt;
		function _inHTML(self, ...)&lt;br /&gt;
			local HTML = init(nil, ...)&lt;br /&gt;
			if HTML.selfClosing and spec[self]==Element then self.last_concat = table.insert(self, HTML) return self end&lt;br /&gt;
			lastBuffer, lastHTML = self, setmetatable(parent(HTML, self), buffHTML)--set after &#039;args&#039; table processed by :_add&lt;br /&gt;
			return HTML&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
	local _var, unbuild do local prev, rebuild&lt;br /&gt;
		local function init(...)--init replaced before return&lt;br /&gt;
			local function pick(b, v) return b and table.insert(b, v) or v end&lt;br /&gt;
			local function c(a, num) return rawset(a.a or a, 0, a[0] and a[0] + a.c or num and a[1] or a[1]:byte())[0] end&lt;br /&gt;
			local same, build, alt = {__tostring = function(a, b) return a.a[0] and pick(b, a.a.string and string.char(a.a[0]) or a.a.table and a.a[1][a.a[0]] or a.a[0]) end}, {&lt;br /&gt;
				__index = {c = 1},&lt;br /&gt;
				__tostring = function(t) return t:_build() end,&lt;br /&gt;
				table = function(a, b) local i = next(a[1], a[0]) or a[0]==#a[1] and next(a[1]) return pick(b, rawset(a.a or a, 0, i)[1][i]) end,--change rate (a.c) ignored since users control the table&#039;s contents&lt;br /&gt;
				number = function(a, b) return pick(b, c(a, true)) end,&lt;br /&gt;
				string = function(a, b) return pick(b, string.char(c(a))) end&lt;br /&gt;
			}, {__index = function(a, i) return a.a[i] end, __tostring = function(a, b) return (rawget(a, 0) and a[0]==tostring(a[0]) and rawset(a, 0, a[0]:byte()) or a).a._build(a, b) end}&lt;br /&gt;
			local function shift(t, c)&lt;br /&gt;
				t[0] = t[0] and t[0] + c or t:_build() and t[0] - t.c + c&lt;br /&gt;
				if t.table then t[0] = (t[0] - 1) % #t[1] + 1 end&lt;br /&gt;
			end&lt;br /&gt;
			function rebuild(...)&lt;br /&gt;
				local v, c = ...&lt;br /&gt;
				if v or select(&#039;#&#039;, ...)==0 then&lt;br /&gt;
					if v and not c then return prev end&lt;br /&gt;
					local meta, c = select(v and 1 or 3, alt, c, same, 0)&lt;br /&gt;
					return setmetatable({a = prev, _build = meta.__tostring, c = c}, meta)&lt;br /&gt;
				elseif v==nil then--no-op&lt;br /&gt;
				elseif c then shift(prev, c)--v == false&lt;br /&gt;
				else prev:_build() end&lt;br /&gt;
			end&lt;br /&gt;
			init, noCache = function(v, c) prev = setmetatable({v, c = c, _build = build[type(v)] or v, [type(v)] = true, alt = {}}, build) return prev end, true&lt;br /&gt;
			return init(...)&lt;br /&gt;
		end&lt;br /&gt;
		function unbuild(sep)&lt;br /&gt;
			for k, v in MBpairs(sep, nil) do&lt;br /&gt;
				k = getmetatable(v) if k and (k==build or k==alt) then shift(v.a or v, -v.c) end&lt;br /&gt;
			end&lt;br /&gt;
		end&lt;br /&gt;
		function _var(self, ...)&lt;br /&gt;
			local obj if ... and ...~=true then obj = init(...)&lt;br /&gt;
			elseif prev then&lt;br /&gt;
				if ...~=false then obj = rebuild(...)&lt;br /&gt;
				else rebuild(...) end&lt;br /&gt;
			end&lt;br /&gt;
			return obj and MBi._(self, obj, nil, true) or self&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
	local lib; MBi = setmetatable({stream = _stream,&lt;br /&gt;
		_inHTML = _inHTML,&lt;br /&gt;
		_var = _var,&lt;br /&gt;
		_ = function(self, v, ...)&lt;br /&gt;
			local at, raw = select(select(&#039;#&#039;, ...)==1 and ...==true and 1 or 2, nil, ...)&lt;br /&gt;
			if raw then rawkey[self] = math.huge else v = Valid(v) end&lt;br /&gt;
			if v or raw then&lt;br /&gt;
				if at or rawkey[self] then raw = #self end--if length increases by more than one after table.insert, then set rawkey[self] = math.huge; rawkey[self] may be equal to a previous &#039;at&#039;&lt;br /&gt;
				at, self.last_concat = at and (tonumber(at)~=at and raw + at or at)&lt;br /&gt;
				table.insert(self, select(at and 1 or 2, at, v))&lt;br /&gt;
				if at and at &amp;lt; 0 or raw and #self - raw &amp;gt; 1 then rawkey[self] = math.huge elseif at and #self==raw then rawkey[self] = rawkey[self] and math.max(rawkey[self], at) or at end&lt;br /&gt;
			end--above line looks bizarre because one table.insert op may make length jump from 0 to 8: local wtf={[2]=2,[4]=4,[8]=8}mw.log(#wtf,table.insert(wtf,1),#wtf)&lt;br /&gt;
			return self&lt;br /&gt;
		end,&lt;br /&gt;
		_nil = function(self, at, ...)&lt;br /&gt;
			if ...~=true and ...~=false then--faster than type(...) ~= &#039;boolean&#039;&lt;br /&gt;
				if not at or at==&#039;0&#039; then&lt;br /&gt;
					self[#self] = ... if ... then rawkey[self] = math.huge end&lt;br /&gt;
				else&lt;br /&gt;
					local n, v = tonumber(at), ...&lt;br /&gt;
					if n~=at then &lt;br /&gt;
						if n then n = #self + at&lt;br /&gt;
						elseif at~=true and select(&#039;#&#039;, ...)==0 then v, n = at, #self end&lt;br /&gt;
					end&lt;br /&gt;
					if n then &lt;br /&gt;
						if v==nil and n &amp;gt; 0 then table.remove(self, n)&lt;br /&gt;
						else self[math.floor(n)], rawkey[self] = v, math.huge end--floor position for consistency with Table library&lt;br /&gt;
					end&lt;br /&gt;
				end&lt;br /&gt;
				self.last_concat = nil&lt;br /&gt;
			end&lt;br /&gt;
			return self&lt;br /&gt;
		end,&lt;br /&gt;
		_all = function(self, t, valKey)&lt;br /&gt;
			for k, v in MBpairs(t) do MBmix(self, v, valKey) end&lt;br /&gt;
			for k, v in valKey and MBpairs(t, false) or noOp, t do&lt;br /&gt;
				if tonumber(v) then MBi._(self, k, v)--self not always a buffer&lt;br /&gt;
				elseif rawget(MBi, k) and v and v~=true then&lt;br /&gt;
					if v[1]==nil or getmetatable(v) then MBi[k](self, v)&lt;br /&gt;
					else MBi[k](self, unpack(v, 1, table.maxn(v))) end&lt;br /&gt;
				end&lt;br /&gt;
			end&lt;br /&gt;
			return self&lt;br /&gt;
		end,&lt;br /&gt;
		_str = function(t, ...)&lt;br /&gt;
			local n = select(&#039;#&#039;, ...)&lt;br /&gt;
			if n &amp;gt; 1 then&lt;br /&gt;
				local k, ops, seps, r = 2, MBselect(n, ...)&lt;br /&gt;
				r = MB(t(seps[1]))&lt;br /&gt;
				while parent[t] and ops &amp;gt; 1 and r:_(parent[t](seps[k]), 1) do t, k, ops = parent[t], k + 1, ops - 1 end&lt;br /&gt;
				return table.concat(r, seps[k] or nil)&lt;br /&gt;
			end&lt;br /&gt;
			return MB.__call(t, ...)&lt;br /&gt;
		end,&lt;br /&gt;
		_in = function (self, ...) return parent(MB(...), self) end,&lt;br /&gt;
		_out = function(t, ...)&lt;br /&gt;
			if ...==0 then return parent(t, parent[t], MBi._cc(t, t, MB.__call(t, (select(2, ...))), getmetatable(t))) end--love how :_cc needed nothing new to implement this *self pat on back*&lt;br /&gt;
			local n = select(&#039;#&#039;, ...)&lt;br /&gt;
			if n &amp;gt; 1 then&lt;br /&gt;
				local k, ops, seps = 1, MBselect(n, ...)&lt;br /&gt;
				while parent[t] and ops &amp;gt; 0 do t, k, ops = parent[t]:_(t(seps[k])), k + 1, ops - 1 end&lt;br /&gt;
			elseif parent[t] then return parent[t]:_(t(...)) end&lt;br /&gt;
			return t&lt;br /&gt;
		end,&lt;br /&gt;
		_cc = function(self, clear, copy, meta)&lt;br /&gt;
			if clear then&lt;br /&gt;
				if rawequal(clear, copy) then return self, spec[MBi._cc] and setmetatable(spec[MBi._cc], MB)--rawequal to avoid re-string via __eq in case both are different Buffer objects&lt;br /&gt;
				elseif copy==true then copy = self end&lt;br /&gt;
				if clear~=0 then&lt;br /&gt;
					assert(type(clear)==&#039;table&#039;, debug.traceback(&#039;Buffer:_cc can only &amp;quot;clear&amp;quot; tables. Did you forget to call with a colon?&#039;, 2))--errors can be hard to trace without this&lt;br /&gt;
					for k in self and next or noOp, clear do rawset(clear, k, nil) end&lt;br /&gt;
				else return MBi._cc(false, {unpack(copy)}, copy) end--copy length w/o empty strings; recursion to avoid self = false causing garbage collection (non-weak child may exist)&lt;br /&gt;
				if self==false or copy and type(copy)==&#039;table&#039; then--self==false means copy is a table (saves a type op for recursive calls)&lt;br /&gt;
					meta = meta or getmetatable(copy)&lt;br /&gt;
					if self and #copy &amp;gt; 1 then--preserves length with empty strings; developed from studying http://www.lua.org/source/5.1/ltable.c.html		&lt;br /&gt;
						local n, null, i, e = #copy, {}, math.ldexp(2, select(2, math.frexp(#copy)) - 2)&lt;br /&gt;
						e, spec[MBi._cc], parent[null] = i - 1, null, clear&lt;br /&gt;
						for k = 1, e do table.insert(clear, false) end&lt;br /&gt;
						while i&amp;lt;=n do table.insert(clear, i, &#039;&#039;) i, null[i] = i + math.ldexp(2, select(2, math.frexp(n - i)) - 2), &#039;&#039; end&lt;br /&gt;
						for k = 1, e do rawset(clear, k, nil) end&lt;br /&gt;
					end&lt;br /&gt;
					for k, v in next, copy do rawset(clear, k, type(v)==&#039;table&#039; and MBi._cc(false, 0, v) or v) end&lt;br /&gt;
				elseif copy then rawset(clear, 1, (Valid(copy))) end&lt;br /&gt;
				rawkey[setmetatable(clear, meta)], parent[clear] = rawkey[copy], parent[copy]&lt;br /&gt;
			end&lt;br /&gt;
			return self and rawset(self, &#039;last_concat&#039;, nil) or clear&lt;br /&gt;
		end,&lt;br /&gt;
		_parent = function(self, ...) return parent[self] and MBi._(self, parent[self]:_str(...)) or self end,&lt;br /&gt;
		getParent = function(self, ...) return isMBfunc(parent[self] or parent[parent(self, setmetatable({}, MB))], ...) end,&lt;br /&gt;
		killParent = function(self, ...) return parent[self] and isMBfunc(parent[self], ...) and parent(self) or self end,&lt;br /&gt;
		_build = function(self, t) table.insert(t, self()) end,--for compatibility with mw.html:node()&lt;br /&gt;
		last_concat = false--prevent library check&lt;br /&gt;
	}, {__index = function(t, i)--import string, mw.text, and mw.ustring libraries on an as-needed basis&lt;br /&gt;
		local func = string[i] or mw.text[i] or mw.ustring[i] or type(i)==&#039;string&#039; and mw.ustring[i:match&#039;^u(.+)&#039;] if func then&lt;br /&gt;
			lib	= lib or function (s, f, ...)&lt;br /&gt;
				if parent[s] and next(s)==nil then return s:_((f(tostring(parent[Element and (spec[s]==Element and s:allDone() or spec[parent[s]]==Element and parent[s]) or s]), ...))) end&lt;br /&gt;
				return f(tostring(s), ...)--not using ternary/logical operators here to allow multiple return values&lt;br /&gt;
			end&lt;br /&gt;
			return rawset(t, i, i:match&#039;^u?gsub&#039; and function(self, p, r, ...)return lib(self, func, p, r or &#039;&#039;, ...)end--Why are ugsub/gsub special? because empty strings are against my religion!&lt;br /&gt;
				or function(self, ...)return lib(self, func, ...)end)[i]&lt;br /&gt;
		end&lt;br /&gt;
	end})&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function MBmix(t, v, ...) return v and ((type(v)~=&#039;table&#039; or getmetatable(v)) and MBi._(t, v) or (select(&#039;#&#039;, ...)==0 and spec[t] and spec[t]._add or MBi._all)(t, v, ...)) or t end--:_all always passes two args&lt;br /&gt;
&lt;br /&gt;
local _G, new_G = _G--localize _G for console testing (console _G ~= module _G)&lt;br /&gt;
return setmetatable({__index = function(t, i) return spec[t] and spec[t][i] or MBi[i] end,&lt;br /&gt;
	__call = function(t, ...)&lt;br /&gt;
		local rawsep, sep, i, j, raw = noCache and rawkey[...] and ..., ...&lt;br /&gt;
		if i or j or rawsep or Valid(sep) then&lt;br /&gt;
			raw, sep, i, j = rawkey[spec[t]] or rawkey[t], rawsep or Valid(sep), i and (i~=tonumber(i) and i + #t or i), j and (j~=tonumber(j) and j + #t or j)&lt;br /&gt;
			if rawsep or raw and (raw&amp;gt;=(j or #t) or i &amp;lt; 1) then&lt;br /&gt;
				raw, i, j = {}, i and math.floor(i), j and math.floor(j)--floor for consistency with table.concat(t, sep, i, j), which ignores decimals&lt;br /&gt;
				raw.lc, t.last_concat = t.last_concat--temporarily unset last_concat to prevent disqualification from mapless iteration&lt;br /&gt;
				for k, v in MBpairs(t) do&lt;br /&gt;
					if raw[1] or not i or k&amp;gt;=i then if j and k &amp;gt; j then break end&lt;br /&gt;
						if raw.s then raw.s = table.insert(raw, tostring(sep)) end--if sep contains v and v is a Buffer-variable, sep must be strung before v&lt;br /&gt;
						k = Valid(v) if k then&lt;br /&gt;
							raw.s = rawsep or sep and raw[1] and table.insert(raw, sep)&lt;br /&gt;
							table.insert(raw, k)&lt;br /&gt;
						end&lt;br /&gt;
					end&lt;br /&gt;
				end&lt;br /&gt;
				if rawsep and not raw.s then raw[#raw] = unbuild(sep) end--unbuild rawsep if final index in t was invalid&lt;br /&gt;
				t.last_concat = raw.lc return table.concat(raw)&lt;br /&gt;
			end&lt;br /&gt;
			return table.concat(t, sep, i and math.max(i, 1), j and math.min(j, #t))&lt;br /&gt;
		end&lt;br /&gt;
		return MB.__tostring(t)&lt;br /&gt;
	end,&lt;br /&gt;
	__tostring = function(t)&lt;br /&gt;
		if t.last_concat then return t.last_concat end&lt;br /&gt;
		local r = rawkey[spec[t]] or rawkey[t]&lt;br /&gt;
		r = table.concat(r and r&amp;gt;=#t and MBi._all({}, t) or t)&lt;br /&gt;
		return (noCache or rawset(t, &#039;last_concat&#039;, r)) and r&lt;br /&gt;
	end,&lt;br /&gt;
	__concat = function(a, b)&lt;br /&gt;
		if buffHTML then&lt;br /&gt;
			for k = 1, 2 do local v = select(k, a, b)--faster than for k, v in pairs{a, b} do&lt;br /&gt;
				if v and spec[v] and spec[v]==Element then&lt;br /&gt;
					if parent[v].selfClosing then&lt;br /&gt;
						if rawequal(a, b) then return (not noCache or parent[v].tagName) and v:_str(0):rep(2) or v:_str(0)..v:_str(0) end--rawequal avoids premature tostring of Buffer:_var objects;&lt;br /&gt;
						b, a = select(k, b, parent[v], a)&lt;br /&gt;
					else local temp = Element .. v --helper method; returns a mirror of parent[v]&lt;br /&gt;
						MBmix(MBmix(parent(temp.nodes, temp), a), k==1 and spec[b]==Element and parent[b] or b)&lt;br /&gt;
						return buffHTML.__tostring(setmetatable(temp, {__index=parent[v], __mode=&#039;v&#039;}))--switch from tempMeta to avoid MBi._cc op of styles/attributes&lt;br /&gt;
					end&lt;br /&gt;
				end&lt;br /&gt;
			end&lt;br /&gt;
		end&lt;br /&gt;
		return table.concat(MBmix(MBmix({}, a), b))&lt;br /&gt;
	end,&lt;br /&gt;
	__pairs = MBpairs,&lt;br /&gt;
	__ipairs = MBpairs,&lt;br /&gt;
	__eq = function(a, b) return tostring(a)==tostring(b) end--avoid a==b in this module; use rawequal(a,b) when they may be different Buffers (premature tostring waste ops and is bad for Buffer:_var)&lt;br /&gt;
}, {__tostring = function()return&#039;&#039;end,&lt;br /&gt;
	__call = function(self, ...) MB = MB or self&lt;br /&gt;
		if new_G then if ... and _G and ...==_G then new_G = ... end&lt;br /&gt;
		elseif ... and (...==_G or type(...)==&#039;table&#039; and (...)._G==...) then&lt;br /&gt;
			local Nil, mG = {}, (...):getmetatable() or (...):setmetatable{}:getmetatable()&lt;br /&gt;
			new_G, _G, gfuncs = ..., ..., {--gfuncs stored for Buffer:_inHTML; new_G is a is a Module:Buffer local declared just before the final return statement.&lt;br /&gt;
				_G = function(self, i, ...)&lt;br /&gt;
					local X, save = rawget(new_G, i), select(&#039;#&#039;, ...)==0 and self or ...&lt;br /&gt;
					if i and i~=true and not (X and save and rawequal(X, save)) and rawset(new_G, i, save) and (X~=nil or save==nil and new_G[i]~=nil) then--rawequal in case X is another buffer&lt;br /&gt;
						local mG = getmetatable(new_G) or {__call=mG.__call}&lt;br /&gt;
						if mG.__index then pcall(rawset, mG.__index, i, X)&lt;br /&gt;
						else mG.__index = setmetatable(new_G, mG) and {[i] = X} end&lt;br /&gt;
					end&lt;br /&gt;
					return self, ...--avoiding __eq with rawequal(self,save) is overkill since buffers can self-save without being passed as save&lt;br /&gt;
				end,&lt;br /&gt;
				_R = function(self, i, v, m)&lt;br /&gt;
					if i~=&#039;new_G&#039; then if i and i~=true then rawset(new_G, i , v) end&lt;br /&gt;
					elseif not v or v==true or v._G~=_G then new_G = setmetatable(v~=true and v or {}, {__call = mG.__call, __index = v~=true and m~=true and (m or new_G) or nil})&lt;br /&gt;
					else new_G, (not m and (m~=nil or v==new_G) and Nil or getmetatable(v)).__index = v, m~=true and (m or new_G) or nil end--setting Nil.__index is noOp&lt;br /&gt;
					return self&lt;br /&gt;
				end,&lt;br /&gt;
				_2 = function(self, ...)&lt;br /&gt;
					if new_G[...]~=nil then return new_G[...] end--higher priority so Buffer:_G(&#039;new_G&#039;, ...) can prevent an overwrite&lt;br /&gt;
					if ...==&#039;new_G&#039; then return rawset((select(&#039;#&#039;, ...)~=1 and MBi._R(new_G, ...) or new_G), &#039;_G&#039;, _G) end&lt;br /&gt;
					return select(select(&#039;#&#039;, ...)==1 and 1 or 2, self:_G(...))--return only one value; &#039;return select(2, self:_G(...)) or self&#039; doesn&#039;t work for returning nil&lt;br /&gt;
				end,&lt;br /&gt;
				_B = function(self, v) return v or v==nil and Nil end&lt;br /&gt;
			} for k, v in next, gfuncs do MBi[k] = v end &lt;br /&gt;
			setmetatable(Nil,{__concat=MB.__concat,__newindex=noOp,__call=noOp,__tostring=noOp,__metatable=MB,__index=setmetatable({_B=MBi._B,_=function()return Nil end,last_concat=&#039;&#039;},&lt;br /&gt;
				{__index=function(t,i)return (MBi[i] or i and not tonumber(i)) and t._ or nil end})})&lt;br /&gt;
			function mG.__call(G, k, ...) return (k._G or G.type(k)==&#039;table&#039;) and (G.select(&#039;#&#039;, ...)~=1 and G.rawset(k, ...) or G:rawset(..., k) and k) or G:rawset(k, (...)) and ... end&lt;br /&gt;
		end&lt;br /&gt;
		local new = setmetatable({}, self)&lt;br /&gt;
		if ... and (...)==new_G then return select(2, ...) and MBmix(new:_G((select(2, ...))), select(3, ...)) or new end&lt;br /&gt;
		return ... and MBi._(new, ...) or new&lt;br /&gt;
	end,&lt;br /&gt;
	__index = function(t, i)&lt;br /&gt;
		MB = MB or t return MBi[i] and function(...) return MBi[i](setmetatable({}, t), select(...==t and 2 or 1,...)) end&lt;br /&gt;
	end&lt;br /&gt;
})&lt;/div&gt;</summary>
		<author><name>Indicwiki</name></author>
	</entry>
	<entry>
		<id>https://sandbox.indicwiki.org/index.php?title=Template:Asbox&amp;diff=66533</id>
		<title>Template:Asbox</title>
		<link rel="alternate" type="text/html" href="https://sandbox.indicwiki.org/index.php?title=Template:Asbox&amp;diff=66533"/>
		<updated>2026-05-11T08:16:25Z</updated>

		<summary type="html">&lt;p&gt;Indicwiki: 1 revision imported&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;#REDIRECT [[Template:Article stub box]]&lt;br /&gt;
&lt;br /&gt;
{{Redirect category shell|&lt;br /&gt;
{{R from move}}&lt;br /&gt;
{{R from modification}}&lt;br /&gt;
{{R from template shortcut}}&lt;br /&gt;
}}&lt;/div&gt;</summary>
		<author><name>Indicwiki</name></author>
	</entry>
	<entry>
		<id>https://sandbox.indicwiki.org/index.php?title=Template:Taxonomy/Osteichthyes&amp;diff=66531</id>
		<title>Template:Taxonomy/Osteichthyes</title>
		<link rel="alternate" type="text/html" href="https://sandbox.indicwiki.org/index.php?title=Template:Taxonomy/Osteichthyes&amp;diff=66531"/>
		<updated>2026-05-11T08:16:25Z</updated>

		<summary type="html">&lt;p&gt;Indicwiki: 1 revision imported&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;noinclude&amp;gt;{{pp-template}}{{High-use}}&lt;br /&gt;
&amp;lt;/noinclude&amp;gt;{{Don&#039;t edit this line {{{machine code|}}}&lt;br /&gt;
|rank=cladus&lt;br /&gt;
|link=Osteichthyes&lt;br /&gt;
|parent=Eugnathostomata&lt;br /&gt;
|refs=&amp;lt;!-- if using ECoF classes (as recent project decision), this needs a compatible source for superclass (deepfin uses Megaclass, FotW5 uses class); clade is neutral --&amp;gt;&lt;br /&gt;
}}&lt;/div&gt;</summary>
		<author><name>Indicwiki</name></author>
	</entry>
	<entry>
		<id>https://sandbox.indicwiki.org/index.php?title=Template:Taxonomy&amp;diff=66529</id>
		<title>Template:Taxonomy</title>
		<link rel="alternate" type="text/html" href="https://sandbox.indicwiki.org/index.php?title=Template:Taxonomy&amp;diff=66529"/>
		<updated>2026-05-11T08:16:23Z</updated>

		<summary type="html">&lt;p&gt;Indicwiki: 1 revision imported&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;includeonly&amp;gt;{{#if:{{{rank|}}}|&amp;lt;!--&lt;br /&gt;
Cell stating the rank: &lt;br /&gt;
--&amp;gt;&lt;br /&gt;
{{!}} {{anglicise rank|{{{rank|}}}}}:&amp;lt;!--&lt;br /&gt;
Cell stating the taxon&#039;s name, with authority:&lt;br /&gt;
DO NOT USE named parameters in the call to replace as they will strip the trailing whitespace.&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
{{!}} &amp;lt;div style=&amp;quot;display:inline&amp;quot; class=&amp;quot;{{lc:{{anglicise rank|{{{rank}}} }} }}&amp;quot;&amp;gt;{{#invoke:string|replace|{{{link}}}|. |.&amp;amp;nbsp;|count=1}}&amp;lt;/div&amp;gt;{{#if:{{{auth|}}}&lt;br /&gt;
|&amp;lt;br /&amp;gt;&amp;lt;div style=&amp;quot;font-size: 85%;&amp;quot;&amp;gt;{{{auth}}}&amp;lt;/div&amp;gt;}}&lt;br /&gt;
{{!}}-&lt;br /&gt;
}}&amp;lt;/includeonly&amp;gt;&amp;lt;noinclude&amp;gt;{{documentation}}&amp;lt;/noinclude&amp;gt;&lt;/div&gt;</summary>
		<author><name>Indicwiki</name></author>
	</entry>
	<entry>
		<id>https://sandbox.indicwiki.org/index.php?title=Template:Taxon_italics&amp;diff=66527</id>
		<title>Template:Taxon italics</title>
		<link rel="alternate" type="text/html" href="https://sandbox.indicwiki.org/index.php?title=Template:Taxon_italics&amp;diff=66527"/>
		<updated>2026-05-11T08:16:23Z</updated>

		<summary type="html">&lt;p&gt;Indicwiki: 1 revision imported&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{#invoke:TaxonItalics|main|{{{1|&amp;lt;noinclude&amp;gt;Homo sapiens&amp;lt;/noinclude&amp;gt;}}}|abbreviated={{{abbreviated|no}}}|linked={{{linked|no}}}}}&amp;lt;noinclude&amp;gt;&lt;br /&gt;
{{Documentation}}&lt;br /&gt;
&amp;lt;/noinclude&amp;gt;&lt;/div&gt;</summary>
		<author><name>Indicwiki</name></author>
	</entry>
	<entry>
		<id>https://sandbox.indicwiki.org/index.php?title=Template:Taxon_info&amp;diff=66525</id>
		<title>Template:Taxon info</title>
		<link rel="alternate" type="text/html" href="https://sandbox.indicwiki.org/index.php?title=Template:Taxon_info&amp;diff=66525"/>
		<updated>2026-05-11T08:16:23Z</updated>

		<summary type="html">&lt;p&gt;Indicwiki: 1 revision imported&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{#invoke:Autotaxobox|taxonInfo|{{{1|&amp;lt;noinclude&amp;gt;Acacia&amp;lt;/noinclude&amp;gt;}}}|{{{2|&amp;lt;noinclude&amp;gt;parent&amp;lt;/noinclude&amp;gt;}}}}}&amp;lt;noinclude&amp;gt;{{documentation}}&amp;lt;/noinclude&amp;gt;&lt;/div&gt;</summary>
		<author><name>Indicwiki</name></author>
	</entry>
	<entry>
		<id>https://sandbox.indicwiki.org/index.php?title=Template:Taxobox/species&amp;diff=66523</id>
		<title>Template:Taxobox/species</title>
		<link rel="alternate" type="text/html" href="https://sandbox.indicwiki.org/index.php?title=Template:Taxobox/species&amp;diff=66523"/>
		<updated>2026-05-11T08:16:23Z</updated>

		<summary type="html">&lt;p&gt;Indicwiki: 1 revision imported&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{#if:{{{2|}}}|&lt;br /&gt;
! colspan = 2 {{!}} &amp;lt;div style = &amp;quot;text-align: center&amp;quot;&amp;gt;[[Conservation status]]&amp;lt;/div&amp;gt;&lt;br /&gt;
{{!}}-&lt;br /&gt;
{{!}} colspan = 2 {{!}} &amp;lt;div style = &amp;quot;text-align: center&amp;quot;&amp;gt;{{#if:{{{1|}}}|{{#switch:{{{1}}}&amp;lt;!--&lt;br /&gt;
*************&lt;br /&gt;
* IUCN2.3   *&lt;br /&gt;
*************&lt;br /&gt;
--&amp;gt; | iucn2.3 | IUCN2.3 = {{#invoke:Conservation status|status|{{{1}}}|{{{2}}}|{{{3|}}}}}&amp;lt;!--&lt;br /&gt;
*************&lt;br /&gt;
* IUCN3.1   *&lt;br /&gt;
*************&lt;br /&gt;
--&amp;gt;| iucn | IUCN | iucn3.1 | IUCN3.1 = {{#invoke:Conservation status|status|{{{1}}}|{{{2}}}|{{{3|}}}}}&amp;lt;!--&lt;br /&gt;
*************&lt;br /&gt;
* EPBC      *&lt;br /&gt;
*************&lt;br /&gt;
--&amp;gt;| epbc | EPBC = {{#invoke:Conservation status|status|{{{1}}}|{{{2}}}|{{{3|}}}}}&amp;lt;!--&lt;br /&gt;
*************&lt;br /&gt;
* TNC       *&lt;br /&gt;
*************&lt;br /&gt;
--&amp;gt;| tnc | TNC | natureserve | NatureServe ={{#invoke:Conservation status|status|{{{1}}}|{{{2}}}|{{{3|}}}}}&amp;lt;!--&lt;br /&gt;
*************&lt;br /&gt;
* ESA       *&lt;br /&gt;
*************&lt;br /&gt;
--&amp;gt;| esa | ESA ={{#invoke:Conservation status|status|{{{1}}}|{{{2}}}|{{{3|}}}}} &amp;lt;!--&lt;br /&gt;
*************&lt;br /&gt;
* COSEWIC   *&lt;br /&gt;
*************&lt;br /&gt;
--&amp;gt;| cosewic | COSEWIC = {{#invoke:Conservation status|status|{{{1}}}|{{{2}}}|{{{3|}}}}} &amp;lt;!--&lt;br /&gt;
*************&lt;br /&gt;
* DECF      *&lt;br /&gt;
*************&lt;br /&gt;
--&amp;gt;| decf | DECF = {{#invoke:Conservation status|status|{{{1}}}|{{{2}}}|{{{3|}}}}} &amp;lt;!--&lt;br /&gt;
*************&lt;br /&gt;
* CITES     *&lt;br /&gt;
*************&lt;br /&gt;
--&amp;gt;| CITES | cites =  {{#invoke:Conservation status|status|{{{1}}}|{{{2}}}|{{{3}}}|{{{colour|}}}}}&amp;lt;!--&lt;br /&gt;
*************&lt;br /&gt;
* NZTCS     *&lt;br /&gt;
*************&lt;br /&gt;
--&amp;gt;| nztcs | NZTCS = {{#invoke:Conservation status|status|{{{1}}}|{{{2}}}|{{{3}}}|{{{colour|}}}}}&amp;lt;!--&lt;br /&gt;
*****************************************************************************&lt;br /&gt;
* adding support for other conservation systems using developmental module  *&lt;br /&gt;
*    - handling of existing systems are not changed for now                  *&lt;br /&gt;
*    - the module handles all the above but needs more testing              *&lt;br /&gt;
*****************************************************************************&lt;br /&gt;
--&amp;gt;| CNCFLORA | cncflora |CNCFlora = {{#invoke:Conservation status|status|{{{1}}}|{{{2}}}|{{{3}}}}}&lt;br /&gt;
| NSWBCA = {{#invoke:Conservation status|status|{{{1}}}|{{{2}}}|{{{3}}}}}&lt;br /&gt;
| qldnca | QLDNCA = {{#invoke:Conservation status|status|{{{1}}}|{{{2}}}|{{{3}}}}}&lt;br /&gt;
| rlsap | RLSAP |sanbi |SANBI = {{#invoke:Conservation status|status|{{{1}}}|{{{2}}}|{{{3}}}}}&lt;br /&gt;
|TPWCA |tpwca = {{#invoke:Conservation status|status|{{{1}}}|{{{2}}}|{{{3}}}}}&amp;lt;!--&lt;br /&gt;
********************&lt;br /&gt;
* No status system *&lt;br /&gt;
********************&lt;br /&gt;
--&amp;gt;|{{#invoke:Conservation status|status|{{{1}}}|{{{2}}}|{{{3}}}}}&amp;lt;!-- {{#switch:{{{2}}} &lt;br /&gt;
 | EX&lt;br /&gt;
 | ex = [[Extinction|Extinct]]{{#switch:{{{extinction_date|}}}|y|yes|true|=|&amp;amp;nbsp;({{{extinction_date}}})}}&lt;br /&gt;
 | CR&lt;br /&gt;
 | cr = [[Critically endangered species|Critically Endangered]]&lt;br /&gt;
 | EN&lt;br /&gt;
 | en = [[Endangered species|Endangered]]&lt;br /&gt;
 | {{{2}}}&lt;br /&gt;
}}&amp;lt;small&amp;gt;&amp;amp;nbsp;({{#if:{{{status_text|}}}|[[{{{status_text|#Conservation status}}}|See text]]|{{{1}}}}}){{{3|}}}&amp;lt;/small&amp;gt; {{#ifeq: {{NAMESPACEE}} | {{ns: 0}} | [[Category:Taxoboxes with an unrecognised status system]]|}}--&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
| {{#switch:{{{2}}}&lt;br /&gt;
 | EX&lt;br /&gt;
 | ex = [[Extinction|Extinct]]{{#switch:{{{extinction_date|}}}|y|yes|true|=|&amp;amp;nbsp;({{{extinction_date}}})}}&lt;br /&gt;
 | EW&lt;br /&gt;
 | ew = [[Extinction|Extinct]]&amp;amp;nbsp;in&amp;amp;nbsp;the&amp;amp;nbsp;wild {{#ifeq: {{NAMESPACEE}} | {{ns: 0}} | [[Category:Species extinct in the wild]][[Category:Taxoboxes needing a status system parameter]]|}}&lt;br /&gt;
 | CR&lt;br /&gt;
 | cr = [[Critically endangered species|Critically endangered]] {{#ifeq: {{NAMESPACEE}} | {{ns: 0}} | [[Category:Critically endangered species]][[Category:Taxoboxes needing a status system parameter]]|}}&lt;br /&gt;
 | EN&lt;br /&gt;
 | en = [[Endangered species|Endangered]] {{#ifeq: {{NAMESPACEE}} | {{ns: 0}} | [[Category:Endangered species]][[Category:Taxoboxes needing a status system parameter]]|}}&lt;br /&gt;
 | VU&lt;br /&gt;
 | vu = [[Vulnerable species|Vulnerable]] {{#ifeq: {{NAMESPACEE}} | {{ns: 0}} | [[Category:Vulnerable species]][[Category:Taxoboxes needing a status system parameter]]|}}&lt;br /&gt;
 | NT&lt;br /&gt;
 | nt = [[Near Threatened]] {{#ifeq: {{NAMESPACEE}} | {{ns: 0}} | [[Category:Near threatened species]][[Category:Taxoboxes needing a status system parameter]]|}}&lt;br /&gt;
 | LC&lt;br /&gt;
 | lc = [[Least Concern]] {{#ifeq: {{NAMESPACEE}} | {{ns: 0}} | [[Category:Least concern species]][[Category:Taxoboxes needing a status system parameter]]|}}&lt;br /&gt;
 | SE&lt;br /&gt;
 | se&lt;br /&gt;
 | SECURE&lt;br /&gt;
 | Secure&lt;br /&gt;
 | secure = Secure {{#ifeq: {{NAMESPACEE}} | {{ns: 0}} | [[Category:Taxoboxes needing a status system parameter]]|}}&lt;br /&gt;
 | DD&lt;br /&gt;
 | dd = [[Data deficient|Data Deficient]] {{#ifeq: {{NAMESPACEE}} | {{ns: 0}} | [[Category:Taxoboxes needing a status system parameter]]|}}&lt;br /&gt;
 | DOM&lt;br /&gt;
 | dom&lt;br /&gt;
 | DOMESTICATED&lt;br /&gt;
 | Domesticated&lt;br /&gt;
 | domesticated = Domesticated {{#ifeq: {{NAMESPACEE}} | {{ns: 0}} | [[Category:Domesticated animals]]|}}&lt;br /&gt;
 &lt;br /&gt;
 | {{{2}}} {{#ifeq: {{NAMESPACEE}} | {{ns: 0}} |[[Category:Invalid conservation status]]|}}&lt;br /&gt;
}}&amp;lt;small&amp;gt;{{{3|}}}&amp;lt;/small&amp;gt;&lt;br /&gt;
}}&amp;lt;/div&amp;gt;&lt;br /&gt;
}}&amp;lt;noinclude&amp;gt;{{documentation}}&amp;lt;/noinclude&amp;gt;&lt;/div&gt;</summary>
		<author><name>Indicwiki</name></author>
	</entry>
	<entry>
		<id>https://sandbox.indicwiki.org/index.php?title=Template:Speciesbox/trim&amp;diff=66521</id>
		<title>Template:Speciesbox/trim</title>
		<link rel="alternate" type="text/html" href="https://sandbox.indicwiki.org/index.php?title=Template:Speciesbox/trim&amp;diff=66521"/>
		<updated>2026-05-11T08:16:22Z</updated>

		<summary type="html">&lt;p&gt;Indicwiki: 1 revision imported&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{if empty|{{#invoke:String|match|s={{{1}}}|^×?[%a%-&amp;quot;]+|ignore_errors=true}}|{{#invoke:String|match|s={{{1}}}|^× [%a%-&amp;quot;]+|ignore_errors=true}}}}&amp;lt;noinclude&amp;gt;{{Documentation}}&amp;lt;/noinclude&amp;gt;&lt;/div&gt;</summary>
		<author><name>Indicwiki</name></author>
	</entry>
	<entry>
		<id>https://sandbox.indicwiki.org/index.php?title=Template:Speciesbox/parameterCheck&amp;diff=66519</id>
		<title>Template:Speciesbox/parameterCheck</title>
		<link rel="alternate" type="text/html" href="https://sandbox.indicwiki.org/index.php?title=Template:Speciesbox/parameterCheck&amp;diff=66519"/>
		<updated>2026-05-11T08:16:22Z</updated>

		<summary type="html">&lt;p&gt;Indicwiki: 1 revision imported&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;noinclude&amp;gt;{{pp-template|small=yes}}&amp;lt;/noinclude&amp;gt;{{#ifeq:{{NAMESPACENUMBER}}|0|{{#if:{{{1|}}}|{{#if:{{{2|}}}{{{3|}}}|[[Category:Speciesboxes with incorrect parameters specifying the taxon]]|{{Speciesbox/checkgenus|{{Speciesbox/getGenus|{{{1}}}|}}}}}}|{{#if:{{{2|}}}|{{#if:{{{3|}}}|{{Speciesbox/checkgenus|{{{2}}}}}|[[Category:Speciesboxes with incorrect parameters specifying the taxon]]}}|{{#if:{{{3|}}}|[[Category:Speciesboxes with incorrect parameters specifying the taxon]]|[[Category:Speciesboxes relying on page title]]}}}}}}}}&amp;lt;noinclude&amp;gt;{{documentation}}&amp;lt;/noinclude&amp;gt;&lt;/div&gt;</summary>
		<author><name>Indicwiki</name></author>
	</entry>
	<entry>
		<id>https://sandbox.indicwiki.org/index.php?title=Template:Speciesbox/name&amp;diff=66517</id>
		<title>Template:Speciesbox/name</title>
		<link rel="alternate" type="text/html" href="https://sandbox.indicwiki.org/index.php?title=Template:Speciesbox/name&amp;diff=66517"/>
		<updated>2026-05-11T08:16:22Z</updated>

		<summary type="html">&lt;p&gt;Indicwiki: 1 revision imported&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;noinclude&amp;gt;&amp;lt;!--Parameters: 1=name, 2=taxon, 3=genus, 4=species, 5=PAGENAMEBASE, 6=italic_title (obey no)&lt;br /&gt;
--&amp;gt;&amp;lt;/noinclude&amp;gt;&amp;lt;includeonly&amp;gt;{{#invoke:Automated taxobox|speciesboxName|{{{1|}}}|{{{2|}}}|{{{3|}}}|{{{4|}}}|{{{5|}}}|{{{6|}}}}}&amp;lt;/includeonly&amp;gt;&amp;lt;noinclude&amp;gt;{{documentation}}&amp;lt;/noinclude&amp;gt;&lt;/div&gt;</summary>
		<author><name>Indicwiki</name></author>
	</entry>
	<entry>
		<id>https://sandbox.indicwiki.org/index.php?title=Template:Speciesbox/getSpecies&amp;diff=66515</id>
		<title>Template:Speciesbox/getSpecies</title>
		<link rel="alternate" type="text/html" href="https://sandbox.indicwiki.org/index.php?title=Template:Speciesbox/getSpecies&amp;diff=66515"/>
		<updated>2026-05-11T08:16:22Z</updated>

		<summary type="html">&lt;p&gt;Indicwiki: 1 revision imported&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;noinclude&amp;gt;{{pp-template|small=yes}}&amp;lt;/noinclude&amp;gt;{{#if:{{{1|}}}|{{remove first word|{{{1}}}}}|{{#if:{{{2|}}}|{{{2}}}|{{remove first word|&amp;lt;includeonly&amp;gt;{{PAGENAME}}&amp;lt;/includeonly&amp;gt;&amp;lt;noinclude&amp;gt;Acacia aemula&amp;lt;/noinclude&amp;gt;}}}}}}&lt;/div&gt;</summary>
		<author><name>Indicwiki</name></author>
	</entry>
	<entry>
		<id>https://sandbox.indicwiki.org/index.php?title=Template:Speciesbox/getGenus&amp;diff=66513</id>
		<title>Template:Speciesbox/getGenus</title>
		<link rel="alternate" type="text/html" href="https://sandbox.indicwiki.org/index.php?title=Template:Speciesbox/getGenus&amp;diff=66513"/>
		<updated>2026-05-11T08:16:22Z</updated>

		<summary type="html">&lt;p&gt;Indicwiki: 1 revision imported&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{#if:{{{1|}}}|{{first word|{{{1}}}}}|{{#if:{{{2|}}}|{{{2}}}|{{first word|&amp;lt;includeonly&amp;gt;{{PAGENAME}}&amp;lt;/includeonly&amp;gt;&amp;lt;noinclude&amp;gt;Acacia aemula&amp;lt;/noinclude&amp;gt;}}}}}}&lt;/div&gt;</summary>
		<author><name>Indicwiki</name></author>
	</entry>
	<entry>
		<id>https://sandbox.indicwiki.org/index.php?title=Template:Speciesbox&amp;diff=66511</id>
		<title>Template:Speciesbox</title>
		<link rel="alternate" type="text/html" href="https://sandbox.indicwiki.org/index.php?title=Template:Speciesbox&amp;diff=66511"/>
		<updated>2026-05-11T08:16:21Z</updated>

		<summary type="html">&lt;p&gt;Indicwiki: 1 revision imported&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;noinclude&amp;gt;&amp;lt;!--&lt;br /&gt;
-====================================================================&lt;br /&gt;
-  Template:Speciesbox - Generate a taxobox infobox for species&lt;br /&gt;
-====================================================================&lt;br /&gt;
--&lt;br /&gt;
--   This template chooses parameters to send to {Taxobox/core}, to&lt;br /&gt;
--   generate a right-side taxobox infobox.  Most parameters are just&lt;br /&gt;
--   passed directly; some are explained with a comment.  When run as&lt;br /&gt;
--   stand-alone, the template shows Acacia aemula as sample output.&lt;br /&gt;
--&lt;br /&gt;
--   The genus name of the species is found by looking in order at&lt;br /&gt;
--   (1) the genus parameter&lt;br /&gt;
--   (2) the first word of the taxon parameter&lt;br /&gt;
--   (3) the first word of the page name.&lt;br /&gt;
--   The species name/specific epithet is found by looking in order at&lt;br /&gt;
--   (1) the species parameter&lt;br /&gt;
--   (2) the rest of the taxon parameter after removing the first word&lt;br /&gt;
--   (3) the rest of the page name after removing any final part in&lt;br /&gt;
--       parentheses and then removing the first word.&lt;br /&gt;
--&lt;br /&gt;
--   The genus name is then the entry into the taxonomic hierarchy.&lt;br /&gt;
--&lt;br /&gt;
--   A complication is that if the taxonomy template for the genus needs&lt;br /&gt;
--   disambiguation (i.e. is &amp;quot;Template:Taxonomy/GENUS (DISAMBIG)&amp;quot;) then&lt;br /&gt;
--   the parameters will be genus=GENUS (DISAMBIG) | species=EPITHET&lt;br /&gt;
--   Can also have genus=GENUS/QUALIFIER&lt;br /&gt;
--&lt;br /&gt;
-------------------------------- Invoke {Taxobox/core}&lt;br /&gt;
The nowiki that follows is needed because of parser bug T18700--&amp;gt;&amp;lt;/noinclude&amp;gt;&amp;lt;nowiki/&amp;gt;{{Taxobox/core&amp;lt;includeonly&amp;gt;&lt;br /&gt;
| edit link = {{if empty|{{{edit link|}}}|{{{edit_link|}}}|edit}}&amp;lt;/includeonly&amp;gt;&amp;lt;noinclude&amp;gt;&amp;lt;!--&lt;br /&gt;
  --&lt;br /&gt;
  -- fossil_range:  If the specified fossil range is a period supported&lt;br /&gt;
  -- by templates {period_start} and {next_period}, then it incorporates&lt;br /&gt;
  -- the specified range in template {geological range}, but checking&lt;br /&gt;
  -- to display properly. Otherwise, just passes parameter.&lt;br /&gt;
  --&amp;gt;&amp;lt;/noinclude&amp;gt;&lt;br /&gt;
| temporal_range = {{#if:{{{fossil_range|}}}{{{fossil range|}}}|{{#iferror:{{geological range|{{if empty|{{{temporal_range|}}}|{{{temporal range|}}}|{{{fossil_range|}}}|{{{fossil range|}}}}} }}|{{if empty|{{{temporal_range|}}}|{{{temporal range|}}}|{{{fossil_range|}}}|{{{fossil range|}}}}}|{{geological range|{{if empty|{{{temporal_range|}}}|{{{temporal range|}}}|{{{fossil_range|}}}|{{{fossil range|}}}}} }} }} | {{#if:{{{oldest fossil|}}}{{{oldest_fossil|}}}|{{geological range|{{if empty|{{{oldest fossil|}}}|{{{oldest_fossil}}}}}|{{if empty|{{{youngest fossil|}}}|{{{youngest_fossil|}}}|Recent}} }} }} }}&amp;lt;noinclude&amp;gt;&amp;lt;!-- &lt;br /&gt;
PARENT: this is the taxon whose taxonomy template is used to find the taxonomic hierarchy; if&lt;br /&gt;
not supplied as a parameter value, it defaults to the genus name.&lt;br /&gt;
Template:Taxonomy/PARENT must exist. --&amp;gt;&amp;lt;/noinclude&amp;gt;&lt;br /&gt;
| parent = &amp;lt;includeonly&amp;gt;{{{parent|{{Speciesbox/getGenus|{{{taxon|}}}|{{{genus|}}}}}}}}&amp;lt;/includeonly&amp;gt;&amp;lt;noinclude&amp;gt;Acacia&amp;lt;!--&lt;br /&gt;
DISPLAY PARENTS:&lt;br /&gt;
 Number of immediate parents to display. Defaults to 1 above species, normally the genus (which is displayed as&lt;br /&gt;
 a major rank, anyway).&lt;br /&gt;
--&amp;gt;&amp;lt;/noinclude&amp;gt;&lt;br /&gt;
| display_taxa = {{#expr:{{if empty|{{{display parents|}}}|{{{display_parents|}}}|1}}-1}}&amp;lt;noinclude&amp;gt;&amp;lt;!--&lt;br /&gt;
AUTHORITY (etc):&lt;br /&gt;
In the format &amp;quot;author, year&amp;quot;.  &lt;br /&gt;
Species-authority is redundant to binomial_authority; we&#039;ll just list it the once.  (This avoids reference-duplication errors, too. &lt;br /&gt;
| species_authority = {{if empty|{{{authority|}}}|{{{binomial authority|}}}|{{{binomial_authority|}}}}}--&amp;gt;&amp;lt;/noinclude&amp;gt;&lt;br /&gt;
| authority = {{{authority|}}}&lt;br /&gt;
| parent_authority = {{if empty|{{{parent_authority|}}}|{{{parent authority|}}}}}&lt;br /&gt;
| grandparent_authority = {{if empty|{{{grandparent_authority|}}}|{{{grandparent authority|}}}}}&lt;br /&gt;
| greatgrandparent_authority = {{if empty|{{{greatgrandparent_authority|}}}|{{{greatgrandparent authority|}}}}}&lt;br /&gt;
| greatgreatgrandparent_authority = {{if empty|{{{greatgreatgrandparent_authority|}}}|{{{greatgreatgrandparent authority|}}}}}&lt;br /&gt;
| greatgreatgreatgrandparent_authority = {{if empty|{{{greatgreatgreatgrandparent_authority|}}}|{{{greatgreatgreatgrandparent authority|}}}}}&lt;br /&gt;
| offset = 1&lt;br /&gt;
&amp;lt;noinclude&amp;gt;&amp;lt;!--&lt;br /&gt;
NAME:&lt;br /&gt;
{{Speciesbox/name}} both determines the taxobox name and whether the page title should be italicized by&lt;br /&gt;
adding the {{italic title}} template.&lt;br /&gt;
--&amp;gt;&amp;lt;/noinclude&amp;gt;&lt;br /&gt;
| name = {{Speciesbox/name|{{if empty|{{{name|}}}|&amp;lt;noinclude&amp;gt;&#039;&#039;Acacia aemula&#039;&#039;&amp;lt;/noinclude&amp;gt;}}|{{{taxon|}}}|{{{genus|}}}|{{{species|}}}|{{PAGENAMEBASE}}|{{if empty|{{{italic_title|}}}|{{{italic title|}}}|yes}}}}&amp;lt;noinclude&amp;gt;&amp;lt;!--&lt;br /&gt;
 -- colour:  (Note UK spelling here) There are two cases:&lt;br /&gt;
 1) the parameter color_as has a value – the colour is found directly using {{Taxobox colour|color_as}}&lt;br /&gt;
 2) otherwise – Module:Autotaxobox|taxoboxColour searches up the taxonomic hierarchy to try to find a taxon that&lt;br /&gt;
    determines the taxobox colour&lt;br /&gt;
--&amp;gt;&amp;lt;/noinclude&amp;gt;&lt;br /&gt;
| colour  = {{#if:{{{color_as|}}}{{{colour_as|}}}{{{color as|}}}{{{colour as|}}}|{{Taxobox colour|{{if empty|{{{color_as|}}}|{{{colour_as|}}}|{{{color as|}}}|{{{colour as|}}}}}}}|{{#invoke:Autotaxobox|taxoboxColour|&amp;lt;includeonly&amp;gt;{{{parent|{{Speciesbox/getGenus|{{{taxon|}}}|{{{genus|}}}}}}}}&amp;lt;/includeonly&amp;gt;&amp;lt;noinclude&amp;gt;Acacia&amp;lt;/noinclude&amp;gt; }} }}&lt;br /&gt;
| status  = {{{status|}}}&lt;br /&gt;
| status_system = {{if empty|{{{status system|}}}|{{{status_system|}}}}}&lt;br /&gt;
| status_ref = {{if empty|{{{status ref|}}}|{{{status_ref|}}}}}&lt;br /&gt;
| status2  = {{{status2|}}}&lt;br /&gt;
| status2_system = {{if empty|{{{status2 system|}}}|{{{status2_system|}}}}}&lt;br /&gt;
| status2_ref = {{if empty|{{{status2 ref|}}}|{{{status2_ref|}}}}}&lt;br /&gt;
| status3  = {{{status3|}}}&lt;br /&gt;
| status3_system = {{if empty|{{{status3 system|}}}|{{{status3_system|}}}}}&lt;br /&gt;
| status3_ref = {{if empty|{{{status3 ref|}}}|{{{status3_ref|}}}}}&lt;br /&gt;
| trend = {{{trend|}}}&lt;br /&gt;
| image = {{{image|}}}&lt;br /&gt;
| upright = {{if empty|{{{image_upright|}}}|{{{image upright|}}}}}&lt;br /&gt;
| image_alt = {{if empty|{{{image alt|}}}|{{{image_alt|}}}}}&lt;br /&gt;
| image_caption = {{if empty|{{{image caption|}}}|{{{image_caption|}}}}}&lt;br /&gt;
| image2 = {{{image2|}}}&lt;br /&gt;
| upright2 = {{if empty|{{{image2_upright|}}}|{{{image2 upright|}}}}}&lt;br /&gt;
| image2_alt = {{if empty|{{{image2 alt|}}}|{{{image2_alt|}}}}}&lt;br /&gt;
| image2_caption = {{if empty|{{{image2 caption|}}}|{{{image2_caption|}}}}}&lt;br /&gt;
| classification_status = {{if empty|{{{classification status|}}}|{{{classification_status|}}}}}&lt;br /&gt;
| diversity = {{{diversity|}}}&lt;br /&gt;
| diversity_ref = {{if empty|{{{diversity ref|}}}|{{{diversity_ref|}}}}}&lt;br /&gt;
| diversity_link = {{if empty|{{{diversity link|}}}|{{{diversity_link|}}}}}&lt;br /&gt;
| extinct = {{{extinct|}}}&lt;br /&gt;
| species = {{#if:{{{extinct|}}}|&amp;amp;dagger;|{{#ifeq:{{{status|}}}|EX|&amp;amp;dagger;|{{Taxon info|&amp;lt;includeonly&amp;gt;{{Speciesbox/getGenus|{{{taxon|}}}|{{{genus|}}}}}&amp;lt;/includeonly&amp;gt;&amp;lt;noinclude&amp;gt;Acacia&amp;lt;/noinclude&amp;gt;|dagger}}}}}}&amp;lt;!--&lt;br /&gt;
--&amp;gt;&#039;&#039;&#039;{{taxon italics|abbreviated=yes|&amp;lt;includeonly&amp;gt;{{Speciesbox/trim|{{Speciesbox/getGenus|{{{taxon|}}}|{{{genus|}}}}}}} {{Speciesbox/getSpecies|{{{taxon|}}}|{{{species|}}}}}&amp;lt;/includeonly&amp;gt;&amp;lt;noinclude&amp;gt;Acacia aemula&amp;lt;/noinclude&amp;gt;}}&#039;&#039;&#039;&lt;br /&gt;
| binomial = &amp;lt;span style=&amp;quot;font-weight:normal;&amp;quot;&amp;gt;{{#if:{{{extinct|}}}|&amp;amp;dagger;|{{#ifeq:{{{status|}}}|EX|&amp;amp;dagger;|{{Taxon info|&amp;lt;includeonly&amp;gt;{{Speciesbox/getGenus|{{{taxon|}}}|{{{genus|}}}}}&amp;lt;/includeonly&amp;gt;&amp;lt;noinclude&amp;gt;Acacia&amp;lt;/noinclude&amp;gt;|dagger}}}}}}&amp;lt;/span&amp;gt;&amp;lt;!--&lt;br /&gt;
--&amp;gt;{{taxon italics|&amp;lt;includeonly&amp;gt;{{Speciesbox/trim|{{Speciesbox/getGenus|{{{taxon|}}}|{{{genus|}}}}}}} {{Speciesbox/getSpecies|{{{taxon|}}}|{{{species|}}}}}&amp;lt;/includeonly&amp;gt;&amp;lt;noinclude&amp;gt;Acacia aemula&amp;lt;/noinclude&amp;gt;}}&lt;br /&gt;
| binomial_authority = {{if empty|{{{authority|}}}|{{{binomial authority|}}}|{{{binomial_authority|}}}}}&lt;br /&gt;
| subdivision = {{{subdivision|}}}&lt;br /&gt;
| subdivision_ranks = {{if empty|{{{subdivision ranks|}}}|{{{subdivision_ranks|}}}|Subspecies}}&lt;br /&gt;
| subdivision_ref = {{if empty|{{{subdivision_ref|}}}|{{{subdivision ref|}}}}}&lt;br /&gt;
| type_strain = {{if empty|{{{type strain|}}}|{{{type_strain|}}}}}&lt;br /&gt;
| type_strain_ref = {{if empty|{{{type_strain_ref|}}}|{{{type strain ref|}}}}}&lt;br /&gt;
| range_map = {{if empty|{{{range map|}}}|{{{range_map|}}}}}&lt;br /&gt;
| range_map_upright = {{if empty|{{{range_map_upright|}}}|{{{range map upright|}}}}}&lt;br /&gt;
| range_map_alt = {{if empty|{{{range map alt|}}}|{{{range_map_alt|}}}}}&lt;br /&gt;
| range_map_caption = {{if empty|{{{range map caption|}}}|{{{range_map_caption|}}}}}&lt;br /&gt;
| range_map2 = {{if empty|{{{range map2|}}}|{{{range_map2|}}}}}&lt;br /&gt;
| range_map2_upright = {{if empty|{{{range_map2_upright|}}}|{{{range map2 upright|}}}}}&lt;br /&gt;
| range_map2_alt = {{if empty|{{{range map2 alt|}}}|{{{range_map2_alt|}}}}}&lt;br /&gt;
| range_map2_caption = {{if empty|{{{range map2 caption|}}}|{{{range_map2_caption|}}}}}&lt;br /&gt;
| range_map3 = {{if empty|{{{range map3|}}}|{{{range_map3|}}}}}&lt;br /&gt;
| range_map3_upright = {{if empty|{{{range_map3_upright|}}}|{{{range map3 upright|}}}}}&lt;br /&gt;
| range_map3_alt = {{if empty|{{{range map3 alt|}}}|{{{range_map3_alt|}}}}}&lt;br /&gt;
| range_map3_caption = {{if empty|{{{range map3 caption|}}}|{{{range_map3_caption|}}}}}&lt;br /&gt;
| range_map4 = {{#invoke:Infobox mapframe|autoWithCaption}}&lt;br /&gt;
| synonyms_ref = {{if empty|{{{synonyms ref|}}}|{{{synonyms_ref|}}}}}&lt;br /&gt;
| synonyms = {{{synonyms|}}}&lt;br /&gt;
}}{{Speciesbox/parameterCheck|{{{taxon|}}}|{{{genus|}}}|{{{species|}}}}}{{#invoke:Check for unknown parameters|check|unknown={{main other|[[Category:Pages using speciesbox with unknown parameters|_VALUE_{{PAGENAME}}]]}}|preview=Page using [[Template:Speciesbox]] with unknown parameter &amp;quot;_VALUE_&amp;quot;|ignoreblank=y| mapframe_args = y | authority | binomial authority | binomial_authority | classification status | classification_status | color as | color_as | colour as | colour_as | display parents | display_parents | diversity | diversity link | diversity ref | diversity_link | diversity_ref | edit link | edit_link | extinct | fossil range | fossil_range | genus | grandparent authority | grandparent_authority | greatgrandparent authority | greatgrandparent_authority | greatgreatgrandparent authority | greatgreatgrandparent_authority | greatgreatgreatgrandparent authority | greatgreatgreatgrandparent_authority | image | image alt | image caption | image upright | image_alt | image_caption | image_upright | image2 | image2 alt | image2 caption | image2 upright | image2_alt | image2_caption | image2_upright | italic title | italic_title | name | oldest fossil | oldest_fossil | parent | parent authority | parent_authority | range map | range map alt | range map caption | range map upright | range map2 | range map2 alt | range map2 caption | range map2 upright | range map3 | range map3 alt | range map3 caption | range map3 upright | range_map | range_map_alt | range_map_caption | range_map_upright | range_map2 | range_map2_alt | range_map2_caption | range_map2_upright | range_map3 | range_map3_alt | range_map3_caption | range_map3_upright | species | status | status ref | status system | status_ref | status_system | status2 | status2 ref | status2 system | status2_ref | status2_system | status3 | status3_ref | status3_system | subdivision | subdivision ranks | subdivision ref | subdivision_ranks | subdivision_ref | synonyms | synonyms ref | synonyms_ref | taxon | temporal range | temporal_range | trend | type strain | type strain ref | type_strain | type_strain_ref | youngest fossil | youngest_fossil }}{{#invoke:Check for conflicting parameters|check&lt;br /&gt;
| template = [[Template:Speciesbox]]&lt;br /&gt;
| cat = {{main other|Category:Pages using speciesbox with conflicting parameters}}&lt;br /&gt;
| edit link; edit_link &lt;br /&gt;
| temporal_range; temporal range; fossil_range; fossil range &lt;br /&gt;
| oldest fossil; oldest_fossil &lt;br /&gt;
| youngest fossil; youngest_fossil &lt;br /&gt;
| display parents; display_parents &lt;br /&gt;
| authority; binomial authority; binomial_authority &lt;br /&gt;
| parent_authority; parent authority &lt;br /&gt;
| grandparent_authority; grandparent authority &lt;br /&gt;
| greatgrandparent_authority; greatgrandparent authority &lt;br /&gt;
| greatgreatgrandparent_authority; greatgreatgrandparent authority &lt;br /&gt;
| greatgreatgreatgrandparent_authority; greatgreatgreatgrandparent authority &lt;br /&gt;
| italic_title; italic title &lt;br /&gt;
| color_as; colour_as; color as; colour as &lt;br /&gt;
| status system; status_system &lt;br /&gt;
| status ref; status_ref &lt;br /&gt;
| status2 system; status2_system &lt;br /&gt;
| status2 ref; status2_ref &lt;br /&gt;
| image_upright; image upright &lt;br /&gt;
| image alt; image_alt &lt;br /&gt;
| image caption; image_caption &lt;br /&gt;
| image2_upright; image2 upright &lt;br /&gt;
| image2 alt; image2_alt &lt;br /&gt;
| image2 caption; image2_caption &lt;br /&gt;
| classification status; classification_status &lt;br /&gt;
| diversity ref; diversity_ref &lt;br /&gt;
| diversity link; diversity_link &lt;br /&gt;
| subdivision ranks; subdivision_ranks &lt;br /&gt;
| subdivision_ref; subdivision ref &lt;br /&gt;
| type strain; type_strain &lt;br /&gt;
| type_strain_ref; type strain ref &lt;br /&gt;
| range map; range_map &lt;br /&gt;
| range_map_upright; range map upright &lt;br /&gt;
| range map alt; range_map_alt &lt;br /&gt;
| range map caption; range_map_caption &lt;br /&gt;
| range map2; range_map2 &lt;br /&gt;
| range_map2_upright; range map2 upright &lt;br /&gt;
| range map2 alt; range_map2_alt &lt;br /&gt;
| range map2 caption; range_map2_caption &lt;br /&gt;
| range map3; range_map3 &lt;br /&gt;
| range_map3_upright; range map3 upright &lt;br /&gt;
| range map3 alt; range_map3_alt &lt;br /&gt;
| range map3 caption; range_map3_caption &lt;br /&gt;
| synonyms ref; synonyms_ref &lt;br /&gt;
}}&amp;lt;noinclude&amp;gt;&lt;br /&gt;
{{documentation}}&amp;lt;/noinclude&amp;gt;&lt;/div&gt;</summary>
		<author><name>Indicwiki</name></author>
	</entry>
	<entry>
		<id>https://sandbox.indicwiki.org/index.php?title=Module:Taxonbar/conf&amp;diff=66509</id>
		<title>Module:Taxonbar/conf</title>
		<link rel="alternate" type="text/html" href="https://sandbox.indicwiki.org/index.php?title=Module:Taxonbar/conf&amp;diff=66509"/>
		<updated>2026-05-11T08:16:19Z</updated>

		<summary type="html">&lt;p&gt;Indicwiki: 1 revision imported&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;local p = {}&lt;br /&gt;
&lt;br /&gt;
--Database entry format: { &#039;parameter name&#039;, &#039;label to display&#039;, propertyId in Wikidata or &#039;URL&#039; }&lt;br /&gt;
--&lt;br /&gt;
-----------------------------------------------------------------------------------------------&lt;br /&gt;
--| If propertyId is...    | then...                                                          |&lt;br /&gt;
--|------------------------|------------------------------------------------------------------|&lt;br /&gt;
--| a Wikidata property ID | it must be a number without quotes                               |&lt;br /&gt;
--| an external URL        | it must be in quotes and begin with http://, https://, or //     |&lt;br /&gt;
--|                        |   The ID should be represented by $1                             |&lt;br /&gt;
--|                        |   (e.g. &#039;https://en.wikipedia.org/wiki/$1&#039;)                      |&lt;br /&gt;
--| an interwiki URL       | put the interwiki name, a colon, and $1 in quotes (e.g. &#039;en:$1&#039;) |&lt;br /&gt;
--| set to 0               | that database won&#039;t show unless forced; taxon link suppressed    |&lt;br /&gt;
--| set to its negative    | that database won&#039;t show unless forced; taxon link allowed       |&lt;br /&gt;
-----------------------------------------------------------------------------------------------&lt;br /&gt;
p.databases = {&lt;br /&gt;
	{ &#039;Wikidata&#039;, &#039;[[Wikidata]]&#039;, &#039;Wikidata:$1&#039; }, --for ordering purposes: 1st&lt;br /&gt;
	{ &#039;Wikispecies&#039;, &#039;[[Wikispecies]]&#039;, &#039;Wikispecies:$1&#039; }, --for ordering purposes: 2nd (if available)&lt;br /&gt;
	&lt;br /&gt;
	--Wikidata properties for identifing taxa&lt;br /&gt;
	{ &#039;ABA&#039;, &#039;[[American Birding Association|ABA]]&#039;, 4526 },&lt;br /&gt;
	{ &#039;ADW&#039;, &#039;[[Animal Diversity Web|ADW]]&#039;, 4024 },&lt;br /&gt;
	{ &#039;AFD&#039;, &#039;[[Australian Faunal Directory|AFD]]&#039;, 6039 },&lt;br /&gt;
	{ &#039;AfroMoths&#039;, &#039;AfroMoths&#039;, 6093 }, ---[[AfroMoths]] DNE as of 2/2026&lt;br /&gt;
	{ &#039;AlgaeBase&#039;, &#039;[[AlgaeBase]]&#039;, 1348 },&lt;br /&gt;
	{ &#039;AmphibiaWeb&#039;, &#039;[[AmphibiaWeb]]&#039;, 5036 },&lt;br /&gt;
	{ &#039;AntWeb&#039;, &#039;[[AntWeb]]&#039;, 5299 },&lt;br /&gt;
	{ &#039;AoI&#039;, &#039;AoI&#039;, 5003 }, ---[[Amphibians of India]] DNE as of 2/2026&lt;br /&gt;
	{ &#039;AoFP&#039;, &#039;AoFP&#039;, 6159 }, ---[[Atlas of Florida Plants]] DNE as of 2/2026&lt;br /&gt;
	{ &#039;APA&#039;, &#039;APA&#039;, 6137 }, ---[[Alabama Plant Atlas]] DNE as of 2/2026&lt;br /&gt;
	{ &#039;APDB&#039;, &#039;APDB&#039;, 2036 }, ---[[African Plant Database]] DNE as of 2/2026&lt;br /&gt;
	{ &#039;Aphid Species File&#039;, &#039;Aphid Species File&#039; , 12767}, ---[[Aphid Species File]] DNE as of 2/2026&lt;br /&gt;
	{ &#039;APNI&#039;, &#039;[[Australian Plant Name Index|APNI]]&#039;, 5984 },&lt;br /&gt;
	{ &#039;APSA&#039;, &#039;APSA&#039;, 2809 }, ---[[Australasian Pollen and Spore Atlas]] DNE as of 2/2026&lt;br /&gt;
	{ &#039;Araneae&#039;, &#039;Araneae&#039;, 3594 }, ---[[]] DNE as of 2/2026&lt;br /&gt;
--	{ &#039;ARKive&#039;, &#039;[[ARKive]]&#039;, 2833 }, --went dead in 2019; the archived links provided by Wikidata don&#039;t link to content&lt;br /&gt;
	{ &#039;ASW&#039;, &#039;[[Amphibian Species of the World|ASW]]&#039;, 5354 },&lt;br /&gt;
--	{ &#039;ALA&#039;, &#039;[[Atlas of Living Australia]]&#039;, 7051 },&lt;br /&gt;
	{ &#039;ATRF&#039;, &#039;[[Australian Tropical Rainforest Plants|ATRF]]&#039;, 6904 },&lt;br /&gt;
	{ &#039;AusFungi&#039;, &#039;[[Australian online fauna &amp;amp; flora databases|AusFungi]]&#039;, 9076 },&lt;br /&gt;
	{ &#039;AusLichen&#039;, &#039;[[Australian online fauna &amp;amp; flora databases|AusLichen]]&#039;, 9093 },&lt;br /&gt;
	{ &#039;Avibase&#039;, &#039;[[Avibase]]&#039;, 2026 },&lt;br /&gt;
	{ &#039;BacDive&#039;, &#039;[[BacDive]]&#039;, 2946 },&lt;br /&gt;
	{ &#039;Bamona&#039;, &#039;BAMONA&#039;, 3398 }, ---[[Butterflies and Moths of North America]] DNE as of 2/2026&lt;br /&gt;
	{ &#039;BHL&#039;, &#039;[[Biodiversity Heritage Library|BHL]]&#039;, 687 },&lt;br /&gt;
	{ &#039;BioLib&#039;, &#039;BioLib&#039;, 838 }, ---[[BioLib]] DNE as of 2/2026&lt;br /&gt;
	{ &#039;BirdLife&#039;, &#039;[[BirdLife International|BirdLife]]&#039;, 5257 },&lt;br /&gt;
	{ &#039;BirdLife-Australia&#039;, &#039;[[BirdLife Australia|BirdLife-Australia]]&#039;, 6040 },&lt;br /&gt;
	{ &#039;BOLD&#039;, &#039;[[Barcode of Life Data System|BOLD]]&#039;, 3606 },&lt;br /&gt;
	{ &#039;bow&#039;, &#039;[[Birds of the World|BOW]]&#039;, 3444 }, --uses eBird identifier (a common identifier for all Cornell Ornithology Labs databases)&lt;br /&gt;
	{ &#039;BTO&#039;, &#039;[[British Trust for Ornithology|BTO]]&#039;, 4798 }, --BTO Birds of Britain ID (links to page that includes the code)&lt;br /&gt;
--	{ &#039;BTO&#039;, &#039;[[British Trust for Ornithology|BTO]]&#039;, 4567 }, --BTO five-letter code (no link)&lt;br /&gt;
	{ &#039;BugGuide&#039;, &#039;[[BugGuide]]&#039;, 2464 },&lt;br /&gt;
	{ &#039;ButMoth&#039;, &#039;ButMoth&#039;, 3060 },&lt;br /&gt;
	{ &#039;Calflora&#039;, &#039;Calflora&#039;, 3420 }, ---[[Calflora]] DNE as of 2/2026, but [[Draft:Calflora]] available&lt;br /&gt;
	{ &#039;Cal-IPC&#039;, &#039;Cal-IPC&#039;, 6176 }, ---[[California Invasive Plant Council]] DNE as of 2/2026&lt;br /&gt;
	{ &#039;CoL&#039;, &#039;[[Catalogue of Life|CoL]]&#039;, 10585 },&lt;br /&gt;
	{ &#039;Center&#039;, &#039;[[Center for Biological Diversity|Center]]&#039;, 6003 },&lt;br /&gt;
	{ &#039;CMS&#039;, &#039;[[Convention on the Conservation of Migratory Species of Wild Animals|CMS]]&#039;, 6033 },&lt;br /&gt;
	{ &#039;CNPS&#039;, &#039;[[California Native Plant Society|CNPS]]&#039;, 4194 },&lt;br /&gt;
	{ &#039;Cockroach Species File&#039;, &#039;Cockroach Species File (old)&#039;, 6052 }, ---[[Cockroach Species File]] DNE as of 2/2026&lt;br /&gt;
	{ &#039;Cockroach Species File New&#039;, &#039;Cockroach Species File (new)&#039;, 12817 }, ---[[Cockroach Species File]] DNE as of 2/2026&lt;br /&gt;
	{ &#039;Coleorrhyncha Species File&#039;, &#039;Coleorrhyncha Species File&#039; , 12771}, ---[[Coleorrhyncha Species File]] DNE as of 2/2026&lt;br /&gt;
	{ &#039;Conifers&#039;, &#039;Conifers.org&#039;, 1940 }, ---[[Conifers.org]] DNE as of 2/2026&lt;br /&gt;
	{ &#039;COOL&#039;, &#039;COOL&#039;, 6408 }, ---[[Cercopoidea Organised On Line|COOL]] DNE as of 2/2026&lt;br /&gt;
	{ &#039;Coreoidea Species File&#039;, &#039;Coreoidea Species File&#039;, 6053 }, ---[[Coreoidea Species File]] DNE as of 2/2026&lt;br /&gt;
	{ &#039;Dermaptera Species File&#039;, &#039;Dermaptera Species File&#039;, 12750 }, ---[[Dermaptera Species File]] DNE as of 2/2026&lt;br /&gt;
	{ &#039;eBird&#039;, &#039;[[eBird]]&#039;, 3444 },&lt;br /&gt;
	{ &#039;Ecocrop&#039;, &#039;[[Ecocrop]]&#039;, 4753 },&lt;br /&gt;
	{ &#039;ECOS&#039;, &#039;ECOS&#039;, 6030 }, ---[[Environmental Conservation Online System]] DNE as of 2/2026&lt;br /&gt;
	{ &#039;eFloraSA&#039;, &#039;[[State Herbarium of South Australia|eFloraSA]]&#039;, 6933 },&lt;br /&gt;
	{ &#039;Embioptera Species File&#039;, &#039;Embioptera Species File&#039;, 12751 }, ---[[Embioptera Species File]] DNE as of 2/2026&lt;br /&gt;
	{ &#039;EoL&#039;, &#039;[[Encyclopedia of Life|EoL]]&#039;, 830 },&lt;br /&gt;
	{ &#039;EPPO&#039;, &#039;[[EPPO Code|EPPO]]&#039;, 3031 },&lt;br /&gt;
	{ &#039;EUNIS&#039;, &#039;[[European Nature Information System|EUNIS]]&#039;, 6177 },&lt;br /&gt;
	{ &#039;EURING&#039;, &#039;[[European Union for Bird Ringing|EURING]]&#039;, 3459 },&lt;br /&gt;
	{ &#039;Euro+Med PlantBase&#039;, &#039;Euro+Med PlantBase&#039;, 12380 }, ---[[Euro+Med PlantBase]] DNE as of 2/2026&lt;br /&gt;
	{ &#039;FaunaEuropaea&#039;, &#039;[[Fauna Europaea]]&#039;, 1895 },&lt;br /&gt;
	{ &#039;FaunaEuropaeaNew&#039;, &#039;[[Fauna Europaea|Fauna Europaea (new)]]&#039;, 4807 },&lt;br /&gt;
	{ &#039;FEIS&#039;, &#039;FEIS&#039;, 6044 }, ---[[Fire Effects Information System]] DNE as of 2/2026&lt;br /&gt;
	{ &#039;Featherbase&#039;, &#039;Featherbase&#039;, 12589 }, ---[[Featherbase]] DNE as of 2/2026&lt;br /&gt;
	{ &#039;FishBase&#039;, &#039;[[FishBase]]&#039;, 938 },&lt;br /&gt;
	{ &#039;FloraBase&#039;, &#039;[[FloraBase]]&#039;, 3101 },&lt;br /&gt;
	{ &#039;FLOW&#039;, &#039;FLOW&#039;, 6096 }, ---[[Fulgoromorpha Lists On the Web]] DNE as of 2/2026&lt;br /&gt;
	{ &#039;FNA&#039;, &#039;[[Flora of North America|FNA]]&#039;, 1727 },&lt;br /&gt;
	{ &#039;FoAO&#039;, &#039;[[Flora of Australia|FoAO]]&#039;, 3100 }, --old&lt;br /&gt;
	{ &#039;FoAO2&#039;, &#039;[[Flora of Australia|FoAO2]]&#039;, 6756 }, --new&lt;br /&gt;
	{ &#039;FoC&#039;, &#039;[[Flora of China (series)|FoC]]&#039;, 1747 },&lt;br /&gt;
	{ &#039;FoIO&#039;, &#039;FoIO&#039;, 3795 }, ---[[Flora of Israel Online]] DNE as of 2/2026, he.wiki link interferes with display&lt;br /&gt;
--	{ &#039;Fossilworks&#039;, &#039;[[Fossilworks]]&#039;, 842 }, --site dead (on 1 Apr 2024)&lt;br /&gt;
--	{ &#039;Freebase&#039;, &#039;[[Freebase (database)|Freebase]]&#039;, 646 }, --closed in 2015&lt;br /&gt;
	{ &#039;GBIF&#039;, &#039;[[Global Biodiversity Information Facility|GBIF]]&#039;, 846 },&lt;br /&gt;
	{ &#039;GISD&#039;, &#039;[[Global Invasive Species Database|GISD]]&#039;, 5626 },&lt;br /&gt;
	{ &#039;GNAB&#039;, &#039;GNAB&#039;, 4715 }, ---[[Guide to North American Birds]] DNE as of 2/2026&lt;br /&gt;
	{ &#039;GONIAT&#039;, &#039;GONIAT&#039;, 5216 }, ---[[GONIAT]] DNE as of 2/2026&lt;br /&gt;
	{ &#039;GrassBase&#039;, &#039;[[GrassBase]]&#039;, 1832 },&lt;br /&gt;
	{ &#039;GRIN&#039;, &#039;[[Germplasm Resources Information Network|GRIN]]&#039;, 1421 },&lt;br /&gt;
	{ &#039;Grylloblattodea Species File&#039;, &#039;Grylloblattodea Species File&#039; , 12768}, ---[[Grylloblattodea Species File]] DNE as of 2/2026&lt;br /&gt;
	{ &#039;IBC&#039;, &#039;[[Handbook of the Birds of the World|IBC]]&#039;, 3099 },&lt;br /&gt;
--	{ &#039;ICTV&#039;, &#039;[[International Committee on Taxonomy of Viruses|ICTV]]&#039;, 1076 }, ---currently unavailable and a new wididata identifier will be needed for the new taxon id&lt;br /&gt;
	{ &#039;IFPNI&#039;, &#039;[[International Fossil Plant Names Index|IFPNI]]&#039;, 6341 },&lt;br /&gt;
	{ &#039;iNaturalist&#039;, &#039;[[iNaturalist]]&#039;, 3151 },&lt;br /&gt;
	{ &#039;IndexFungorum&#039;, &#039;[[Index Fungorum|IndexFungorum]]&#039;, 1391 },&lt;br /&gt;
	{ &#039;Insecta.pro&#039;, &#039;Insecta.pro&#039;, 7224 }, ---[[Insects (Insecta) of the World]] DNE as of 2/2026&lt;br /&gt;
	{ &#039;IPA&#039;, &#039;IPA&#039;, 6161 }, ---[[Invasive Plant Atlas of the United States]] DNE as of 2/2026&lt;br /&gt;
	{ &#039;IPNI&#039;, &#039;[[International Plant Names Index|IPNI]]&#039;, 961 },&lt;br /&gt;
	{ &#039;IRMNG&#039;, &#039;[[Interim Register of Marine and Nonmarine Genera|IRMNG]]&#039;, 5055 },&lt;br /&gt;
	{ &#039;ISC&#039;, &#039;[[Invasive Species Compendium|ISC]]&#039;, 5698 },&lt;br /&gt;
	{ &#039;Isoptera Species File&#039;, &#039;Isoptera Species File&#039;, 12752 }, ---[[Isoptera Species File]] DNE as of 2/2026&lt;br /&gt;
	{ &#039;ITIS&#039;, &#039;[[Integrated Taxonomic Information System|ITIS]]&#039;, 815 },&lt;br /&gt;
	{ &#039;IUCN&#039;, &#039;[[IUCN Red List|IUCN]]&#039;, 627 },&lt;br /&gt;
	{ &#039;LepIndex&#039;, &#039;[[The Global Lepidoptera Names Index|LepIndex]]&#039;, 3064 },&lt;br /&gt;
	{ &#039;LoB&#039;, &#039;LoB&#039;, 5862 }, ---[[Catalogue of Lepidoptera of Belgium]] DNE as of 2/2026&lt;br /&gt;
	{ &#039;LPSN&#039;, &#039;[[List of Prokaryotic names with Standing in Nomenclature|LPSN]]&#039;, 1991 },&lt;br /&gt;
	{ &#039;Lygaeoidea Species File&#039;, &#039;Lygaeoidea Species File (old)&#039;, 11311 }, ---[[Lygaeoidea Species File]] DNE as of 2/2026&lt;br /&gt;
	{ &#039;Lygaeoidea Species File New&#039;, &#039;Lygaeoidea Species File (new)&#039;, 12818 }, ---[[Lygaeoidea Species File]] DNE as of 2/2026&lt;br /&gt;
	{ &#039;Mantophasmatodea Species File&#039;, &#039;Mantophasmatodea Species File&#039; , 12769}, ---[[Mantophasmatodea Species File]] DNE as of 2/2026&lt;br /&gt;
	{ &#039;Mantodea Species File&#039;, &#039;Mantodea Species File&#039;, 6055 }, ---[[Mantodea Species File]] DNE as of 2/2026&lt;br /&gt;
	{ &#039;MDD&#039;, &#039;[[American Society of Mammalogists#Mammal Diversity Database|MDD]]&#039;, 12560 },&lt;br /&gt;
	{ &#039;MichiganFlora&#039;, &#039;MichiganFlora&#039;, 6103 }, ---[[Michigan Flora]] DNE as of 2/2026&lt;br /&gt;
	{ &#039;MoBotPF&#039;, &#039;[[Missouri Botanical Garden|MoBotPF]]&#039;, 6034 },&lt;br /&gt;
	{ &#039;MoL&#039;, &#039;MoL&#039;, 6092 }, ---[[Map of Life]] DNE as of 2/2026&lt;br /&gt;
	{ &#039;MNHN&#039;, &#039;[[National Museum of Natural History, France|MNHN]]&#039;, 6046 },&lt;br /&gt;
	{ &#039;MilliBase&#039;, &#039;[[MilliBase]]&#039;, 12271 },&lt;br /&gt;
	{ &#039;MONA&#039;, &#039;[[MONA number|MONA]]&#039;, 4758 },&lt;br /&gt;
	{ &#039;MaBENA&#039;, &#039;MaBENA&#039;, 9608 }, ---[[Moths and Butterflies of Europe and North Africa]] DNE as of 2/2026&lt;br /&gt;
	{ &#039;MSW&#039;, &#039;[[Mammal Species of the World|MSW]]&#039;, 959 },&lt;br /&gt;
	{ &#039;MycoBank&#039;, &#039;[[MycoBank]]&#039;, 962 },&lt;br /&gt;
	{ &#039;NAS&#039;, &#039;NAS&#039;, 6163 }, ---[[Nonindigenous Aquatic Species]] DNE as of 2/2026&lt;br /&gt;
	{ &#039;NatureServe&#039;, &#039;[[NatureServe]]&#039;, 10243 },&lt;br /&gt;
	{ &#039;NBN&#039;, &#039;[[National Biodiversity Network|NBN]]&#039;, 3240 },&lt;br /&gt;
	{ &#039;NCBI&#039;, &#039;[[National Center for Biotechnology Information|NCBI]]&#039;, 685 },&lt;br /&gt;
	{ &#039;Neotropical&#039;, &#039;[[Neotropical Birds Online|Neotropical]]&#039;, 6047 },&lt;br /&gt;
	{ &#039;NOAA&#039;, &#039;[[National Marine Fisheries Service|NOAA]]&#039;, 6049 },&lt;br /&gt;
	{ &#039;NSWFlora&#039;, &#039;[[NSWFlora]]&#039;, 3130 }, ---[[New South Wales Flora]]&lt;br /&gt;
	{ &#039;NTFlora&#039;, &#039;[[FloraNT|NTFlora]]&#039;, 5953 }, ---inconsistent property name/link&lt;br /&gt;
	{ &#039;NZBO&#039;, &#039;NZBO&#039;, 6048 }, ---[[New Zealand Birds Online]] DNE as of 2/2026&lt;br /&gt;
	{ &#039;NZOR&#039;, &#039;NZOR&#039;, 2752 }, ---[[New Zealand Organisms Register]] DNE as of 2/2026&lt;br /&gt;
	{ &#039;NZPCN&#039;, &#039;[[New Zealand Plant Conservation Network|NZPCN]]&#039;, 7496 },&lt;br /&gt;
	{ &#039;Observation.org&#039;, &#039;[[Observation.org]]&#039;, 6105 },&lt;br /&gt;
	{ &#039;OBIS&#039;, &#039;[[Ocean Biodiversity Information System|OBIS]]&#039;, 6754 },&lt;br /&gt;
	{ &#039;ODNR&#039;, &#039;[[Ohio Department of Natural Resources|ODNR]]&#039;, 6289 },&lt;br /&gt;
	{ &#039;OTTOL&#039;, &#039;[[Open Tree of Life]]&#039;, 9157 },&lt;br /&gt;
	{ &#039;Orthoptera Species File&#039;, &#039;Orthoptera Species File (old)&#039;, 6050 }, ---[[Orthoptera Species File]] DNE as of 2/2026&lt;br /&gt;
	{ &#039;Orthoptera Species File New&#039;, &#039;Orthoptera Species File (new)&#039;, 12785 }, ---[[Orthoptera Species File]] DNE as of 2/2026&lt;br /&gt;
	{ &#039;Paldat&#039;, &#039;PalDat&#039;, 4122 }, ---[[Palynological Database]] DNE as of 2/2026&lt;br /&gt;
	{ &#039;PaleobioDB&#039;, &#039;[[Paleobiology Database]]&#039;, 10907 },&lt;br /&gt;
	{ &#039;Fossilworks&#039;, &#039;[[Paleobiology Database]]&#039;, 842 }, --will use to get identifier for PBDB if not already set&lt;br /&gt;
	{ &#039;Panarctic&#039;, &#039;Panarctic Flora&#039;, 2434 }, ---[[Panarctic Flora]] DNE as of 2/2026&lt;br /&gt;
	{ &#039;PfaF&#039;, &#039;[[Plants for a Future|PfaF]]&#039;, 4301 },&lt;br /&gt;
	{ &#039;PFI&#039;, &#039;PFI&#039;, 6114 }, ---[[Portal to the Flora of Italy]] DNE as of 2/2026&lt;br /&gt;
	{ &#039;Phasmida Species File&#039;, &#039;Phasmida Species File (old)&#039;, 4855 }, ---[[Phasmida Species File]] DNE as of 2/2026&lt;br /&gt;
	{ &#039;Phasmida Species File New&#039;, &#039;Phasmida Species File (new)&#039;, 12819 }, ---[[Phasmida Species File]] DNE as of 2/2026&lt;br /&gt;
	{ &#039;Plecoptera Species File&#039;, &#039;Plecoptera Species File&#039; , 12770}, ---[[Plecoptera Species File]] DNE as of 2/2026&lt;br /&gt;
	{ &#039;PPE&#039;, &#039;PPE&#039;, 6061 }, ---[[Plant Parasites of Europe]] DNE as of 2/2026&lt;br /&gt;
	{ &#039;PlantList&#039;, &#039;[[The Plant List|Plant List]]&#039;, 1070 },&lt;br /&gt;
	{ &#039;PLANTS&#039;, &#039;[[Natural Resources Conservation Service#Plants|PLANTS]]&#039;, 1772 },&lt;br /&gt;
	{ &#039;PlantZAfrica&#039;, &#039;[[South_African_National_Biodiversity_Institute#Management_of_biodiversity_resources|PlantZAfrica]]&#039;, 12645 },&lt;br /&gt;
	{ &#039;Plazi&#039;, &#039;[[Plazi]]&#039;, 1992 },&lt;br /&gt;
	{ &#039;POWO&#039;, &#039;[[Plants of the World Online|POWO]]&#039;, 5037 },&lt;br /&gt;
	{ &#039;Psocodea Species File&#039;, &#039;Psocodea Species File (old)&#039;, 8145 }, ---[[Psocodea Species File]] DNE as of 2/2026&lt;br /&gt;
	{ &#039;Psocodea Species File New&#039;, &#039;Psocodea Species File (new)&#039;, 12820 }, ---[[Psocodea Species File]] DNE as of 2/2026&lt;br /&gt;
	{ &amp;quot;Psyl&#039;list&amp;quot;, &amp;quot;Psyl&#039;list&amp;quot;, 6376 }, ---[[Psyl&#039;list]] DNE as of 2/2026&lt;br /&gt;
	{ &#039;RD&#039;, &#039;[[Reptile Database|RD]]&#039;, 5473 },&lt;br /&gt;
	{ &#039;RHS&#039;, &#039;[[Royal Horticultural Society|RHS]]&#039;, 8765 },&lt;br /&gt;
	{ &#039;SANBI&#039;, &#039;[[South African National Biodiversity Institute|SANBI]]&#039;, 6056 },&lt;br /&gt;
	{ &#039;ScaleNet&#039;, &#039;ScaleNet&#039;, 6516 }, ---[[ScaleNet]] DNE as of 2/2026&lt;br /&gt;
	{ &#039;SCC&#039;, &#039;SCC&#039;, 6057 }, ---[[Systematic Catalog of Culicidae]] DNE as of 2/2026&lt;br /&gt;
	{ &#039;SeaLifeBase&#039;, &#039;[[SeaLifeBase]]&#039;, 6018 },&lt;br /&gt;
	{ &#039;SEINet&#039;, &#039;SEINet&#039;, 6209 }, ---[[SEINet]] DNE as of 2/2026&lt;br /&gt;
	{ &#039;SeqCode Registry&#039;, &#039;SeqCode Registry&#039;, 13490 },&lt;br /&gt;
	{ &#039;Species+&#039;, &#039;[[CITES|Species+]]&#039;, 2040 },&lt;br /&gt;
	{ &#039;SpeciesFungorum&#039;, &#039;[[Index Fungorum|SpeciesFungorum]]&#039;, 1391 },&lt;br /&gt;
	{ &#039;SPRAT&#039;, &#039;[[Species Profile and Threats Database|SPRAT]]&#039;, 2455 },&lt;br /&gt;
	{ &#039;Steere&#039;, &#039;[[New York Botanical Garden|Steere]]&#039;, 6035 },&lt;br /&gt;
	{ &#039;TaiCOL&#039;, &#039;[[:zh:臺灣物種名錄|TaiCOL]]&#039;, 12218 }, ---closest match as of 2/2026 for Catalogue of Life in Taiwan ([[:d:Q26218155]])&lt;br /&gt;
	{ &#039;Taxonomicon&#039;, &#039;Taxonomicon&#039;, 7066 },&lt;br /&gt;
	{ &#039;Tree of Life&#039;, &#039;[[Tree of Life Web Project|Tree of Life]]&#039;, 5221 },&lt;br /&gt;
	{ &#039;Tropicos&#039;, &#039;[[Tropicos]]&#039;, 960 },&lt;br /&gt;
	{ &#039;TSA&#039;, &#039;[[:de:Tierstimmenarchiv|TSA]]&#039;, 5397 }, ---closest match as of 2/2026 ([[:d:Q2432535]])&lt;br /&gt;
--	{ &#039;uBio&#039;, &#039;uBio&#039;, 4728 }, ---[[Universal Biological Indexer and Organizer]] DNE as of 2/2026 --defunct and dead link&lt;br /&gt;
	{ &#039;VASCAN&#039;, &#039;VASCAN&#039;, 1745 }, ---[[Vascular Plants of Canada]] DNE as of 2/2026&lt;br /&gt;
	{ &#039;VicFlora&#039;, &#039;[[National Herbarium of Victoria|VicFlora]]&#039;, 5945 }, ---closest match as of 2/2026&lt;br /&gt;
	{ &#039;Watson&#039;, &#039;Watson &amp;amp; Dallwitz&#039;, 1761 }, ---[[]] DNE as of 2/2026&lt;br /&gt;
	{ &#039;White-Files&#039;, &#039;White-Files&#039;, 6347 }, ---[[White-Files]] DNE as of 2/2026&lt;br /&gt;
	{ &#039;World Arachnid Catalog&#039;, &#039;WAC&#039;, 11803 }, ---[[World Arachnid Catalog]] ([[:d:Q113675145]]) DNE as of 2/2026&lt;br /&gt;
--	{ &#039;WCSP&#039;, &#039;[[World Checklist of Selected Plant Families|WCSP]]&#039;, 3591 }, --defunct and dead link (or redirects to POWO)&lt;br /&gt;
	{ &#039;WiO&#039;, &#039;WiO&#039;, 6285 }, ---[[Weeds in Ontario]] DNE as of 2/2026&lt;br /&gt;
	{ &#039;WisFlora&#039;, &#039;WisFlora&#039;, 6227 }, ---[[Flora of Wisconsin]] DNE as of 2/2026&lt;br /&gt;
	{ &#039;WoI&#039;, &#039;WoI&#039;, 3746 }, ---[[Wildflowers of Israel]] DNE as of 2/2026&lt;br /&gt;
	{ &#039;WFO&#039;, &#039;[[World Flora Online|WFO]]&#039;, 7715 },&lt;br /&gt;
	{ &#039;World Auchenorrhyncha DB&#039;, &#039;World Auchenorrhyncha DB&#039;, 12057 }, ---[[World Auchenorrhyncha Database]] DNE as of 2/2026&lt;br /&gt;
	{ &#039;WoRMS&#039;, &#039;[[World Register of Marine Species|WoRMS]]&#039;, 850 },&lt;br /&gt;
	{ &#039;WSC&#039;, &#039;[[World Spider Catalog|WSC]]&#039;, 3288 },&lt;br /&gt;
	{ &#039;Xeno-canto&#039;, &#039;[[Xeno-canto]]&#039;, 2426 },&lt;br /&gt;
	{ &#039;ZooBank&#039;, &#039;[[ZooBank]]&#039;, 1746 },&lt;br /&gt;
	{ &#039;Zoraptera Species File&#039;, &#039;Zoraptera Species File&#039;, 12753 }, ---[[Zoraptera Species File]] DNE as of 2/2026&lt;br /&gt;
	&lt;br /&gt;
	--URLs (parameter must be manually specified on each Wikipedia article)&lt;br /&gt;
--	{ &#039;eMonocot&#039;, &#039;[[eMonocot]]&#039;, &#039;http://e-monocot.org/taxon/urn:kew.org:wcs:taxon:$1&#039; }, --defunct and dead link (or redirects to POWO)&lt;br /&gt;
--	{ &#039;emonocotfamily&#039;, &#039;[[eMonocot]]&#039;, &#039;http://e-monocot.org/taxon/urn:kew.org:wcs:family:$1&#039; }, --ditto&lt;br /&gt;
	{ &#039;WSC species&#039;, &#039;[[World Spider Catalog]]&#039;, &#039;http://www.wsc.nmbe.ch/search?sFamily=&amp;amp;fMt=begin&amp;amp;sGenus=&amp;amp;gMt=begin&amp;amp;sSpecies=&amp;amp;sMt=begin&amp;amp;mMt=exact&amp;amp;multiPurpose=slsid&amp;amp;sMulti=$1&#039; },&lt;br /&gt;
	{ &#039;WSC genus&#039;, &#039;[[World Spider Catalog]]&#039;, &#039;http://www.wsc.nmbe.ch/search?sFamily=&amp;amp;fMt=begin&amp;amp;sGenus=&amp;amp;gMt=begin&amp;amp;sSpecies=&amp;amp;sMt=begin&amp;amp;mMt=exact&amp;amp;multiPurpose=glsid&amp;amp;sMulti=$1&#039; },&lt;br /&gt;
	{ &#039;WSC family&#039;, &#039;[[World Spider Catalog]]&#039;, &#039;http://www.wsc.nmbe.ch/search?sFamily=&amp;amp;fMt=begin&amp;amp;sGenus=&amp;amp;gMt=begin&amp;amp;sSpecies=&amp;amp;sMt=begin&amp;amp;mMt=exact&amp;amp;multiPurpose=flsid&amp;amp;sMulti=$1&#039; },&lt;br /&gt;
	&lt;br /&gt;
	--hidden by default (usually b/c !English, see [[Template:Taxonbar/doc#Excluded databases]])&lt;br /&gt;
	{ &#039;CoL-Taiwan&#039;, &#039;CoL-Taiwan&#039;, -3088 }, ---[[]] DNE as of 2/2026 (see [[:d:Property:P12218]] for new version)&lt;br /&gt;
	{ &#039;CONABIO&#039;, &#039;[[CONABIO]]&#039;, -4902 },&lt;br /&gt;
	{ &#039;CzechNDOP&#039;, &#039;[[:cs:Agentura ochrany přírody a krajiny ČR|CzechNDOP]]&#039;, -5263 }, ---closest match as of 2/2026 ([[:d:Q8183220]])&lt;br /&gt;
	{ &#039;DFCA&#039;, &#039;DFCA&#039;, -6115 }, ---[[Digital Flora of Central Africa]] DNE as of 2/2026&lt;br /&gt;
	{ &#039;DORIS&#039;, &amp;quot;[[:fr:DORIS (FFESSM)|DORIS]]&amp;quot;, -4630 }, ---closest match as of 2/2026 ([[:d:Q3036834]])&lt;br /&gt;
	{ &#039;Dyntaxa&#039;, &#039;Dyntaxa&#039;, -1939 }, ---[[Dyntaxa]] DNE as of 2/2026&lt;br /&gt;
	{ &#039;EEO&#039;, &#039;EEO&#039;, -6043 }, ---[[Espèces Envahissantes Outre-mer]] DNE as of 2/2026&lt;br /&gt;
	{ &#039;FloraCatalana&#039;, &#039;FloraCatalana&#039;, -5179 }, ---[[FloraCatalana]] DNE as of 2/2026&lt;br /&gt;
	{ &#039;FloraWeb&#039;, &#039;FloraWeb&#039;, -6094 }, ---[[FloraWeb]] DNE as of 2/2026&lt;br /&gt;
	{ &#039;FOIH&#039;, &#039;[[Flemish organization for Immovable Heritage, |FOIH]]&#039;, -4311 },&lt;br /&gt;
	{ &#039;GTIBMA&#039;, &#039;GTIBMA&#039;, -6054 }, ---[[Groupe de travail Invasions biologiques en milieux aquatiques]] DNE as of 2/2026&lt;br /&gt;
	{ &#039;Hepaticarum&#039;, &#039;Index Hepaticarum&#039;, -2794 }, ---[[Index Hepaticarum]] DNE; redirects to [[List of E. Schweizerbart serials]] as of 2/2026&lt;br /&gt;
	{ &#039;KNSL&#039;, &#039;[[Korean National Species List]]&#039;, -13330 },&lt;br /&gt;
	{ &#039;Oiseaux&#039;, &#039;[[:fr:Oiseaux.net|Oiseaux]]&#039;, -6025 }, ---closest match as of 2/2026 ([[:d:Q3349966]])&lt;br /&gt;
	{ &#039;Plantarium&#039;, &#039;Plantarium&#039;, -3102 }, ---[[Plantarium]] DNE as of 2/2026&lt;br /&gt;
	{ &#039;Soortenregister&#039;, &#039;[[:nl:Nederlands Soortenregister|Soortenregister]]&#039;, -3405 }, ---closest match as of 2/2026 ([[:d:Q2246990]])&lt;br /&gt;
	{ &#039;TAXREF&#039;, &#039;TAXREF&#039;, -3186 }, ---[[TAXREF]] DNE as of 2/2026&lt;br /&gt;
	{ &#039;TelaBotanica&#039;, &#039;[[TelaBotanica]]&#039;, -3105 },&lt;br /&gt;
	{ &#039;Titan&#039;, &#039;Titan&#039;, -4125 }, ---[[]] DNE as of 2/2026&lt;br /&gt;
	{ &#039;Verspreidingsatlas&#039;, &#039;Verspreidingsatlas&#039;, -6142 }, ---[[Verspreidingsatlas]] DNE as of 2/2026&lt;br /&gt;
	{ &#039;Vlinderstichting&#039;, &#039;Vlinderstichting&#039;, -3322 }, ---[[Vlinderstichting]] DNE as of 2/2026&lt;br /&gt;
	{ &#039;WikiAves&#039;, &#039;[[WikiAves]]&#039;, -4664 },&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
--Alias entry format: { &#039;alias&#039;, &#039;parameter name in p.databases&#039; }&lt;br /&gt;
p.aliases = {&lt;br /&gt;
	{ &#039;AlgeaBase&#039;, &#039;AlgaeBase&#039; },&lt;br /&gt;
	{ &#039;FE&#039;, &#039;FaunaEuropaea&#039; },&lt;br /&gt;
	{ &#039;FW&#039;, &#039;Fossilworks&#039; },&lt;br /&gt;
	{ &#039;grinurl&#039;, &#039;GRIN&#039; },&lt;br /&gt;
	{ &#039;indexfungorum&#039;, &#039;Fungorum&#039; },&lt;br /&gt;
	{ &#039;NameBank&#039;, &#039;uBio&#039; },&lt;br /&gt;
	{ &#039;PaleoDB&#039;, &#039;Fossilworks&#039; },&lt;br /&gt;
	{ &#039;species&#039;, &#039;Species+&#039; },&lt;br /&gt;
	{ &#039;TOL&#039;, &#039;Tree of Life&#039;},&lt;br /&gt;
	{ &#039;WCSPF&#039;, &#039;WCSP&#039; },&lt;br /&gt;
	{ &#039;wsc-gen&#039;, &#039;WSC genus&#039; },&lt;br /&gt;
	{ &#039;wsc-fam&#039;, &#039;WSC family&#039; },&lt;br /&gt;
	{ &#039;wsc-sp&#039;, &#039;WSC species&#039;},&lt;br /&gt;
	{ &#039;Xenocanto&#039;, &#039;Xeno-canto&#039; },&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
return p&lt;/div&gt;</summary>
		<author><name>Indicwiki</name></author>
	</entry>
	<entry>
		<id>https://sandbox.indicwiki.org/index.php?title=Module:Taxonbar&amp;diff=66507</id>
		<title>Module:Taxonbar</title>
		<link rel="alternate" type="text/html" href="https://sandbox.indicwiki.org/index.php?title=Module:Taxonbar&amp;diff=66507"/>
		<updated>2026-05-11T08:16:18Z</updated>

		<summary type="html">&lt;p&gt;Indicwiki: 1 revision imported&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;require(&#039;strict&#039;)&lt;br /&gt;
&lt;br /&gt;
local conf = require( &#039;Module:Taxonbar/conf&#039; ) --configuration module&lt;br /&gt;
local TaxonItalics = require( &#039;Module:TaxonItalics&#039; ) --use a function to conditionally italicize taxon names&lt;br /&gt;
&lt;br /&gt;
--[[==========================================================================]]&lt;br /&gt;
--[[                             Local functions                              ]]&lt;br /&gt;
--[[==========================================================================]]&lt;br /&gt;
&lt;br /&gt;
local function isNilOrEmpty( thing )&lt;br /&gt;
	if thing == nil or thing == &#039;&#039; then&lt;br /&gt;
		return true&lt;br /&gt;
	end&lt;br /&gt;
	return nil&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
local function getIdFromWikidata( item, property )&lt;br /&gt;
	local id = nil&lt;br /&gt;
	if property == &#039;PWikispecies:$1&#039; then&lt;br /&gt;
		local siteLinks = item.sitelinks&lt;br /&gt;
		if siteLinks then&lt;br /&gt;
			local speciesWiki = item.sitelinks.specieswiki&lt;br /&gt;
			if speciesWiki then&lt;br /&gt;
				id = speciesWiki.title&lt;br /&gt;
			end&lt;br /&gt;
		end&lt;br /&gt;
		return id&lt;br /&gt;
	elseif item.claims[property] == nil then&lt;br /&gt;
		return id&lt;br /&gt;
	end&lt;br /&gt;
	--[[ this code picks up deprecated values on wikidata; better to use getBestStatements&lt;br /&gt;
	for _, statement in pairs( item.claims[property] ) do&lt;br /&gt;
		if statement.mainsnak.datavalue then&lt;br /&gt;
			id = statement.mainsnak.datavalue.value&lt;br /&gt;
			break&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
	]]&lt;br /&gt;
	local statements = item:getBestStatements(property)[1] &lt;br /&gt;
	if statements and&lt;br /&gt;
	   statements.mainsnak and&lt;br /&gt;
	   statements.mainsnak.datavalue and&lt;br /&gt;
	   statements.mainsnak.datavalue.value&lt;br /&gt;
	then&lt;br /&gt;
		id = statements.mainsnak.datavalue.value&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	return id&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
local function getLink( property, db, val )&lt;br /&gt;
	local link, returnVal = &#039;&#039;, {}&lt;br /&gt;
	&lt;br /&gt;
	returnVal.isError = false&lt;br /&gt;
	&lt;br /&gt;
	if mw.ustring.find( val, &#039;//&#039; ) then&lt;br /&gt;
		link = val&lt;br /&gt;
	else&lt;br /&gt;
		if type(property) == &#039;number&#039; and property &amp;gt; 0 then&lt;br /&gt;
			local entityObject = mw.wikibase.getEntity(&#039;P&#039;..property)&lt;br /&gt;
			local dataType&lt;br /&gt;
			&lt;br /&gt;
			if entityObject then dataType = entityObject.datatype&lt;br /&gt;
			else returnVal.isError = true end&lt;br /&gt;
			&lt;br /&gt;
			if dataType == &#039;external-id&#039; then&lt;br /&gt;
				local formatterURL = nil&lt;br /&gt;
				if property == 3746 or --Wildflowers of Israel&lt;br /&gt;
				   property == 3795 or --Flora of Israel Online&lt;br /&gt;
				   property == 5397    --Tierstimmenarchiv&lt;br /&gt;
				then&lt;br /&gt;
					formatterURL = entityObject:getBestStatements(&#039;P1630&#039;)[2] --use 2nd formatterURL for English version&lt;br /&gt;
				end&lt;br /&gt;
				if formatterURL == nil then formatterURL = entityObject:getBestStatements(&#039;P1630&#039;)[1] end --default to [1]&lt;br /&gt;
				if formatterURL then&lt;br /&gt;
					if formatterURL.mainsnak.datavalue and formatterURL.mainsnak.datavalue.value then --nil check for ABA&lt;br /&gt;
						link = formatterURL.mainsnak.datavalue.value&lt;br /&gt;
					end&lt;br /&gt;
				end&lt;br /&gt;
				if db == &#039;bow&#039; then -- for birds of world which uses eBird identifier&lt;br /&gt;
					link = &#039;https://birdsoftheworld.org/bow/species/$1&#039;&lt;br /&gt;
				elseif db == &#039;speciesfungorum&#039; then -- SpeciesFungorum uses Index Fungorum identifier&lt;br /&gt;
					link = &#039;https://www.speciesfungorum.org/Names/NamesRecord.asp?RecordID=$1&#039;&lt;br /&gt;
				elseif db == &#039;fossilworks&#039; then &lt;br /&gt;
					link = &#039;https://paleobiodb.org/classic/basicTaxonInfo?taxon_no=$1&#039;&lt;br /&gt;
				end&lt;br /&gt;
			elseif dataType == &#039;url&#039; then&lt;br /&gt;
				local subjectItem = entityObject:getBestStatements(&#039;P1629&#039;)[1]&lt;br /&gt;
				if subjectItem then&lt;br /&gt;
					local officialWebsite = mw.wikibase.getEntity(subjectItem.mainsnak.datavalue.value.id):getBestStatements(&#039;P856&#039;)[1]&lt;br /&gt;
					if officialWebsite then	link = officialWebsite.mainsnak.datavalue.value end&lt;br /&gt;
				end&lt;br /&gt;
			elseif dataType == &#039;string&#039; then&lt;br /&gt;
				local formatterURL = entityObject:getBestStatements(&#039;P1630&#039;)[1]&lt;br /&gt;
				if formatterURL then&lt;br /&gt;
					link = formatterURL.mainsnak.datavalue.value&lt;br /&gt;
				else&lt;br /&gt;
					local subjectItem = entityObject:getBestStatements(&#039;P1629&#039;)[1]&lt;br /&gt;
					if subjectItem then&lt;br /&gt;
						local officialWebsite = mw.wikibase.getEntity(subjectItem.mainsnak.datavalue.value.id):getBestStatements(&#039;P856&#039;)[1]&lt;br /&gt;
						if officialWebsite then	link = officialWebsite.mainsnak.datavalue.value end&lt;br /&gt;
					end&lt;br /&gt;
				end&lt;br /&gt;
			else&lt;br /&gt;
				returnVal.isError = true&lt;br /&gt;
			end&lt;br /&gt;
		elseif type(property) == &#039;string&#039; then&lt;br /&gt;
			link = property&lt;br /&gt;
		end&lt;br /&gt;
		&lt;br /&gt;
		--local valurl = val&lt;br /&gt;
		local valurl = mw.uri.encode( val, &#039;PATH&#039; )&lt;br /&gt;
		valurl = string.gsub (valurl, &#039;%%2F&#039;, &#039;/&#039;) --escape &#039;/&#039; (e.g. issue with P5354); see wikidata T128078 and https://gerrit.wikimedia.org/r/c/mediawiki/extensions/Wikibase/+/664820/3/lib/includes/PropertyInfoSnakUrlExpander.php&lt;br /&gt;
		&lt;br /&gt;
		if type(property) == &#039;number&#039; then&lt;br /&gt;
			--doublecheck language for Wildflowers of Israel ID&lt;br /&gt;
			if property == 3746 then link = mw.ustring.gsub(link, &#039;/hebrew/&#039;, &#039;/english/&#039;) end&lt;br /&gt;
			--format spaces in PfaF binomials, e.g. &amp;quot;Elaeagnus x ebbingei&amp;quot;&lt;br /&gt;
			if property == 4301 then valurl = mw.ustring.gsub(valurl, &#039;%%20&#039;, &#039;+&#039;) end&lt;br /&gt;
		end&lt;br /&gt;
		valurl = mw.ustring.gsub(valurl,&#039;%%&#039;,&#039;%%%%&#039;)&lt;br /&gt;
		link = mw.ustring.gsub(link, &#039;$1&#039;, valurl)&lt;br /&gt;
	end&lt;br /&gt;
	&lt;br /&gt;
	link = mw.ustring.gsub(link, &#039;^[Hh][Tt][Tt][Pp]([Ss]?)&amp;amp;#58;//&#039;, &#039;http%1://&#039;) --fix wikidata URL&lt;br /&gt;
	val = mw.ustring.match(val, &#039;([^=/]*)/?$&#039;) --get display name from end of URL&lt;br /&gt;
	if mw.ustring.find( link, &#039;//&#039; ) then&lt;br /&gt;
		returnVal.text = &#039;[&#039;..link..&#039; &#039;..mw.text.encode(mw.uri.decode(val, &#039;PATH&#039;),&#039;%[%]&#039;)..&#039;]&#039;&lt;br /&gt;
	elseif link == &#039;&#039; then&lt;br /&gt;
		returnVal.text = val&lt;br /&gt;
	else&lt;br /&gt;
		returnVal.text = &#039;&amp;lt;span class=&amp;quot;external&amp;quot;&amp;gt;[[&#039;..link..&#039;|&#039;..val..&#039;]]&amp;lt;/span&amp;gt;&#039;&lt;br /&gt;
	end&lt;br /&gt;
	return returnVal&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
local function createRow( id, label, rawValue, link, withUid )&lt;br /&gt;
	if link then&lt;br /&gt;
		local outStr = &#039;*&amp;lt;span style=&amp;quot;white-space:nowrap;&amp;quot;&amp;gt;&#039;..label..&#039; &amp;lt;span&#039;&lt;br /&gt;
		if withUid then outStr = outStr..&#039; class=&amp;quot;uid&amp;quot;&#039; end&lt;br /&gt;
		return outStr..&#039;&amp;gt;&#039;..link..&#039;&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;\n&#039;&lt;br /&gt;
	else&lt;br /&gt;
		return &#039;* &#039;..mw.text.tag(&#039;span&#039;, {class=&#039;error&#039;}, &#039;The identifier &#039;..id..&#039; &#039;..rawValue..&#039; is not valid.&#039;)..&#039;\n&#039;&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
local function copyTable(inTable)&lt;br /&gt;
	if type(inTable) ~= &#039;table&#039; then return inTable end&lt;br /&gt;
	local outTable = setmetatable({}, getmetatable(inTable))&lt;br /&gt;
	for key, value in pairs (inTable) do outTable[copyTable(key)] = copyTable(value) end&lt;br /&gt;
	return outTable&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
local p = {}&lt;br /&gt;
&lt;br /&gt;
--[[==========================================================================]]&lt;br /&gt;
--[[                                   Main                                   ]]&lt;br /&gt;
--[[==========================================================================]]&lt;br /&gt;
&lt;br /&gt;
function p.authorityControlTaxon( frame )&lt;br /&gt;
	local resolveEntity = require( &#039;Module:ResolveEntityId&#039; )&lt;br /&gt;
	local whitelist = require( &#039;Module:Taxonbar/whitelist&#039; ).whitelist --to create acceptableInstanceOf_Strict &amp;amp; acceptableInstanceOf_All&lt;br /&gt;
	local parentArgs = copyTable(frame:getParent().args)&lt;br /&gt;
	local currentTitle = mw.title.getCurrentTitle()&lt;br /&gt;
	local currentEntityId = mw.wikibase.getEntityIdForCurrentPage()&lt;br /&gt;
	&lt;br /&gt;
	local stringArgs = false&lt;br /&gt;
	local fromTitleCount, firstRow, rowCount = 1, 0, 0&lt;br /&gt;
	local outString, errors = &#039;&#039;, &#039;&#039;&lt;br /&gt;
	local iFroms = 0 --integer size of tFroms, b/c Lua&lt;br /&gt;
	local tFroms = {} --non-sequential table of unique froms&lt;br /&gt;
	local tCats = {&lt;br /&gt;
		&#039;[[Category:Taxonbars without from parameter]]&#039;,&lt;br /&gt;
		&#039;[[Category:Taxonbars desynced from Wikidata]]&#039;,&lt;br /&gt;
		&#039;&#039;, -- [3] placeholder for [[Category:Taxonbar pages requiring a Wikidata item]]&lt;br /&gt;
		&#039;&#039;, -- [4] placeholder for [[Category:Taxonbars on possible non-taxon pages]]&lt;br /&gt;
		&#039;&#039;, -- [5] placeholder for [[Category:Taxonbars with invalid from parameters]]&lt;br /&gt;
		&#039;&#039;, -- [6] placeholder for [[Category:Taxonbars with duplicate from parameters]]&lt;br /&gt;
		&#039;&#039;, -- [7] placeholder for [[Category:Taxonbars with from2 matching article title]]&lt;br /&gt;
		&#039;&#039;, -- [8] placeholder for [[Category:Taxonbars with from2 matching article title &amp;amp; QID]]&lt;br /&gt;
		&#039;&#039;, -- [9] placeholder for [[Category:Taxonbars with manual taxon IDs]]&lt;br /&gt;
		&#039;&#039;, --[10] placeholder for [[Category:Taxonbars with manual taxon IDs identical to Wikidata]]&lt;br /&gt;
		&#039;&#039;, --[11] placeholder for [[Category:Taxonbars with manual taxon IDs differing from Wikidata]]&lt;br /&gt;
		&#039;&#039;, --[12] placeholder for [[Category:Taxonbars with unknown parameters]]&lt;br /&gt;
		&#039;&#039;, --[13] placeholder for [[Category:Taxonbars with unnamed parameters]]&lt;br /&gt;
		&#039;&#039;, --[14] placeholder for [[Category:Taxonbars with multiple manual Wikidata items]]&lt;br /&gt;
		&#039;&#039;, --[15] placeholder for [[Category:Taxonbars with automatically added basionyms]]&lt;br /&gt;
		&#039;&#039;, --[16] placeholder for [[Category:Taxonbars with automatically added original combinations]]&lt;br /&gt;
		&#039;&#039;, --[17] placeholder for [[Category:Taxonbars with automatically added monotypic species]]&lt;br /&gt;
		&#039;&#039;, --[18] placeholder for [[Category:Taxonbars with automatically added monotypic genera]]&lt;br /&gt;
		&#039;&#039;, --[19] placeholder for [[Category:Taxonbars of monotypic species missing genera on Wikidata]]&lt;br /&gt;
		&#039;&#039;, --[20] placeholder for [[Category:Taxonbars of monotypic genera missing species on Wikidata]]&lt;br /&gt;
		&#039;&#039;, --[21] placeholder for [[Category:Taxonbars without primary Wikidata taxon IDs]]&lt;br /&gt;
		&#039;&#039;, --[22] placeholder for [[Category:Taxonbars without secondary Wikidata taxon IDs]]&lt;br /&gt;
		&#039;&#039;, --[23] placeholder for [[Category:Taxonbars with 20–24 taxon IDs]]&lt;br /&gt;
		&#039;&#039;, --[24] placeholder for [[Category:Taxonbars with 25–29 taxon IDs]]&lt;br /&gt;
		&#039;&#039;, --[25] placeholder for [[Category:Taxonbars with 30–34 taxon IDs]]&lt;br /&gt;
		&#039;&#039;, --[26] placeholder for [[Category:Taxonbars with 35–39 taxon IDs]]&lt;br /&gt;
		&#039;&#039;, --[27] placeholder for [[Category:Taxonbars with 40–44 taxon IDs]]&lt;br /&gt;
		&#039;&#039;, --[28] placeholder for [[Category:Taxonbars with 45+ taxon IDs]]&lt;br /&gt;
		&#039;&#039;, --[29] placeholder for [[Category:Taxonbars of monotypic species missing genera on Wikipedia]]&lt;br /&gt;
		&#039;&#039;, --[30] placeholder for [[Category:Taxonbars of monotypic genera missing species on Wikipedia]]&lt;br /&gt;
	}&lt;br /&gt;
	local acceptableInstanceOf_Strict = whitelist{ args = { &#039;strict&#039; } }&lt;br /&gt;
	local acceptableInstanceOf_All = whitelist{ args = { &#039;all&#039; } }&lt;br /&gt;
	&lt;br /&gt;
	--monotypic flags for WP-side check&lt;br /&gt;
	local mono = nil&lt;br /&gt;
	local monoWPok = nil&lt;br /&gt;
	local monoGenus = nil&lt;br /&gt;
	local monoSpecies = nil&lt;br /&gt;
	local monoParent = nil --parent taxon name&lt;br /&gt;
	&lt;br /&gt;
	--Assess the page&#039;s relationship with Wikidata&lt;br /&gt;
	local currentItem = nil&lt;br /&gt;
	if currentTitle.namespace == 10 then --i.e. Module:Taxonbar/sandbox, Template:Taxonbar/doc, etc.&lt;br /&gt;
		if resolveEntity._id(parentArgs[&#039;from&#039;]) then&lt;br /&gt;
			currentItem = mw.wikibase.getEntity(parentArgs[&#039;from&#039;])&lt;br /&gt;
		end&lt;br /&gt;
		if currentItem == nil then&lt;br /&gt;
			if resolveEntity._id(parentArgs[&#039;from1&#039;]) then&lt;br /&gt;
				currentItem = mw.wikibase.getEntity(parentArgs[&#039;from1&#039;])&lt;br /&gt;
			end&lt;br /&gt;
		end&lt;br /&gt;
	elseif resolveEntity._id(currentEntityId) then&lt;br /&gt;
		currentItem = mw.wikibase.getEntity(currentEntityId)&lt;br /&gt;
	else --currentEntityId == nil/unresolvable&lt;br /&gt;
		tCats[3] = &#039;[[Category:Taxonbar pages requiring a Wikidata item]]&#039;&lt;br /&gt;
	end&lt;br /&gt;
	if currentItem then&lt;br /&gt;
		tCats[4] = &#039;[[Category:Taxonbars on possible non-taxon pages]]&#039; --unset if acceptable found&lt;br /&gt;
		for _, instanceOfState in pairs ( currentItem:getBestStatements(&#039;P31&#039;) ) do --instance of&lt;br /&gt;
			local instanceOf = instanceOfState.mainsnak.datavalue.value.id&lt;br /&gt;
			if acceptableInstanceOf_All[instanceOf] then&lt;br /&gt;
				tCats[4] = &#039;&#039;&lt;br /&gt;
				break&lt;br /&gt;
			end&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
	&lt;br /&gt;
	--Cleanup args&lt;br /&gt;
	for k, v in pairs( frame:getParent().args ) do&lt;br /&gt;
		if type(k) == &#039;string&#039; then&lt;br /&gt;
			--make args case insensitive&lt;br /&gt;
			local lowerk = mw.ustring.lower(k)&lt;br /&gt;
			if isNilOrEmpty( parentArgs[lowerk] ) then&lt;br /&gt;
				parentArgs[k] = nil&lt;br /&gt;
				parentArgs[lowerk] = v&lt;br /&gt;
			end&lt;br /&gt;
			--remap abc to abc1&lt;br /&gt;
			if mw.ustring.find(lowerk,&#039;%d$&#039;) == nil then --if no number at end of param&lt;br /&gt;
				if isNilOrEmpty( parentArgs[lowerk..&#039;1&#039;] ) then&lt;br /&gt;
					parentArgs[lowerk] = nil&lt;br /&gt;
					lowerk = lowerk..&#039;1&#039;&lt;br /&gt;
					parentArgs[lowerk] = v&lt;br /&gt;
				end&lt;br /&gt;
			end&lt;br /&gt;
			if v and v ~= &#039;&#039; then&lt;br /&gt;
				--remap &#039;for&#039; to &#039;title&#039;&lt;br /&gt;
				if mw.ustring.sub(lowerk,1,3) == &#039;for&#039; then&lt;br /&gt;
					local forTitle = mw.ustring.gsub(lowerk,&#039;^for&#039;,&#039;title&#039;,1)&lt;br /&gt;
					if isNilOrEmpty( parentArgs[forTitle] ) then&lt;br /&gt;
						parentArgs[lowerk] = nil&lt;br /&gt;
						lowerk = forTitle&lt;br /&gt;
						parentArgs[lowerk] = v&lt;br /&gt;
					end&lt;br /&gt;
				end&lt;br /&gt;
				--find highest from or title param&lt;br /&gt;
				if mw.ustring.sub(lowerk,1,4) == &#039;from&#039; then&lt;br /&gt;
					local fromNumber = tonumber(mw.ustring.sub(lowerk,5,-1))&lt;br /&gt;
					if fromNumber and fromNumber &amp;gt;= fromTitleCount then fromTitleCount = fromNumber end&lt;br /&gt;
					--look for duplicate froms while we&#039;re here&lt;br /&gt;
					if mw.ustring.find(v, &#039;^Q%d&#039;) then&lt;br /&gt;
						if tFroms[v] then&lt;br /&gt;
							tCats[6] = &#039;[[Category:Taxonbars with duplicate from parameters]]&#039;&lt;br /&gt;
							tFroms[v] = tFroms[v] + 1&lt;br /&gt;
						else&lt;br /&gt;
							tFroms[v] = 1&lt;br /&gt;
							iFroms = iFroms + 1&lt;br /&gt;
						end&lt;br /&gt;
						if iFroms == 2 then&lt;br /&gt;
							tCats[14] = &#039;[[Category:Taxonbars with multiple manual Wikidata items]]&#039;&lt;br /&gt;
						end&lt;br /&gt;
					end&lt;br /&gt;
				elseif mw.ustring.sub(lowerk,1,5) == &#039;title&#039; then&lt;br /&gt;
					local titleNumber = tonumber(mw.ustring.sub(lowerk,4,-1))&lt;br /&gt;
					if titleNumber and titleNumber &amp;gt;= fromTitleCount then fromTitleCount = titleNumber end&lt;br /&gt;
				elseif mw.ustring.lower(v) ~= &#039;no&#039; and  mw.ustring.lower(v) ~= &#039;yes&#039; then&lt;br /&gt;
					stringArgs = true&lt;br /&gt;
					tCats[9] = &#039;[[Category:Taxonbars with manual taxon IDs]]&#039;&lt;br /&gt;
				end&lt;br /&gt;
			end&lt;br /&gt;
		end --if type(k) == &#039;string&#039;&lt;br /&gt;
	end --for&lt;br /&gt;
	&lt;br /&gt;
	--Check for unknown parameters&lt;br /&gt;
	--create knowns list&lt;br /&gt;
	local acceptableArgs = { from = true, } --master list of l/c acceptable args&lt;br /&gt;
	for _, d in pairs( conf.databases ) do&lt;br /&gt;
		if d[1] ~= &#039;Wikidata&#039; then --made obsolete by from&lt;br /&gt;
			acceptableArgs[mw.ustring.lower(d[1])] = true&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
	for _, a in pairs( conf.aliases ) do&lt;br /&gt;
		acceptableArgs[mw.ustring.lower(a[1])] = true&lt;br /&gt;
	end&lt;br /&gt;
	--create trimmed parents list&lt;br /&gt;
	local baseParentArgs = {} --condensed list of l/c parent args w/o trailing #s&lt;br /&gt;
	for k, _ in pairs( parentArgs ) do&lt;br /&gt;
		if type(k) == &#039;string&#039; then&lt;br /&gt;
			local lowerk = mw.ustring.lower(k)&lt;br /&gt;
			local base = mw.ustring.gsub(lowerk, &#039;[%d]*$&#039;, &#039;&#039;)&lt;br /&gt;
			baseParentArgs[base] = true&lt;br /&gt;
		elseif type(k) == &#039;number&#039; then&lt;br /&gt;
			tCats[13] = &#039;[[Category:Taxonbars with unnamed parameters|&#039;..k..&#039;]]&#039;&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
	--compare lists and spit out unknowns&lt;br /&gt;
	local unknownParams = {}&lt;br /&gt;
	for k, _ in pairs( baseParentArgs ) do&lt;br /&gt;
		if acceptableArgs[k] == nil then&lt;br /&gt;
			tCats[12] = &#039;[[Category:Taxonbars with unknown parameters|&#039;..k..&#039;]]&#039;&lt;br /&gt;
			unknownParams[#unknownParams + 1] = k&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
	--warn if unknown(s) present&lt;br /&gt;
	if #unknownParams &amp;gt; 0 then&lt;br /&gt;
		local plural = &#039;s&#039;&lt;br /&gt;
		local itthem = &#039;them&#039;&lt;br /&gt;
		if #unknownParams == 1 then&lt;br /&gt;
			plural = &#039;&#039;&lt;br /&gt;
			itthem = &#039;it&#039;&lt;br /&gt;
		end&lt;br /&gt;
		errors = errors..require(&#039;Module:If preview&#039;)._warning({&lt;br /&gt;
			mw.ustring.format(&lt;br /&gt;
				&#039;Unknown parameter%s &amp;lt;code&amp;gt;%s&amp;lt;/code&amp;gt;. Please correct %s or consider adding %s to Wikidata.&#039;,&lt;br /&gt;
				plural,&lt;br /&gt;
				table.concat(unknownParams, &#039;&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;&#039;),&lt;br /&gt;
				itthem,&lt;br /&gt;
				itthem&lt;br /&gt;
			)&lt;br /&gt;
		})&lt;br /&gt;
	end&lt;br /&gt;
	&lt;br /&gt;
	--Append basionym to arg list, if not already provided&lt;br /&gt;
	if currentItem then&lt;br /&gt;
		local currentBasState = currentItem:getBestStatements(&#039;P566&#039;)[1] --basionym&lt;br /&gt;
		if currentBasState then&lt;br /&gt;
			local datavalue = currentBasState.mainsnak.datavalue&lt;br /&gt;
			local basionymId = datavalue and datavalue.value.id&lt;br /&gt;
			if basionymId and resolveEntity._id(basionymId) and tFroms[basionymId] == nil then&lt;br /&gt;
				--check that basionym is a strict instance of taxon&lt;br /&gt;
				local basionymItem = mw.wikibase.getEntity(basionymId)&lt;br /&gt;
				if basionymItem then&lt;br /&gt;
					for _, instanceOfState in pairs ( basionymItem:getBestStatements(&#039;P31&#039;) ) do --instance of&lt;br /&gt;
						local instanceOf = instanceOfState.mainsnak.datavalue.value.id&lt;br /&gt;
						if acceptableInstanceOf_Strict[instanceOf] then&lt;br /&gt;
							--housekeeping&lt;br /&gt;
							tFroms[basionymId] = 1&lt;br /&gt;
							iFroms = iFroms + 1&lt;br /&gt;
							fromTitleCount = fromTitleCount + 1&lt;br /&gt;
							--append basionym &amp;amp; track&lt;br /&gt;
							parentArgs[&#039;from&#039;..fromTitleCount] = basionymId&lt;br /&gt;
							tCats[15] = &#039;[[Category:Taxonbars with automatically added basionyms]]&#039;&lt;br /&gt;
							break&lt;br /&gt;
	end	end	end	end	end	end&lt;br /&gt;
	&lt;br /&gt;
	--Append original combination to arg list, if not already provided&lt;br /&gt;
	if currentItem then&lt;br /&gt;
		local currentOCState = currentItem:getBestStatements(&#039;P1403&#039;)[1] --original combination&lt;br /&gt;
		if currentOCState then&lt;br /&gt;
			local orcoId = currentOCState.mainsnak.datavalue.value.id&lt;br /&gt;
			if orcoId and resolveEntity._id(orcoId) and tFroms[orcoId] == nil then&lt;br /&gt;
				--check that orco is a strict instance of taxon&lt;br /&gt;
				local orcoItem = mw.wikibase.getEntity(orcoId)&lt;br /&gt;
				if orcoItem then&lt;br /&gt;
					for _, instanceOfState in pairs ( orcoItem:getBestStatements(&#039;P31&#039;) ) do --instance of&lt;br /&gt;
						local instanceOf = instanceOfState.mainsnak.datavalue.value.id&lt;br /&gt;
						if acceptableInstanceOf_Strict[instanceOf] then&lt;br /&gt;
							--housekeeping&lt;br /&gt;
							tFroms[orcoId] = 1&lt;br /&gt;
							iFroms = iFroms + 1&lt;br /&gt;
							fromTitleCount = fromTitleCount + 1&lt;br /&gt;
							--append orco &amp;amp; track&lt;br /&gt;
							parentArgs[&#039;from&#039;..fromTitleCount] = orcoId&lt;br /&gt;
							tCats[16] = &#039;[[Category:Taxonbars with automatically added original combinations]]&#039;&lt;br /&gt;
							break&lt;br /&gt;
	end	end	end	end	end	end&lt;br /&gt;
	&lt;br /&gt;
	--Append monotypic genus/species to arg list of monotypic species/genus, if not already provided&lt;br /&gt;
	if currentItem then&lt;br /&gt;
		for _, instanceOfState in pairs ( currentItem:getBestStatements(&#039;P31&#039;) ) do --instance of&lt;br /&gt;
			local taxonRank = nil&lt;br /&gt;
			local parentItem = nil&lt;br /&gt;
			local parentTaxon = nil&lt;br /&gt;
			local parentTaxonRank = nil&lt;br /&gt;
			local parentMonoGenus = nil --holy grail/tbd&lt;br /&gt;
			local childItem = nil&lt;br /&gt;
			local childTaxon = nil&lt;br /&gt;
			local childTaxonRank = nil&lt;br /&gt;
			local childMonoSpecies = nil --holy grail/tbd&lt;br /&gt;
			local instanceOf = instanceOfState.mainsnak.datavalue.value.id&lt;br /&gt;
			if instanceOf and (instanceOf == &#039;Q310890&#039; or instanceOf == &#039;Q47487597&#039;) then --monotypic/fossil taxon&lt;br /&gt;
				--find &amp;amp; save monoParent for future WP-side check&lt;br /&gt;
				if monoParent == nil then&lt;br /&gt;
					mono = true&lt;br /&gt;
					local label = nil&lt;br /&gt;
					local taxonName = currentItem:getBestStatements(&#039;P225&#039;)[1] --taxon name&lt;br /&gt;
					if taxonName then&lt;br /&gt;
						local datavalue = taxonName.mainsnak.datavalue&lt;br /&gt;
						if datavalue then&lt;br /&gt;
							label = datavalue.value&lt;br /&gt;
						end&lt;br /&gt;
					end&lt;br /&gt;
					label = label or currentItem:getLabel()&lt;br /&gt;
					if label then&lt;br /&gt;
						monoParent = mw.ustring.gsub(label, &#039; .+&#039;, &#039;&#039;)&lt;br /&gt;
					end&lt;br /&gt;
				end&lt;br /&gt;
				&lt;br /&gt;
				local missingP171orP427sortkey = &#039;*&#039;&lt;br /&gt;
				local taxonRankState = currentItem:getBestStatements(&#039;P105&#039;)[1] --taxon rank&lt;br /&gt;
				if taxonRankState then taxonRank = taxonRankState.mainsnak.datavalue.value.id end&lt;br /&gt;
				&lt;br /&gt;
				if taxonRank and taxonRank == &#039;Q7432&#039; then --species&lt;br /&gt;
					--is monotypic species; add genus&lt;br /&gt;
					monoSpecies = true&lt;br /&gt;
					local parentTaxonState = currentItem:getBestStatements(&#039;P171&#039;)[1] --parent taxon&lt;br /&gt;
					if parentTaxonState then&lt;br /&gt;
						parentTaxon = parentTaxonState.mainsnak.datavalue.value.id&lt;br /&gt;
					else&lt;br /&gt;
						tCats[19] = &#039;[[Category:Taxonbars of monotypic species missing genera on Wikidata|&#039;..missingP171orP427sortkey..&#039;]]&#039;&lt;br /&gt;
						break&lt;br /&gt;
					end&lt;br /&gt;
					--confirm parent taxon rank == genus &amp;amp; monotypic&lt;br /&gt;
					if parentTaxon and resolveEntity._id(parentTaxon) then&lt;br /&gt;
						parentItem = mw.wikibase.getEntity(parentTaxon)&lt;br /&gt;
						if parentItem then&lt;br /&gt;
							local parentTaxonRankState = parentItem:getBestStatements(&#039;P105&#039;)[1] --taxon rank&lt;br /&gt;
							if parentTaxonRankState then parentTaxonRank = parentTaxonRankState.mainsnak.datavalue.value.id end&lt;br /&gt;
							if parentTaxonRank and parentTaxonRank == &#039;Q34740&#039; then --parent == genus&lt;br /&gt;
								for _, parentInstanceOfState in pairs ( parentItem:getBestStatements(&#039;P31&#039;) ) do --instance of&lt;br /&gt;
									local parentInstanceOf = parentInstanceOfState.mainsnak.datavalue.value.id &lt;br /&gt;
									if parentInstanceOf and&lt;br /&gt;
									  (parentInstanceOf == &#039;Q310890&#039; or parentInstanceOf == &#039;Q47487597&#039;) then --monotypic/fossil taxon&lt;br /&gt;
										parentMonoGenus = parentTaxon --confirmed&lt;br /&gt;
										break&lt;br /&gt;
									end&lt;br /&gt;
								end&lt;br /&gt;
								if parentMonoGenus and tFroms[parentMonoGenus] == nil then&lt;br /&gt;
									--housekeeping&lt;br /&gt;
									tFroms[parentMonoGenus] = 1&lt;br /&gt;
									iFroms = iFroms + 1&lt;br /&gt;
									fromTitleCount = fromTitleCount + 1&lt;br /&gt;
									--append monotypic genus &amp;amp; track&lt;br /&gt;
									parentArgs[&#039;from&#039;..fromTitleCount] = parentMonoGenus&lt;br /&gt;
									tCats[18] = &#039;[[Category:Taxonbars with automatically added monotypic genera]]&#039;&lt;br /&gt;
									break&lt;br /&gt;
					end	end	end	end&lt;br /&gt;
					if parentMonoGenus == nil or tFroms[parentMonoGenus] == nil then&lt;br /&gt;
						tCats[19] = &#039;[[Category:Taxonbars of monotypic species missing genera on Wikidata]]&#039;&lt;br /&gt;
						break&lt;br /&gt;
					end&lt;br /&gt;
					&lt;br /&gt;
				elseif taxonRank and taxonRank == &#039;Q34740&#039; then --genus&lt;br /&gt;
					--is monotypic genus; add species&lt;br /&gt;
					--(https://www.wikidata.org/wiki/Wikidata:Property_proposal/child_monotypic_taxon unnecessary thanks to P427!)&lt;br /&gt;
					monoGenus = true&lt;br /&gt;
					local childTaxonState = currentItem:getBestStatements(&#039;P427&#039;)[1] --taxonomic type&lt;br /&gt;
					if childTaxonState then&lt;br /&gt;
						childTaxon = childTaxonState.mainsnak.datavalue.value.id&lt;br /&gt;
					else&lt;br /&gt;
						tCats[20] = &#039;[[Category:Taxonbars of monotypic genera missing species on Wikidata|&#039;..missingP171orP427sortkey..&#039;]]&#039;&lt;br /&gt;
						break&lt;br /&gt;
					end&lt;br /&gt;
					--confirm child taxon rank == species &amp;amp; monotypic&lt;br /&gt;
					if childTaxon and resolveEntity._id(childTaxon) then&lt;br /&gt;
						childItem = mw.wikibase.getEntity(childTaxon)&lt;br /&gt;
						if childItem then&lt;br /&gt;
							local childTaxonRankState = childItem:getBestStatements(&#039;P105&#039;)[1] --taxon rank&lt;br /&gt;
							if childTaxonRankState then childTaxonRank = childTaxonRankState.mainsnak.datavalue.value.id end&lt;br /&gt;
							if childTaxonRank and childTaxonRank == &#039;Q7432&#039; then --child == species&lt;br /&gt;
								for _, childInstanceOfState in pairs ( childItem:getBestStatements(&#039;P31&#039;) ) do --instance of&lt;br /&gt;
									local childInstanceOf = childInstanceOfState.mainsnak.datavalue.value.id &lt;br /&gt;
									if childInstanceOf and&lt;br /&gt;
									  (childInstanceOf == &#039;Q310890&#039; or childInstanceOf == &#039;Q47487597&#039;) then --monotypic/fossil taxon&lt;br /&gt;
										childMonoSpecies = childTaxon --confirmed&lt;br /&gt;
										break&lt;br /&gt;
									end&lt;br /&gt;
								end&lt;br /&gt;
								if childMonoSpecies and tFroms[childMonoSpecies] == nil then&lt;br /&gt;
									--housekeeping&lt;br /&gt;
									tFroms[childMonoSpecies] = 1&lt;br /&gt;
									iFroms = iFroms + 1&lt;br /&gt;
									fromTitleCount = fromTitleCount + 1&lt;br /&gt;
									--append monotypic species &amp;amp; track&lt;br /&gt;
									parentArgs[&#039;from&#039;..fromTitleCount] = childMonoSpecies&lt;br /&gt;
									tCats[17] = &#039;[[Category:Taxonbars with automatically added monotypic species]]&#039;&lt;br /&gt;
									break&lt;br /&gt;
					end	end	end	end&lt;br /&gt;
					if childMonoSpecies == nil or tFroms[childMonoSpecies] == nil then&lt;br /&gt;
						tCats[20] = &#039;[[Category:Taxonbars of monotypic genera missing species on Wikidata]]&#039;&lt;br /&gt;
						break&lt;br /&gt;
					end&lt;br /&gt;
				end --monotype searches&lt;br /&gt;
				&lt;br /&gt;
			end --monotype handling&lt;br /&gt;
		end --for&lt;br /&gt;
	end --if currentItem&lt;br /&gt;
	&lt;br /&gt;
	--Setup navbox&lt;br /&gt;
	local navboxParams = {&lt;br /&gt;
		name  = &#039;Taxonbar&#039;,&lt;br /&gt;
		bodyclass = &#039;hlist&#039;,&lt;br /&gt;
		listclass = &#039;&#039;,&lt;br /&gt;
		groupstyle = &#039;text-align: left;&#039;,&lt;br /&gt;
	}&lt;br /&gt;
	&lt;br /&gt;
	for f = 1, fromTitleCount, 1&lt;br /&gt;
	do&lt;br /&gt;
		local elements, title = {}, nil&lt;br /&gt;
		--cleanup parameters&lt;br /&gt;
		if parentArgs[&#039;from&#039;..f] == &#039;&#039; then parentArgs[&#039;from&#039;..f] = nil end&lt;br /&gt;
		if parentArgs[&#039;title&#039;..f] == &#039;&#039; then parentArgs[&#039;title&#039;..f] = nil end&lt;br /&gt;
		--remap aliases&lt;br /&gt;
		for _, a in pairs( conf.aliases ) do&lt;br /&gt;
			local alias, name = mw.ustring.lower(a[1]), mw.ustring.lower(a[2])&lt;br /&gt;
			if parentArgs[alias..f] and parentArgs[name..f] == nil then&lt;br /&gt;
				parentArgs[name..f] = parentArgs[alias..f]&lt;br /&gt;
				parentArgs[alias..f] = nil&lt;br /&gt;
			end&lt;br /&gt;
		end&lt;br /&gt;
		--Fetch Wikidata item&lt;br /&gt;
		local from = resolveEntity._id(parentArgs[&#039;from&#039;..f])&lt;br /&gt;
		local item = mw.wikibase.getEntity(from)&lt;br /&gt;
		local label = nil&lt;br /&gt;
		if type(item) == &#039;table&#039; then&lt;br /&gt;
			local statements = item:getBestStatements(&#039;P225&#039;)[1] --taxon name&lt;br /&gt;
			if statements then&lt;br /&gt;
				local datavalue = statements.mainsnak.datavalue&lt;br /&gt;
				if datavalue then&lt;br /&gt;
					label = datavalue.value&lt;br /&gt;
				end&lt;br /&gt;
			end&lt;br /&gt;
			label = label or item:getLabel()&lt;br /&gt;
		else&lt;br /&gt;
			if parentArgs[&#039;from&#039;..f] then&lt;br /&gt;
				tCats[1] = &#039;&#039;&lt;br /&gt;
				tCats[5] = &#039;[[Category:Taxonbars with invalid from parameters]]&#039;&lt;br /&gt;
				errors = errors..mw.text.tag(&#039;strong&#039;, {class=&#039;error&#039;}, &#039;Error: &amp;quot;&#039;..&lt;br /&gt;
				         parentArgs[&#039;from&#039;..f]..&#039;&amp;quot; is not a valid Wikidata entity ID.&amp;lt;br /&amp;gt;&#039;)				&lt;br /&gt;
			end&lt;br /&gt;
		end&lt;br /&gt;
		if label and label ~= &#039;&#039; then&lt;br /&gt;
			title = mw.title.new(label)&lt;br /&gt;
		end&lt;br /&gt;
		if title == nil and parentArgs[&#039;title&#039;..f] then&lt;br /&gt;
			title = mw.title.new(parentArgs[&#039;title&#039;..f])&lt;br /&gt;
		end&lt;br /&gt;
		if title == nil and f == 1 then&lt;br /&gt;
			title = currentTitle&lt;br /&gt;
		end&lt;br /&gt;
		&lt;br /&gt;
		if title then&lt;br /&gt;
			if isNilOrEmpty( parentArgs[&#039;wikidata&#039;..f] ) and &lt;br /&gt;
			   (title.namespace == 0) then&lt;br /&gt;
				if parentArgs[&#039;from&#039;..f] then&lt;br /&gt;
					parentArgs[&#039;wikidata&#039;..f] = parentArgs[&#039;from&#039;..f]&lt;br /&gt;
				elseif item then&lt;br /&gt;
					parentArgs[&#039;wikidata&#039;..f] = item.id&lt;br /&gt;
				end&lt;br /&gt;
			end&lt;br /&gt;
			if title.namespace == 0 or stringArgs then --only in mainspace or if manual overrides exist&lt;br /&gt;
				local sourceCount = 0&lt;br /&gt;
				for _, params in pairs( conf.databases ) do&lt;br /&gt;
					params[1] = mw.ustring.lower(params[1])&lt;br /&gt;
					local propId = params[3]&lt;br /&gt;
					--Wikidata fallback if requested&lt;br /&gt;
					if (item and item.claims) and&lt;br /&gt;
					   (type(propId) == &#039;string&#039; or (type(propId) == &#039;number&#039; and propId &amp;gt; 0))&lt;br /&gt;
					then&lt;br /&gt;
						local wikidataId = getIdFromWikidata( item, &#039;P&#039;..propId )&lt;br /&gt;
						local v = parentArgs[params[1]..f]&lt;br /&gt;
						if wikidataId then&lt;br /&gt;
							if isNilOrEmpty(v) then&lt;br /&gt;
								parentArgs[params[1]..f] = wikidataId&lt;br /&gt;
							else&lt;br /&gt;
								if v and v ~= &#039;no&#039; and v ~= wikidataId then&lt;br /&gt;
									tCats[11] = &#039;[[Category:Taxonbars with manual taxon IDs differing from Wikidata]]&#039;&lt;br /&gt;
								elseif v and v == wikidataId then&lt;br /&gt;
									tCats[10] = &#039;[[Category:Taxonbars with manual taxon IDs identical to Wikidata]]&#039;&lt;br /&gt;
								end&lt;br /&gt;
							end&lt;br /&gt;
						end&lt;br /&gt;
					end&lt;br /&gt;
					if (item and item.claims) and&lt;br /&gt;
					   ( (type(propId) == &#039;number&#039; and propId &amp;lt; 0))&lt;br /&gt;
					then&lt;br /&gt;
						local wikidataId = getIdFromWikidata( item, &#039;P&#039;..-propId )&lt;br /&gt;
						--mw.addWarning (&amp;quot;propId=&amp;quot; .. tostring(propId) .. &amp;quot;; wikidata=&amp;quot; .. tostring(wikidataId))&lt;br /&gt;
						local v = parentArgs[params[1]..f]&lt;br /&gt;
						if v == &#039;yes&#039; then&lt;br /&gt;
							if wikidataId then&lt;br /&gt;
								parentArgs[params[1]..f] = wikidataId&lt;br /&gt;
							else&lt;br /&gt;
								parentArgs[params[1]..f] = nil  -- don&#039;t want to use &#039;yes&#039; as id&lt;br /&gt;
							end&lt;br /&gt;
						end&lt;br /&gt;
					end&lt;br /&gt;
					local val = parentArgs[params[1]..f]&lt;br /&gt;
					if val and val ~= &#039;&#039; and mw.ustring.lower(val) ~= &#039;no&#039; then&lt;br /&gt;
						if type(propId) == &#039;number&#039; then&lt;br /&gt;
							if propId &amp;lt; 0 then propId = -propId end --allow link&lt;br /&gt;
							if propId &amp;gt; 0 then --link&lt;br /&gt;
								table.insert( elements, createRow( params[1], params[2]..&#039;:&#039;, val, getLink( propId, params[1], val ).text, true ) )&lt;br /&gt;
								if params[1] == &#039;fossilworks&#039; then -- fossilworks being use to link to PBDB&lt;br /&gt;
									if elements[#elements] == elements[#elements-1] then -- check if identical PBDB entry already set&lt;br /&gt;
									    --mw.addWarning(&amp;quot;item has both Fossilworks and PBDB identifers:&amp;quot; .. val)&lt;br /&gt;
									    elements[#elements] = nil&lt;br /&gt;
								    end&lt;br /&gt;
								end&lt;br /&gt;
							else --propId == 0; no link&lt;br /&gt;
								table.insert( elements, createRow( params[1], params[2]..&#039;:&#039;, val, val, true ) )&lt;br /&gt;
							end&lt;br /&gt;
						else&lt;br /&gt;
							table.insert( elements, createRow( params[1], params[2]..&#039;:&#039;, val, getLink( propId, params[1], val ).text, true ) )&lt;br /&gt;
						end&lt;br /&gt;
						if params[1] ~= &#039;wikidata&#039; and params[1] ~= &#039;wikispecies&#039; then&lt;br /&gt;
							sourceCount = sourceCount + 1&lt;br /&gt;
						end&lt;br /&gt;
					end&lt;br /&gt;
				end --for _, params in pairs( conf.databases ) do&lt;br /&gt;
				&lt;br /&gt;
				if     sourceCount &amp;gt;= 45 then tCats[28] = &#039;[[Category:Taxonbars with 45+ taxon IDs]]&#039;&lt;br /&gt;
				elseif sourceCount &amp;gt;= 40 then tCats[27] = &#039;[[Category:Taxonbars with 40–44 taxon IDs]]&#039; --endashes&lt;br /&gt;
				elseif sourceCount &amp;gt;= 35 then tCats[26] = &#039;[[Category:Taxonbars with 35–39 taxon IDs]]&#039;&lt;br /&gt;
				elseif sourceCount &amp;gt;= 30 then tCats[25] = &#039;[[Category:Taxonbars with 30–34 taxon IDs]]&#039;&lt;br /&gt;
				elseif sourceCount &amp;gt;= 25 then tCats[24] = &#039;[[Category:Taxonbars with 25–29 taxon IDs]]&#039;&lt;br /&gt;
				elseif sourceCount &amp;gt;= 20 then tCats[23] = &#039;[[Category:Taxonbars with 20–24 taxon IDs]]&#039;&lt;br /&gt;
				end&lt;br /&gt;
				&lt;br /&gt;
				--Generate navbox title&lt;br /&gt;
				if sourceCount &amp;gt; 0 then&lt;br /&gt;
					rowCount = rowCount + 1&lt;br /&gt;
					if firstRow == 0 then firstRow = f end&lt;br /&gt;
					--set title from wikidata if it doesn&#039;t exist&lt;br /&gt;
					if isNilOrEmpty( parentArgs[&#039;title&#039;..f] ) then&lt;br /&gt;
						parentArgs[&#039;noTitle&#039;..f] = true&lt;br /&gt;
						parentArgs[&#039;title&#039;..f] = title.text&lt;br /&gt;
					end&lt;br /&gt;
					--if it exists now, set row heading to title&lt;br /&gt;
					if not isNilOrEmpty( parentArgs[&#039;title&#039;..f] ) then&lt;br /&gt;
						navboxParams[&#039;group&#039;..f] = TaxonItalics.italicizeTaxonName(parentArgs[&#039;title&#039;..f], false)&lt;br /&gt;
					else&lt;br /&gt;
						navboxParams[&#039;group&#039;..f] = &#039;&#039;&lt;br /&gt;
					end&lt;br /&gt;
					navboxParams[&#039;list&#039;..f] = table.concat( elements )&lt;br /&gt;
				elseif currentEntityId and (currentEntityId == parentArgs[&#039;from&#039;..f] or fromTitleCount == 1) then&lt;br /&gt;
					tCats[21] = &#039;[[Category:Taxonbars without primary Wikidata taxon IDs]]&#039;&lt;br /&gt;
				else&lt;br /&gt;
					tCats[22] = &#039;[[Category:Taxonbars without secondary Wikidata taxon IDs]]&#039;&lt;br /&gt;
				end&lt;br /&gt;
				&lt;br /&gt;
				--Tracking cats&lt;br /&gt;
				if not isNilOrEmpty( parentArgs[&#039;from&#039;..f] ) then&lt;br /&gt;
					tCats[1] = &#039;&#039; --blank &amp;quot;missing from&amp;quot; if &#039;from&#039; exists&lt;br /&gt;
					if parentArgs[&#039;from&#039;..f] == currentEntityId then&lt;br /&gt;
						tCats[2] = &#039;&#039; --blank &amp;quot;desynced&amp;quot; if &#039;from&#039; matches current page&lt;br /&gt;
					end&lt;br /&gt;
				end&lt;br /&gt;
				if tCats[1] ~= &#039;&#039; then&lt;br /&gt;
					tCats[2] = &#039;&#039; --cannot be &amp;quot;desynced&amp;quot; if no &#039;from&#039; params&lt;br /&gt;
				end&lt;br /&gt;
				if mono and monoWPok == nil then&lt;br /&gt;
					if monoSpecies then&lt;br /&gt;
						if monoParent == label then&lt;br /&gt;
							monoWPok = true&lt;br /&gt;
							tCats[29] = &#039;&#039;&lt;br /&gt;
						else&lt;br /&gt;
							tCats[29] = &#039;[[Category:Taxonbars of monotypic species missing genera on Wikipedia]]&#039;&lt;br /&gt;
						end&lt;br /&gt;
					end&lt;br /&gt;
					if monoGenus then&lt;br /&gt;
						local labelGenus = mw.ustring.gsub(label, &#039; .+&#039;, &#039;&#039;)&lt;br /&gt;
						local labelIsBinomial = mw.ustring.match(label, &#039;^[A-Z][a-z]+ [a-z]+&#039;)&lt;br /&gt;
						if labelIsBinomial and monoParent == labelGenus then&lt;br /&gt;
							monoWPok = true&lt;br /&gt;
							tCats[30] = &#039;&#039;&lt;br /&gt;
						else&lt;br /&gt;
							tCats[30] = &#039;[[Category:Taxonbars of monotypic genera missing species on Wikipedia]]&#039;&lt;br /&gt;
						end&lt;br /&gt;
					end&lt;br /&gt;
				end&lt;br /&gt;
				&lt;br /&gt;
			end --if title.namespace == 0 or stringArgs&lt;br /&gt;
		end --if title&lt;br /&gt;
	end --for f = 1, fromTitleCount, 1&lt;br /&gt;
	&lt;br /&gt;
	if rowCount &amp;gt; 0 then&lt;br /&gt;
		local Navbox = require(&#039;Module:Navbox&#039;)&lt;br /&gt;
		if rowCount &amp;gt; 1 then&lt;br /&gt;
			--remove duplicates and don&#039;t bother moving page title to top&lt;br /&gt;
			local rowIDs = {}&lt;br /&gt;
			for f = 1, fromTitleCount, 1&lt;br /&gt;
			do&lt;br /&gt;
				if not isNilOrEmpty( parentArgs[&#039;title&#039;..f] ) then&lt;br /&gt;
					if rowIDs[parentArgs[&#039;wikidata&#039;..f]] then --remove duplicate&lt;br /&gt;
						navboxParams[&#039;group&#039;..f] = nil&lt;br /&gt;
						navboxParams[&#039;list&#039;..f] = nil&lt;br /&gt;
					else&lt;br /&gt;
						rowIDs[parentArgs[&#039;wikidata&#039;..f]] = true&lt;br /&gt;
					end&lt;br /&gt;
				end&lt;br /&gt;
			end&lt;br /&gt;
			if parentArgs[&#039;title&#039;..2] and parentArgs[&#039;title&#039;..2] == currentTitle.text then&lt;br /&gt;
				if currentItem and parentArgs[&#039;from&#039;..2] == currentItem[&#039;id&#039;] then&lt;br /&gt;
					tCats[8] = &#039;[[Category:Taxonbars with from2 matching article title &amp;amp; QID]]&#039;&lt;br /&gt;
				else&lt;br /&gt;
					tCats[7] = &#039;[[Category:Taxonbars with from2 matching article title]]&#039;&lt;br /&gt;
				end&lt;br /&gt;
			end&lt;br /&gt;
			--adjust navbox for number of rows&lt;br /&gt;
			navboxParams[&#039;title&#039;] = &#039;[[Help:Taxon identifiers|Taxon identifiers]]&#039;&lt;br /&gt;
			if rowCount &amp;gt;= 4 then&lt;br /&gt;
				navboxParams[&#039;navbar&#039;] = &#039;plain&#039;&lt;br /&gt;
			else&lt;br /&gt;
				navboxParams[&#039;state&#039;] = &#039;off&#039;&lt;br /&gt;
				navboxParams[&#039;navbar&#039;] = &#039;off&#039;&lt;br /&gt;
			end&lt;br /&gt;
		elseif parentArgs[&#039;noTitle&#039;..firstRow] then --show title &amp;amp; taxon for 1-row taxonbars, per talk&lt;br /&gt;
			navboxParams[&#039;title&#039;] = &#039;[[Help:Taxon identifiers|Taxon identifiers]]&#039;&lt;br /&gt;
			navboxParams[&#039;state&#039;] = &#039;off&#039;&lt;br /&gt;
			navboxParams[&#039;navbar&#039;] = &#039;off&#039;&lt;br /&gt;
		else&lt;br /&gt;
			navboxParams[&#039;group&#039;..firstRow] = &#039;[[Help:Taxon identifiers|Taxon identifiers]]&amp;lt;br /&amp;gt;&#039;..navboxParams[&#039;group&#039;..firstRow]&lt;br /&gt;
		end&lt;br /&gt;
		&lt;br /&gt;
		--return navbox&lt;br /&gt;
		outString = Navbox._navbox(navboxParams)&lt;br /&gt;
	end --if rowCount &amp;gt; 0&lt;br /&gt;
	&lt;br /&gt;
	--Add categories&lt;br /&gt;
	if string.sub(currentTitle.subpageText,1,9) == &#039;testcases&#039; then parentArgs[&#039;demo&#039;] = true end&lt;br /&gt;
	if not isNilOrEmpty( parentArgs[&#039;demo&#039;] ) then&lt;br /&gt;
		outString = outString..mw.text.nowiki(table.concat(tCats))..&#039;&amp;lt;br /&amp;gt;&#039;&lt;br /&gt;
	elseif currentTitle.namespace == 0 then&lt;br /&gt;
		outString = outString..table.concat(tCats)&lt;br /&gt;
	end&lt;br /&gt;
	&lt;br /&gt;
	return outString..errors&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function p.taxonbar(frame) return p.authorityControlTaxon( frame:newChild{title = frame:getTitle()} ) end&lt;br /&gt;
&lt;br /&gt;
return p&lt;/div&gt;</summary>
		<author><name>Indicwiki</name></author>
	</entry>
	<entry>
		<id>https://sandbox.indicwiki.org/index.php?title=Module:Autotaxobox&amp;diff=66505</id>
		<title>Module:Autotaxobox</title>
		<link rel="alternate" type="text/html" href="https://sandbox.indicwiki.org/index.php?title=Module:Autotaxobox&amp;diff=66505"/>
		<updated>2026-05-11T08:16:18Z</updated>

		<summary type="html">&lt;p&gt;Indicwiki: 1 revision imported&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;--[[*************************************************************************&lt;br /&gt;
This module provides support to the automated taxobox system – the templates&lt;br /&gt;
Automatic taxobox, Speciesbox, Subspeciesbox, Infraspeciesbox, etc.&lt;br /&gt;
&lt;br /&gt;
In particular it provides a way of traversing the taxonomic hierarchy encoded&lt;br /&gt;
in taxonomy templates (templates with names of the form&lt;br /&gt;
&amp;quot;Template:Taxonomy/TAXON_NAME&amp;quot;) without causing template expansion depth&lt;br /&gt;
errors.&lt;br /&gt;
*****************************************************************************]]&lt;br /&gt;
&lt;br /&gt;
require(&#039;strict&#039;)&lt;br /&gt;
&lt;br /&gt;
local TaxonRanks = require(&#039;Module:Taxobox ranks&#039;) -- use functions from Module:Taxobox ranks to handle ranks&lt;br /&gt;
local TaxonItalics = require(&#039;Module:TaxonItalics&#039;) -- use a function from Module:TaxonItalics to italicize a taxon name&lt;br /&gt;
local TableRow = &#039;|- class=&amp;quot;taxonrow&amp;quot; \n&#039;&lt;br /&gt;
local TableEnd = &#039;|}\n&#039;&lt;br /&gt;
local p = {} -- functions made public&lt;br /&gt;
local l = {} -- internal functions, kept separate&lt;br /&gt;
local colour = &#039;&#039; -- colour for taxobox and taxonomy listings&lt;br /&gt;
&lt;br /&gt;
--[[=========================================================================&lt;br /&gt;
Limit the maximum depth of a taxonomic hierarchy that can be traversed;&lt;br /&gt;
avoids excessive processing time and protects against incorrectly set up&lt;br /&gt;
hierarchies, e.g. loops.&lt;br /&gt;
The value can be obtained externally via&lt;br /&gt;
{{#invoke:Autotaxobox|getMaxSearchLevels}}&lt;br /&gt;
=============================================================================]]&lt;br /&gt;
local MaxSearchLevels = 100&lt;br /&gt;
&lt;br /&gt;
function p.getMaxSearchLevels()&lt;br /&gt;
	return MaxSearchLevels&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
--[[========================== taxoboxColour ================================&lt;br /&gt;
Determines the correct colour for a taxobox, by searching up the taxonomic&lt;br /&gt;
hierarchy from the supplied taxon for the first taxon (other than&lt;br /&gt;
&#039;incertae sedis&#039;) that sets a taxobox colour. It is assumed that a valid&lt;br /&gt;
taxobox colour is defined using CSS rgb() syntax.&lt;br /&gt;
If no taxon that sets a taxobox colour is found, then &#039;transparent&#039; is&lt;br /&gt;
returned unless the taxonomic hierarchy is too deep, when the error colour is&lt;br /&gt;
returned.&lt;br /&gt;
Usage: {{#invoke:Autotaxobox|taxoboxColour|TAXON}}&lt;br /&gt;
=============================================================================]]&lt;br /&gt;
function p.taxoboxColour(frame)&lt;br /&gt;
	return p.getTaxoboxColour(frame, frame.args[1] or &#039;&#039;)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function p.getTaxoboxColour(frame, currTaxon)&lt;br /&gt;
	-- note that colour is global to this function; default is empty string&lt;br /&gt;
	local i = 1 -- count levels processed&lt;br /&gt;
	local searching = currTaxon ~= &#039;&#039; -- still searching for a colour?&lt;br /&gt;
	local foundICTaxon = false -- record whether &#039;incertae sedis&#039; found&lt;br /&gt;
	while searching and i &amp;lt;= MaxSearchLevels do&lt;br /&gt;
		local plainCurrTaxon, dummy = l.stripExtra(currTaxon) -- remove trailing text after /&lt;br /&gt;
		if string.lower(plainCurrTaxon) == &#039;incertae sedis&#039; then&lt;br /&gt;
			foundICTaxon = true&lt;br /&gt;
		else&lt;br /&gt;
			local possibleColour = frame:expandTemplate{ title = &#039;Taxobox colour&#039;, args = { plainCurrTaxon } }&lt;br /&gt;
			if string.sub(possibleColour,1,3) == &#039;rgb&#039; then&lt;br /&gt;
				colour = possibleColour&lt;br /&gt;
				searching = false&lt;br /&gt;
			end&lt;br /&gt;
		end&lt;br /&gt;
		if searching then&lt;br /&gt;
			local ok, parent = p.getTaxonInfoItem(frame, currTaxon, &#039;parent&#039;)&lt;br /&gt;
			if ok and parent ~= &#039;&#039; then&lt;br /&gt;
				currTaxon = parent&lt;br /&gt;
				i = i + 1&lt;br /&gt;
			else&lt;br /&gt;
				searching = false -- run off the top of the hierarchy or tried to use non-existent taxonomy template&lt;br /&gt;
			end&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
	if colour == &#039;&#039; then&lt;br /&gt;
		if foundICTaxon then&lt;br /&gt;
			colour = frame:expandTemplate{ title = &#039;Taxobox colour&#039;, args = { &#039;incertae sedis&#039; } }&lt;br /&gt;
		elseif searching then&lt;br /&gt;
			-- hierarchy exceeds MaxSearchLevels levels&lt;br /&gt;
			colour = frame:expandTemplate{ title = &#039;Taxobox/Error colour&#039;, args = { } }&lt;br /&gt;
		else&lt;br /&gt;
			colour = &#039;transparent&#039;&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
	return colour&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
--[[= = = = = = = = = = = = =  topLevelTaxon  = = = = = = = = = = = = = = = = &lt;br /&gt;
Defines the correct top level taxa, one of which should terminate every&lt;br /&gt;
taxonomic hierarchy encoded in taxonomy templates.&lt;br /&gt;
= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =]]&lt;br /&gt;
function l.topLevelTaxon(taxon)&lt;br /&gt;
	return  taxon == &#039;Life&#039; or taxon == &#039;Veterovata&#039; or taxon == &#039;Ichnos&#039;&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
--[[=========================== taxoboxList =================================&lt;br /&gt;
Returns the rows of taxa in an automated taxobox, based on the taxonomic&lt;br /&gt;
hierarchy for the supplied taxon.&lt;br /&gt;
Usage:&lt;br /&gt;
{{#invoke:Autotaxobox|taxoboxList|TAXON&lt;br /&gt;
|display_taxa = the number of taxa *above* TAXON to force to be displayed&lt;br /&gt;
|authority = taxonomic authority for TAXON&lt;br /&gt;
|parent_authority = taxonomic authority for TAXON&#039;s parent&lt;br /&gt;
|gparent_authority = taxonomic authority for TAXON&#039;s grandparent&lt;br /&gt;
|ggparent_authority = taxonomic authority for TAXON&#039;s greatgrandparent&lt;br /&gt;
|gggparent_authority = taxonomic authority for TAXON&#039;s greatgreatgrandparent&lt;br /&gt;
|ggggparent_authority = taxonomic authority for TAXON&#039;s greatgreatgreatgrandparent&lt;br /&gt;
|bold_first = &#039;bold&#039; to bold TAXON in its row&lt;br /&gt;
|virus = &#039;yes&#039; to apply virus taxa italicization standards&lt;br /&gt;
}}&lt;br /&gt;
=============================================================================]]&lt;br /&gt;
function p.taxoboxList(frame)&lt;br /&gt;
	local currTaxon = frame.args[1] or &#039;&#039;&lt;br /&gt;
	if currTaxon == &#039;&#039; then return &#039;&#039; end&lt;br /&gt;
	local displayN = (tonumber(frame.args[&#039;display_taxa&#039;]) or 1) + 1&lt;br /&gt;
	local authTable = {}&lt;br /&gt;
	authTable[1] = frame.args[&#039;authority&#039;] or &#039;&#039;&lt;br /&gt;
	authTable[2] = frame.args[&#039;parent_authority&#039;] or &#039;&#039;&lt;br /&gt;
	authTable[3] = frame.args[&#039;gparent_authority&#039;] or &#039;&#039;&lt;br /&gt;
	authTable[4] = frame.args[&#039;ggparent_authority&#039;] or &#039;&#039;&lt;br /&gt;
	authTable[5] = frame.args[&#039;gggparent_authority&#039;] or &#039;&#039;&lt;br /&gt;
	authTable[6] = frame.args[&#039;ggggparent_authority&#039;] or &#039;&#039;&lt;br /&gt;
	local authTableMax = 6&lt;br /&gt;
	local boldFirst = frame.args[&#039;bold_first&#039;] or &#039;link&#039; -- values &#039;link&#039; or &#039;bold&#039;&lt;br /&gt;
	local virus = frame.args[&#039;virus&#039;] or &#039;no&#039; -- values &#039;yes&#039; or &#039;no&#039;&lt;br /&gt;
	local offset = tonumber(frame.args[&#039;offset&#039;] or 0)&lt;br /&gt;
	-- adjust the authority table if &#039;authority&#039; refers to a rank lower than the target taxon&lt;br /&gt;
	if offset ~= 0 then&lt;br /&gt;
		for i = 1, authTableMax do&lt;br /&gt;
			local j = i + offset&lt;br /&gt;
			if j &amp;lt;= authTableMax then&lt;br /&gt;
				authTable[i] = authTable[j]&lt;br /&gt;
			else&lt;br /&gt;
				authTable[i] = &#039;&#039;&lt;br /&gt;
			end&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
	local taxonTable, taxonRankTable = l.makeTable(frame, currTaxon)&lt;br /&gt;
	local res = &#039;&#039;&lt;br /&gt;
	local topTaxonN = taxonTable.n&lt;br /&gt;
	-- display all taxa above possible greatgreatgrandparent, without authority&lt;br /&gt;
	for i = topTaxonN, authTableMax+1, -1 do&lt;br /&gt;
		res = res .. l.showTaxon(frame, taxonTable[i], taxonRankTable[i], topTaxonN==i, &#039;&#039;, displayN &amp;gt;= i, &#039;&#039;, virus)&lt;br /&gt;
	end&lt;br /&gt;
	-- display all taxa above possible parent, with authority if given&lt;br /&gt;
	for i = math.min(topTaxonN, authTableMax), 2, -1 do&lt;br /&gt;
		res = res .. l.showTaxon(frame, taxonTable[i], taxonRankTable[i], topTaxonN==i, authTable[i], displayN &amp;gt;= i, &#039;&#039;, virus)&lt;br /&gt;
	end&lt;br /&gt;
	-- display target taxon, always displayed and emboldened&lt;br /&gt;
	res = res .. l.showTaxon(frame, taxonTable[1], taxonRankTable[1], topTaxonN==1, authTable[1], true, boldFirst, virus)&lt;br /&gt;
	return res&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
--[[= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =&lt;br /&gt;
Show one taxon row in a taxobox.&lt;br /&gt;
= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =]]&lt;br /&gt;
function l.showTaxon(frame, taxon, rank, isTopTaxon, auth, force, boldFirst, virus)&lt;br /&gt;
	-- it&#039;s an error if this is the top taxon and it&#039;s not a top level taxon (e.g. &amp;quot;Life&amp;quot;)&lt;br /&gt;
	if isTopTaxon then&lt;br /&gt;
		if l.topLevelTaxon(taxon) then&lt;br /&gt;
			return &#039;&#039; -- don&#039;t display a top level taxon&lt;br /&gt;
		elseif (mw.title.new(&#039;Taxonomy/&#039;..taxon, &#039;Template&#039;) or {}).exists then&lt;br /&gt;
			-- taxonomy template for this taxon has no parent specified&lt;br /&gt;
			return frame:expandTemplate{ title = &#039;Create taxonomy&#039;, args = {taxon, msg=&#039;Taxonomy template does not specify a parent&#039;} } .. &#039;\n&#039; .. TableRow&lt;br /&gt;
		else&lt;br /&gt;
			-- no taxonomy template for this taxon&lt;br /&gt;
			return frame:expandTemplate{ title = &#039;Create taxonomy&#039;, args = {taxon, msg=&#039;Missing taxonomy template&#039;} } .. &#039;\n&#039; .. TableRow&lt;br /&gt;
		end&lt;br /&gt;
	else&lt;br /&gt;
		-- if showing is not already forced, force if it&#039;s a principal rank or an authority is specified&lt;br /&gt;
		force = force or frame:expandTemplate{ title = &#039;Principal rank&#039;, args = {rank} } == &#039;yes&#039; or&lt;br /&gt;
		        auth ~= &#039;&#039;&lt;br /&gt;
		if not force then&lt;br /&gt;
			-- if showing is still not already forced, force if the taxonomy template has &#039;always_display&#039; set&lt;br /&gt;
			local ok, alwaysDisplay = p.getTaxonInfoItem(frame, taxon, &#039;always_display&#039;)&lt;br /&gt;
			force = alwaysDisplay == &#039;yes&#039; or  alwaysDisplay == &#039;true&#039;&lt;br /&gt;
		end&lt;br /&gt;
		if force then&lt;br /&gt;
			local res = l.tableCell(TaxonRanks.doAngliciseRank(rank, &#039;no&#039;) .. &#039;:&#039;)&lt;br /&gt;
			local bold = &#039;no&#039;&lt;br /&gt;
			if boldFirst == &#039;bold&#039; then bold = &#039;yes&#039; end&lt;br /&gt;
			if auth ~= &#039;&#039; then&lt;br /&gt;
				auth = &#039;&amp;lt;br&amp;gt;&amp;lt;small&amp;gt;&#039; .. auth .. &#039;&amp;lt;/small&amp;gt;&#039;&lt;br /&gt;
			end&lt;br /&gt;
			local res = res .. l.tableCell(l.getTaxonLink(frame, taxon, rank, bold, &#039;&#039;, &#039;&#039;, virus) .. auth) -- italic, abbreviated&lt;br /&gt;
			return res .. TableRow&lt;br /&gt;
		else&lt;br /&gt;
			return &#039;&#039;&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
--[[========================== taxonomyList =================================&lt;br /&gt;
Returns the cells of the taxonomy table displayed on the right hand side of&lt;br /&gt;
&amp;quot;Template:Taxonomy....&amp;quot; pages.&lt;br /&gt;
Usage: {{#invoke:Autotaxobox|taxonomyList|TAXON}}&lt;br /&gt;
=============================================================================]]&lt;br /&gt;
function p.taxonomyList(frame)&lt;br /&gt;
	local currTaxon = frame.args[1] or &#039;&#039;&lt;br /&gt;
	if currTaxon == &#039;&#039; then&lt;br /&gt;
		return &#039;{|class=&amp;quot;infobox biota&amp;quot;\n&#039; .. TableRow .. l.tableCell(&#039;&#039;) .. l.tableCell(&#039;ERROR: no taxon supplied&#039;) .. TableEnd&lt;br /&gt;
	end&lt;br /&gt;
	local taxonTable, taxonRankTable = l.makeTable(frame, currTaxon)&lt;br /&gt;
&lt;br /&gt;
	local lastRankVal = 1000000&lt;br /&gt;
	local orderOk = true&lt;br /&gt;
	-- check whether the taxonomy is for viruses; use already determined taxon colour if possible&lt;br /&gt;
	local virus = &#039;no&#039;&lt;br /&gt;
	local taxoColour = colour&lt;br /&gt;
	if taxoColour == &#039;&#039; then&lt;br /&gt;
		if  taxonTable[taxonTable.n] == &#039;Ichnos&#039; or taxonTable[taxonTable.n] == &#039;Veterovata&#039; then&lt;br /&gt;
			taxoColour = frame:expandTemplate{ title = &#039;Taxobox colour&#039;, args = { taxonTable[taxonTable.n] } }&lt;br /&gt;
		else&lt;br /&gt;
			taxoColour = frame:expandTemplate{ title = &#039;Taxobox colour&#039;, args = { taxonTable[taxonTable.n - 1] } }&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
	if taxoColour == frame:expandTemplate{ title = &#039;Taxobox colour&#039;, args = { &#039;virus&#039; } } then&lt;br /&gt;
		virus = &#039;yes&#039;&lt;br /&gt;
	end&lt;br /&gt;
	-- add information message&lt;br /&gt;
	local res = &#039;&amp;lt;p style=&amp;quot;float:right&amp;quot;&amp;gt;Bold ranks show taxa that will be shown in taxoboxes&amp;lt;br&amp;gt;because rank is principal or &amp;lt;code&amp;gt;always_display=yes&amp;lt;/code&amp;gt;.&amp;lt;/p&amp;gt;\n&#039;&lt;br /&gt;
&lt;br /&gt;
	-- start table&lt;br /&gt;
	res =  res .. &#039;{| class=&amp;quot;infobox biota&amp;quot; style=&amp;quot;text-align: left; font-size:100%&amp;quot;\n&#039; .. TableRow .. &#039;! colspan=4 style=&amp;quot;text-align: center; color:var(--color-base,#202122); background-color: &#039;&lt;br /&gt;
	            .. taxoColour .. &#039;&amp;quot;|Ancestral taxa\n&#039;&lt;br /&gt;
	-- deal first with the top level taxon; if there are no errors, it should be Life/Veterovata/Ichnos, which are &lt;br /&gt;
	-- not displayed&lt;br /&gt;
	local taxon = taxonTable[taxonTable.n]&lt;br /&gt;
	if not l.topLevelTaxon(taxon) then&lt;br /&gt;
		local msg = &#039;Taxonomy template missing&#039;&lt;br /&gt;
		if mw.title.new(&#039;Taxonomy/&#039;..taxon, &#039;Template&#039;).exists then&lt;br /&gt;
			msg = &#039;Parent taxon needed&#039;&lt;br /&gt;
		end&lt;br /&gt;
		res = res .. TableRow .. l.tableCell(&#039;colspan=2&#039;, frame:expandTemplate{title = &#039;Create taxonomy&#039;, args = {taxon, msg = msg}})&lt;br /&gt;
	end&lt;br /&gt;
	-- now output the rest of the table&lt;br /&gt;
	local currRankVal&lt;br /&gt;
	for i = taxonTable.n-1, 1, -1 do&lt;br /&gt;
		-- check ranks are in right order in the hierarchy&lt;br /&gt;
		taxon = taxonTable[i]&lt;br /&gt;
		local rank = taxonRankTable[i]&lt;br /&gt;
		currRankVal = TaxonRanks.lookupRankVal(rank)&lt;br /&gt;
		if currRankVal then&lt;br /&gt;
			orderOk = currRankVal &amp;lt; lastRankVal&lt;br /&gt;
			if orderOk then lastRankVal = currRankVal end&lt;br /&gt;
		else&lt;br /&gt;
			orderOk = true&lt;br /&gt;
		end&lt;br /&gt;
		-- see if the row will be displayed in a taxobox; bold the rank if so&lt;br /&gt;
		local boldRank = false&lt;br /&gt;
		local ok, alwaysDisplay = p.getTaxonInfoItem(frame, taxon, &#039;always_display&#039;)&lt;br /&gt;
		if ok and (alwaysDisplay == &#039;yes&#039; or alwaysDisplay == &#039;true&#039;) then&lt;br /&gt;
			boldRank = true&lt;br /&gt;
		else&lt;br /&gt;
			boldRank = frame:expandTemplate{ title = &#039;Principal rank&#039;, args = {rank} } == &#039;yes&#039;&lt;br /&gt;
		end&lt;br /&gt;
		-- now return a row of the taxonomy table with anomalous ranks marked&lt;br /&gt;
		local errorStr = &#039;&#039;&lt;br /&gt;
		if not orderOk then errorStr = &#039;yes&#039; end&lt;br /&gt;
		local link = l.getTaxonLink(frame, taxon, rank, &#039;&#039;, &#039;&#039;, &#039;&#039;, virus) -- bold, italic, abbreviated&lt;br /&gt;
		res = res .. l.taxonomyListRow(frame, taxon, rank, link, boldRank, errorStr)&lt;br /&gt;
	end&lt;br /&gt;
	-- close table&lt;br /&gt;
	res = res .. TableEnd&lt;br /&gt;
	-- error-tracking for taxonomy templates&lt;br /&gt;
	-- if the last row has an anomalous rank, put the page in an error-tracking category&lt;br /&gt;
	local errCat1 = &#039;&#039;&lt;br /&gt;
	if not orderOk then&lt;br /&gt;
		errCat1 = &#039;[[Category:Taxonomy templates showing anomalous ranks]]\n&#039;&lt;br /&gt;
	end&lt;br /&gt;
	-- if the last row has a taxon name in the page name that does not match the link text,&lt;br /&gt;
	-- put the taxonomy template in a tracking category&lt;br /&gt;
	local dummy, linkText = p.getTaxonInfoItem(frame, taxon, &#039;link_text&#039;)&lt;br /&gt;
	local match = l.matchTaxonLink(taxon, linkText, currRankVal and currRankVal &amp;lt; TaxonRanks.lookupRankVal(&#039;genus&#039;))&lt;br /&gt;
	local errCat2 = &#039;&#039;&lt;br /&gt;
	if not match then&lt;br /&gt;
		errCat2 = &#039;[[Category:Taxonomy templates with name and link text not matching|&#039; .. taxon .. &#039;]]\n&#039;&lt;br /&gt;
	end&lt;br /&gt;
	if errCat1..errCat2 ~= &#039;&#039; then&lt;br /&gt;
		res = res .. frame:expandTemplate{ title = &#039;Template other&#039;, args = { errCat1..errCat2} }&lt;br /&gt;
	end&lt;br /&gt;
	return res&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
--[[ = = = = = = = = = = = = = = taxonomyListRow  = = = = = = = = = = = = = = &lt;br /&gt;
Returns a single row of the taxonomy table displayed on the right hand side&lt;br /&gt;
 of &amp;quot;Template:Taxonomy....&amp;quot; pages.&lt;br /&gt;
= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =]]&lt;br /&gt;
function l.taxonomyListRow(frame, taxon, rank, link, boldRank, error)&lt;br /&gt;
	local res = &#039;&#039;&lt;br /&gt;
	if taxon == &#039;&#039; or rank == &#039;&#039; then return res end&lt;br /&gt;
	local baseTaxon, qualifier = l.stripExtra(taxon)&lt;br /&gt;
	-- if appropriate, make it clear that some taxa have been skipped via a ... row&lt;br /&gt;
	if qualifier == &#039;/skip&#039; then&lt;br /&gt;
		res = res .. TableRow .. l.tableCell(&#039;.....&#039;) .. l.tableCell(&#039;.....&#039;)&lt;br /&gt;
	end&lt;br /&gt;
	-- now generate a row of the table&lt;br /&gt;
	res = res .. TableRow&lt;br /&gt;
	local cellContent = &#039;&#039;&lt;br /&gt;
	local anglicizedRank = TaxonRanks.doAngliciseRank(rank, &#039;no&#039;)&lt;br /&gt;
	if boldRank then&lt;br /&gt;
		cellContent = cellContent .. &#039;&amp;lt;b&amp;gt;&#039; .. anglicizedRank .. &#039;&amp;lt;/b&amp;gt;:&#039;&lt;br /&gt;
	else&lt;br /&gt;
		cellContent = cellContent .. anglicizedRank .. &#039;:&#039;&lt;br /&gt;
	end&lt;br /&gt;
	if error == &#039;yes&#039; then&lt;br /&gt;
		cellContent = &#039;&amp;lt;span style=&amp;quot;background-color:#FDD&amp;quot;&amp;gt;&#039; .. cellContent .. &#039;&amp;lt;/span&amp;gt;&#039;&lt;br /&gt;
	end&lt;br /&gt;
	res = res .. l.tableCell(cellContent)&lt;br /&gt;
	          .. l.tableCell(&#039;&amp;lt;span style=&amp;quot;white-space:nowrap;&amp;quot;&amp;gt;&#039; .. link .. &#039;&amp;lt;/span&amp;gt;&#039;)&lt;br /&gt;
	          .. l.tableCell(&#039;&amp;lt;span style=&amp;quot;font-size:smaller;white-space:nowrap;&amp;quot;&amp;gt;&#039; .. qualifier  .. &#039;&amp;lt;/span&amp;gt;&#039;)&lt;br /&gt;
	          .. l.tableCell(&#039;&amp;lt;span style=&amp;quot;white-space:nowrap;&amp;quot;&amp;gt;&#039; .. frame:expandTemplate{ title = &#039;Edit a taxon&#039;, args = { taxon } } .. &#039;&amp;lt;/span&amp;gt;&#039;)&lt;br /&gt;
	return res&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
--[[========================= callTaxonomyKey ===============================&lt;br /&gt;
Prepares for, and then calls, Template:Taxonomy key to display a taxonomy&lt;br /&gt;
template page. It does this by building up the information the template&lt;br /&gt;
requires, following one &#039;same as&#039; link, if required.&lt;br /&gt;
Usage:&lt;br /&gt;
{{#invoke:Autotaxobox|callTaxonomyKey&lt;br /&gt;
|parent=&lt;br /&gt;
|rank=&lt;br /&gt;
|extinct=&lt;br /&gt;
|always_display=&lt;br /&gt;
|link_target=value of &#039;link&#039; parameter in taxonomy template&lt;br /&gt;
|link_text=value of parameter 2 in taxonomy template&lt;br /&gt;
|same_as=&lt;br /&gt;
}}&lt;br /&gt;
=============================================================================]]&lt;br /&gt;
local PARENT = 1&lt;br /&gt;
local RANK = 2&lt;br /&gt;
local LINK_TARGET = 3&lt;br /&gt;
local LINK_TEXT = 4&lt;br /&gt;
local ALWAYS_DISPLAY = 5&lt;br /&gt;
local EXTINCT = 6&lt;br /&gt;
local SAME_AS = 7&lt;br /&gt;
local REFS = 8&lt;br /&gt;
&lt;br /&gt;
function p.callTaxonomyKey(frame)&lt;br /&gt;
	local taxon = frame.args[&#039;taxon&#039;] or &#039;&#039;&lt;br /&gt;
	local parent = frame.args[&#039;parent&#039;] or &#039;&#039;&lt;br /&gt;
	local rank = frame.args[&#039;rank&#039;] or &#039;&#039;&lt;br /&gt;
	local extinct = string.lower(frame.args[&#039;extinct&#039;]) or &#039;&#039;&lt;br /&gt;
	local alwaysDisplay = string.lower(frame.args[&#039;always_display&#039;]) or &#039;&#039;&lt;br /&gt;
	local linkTarget = frame.args[&#039;link_target&#039;] or &#039;&#039;&lt;br /&gt;
	local linkText = frame.args[&#039;link_text&#039;] or &#039;&#039; -- this is the &amp;quot;raw&amp;quot; link text, and can be &#039;&#039;&lt;br /&gt;
	local refs = frame.args[&#039;refs&#039;] or &#039;&#039;&lt;br /&gt;
	local sameAsTaxon = frame.args[&#039;same_as&#039;] or &#039;&#039;&lt;br /&gt;
	if sameAsTaxon ~= &#039;&#039; then&lt;br /&gt;
		-- try using the &#039;same as&#039; taxon; it&#039;s an error if it doesn&#039;t exist&lt;br /&gt;
		local ok, sameAsInfoStr = pcall(frame.expandTemplate, frame, { title = &#039;Template:Taxonomy/&#039; .. sameAsTaxon, args = {[&#039;machine code&#039;] = &#039;all&#039; } })&lt;br /&gt;
		if ok then&lt;br /&gt;
			local sameAsInfo = mw.text.split(sameAsInfoStr, &#039;$&#039;, true)&lt;br /&gt;
			--&#039;same as&#039; taxon&#039;s taxonomy template must not have a &#039;same as&#039; link&lt;br /&gt;
			if sameAsInfo[SAME_AS] == &#039;&#039; then&lt;br /&gt;
				if parent == &#039;&#039; then parent = sameAsInfo[PARENT] end&lt;br /&gt;
				if rank == &#039;&#039; then rank = sameAsInfo[RANK] end&lt;br /&gt;
				if extinct == &#039;&#039; then extinct = string.lower(sameAsInfo[EXTINCT]) end&lt;br /&gt;
				if alwaysDisplay == &#039;&#039; then alwaysDisplay = string.lower(sameAsInfo[ALWAYS_DISPLAY]) end&lt;br /&gt;
				if linkTarget == &#039;&#039; then linkTarget = sameAsInfo[LINK_TARGET] end&lt;br /&gt;
				if linkText == &#039;&#039; then linkText = sameAsInfo[LINK_TEXT] end&lt;br /&gt;
				if refs == &#039;&#039; and parent == sameAsInfo[PARENT] then refs = sameAsInfo[REFS] end&lt;br /&gt;
			else&lt;br /&gt;
				return &#039;&amp;lt;span style=&amp;quot;color:red; font-size:1.1em&amp;quot;&amp;gt;Error: attempt to follow two &amp;quot;same as&amp;quot; links&amp;lt;/span&amp;gt;: &amp;lt;code&amp;gt;same_as = &#039; .. sameAsTaxon .. &#039;&amp;lt;/code&amp;gt;, but [[Template:Taxonomy/&#039; .. sameAsTaxon .. &#039;]] also has a&amp;lt;code&amp;gt;same_as&amp;lt;/code&amp;gt; parameter.&#039;&lt;br /&gt;
			end&lt;br /&gt;
		else&lt;br /&gt;
			return frame:expandTemplate{ title = &#039;Template:Taxonomy key/missing template&#039;, args = {taxon=sameAsTaxon, msg=&#039;given as the value of &amp;lt;code&amp;gt;same as&amp;lt;/code&amp;gt;&#039;} }&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
	local link = linkTarget&lt;br /&gt;
	if linkText ~= &#039;&#039; and linkText ~= linkTarget then link = link .. &amp;quot;|&amp;quot; .. linkText end&lt;br /&gt;
	-- check consistency of extinct status; if this taxon is not extinct, parent must not be either&lt;br /&gt;
	local extinctError = &#039;no&#039;&lt;br /&gt;
	if parent ~= &#039;&#039; and (extinct == &#039;&#039; or extinct == &#039;no&#039; or extinct == &#039;false&#039;) then&lt;br /&gt;
		local ok, parentExtinct = p.getTaxonInfoItem(frame, parent, &#039;extinct&#039;)&lt;br /&gt;
		if ok and (parentExtinct == &#039;yes&#039; or parentExtinct == &#039;true&#039;) then extinctError = &#039;yes&#039; end&lt;br /&gt;
	end&lt;br /&gt;
	return frame:expandTemplate{ title = &#039;Taxonomy key&#039;,&lt;br /&gt;
			args = {taxon=taxon, parent=parent, rank=rank, extinct=extinct, always_display=alwaysDisplay, link_target=linkTarget, link=link, refs=refs, same_as=sameAsTaxon, extinct_error = extinctError} }&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
--[[============================= showRefs ==================================&lt;br /&gt;
Shows the refs field in a taxonomy template, handing incertae sedis taxa and&lt;br /&gt;
using &#039;–&#039; for absent refs.&lt;br /&gt;
Usage: {{#invoke:Autotaxobox|showRefs|TAXON|REFS}}&lt;br /&gt;
=============================================================================]]&lt;br /&gt;
function p.showRefs(frame)&lt;br /&gt;
	local taxonName = frame.args[1] or &#039;&#039;&lt;br /&gt;
	local refs = frame.args[2] or &#039;&#039;&lt;br /&gt;
	return l.doShowRefs(taxonName, refs)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
--[[= = = = = = = = = = = = = = doShowRefs  = = = = = = = = = = = = = = = = =&lt;br /&gt;
Show the refs field in a taxonomy template.&lt;br /&gt;
= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =]]&lt;br /&gt;
function l.doShowRefs(taxonName, refs)&lt;br /&gt;
	if mw.text.split(taxonName, &#039;/&#039;, true)[1] == &#039;Incertae sedis&#039; then&lt;br /&gt;
		refs = &#039;not applicable (&amp;lt;i&amp;gt;incertae sedis&amp;lt;/i&amp;gt;)&#039;&lt;br /&gt;
	elseif refs == &#039;&#039; then&lt;br /&gt;
		refs = &#039;–&#039;&lt;br /&gt;
	end&lt;br /&gt;
	return refs&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
--[[============================ taxonInfo ==================================&lt;br /&gt;
Extracts and returns information from Template:Taxonomy/TAXON, following&lt;br /&gt;
one &#039;same as&#039; link if required.&lt;br /&gt;
Usage: {{#invoke:Autotaxobox|taxonInfo|TAXON|ITEM}}&lt;br /&gt;
ITEM is one of: &#039;parent&#039;, &#039;rank&#039;, &#039;link target&#039;, &#039;link text&#039;, &#039;extinct&#039;,&lt;br /&gt;
&#039;always display&#039;, &#039;refs&#039;, &#039;same as&#039; or &#039;all&#039;.&lt;br /&gt;
If ITEM is not specified, the default is &#039;all&#039; – all values in a single string&lt;br /&gt;
separated by &#039;$&#039;.&lt;br /&gt;
=============================================================================]]&lt;br /&gt;
function p.taxonInfo(frame)&lt;br /&gt;
	local taxon = frame.args[1] or &#039;&#039;&lt;br /&gt;
	local item = frame.args[2] or &#039;&#039;&lt;br /&gt;
	if item == &#039;&#039; then item = &#039;all&#039; end&lt;br /&gt;
	local ok, info = p.getTaxonInfoItem(frame, taxon, item)&lt;br /&gt;
	return info&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
--[[= = = = = = = = = = = getTaxonInfoItem  = = = = = = = = = = = = = = = = =&lt;br /&gt;
Utility function to extract an item of information from a &lt;br /&gt;
taxonomy template, following one &#039;same as&#039; link if required.&lt;br /&gt;
= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =]]&lt;br /&gt;
function p.getTaxonInfoItem(frame, taxon, item)&lt;br /&gt;
	local ok, info&lt;br /&gt;
	-- item == &#039;dagger&#039; is a special case&lt;br /&gt;
	if item == &#039;dagger&#039; then&lt;br /&gt;
		ok, info = p.getTaxonInfoItem(frame, taxon, &#039;extinct&#039;)&lt;br /&gt;
		if ok then&lt;br /&gt;
			if info == &#039;yes&#039; or info == &#039;true&#039; then&lt;br /&gt;
				info = &#039;&amp;amp;dagger;&#039;&lt;br /&gt;
			else&lt;br /&gt;
				info = &#039;&#039;&lt;br /&gt;
			end&lt;br /&gt;
		end&lt;br /&gt;
	-- item ~= &#039;dagger&#039;&lt;br /&gt;
	else&lt;br /&gt;
		ok, info = pcall(frame.expandTemplate, frame, { title = &#039;Taxonomy/&#039; .. taxon, args = {[&#039;machine code&#039;] = item } })&lt;br /&gt;
		if ok then&lt;br /&gt;
			if info == &#039;&#039; then&lt;br /&gt;
				-- try &#039;same as&#039;&lt;br /&gt;
				local sameAsTaxon = frame:expandTemplate{ title = &#039;Taxonomy/&#039; .. taxon, args = {[&#039;machine code&#039;] = &#039;same as&#039; } }&lt;br /&gt;
				if sameAsTaxon ~= &#039;&#039; then&lt;br /&gt;
					ok, info = pcall(frame.expandTemplate, frame, { title = &#039;Taxonomy/&#039; .. sameAsTaxon, args = {[&#039;machine code&#039;] = item } })&lt;br /&gt;
				end&lt;br /&gt;
			end&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
	if ok then&lt;br /&gt;
		-- if item is &#039;link_text&#039;, trim info and check whether &#039;(?)&#039; needs to be added&lt;br /&gt;
		if item == &#039;link_text&#039; then&lt;br /&gt;
			-- there is a newline at the end of linkText when taxonomy template has &amp;quot;|link = LINK_TARGET|LINK_TEXT&amp;quot;&lt;br /&gt;
			info = mw.text.trim(info)&lt;br /&gt;
			if string.sub(taxon, -2) == &#039;/?&#039; and not string.find(info, &#039;?&#039;, 1, true) then&lt;br /&gt;
				info = info .. &#039;&amp;lt;span style=&amp;quot;font-style:normal;font-weight:normal;&amp;quot;&amp;gt;&amp;amp;nbsp;(?)&amp;lt;/span&amp;gt;&#039;&lt;br /&gt;
			end&lt;br /&gt;
		end&lt;br /&gt;
	else&lt;br /&gt;
		info = &#039;[[Template:Taxonomy/&#039; .. taxon .. &#039;]]&#039; --error indicator in code before conversion to Lua&lt;br /&gt;
	end&lt;br /&gt;
	return ok, info&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
--[[============================ taxonLink ==================================&lt;br /&gt;
Returns a wikilink to a taxon, if required including &#039;†&#039; before it and&lt;br /&gt;
&#039; (?)&#039; after it, and optionally italicized or bolded without a wikilink.&lt;br /&gt;
Usage:&lt;br /&gt;
{{#invoke:Autotaxobox|taxonLink&lt;br /&gt;
|taxon=           : having &#039;/?&#039; at the end triggers the output of &#039; (?)&#039;&lt;br /&gt;
|extinct=         : &#039;yes&#039; or &#039;true&#039; trigger the output of &#039;†&#039;&lt;br /&gt;
|bold=            : &#039;yes&#039; makes the core output bold and not wikilinked&lt;br /&gt;
|italic=          : &#039;yes&#039; makes the core output italic&lt;br /&gt;
|link_target=     : target for the wikilink&lt;br /&gt;
|link_text=        : text of the wikilink (may be same as link_target), without †, italics, etc.&lt;br /&gt;
}}&lt;br /&gt;
=============================================================================]]&lt;br /&gt;
function p.taxonLink(frame)&lt;br /&gt;
	local taxon = frame.args[&#039;taxon&#039;] or &#039;&#039;&lt;br /&gt;
	local extinct = string.lower(frame.args[&#039;extinct&#039;] or &#039;&#039;)&lt;br /&gt;
	local bold = frame.args[&#039;bold&#039;] or &#039;&#039;&lt;br /&gt;
	local italic = frame.args[&#039;italic&#039;] or &#039;&#039;&lt;br /&gt;
	local abbreviated = frame.args[&#039;abbreviated&#039;] or &#039;&#039;&lt;br /&gt;
	local linkTarget = frame.args[&#039;link_target&#039;] or &#039;&#039;&lt;br /&gt;
	local linkText = frame.args[&#039;link_text&#039;] or frame.args[&#039;plain_link_text&#039;] or &#039;&#039; --temporarily allow alternative args&lt;br /&gt;
	return l.makeLink(taxon, extinct, bold, italic, abbreviated, linkTarget, linkText)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
--[[= = = = = = = = = = = = = = getTaxonLink  = = = = = = = = = = = = = = = =&lt;br /&gt;
Internal function to drive l.makeLink().&lt;br /&gt;
= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =]]&lt;br /&gt;
function l.getTaxonLink(frame, taxon, rank, bold, italic, abbreviated, virus)&lt;br /&gt;
	local ok, extinct = p.getTaxonInfoItem(frame, taxon, &#039;extinct&#039;)&lt;br /&gt;
	if italic == &#039;&#039; then&lt;br /&gt;
		italic = frame:expandTemplate{ title = &#039;Is italic taxon&#039;, args = { rank, virus = virus } }&lt;br /&gt;
	end&lt;br /&gt;
	local ok, linkTarget = p.getTaxonInfoItem(frame, taxon, &#039;link_target&#039;)&lt;br /&gt;
	local ok, linkText = p.getTaxonInfoItem(frame, taxon, &#039;link_text&#039;)&lt;br /&gt;
	return l.makeLink(taxon, extinct, bold, italic, abbreviated, linkTarget, linkText)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
--[[= = = = = = = = = = = = = = makeLink  = = = = = = = = = = = = = = = = = =&lt;br /&gt;
Actually make the link.&lt;br /&gt;
= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =]]&lt;br /&gt;
function l.makeLink(taxon, extinct, bold, italic, abbreviated, linkTarget, linkText)&lt;br /&gt;
	local dummy&lt;br /&gt;
	-- if link text is missing, try to find a replacement&lt;br /&gt;
	if linkText == &#039;&#039; then&lt;br /&gt;
		if string.find(taxon, &#039;Incertae sedis&#039;, 1, true) then&lt;br /&gt;
			linkText = &amp;quot;&#039;&#039;incertae sedis&#039;&#039;&amp;quot;&lt;br /&gt;
			linkTarget = &#039;Incertae sedis&#039;&lt;br /&gt;
		else&lt;br /&gt;
			linkText, dummy = l.stripExtra(taxon)&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
	if linkTarget == &#039;&#039; then linkTarget = linkText end&lt;br /&gt;
	if italic == &#039;yes&#039; then linkText = TaxonItalics.italicizeTaxonName(linkText, false, abbreviated==&#039;yes&#039;) end&lt;br /&gt;
	local link = &#039;&#039;&lt;br /&gt;
	if bold == &#039;yes&#039; then link = &#039;&amp;lt;b&amp;gt;&#039; .. linkText .. &#039;&amp;lt;/b&amp;gt;&#039;&lt;br /&gt;
	else&lt;br /&gt;
		if linkTarget == linkText then link = linkText&lt;br /&gt;
		else link = linkTarget .. &#039;|&#039; .. linkText&lt;br /&gt;
		end&lt;br /&gt;
		link = &#039;[[&#039; .. link .. &#039;]]&#039;&lt;br /&gt;
	end&lt;br /&gt;
	if (extinct == &#039;yes&#039; or extinct == &#039;true&#039;) and not string.find(link, &#039;†&#039;, 1, true) then&lt;br /&gt;
		link = &#039;&amp;lt;span style=&amp;quot;font-style:normal;font-weight:normal;&amp;quot;&amp;gt;†&amp;lt;/span&amp;gt;&#039; .. link&lt;br /&gt;
	end&lt;br /&gt;
	if string.sub(taxon, -2) == &#039;/?&#039; and not string.find(link, &#039;?&#039;, 1, true) then&lt;br /&gt;
		link = link .. &#039;&amp;lt;span style=&amp;quot;font-style:normal;font-weight:normal;&amp;quot;&amp;gt;&amp;amp;nbsp;(?)&amp;lt;/span&amp;gt;&#039;&lt;br /&gt;
	end&lt;br /&gt;
	return link&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
--[[============================== find =====================================&lt;br /&gt;
Returns the taxon above the specified taxon with a given rank.&lt;br /&gt;
Usage: {{#invoke:Autotaxobox|find|TAXON|RANK}}&lt;br /&gt;
=============================================================================]]&lt;br /&gt;
function p.find(frame)&lt;br /&gt;
	local currTaxon = frame.args[1] or &#039;&#039;&lt;br /&gt;
	if currTaxon == &#039;&#039; then return &#039;&amp;lt;span class=&amp;quot;error&amp;quot;&amp;gt;no taxon supplied&amp;lt;/span&amp;gt;&#039; end&lt;br /&gt;
	local rank = frame.args[2] or &#039;&#039;&lt;br /&gt;
	if rank == &#039;&#039; then return &#039;&amp;lt;span class=&amp;quot;error&amp;quot;&amp;gt;no rank supplied&amp;lt;/span&amp;gt;&#039; end&lt;br /&gt;
	local inHierarchy = true -- still in the taxonomic hierarchy or off the top?&lt;br /&gt;
	local searching = true -- still searching&lt;br /&gt;
	while inHierarchy and searching do&lt;br /&gt;
		local ok, parent = p.getTaxonInfoItem(frame, currTaxon, &#039;parent&#039;)&lt;br /&gt;
			if ok and parent ~= &#039;&#039; then&lt;br /&gt;
			currTaxon = parent&lt;br /&gt;
			local ok, currRank = p.getTaxonInfoItem(frame, currTaxon, &#039;rank&#039;)&lt;br /&gt;
			if currRank == rank then&lt;br /&gt;
				searching = false&lt;br /&gt;
			end&lt;br /&gt;
		else&lt;br /&gt;
			inHierarchy = false&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
	if inHierarchy and not searching then return currTaxon&lt;br /&gt;
	else return &#039;&amp;lt;span class=&amp;quot;error&amp;quot;&amp;gt;rank not found&amp;lt;/span&amp;gt;&#039;&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
--[[=============================== nth =====================================&lt;br /&gt;
External utility function primarily intended for use in checking and debugging.&lt;br /&gt;
Returns the nth level above a taxon in a taxonomic hierarchy, where the taxon&lt;br /&gt;
itself is counted as the first level.&lt;br /&gt;
Usage: {{#invoke:Autotaxobox|nth|TAXON|n=N}}&lt;br /&gt;
=============================================================================]]&lt;br /&gt;
function p.nth(frame)&lt;br /&gt;
	local currTaxon = frame.args[1] or &#039;&#039;&lt;br /&gt;
	if currTaxon == &#039;&#039; then return &#039;ERROR: no taxon supplied&#039; end&lt;br /&gt;
	local n = tonumber(frame.args[&#039;n&#039;] or 1)&lt;br /&gt;
	if n &amp;gt; MaxSearchLevels then&lt;br /&gt;
		return &#039;Exceeded maximum number of levels allowed (&#039; .. MaxSearchLevels .. &#039;)&#039;&lt;br /&gt;
	end&lt;br /&gt;
	local i = 1&lt;br /&gt;
	local inHierarchy = true -- still in the taxonomic hierarchy or off the top?&lt;br /&gt;
	while i &amp;lt; n and inHierarchy do&lt;br /&gt;
		local ok, parent = p.getTaxonInfoItem(frame, currTaxon, &#039;parent&#039;)&lt;br /&gt;
			if ok and parent ~= &#039;&#039; then&lt;br /&gt;
			currTaxon = parent&lt;br /&gt;
			i = i + 1&lt;br /&gt;
		else&lt;br /&gt;
			inHierarchy = false&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
	if inHierarchy then return currTaxon&lt;br /&gt;
	else return &#039;Level &#039; .. n .. &#039; is past the top of the taxonomic hierarchy&#039;&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
--[[============================ hasRankVal =================================&lt;br /&gt;
External utility function to determine whether the rank has an arbitrary&lt;br /&gt;
value attached in order to allow rank order consistency checking.&lt;br /&gt;
Usage: {{#invoke:Autotaxobox|hasRankVal|RANK}}&lt;br /&gt;
=============================================================================]]&lt;br /&gt;
function p.hasRankVal(frame)&lt;br /&gt;
	local rank = frame.args[1] or &#039;&#039;&lt;br /&gt;
	if rank == &#039;&#039; then return &#039;&amp;lt;span class=&amp;quot;error&amp;quot;&amp;gt;no rank supplied&amp;lt;/span&amp;gt;&#039; end&lt;br /&gt;
	local rankVal = TaxonRanks.lookupRankVal(rank)&lt;br /&gt;
	if not rankVal then rankVal = &#039;no&#039; else rankVal = &#039;yes&#039; end&lt;br /&gt;
	return rankVal&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
--[[=========================== hasRankVal1 =================================&lt;br /&gt;
External utility function to determine whether the rank has an arbitrary&lt;br /&gt;
value attached in order to allow rank order consistency checking.&lt;br /&gt;
Usage: {{#invoke:Autotaxobox|hasRankVal|RANK}}&lt;br /&gt;
=============================================================================]]&lt;br /&gt;
function p.hasRankVal1(rank)&lt;br /&gt;
	if rank == &#039;&#039; then return &#039;no&#039; end&lt;br /&gt;
	local rankVal = TaxonRanks.lookupRankVal(rank)&lt;br /&gt;
	if not rankVal then rankVal = &#039;no&#039; else rankVal = &#039;yes&#039; end&lt;br /&gt;
	return rankVal&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
--[[============================= nLevels ===================================&lt;br /&gt;
External utility function primarily intended for use in checking and debugging.&lt;br /&gt;
Returns number of levels in a taxonomic hierarchy, starting from&lt;br /&gt;
the supplied taxon as level 1.&lt;br /&gt;
Usage: {{#invoke:Autotaxobox|nLevels|TAXON}}&lt;br /&gt;
=============================================================================]]&lt;br /&gt;
function p.nLevels(frame)&lt;br /&gt;
	local currTaxon = frame.args[1] or &#039;&#039;&lt;br /&gt;
	if currTaxon == &#039;&#039; then return &#039;ERROR: no taxon supplied&#039; end&lt;br /&gt;
	local i = 1&lt;br /&gt;
	local inHierarchy = true -- still in the taxonomic hierarchy or off the top?&lt;br /&gt;
	while inHierarchy and i &amp;lt; MaxSearchLevels  do&lt;br /&gt;
		local ok, parent = p.getTaxonInfoItem(frame, currTaxon, &#039;parent&#039;)&lt;br /&gt;
		if ok and parent ~= &#039;&#039; then&lt;br /&gt;
			currTaxon = parent&lt;br /&gt;
			i = i + 1&lt;br /&gt;
		else&lt;br /&gt;
			inHierarchy = false&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
	if inHierarchy then return MaxSearchLevels .. &#039;+&#039;&lt;br /&gt;
	else return i&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
--[[============================= listAll ===================================&lt;br /&gt;
External utility function primarily intended for use in checking and debugging.&lt;br /&gt;
Returns a comma separated list of a taxonomic hierarchy, starting from&lt;br /&gt;
the supplied taxon.&lt;br /&gt;
Usage: {{#invoke:Autotaxobox|listAll|TAXON}}&lt;br /&gt;
=============================================================================]]&lt;br /&gt;
function p.listAll(frame)&lt;br /&gt;
	local currTaxon = frame.args[1] or &#039;&#039;&lt;br /&gt;
	if currTaxon == &#039;&#039; then return &#039;ERROR: no taxon supplied&#039; end&lt;br /&gt;
	return l.doListAll(l.makeTable(frame, currTaxon))&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function l.doListAll(taxonTable, taxonRankTable)&lt;br /&gt;
	local lst = taxonTable[1] .. &#039;-&#039; .. tostring(taxonRankTable[1])&lt;br /&gt;
	for i = 2, taxonTable.n, 1 do&lt;br /&gt;
		lst = lst .. &#039;, &#039; .. taxonTable[i] .. &#039;-&#039; .. taxonRankTable[i]&lt;br /&gt;
	end&lt;br /&gt;
	return lst&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
--[[=========================== removeQualifier ================================&lt;br /&gt;
External utility function to remove a qualifier (any part after a &amp;quot;/&amp;quot;) from a &lt;br /&gt;
taxon name.&lt;br /&gt;
Usage: {{#invoke:Autotaxobox|removeQualifier|TAXON}}&lt;br /&gt;
=============================================================================]]&lt;br /&gt;
function p.removeQualifier(frame)&lt;br /&gt;
	local baseName, qualifier = l.stripExtra(frame.args[1])&lt;br /&gt;
	return baseName&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
--[[=========================================================================&lt;br /&gt;
Internal functions&lt;br /&gt;
=============================================================================]]&lt;br /&gt;
&lt;br /&gt;
--[[= = = = = = = = = = = = stripExtra  = = = = = = = = = = = = = = = = = = =&lt;br /&gt;
Internal utility function to strip off any extra parts of a taxon name, i.e.&lt;br /&gt;
anything after a &#039;/&#039;. Thus &#039;Felidae/?&#039; would be split into &#039;Felidae&#039; and &#039;?&#039;.&lt;br /&gt;
= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =]]&lt;br /&gt;
function l.stripExtra(taxonName)&lt;br /&gt;
	local i = mw.ustring.find(taxonName, &#039;/&#039;, 1, true)&lt;br /&gt;
	if i then&lt;br /&gt;
		return mw.ustring.sub(taxonName, 1, i-1), mw.ustring.sub(taxonName, i, -1)&lt;br /&gt;
	else&lt;br /&gt;
		return taxonName, &#039;&#039;&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
--[[= = = = = = = = = = = = splitTaxonName  = = = = = = = = = = = = = = = = =&lt;br /&gt;
Internal utility function to split a taxon name into its parts and return&lt;br /&gt;
them. Possible formats include:&lt;br /&gt;
* taxon&lt;br /&gt;
* taxon (disambig)&lt;br /&gt;
* taxon (Subgenus)&lt;br /&gt;
* taxon/qualifier&lt;br /&gt;
* combinations, e.g. taxon (disambig)/qualifier&lt;br /&gt;
= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =]]&lt;br /&gt;
function l.splitTaxonName(taxon)&lt;br /&gt;
	-- get any qualifier present&lt;br /&gt;
	local qualifier = &#039;&#039;&lt;br /&gt;
	local i = mw.ustring.find(taxon, &#039;/&#039;, 1, true)&lt;br /&gt;
	if i then&lt;br /&gt;
		qualifier = mw.ustring.sub(taxon, i+1, -1)&lt;br /&gt;
		taxon = mw.ustring.sub(taxon, 1, i-1)&lt;br /&gt;
	end&lt;br /&gt;
	-- get any disambiguator or subgenus&lt;br /&gt;
	local disambig = &#039;&#039;&lt;br /&gt;
	local subgenus = &#039;&#039;&lt;br /&gt;
	i = mw.ustring.find(taxon, &#039; (&#039;, 1, true)&lt;br /&gt;
	if i then&lt;br /&gt;
		local parenTerm = mw.ustring.sub(taxon, i+2, -2)&lt;br /&gt;
		taxon = mw.ustring.sub(taxon, 1, i-1)&lt;br /&gt;
		local char1 = mw.ustring.sub(parenTerm, 1, 1)&lt;br /&gt;
		if char1 == mw.ustring.lower(char1) then&lt;br /&gt;
			disambig = parenTerm&lt;br /&gt;
		else&lt;br /&gt;
			subgenus = parenTerm&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
	return taxon, disambig, subgenus, qualifier&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
--[[= = = = = = = = = = = = matchTaxonLink  = = = = = = = = = = = = = = = = =&lt;br /&gt;
Function to determine whether the taxon name derived from the name of the &lt;br /&gt;
taxonomy template (passed in the parameter taxon) matches the link text&lt;br /&gt;
(passed in the parameter linkText).&lt;br /&gt;
The taxon name may have any of the formats:&lt;br /&gt;
* baseTaxon/qualifier&lt;br /&gt;
* baseTaxon (disambig)&lt;br /&gt;
* baseTaxon (Subgenus) [distinguished by the capital letter]&lt;br /&gt;
* a qualifier may be present after the previous two formats.&lt;br /&gt;
&lt;br /&gt;
Examples of matches (baseTaxon ~ linkText):&lt;br /&gt;
* Pinus ~ Pinus&lt;br /&gt;
* Pinus sect. Trifoliae ~ Pinus sect. Trifoliae&lt;br /&gt;
* Pinus sect. Trifoliae ~ &#039;&#039;Pinus&#039;&#039; sect. &#039;&#039;Trifoliae&#039;&#039; [italic markers ignored]&lt;br /&gt;
* Pinus sect. Trifoliae ~ P. sect. Trifoliae [abbreviated genus name matches]&lt;br /&gt;
* Bombus (Pyrobombus) ~ Bombus (Pyrobombus)&lt;br /&gt;
* Bombus (Pyrobombus) ~ B. (Pyrobombus)&lt;br /&gt;
* Bombus (Pyrobombus) ~ Pyrobombus [link text may just be the subgenus]&lt;br /&gt;
* Heteractinida ~ &amp;quot;Heteractinida&amp;quot; [double-quotes are ignored in link text]&lt;br /&gt;
* &amp;quot;Heteractinida&amp;quot; ~ Heteractinida [double-quotes are ignored in base taxon name]&lt;br /&gt;
* Incertae sedis ~ anything [link text is ignored for matching in this case]&lt;br /&gt;
* Cetotheriidae with qualifier=? ~ Cetotheriidae (?)&lt;br /&gt;
= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =]]&lt;br /&gt;
function l.matchTaxonLink(taxon, linkText, rankBelowGenus)&lt;br /&gt;
	local dummy&lt;br /&gt;
	linkText, dummy = mw.ustring.gsub(linkText, &amp;quot;&#039;&#039;&amp;quot;, &#039;&#039;) -- remove any italic wikitext in the link text&lt;br /&gt;
	linkText, dummy = mw.ustring.gsub(linkText, &#039;&amp;lt;.-&amp;gt;&#039;, &#039;&#039;) -- strip all tags used to format the link text&lt;br /&gt;
	linkText, dummy = mw.ustring.gsub(linkText, &#039;&amp;quot;&#039;, &#039;&#039;) -- remove any occurrences of &amp;quot; in the link text&lt;br /&gt;
	local baseTaxon, disambig, subgenus, qualifier = l.splitTaxonName(taxon) -- split up the taxon name&lt;br /&gt;
	baseTaxon, dummy = mw.ustring.gsub(linkText, &#039;&amp;quot;&#039;, &#039;&#039;) -- remove any occurrences of &amp;quot; in the base taxon name&lt;br /&gt;
	local match = linkText == baseTaxon or&lt;br /&gt;
	              linkText == subgenus or&lt;br /&gt;
	              linkText == baseTaxon .. &#039; (&#039; .. subgenus .. &#039;)&#039; or&lt;br /&gt;
	              linkText ==  mw.ustring.sub(baseTaxon, 1, 1) .. &#039;. (&#039; .. subgenus .. &#039;)&#039; or&lt;br /&gt;
	              baseTaxon == &#039;Incertae sedis&#039; or&lt;br /&gt;
	              rankBelowGenus and linkText == mw.ustring.gsub(baseTaxon, &#039;([A-Z]).- (.*)&#039;, &#039;%1. %2&#039;) or &lt;br /&gt;
	              mw.ustring.find(qualifier, &#039;?&#039;, 1, true) and mw.ustring.find(linkText, baseTaxon, 1, true) == 1&lt;br /&gt;
	return match&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
--[[= = = = = = = = = = = = = makeTable = = = = = = = = = = = = = = = = = = =&lt;br /&gt;
Internal utility function to return two tables (arrays) constructed from a&lt;br /&gt;
taxonomic hierarchy stored in &amp;quot;Template:Taxonomy/...&amp;quot; templates.&lt;br /&gt;
taxonTable.n holds the total number of taxa; taxonTable[1]..taxonTable[taxonTable.n]&lt;br /&gt;
the taxon names.&lt;br /&gt;
The last taxon in the table will either (a) have a taxonomy template but with&lt;br /&gt;
no parent given (e.g. &#039;Life&#039;) or (b) not have a taxonomy template.&lt;br /&gt;
taxonRankTable hold the corresponding ranks of the taxa.&lt;br /&gt;
= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =]]&lt;br /&gt;
function l.makeTable(frame, currTaxon)&lt;br /&gt;
	local taxonTable = {}&lt;br /&gt;
	local taxonRankTable = {}&lt;br /&gt;
	local ok, rank, parent&lt;br /&gt;
	local i = 1&lt;br /&gt;
	local topReached = false -- reached the top of the taxonomic hierarchy?&lt;br /&gt;
	repeat&lt;br /&gt;
		taxonTable[i] = currTaxon&lt;br /&gt;
		ok, rank = p.getTaxonInfoItem(frame, currTaxon, &#039;rank&#039;)&lt;br /&gt;
		if ok then taxonRankTable[i] = string.lower(rank) else taxonRankTable[i] = &#039;&#039; end&lt;br /&gt;
		ok, parent = p.getTaxonInfoItem(frame, currTaxon, &#039;parent&#039;)&lt;br /&gt;
		if ok and parent ~= &#039;&#039; then&lt;br /&gt;
			currTaxon = parent&lt;br /&gt;
			i = i + 1&lt;br /&gt;
		else&lt;br /&gt;
			topReached = true -- reached the top of the hierarchy or tried to use a non-existent taxonomy template&lt;br /&gt;
		end&lt;br /&gt;
	until topReached or i &amp;gt; MaxSearchLevels&lt;br /&gt;
	taxonTable.n = math.min(i, MaxSearchLevels)&lt;br /&gt;
	return taxonTable, taxonRankTable&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
--[[= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =&lt;br /&gt;
= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =]]&lt;br /&gt;
function l.tableCell(arg1, arg2)&lt;br /&gt;
	local text, style&lt;br /&gt;
	if arg2 then&lt;br /&gt;
		style = arg1&lt;br /&gt;
		text = arg2&lt;br /&gt;
	else&lt;br /&gt;
		style = &#039;&#039;&lt;br /&gt;
		text = arg1&lt;br /&gt;
	end&lt;br /&gt;
	local res = &#039;|&#039;&lt;br /&gt;
	if style ~= &#039;&#039; then&lt;br /&gt;
		res = res .. style .. &#039;|&#039;&lt;br /&gt;
	end&lt;br /&gt;
	return res .. text .. &#039;\n&#039;&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
return p&lt;/div&gt;</summary>
		<author><name>Indicwiki</name></author>
	</entry>
	<entry>
		<id>https://sandbox.indicwiki.org/index.php?title=Module:Automated_taxobox&amp;diff=66503</id>
		<title>Module:Automated taxobox</title>
		<link rel="alternate" type="text/html" href="https://sandbox.indicwiki.org/index.php?title=Module:Automated_taxobox&amp;diff=66503"/>
		<updated>2026-05-11T08:16:17Z</updated>

		<summary type="html">&lt;p&gt;Indicwiki: 1 revision imported&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;require(&#039;strict&#039;)&lt;br /&gt;
local TaxonItalics = require(&#039;Module:TaxonItalics&#039;)&lt;br /&gt;
local Autotaxobox = require(&#039;Module:Autotaxobox&#039;)&lt;br /&gt;
local ItalicTitle = require(&#039;Module:Italic title&#039;)&lt;br /&gt;
local p = {} -- functions made public&lt;br /&gt;
local l = {} -- nonpublic internal functions and variables global to the module&lt;br /&gt;
l.system = &#039;&#039; -- &#039;&#039; for normal scientific classification (default)&lt;br /&gt;
              -- &#039;ichnos&#039; for trace fossil classification&lt;br /&gt;
              -- &#039;veterovata&#039; for egg fossil classification&lt;br /&gt;
&lt;br /&gt;
-- =============================================================================&lt;br /&gt;
-- ichnobox implements Template:Ichnobox; see the documentation of that&lt;br /&gt;
-- template for details.&lt;br /&gt;
-- The only difference from Template:Automatic taxobox is in the taxobox colour&lt;br /&gt;
-- and classification link and the parameters for type species and genera.&lt;br /&gt;
-- =============================================================================&lt;br /&gt;
&lt;br /&gt;
function p.ichnobox(frame)&lt;br /&gt;
	l.system = &#039;ichnos&#039;&lt;br /&gt;
	return p.automaticTaxobox(frame)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
-- =============================================================================&lt;br /&gt;
-- oobox implements Template:Oobox; see the documentation of that&lt;br /&gt;
-- template for details.&lt;br /&gt;
-- The only difference from Template:Automatic taxobox is in the taxobox colour&lt;br /&gt;
-- and classification link and the parameters for type species and genera.&lt;br /&gt;
-- =============================================================================&lt;br /&gt;
&lt;br /&gt;
function p.oobox(frame)&lt;br /&gt;
	l.system = &#039;veterovata&#039;&lt;br /&gt;
	return p.automaticTaxobox(frame)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
-- =============================================================================&lt;br /&gt;
-- automaticTaxobox implements Template:Automatic taxobox; see the documentation&lt;br /&gt;
-- of that template for details.&lt;br /&gt;
-- It also implements Template:Ichnobox and Template:Oobox. The small&lt;br /&gt;
-- differences are signalled by the module-wide variable l.system.&lt;br /&gt;
-- The following parameters present in the old template code version of&lt;br /&gt;
-- Template:Automatic taxobox were not used and have not been implemented:&lt;br /&gt;
--   image_caption_align&lt;br /&gt;
--   image2_caption_align&lt;br /&gt;
--   binomial2&lt;br /&gt;
--   binomial2_authority&lt;br /&gt;
--   binomial3&lt;br /&gt;
--   binomial3_authority&lt;br /&gt;
--   binomial4&lt;br /&gt;
--   binomial4_authority&lt;br /&gt;
-- =============================================================================&lt;br /&gt;
&lt;br /&gt;
function p.automaticTaxobox(frame)&lt;br /&gt;
	local args&lt;br /&gt;
	if frame.args[&#039;direct&#039;] == &#039;yes&#039; then args = frame.args&lt;br /&gt;
	else args = frame:getParent().args end&lt;br /&gt;
	local res = &#039;&#039;&lt;br /&gt;
	-- ---------------------------------------------------------------------&lt;br /&gt;
	-- pick up taxobox parameters from the caller that need to be processed;&lt;br /&gt;
	-- most will be passed on unchanged&lt;br /&gt;
	-- ---------------------------------------------------------------------&lt;br /&gt;
	local pagename = args[&#039;pagename&#039;] or &#039;&#039; -- for testing and debugging only&lt;br /&gt;
	local italicTitle = args[&#039;italic_title&#039;] or args[&#039;italic title&#039;] or &#039;&#039;&lt;br /&gt;
	local ichnos = &#039;&#039;&lt;br /&gt;
	if l.system == &#039;ichnos&#039; then ichnos = &#039;true&#039; end&lt;br /&gt;
	local veterovata = &#039;&#039;&lt;br /&gt;
	if l.system == &#039;veterovata&#039; then veterovata = &#039;true&#039; end&lt;br /&gt;
	local fossilRange = args[&#039;fossil_range&#039;] or args[&#039;fossil range&#039;] or args[&#039;temporal_range&#039;] or args[&#039;temporal range&#039;] or &#039;&#039;&lt;br /&gt;
    local oldestFossil = args[&#039;oldest_fossil&#039;] or args[&#039;oldest fossil&#039;] or &#039;&#039;&lt;br /&gt;
    local youngestFossil =  args[&#039;youngest_fossil&#039;] or args[&#039;youngest fossil&#039;] or &#039;&#039;&lt;br /&gt;
	local name = args[&#039;name&#039;] or &#039;&#039;&lt;br /&gt;
	local colourAs = args[&#039;color_as&#039;] or args[&#039;color as&#039;] or args[&#039;colour_as&#039;]  or args[&#039;colour as&#039;] or &#039;&#039;&lt;br /&gt;
	local taxon = args[&#039;taxon&#039;] or &#039;&#039;&lt;br /&gt;
	local authority = args[&#039;authority&#039;] or &#039;&#039;&lt;br /&gt;
    local parentAuthority = args[&#039;parent_authority&#039;] or args[&#039;parent authority&#039;] or &#039;&#039;&lt;br /&gt;
	local manualFlag = &#039;text&#039; -- marks manually specified ranks&lt;br /&gt;
	local binomial = args[&#039;binomial&#039;] or args[&#039;binomial_&#039;..manualFlag] or args[&#039;binomial &#039;..manualFlag] or &#039;&#039;&lt;br /&gt;
	local binomialAuthority = args[&#039;binomial_authority&#039;] or args[&#039;binomial authority&#039;] or &#039;&#039;&lt;br /&gt;
	local genusManual = args[&#039;genus_&#039;..manualFlag] or args[&#039;genus &#039;..manualFlag] or&#039;&#039;&lt;br /&gt;
	local speciesManual = args[&#039;species_&#039;..manualFlag] or args[&#039;species &#039;..manualFlag] or&#039;&#039;&lt;br /&gt;
	-- ------------------------------------------------------&lt;br /&gt;
	-- set the taxobox parameters determined by this function&lt;br /&gt;
	-- ------------------------------------------------------&lt;br /&gt;
    fossilRange = l.setfossilRange(frame, fossilRange, oldestFossil, youngestFossil)&lt;br /&gt;
	-- use the base page name as the taxon if the taxon parameter is missing&lt;br /&gt;
	local currentPagename = mw.title.getCurrentTitle()&lt;br /&gt;
	if pagename == &#039;&#039; then pagename = currentPagename.text end -- pagename para only used in testing and &lt;br /&gt;
	local basePagename = pagename&lt;br /&gt;
	if italicTitle ~= &#039;taxon&#039; then basePagename = mw.ustring.gsub(basePagename, &#039;%s+%b()$&#039;, &#039;&#039;, 1) end&lt;br /&gt;
	local taxonParaMissingError = false&lt;br /&gt;
	if taxon == &#039;&#039; then&lt;br /&gt;
		taxonParaMissingError = true&lt;br /&gt;
		taxon = basePagename&lt;br /&gt;
	end&lt;br /&gt;
	-- decide if the page name and taxobox name need to be italicized;&lt;br /&gt;
	-- if italic_title is not set, then if the names are the taxon, use its rank to decide&lt;br /&gt;
	local ok, taxonRank = Autotaxobox.getTaxonInfoItem(frame, taxon, &#039;rank&#039;) -- taxonRank needed later if not here&lt;br /&gt;
	if italicTitle == &#039;&#039; then&lt;br /&gt;
		if not (ok and taxonRank ~= &#039;&#039; and&lt;br /&gt;
			    frame:expandTemplate{ title = &#039;Is italic taxon&#039;, args = {taxonRank} } == &#039;yes&#039;) then&lt;br /&gt;
			italicTitle = &#039;no&#039;&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
	--   remove any &amp;quot; (DISAMBIG)&amp;quot; or &amp;quot;/MODIFIER&amp;quot; from the taxon&#039;s name;&lt;br /&gt;
	--   if the base page name is the same as the base taxon name, then italicization can be applied&lt;br /&gt;
	local baseTaxon = taxon&lt;br /&gt;
	if italicTitle ~= &#039;taxon&#039; then baseTaxon = mw.ustring.gsub(baseTaxon, &#039;%s+%b()$&#039;, &#039;&#039;, 1) end&lt;br /&gt;
	baseTaxon = mw.ustring.gsub(baseTaxon, &#039;/.*$&#039;, &#039;&#039;, 1)&lt;br /&gt;
	if italicTitle == &#039;&#039; and basePagename == baseTaxon then&lt;br /&gt;
		italicTitle = &#039;yes&#039;&lt;br /&gt;
	end&lt;br /&gt;
	-- italicize the page name (page title) if required&lt;br /&gt;
	if currentPagename.namespace == 0 and (italicTitle == &#039;yes&#039; or italicTitle == &#039;taxon&#039;) then&lt;br /&gt;
		if italicTitle == &#039;taxon&#039; or TaxonItalics.hasConnectingTerm(baseTaxon) then&lt;br /&gt;
			res =  res .. frame:expandTemplate{ title = &#039;Italic taxon title&#039;, args = {} }&lt;br /&gt;
			italicTitle = &#039;yes&#039;&lt;br /&gt;
		else ItalicTitle._main({})&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
	-- set the taxobox name if not supplied, italicizing it if appropriate.&lt;br /&gt;
	if name == &#039;&#039; then&lt;br /&gt;
		name = basePagename&lt;br /&gt;
		if italicTitle == &#039;yes&#039; then&lt;br /&gt;
			name = TaxonItalics.italicizeTaxonName(name, false, false)&lt;br /&gt;
		end&lt;br /&gt;
		-- name = name ..  &#039;/&#039; .. baseTaxon .. &#039;/&#039; .. nameRank&lt;br /&gt;
	end&lt;br /&gt;
	-- determine taxobox colour&lt;br /&gt;
	local colour = &#039;&#039;&lt;br /&gt;
	if colourAs ~= &#039;&#039; then&lt;br /&gt;
		colour = frame:expandTemplate{ title = &#039;Taxobox colour&#039;, args = {colourAs} }&lt;br /&gt;
	elseif l.system == &#039;ichnos&#039; then&lt;br /&gt;
		colour = frame:expandTemplate{ title = &#039;Taxobox colour&#039;, args = {&#039;Ichnos&#039;} }&lt;br /&gt;
	elseif l.system == &#039;veterovata&#039; then&lt;br /&gt;
		colour = frame:expandTemplate{ title = &#039;Taxobox colour&#039;, args = {&#039;Veterovata&#039;} }&lt;br /&gt;
	else&lt;br /&gt;
		colour = Autotaxobox.getTaxoboxColour(frame, taxon)&lt;br /&gt;
	end&lt;br /&gt;
	-- set binomial parameters if the target taxon is (unusually) a species&lt;br /&gt;
	local genusAuthority = &#039;&#039;&lt;br /&gt;
	if binomial == &#039;&#039; then&lt;br /&gt;
		if ok and taxonRank == &#039;species&#039; then&lt;br /&gt;
			binomial = TaxonItalics.italicizeTaxonName(taxon, false, false)&lt;br /&gt;
			binomialAuthority = authority&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
	-- handle any manually set ranks&lt;br /&gt;
	local boldFirst = &#039;&#039;&lt;br /&gt;
	local offset = 0&lt;br /&gt;
	if speciesManual ~= &#039;&#039; then&lt;br /&gt;
		offset = offset + 1&lt;br /&gt;
		binomialAuthority = authority&lt;br /&gt;
		if binomial == &#039;&#039; then binomial = &#039;&amp;lt;span class=&amp;quot;error&amp;quot;&amp;gt;Error: binomial parameter value is missing&amp;lt;/span&amp;gt;&#039; end&lt;br /&gt;
	end&lt;br /&gt;
	if genusManual ~= &#039;&#039; then&lt;br /&gt;
		boldFirst = &#039;link&#039;&lt;br /&gt;
		offset = offset + 1&lt;br /&gt;
		if offset == 1 then&lt;br /&gt;
			genusAuthority = authority&lt;br /&gt;
		else&lt;br /&gt;
			genusAuthority = parentAuthority&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
	-- process type genus and type species if present; italicize if they seem not to have an authority attached&lt;br /&gt;
	local typeGenus = &#039;&#039;&lt;br /&gt;
	local typeGenusRef = &#039;&#039;&lt;br /&gt;
	local typeGenusAuthority = &#039;&#039;&lt;br /&gt;
	local typeSpecies = &#039;&#039;&lt;br /&gt;
	local typeSpeciesRef = &#039;&#039;&lt;br /&gt;
	local typeSpeciesAuthority = &#039;&#039;&lt;br /&gt;
	local typeIchnogenus = &#039;&#039;&lt;br /&gt;
	local typeIchnogenusRef = &#039;&#039;&lt;br /&gt;
	local typeIchnogenusAuthority = &#039;&#039;&lt;br /&gt;
	local typeIchnospecies = &#039;&#039;&lt;br /&gt;
	local typeIchnospeciesRef = &#039;&#039;&lt;br /&gt;
	local typeIchnospeciesAuthority = &#039;&#039;&lt;br /&gt;
	local typeOogenus = &#039;&#039;&lt;br /&gt;
	local typeOogenusRef = &#039;&#039;&lt;br /&gt;
	local typeOogenusAuthority = &#039;&#039;&lt;br /&gt;
	local typeOospecies = &#039;&#039;&lt;br /&gt;
	local typeOospeciesRef = &#039;&#039;&lt;br /&gt;
	local typeOospeciesAuthority = &#039;&#039;&lt;br /&gt;
	if l.system == &#039;&#039; then&lt;br /&gt;
		typeGenus = l.italicizeTypeName(args[&#039;type_genus&#039;] or args[&#039;type genus&#039;] or &#039;&#039;)&lt;br /&gt;
		typeGenusRef = args[&#039;type_genus_ref&#039;] or args[&#039;type genus ref&#039;] or &#039;&#039;&lt;br /&gt;
		typeGenusAuthority = args[&#039;type_genus_authority&#039;] or args[&#039;type genus authority&#039;] or &#039;&#039;&lt;br /&gt;
		typeSpecies = l.italicizeTypeName(args[&#039;type_species&#039;] or args[&#039;type species&#039;] or &#039;&#039;)&lt;br /&gt;
		typeSpeciesRef = args[&#039;type_species_ref&#039;] or args[&#039;type species ref&#039;] or &#039;&#039;&lt;br /&gt;
		typeSpeciesAuthority = args[&#039;type_species_authority&#039;] or args[&#039;type species authority&#039;] or &#039;&#039;&lt;br /&gt;
	elseif l.system == &#039;ichnos&#039; then&lt;br /&gt;
		typeIchnogenus = l.italicizeTypeName(args[&#039;type_ichnogenus&#039;] or args[&#039;type ichnogenus&#039;] or &#039;&#039;)&lt;br /&gt;
		typeIchnogenusRef = args[&#039;type_ichnogenus_ref&#039;] or args[&#039;type ichnogenus ref&#039;] or &#039;&#039;&lt;br /&gt;
		typeIchnogenusAuthority = args[&#039;type_ichnogenus_authority&#039;] or args[&#039;type ichnogenus authority&#039;] or &#039;&#039;&lt;br /&gt;
		typeIchnospecies = l.italicizeTypeName(args[&#039;type_ichnospecies&#039;] or args[&#039;type ichnospecies&#039;] or &#039;&#039;)&lt;br /&gt;
		typeIchnospeciesRef = args[&#039;type_ichnospecies_ref&#039;] or args[&#039;type ichnospecies ref&#039;] or &#039;&#039;&lt;br /&gt;
		typeIchnospeciesAuthority = args[&#039;type_ichnospecies_authority&#039;] or args[&#039;type ichnospecies authority&#039;] or &#039;&#039;&lt;br /&gt;
	elseif l.system == &#039;veterovata&#039; then&lt;br /&gt;
		typeOogenus = l.italicizeTypeName(args[&#039;type_oogenus&#039;] or args[&#039;type oogenus&#039;] or &#039;&#039;)&lt;br /&gt;
		typeOogenusRef = args[&#039;type_oogenus_ref&#039;] or args[&#039;type oogenus ref&#039;] or &#039;&#039;&lt;br /&gt;
		typeOogenusAuthority = args[&#039;type_oogenus_authority&#039;] or args[&#039;type oogenus authority&#039;] or &#039;&#039;&lt;br /&gt;
		typeOospecies = l.italicizeTypeName(args[&#039;type_oospecies&#039;] or args[&#039;type oospecies&#039;] or &#039;&#039;)&lt;br /&gt;
		typeOospeciesRef = args[&#039;type_oospecies_ref&#039;] or args[&#039;type oospecies ref&#039;] or &#039;&#039;&lt;br /&gt;
		typeOospeciesAuthority = args[&#039;type_oospecies_authority&#039;] or args[&#039;type oospecies authority&#039;] or &#039;&#039;&lt;br /&gt;
	end&lt;br /&gt;
	-- fill in a missing subdivision_ranks parameter&lt;br /&gt;
	local subdivision = args[&#039;subdivision&#039;] or &#039;&#039;&lt;br /&gt;
	local subdivisionRef = args[&#039;subdivision_ref&#039;] or args[&#039;subdivision ref&#039;] or &#039;&#039;&lt;br /&gt;
	local subdivisionRanks = args[&#039;subdivision_ranks&#039;] or args[&#039;subdivision ranks&#039;] or &#039;&#039;&lt;br /&gt;
	if subdivision ~= &#039;&#039; and subdivisionRanks == &#039;&#039; and ok and taxonRank ~= &#039;&#039; then&lt;br /&gt;
		subdivisionRanks =  frame:expandTemplate{ title = &#039;Children rank&#039;, args = {taxonRank} }&lt;br /&gt;
	end&lt;br /&gt;
	-- ------------------------------------------------&lt;br /&gt;
	-- now call Taxobox/core with all of its parameters&lt;br /&gt;
	-- ------------------------------------------------&lt;br /&gt;
	res = res .. frame:expandTemplate{ title = &#039;Taxobox/core&#039;, args =&lt;br /&gt;
		{ ichnos = ichnos,&lt;br /&gt;
		  veterovata = veterovata,&lt;br /&gt;
		  [&#039;edit link&#039;] = &#039;e&#039;,&lt;br /&gt;
		  temporal_range = fossilRange,&lt;br /&gt;
		  display_taxa = args[&#039;display_parents&#039;] or args[&#039;display parents&#039;] or &#039;1&#039;,&lt;br /&gt;
		  parent = taxon,&lt;br /&gt;
		  authority = authority,&lt;br /&gt;
          parent_authority = parentAuthority,&lt;br /&gt;
		  grandparent_authority = args[&#039;grandparent_authority&#039;] or args[&#039;grandparent authority&#039;] or &#039;&#039;,&lt;br /&gt;
		  greatgrandparent_authority = args[&#039;greatgrandparent_authority&#039;] or args[&#039;greatgrandparent authority&#039;] or &#039;&#039;,&lt;br /&gt;
		  greatgreatgrandparent_authority = args[&#039;greatgreatgrandparent_authority&#039;] or args[&#039;greatgreatgrandparent authority&#039;] or &#039;&#039;,&lt;br /&gt;
		  name = name,&lt;br /&gt;
		  colour = colour,&lt;br /&gt;
		  status = args[&#039;status&#039;] or &#039;&#039;,&lt;br /&gt;
		  status_system = args[&#039;status_system&#039;] or args[&#039;status system&#039;] or &#039;&#039;,&lt;br /&gt;
		  status_ref = args[&#039;status_ref&#039;] or args[&#039;status ref&#039;] or &#039;&#039;,&lt;br /&gt;
		  status2 = args[&#039;status2&#039;] or &#039;&#039;,&lt;br /&gt;
		  status2_system = args[&#039;status2_system&#039;] or args[&#039;status2 system&#039;] or &#039;&#039;,&lt;br /&gt;
		  status2_ref = args[&#039;status2_ref&#039;] or args[&#039;status2 ref&#039;] or &#039;&#039;,&lt;br /&gt;
		  trend = args[&#039;trend&#039;] or &#039;&#039;,&lt;br /&gt;
		  extinct = args[&#039;extinct&#039;] or &#039;&#039;,&lt;br /&gt;
		  image = args[&#039;image&#039;] or &#039;&#039;,&lt;br /&gt;
		  upright = args[&#039;image_upright&#039;] or args[&#039;image upright&#039;] or &#039;&#039;,&lt;br /&gt;
		  image_alt = args[&#039;image_alt&#039;] or args[&#039;image alt&#039;] or &#039;&#039;,&lt;br /&gt;
		  image_caption = args[&#039;image_caption&#039;] or args[&#039;image caption&#039;] or &#039;&#039;,&lt;br /&gt;
		  image2 = args[&#039;image2&#039;] or &#039;&#039;,&lt;br /&gt;
		  upright2 = args[&#039;image2_upright&#039;] or args[&#039;image2 upright&#039;] or &#039;&#039;,&lt;br /&gt;
		  image2_alt = args[&#039;image2_alt&#039;] or args[&#039;image2 alt&#039;] or &#039;&#039;,&lt;br /&gt;
		  image2_caption = args[&#039;image2_caption&#039;] or args[&#039;image2 caption&#039;] or &#039;&#039;,&lt;br /&gt;
		  classification_status = args[&#039;classification_status&#039;] or args[&#039;classification status&#039;] or &#039;&#039;,&lt;br /&gt;
		  diversity = args[&#039;diversity&#039;] or &#039;&#039;,&lt;br /&gt;
		  diversity_ref = args[&#039;diversity_ref&#039;] or args[&#039;diversity ref&#039;] or &#039;&#039;,&lt;br /&gt;
		  diversity_link = args[&#039;diversity_link&#039;] or args[&#039;diversity link&#039;] or &#039;&#039;,&lt;br /&gt;
		  bold_first = boldFirst,&lt;br /&gt;
		  offset = offset,&lt;br /&gt;
		  genus = genusManual,&lt;br /&gt;
		  genus_authority = genusAuthority,&lt;br /&gt;
		  species = speciesManual,&lt;br /&gt;
		  binomial = binomial,&lt;br /&gt;
		  binomial_authority = binomialAuthority,&lt;br /&gt;
		  trinomial = args[&#039;trinomial&#039;] or &#039;&#039;,&lt;br /&gt;
		  trinomial_authority = args[&#039;trinomial_authority&#039;] or args[&#039;trinomial authority&#039;] or &#039;&#039;,&lt;br /&gt;
		  type_genus = typeGenus,&lt;br /&gt;
		  type_genus_ref = typeGenusRef,&lt;br /&gt;
		  type_genus_authority = typeGenusAuthority,&lt;br /&gt;
		  type_species = typeSpecies,&lt;br /&gt;
		  type_species_ref = typeSpeciesRef,&lt;br /&gt;
		  type_species_authority = typeSpeciesAuthority,&lt;br /&gt;
		  type_ichnogenus = typeIchnogenus,&lt;br /&gt;
		  type_ichnogenus_ref = typeIchnogenusRef,&lt;br /&gt;
		  type_ichnogenus_authority = typeIchnogenusAuthority,&lt;br /&gt;
		  type_ichnospecies = typeIchnospecies,&lt;br /&gt;
		  type_ichnospecies_ref = typeIchnospeciesRef,&lt;br /&gt;
		  type_ichnospecies_authority = typeIchnospeciesAuthority,&lt;br /&gt;
		  type_oogenus = typeOogenus,&lt;br /&gt;
		  type_oogenus_ref = typeOogenusRef,&lt;br /&gt;
		  type_oogenus_authority = typeOogenusAuthority,&lt;br /&gt;
		  type_oospecies = typeOospecies,&lt;br /&gt;
		  type_oospecies_ref = typeOospeciesRef,&lt;br /&gt;
		  type_oospecies_authority = typeOospeciesAuthority,&lt;br /&gt;
		  subdivision = subdivision,&lt;br /&gt;
		  subdivision_ref = subdivisionRef,&lt;br /&gt;
		  subdivision_ranks = subdivisionRanks,		  &lt;br /&gt;
		  type_strain = args[&#039;type_strain&#039;] or args[&#039;type strain&#039;] or &#039;&#039;,&lt;br /&gt;
		  type_strain_ref = args[&#039;type_strain_ref&#039;] or args[&#039;type strain ref&#039;] or &#039;&#039;,&lt;br /&gt;
		  range_map = args[&#039;range_map&#039;] or args[&#039;range map&#039;] or &#039;&#039;,&lt;br /&gt;
		  range_map_upright = args[&#039;range_map_upright&#039;] or args[&#039;range map upright&#039;] or &#039;&#039;,&lt;br /&gt;
		  range_map_alt = args[&#039;range_map_alt&#039;] or args[&#039;range map alt&#039;] or &#039;&#039;,&lt;br /&gt;
		  range_map_caption = args[&#039;range_map_caption&#039;] or args[&#039;range map caption&#039;] or &#039;&#039;,&lt;br /&gt;
		  range_map2 = args[&#039;range_map2&#039;] or args[&#039;range map2&#039;] or &#039;&#039;,&lt;br /&gt;
		  range_map2_upright = args[&#039;range_map2_upright&#039;] or args[&#039;range map2 upright&#039;] or &#039;&#039;,&lt;br /&gt;
		  range_map2_alt = args[&#039;range_map2_alt&#039;] or args[&#039;range map2 alt&#039;] or &#039;&#039;,&lt;br /&gt;
		  range_map2_caption = args[&#039;range_map2_caption&#039;] or args[&#039;range map2 caption&#039;] or &#039;&#039;,&lt;br /&gt;
		  range_map3 = args[&#039;range_map3&#039;] or args[&#039;range map3&#039;] or &#039;&#039;,&lt;br /&gt;
		  range_map3_upright = args[&#039;range_map3_upright&#039;] or args[&#039;range map3 upright&#039;] or &#039;&#039;,&lt;br /&gt;
		  range_map3_alt = args[&#039;range_map3_alt&#039;] or args[&#039;range map3 alt&#039;] or &#039;&#039;,&lt;br /&gt;
		  range_map3_caption = args[&#039;range_map3_caption&#039;] or args[&#039;range map3 caption&#039;] or &#039;&#039;,&lt;br /&gt;
		  range_map4 = args[&#039;range_map4&#039;] or args[&#039;range map4&#039;] or &#039;&#039;,&lt;br /&gt;
		  range_map4_upright = args[&#039;range_map4_upright&#039;] or args[&#039;range map4 upright&#039;] or &#039;&#039;,&lt;br /&gt;
		  range_map4_alt = args[&#039;range_map4_alt&#039;] or args[&#039;range map4 alt&#039;] or &#039;&#039;,&lt;br /&gt;
		  range_map4_caption = args[&#039;range_map4_caption&#039;] or args[&#039;range map4 caption&#039;] or &#039;&#039;,&lt;br /&gt;
		  synonyms_ref = args[&#039;synonyms_ref&#039;] or args[&#039;synonyms ref&#039;] or &#039;&#039;,&lt;br /&gt;
		  synonyms = args[&#039;synonyms&#039;] or &#039;&#039;&lt;br /&gt;
		} }&lt;br /&gt;
	-- put page in error-tracking categories if required&lt;br /&gt;
	local errCat1 = &#039;&#039;&lt;br /&gt;
	if genusManual ~= &#039;&#039; or speciesManual ~= &#039;&#039; or binomial ~= &#039;&#039; then errCat1 = &#039;[[Category:Automatic taxoboxes using manual parameters]]&#039; end&lt;br /&gt;
	local errCat2 = &#039;&#039;&lt;br /&gt;
	if taxonParaMissingError then errCat2 = &#039;[[Category:Automatic taxoboxes relying on page title]]&#039; end&lt;br /&gt;
	res = res .. frame:expandTemplate{ title = &#039;Main other&#039;, args = {errCat1..errCat2} }&lt;br /&gt;
	return res&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
-- =============================================================================&lt;br /&gt;
-- l.setfossilRange(frame, fossilRange, oldestFossil, youngestFossil) checks&lt;br /&gt;
-- the parameters that determine the fossil range, returning an appropriate&lt;br /&gt;
-- range.&lt;br /&gt;
-- =============================================================================&lt;br /&gt;
-- temporary public function for debugging&lt;br /&gt;
function p.chkFossilRange(frame)&lt;br /&gt;
	local args = frame.args&lt;br /&gt;
	local fossilRange = args[&#039;temporal_range&#039;] or args[&#039;temporal range&#039;] or args[&#039;fossil_range&#039;] or args[&#039;fossil range&#039;] or &#039;&#039;&lt;br /&gt;
    local oldestFossil = args[&#039;oldest_fossil&#039;] or args[&#039;oldest fossil&#039;] or &#039;&#039;&lt;br /&gt;
    local youngestFossil =  args[&#039;youngest_fossil&#039;] or args[&#039;youngest fossil&#039;] or &#039;&#039;&lt;br /&gt;
    local fossilRange = l.setfossilRange(frame, fossilRange, oldestFossil, youngestFossil)&lt;br /&gt;
	return fossilRange&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function l.setfossilRange(frame, fossilRange, oldestFossil, youngestFossil)&lt;br /&gt;
	local res = &#039;&#039;&lt;br /&gt;
	if fossilRange ~= &#039;&#039; then&lt;br /&gt;
		if mw.ustring.find(frame:expandTemplate{ title = &#039;Period start&#039;, args = { fossilRange } }, &#039;[Ee]rror&#039;) then&lt;br /&gt;
			res = fossilRange&lt;br /&gt;
		else &lt;br /&gt;
			res = frame:expandTemplate{ title = &#039;Geological range&#039;, args = { fossilRange } }&lt;br /&gt;
		end&lt;br /&gt;
	elseif oldestFossil ~= &#039;&#039; then&lt;br /&gt;
		if youngestFossil == &#039;&#039; then youngestFossil = &#039;Recent&#039; end&lt;br /&gt;
		if mw.ustring.find(frame:expandTemplate{ title = &#039;Period start&#039;, args = { oldestFossil } }, &#039;[Ee]rror&#039;) or&lt;br /&gt;
		   mw.ustring.find(frame:expandTemplate{ title = &#039;Period start&#039;, args = { youngestFossil } }, &#039;[Ee]rror&#039;) then&lt;br /&gt;
			res = oldestFossil..&#039;–&#039;..youngestFossil&lt;br /&gt;
		else&lt;br /&gt;
		res = frame:expandTemplate{ title = &#039;Geological range&#039;, args = { oldestFossil, youngestFossil } }&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
	return res&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
-- =============================================================================&lt;br /&gt;
-- l.italicizeTypeName(typeName) checks whether the name of a type genus or&lt;br /&gt;
-- species should be italicized, because it appears to be a bare name.&lt;br /&gt;
-- =============================================================================&lt;br /&gt;
&lt;br /&gt;
function l.italicizeTypeName(typeName)&lt;br /&gt;
	if typeName and not (string.find(typeName, &amp;quot;&amp;lt;&amp;quot;, 1, true) or string.find(typeName, &amp;quot;&amp;gt;&amp;quot;, 1, true)) then&lt;br /&gt;
		typeName = TaxonItalics.italicizeTaxonName(typeName, false, false)&lt;br /&gt;
	end&lt;br /&gt;
	return typeName&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
-- **************************** Speciesbox support *****************************&lt;br /&gt;
&lt;br /&gt;
-- =============================================================================&lt;br /&gt;
-- l.genusOf(str) extracts the genus from a string. Normally this will be the&lt;br /&gt;
-- first word of the string (e.g. given &#039;Bellis perennis&#039; it returns &#039;Bellis&#039;).&lt;br /&gt;
-- It also handles a string containing a nothogenus with a spaced × (e.g. given&lt;br /&gt;
-- &#039;× Heucherella tiarelloides&#039; it returns &#039;× Heucherella&#039;).&lt;br /&gt;
-- =============================================================================&lt;br /&gt;
&lt;br /&gt;
function l.genusOf(str)&lt;br /&gt;
	local res = mw.ustring.match(str, &#039;^[^%s]*&#039;, 1)&lt;br /&gt;
	if res == mw.ustring.char(215) then&lt;br /&gt;
		res = res .. &#039; &#039; .. mw.ustring.match(str, &#039;^[^%s]*&#039;, 3)&lt;br /&gt;
	end&lt;br /&gt;
	return res&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
-- =============================================================================&lt;br /&gt;
-- l.doSpeciesboxName(name, taxon, genus, species, basePageTitle, italicTitle)&lt;br /&gt;
-- returns a name for a taxobox created by Template:Speciesbox. The name will be&lt;br /&gt;
-- italicized if appropriate. It also generates code to italicize the page title&lt;br /&gt;
-- if appropropriate. In both cases the test for italicization is that the base&lt;br /&gt;
-- taxon name (stripped of any disambiguation or qualifier) is the same as the&lt;br /&gt;
-- base page title.&lt;br /&gt;
-- =============================================================================&lt;br /&gt;
&lt;br /&gt;
function p.speciesboxName(frame)&lt;br /&gt;
	local name = frame.args[1] or &#039;&#039;&lt;br /&gt;
	local taxon = frame.args[2] or &#039;&#039;&lt;br /&gt;
	local genus = frame.args[3] or &#039;&#039;&lt;br /&gt;
	local species = frame.args[4] or &#039;&#039;&lt;br /&gt;
	local basePageTitle = frame.args[5] or &#039;&#039;&lt;br /&gt;
	local italicTitle = frame.args[6] or &#039;&#039;&lt;br /&gt;
	return l.doSpeciesboxName(name, taxon, genus, species, basePageTitle, italicTitle)&lt;br /&gt;
end&lt;br /&gt;
	&lt;br /&gt;
function l.doSpeciesboxName(name, taxon, genus, species, basePageTitle, italicTitle)&lt;br /&gt;
	if taxon ~= &#039;&#039; then&lt;br /&gt;
		genus = mw.ustring.gsub(l.genusOf(taxon), &#039;/.*$&#039;, &#039;&#039;, 1) -- strip any qualifier&lt;br /&gt;
	else&lt;br /&gt;
		genus = mw.ustring.gsub(mw.ustring.gsub(genus, &#039;%s+%b()$&#039;, &#039;&#039;, 1), &#039;/.*$&#039;, &#039;&#039;, 1) -- strip any disambig and qualifier&lt;br /&gt;
		if species == &#039;&#039; then taxon = genus&lt;br /&gt;
		else taxon = genus .. &#039; &#039; .. species&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
	local italicizeP = italicTitle ~= &#039;no&#039; and (basePageTitle == taxon or basePageTitle == genus) -- use basePageTitle to match taxon/genus&lt;br /&gt;
	-- deal with taxobox name (i.e. its caption)&lt;br /&gt;
	if name == &#039;&#039; then&lt;br /&gt;
		name = basePageTitle&lt;br /&gt;
		if italicizeP then name = TaxonItalics.italicizeTaxonName(name, false, false) end&lt;br /&gt;
	end&lt;br /&gt;
	-- deal with page title&lt;br /&gt;
	if italicizeP then&lt;br /&gt;
		local pageTitle = mw.title.getCurrentTitle().text -- formatting the page title with DISPLAYTITLE needs the full page title&lt;br /&gt;
		if italicTitle ~= &#039;test&#039; then &lt;br /&gt;
			pageTitle  = TaxonItalics.italicizeTaxonName(pageTitle, false, false, true) -- format pageTitle, not italicizing any parenthesized term&lt;br /&gt;
			local nsText = mw.title.getCurrentTitle().nsText -- for drafts and other pages not in mainspace&lt;br /&gt;
			if nsText ~= &#039;&#039; then&lt;br /&gt;
				pageTitle = nsText:gsub(&#039;_&#039;, &#039; &#039;) .. &#039;:&#039; .. pageTitle -- [[phab:T369784]]&lt;br /&gt;
			end&lt;br /&gt;
			mw.getCurrentFrame():callParserFunction(&#039;DISPLAYTITLE&#039;, pageTitle)&lt;br /&gt;
		else&lt;br /&gt;
			name = name .. &#039; \\Italic title\\ &#039; .. pageTitle -- for testing and debugging&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
	return name&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
-- =============================================================================&lt;br /&gt;
-- =============================================================================&lt;br /&gt;
function p.infraspeciesboxName(frame)&lt;br /&gt;
	local name = frame.args[1] or &#039;&#039;&lt;br /&gt;
	local genus = frame.args[2] or &#039;&#039;&lt;br /&gt;
	local species = frame.args[3] or &#039;&#039;&lt;br /&gt;
	local ct = frame.args[4] or &#039;&#039;&lt;br /&gt;
    local infraspecies = frame.args[5] or &#039;&#039;&lt;br /&gt;
	local basePageTitle = frame.args[6] or &#039;&#039;&lt;br /&gt;
	local italicTitle = frame.args[7] or &#039;&#039;&lt;br /&gt;
	return l.doinfraspeciesboxName(name, genus, species, ct, infraspecies, basePageTitle, italicTitle)&lt;br /&gt;
end&lt;br /&gt;
	&lt;br /&gt;
function l.doinfraspeciesboxName(name, genus, species, ct, infraspecies, basePageTitle, italicTitle)&lt;br /&gt;
	genus = mw.ustring.gsub(mw.ustring.gsub(genus, &#039;%s+%b()$&#039;, &#039;&#039;, 1), &#039;/.*$&#039;, &#039;&#039;, 1) -- strip any disambig and qualifier&lt;br /&gt;
	local taxon = genus .. &#039; &#039; .. species&lt;br /&gt;
	if ct == &#039;&#039; then taxon = taxon .. &#039; &#039; .. infraspecies&lt;br /&gt;
	else taxon = taxon .. &#039; &#039; .. ct .. &#039; &#039; .. infraspecies&lt;br /&gt;
	end&lt;br /&gt;
	local italicizeP = italicTitle ~= &#039;no&#039; and (basePageTitle == taxon) -- use basePageTitle to match taxon&lt;br /&gt;
	-- deal with taxobox name (i.e. its caption)&lt;br /&gt;
	if name == &#039;&#039; then&lt;br /&gt;
		name = basePageTitle&lt;br /&gt;
		if italicizeP then name = TaxonItalics.italicizeTaxonName(name, false, false) end&lt;br /&gt;
	end&lt;br /&gt;
	-- deal with page title&lt;br /&gt;
	if italicizeP then&lt;br /&gt;
		local pageTitle = mw.title.getCurrentTitle().text -- formatting the page title with DISPLAYTITLE needs the full page title&lt;br /&gt;
		pageTitle  = TaxonItalics.italicizeTaxonName(pageTitle, false, false, true) -- format pageTitle, not italicizing any parenthesized term&lt;br /&gt;
		if italicTitle ~= &#039;test&#039; then &lt;br /&gt;
			mw.getCurrentFrame():callParserFunction(&#039;DISPLAYTITLE&#039;, pageTitle)&lt;br /&gt;
		else&lt;br /&gt;
			name = name .. &#039; \\Italic title\\ &#039; .. pageTitle -- for testing and debugging&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
	return name&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
return p&lt;/div&gt;</summary>
		<author><name>Indicwiki</name></author>
	</entry>
	<entry>
		<id>https://sandbox.indicwiki.org/index.php?title=Template:Taxonomy/Vertebrata&amp;diff=66501</id>
		<title>Template:Taxonomy/Vertebrata</title>
		<link rel="alternate" type="text/html" href="https://sandbox.indicwiki.org/index.php?title=Template:Taxonomy/Vertebrata&amp;diff=66501"/>
		<updated>2026-05-11T08:16:17Z</updated>

		<summary type="html">&lt;p&gt;Indicwiki: 1 revision imported&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;noinclude&amp;gt;{{pp-template}}{{High-use}}&lt;br /&gt;
&amp;lt;/noinclude&amp;gt;{{Don&#039;t edit this line {{{machine code|}}}&lt;br /&gt;
|rank=subphylum&lt;br /&gt;
|link=Vertebrate|Vertebrata&lt;br /&gt;
|parent=Olfactores&lt;br /&gt;
}}&lt;/div&gt;</summary>
		<author><name>Indicwiki</name></author>
	</entry>
	<entry>
		<id>https://sandbox.indicwiki.org/index.php?title=Template:Taxonomy/Tetrapodomorpha&amp;diff=66499</id>
		<title>Template:Taxonomy/Tetrapodomorpha</title>
		<link rel="alternate" type="text/html" href="https://sandbox.indicwiki.org/index.php?title=Template:Taxonomy/Tetrapodomorpha&amp;diff=66499"/>
		<updated>2026-05-11T08:16:16Z</updated>

		<summary type="html">&lt;p&gt;Indicwiki: 1 revision imported&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;noinclude&amp;gt;{{pp-template}}{{High-use}}&lt;br /&gt;
&amp;lt;/noinclude&amp;gt;{{Don&#039;t edit this line {{{machine code|}}}&lt;br /&gt;
|rank=clade&lt;br /&gt;
|link=Tetrapodomorpha&lt;br /&gt;
|parent=Rhipidistia&lt;br /&gt;
|extinct=&lt;br /&gt;
|refs=&amp;lt;!--Shown on this page only; don&#039;t include &amp;lt;ref&amp;gt; tags --&amp;gt;&lt;br /&gt;
}}&lt;/div&gt;</summary>
		<author><name>Indicwiki</name></author>
	</entry>
	<entry>
		<id>https://sandbox.indicwiki.org/index.php?title=Template:Taxonomy/Tetrapoda&amp;diff=66497</id>
		<title>Template:Taxonomy/Tetrapoda</title>
		<link rel="alternate" type="text/html" href="https://sandbox.indicwiki.org/index.php?title=Template:Taxonomy/Tetrapoda&amp;diff=66497"/>
		<updated>2026-05-11T08:16:16Z</updated>

		<summary type="html">&lt;p&gt;Indicwiki: 1 revision imported&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;noinclude&amp;gt;{{pp-template}}{{High-use}}&lt;br /&gt;
&amp;lt;/noinclude&amp;gt;{{Don&#039;t edit this line {{{machine code|}}}&lt;br /&gt;
|rank=cladus&lt;br /&gt;
|link=Tetrapod|Tetrapoda&lt;br /&gt;
|parent=Stegocephali&lt;br /&gt;
|refs=*{{cite book |last=Laurin |first=M. |year=2020 |contribution=Stegocephali |title=Phylonyms, a Companion to the PhyloCode |edition=1st |editor-first1= P.  |editor-last1=Cantino |editor-first2=J. A.  |editor-last2=Gauthier and |editor-first3=K. |editor-last3=Queiroz |pages=741–745 |publisher=Taylor &amp;amp; Francis Group, Ltd |location=London}}&lt;br /&gt;
*{{cite journal |last1=Abel |first1=Pascal |last2=Werneburg |first2=Ingmar |title=Morphology of the temporal skull region in tetrapods: Research history, functional explanations, and a new comprehensive classification scheme |journal=Biological Reviews |date=2021 |volume=96 |issue=5 |pages=2229–2257 |doi=10.1111/brv.12751}}&lt;br /&gt;
}}&lt;/div&gt;</summary>
		<author><name>Indicwiki</name></author>
	</entry>
	<entry>
		<id>https://sandbox.indicwiki.org/index.php?title=Template:Taxonomy/Sarcopterygii&amp;diff=66495</id>
		<title>Template:Taxonomy/Sarcopterygii</title>
		<link rel="alternate" type="text/html" href="https://sandbox.indicwiki.org/index.php?title=Template:Taxonomy/Sarcopterygii&amp;diff=66495"/>
		<updated>2026-05-11T08:16:15Z</updated>

		<summary type="html">&lt;p&gt;Indicwiki: 1 revision imported&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;noinclude&amp;gt;{{pp-template}}{{High-use}}&lt;br /&gt;
&amp;lt;/noinclude&amp;gt;{{Don&#039;t edit this line {{{machine code|}}}&lt;br /&gt;
|rank=clade&lt;br /&gt;
|link=Sarcopterygii&lt;br /&gt;
|parent=Osteichthyes &lt;br /&gt;
|refs={{cite book|last1=Nelson|first1=Joseph S.|last2=Grande|first2=Terry C.|last3=Wilson|first3=Mark V. H.|year=2016|title=&#039;&#039;Fishes of the World&#039;&#039;|edition=5th|page=101|publisher=[[John Wiley &amp;amp; Sons]]|isbn=9781118342336}}&lt;br /&gt;
}}&lt;/div&gt;</summary>
		<author><name>Indicwiki</name></author>
	</entry>
	<entry>
		<id>https://sandbox.indicwiki.org/index.php?title=Template:Taxonomy/Rhipidistia&amp;diff=66493</id>
		<title>Template:Taxonomy/Rhipidistia</title>
		<link rel="alternate" type="text/html" href="https://sandbox.indicwiki.org/index.php?title=Template:Taxonomy/Rhipidistia&amp;diff=66493"/>
		<updated>2026-05-11T08:16:15Z</updated>

		<summary type="html">&lt;p&gt;Indicwiki: 1 revision imported&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;noinclude&amp;gt;{{pp-template}}{{High-use}}&lt;br /&gt;
&amp;lt;/noinclude&amp;gt;{{Don&#039;t edit this line {{{machine code|}}}&lt;br /&gt;
|rank=clade&lt;br /&gt;
|link=Rhipidistia&lt;br /&gt;
|parent=Sarcopterygii&lt;br /&gt;
|extinct=&lt;br /&gt;
|refs=&amp;lt;!--Shown on this page only; don&#039;t include &amp;lt;ref&amp;gt; tags --&amp;gt;&lt;br /&gt;
}}&lt;/div&gt;</summary>
		<author><name>Indicwiki</name></author>
	</entry>
	<entry>
		<id>https://sandbox.indicwiki.org/index.php?title=Template:Taxonomy/ParaHoxozoa&amp;diff=66491</id>
		<title>Template:Taxonomy/ParaHoxozoa</title>
		<link rel="alternate" type="text/html" href="https://sandbox.indicwiki.org/index.php?title=Template:Taxonomy/ParaHoxozoa&amp;diff=66491"/>
		<updated>2026-05-11T08:16:14Z</updated>

		<summary type="html">&lt;p&gt;Indicwiki: 1 revision imported&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;noinclude&amp;gt;{{pp-template}}{{High-use}}&lt;br /&gt;
&amp;lt;/noinclude&amp;gt;{{Don&#039;t edit this line {{{machine code|}}}&lt;br /&gt;
|rank=cladus&lt;br /&gt;
|link=ParaHoxozoa&lt;br /&gt;
|parent=Eumetazoa&lt;br /&gt;
|extinct=&amp;lt;!--leave blank or delete this line for &amp;quot;not extinct&amp;quot;; put &amp;quot;yes&amp;quot; for &amp;quot;extinct&amp;quot; --&amp;gt;&lt;br /&gt;
|refs=&amp;lt;!--Shown on this page only; don&#039;t include &amp;lt;ref&amp;gt; tags --&amp;gt;&lt;br /&gt;
*{{Cite journal|last=Giribet|first=Gonzalo|year=2016|title=Genomics and the animal tree of life: conflicts and future prospects|journal=Zoologica Scripta|language=en|volume=45|pages=14–21|doi=10.1111/zsc.12215|s2cid=89157382 }}&lt;br /&gt;
*{{Cite journal|last1=Ryan|first1=Joseph F.|last2=Pang|first2=Kevin|last3=Mullikin|first3=James C.|last4=Martindale|first4=Mark Q.|last5=Baxevanis|first5=Andreas D.|year=2010|title=The homeodomain complement of the ctenophore Mnemiopsis leidyi suggests that Ctenophora and Porifera diverged prior to the ParaHoxozoa|journal=EvoDevo|volume=1|issue=1|pages=9|doi=10.1186/2041-9139-1-9|pmid=20920347|pmc=2959044 |doi-access=free }}&lt;br /&gt;
}}&lt;/div&gt;</summary>
		<author><name>Indicwiki</name></author>
	</entry>
	<entry>
		<id>https://sandbox.indicwiki.org/index.php?title=Template:Taxonomy/Opisthokonta&amp;diff=66489</id>
		<title>Template:Taxonomy/Opisthokonta</title>
		<link rel="alternate" type="text/html" href="https://sandbox.indicwiki.org/index.php?title=Template:Taxonomy/Opisthokonta&amp;diff=66489"/>
		<updated>2026-05-11T08:16:13Z</updated>

		<summary type="html">&lt;p&gt;Indicwiki: 1 revision imported&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;noinclude&amp;gt;{{High-use}}&lt;br /&gt;
&amp;lt;/noinclude&amp;gt;{{Don&#039;t edit this line {{{machine code|}}}&lt;br /&gt;
|rank=clade&lt;br /&gt;
|link=Opisthokont|Opisthokonta&lt;br /&gt;
|parent=Obazoa&lt;br /&gt;
}}&lt;/div&gt;</summary>
		<author><name>Indicwiki</name></author>
	</entry>
	<entry>
		<id>https://sandbox.indicwiki.org/index.php?title=Template:Taxonomy/Obazoa&amp;diff=66487</id>
		<title>Template:Taxonomy/Obazoa</title>
		<link rel="alternate" type="text/html" href="https://sandbox.indicwiki.org/index.php?title=Template:Taxonomy/Obazoa&amp;diff=66487"/>
		<updated>2026-05-11T08:16:13Z</updated>

		<summary type="html">&lt;p&gt;Indicwiki: 1 revision imported&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;noinclude&amp;gt;{{pp-template|small=yes}}{{High-use}}&lt;br /&gt;
&amp;lt;/noinclude&amp;gt;{{Don&#039;t edit this line {{{machine code|}}}&lt;br /&gt;
|rank=cladus&lt;br /&gt;
|link=Obazoa&lt;br /&gt;
|parent=Amorphea&lt;br /&gt;
|refs=&amp;lt;!--Shown on this page only; don&#039;t include &amp;lt;ref&amp;gt; tags --&amp;gt;{{Cite journal|last1=Brown|first1=Matthew W.|last2=Sharpe|first2=Susan C.|last3=Silberman|first3=Jeffrey D.|last4=Heiss|first4=Aaron A.|last5=Lang|first5=B. Franz|last6=Simpson|first6=Alastair G. B.|last7=Roger|first7=Andrew J.|date=2013-10-22|title=Phylogenomics demonstrates that breviate flagellates are related to opisthokonts and apusomonads|journal=Proceedings of the Royal Society of London B: Biological Sciences|language=en|volume=280|issue=1769|article-number=20131755|doi=10.1098/rspb.2013.1755|pmc=3768317|pmid=23986111}}&lt;br /&gt;
}}&lt;/div&gt;</summary>
		<author><name>Indicwiki</name></author>
	</entry>
	<entry>
		<id>https://sandbox.indicwiki.org/index.php?title=Template:Taxonomy/Holozoa&amp;diff=66485</id>
		<title>Template:Taxonomy/Holozoa</title>
		<link rel="alternate" type="text/html" href="https://sandbox.indicwiki.org/index.php?title=Template:Taxonomy/Holozoa&amp;diff=66485"/>
		<updated>2026-05-11T08:16:13Z</updated>

		<summary type="html">&lt;p&gt;Indicwiki: 1 revision imported&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;noinclude&amp;gt;{{pp-template}}{{High-use}}&lt;br /&gt;
&amp;lt;/noinclude&amp;gt;{{Don&#039;t edit this line {{{machine code|}}}&lt;br /&gt;
|rank=clade&lt;br /&gt;
|parent=Opisthokonta&lt;br /&gt;
|link=Holozoa&lt;br /&gt;
}}&lt;/div&gt;</summary>
		<author><name>Indicwiki</name></author>
	</entry>
	<entry>
		<id>https://sandbox.indicwiki.org/index.php?title=Template:Taxonomy/Filozoa&amp;diff=66483</id>
		<title>Template:Taxonomy/Filozoa</title>
		<link rel="alternate" type="text/html" href="https://sandbox.indicwiki.org/index.php?title=Template:Taxonomy/Filozoa&amp;diff=66483"/>
		<updated>2026-05-11T08:16:13Z</updated>

		<summary type="html">&lt;p&gt;Indicwiki: 1 revision imported&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;noinclude&amp;gt;{{pp-template}}{{High-use}}&lt;br /&gt;
&amp;lt;/noinclude&amp;gt;{{Don&#039;t edit this line {{{machine code|}}}&lt;br /&gt;
|rank=clade&lt;br /&gt;
|parent=Holozoa&lt;br /&gt;
|link=Filozoa&lt;br /&gt;
}}&lt;/div&gt;</summary>
		<author><name>Indicwiki</name></author>
	</entry>
	<entry>
		<id>https://sandbox.indicwiki.org/index.php?title=Template:Taxonomy/Eukaryota&amp;diff=66481</id>
		<title>Template:Taxonomy/Eukaryota</title>
		<link rel="alternate" type="text/html" href="https://sandbox.indicwiki.org/index.php?title=Template:Taxonomy/Eukaryota&amp;diff=66481"/>
		<updated>2026-05-11T08:16:13Z</updated>

		<summary type="html">&lt;p&gt;Indicwiki: 1 revision imported&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;noinclude&amp;gt;{{pp-template}}{{High-use}}&lt;br /&gt;
&amp;lt;/noinclude&amp;gt;{{Don&#039;t edit this line {{{machine code|}}}&lt;br /&gt;
|rank=domain&lt;br /&gt;
|parent=Life&lt;br /&gt;
|link=Eukaryote|Eukaryota&lt;br /&gt;
|refs={{Catalogue of Life|id=CS5HF|title=Eukaryota|access-date=29 November 2025}}&lt;br /&gt;
}}&lt;/div&gt;</summary>
		<author><name>Indicwiki</name></author>
	</entry>
</feed>