root |
| ||||||
這是Template:Clade(差異)的沙盒。 參見本模板的測試樣例。 |
本模板含有複雜而精密的擴展語法。 編輯本模板前,建議您先熟悉解析器函數與本模板的設計思路、運作原理等。若您的編輯引發了意外的問題,請儘快撤銷編輯,因為本模板可能被大量頁面使用。 您所作的編輯可先在模板沙盒或您的個人頁面中進行測試。 |
此模板使用Lua語言: |
本模板使用以下模板樣式: |
用法
這個模板可以表示一種有分支結構的樹型圖,在圖上可以出現結點和有連結的標註,這個模板特別適合表達進化樹。
- 顯示只有根與葉節點的樹
{{clade |label1=根 |1=葉 }}
它的效果是:
根 |
葉 |
- 讓樹的某節點有連結
{{clade |1={{clade |label1=[[树 (数据结构)#術語|子樹節點1]] |1=葉1 |label2=子樹節點2 |2=[[树 (数据结构)#術語|葉2]] }} }}
它的效果是:
| |||||||
- 改變樹的父節點的字型樣式
{{clade| style=font-size:75%;line-height:75% |1={{clade |label1=子樹節點1 |1=葉1 |label2=子樹節點2 |2=葉2 }} }}
是這樣的效果:
| |||||||
- 改變樹的某個父節點的粗細
{{clade |1={{clade |1={{clade | thickness=3 |1=葉1 |2=葉2 }} |2=葉3 }} }}
是這樣的效果:
| |||||||||||||
編輯技巧
創建一個較大進化樹的簡單方式是使用紐威克型格式,然後繼續使用一些合適的文本編輯工具添加一點符合Clade的版式信息。
- 把想法用紐威克型格式表達出來如:((a,b),(c,d))
- 用"{{clade|"替換原來的"("
- 用"}}"替換原來的")"
- 把逗號用"|"加一個有序數字表示
- 如果需要的話編輯一下進化枝上的文字
{{clade |1={{clade |1=a |2=b }} |2={{clade |1=c |2=d }} }}
使用嵌套
您可以嵌套使用模板,在文字上使用連結。你可以使用非中斷空格()來獲取空間或得到一個有空格的標註。
這一整個進化樹可以被放在框架中並浮於文字上方。 詳見 Template:Cladogram.
Example | |||||||||||||||||||||||||||
| |||||||||||||||||||||||||||
Sample of Template:Cladogram |
{{cladogram|title=Example |caption=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]] }} }} }} }} }} }}
參見
Wikiwand in your browser!
Seamless Wikipedia browsing. On steroids.
Every time you click a link to Wikipedia, Wiktionary or Wikiquote in your browser's search results, it will show the modern Wikiwand interface.
Wikiwand extension is a five stars, simple, with minimum permission required to keep your browsing private, safe and transparent.