Module:Sandbox/Jts1882/CladeN/doc
This is the documentation page for Module:Sandbox/Jts1882/CladeN
![]() | This module is rated as beta, and is ready for widespread use. It is still new and should be used with some caution to ensure the results are as expected. |
![]() | This module uses TemplateStyles: |
This module is designed to be used with the CladeN template to draw phylogenetic trees or cladograms. The new template-module combination extends the feature available with the clade and cladex templates. As it replicates the behaviour of the clade and cladex templates it should be suitable for replacing them.
Additionally, the module as the code for a prototype [User:Jts1882/sandbox/templates/NewickConverter|NewickConverter] template, which converts Newick strings into clade structure. This is not to be used in wikipedia articles, but is a utility to help construct cladograms for inclusion in articles.
Usage
[mali mi di yibu sheena n-niŋ]{{#invoke:Sandbox/Jts1882/CladeN|main|style={{{style}}}}}
Examples
[mali mi di yibu sheena n-niŋ]Simple examples mimicking the clade template:
- User:Jts1882/sandbox/templates/Template:Passeroidea
- User:Jts1882/sandbox/templates/Template:Passerida
Example demonstrating more advanced features of cladeN:
Example demonstrating features available:
Demo |
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
A cladogram illustrating cladeN features. |
Technical background
[mali mi di yibu sheena n-niŋ]The clade template has many features for customising the appearance. Using them optimally requires some understanding of how the template works. The cladogram is a table and the lines of the cladogram are borders of the cells.
Description | Table cell structure | Cladogram | Code using clade template | ||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
A simple clade structure with a single child node (or leaf). This is an HTML table with two rows and two columns. The upper and lower cells in the left column hold the labels provided by |
|
|
{{cladeN |thickness=3 |label1=labelA |sublabel1=sublabelA |1=LeafA }} | ||||||||||||||||||
To build the cladogram, a the text in LeafA can be replaced with another clade structure. Hence a second HTML table is placed inside a the right-hand cell of the outer table. |
|
|
{{cladeN |thickness=3 |label1=labelA |sublabel1=sublabelA |1={{cladeN |thickness=3 |label1=label1 |sublabel1=sublabel1 |1=leaf1 |label2=label2 |sublabel2=sublabel2 |2=leaf2 }} }} |
Add right hand labels with grouplabel
[mali mi di yibu sheena n-niŋ]Description | Table cell structure | Cladogram | Code using clade template | ||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Bar adds a solid line to the right of the column containing the leaves. Group label adds an third column to the basic 2x2 clade structure. As with the leaf the two cells are merged using the rowspan attribute. |
|
|
{{cladeN |thickness=3 |label1=labelA |sublabel1=sublabelA |1=Leaf A |bar1=blue |grouplabel1=Grouplabel A }} | ||||||||||||||||||||||||
To build the cladogram, the text in LeafA can be replaced with another clade structure. Hence a second HTML table is placed inside a the right-hand cell of the outer table. |
|
|
{{cladeN |thickness=3 |label1=labelA |sublabel1=sublabelA |grouplabel1=Grouplabel A |bar1=blue |1={{cladeN |thickness=3 |label1=label1 |sublabel1=sublabel1 |1=leaf1 |label2=label2 |sublabel2=sublabel2 |2=leaf2 }} }} | ||||||||||||||||||||||||
Grouplabels can be applied at any level. |
|
|
{{cladeN |thickness=3 |label1=labelA |sublabel1=sublabelA |grouplabel1=Grouplabel A |bar1=blue |1={{cladeN |thickness=3 |label1=label1 |sublabel1=sublabel1 |grouplabel1=GL1 |bar1=orange |1= leaf1 |label2=label2 |sublabel2=sublabel2 |grouplabel2=GL2 |bar2=purple |2= leaf2 }} }} |