Template:Clade/doc: Difference between revisions
Jump to navigation
Jump to search
Rational Wiki>SusanG (New page: ==How to use the template== This template is used for illustrating branching trees with the nodes and base labels being clickable links. They are especially suited to represent evolutiona...) |
m (6 revisions imported) |
||
(6 intermediate revisions by 4 users not shown) | |||
Line 6: | Line 6: | ||
<nowiki> | <nowiki> | ||
{{clade | {{clade | ||
|label1=Base | |label1=Base | ||
|1=Node | |1=Node | ||
}} | }} | ||
</nowiki> | </nowiki> | ||
</pre> | </pre> | ||
produces | produces: | ||
{{clade | {{clade | ||
|label1=Base | |label1=Base | ||
|1=Node | |1=Node | ||
}} | }} | ||
---- | |||
<pre> | <pre> | ||
<nowiki> | <nowiki> | ||
{{clade | {{clade | ||
|1={{clade | |1={{clade | ||
|label1=[[Subtree1]] | |||
|1=Leaf1 | |||
|label2=Subtree2 | |||
|2=[[Leaf2]] | |||
}} | |||
}} | }} | ||
</nowiki> | </nowiki> | ||
</pre> | </pre> | ||
produces | produces: | ||
{{clade | {{clade | ||
|1={{clade | |1={{clade | ||
|label1={{r|Subtree1}} | |||
|1=Leaf1 | |||
|label2=Subtree2 | |||
|2={{r|Leaf2}} | |||
}} | |||
}} | }} | ||
---- | |||
<pre> | <pre> | ||
<nowiki> | <nowiki> | ||
{{clade| style=font-size:75%;line-height:75% | {{clade| style=font-size:75%;line-height:75% | ||
|1={{clade | |1={{clade | ||
|label1=Subtree1 | |||
|1=Leaf1 | |||
|label2=Subtree2 | |||
|2=Leaf2 | |||
}} | |||
}} | }} | ||
</nowiki> | </nowiki> | ||
</pre> | </pre> | ||
produces | produces: | ||
{{clade| style=font-size:75%;line-height:75% | {{clade| style=font-size:75%;line-height:75% | ||
|1={{clade | |1={{clade | ||
|label1=Subtree1 | |||
|1=Leaf1 | |||
|label2=Subtree2 | |||
|2=Leaf2 | |||
}} | |||
}} | }} | ||
---- | |||
<pre> | <pre> | ||
<nowiki> | <nowiki> | ||
{{clade | {{clade | ||
|1={{clade | |1={{clade | ||
|1={{clade | thickness=3 | |||
|1=Leaf1 | |||
|2=Leaf2 | |||
}} | |||
|2=Leaf3 | |||
}} | |||
}} | }} | ||
</nowiki> | </nowiki> | ||
Line 93: | Line 93: | ||
}} | }} | ||
==Editing | ==Editing tips== | ||
An easy way of creating larger cladograms is to use the Newick format and proceed to edit it using a suitable text editor to produce the markup. | *To create these "larger spaces" (indentations), you can press <code>Tab</code> — however unfortunate, many browsers already linked <code>Tab</code> to some other function. If that is the case, you can use (for Windows): <code>Alt</code> + <code>0</code> + <code>9</code>; the numbers are on numpad (the right side numbers), release the <code>Alt</code> key when you pressed <code>9</code>. | ||
*An easy way of creating larger cladograms is to use the [https://evolution.genetics.washington.edu/phylip/newicktree.html Newick format] and proceed to edit it using a suitable text editor to produce the markup. | |||
# Start with Newick format ((a,b),(c,d)) | :#Start with Newick format ((a,b),(c,d)) | ||
# Replace "(" with <nowiki>"{{clade|"</nowiki> | :# Replace "(" with <nowiki>"{{clade|"</nowiki> | ||
# Replace ")" with <nowiki>"}}"</nowiki> | :# Replace ")" with <nowiki>"}}"</nowiki> | ||
# Edit to replace commas with pipes and numbers | :# Edit to replace commas with pipes and numbers | ||
# Edit clade labels if needed | :# Edit clade labels if needed | ||
<pre> | <pre> | ||
<nowiki> | <nowiki> | ||
{{clade | {{clade | ||
|1={{clade | |||
|1=a | |||
|2=b | |||
}} | |||
|2={{clade | |||
|1=c | |||
|2=d | |||
}} | |||
}} | }} | ||
</nowiki> | </nowiki> | ||
</pre> | </pre> | ||
==Using a box== | ==Using a box== | ||
You can nest the templates and use links around the text. You may use non-breaking spaces (&nbsp;) to obtain spaces or to have labels that have spaces. | You can nest the templates and use links around the text. You may use non-breaking spaces (<code>&nbsp;</code>) to obtain spaces or to have labels that have spaces. | ||
The entire cladogram can be placed in a box so that text flows nicely around it. | The entire cladogram can be placed in a box so that text flows nicely around it. Enclose within <code><nowiki> | ||
{{userboxtop| toptext=&nbsp;}} | {{userboxtop| toptext=&nbsp;}} | ||
{{userboxbottom}} | {{userboxbottom}} | ||
</nowiki> | </nowiki></code> | ||
{{userboxtop| toptext= }} | {{userboxtop| toptext= }} | ||
{{clade| style=font-size:75%;line-height:75% | {{clade| style=font-size:75%;line-height:75% | ||
|label1= | |label1={{r|Neornithes}} | ||
|1={{clade | |1={{clade | ||
|label1= | |label1={{r|Paleognathae}} | ||
|1= | |1= | ||
|label2= | |label2= {{r|Neognathae}} | ||
|2={{clade | |2={{clade | ||
|1=Other birds | |1=Other birds | ||
|label1= | |label1= | ||
|label2= | |label2={{r|Galloanserae}} | ||
|2={{clade | |2={{clade | ||
|1= | |1={{r|Anseriformes}} | ||
|label2= | |label2= | ||
|2={{clade | |2={{clade | ||
|1= | |1={{r|Galliformes}} | ||
|2= | |2={{r|Craciformes}} | ||
}} | }} | ||
}} | }} | ||
Line 145: | Line 145: | ||
}} | }} | ||
}} | }} | ||
<center><small>Sample of a hack that | <center><small>Sample of a hack that uses {{tl|Userboxtop}}</small></center> | ||
{{userboxbottom}} | {{userboxbottom}} | ||
Code: | |||
<pre><nowiki>{{userboxtop| toptext= }} | |||
{{clade| style=font-size:75%;line-height:75% | |||
|label1={{r|Neornithes}} | |||
|1={{clade | |||
|label1={{r|Paleognathae}} | |||
|1= | |||
|label2= {{r|Neognathae}} | |||
|2={{clade | |||
|1=Other birds | |||
|label1= | |||
|label2={{r|Galloanserae}} | |||
|2={{clade | |||
|1={{r|Anseriformes}} | |||
|label2= | |||
|2={{clade | |||
|1={{r|Galliformes}} | |||
|2={{r|Craciformes}} | |||
}} | |||
}} | |||
}} | |||
}} | |||
}} | |||
<center><small>Sample of a hack that uses {{tl|Userboxtop}}</small></center> | |||
{{userboxbottom}}</nowiki></pre> |
Latest revision as of 09:50, December 14, 2023
How to use the template[edit source]
This template is used for illustrating branching trees with the nodes and base labels being clickable links. They are especially suited to represent evolutionary trees.
{{clade |label1=Base |1=Node }}
produces:
Base |
Node |
{{clade |1={{clade |label1=[[Subtree1]] |1=Leaf1 |label2=Subtree2 |2=[[Leaf2]] }} }}
produces:
| |||||||
{{clade| style=font-size:75%;line-height:75% |1={{clade |label1=Subtree1 |1=Leaf1 |label2=Subtree2 |2=Leaf2 }} }}
produces:
| |||||||
{{clade |1={{clade |1={{clade | thickness=3 |1=Leaf1 |2=Leaf2 }} |2=Leaf3 }} }}
produces
| |||||||||||||
Editing tips[edit source]
- To create these "larger spaces" (indentations), you can press
Tab
— however unfortunate, many browsers already linkedTab
to some other function. If that is the case, you can use (for Windows):Alt
+0
+9
; the numbers are on numpad (the right side numbers), release theAlt
key when you pressed9
. - An easy way of creating larger cladograms is to use the Newick format and proceed to edit it using a suitable text editor to produce the markup.
- Start with Newick format ((a,b),(c,d))
- Replace "(" with "{{clade|"
- Replace ")" with "}}"
- Edit to replace commas with pipes and numbers
- Edit clade labels if needed
{{clade |1={{clade |1=a |2=b }} |2={{clade |1=c |2=d }} }}
Using a box[edit source]
You can nest the templates and use links around the text. You may use non-breaking spaces (
) to obtain spaces or to have labels that have spaces.
The entire cladogram can be placed in a box so that text flows nicely around it. Enclose within
{{userboxtop| toptext= }}
{{userboxbottom}}
{{Userboxtop}} |
Code:
{{userboxtop| toptext= }} {{clade| style=font-size:75%;line-height:75% |label1={{r|Neornithes}} |1={{clade |label1={{r|Paleognathae}} |1= |label2= {{r|Neognathae}} |2={{clade |1=Other birds |label1= |label2={{r|Galloanserae}} |2={{clade |1={{r|Anseriformes}} |label2= |2={{clade |1={{r|Galliformes}} |2={{r|Craciformes}} }} }} }} }} }} <center><small>Sample of a hack that uses {{tl|Userboxtop}}</small></center> {{userboxbottom}}