Module:Cite taxon/doc
| This is a documentation subpage for Module:Cite taxon. It may contain usage information, categories and other content that is not part of the original module page. |
| Warning | This Lua module is used on approximately 42,000 pages and changes may be widely noticed. Test changes in the module's /sandbox or /testcases subpages, or in your own module sandbox. Consider discussing changes on the talk page before implementing them. |
This module was created to generate {{cite web}} references to the Catalog of Fishes database. The capabilities were extended to handle other fish-related references and the module renamed FishRef. Further extension to cover taxonomy databases handling non-fish taxa led to creation of template {{BioRef}}. and {{Cite taxon}} templates and module name was changed to Cite taxon to better describe its function of handling citations for a wide variety taxonomy databases.
The module provides a wrapper to the citation template {{cite web}}, which means that the references can also include other parameters supported by the CS1/CS2 citation system. These include |access-date=, which is recommended, reference style formating parameters such as |mode=cs1|2 or |name-list-style=vanc, the archiving parameters |url-status=, |archive-url= and |archive-date=, and other general parameter such as |quote=. The template supplies authors or editors for some databases, but for others these can be added using the cite web parameters |author=, |last=, |first= or the editor equivalents.
Templates using the module
[edit source]The module is used with {{Catalog of Fishes}}, which was designed to replace a series of templates that were originally written in the Wikipedia template language: {{Cof genus}}, {{Cof family}}, {{Cof species}}, {{Cof record}}.
Other templates using the module:
- {{Cite taxon}} (general purpose template handling many databases*)
- {{BioRef}} (general purpose template handling many databases.* Deprecated, use {{Cite taxon}})
- {{FishRef}} (general purpose template handling many fish databases. Deprecated, use {{Cite taxon}} or fishbase or CoF templates)
- {{FishBase}}
- {{Fossilworks}} (site defunct)
- {{Catalogue of Life}}
- {{Cite WFO}} (World Flora Online)
- {{Cite mdd}} (Mammalian Diversity Database)
- {{Cite BOW}} (Birds of the World)
*The module currently handles ASW6, Amphibiaweb, Reptile Database, IOC, Avibase, TiF, WoRMS, POWO, GRIN, IPNI, World Plants, World Ferns, Tropicos, FNA, ATRF, Goffinet's Bryophyte classification, Algaebase, Paleobiology DB, ITIS
Usage of module
[edit source]General form: {{#invoke:Cite taxon|main|db|parameters}}
Examples: {{#invoke:Cite taxon|main|cof|parameters}}, {{#invoke:Cite taxon|main|fishbase|parameters}}, {{#invoke:Cite taxon|main|reptileDB|parameters}}, {{#invoke:Cite taxon|main|ASW6|parameters}}, {{#invoke:Cite taxon|main|POWO|parameters}}, etc.
The module stores information about each database in a data table (e.g. data.cof for Catalog of Fishes). The table has a CitationArgs table, for parameters to be passed to {{cite web}}, a CustomArgs table for parameters used for internal workings to set other {{cite web}} parameters, and one or more custom functions handling different types of citation parameter. Typical functions are id, species, genus, family, order, and taxon. Which functions are needed depend on the options provided by the external database, some use a common format with an id for all links, others have taxon-specific links.
General rules
[edit source]Different databases provide different options so uniformity is not possible. Some provide links that allow handling of species, genera, families, orders and other taxon ranks using the taxon names. This allows specific function to handle different taxa. Other just provide an id which can be used to generate the url, but needs a title. The following are the general rules for what functions are available:
- All databases can take a
|title=and|url=. The templates then just add the general citation information about the website. - Many take a
|id=. The template will complete the url and add a default title, although adding a title is recommended. - Some databases allow taxon names that can be used with
|genus=,|family=,|order=or|taxon= - Species can also often be handled when given
|genus=and|species=, and in some cases also|subspecies=. These can usually be added as position parameters, but it is recommended that the parameter names are given
Examples of templates using the Module:FishRef
[edit source]Catalog of Fishes
[edit source]Examples using {{Catalog of Fishes}}
| Template usage | Results |
|---|---|
{{Catalog of Fishes |family=Xiphiidae |list=species |access-date=7 June 2018}}
|
Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value). |
{{Catalog of Fishes |family=Cyprinidae |access-date=7 June 2018}}
|
Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value). |
{{Catalog of Fishes |family=Salmonidae |list=genus |access-date=7 June 2018}}
|
Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value). |
{{Catalog of Fishes |genus=Vinagarra |access-date=7 June 2018}}
|
Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value). |
{{Catalog of Fishes |genus=Vinagarra |species=elongata |access-date=7 June 2018}}
|
Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value). |
{{Catalog of Fishes |genus=Abbottina |species=rivularis |access-date=7 June 2018}}
|
Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value). |
{{Catalog of Fishes |genus=Tylognathus |species=sinensis |access-date=7 June 2018}}
|
Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value). |
{{Catalog of Fishes |genid=150 |access-date=8 June 2018}}
|
Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value). |
{{Catalog of Fishes |genid=150 |title=Syngnathus |access-date=8 June 2018}}
|
Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value). |
{{Catalog of Fishes|spid=14756 |access-date=8 June 2018}}
|
Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value). |
{{Catalog of Fishes |spid=14756 |title=Syngnathus abaster |access-date=8 June 2018}}
|
Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value). |
Examples using {{Cof family}}, {{Cof genus}}, {{Cof species}} and {{Cof record}} templates
| Template usage | Results |
|---|---|
{{Cof family |Xiphiidae|access-date=7 June 2018}}
|
Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value). |
{{Cof family |family=Xiphiidae |list=species |access-date=7 June 2018}}
|
Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value). |
{{Cof family |family=Cyprinidae |access-date=7 June 2018}}
|
Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value). |
{{Cof family |family=Salmonidae |list=genus |access-date=7 June 2018}}
|
Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value). |
{{Cof genus |Garra|access-date=7 June 2018}}
|
Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value). |
{{Cof genus |genus=Vinagarra |access-date=7 June 2018}}
|
Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value). |
{{Cof species |genus=Vinagarra |species=elongata|access-date=7 June 2018}}
|
Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value). |
{{Cof species |Abbottina|rivularis|access-date=7 June 2018}}
|
Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value). |
{{Cof species |Tylognathus|sinensis|access-date=7 June 2018}}
|
Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value). |
{{Cof record |genid=150 |title=Syngnathus |access-date=8 June 2018}}
|
Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value). |
{{Cof record |spid=14756 |title=Syngnathus abaster |access-date=8 June 2018}}
|
Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value). |
{{Cof record |genid=150 |access-date=8 June 2018}}
|
Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value). |
{{Cof record |spid=14756 |access-date=8 June 2018}}
|
Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value). |
Using {{FishBase/sandbox}}
[edit source]| Template usage | Results |
|---|---|
Species with positional parameters]:
{{FishBase/sandbox|Danio|rerio|year=2018}}
|
Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value). |
Subspecies with position parameters:
{{FishBase/sandbox|Emmelichthys|nitidus|cyanescens}}
|
Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value). |
Species with named parameters:
{{FishBase/sandbox|genus=Danio|species=rerio}}
|
Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value). |
Subspecies with named parameters:
{{FishBase/sandbox|genus=Emmelichthys|species=nitidus|subspecies=cyanescens}}
|
Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value). |
Genus:
{{FishBase/sandbox|genus=Emmelichthys}}
|
Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value). |
Family:
{{FishBase/sandbox|family=Percidae}}
|
Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value). |
Order:
{{FishBase/sandbox|order=Perciformes|access-date=19 November 2018|mode=cs2}}
|
Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value). |
Using {{BioRef}}
[edit source]Fishbase:
| Template usage | Results |
|---|---|
Species with positional parameters:
{{BioRef|fishbase|Danio|rerio}}
|
Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value). |
Subspecies with positional parameters:
{{BioRef|fishbase|Emmelichthys|nitidus|cyanescens}}
|
Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value). |
Species with named parameters:
{{BioRef|fishbase|genus=Danio|species=rerio}}
|
Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value). |
Subspecies with named parameters:
{{BioRef|fishbase|genus=Emmelichthys|species=nitidus|subspecies=cyanescens}}
|
Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value). |
Genus:
{{BioRef|fishbase|genus=Emmelichthys}}
|
Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value). |
Family:
{{BioRef|fishbase|family=Percidae}}
|
Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value). |
Order:
{{BioRef|fishbase|order=Perciformes|access-date=19 November 2018|mode=cs2}}
|
Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value). |
<section begin=Herpetology /> <section begin=ASW6 /> Amphibian Species of the World (ASW6)
| Template usage | Results |
|---|---|
Default page with family listing:
{{BioRef|ASW6 |access-date=27 September 2019}}
|
Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value). |
Title + url:
{{BioRef|ASW6 |title=Hylidae Rafinesque, 1815|year=2019 |url=http://research.amnh.org/vz/herpetology/amphibia/Amphibia/Anura/Hylidae |access-date=27 September 2019}}
|
Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value). |
Family (currently only works for Anura):
{{BioRef|ASW6 |family=Hylidae |year=2019 |access-date=27 September 2019}}
|
Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value). |
Genus + species (named parameters)::
{{BioRef|ASW6 |genus=Chiromantis |species=cherrapunjiae |year=2019 |access-date=27 September 2019}}
|
Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value). |
Genus + species (positional parameters)::
{{BioRef|ASW6 | Chiromantis| cherrapunjiae |year=2019 |access-date=27 September 2019}}
|
Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value). |
Note: the citation title can changed with |title=My title
|
<section end=ASW6 /> <section begin=AmphibiaWeb /> AmphibiaWeb
| Template usage | Results |
|---|---|
Default page with for interactive family listing:
{{BioRef|amphibiaweb |access-date=27 September 2019}}
|
Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value). |
Title with url:
{{BioRef|amphibiaweb |title=Ranidae |year=2019 |url=https://amphibiaweb.org/lists/Ranidae.shtml |access-date=27 September 2019}}
|
Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value). |
Family:
{{BioRef|amphibiaweb |family=Ranidae |year=2019 |access-date=27 September 2019}}
|
Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value). |
Genus + species (named parameters):
{{BioRef|amphibiaweb |genus=Altiphrynoides |species=malcolmi |year=2019 |access-date=27 September 2019}}
|
Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value). |
Genus + species (positional parameters):
{{BioRef|amphibiaweb | Altiphrynoides | malcolmi |year=2019 |access-date=27 September 2019}}
|
Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value). |
Note: the citation title can changed with |title=My title
|
<section end=AmphibiaWeb /> <section begin=reptileDB />
Reptile database:
| Template usage | Results |
|---|---|
Species:
{{BioRef|reptileDB |genus=Loxocemus |species=bicolor|access-date=22 November 2018}}
|
Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value). |
Species (positional parameters) with title:
{{BioRef|reptileDB |Python |natalensis |title=''Python natalensis'' SMITH, 1840|access-date=14 October 2019}}
|
Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value). |
Genus:
{{BioRef|reptileDB |genus=Cylindrophis|access-date=22 November 2018}}
|
Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value). |
Use |taxon= parameter for higher taxa:
| |
Family:
{{BioRef|reptileDB |taxon=Pythonidae|title=Species in Family Pythonidae|access-date=22 November 2018}}
|
Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value). |
Other taxon (e.g. infraorder):
{{BioRef|reptileDB |taxon=Alethinophidia|access-date=22 November 2018}}
|
Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value). |
<section end=reptileDB /> <section end=Herpetology />
ASM Mammal Diversity Database
- See also {{cite mdd}}
| Template usage | Results |
|---|---|
Family using |taxon= parameter:
{{BioRef|asm |order=Carnivora |access-date=28 February 2024 |mode=cs2}}
|
Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value). |
Family using |family= parameter:
{{BioRef|asm |family=Canidae |access-date=19 November 2018 |mode=cs2}}
|
Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value). |
Genus using |genus= parameter:
{{BioRef|asm |genus=Ursus |access-date=19 November 2018}}
|
Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value). |
Species using |id= parameter:
{{BioRef|asm |id=8541 |title=Sand cat|access-date=19 November 2018}}
|
Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value). |
Species with |genus= and |species= parameters:
{{BioRef|asm |genus=Panthera|species=leo |access-date=19 November 2018}}
|
Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value). |