Template:Efloras/doc: Difference between revisions

From Linguifex
Jump to navigation Jump to search
(Created page with "{{documentation subpage}} {{Lua|Module:eFloras}} This template creates a citation of a w:taxon treatment in the floras and other resources on...")
 
(Replaced content with "{{documentation subpage}} {{Lua|Module:eFloras}} <includeonly> Category:Templates </includeonly>")
Tag: Replaced
 
Line 2: Line 2:


{{Lua|Module:eFloras}}
{{Lua|Module:eFloras}}
This template creates a citation of a [[w:taxon|taxon]] treatment in the [[w:flora (publication)|floras]] and other resources on the web site [http://www.efloras.org eFloras]. The most commonly cited resources are the ''[[w:Flora of North America|Flora of North America]]'' (FNA) and the ''[[w:Flora of China (series)|Flora of China]]'' (FoC). See the table [[#eFloras-resources|below]] for a full list.
==Usage==
The first three parameters are the flora id, the taxon id, and the taxon name. For the Flora of North America and the Flora of China, the taxon id and taxon name can be omitted if they can be retrieved from Wikidata, but the authors and volume number should always be added.
In order to use the template, copy the link, and remove everything from it except for the two numbers. Place them in parameters 1 and 2.
The taxon name (parameter 3) is required if it is different from the taxon name on Wikidata or the page title. Do not italicize the taxon name; italics are automatically added if necessary by [[Module:eFloras]]. [[w:Taxonomic authorities|Taxonomic authorities]] should not be included: <kbd>Caltha palustris</kbd>, not <kbd>Caltha palustris Linnaeus</kbd>.
* {{Highlighted URL|http://www.efloras.org/florataxon.aspx?flora_id{{=}}|color2=lime|1|&taxon_id{{=}}|color4=gold|200007551}}
* <code>{{color|gray|2=<nowiki>{{</nowiki>eFloras{{!}}}}{{color|lime|1}}{{color|gray|2={{!}}}}{{color|gold|200007551}}{{color|gray|<nowiki>|Caltha palustris}}</nowiki>}}</code>
To link to the treatment on the species in the current article in Flora of North America or Flora of China, just add the flora id ({{para|1}}) &ndash; <code>1</code> (Flora of North America) or <code>2</code> (Flora of China) &ndash; and the template will look up the taxon id in Wikidata. For example, on the page for ''[[w:Pinus contorta|Pinus contorta]]'', {{tlx|eFloras|1}} is the same as {{tlx|eFloras|1|233500927}}.
Authors of treatments in the Flora of North America and the Flora of China should be added, using the author-related parameters of {{tlx|citation}} (see {{section link|Template:Citation/doc|Authors}}). If authors are not listed in the treatment of one taxon, go to the page for the next highest taxon. Usually the authors of species treatments are listed on the page for the genus, tribe, or family. For instance, in the Flora of North America, the author of the treatment of the species [http://www.efloras.org/florataxon.aspx?flora_id=1&taxon_id=242417061 ''Prunus virginiana''] is found in the treatment of the genus [http://www.efloras.org/florataxon.aspx?flora_id=1&taxon_id=126865 ''Prunus'']; in the Flora of China, the authors of the treatment of [http://www.efloras.org/florataxon.aspx?flora_id=2&taxon_id=200024393 ''Rudbeckia hirta''] are found in the treatment of [http://www.efloras.org/florataxon.aspx?flora_id=2&taxon_id=20704 Asteraceae tribe Heliantheae].
* One author:
: <code><nowiki>{{eFloras||||first= |last= |access-date=</nowiki>{{#time: j F Y}}<nowiki>}}</nowiki></code>
* Up to five authors:
: <code><nowiki>{{eFloras||||first1= |last1= |first2= |last2= |first3= |last3= |first4= |last4= |first5= |last5= |access-date=</nowiki>{{#time: j F Y}}<nowiki>}}</nowiki></code>
There are three ways to add the volume number. You can add it directly in  the {{para|volume}} parameter, add the family in the parameter {{para|family}} for taxa in the Floras of North America, China, and Chile, or add the tribe in {{para|tribe}} for taxa in [[Asteraceae]] in the Flora of North America. The family or tribe is passed to [[Module:eFloras]] and the module returns the volume number (or range of volumes).
For the Flora of North America, the date of publication will be added based on the volume number.
By default, [[w:Help:Citation Style 1|Citation Style 1]] is used. Switch to [[w:Help:Citation Style 2|Citation Style 2]] using {{para|mode|cs2}}.
===Examples===
====Code====
# <code><nowiki>{{eFloras|1|233501007|Quercus alba |volume=3 |first=Kevin C. |last=Nixon | access-date = </nowiki>{{#time: j F Y}}<nowiki> }}</nowiki></code>
# <code><nowiki>{{eFloras|1|233501007|Quercus alba |family=Fagaceae |first=Kevin C. |last=Nixon | access-date = </nowiki>{{#time: j F Y}}<nowiki> }}</nowiki></code>
# <code><nowiki>{{eFloras|1|233501007|Quercus alba |first=Kevin C. |last=Nixon | access-date = </nowiki>{{#time: j F Y}}<nowiki> }}</nowiki></code>
# <code><nowiki>{{eFloras|11|233501007|Quercus alba | access-date = </nowiki>{{#time: j F Y}}<nowiki> }}</nowiki></code>
# <code><nowiki>{{eFloras | 1 | 125519 | Pinus | family = Pinaceae | last = Kral | first = Robert | access-date = </nowiki>{{#time: j F Y}}<nowiki> }}</nowiki></code>
# <code><nowiki>{{eFloras | 2 | 240001195 | Dioscorea polystachya | family = Dioscoreaceae | first1 = Chih-chi | last1 = Ting | first2 = Michael G. | last2 = Gilbert | access-date = </nowiki>{{#time: j F Y}}<nowiki> }}</nowiki></code>
# <code><nowiki>{{eFloras | 1 | 10509 | Limnocharitaceae | family = Limnocharitaceae | first = Robert R. | last = Haynes | access-date = </nowiki>{{#time: j F Y}}<nowiki> }}</nowiki></code>
# <code><nowiki>{{eFloras | 201 | 10136 | Buxaceae | family = Buxaceae | access-date = </nowiki>{{#time: j F Y}}<nowiki> }}</nowiki></code>
# <code><nowiki>{{eFloras | 5 | 220004167 | Dioscorea sativa | nv | access-date = </nowiki>{{#time: j F Y}}<nowiki> }}</nowiki></code>
# <code><nowiki>{{eFloras | 5 | 250072783 | Avenula pratensis | nv | access-date = </nowiki>{{#time: j F Y}}<nowiki> }}</nowiki></code>
# {{tlc|eFloras|120|242442611|Tulipa tarda}}
====Results====
# {{ {{replace|{{PAGENAME}}|/doc||1}} |1|233501007|Quercus alba |volume=3 |first=Kevin C. |last=Nixon |access-date={{#time: j F Y}} }}
# {{ {{replace|{{PAGENAME}}|/doc||1}} |1|233501007|Quercus alba |family=Fagaceae |first=Kevin C. |last=Nixon |access-date={{#time: j F Y}} }}
# {{ {{replace|{{PAGENAME}}|/doc||1}} |1|233501007|Quercus alba |first=Kevin C. |last=Nixon |access-date={{#time: j F Y}} }}
# {{ {{replace|{{PAGENAME}}|/doc||1}} |11|233501007|Quercus alba |access-date={{#time: j F Y}} }}
# {{ {{replace|{{PAGENAME}}|/doc||1}} | 1 | 125519 | Pinus | family = Pinaceae | last = Kral | first = Robert | | access-date = {{#time: j F Y}}}}
# {{ {{replace|{{PAGENAME}}|/doc||1}} | 2 | 240001195 | Dioscorea polystachya | family = Dioscoreaceae | first1 = Chih-chi | last1 = Ting <!-- or is the last name first? -->| first2 = Michael G. | last2 = Gilbert | access-date = {{#time: j F Y}} }}
# {{ {{replace|{{PAGENAME}}|/doc||1}} | 1 | 10509 | Limnocharitaceae | family = Limnocharitaceae  | first = Robert R. | last = Haynes | access-date = {{#time: j F Y}} }}
# {{ {{replace|{{PAGENAME}}|/doc||1}} | 201 | 10136 | Buxaceae | family = Buxaceae | access-date = {{#time: j F Y}} }}
# {{ {{replace|{{PAGENAME}}|/doc||1}} | 5 | 220004167 | Dioscorea sativa | nv | access-date = {{#time: j F Y}} }}
# {{ {{replace|{{PAGENAME}}|/doc||1}} | 5 | 250072783 | Avenula pratensis | nv | access-date = {{#time: j F Y}} }}
# {{ {{replace|{{PAGENAME}}|/doc||1}} |120|242442611|Tulipa tarda}}
===Syntax===
<code><nowiki>{{eFloras | <flora_id> | <taxon_id> | <taxonName> | <validity> | first = <first name> | last = <last name> | access-date = </nowiki>{{#time: j F Y}}<nowiki> }}</nowiki></code>
Positional parameters:
{{#invoke:eFloras/documentation functions|show_resources}}
; {{para|1|<var>flora_id</var>}}
: The id of the resource on eFloras.org. The list here is generated from [[Module:eFloras/data]].
: '''Sample''' (for ''Pinus''): <code>1</code>
; {{para|2|<var>taxon_id</var>}}
: The id for the taxon. Can be retrieved from Wikidata in some cases.
: '''Sample''' (for ''Pinus''): <code>10136</code>
; {{para|3|<var>name</var>}}
: The name of the taxon (don't italicize). Can be retrieved from Wikidata in some cases.
: '''Sample''' (for ''Pinus''): <code>Pinus</code>
; {{para|4|nv}}
: Indicates that the taxon is not valid. "Synonym" will be displayed after the name. (Other values are ignored.)
Named parameters:
; {{para|first}}, {{para|last}}, {{para|first1}}, {{para|last1}}, ...
: First and last names of authors of the treatment.
: '''Sample''' (for Pinus): {{para|first|Robert}}, {{para|last|Kral}}
; {{para|family}}, {{para|tribe}}
: Names of the family, or the tribe (for [[Asteraceae]]). Used to retrieve the volume number for Flora of North America and Flora of China.
; {{para|volume}}
: To supply the volume number manually instead of looking it up.
; {{para|mode|cs2}}
: Changes the citation mode to [[Help:Citation Style 2|Citation Style 2]]. The default is <code>cs1</code>, [[Help:Citation Style 1|Citation Style 1]].
; {{para|access-date}}
: As in other citation templates.
==See also==
* {{tl|eFloras/label}}, {{tl|eFloras/title}}, and {{tl|eFloras/url}}, subtemplates


<includeonly>
<includeonly>
[[Category:Templates]]
[[Category:Templates]]
</includeonly>
</includeonly>

Latest revision as of 14:01, 12 June 2022