Module:Sandbox/Jts1882/CladeN/doc: Difference between revisions

Content deleted Content added
add schematic to demonstrate the clade structure
formatting of clade strcuture illustration Technical background
 
(9 intermediate revisions by 2 users not shown)
Line 1:
{{Module rating |alphabeta<!-- Values: pre-alpha • alpha • beta • release • protected -- If a rating not needed/relevant, delete this template call -->}}
<!-- Please place categories where indicated at the bottom of this page and interwikis at Wikidata (see [[Wikipedia:Wikidata]]) -->
{{uses TemplateStyles|Template:CladeN/styles.css|Template:Clade gallery/styles.css}}
 
 
This module is designed to be used with the [[User:Jts1882/sandbox/templates/CladeN|CladeN]] template to draw phylogenetic trees or cladograms. The new template-module combination extends the feature available with the [[Template:Clade|clade]] and [[Template:Cladex|cladex]] templates. As it replicates the behaviour of the clade and cladex templates it should be suitable for replacing them.
Line 31:
 
{| class="wikitable"
! Description
! Table cell structure
! Cladogram
! Code using clade template
|-
| style="width:25%;" |<p>A simple clade structure with a single child node (or leaf).</p><p>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 {{para|label}} and {{para|sublabel}} parameters, respectively. The the cells of the righthand column are merged using the rowspan attribute.</p>
|style="padding:50px" |
{| style="line-height:100%;border:1px dotted red;margin:1px;"
|-
| style="border:1px dotted green;border-bottom:3px solid black;text-align:center;" | labelA
| rowspan=2 style="border:1px dotted green;padding:0.1em;" |
Leaf A
|-
| style="border:1px dotted green;" | sublabelA
|}
|style="padding:20px" |
{{cladeN |thickness=3
|label1=labelA
|sublabel1=sublabelA
|1=LeafA
}}
|style="padding:20px" |<pre>
{{cladeN |thickness=3
|label1=labelA
|sublabel1=sublabelA
|1=LeafA
}}</pre>
|-
| style="width:20%;" |<p>To build the cladogram, a the text in LeafA can be replaced with another clade structure.</p><p>Hence a second HTML table is placed inside a the right-hand cell of the outer table.</p>
|style="padding:50px" |
{| style="line-height:100%;border:1px dotted red;margin:1px;"
|-
Line 41 ⟶ 67:
{| class="clade" style="line-height:100%;border:1px dotted red;margin:1px;"
|-
| style="border:1px dotted green;border-bottom:3px solid black;text-align:center;" | label1
| rowspan=2 style="border:1px dotted green;vertical-align:middle;padding:0 1em;" |leaf1
|-
| style="border:1px dotted green;border-left:3px solid black;text-align:center;" | sublabel1
|-
| style="border:1px dotted green;border-bottom:3px solid black;border-left:3px solid black;text-align:center;" | label2
| rowspan=2 style="border:1px dotted green;vertical-align:middle;padding:0 1em;" |leaf2
|-
| style="border:1px dotted green;text-align:center;" | sublabel2
|}
|-
| style="border:1px soliddotted green;text-align:center;" | sublabelA
|}
|style="padding:20px" |
Line 67 ⟶ 93:
}}
}}
|style="padding:20px" |<pre>
{{cladeN |thickness=3
|label1=labelA
|sublabel1=sublabelA
|1={{cladeN |thickness=3
|label1=label1
|sublabel1=sublabel1
|1=leaf1
|label2=label2
|sublabel2=sublabel2
|2=leaf2
}}
}}</pre>
|}
 
====Add right hand labels with grouplabel====
 
 
{| class="wikitable"
! Description
! Table cell structure
! Cladogram
! Code using clade template
|-
| style="width:25%;" |
<p><span style="white-space:nowrap">Bar adds a solid line to the right</span> of the column containing the leaves.</p>
<p>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.</p>
|style="padding:50px" |
{| style="line-height:100%;border:1px dotted red;margin:1px;"
|-
| style="border:1px dotted green;border-bottom:3px solid black;text-align:center;" | labelA
| rowspan=2 style="border:1px dotted green;border-right:2px solid blue;padding:0.2em;" | Leaf&nbsp;A&nbsp;
| rowspan=2 style="border:1px dotted green;padding:0.2em;" | Grouplabel&nbsp;A
 
|-
| style="border:1px dotted green;" | sublabelA
|}
|style="padding:20px" |
{{cladeN |thickness=3
|label1=labelA
|sublabel1=sublabelA
|1=Leaf&nbsp;A&nbsp;
|bar1=blue
|grouplabel1=Grouplabel&nbsp;A
}}
|style="padding:20px" |<pre>
{{cladeN |thickness=3
|label1=labelA
|sublabel1=sublabelA
|1=Leaf&nbsp;A
|bar1=blue
|grouplabel1=Grouplabel&nbsp;A
}}</pre>
|-
| style="width:20%;" |<p>To build the cladogram, the text in LeafA can be replaced with another clade structure.</p><p>Hence a second HTML table is placed inside a the right-hand cell of the outer table.</p>
|style="padding:50px" |
{| style="line-height:100%;border:1px dotted red;margin:1px;"
|-
| style="border:1px dotted green;border-bottom:3px solid black;text-align:center;" | labelA
| rowspan=2 style="border:1px dotted green;border-right:2px solid blue; padding:0.2em;" |
{| class="clade" style="line-height:100%;border:1px dotted red;margin:1px;"
|-
| style="border:1px dotted green;border-bottom:3px solid black;text-align:center;" | label1
| rowspan=2 style="border:1px dotted green;vertical-align:middle;padding:0 1em;" |leaf1
|-
| style="border:1px dotted green;border-left:3px solid black;text-align:center;" | sublabel1
|-
| style="border:1px dotted green;border-bottom:3px solid black;border-left:3px solid black;text-align:center;" | label2
| rowspan=2 style="border:1px dotted green;vertical-align:middle;padding:0 1em;" |leaf2
|-
| style="border:1px dotted green;text-align:center;" | sublabel2
|}
| rowspan=2 style="border:1px dotted green;padding:0.2em;" | Grouplabel&nbsp;A
|-
| style="border:1px dotted green;" | sublabelA
|}
|style="padding:20px" |
{{cladeN |thickness=3
|label1=labelA |sublabel1=sublabelA
|grouplabel1=Grouplabel&nbsp;A
|bar1=blue
|1={{cladeN |thickness=3
|label1=label1
|sublabel1=sublabel1
|1=&nbsp;leaf1&nbsp;
|label2=label2
|sublabel2=sublabel2
|2=&nbsp;leaf2&nbsp;
}}
}}
|style="padding:20px" |<pre>
{{cladeN |thickness=3
|label1=labelA |sublabel1=sublabelA
|grouplabel1=Grouplabel&nbsp;A
|bar1=blue
|1={{cladeN |thickness=3
|label1=label1
|sublabel1=sublabel1
|1=leaf1&nbsp;
|label2=label2
|sublabel2=sublabel2
|2=leaf2&nbsp;
}}
}}</pre>
 
|-
| style="width:20%;" |<p>Grouplabels can be applied at any level.</p>
|style="padding:50px" |
{| style="line-height:100%;border:1px dotted red;margin:1px;"
|-
| style="border:1px dotted green;border-bottom:3px solid black;text-align:center;" | labelA
| rowspan=2 style="border:1px dotted green;border-right:2px solid blue; padding:0.2em;" |
{| class="clade" style="line-height:100%;border:1px dotted red;margin:1px;"
|-
| style="border:1px dotted green;border-bottom:3px solid black;text-align:center;" | label1
| rowspan=2 style="border:1px dotted green;vertical-align:middle;border-right:2px solid orange;padding:0 2em;" |leaf1
| rowspan=2 style="border:1px dotted green;vertical-align:middle;padding:0 2em;" |GL1
|-
| style="border:1px dotted green;border-left:3px solid black;text-align:center;" | sublabel1
|-
| style="border:1px dotted green;border-bottom:3px solid black;border-left:3px solid black;text-align:center;" | label2
| rowspan=2 style="border:1px dotted green;vertical-align:middle;border-right:2px solid purple;padding:0 2em;" |leaf2
| rowspan=2 style="border:1px dotted green;vertical-align:middle;padding:0 2em;" |GL2
|-
| style="border:1px dotted green;text-align:center;" | sublabel2
|}
| rowspan=2 style="border:1px dotted green;padding:0.2em;" | Grouplabel&nbsp;A
|-
| style="border:1px dotted green;text-align:center;" | sublabelA
|}
|style="padding:20px" |
{{cladeN |thickness=3
|label1=labelA |sublabel1=sublabelA
|grouplabel1=Grouplabel&nbsp;A
|bar1=blue
|1={{cladeN |thickness=3
|label1=label1
|sublabel1=sublabel1
|grouplabel1=GL1
|bar1=orange
|1=&nbsp;leaf1&nbsp;
|label2=label2
|sublabel2=sublabel2
|grouplabel2=GL2
|bar2=purple
|2=&nbsp;leaf2&nbsp;
}}
}}
|style="padding:20px" |<pre>
{{cladeN |thickness=3
|label1=labelA |sublabel1=sublabelA
|grouplabel1=Grouplabel&nbsp;A
|bar1=blue
|1={{cladeN |thickness=3
|label1=label1
|sublabel1=sublabel1
|grouplabel1=GL1
|bar1=orange
|1=&nbsp;leaf1&nbsp;
|label2=label2
|sublabel2=sublabel2
|grouplabel2=GL2
|bar2=purple
|2=&nbsp;leaf2&nbsp;
}}
}}</pre>
|}
 
<includeonly>{{#ifeq:{{SUBPAGENAME}}|sandbox | |