Template:Κλάδος

From Γνωσιακή Βάση Υπηρεσιών και Διαδικασιών του Δημοσίου Τομέα
Revision as of 15:47, 11 June 2015 by Dkalo (talk | contribs) (Εισήχθη 1 αναθεώρηση)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
</br>

{{{1}}}

 

50px|alt=Documentation icon|link= Τεκμηρίωση προτύπου[προβολή] [επεξεργασία] [ιστορικό] [Script error: No such module "Purge".]

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.

Χρήση


{{κλάδος
|label1=Βάση
|label1b=Base
|1=Κόμβος
}}

δίνει

Βάση

Κόμβος

Base


{{κλάδος
|1={{κλάδος
   |label1=[[Υποδένδρο1]]
   |label1b=Subtree1
   |1=Φύλλο1
   |label2=[[Υποδένδρο2]]
   |label2b=Subtree2
   |2=Φύλλο2
   }}
}}

δίνει

</br>
Υποδένδρο1 

Φύλλο1

Subtree1
Υποδένδρο2 

Φύλλο2

Subtree2

 


{{κλάδος| style=font-size:75%;line-height:75%
|1={{κλάδος
   |label1=[[Υποδένδρο1]] 
   |label1b=Subtree1
   |1=Φύλλο1
   |label2=[[Υποδένδρο2]] 
   |label2b=Subtree2
   |2=Φύλλο2
   }}
}}

δίνει

</br>
Υποδένδρο1 

Φύλλο1

Subtree1
Υποδένδρο2 

Φύλλο2

Subtree2

 


{{κλάδος
|1={{κλάδος
   |1={{κλάδος | thickness=3
      |1=Φύλλο1
      |2=Φύλλο2
      }}
   |2=Φύλλο3
   }}
}}

δίνει

</br>
</br>
</br>

Φύλλο1

</br>

Φύλλο2

 

</br>

Φύλλο3

 

 

To replace the solid line with a dashed line, use |stateN=dashed:


{{κλάδος
|1={{κλάδος
   |1={{κλάδος
      |1=Φύλλο1|state1=dashed
      |2=Φύλλο2
      }}
   |2=Φύλλο3
   }}
}}

δίνει

</br>
</br>
</br>

Φύλλο1

</br>

Φύλλο2

 

</br>

Φύλλο3

 

 

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.

  1. Start with Newick format ((a,b),(c,d))
  2. Replace "(" with "{{clade|"
  3. Replace ")" with "}}"
  4. Edit to replace commas with pipes and numbers
  5. Edit clade labels if needed

{{κλάδος
 |1={{κλάδος
    |1=a
    |2=b
    }}
 |2={{κλάδος
    |1=c
    |2=d
    }}
}}

Example Perl script to automate the conversion: <source lang="perl"> use constant N=>"\n"; use constant T=>"\t";

my $tree='((a,b),(c,d));'; # get sequence $tree=~s/[\n\r]//g; # loose those spaces $tree=~ s/\:[\.\d]+//g; # loose those lengths while ($tree=~ m/\(/) { foreach my $clade ($tree=~ m/\(([^\(\)]+)\)/g) { my @branches=split /\,/,$clade; s/(\t+)/$1\t/g for @branches; die 'ERROR: degenerate/empty node!'.N if $#branches<1; $tree=~ s/\(\Q$clade\E\)/${\join(,'Template:Clade',N,map(T.'')}/; # substitute } pos($tree)=0; } $tree=~s/(\t*)\t\}\}/$1\}\}/g; # lazy fix

print $tree; </source>

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.

The entire cladogram can be placed in a box so that text flows nicely around it. Use within Template:Cladogram.

Template:Cladogram
{{cladogram|title=Example
|caption=Sample of Template:Cladogram
|clades={{clade| style=font-size:75%;line-height:75%
|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]]
		      }}
	      }}
	   }}
       }}
  }}
}}


Κλάδος


de:Vorlage:Clade es:Plantilla:Clade pt:Predefinição:Clade uk:Шаблон:Clade

Κλάδος