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

From blackwiki
Jump to navigation Jump to search
imported>Peter coxhead
imported>Jts1882
(create styling section for branches and brackets →‎Usage)
Line 83: Line 83:
 
}}
 
}}
  
<pre>
+
 
 +
===Styling brackets and branches===
 +
 
 +
{| class="wikitable"
 +
!Description
 +
!Template code
 +
!Resulting output
 +
|-
 +
| style="width:25%;vertical-align:top;" | '''Styling brackets'''
 +
 
 +
The thickness, colour and state (solid, dashed, etc) of bracket lines can be changed using the <code>thickness=</code>, <code>|color=</code> and <code>|state=</code> parameters.
 +
 
 +
|<pre>
 
<nowiki>
 
<nowiki>
 
{{clade
 
{{clade
|1={{clade
+
  |label1=Bracket styling
  |1={{clade | thickness=3
+
  |sublabel1=(no suffix)
       |1=Leaf1
+
  |style1x=background-color:#ffffee;
      |2=Leaf2
+
  |1={{Clade
 +
      |label2=color
 +
      |2={{Clade |color=red
 +
        |1=A
 +
        |2=B               
 +
        |3=C           
 +
        }}
 +
      |label1=thickness
 +
      |1={{Clade |thickness=3
 +
          |1=I 
 +
          |2=J         
 +
          |3=K           
 +
          }}
 +
       |label3=state
 +
      |3={{Clade |state=dashed
 +
        |1=X
 +
        |2=Y       
 +
        |3=Z       
 +
 +
        }}
 
       }}
 
       }}
  |2=Leaf3
+
}}
  }}
+
 
}}</nowiki>
+
</nowiki>
 
</pre>
 
</pre>
  
produces
+
|
 
{{clade
 
{{clade
|1={{clade
+
  |label1=Bracket styling
  |1={{clade | thickness=3
+
  |sublabel1=(no suffix)
       |1=Leaf1
+
  |style1x=background-color:#ffffee;
      |2=Leaf2
+
  |1={{Clade
 +
      |label2=color
 +
      |2={{Clade |color=red
 +
        |1=A
 +
        |2=B               
 +
        |3=C           
 +
        }}
 +
      |label1=thickness
 +
      |1={{Clade |thickness=3
 +
          |1=I 
 +
          |2=J         
 +
          |3=K           
 +
          }}
 +
       |label3=state
 +
      |3={{Clade |state=dashed
 +
        |1=X
 +
        |2=Y       
 +
        |3=Z       
 +
 +
        }}
 
       }}
 
       }}
  |2=Leaf3
 
  }}
 
 
}}
 
}}
  
To replace a solid line leading to the ''N''th child with a dashed line, use <code>|stateN=dashed</code>.
+
|-
<pre>
+
| style="width:25%;vertical-align:top;" |'''Styling individual branches'''
<nowiki>
 
{{clade
 
|1={{clade
 
  |1={{clade
 
      |1=Leaf1|state1=dashed
 
      |2=Leaf2
 
      }}
 
  |2=Leaf3
 
  }}
 
}}</nowiki>
 
</pre>
 
  
produces
+
The thickness, colour and state of individual branch lines can be changed using the <code>thicknessN=</code>, <code>|colorN=</code> and <code>|stateN=</code> parameters, where N is the number of the branch to be styled.
{{clade
 
|1={{clade
 
  |1={{clade
 
      |1=Leaf1|state1=dashed
 
      |2=Leaf2
 
      }}
 
  |2=Leaf3
 
  }}
 
}}
 
<!--  ===== FOR cladex ONLY:
 
  
-->{{#ifeq:{{{1|}}}|cladex|
+
|<pre>
To replace a single line leading to the ''N''th child by a double line, use <code>{{!}}stateN=double</code>.
 
<pre>
 
 
<nowiki>
 
<nowiki>
 
{{clade
 
{{clade
|1={{clade
+
  |label1=Branch styling
   |1={{clade
+
  |sublabel1=(append branch number)
       |1=Leaf1
+
  |style1x=background-color:#eeeeee;
      |2=Leaf2|state2=double
+
  |1={{Clade
 +
      |label2=colorN
 +
      |2={{Clade
 +
        |1=black (default) |color1=black         
 +
        |2=red            |color2=red    
 +
        |3=blue            |color3=blue 
 +
        |4=&nbsp;#00ff00      |color4=#00ff00 
 +
        }}
 +
      |label1=thicknessN
 +
      |1={{Clade
 +
          |1=1 (default) |thickness1=1
 +
          |2=2          |thickness2=2
 +
          |3=3          |thickness3=3 
 +
          }}
 +
      |label3=stateN
 +
       |3={{Clade
 +
        |1=solid (default) |state1=solid 
 +
        |2=dotted          |state2=dotted 
 +
        |3=dashed          |state3=dashed
 +
        |4=none            |state4=none 
 +
        |5=double          |state5=double  
 +
        }}
 
       }}
 
       }}
  |2=Leaf3
 
  }}
 
 
}}
 
}}
 +
 
</nowiki>
 
</nowiki>
 
</pre>
 
</pre>
  
produces
+
 
 +
|
 
{{clade
 
{{clade
|1={{clade
+
  |label1=Branch styling
   |1={{clade
+
  |sublabel1=(append branch number)
       |1=Leaf1
+
  |style1x=background-color:#eeeeee;
      |2=Leaf2|state2=double
+
  |1={{Clade
 +
      |label2=colorN
 +
      |2={{Clade
 +
        |1=black (default) |color1=black         
 +
        |2=red            |color2=red    
 +
        |3=blue            |color3=blue 
 +
        |4=&nbsp;#00ff00      |color4=#00ff00 
 +
        }}
 +
      |label1=thicknessN
 +
      |1={{Clade
 +
          |1=1 (default) |thickness1=1
 +
          |2=2          |thickness2=2
 +
          |3=3          |thickness3=3 
 +
          }}
 +
      |label3=stateN
 +
       |3={{Clade
 +
        |1=solid (default) |state1=solid 
 +
        |2=dotted          |state2=dotted 
 +
        |3=dashed          |state3=dashed
 +
        |4=none            |state4=none 
 +
        |5=double          |state5=double  
 +
        }}
 
       }}
 
       }}
  |2=Leaf3
 
  }}
 
 
}}
 
}}
}}<!-- ===== END OF FOR cladex ONLY-->
+
|}
 +
 
 
===Tips===
 
===Tips===
  

Revision as of 13:02, 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.