Jump to content

Template:Taxobox-fr/doc

Unchecked
From Wikipedia

Template Taxobox-fr is used to produce a taxobox on articles, and are scientific-classification-infoboxes for biology (animals, plants…).

It should be used on any article that describe a scientificaly described taxa, of any level. It should not be used for terms that are do not strictly apply to a taxa.

Technical information

[edit]

This template uses the function taxobox from Lua module Taxobox-fr, which in turn uses modules Taxobox-outils (various tools), Taxobox-data (mostly all texts selectors and valid values for parameters) and Taxobox-briques (basic elements for building wikitext/HTML code that generates the different parts of the taxobox. Note: in future these basic elements should be in a non-dedicated module used by several/every infoboxes).

Syntax

[edit]

The syntax of this monolytic template relies on named and unamed parameters. There are very few editorial named parameters (most of them are just used to control to output).

Named parameters

[edit]
  • règne: the regnum of the described taxa. It means that regnum is not given anymore in the rest of the taxobox template
  • nv (or nom vernaculaire): the vernacular name(s). Optional. Used for subtitle stuff.

Named parameters that control output (bold is default one):

  • titre: oui, non, auto. Always, never, or depending on article namespace modify title typography if needed.
  • sous-titre: oui, non, auto. Always, never, or depending on article namespace add the subtitle if needed.
  • erreurs: oui, non, auto. Always, never, or depending on article namespace display errors (if any) in a dedicated box.
  • catégories: en ligne, boîte, non, auto. Inline, in box, never or depending on article namespace insert information categories.
  • catégories erreurs: en ligne, boîte, non, auto. Inline, in box, never or depending on article namespace insert errors categories.

Debug named parameters, dedicated to developpers only:

  • debug: oui, non. Add (or not) debug messages in output. Don't do anything at this time.
  • raw: oui, non. Print (or not) the taxobox result in raw (not wikified) format.

Unamed parameters

[edit]

After named parameters all the taxobox content is described with unamed parameters.
The description is compouned by a set of parameters (in the order they are given) starting with a valid keyword − which describe the kind of element to add − followed by its parameters, ended by a newline (note: this point may/will change).
The keywords correspond (mostly) to the template names of current taxobox, followed by the same parameters, in the same order. The main differences are:

  • keyword is more simple as "taxobox" is not present. Example: {{Taxobox taxon}} → taxon.
  • the name for {{Taxobox}} is different (as it would be empty): rang.
  • the "début" don't need to give the taxobox title, as it is automatically extracted from taxobox content (the described taxa).
  • the regnum parameter is no more present in parameters (appart for the named parameter règne).
  • named parameters present in current taxobox templates are managed in a different way:
    • named parameters that are "yes/no": only give the parameter name. Example: {{Taxobox | genre | Uroplatus | ancien=oui}} becomes |rang | genre | Uroplatus | ancien.
    • named parameters that has a value: the "=" becomes a "|" (a separated parameter). Example: {{Taxobox début | animal | ''Uroplatus guentheri'' | Uroplatus guentheri male.jpg | ''Uroplatus guentheri'' mâle|classification=ReptileDB }} becomes |début | Uroplatus guentheri male.jpg | Uroplatus guentheri mâle | classification | ReptileDB.

Complete list of keywords and their associated syntax. Each line contains: the keyword; then the list of "unamed" parameters, in the order they are used; then the list of "flag" parameters, with just the name of the flag, which is present or not, wherever it appears; then the list of named parameters which must be given in the form "|named-parameter|value", wherever it appears. Each kind of elements can be empty.
Please see later for the detailed explanation of each line or the role of parameters.

  • début
    • unamed: image, légende
    • flags: phylo
    • named: classification
  • taxon
    • unamed: rang, nom, auteur
    • flags: titre, sans auteur
    • named: obsolète
  • rang
    • unamed: rang, nom, lien
    • flags: ancien
    • named:
  • fin
    • unamed:
    • flags:
    • named:
  • uicn
    • unamed: risque, critère, lien
    • flags:
    • named:
  • cites
    • unamed: annexe, date, précision
    • flags:
    • named:
  • synonymes
    • unamed: synonymes
    • flags:
    • named:
  • taxons
    • unamed: texte, texte2
    • flags:
    • named:
  • parents
    • unamed: sexe1, taxon1, sexe2, taxon2
    • flags:
    • named:
  • image
    • unamed: image, légende
    • flags: séparateur
    • named:
  • répartition
    • unamed: image, légende, taille
    • flags: séparateur
    • named:
  • légende répartition
    • unamed: légende
    • flags:
    • named:
  • conflit
    • unamed: rang, nom1, site1, nom2, site2, nom3, site3
    • flags:
    • named:
  • phylogénie bandeau
    • unamed: image
    • flags:
    • named: classification, image
  • phylogénie inexistant
    • unamed: classification
    • flags:
    • named:
  • position
    • unamed: arbre, frère
    • flags:
    • named:

Description of each keyword

[edit]

début

[edit]

Must be the first line. Describes the main header.

    • unamed: image, légende : all optional. The image and its legend, if any. Legend not printed if no image is given.
    • flags: phylo : if present, means that this taxa does not exists in classical classification, so "début" must not be followed by a classification.
    • named: classification : the classification followed in the taxobox/article. Optional.

taxon

[edit]

Describe the taxa of the taxobox. Can be present more than one time (in case of monotypic taxa).

    • unamed: rang, nom, auteur : the level, name and author+date. The two first are mandatory. If the last is omited a "author missing" is inserted.
    • flags: titre, sans auteur : titre is used to indicate that this taxa should be considered as the article subject. This should not occurs (by default the last given taxa is used). sans auteur allow not to print the "author missing" stuff if no author is given.
    • named: obsolète : means that the current taxa is obsolete. It must contains the name of the new taxa that replaces the old one.

rang

[edit]

Used to add a line of classification.

    • unamed: rang, nom, lien : the two first are mandatory (the level and the name of the corresp. taxa in higher classification). The last one can be used if "nom" is an homonymy. In this case link will be with the form [[lien|nom]].
    • flags: ancien : the classification line is printed striked. Indicates that this entry is no more valid.
    • named:

fin

[edit]

Terminates a taxobox. No parameter. Not mandatory: the module closes the taxobox when it reach the end of the description.

    • unamed:
    • flags:
    • named:

uicn

[edit]

Used to describe IUCN status of the taxa (species).

    • unamed: risque, critère, lien : "risque" is the IUCN code (VU, EN, DD, LC…). Other are not mandatory. "critère" is the criteria used by IUCN.
    • flags:
    • named:

cites

[edit]

Used to describe CITES annexe for this taxa.

    • unamed: annexe, date, précision : "annexe" is mandatory and should be I, II or III. "date" is the associated date and "précision" a precision (such as for which country or for which subspecies). The two last are not mandatory.
    • flags:
    • named:

synonymes

[edit]

Describes the known synonyms for this taxa.

    • unamed: synonymes : the list of synonyms. Most of the time a doted list of scientific names + author + date. Mandatory.
    • flags:
    • named:

taxons

[edit]

Used to give the lower taxa of the described taxa.

    • unamed: texte, texte2 : if non given just prints "Voir texte" (see text). If only "texte" is given print its content. If both are given the first one describes the level of the lower taxa, and the second becomes the printed content.
    • flags:
    • named:

parents

[edit]

Used to describe parents in case of an hybrid (do not use with other kind of taxa).

    • unamed: sexe1, taxon1, sexe2, taxon2 : all mandatory. Sex and name of first parent, sex and name of second parent. If sex is not relevant use "A" and "B".
    • flags:
    • named:

image

[edit]

Used to insert an image with optional legend in the taxobox.

    • unamed: image, légende : the image (mandatory) and the legend (optional).
    • flags: séparateur : if present a small horizontal separation line is printed before the image.
    • named:

répartition

[edit]

Used to add a distribution image of the taxa.

    • unamed: image, légende, taille : image (mandatory), legend (optional), and image size (do not use!)
    • flags: séparateur : if present a small horizontal separation line is printed before the image.
    • named:

légende répartition

[edit]

Just insert an additional legend.

    • unamed: légende : the legend to print (mandatory)
    • flags:
    • named:

conflit

[edit]

Mostly the same role than rang keyword.

    • unamed: rang, nom1, site1, nom2, site2, nom3, site3 : to be described…
    • flags:
    • named:

phylogénie bandeau

[edit]

Used to start a phylogenetic classification. Mostly the same behavior than début.

    • unamed: image : optional. Used to add a picture of the phylogenetic classification (not for a taxa image!)
    • flags:
    • named: classification, image : the first is the followed classification (optional) and the second ???

phylogénie inexistant

[edit]

Used in place of previous one, to indicate that this taxa does not exists in phylogenetic classification.

    • unamed: classification : the followed classification (optional)
    • flags:
    • named:

position

[edit]

???

    • unamed: arbre, frère
    • flags:
    • named:

Taxobox behavior

[edit]

The taxobox module creates the elements following the description given using the parameters.
It also handle some other features that are not explicitly described, in particular:

  • modifying article title by adding italics when needed
  • adding a subtitle with the vernacular names (if any) when titled by scientific name and vis-versa
  • adding various information categories (article without image, IUCN status, …)
  • adding various error categories (in case of syntax/usage/structure non-fatal errors)
  • adding an error box in case of fatal error (i.e. no regnum given)
  • adding errors description
  • handling categories, error categories and error descriptions inline, in box or not at all depending of user choice or (default) depending on the namespace of the article
  • handling structural coherence, when the free-syntax is used in a bad way

The default behavior make a difference beetween articles and other pages (docs, templates, help, talkpages…).
By default information and errors categories are categories for articles, and are displayed in separated boxes in other namespaces.
By default error descriptions are not printed for articles and are displayed in a separated box in other namespaces.
By default title typography is modified only for articles.
By default subtitles are added only for articles.
All these behaviors can be modified by module options.

Examples

[edit]

Comparison beetween current and new taxobox

[edit]
Format « taxobox-module »Format « taxobox-fr »
{{Hexasoft-test | règne=algue | nv=Haptophytes
|début|image.png | légende | classification|AlgaeBASE
|rang | sous-règne | Hacrobia
|taxon | embranchement | Haptophyta | <auteurs>, <date>
| taxons |
* classe ''[[Pavlovophyceae]]''
** ordre ''[[Pavlovales]]''
* classe ''[[Prymnesiophyceae]]'' Hibberd, 1976
** ordre ''[[Prymnesiales]]''
** ordre ''[[Phaeocystales]]''
** ordre ''[[coccolithophore|Isochrysidales]]''
** ordre ''[[coccolithophore|Coccolithales]]''
|position | {{Phylogénie Eukaryota}} | Cryptophyta
|fin }}
{{Taxobox début | algue | image.png | légende | classification=AlgaeBASE }}
{{Taxobox | sous-règne | Hacrobia }}
{{Taxobox taxon | algue | embranchement | Haptophyta | <auteurs>, <date> }}
{{Taxobox taxons |
* classe ''[[Pavlovophyceae]]''
** ordre ''[[Pavlovales]]''
* classe ''[[Prymnesiophyceae]]'' Hibberd, 1976
** ordre ''[[Prymnesiales]]''
** ordre ''[[Phaeocystales]]''
** ordre ''[[coccolithophore|Isochrysidales]]''
** ordre ''[[coccolithophore|Coccolithales]]''
}}
{{Taxobox position | {{Phylogénie Eukaryota}} | Cryptophyta }}
{{Taxobox fin}}

A small taxobox

[edit]
{{Taxobox-fr
|règne=animal
|nv=Uroplate
|début |Uroplatus guentheri male.jpg | ''Uroplatus guentheri'' mâle|classification|ReptileDB
|rang|embranchement|Chordata
|rang|Classe|Reptilia
|rang|Sous-classe|Lepidosauria
|rang|Ordre|Squamata
|rang|Infra-ordre|Gekkota
|rang|Famille|Gekkonidae
|rang|Genre|Uroplatus
|taxon | espèce | Uroplatus fimbriatus | [[François Mocquard|Mocquard]], [[1908]]
|fin
}}

A (mostly) complete taxobox

[edit]

Note: this taxobox does not make sense, its content is invented or copied from other species.

{{Taxobox-fr
|règne=animal
|debug=oui
|erreurs=oui
|catégories=boîte
|catégories erreurs=boîte
|nv=Uroplate
|début |Uroplatus guentheri male.jpg | ''Uroplatus guentheri'' mâle|classification|ReptileDB
|rang|embranchement|Chordata
|rang|Classe|Reptilia
|rang|Sous-classe|Lepidosauria
|rang|Ordre|Squamatii|ancien
|conflit|Ordre|Squamata
|conflit|Ordre|Squamata|ReptileDB
|conflit|Sous-ordre|Sauria|ReptileDB|Saurii|ITIS|Saurie|NCBI
|rang|Infra-ordre|Gekkota
|rang|Famille|Gekkonidae|Gecko
|rang|Genre|Uroplatus
|taxon | espèce | Uroplati guentherii | [[François Mocquard|Mocquard]], [[1908]] | obsolète|
|taxon | espèce | Uroplati guentherii | [[François Mocquard|Mocquard]], [[1908]] | obsolète|Uroplatus guentheri
|taxon | espèce | Uroplatus fimbriatus | [[François Mocquard|Mocquard]], [[1908]] | titre
|taxon | espèce | Uroplatus fimbriatuse | [[François Mocquard|Mocquard]], [[1908]]
|synonymes | * ''Turlu tutu'' <small>Chapeau Pointu</small>
|taxons | Plein
|uicn | LC | 1Ab12-coulé | chez moi
|uicn | VU | 1Ab12-coulé | ailleurs
|taxons | Sous-espèces | Plein
|répartition | Agelaius phoeniceus.svg|bleu: zone de nidification<br /> vert: présent toute l'année<br /> ocre: non-nicheur
|répartition légende | ''[[Coffea arabica]]'' (arabica) |c4666b
|répartition légende | « arabica » '''et''' « robusta » |9b7066
|répartition légende | ''[[Coffea canephora]]'' (robusta) |877563
|cites | II | 22-10-87
|cites | III | 1998 | (Turquie)
|image | Uroplatus guentheri juvenile.jpg | | séparateur
|image | Uroplatus guentheri juvenile.jpg | Un juvénile
|légende | Et une autre légende…
|taxons
|phylogénie inexistant
|phylogénie inexistant | ReptileDB
|fin
}}

Templates from fr:

[edit]

This part describes the correspondance beetween current taxobox templates and the associated keyword in taxobox-module. Note that keywords are case-insensitive.

Technical informations

[edit]

Module:Taxobox-data

[edit]

This module contains all the "data" for taxobox. It includes list of classifications (and the corresponding links), some categories text, typographic conventions followed by regnum, …

Module:Taxobox-briques

[edit]

This module contains basic functions that creates part of a "box" (opening, closing, adding a subsection, starting a data table…).

Module:Taxobox-outils

[edit]

Contains the functions that treat the different keywords and there result. Also contains some generic-purpose functions.

Module:Taxobox-fr

[edit]

The main module.

How do I…

[edit]

Add a new regnum, a new classification, or modify a link?

[edit]

Mostly all the text elements are in Module:Taxobox-data. Look in this module to find the element you want to modify or the list of elements in which you want to add something.
Example: to insert a new classification search the definitions after "local classifications = {}", which contain all the corresponding data. You just have to duplicate one line and to:

  • replace the selector name by your name (in lowercase, uppercases are ignored for keywords)
  • replace the text/link by the correct target (in wikitext format)

Modify the result of a taxobox element?

[edit]

You have to modify the code used for this element. Each element is in a dedicated function into Module:Taxobox-outils. Functions has a name closely-related to the keyword of the element.
When you find the function you can modify its behavior by changing the code and/or the texts.
Note that parameters from the element line are all stored in the local parameter params.

Add a new parameter to an existing element?

[edit]

In this case you have to change the element line syntax. All the syntax are in Module:Taxobox-data (at the begining), in variables named tools.df_<keyword>.
Note that the syntax of these variables is not obvious. See dedicated section later (not written yet).
When you added your new parameter you just have to modify the function that handle this element (see previous section) to use this new parameter (remember: the new parameter will be visible in the local params table).

Change the default behavior of taxobox?

[edit]

All controlable parts of the taxobox has its default values stored in Module:Taxobox-data. Check tools.defauts.xxx variables and modify them if needed.

Add a new element in taxobox?

[edit]

This is a little more complicated. You have to create all the associated elements:

  • the element line format (in Taxobox-data)
  • add a function in Taxobox-outils to handle this element (see other functions)
  • add this element in call table (at the end of Taxobox-outils), with an associated keyword, the line format and the function to handle it.
  • if needed have a look to Taxobox-fr in function z.traite_ligne(ligne). A part of this section is dedicated for checking the coherence of the current taxobox. You may want to add "structural sanity check" (example: if current element is not a classification level line but previous was this function closes the HTML table used for that part).