Difference between revisions of "Template:Cladogram"

From blackwiki
Jump to navigation Jump to search
imported>Frietjes
(more robust align and width parameters, tracking for custom margins (we can use |style= if this is really needed))
imported>Jts1882
(fix width parameter as in tested sandbox version)
 
(9 intermediate revisions by 4 users not shown)
Line 1: Line 1:
{| style="border: 1px solid #ccc; background-color: white; vertical-align: middle; width: {{if number|{{{width|248}}}|248}}px; {{#switch:{{lc:{{{align|}}}
+
{| style="border: 1px solid #ccc; background-color: white; vertical-align: middle; width: {{if number|{{{width|}}}|{{{width}}}|248}}px; {{#switch:{{lc:{{{align|}}}}}
| left = margin-left:0; margin-right:1em; clear:left;
+
| left = margin:0.2em 1em 0.2em 0; float:left; clear:left;
| center | centre = margin-left:auto; margin-right:auto;
+
| center | centre = margin:0.2em auto;
| right | #default = margin-left:1em; margin-right:0; clear:right;
+
| none =
}} {{style|}}}"
+
| right | #default = margin:0.2em 0 0.2em 1em; float:right; clear:right;
 +
}} {{{style|}}}"
 
|-
 
|-
 
{{#if:{{{title|}}}|
 
{{#if:{{{title|}}}|

Latest revision as of 13:43, 3 November 2018

Template documentation[view] [edit] [history] [purge]

Usage

Parameters
|title= text to display at top
|cladogram= cladogram, constructed with Template:Clade
|cladogram2= second cladogram, constructed in the same way
|caption= caption to display under cladogram
|align= whether the cladogram should be right- or left-aligned (default right)

Example:

Example
Neornithes  
Paleognathae

 

 Neognathae 
 

Other birds

Galloanserae 

Anseriformes

    

Galliformes

Craciformes

Sample of Template:Cladogram
{{cladogram|title=Example
|caption=Sample of Template:Cladogram
|cladogram={{clade| style=font-size:85%;line-height:75%;width:300px;
    |label1=[[Neornithes]]  
    |1={{clade
        |label1=[[Paleognathae]]
        |1= 
        |label2= [[Neognathae]] 
        |2={{clade
            |1=Other birds
            |label1= 
            |label2=[[Galloanserae]] 
            |2={{clade
                |1=[[Anseriformes]]
                |label2=    
                |2={{clade
                    |1=[[Galliformes]]
                    |2=[[Craciformes]]
                    }}
                }}
            }}
        }}
    }}
}}

Tracking category

See also