Difference between revisions of "Template:Clade/doc/common"

From blackwiki
Jump to navigation Jump to search
imported>Anomalocaris
m (<code>...<code> → <code>...</code>)
imported>Peter coxhead
(update for merge of templates)
Line 1: Line 1:
 
<includeonly>==Basic features==
 
<includeonly>==Basic features==
  
<!--  ===== FOR cladex ONLY:
 
 
-->{{#ifeq:{{{1|}}}|cladex|'''Use {{tlf|Clade}} unless the extra features of {{tlf|Cladex}} are needed.'''
 
}}<!-- ===== END OF FOR cladex ONLY-->
 
 
===Usage===
 
===Usage===
  
Line 138: Line 134:
  
 
-->{{#ifeq:{{{1|}}}|cladex|
 
-->{{#ifeq:{{{1|}}}|cladex|
'''{{tlf|Cladex}} only.''' To replace a single line leading to the ''N''th child by a double line, use <code>{{!}}stateN=double</code>.  Notice that {{tlf|Cladex}} has only been used for the (sub)clade where the double line is wanted. The outermost clade should always be specified with {{tlf|Clade}} unless its style is altered — see further.
+
To replace a single line leading to the ''N''th child by a double line, use <code>{{!}}stateN=double</code>.
 
<pre>
 
<pre>
 
<nowiki>
 
<nowiki>
 
{{clade
 
{{clade
 
|1={{clade
 
|1={{clade
   |1={{cladex
+
   |1={{clade
 
       |1=Leaf1
 
       |1=Leaf1
 
       |2=Leaf2|state2=double
 
       |2=Leaf2|state2=double
Line 156: Line 152:
 
{{clade
 
{{clade
 
|1={{clade
 
|1={{clade
   |1={{cladex
+
   |1={{clade
 
       |1=Leaf1
 
       |1=Leaf1
 
       |2=Leaf2|state2=double
 
       |2=Leaf2|state2=double
Line 354: Line 350:
 
==Bracketting nodes==
 
==Bracketting nodes==
  
'''{{tlf|Cladex}} only.''' To insert a coloured 'bracket' around a set of leaf nodes which follow one another in the generated cladogram:
+
To insert a coloured 'bracket' around a set of leaf nodes which follow one another in the generated cladogram:
 
* Add <code>barbeginN=''colour''</code> for the first leaf node, where N is the order of that leaf node within its clade, and ''colour'' is the required colour.
 
* Add <code>barbeginN=''colour''</code> for the first leaf node, where N is the order of that leaf node within its clade, and ''colour'' is the required colour.
 
* Add <code>barN=''colour''</code> for the remaining nodes other than the last (note that N must be the order of that node within its clade).
 
* Add <code>barN=''colour''</code> for the remaining nodes other than the last (note that N must be the order of that node within its clade).
 
* Add <code>barendN=''colour''</code> for the last node.
 
* Add <code>barendN=''colour''</code> for the last node.
  
Either the outermost clade must be specified by {{tlf|Clade}} or if {{tlf|Cladex}} is needed there, <code>{{!}}style=width:auto</code> must be present.
+
<code>{{!}}style=width:auto</code> must be present.
  
 
<pre>
 
<pre>
 
<nowiki>
 
<nowiki>
 
{{clade|style=font-size:85%;line-height:100%;
 
{{clade|style=font-size:85%;line-height:100%;
|1={{cladex
+
|1={{clade
 
   |1=Leaf A
 
   |1=Leaf A
 
   |2=Leaf B|barbegin2=green
 
   |2=Leaf B|barbegin2=green
 
   |3=Leaf C|bar3=green
 
   |3=Leaf C|bar3=green
   |4={{cladex
+
   |4={{clade
 
       |1=Leaf D|barend1=green
 
       |1=Leaf D|barend1=green
 
       |2=Leaf E
 
       |2=Leaf E
 
       |3=Leaf F|barbegin3=purple
 
       |3=Leaf F|barbegin3=purple
       |4={{cladex
+
       |4={{clade
 
         |1=Leaf G|bar1=purple
 
         |1=Leaf G|bar1=purple
 
         |2=Leaf H|barend2=purple
 
         |2=Leaf H|barend2=purple
Line 384: Line 380:
 
produces
 
produces
 
{{clade|style=font-size:85%;line-height:100%;
 
{{clade|style=font-size:85%;line-height:100%;
|1={{cladex
+
|1={{clade
 
   |1=Leaf A
 
   |1=Leaf A
 
   |2=Leaf B|barbegin2=green
 
   |2=Leaf B|barbegin2=green
 
   |3=Leaf C|bar3=green
 
   |3=Leaf C|bar3=green
   |4={{cladex
+
   |4={{clade
 
       |1=Leaf D|barend1=green
 
       |1=Leaf D|barend1=green
 
       |2=Leaf E
 
       |2=Leaf E
 
       |3=Leaf F|barbegin3=purple
 
       |3=Leaf F|barbegin3=purple
       |4={{cladex
+
       |4={{clade
 
         |1=Leaf G|bar1=purple
 
         |1=Leaf G|bar1=purple
 
         |2=Leaf H|barend2=purple
 
         |2=Leaf H|barend2=purple
Line 400: Line 396:
 
}}
 
}}
  
The horizontal lines can be omitted by using <code>{{!}}barN=''colour''</code> throughout. Thus the following (note the use of <code>{{!}}style=width:auto</code> since the outermost clade uses the extra features of {{tlf|Cladex}}):
+
The horizontal lines can be omitted by using <code>{{!}}barN=''colour''</code> throughout. Thus the following (note the use of <code>{{!}}style=width:auto</code>):
  
 
<pre>
 
<pre>
 
<nowiki>
 
<nowiki>
{{cladex|style=width:auto;font-size:85%;line-height:100%;
+
{{clade|style=width:auto;font-size:85%;line-height:100%;
 
|1=Leaf A
 
|1=Leaf A
|2={{cladex
+
|2={{clade
 
   |1=Leaf B|bar1=midnightblue
 
   |1=Leaf B|bar1=midnightblue
 
   |2=Leaf C|bar2=midnightblue
 
   |2=Leaf C|bar2=midnightblue
Line 415: Line 411:
  
 
produces
 
produces
{{cladex|style=width:auto;font-size:85%;line-height:100%;
+
{{clade|style=width:auto;font-size:85%;line-height:100%;
 
|1=Leaf A
 
|1=Leaf A
|2={{cladex
+
|2={{clade
 
   |1=Leaf B|bar1=midnightblue
 
   |1=Leaf B|bar1=midnightblue
 
   |2=Leaf C|bar2=midnightblue
 
   |2=Leaf C|bar2=midnightblue
Line 428: Line 424:
 
<pre>
 
<pre>
 
<nowiki>
 
<nowiki>
{{cladex|style=width:auto;font-size:85%;line-height:100%;
+
{{clade|style=width:auto;font-size:85%;line-height:100%;
 
|1=Leaf A
 
|1=Leaf A
 
|bar2=midnightblue
 
|bar2=midnightblue
|2={{cladex
+
|2={{clade
 
   |1=Leaf B
 
   |1=Leaf B
 
   |2=Leaf C
 
   |2=Leaf C
Line 454: Line 450:
 
* You understand the numbering system for the parameters <code>barN</code>, etc. The N must be the same as the number of the child within its clade. Thus typically you should write <code>{{!}}N=''label for leaf''{{!}}barN=''colour for bar''</code>, e.g. <code>{{!}}2=<nowiki>[[Passeridae]]</nowiki>{{!}}bar2=midnightblue</code>.
 
* You understand the numbering system for the parameters <code>barN</code>, etc. The N must be the same as the number of the child within its clade. Thus typically you should write <code>{{!}}N=''label for leaf''{{!}}barN=''colour for bar''</code>, e.g. <code>{{!}}2=<nowiki>[[Passeridae]]</nowiki>{{!}}bar2=midnightblue</code>.
 
* You have only attempted to apply brackets/bars to ''leaf'' nodes.
 
* You have only attempted to apply brackets/bars to ''leaf'' nodes.
* Either the outermost clade uses {{tlf|Clade}} or if it has to use {{tlf|Cladex}}, then <code>{{!}}style=width:auto</code> is present.
+
<!--
}}<!--
 
 
       ===== END OF FOR cladex ONLY-->
 
       ===== END OF FOR cladex ONLY-->
  
Line 482: Line 477:
 
There are limitations on the size and complexity of the cladograms which can be drawn:
 
There are limitations on the size and complexity of the cladograms which can be drawn:
 
* A maximum of 17 children is allowed per node. It may seem that this could easily be increased by editing the template, but see the next point.
 
* A maximum of 17 children is allowed per node. It may seem that this could easily be increased by editing the template, but see the next point.
* Cladograms can only be expanded up to a certain level of complexity because the MediaWiki software limits the resources available for template expansion. The cladogram at [[APG III system#Phylogeny]] has had to be broken into three parts, because the entire cladogram exhausts the allowed resources (in this case the allowed expansion depth). ''Any change to the template could result in large cladograms failing to display correctly.'' In general, don't exceed a depth of 19, i.e. don't nest one {{#ifeq:{{{1|}}}|cladex|cladex|clade}} template inside another more than 19 times.
 
  
 
===Inclusion in books===
 
===Inclusion in books===
 
There are many known bugs in rendering tables in the software which produces [[Help:Books|Wikipedia books]]; see the [//meta.wikimedia.org/wiki/Book_tool/Feedback book tool feedback page]. {{as of|2011|July|}} these result in the lines in cladograms not displaying in books.</includeonly><noinclude>
 
There are many known bugs in rendering tables in the software which produces [[Help:Books|Wikipedia books]]; see the [//meta.wikimedia.org/wiki/Book_tool/Feedback book tool feedback page]. {{as of|2011|July|}} these result in the lines in cladograms not displaying in books.</includeonly><noinclude>
 
{{doc|content=
 
{{doc|content=
This is the common part of the documentation for the two templates {{tl|Clade}} and {{tl|Cladex}}.
+
This is the common part of the documentation for what used to be two templates {{tl|Clade}} and {{tl|Cladex}}, and needs to be replaced. For now, set the first parameter to "cladex" to select the full version.
Set the first parameter to "clade" or "cladex" to select which version is shown.
 
 
}}
 
}}
 
</noinclude>
 
</noinclude>

Revision as of 07:26, 1 August 2018

50px Template documentation

This is the common part of the documentation for what used to be two templates {{Clade}} and {{Cladex}}, and needs to be replaced. For now, set the first parameter to "cladex" to select the full version.