Template:descendant tree/documentation: Difference between revisions
TheNightAvl (talk | contribs) No edit summary |
TheNightAvl (talk | contribs) No edit summary |
||
(15 intermediate revisions by the same user not shown) | |||
Line 2: | Line 2: | ||
{{uses lua|Module:descendants}} | {{uses lua|Module:descendants}} | ||
{{shortcut|Template:desctree}} | {{shortcut|Template:desc tree|Template:desctree|Template:descs}} | ||
This template generates descendant trees which are automatically sorted. Borrowings are listed after inherited terms, and unattested forms are listed after attested terms. | This template generates descendant trees which are automatically sorted. Borrowings are listed after inherited terms, and unattested forms are listed after attested terms. | ||
Line 10: | Line 10: | ||
=== Base functionality === | === Base functionality === | ||
Language entries are added as arguments in the format <code>|code:term1|term2|term3…</code>. Just as with {{temp|descendant}}, inline arguments can be used: | Language entries are added as arguments in the format <code>|code:term1|term2|term3…</code>. Space characters after the colon are ignored. Just as with {{temp|descendant}}, inline arguments can be used: | ||
<table width=100%><tr><td width=50%><pre>{{descendant tree | <table width=100%><tr><td width=50%><pre>{{descendant tree | ||
|hrd-pro:ṯṓchus | |hrd-pro: ṯṓchus | ||
|rad-pro:hāšur | |rad-pro: hāšur | ||
|rad:háșe|háș | |rad: háșe|háș | ||
|lfv:tus | |lfv: tus | ||
|ryn:húr<t:night-time religious service> | |ryn: húr<t:night-time religious service> | ||
}}</pre></td><td>→</td><td>{{descendant tree | }}</pre></td><td>→</td><td>{{descendant tree | ||
|hrd-pro:ṯṓchus | |hrd-pro: ṯṓchus | ||
|rad-pro:hāšur | |rad-pro: hāšur | ||
|rad:háșe|háș | |rad: háșe|háș | ||
|lfv:tus | |lfv: tus | ||
|ryn:húr<t:night-time religious service> | |ryn: húr<t:night-time religious service> | ||
}}</td></tr></table> | }}</td></tr></table> | ||
Line 45: | Line 45: | ||
<table width=100%><tr><td width=50%><pre>{{descendant tree | <table width=100%><tr><td width=50%><pre>{{descendant tree | ||
|lfv:ejym | |lfv: ejym | ||
|ryn:firo | |ryn: firo | ||
|ryn-o:firaom | |ryn-o: firaom | ||
|ryn-pro:firáumă | |ryn-pro: firáumă | ||
|hrd-pro:p̄iḏɔ̄́məs | |hrd-pro: p̄iḏɔ̄́məs | ||
|rad-pro<lost:this is a custom lost text>: | |rad-pro<lost:this is a custom lost text>: | ||
}}</pre></td><td>→</td><td>{{descendant tree | }}</pre></td><td>→</td><td>{{descendant tree | ||
Line 63: | Line 63: | ||
<table width=100%><tr><td width=50%><pre>{{descendant tree | <table width=100%><tr><td width=50%><pre>{{descendant tree | ||
|lfv-pro: aðəh | |||
|lfv: ao | |||
|hrd-pro: p̄ɯ́ḏɯs | |||
|rad-pro<see>: hırs | |||
|ryn-pro: fúru | |||
|ryn: fur | |||
}}</pre></td><td>→</td><td>{{descendant tree | |||
|lfv-pro:aðəh | |lfv-pro:aðəh | ||
|lfv:ao | |lfv:ao | ||
|hrd-pro:p̄ɯ́ḏɯs | |hrd-pro:p̄ɯ́ḏɯs | ||
|rad-pro<see>:hırs | |rad-pro<see>:hırs | ||
|ryn:fur | |ryn:fur | ||
|ryn-pro:fúru | |||
}}</td></tr></table> | |||
==== Indentation ==== | |||
Extra indentation can be done with {{para|indent}} or {{para|in}} specifying the list type. The template must be on the same line as its superordinate item. This is useful on root pages: | |||
<table width=100%><tr><td width=50%><pre>* {{lnk-pro-morph|cin|-Cé:n|-s}} (nominalisation)<!-- | |||
-->{{descendant tree|indent=* | |||
|kil:šinni | |||
|hrd-pro:c̱innés | |||
|ryn:șinne | |||
|rad-pro:šinner | |||
|lus:sìnni | |||
|rad:sjena | |||
}}</pre></td><td>→</td><td> | |||
* {{lnk-pro-morph|cin|-Cé:n|-s}} (nominalisation)<!-- | |||
-->{{descendant tree|indent=* | |||
|kil:šinni | |||
|hrd-pro:c̱innés | |||
|ryn:șinne | |||
|rad-pro:šinner | |||
|lus:sìnni | |||
|rad:sjena | |||
}}</td></tr></table> | |||
=== Borrowing === | |||
Borrowing can specified either with the inline argument <code><nowiki><bor></nowiki></code> or by using <code>></code> before the language code. | |||
<table width=100%><tr><td width=50%><pre>{{descendant tree | |||
|ryn<bor>:líra | |||
}}</pre></td><td>→</td><td>{{descendant tree | |||
|ryn<bor>:líra | |||
}}</td></tr> | |||
<tr><td width=50%><pre>{{descendant tree | |||
|>rad:Riás | |||
}}</pre></td><td>→</td><td>{{descendant tree | |||
|>rad:Riás | |||
}}</td></tr></table> | |||
The advantage of using <code>></code>, however, is that it can be sorted below its source language with the language code before <code>></code>. | |||
<table width=100%><tr><td width=50%><pre>{{descendant tree | |||
|lus-o:zāht | |||
|lus:zā | |||
|rad-o:ðātt | |||
|rad:lát | |||
|rad>ryn:lâtad | |||
}}</pre></td><td>→</td><td>{{descendant tree | |||
|lus-o:zāht | |||
|lus:zā | |||
|rad-o:ðātt | |||
|rad:lát | |||
|rad>ryn:lâtad | |||
}}</td></tr></table> | |||
==== Descendants of borrowings ==== | |||
The caveat to using the borrowing sorting system is that all descendants of borrowings must be individually specified as full extensions of the borrowed language code via <code>_</code>: | |||
<table width=100%><tr><td width=50%><pre>{{descendant tree | |||
|rad-o:rījø̄r | |||
|rad-m:Ríǿr | |||
|rad:Rỷr | |||
|rad-o>ryn-o:rīŗa | |||
|rad-o>ryn-o_ryn:ríŗa | |||
}}</pre></td><td>→</td><td>{{descendant tree | |||
|rad-o:rījø̄r | |||
|rad-m:Ríǿr | |||
|rad:Rỷr | |||
|rad-o>ryn-o:rīŗa | |||
|rad-o>ryn-o_ryn:ríŗa | |||
}}</td></tr></table> | |||
This allows for borrowed doublets: | |||
<table width=100%><tr><td width=50%><pre>{{descendant tree | |||
|hrd-pro:Thwɛ̄́ljeŋjəs | |||
|rad-pro:Θwêljeŋjs | |||
|rad-o:Þø̄ljeŋjs | |||
|rad:Þýljenș | |||
|ryn-pro:Páiljeḡă | |||
|ryn-o:Pailjeŗ | |||
|ryn:Pailiŗ | |||
|ryn-pro>rad-pro:Pailjeɣs | |||
|ryn-pro>rad-pro_rad-o:Pailjews | |||
|ryn-pro>rad-pro_rad-o_rad:Paijøs | |||
}}</pre></td><td>→</td><td>{{descendant tree | |||
|hrd-pro:Thwɛ̄́ljeŋjəs | |||
|rad-pro:Θwêljeŋjs | |||
|rad-o:Þø̄ljeŋjs | |||
|rad:Þýljenș | |||
|ryn-pro:Páiljeḡă | |||
|ryn-o:Pailjeŗ | |||
|ryn:Pailiŗ | |||
|ryn-pro>rad-pro:Pailjeɣs | |||
|ryn-pro>rad-pro_rad-o:Pailjews | |||
|ryn-pro>rad-pro_rad-o_rad:Paijøs | |||
}}</td></tr></table> | |||
==== Order-based shorthand ==== | |||
As a shorthand to the above system, prefacing a language code with <code>>></code> will parse it as a borrowing from the language specified before it. Similarly, using the prefix <code>_</code> without a language code before it will parse it as a descendant of the last defined language code. While useful as a shorthand, this only works with a singular descendant branch. | |||
<table width=100%><tr><td width=50%><pre>{{descendant tree | |||
|hrd-pro:Thwɛ̄́ljeŋjəs | |||
|rad-pro:Θwêljeŋjs | |||
|rad-o:Þø̄ljeŋjs | |||
|rad:Þýljenș | |||
|ryn-pro:Páiljeḡă | |||
|>>rad-pro:Pailjeɣs | |||
|_rad-o:Pailjews | |||
|_rad:Paijøs | |||
|ryn-o:Pailjeŗ | |||
|ryn:Pailiŗ | |||
}}</pre></td><td>→</td><td>{{descendant tree | }}</pre></td><td>→</td><td>{{descendant tree | ||
| | |hrd-pro:Thwɛ̄́ljeŋjəs | ||
| | |rad-pro:Θwêljeŋjs | ||
|hrd-pro: | |rad-o:Þø̄ljeŋjs | ||
|rad-pro< | |rad:Þýljenș | ||
|ryn: | |ryn-pro:Páiljeḡă | ||
|ryn-pro: | |>>rad-pro:Pailjeɣs | ||
|_rad-o:Pailjews | |||
|_rad:Paijøs | |||
|ryn-o:Pailjeŗ | |||
|ryn:Pailiŗ | |||
}}</td></tr></table> | |||
=== Internal doublets === | |||
In the case of having multiple internal reflexes which then have their own descendants, specifying the language code more than once will generate different branches. This will be sorted into the most recent unnumbered historical form: | |||
<table width=100%><tr><td width=50%><pre>{{descendant tree | |||
|hrd-pro:lȳ́rḡis | |||
|ryn-pro:lȳ́rḡi | |||
|ryn-o:lȳr | |||
|ryn:lyr | |||
|rad-pro:lȳrdzir | |||
|rad-o:lȳrdzre|lȳrwre | |||
|rad-m:lýrdzs | |||
|rad:lyerdzs<t:gas> | |||
|rad-m:lýrus | |||
|rad:lýrus<t:air> | |||
}}</pre></td><td>→</td><td>{{descendant tree | |||
|hrd-pro:lȳ́rḡis | |||
|ryn-pro:lȳ́rḡi | |||
|ryn-o:lȳr | |||
|ryn:lyr | |||
|rad-pro:lȳrdzir | |||
|rad-o:lȳrdzre|lȳrwre | |||
|rad-m:lýrdzs | |||
|rad:lyerdzs<t:gas> | |||
|rad-m:lýrus | |||
|rad:lýrus<t:air> | |||
}}</td></tr></table> | |||
Multiple occurrences of a language code are numbered automatically, and are displayed in order of specification in the template, '''not in alphabetical order of the terms'''. Note that different branches of hierarchical languages are sorted based on order of specification, i.e. if both <code>|ryn:</code> and <code>|ryn-o:</code> are specified twice, the first specification of <code>|ryn:</code> will be listed under the first specification of <code>|ryn-o:</code>, the second under the second etc. | |||
<table width=100%><tr><td width=50%><pre>{{descendant tree | |||
|hrd-pro:lȳ́rḡis | |||
|ryn-pro:lȳ́rḡi | |||
|ryn-o:lȳr | |||
|ryn:lyr | |||
|rad-pro:lȳrdzir | |||
|rad-o:lȳrdzre|lȳrwre | |||
|rad-m:lýrdzs | |||
|rad-m:lýrus | |||
|rad:lyerdzs<t:gas> | |||
|rad:lýrus<t:air> | |||
}}</pre></td><td>→</td><td>{{descendant tree | |||
|hrd-pro:lȳ́rḡis | |||
|ryn-pro:lȳ́rḡi | |||
|ryn-o:lȳr | |||
|ryn:lyr | |||
|rad-pro:lȳrdzir | |||
|rad-o:lȳrdzre|lȳrwre | |||
|rad-m:lýrdzs | |||
|rad-m:lýrus | |||
|rad:lyerdzs<t:gas> | |||
|rad:lýrus<t:air> | |||
}}</td></tr></table> | |||
The indexing can also be specified manually, e.g. <code>|ryn2:</code> and <code>|ryn-o2:</code>. Be aware that if some instances are numbered manually and some aren't, the code will renumber all instances in order of appearance. If you specify <code>|rad:|rad:|rad2:</code> in this order, <code>|rad2:</code> would be reassigned to <code>|rad3:</code>. This is to be borne in mind when organising borrowings, though the numbering can be inferred from the ordering of the branches. '''All code reassignments result in a script warning for your awareness.''' | |||
<table width=100%><tr><td width=50%><pre>{{descendant tree | |||
|hrd-pro:lȳ́rḡis | |||
|ryn-pro:lȳ́rḡi | |||
|ryn-o:lȳr | |||
|ryn:lyr | |||
|rad-pro:lȳrdzir | |||
|rad-o:lȳrdzre|lȳrwre | |||
|rad-m2:lýrdzs | |||
|rad2:lyerdzs<t:gas> | |||
|rad-m:lýrus | |||
|rad:lýrus<t:air> | |||
}}</pre></td><td>→</td><td>{{descendant tree | |||
|hrd-pro:lȳ́rḡis | |||
|ryn-pro:lȳ́rḡi | |||
|ryn-o:lȳr | |||
|ryn:lyr | |||
|rad-pro:lȳrdzir | |||
|rad-o:lȳrdzre|lȳrwre | |||
|rad-m2:lýrdzs | |||
|rad2:lyerdzs<t:gas> | |||
|rad-m:lýrus | |||
|rad:lýrus<t:air> | |||
}}</td></tr></table> | |||
It is also worth noting that if borrowings occur from post-initial specifications of a language, the source language code requires the number to be cited. For example, if you want to specify a <code>|rad:</code> loan from the second specification of <code>|ryn:</code>, you would need to tag it as <code>|ryn2>rad:</code>. | |||
<table width=100%><tr><td width=50%><pre>{{descendant tree | |||
|hrd-pro:lȳ́rḡis | |||
|ryn-pro:lȳ́rḡi | |||
|ryn-o:lȳr | |||
|ryn:lyr | |||
|rad-pro:lȳrdzir | |||
|rad-o:lȳrdzre|lȳrwre | |||
|rad-m:lýrdzs | |||
|rad:lyerdzs<t:gas> | |||
|rad-m:lýrus | |||
|rad:lýrus<t:air> | |||
|rad-m2>lus:lȳru | |||
}}</pre></td><td>→</td><td>{{descendant tree | |||
|hrd-pro:lȳ́rḡis | |||
|ryn-pro:lȳ́rḡi | |||
|ryn-o:lȳr | |||
|ryn:lyr | |||
|rad-pro:lȳrdzir | |||
|rad-o:lȳrdzre|lȳrwre | |||
|rad-m:lýrdzs | |||
|rad:lyerdzs<t:gas> | |||
|rad-m:lýrus | |||
|rad:lýrus<t:air> | |||
|rad-m2>lus:lȳru | |||
}}</td></tr></table> | }}</td></tr></table> |
Latest revision as of 18:46, 2 June 2024
Uses Lua: |
Shortcut
{{descs}} |
This template generates descendant trees which are automatically sorted. Borrowings are listed after inherited terms, and unattested forms are listed after attested terms.
Usage
This template has various features, and so will be discussed in sections.
Base functionality
Language entries are added as arguments in the format |code:term1|term2|term3…
. Space characters after the colon are ignored. Just as with {{descendant}}
, inline arguments can be used:
{{descendant tree |hrd-pro: ṯṓchus |rad-pro: hāšur |rad: háșe|háș |lfv: tus |ryn: húr<t:night-time religious service> }} | → |
Languages without a specified term are displayed as lost:
{{descendant tree |lfv:ejym |ryn:firo |ryn-o:firaom |ryn-pro:firáumă |hrd-pro:p̄iḏɔ̄́məs |rad-pro: }} | → |
|
Inline arguments can also be given after the language code, which would be the equivalent of an argument to {{descendant}}
:
{{descendant tree |lfv: ejym |ryn: firo |ryn-o: firaom |ryn-pro: firáumă |hrd-pro: p̄iḏɔ̄́məs |rad-pro<lost:this is a custom lost text>: }} | → |
|
Language-wide arguments without a defined value are interpreted as true
:
{{descendant tree |lfv-pro: aðəh |lfv: ao |hrd-pro: p̄ɯ́ḏɯs |rad-pro<see>: hırs |ryn-pro: fúru |ryn: fur }} | → |
Indentation
Extra indentation can be done with |indent=
or |in=
specifying the list type. The template must be on the same line as its superordinate item. This is useful on root pages:
* {{lnk-pro-morph|cin|-Cé:n|-s}} (nominalisation)<!-- -->{{descendant tree|indent=* |kil:šinni |hrd-pro:c̱innés |ryn:șinne |rad-pro:šinner |lus:sìnni |rad:sjena }} | → |
Borrowing
Borrowing can specified either with the inline argument <bor>
or by using >
before the language code.
{{descendant tree |ryn<bor>:líra }} | → |
|
{{descendant tree |>rad:Riás }} | → |
|
The advantage of using >
, however, is that it can be sorted below its source language with the language code before >
.
{{descendant tree |lus-o:zāht |lus:zā |rad-o:ðātt |rad:lát |rad>ryn:lâtad }} | → |
Descendants of borrowings
The caveat to using the borrowing sorting system is that all descendants of borrowings must be individually specified as full extensions of the borrowed language code via _
:
{{descendant tree |rad-o:rījø̄r |rad-m:Ríǿr |rad:Rỷr |rad-o>ryn-o:rīŗa |rad-o>ryn-o_ryn:ríŗa }} | → |
This allows for borrowed doublets:
{{descendant tree |hrd-pro:Thwɛ̄́ljeŋjəs |rad-pro:Θwêljeŋjs |rad-o:Þø̄ljeŋjs |rad:Þýljenș |ryn-pro:Páiljeḡă |ryn-o:Pailjeŗ |ryn:Pailiŗ |ryn-pro>rad-pro:Pailjeɣs |ryn-pro>rad-pro_rad-o:Pailjews |ryn-pro>rad-pro_rad-o_rad:Paijøs }} | → |
|
Order-based shorthand
As a shorthand to the above system, prefacing a language code with >>
will parse it as a borrowing from the language specified before it. Similarly, using the prefix _
without a language code before it will parse it as a descendant of the last defined language code. While useful as a shorthand, this only works with a singular descendant branch.
{{descendant tree |hrd-pro:Thwɛ̄́ljeŋjəs |rad-pro:Θwêljeŋjs |rad-o:Þø̄ljeŋjs |rad:Þýljenș |ryn-pro:Páiljeḡă |>>rad-pro:Pailjeɣs |_rad-o:Pailjews |_rad:Paijøs |ryn-o:Pailjeŗ |ryn:Pailiŗ }} | → |
|
Internal doublets
In the case of having multiple internal reflexes which then have their own descendants, specifying the language code more than once will generate different branches. This will be sorted into the most recent unnumbered historical form:
{{descendant tree |hrd-pro:lȳ́rḡis |ryn-pro:lȳ́rḡi |ryn-o:lȳr |ryn:lyr |rad-pro:lȳrdzir |rad-o:lȳrdzre|lȳrwre |rad-m:lýrdzs |rad:lyerdzs<t:gas> |rad-m:lýrus |rad:lýrus<t:air> }} | → |
Multiple occurrences of a language code are numbered automatically, and are displayed in order of specification in the template, not in alphabetical order of the terms. Note that different branches of hierarchical languages are sorted based on order of specification, i.e. if both |ryn:
and |ryn-o:
are specified twice, the first specification of |ryn:
will be listed under the first specification of |ryn-o:
, the second under the second etc.
{{descendant tree |hrd-pro:lȳ́rḡis |ryn-pro:lȳ́rḡi |ryn-o:lȳr |ryn:lyr |rad-pro:lȳrdzir |rad-o:lȳrdzre|lȳrwre |rad-m:lýrdzs |rad-m:lýrus |rad:lyerdzs<t:gas> |rad:lýrus<t:air> }} | → |
The indexing can also be specified manually, e.g. |ryn2:
and |ryn-o2:
. Be aware that if some instances are numbered manually and some aren't, the code will renumber all instances in order of appearance. If you specify |rad:|rad:|rad2:
in this order, |rad2:
would be reassigned to |rad3:
. This is to be borne in mind when organising borrowings, though the numbering can be inferred from the ordering of the branches. All code reassignments result in a script warning for your awareness.
{{descendant tree |hrd-pro:lȳ́rḡis |ryn-pro:lȳ́rḡi |ryn-o:lȳr |ryn:lyr |rad-pro:lȳrdzir |rad-o:lȳrdzre|lȳrwre |rad-m2:lýrdzs |rad2:lyerdzs<t:gas> |rad-m:lýrus |rad:lýrus<t:air> }} | → |
It is also worth noting that if borrowings occur from post-initial specifications of a language, the source language code requires the number to be cited. For example, if you want to specify a |rad:
loan from the second specification of |ryn:
, you would need to tag it as |ryn2>rad:
.
{{descendant tree |hrd-pro:lȳ́rḡis |ryn-pro:lȳ́rḡi |ryn-o:lȳr |ryn:lyr |rad-pro:lȳrdzir |rad-o:lȳrdzre|lȳrwre |rad-m:lýrdzs |rad:lyerdzs<t:gas> |rad-m:lýrus |rad:lýrus<t:air> |rad-m2>lus:lȳru }} | → |