Template:with/documentation: Difference between revisions
TheNightAvl (talk | contribs) mNo edit summary |
TheNightAvl (talk | contribs) |
||
(16 intermediate revisions by the same user not shown) | |||
Line 3: | Line 3: | ||
{{shortcut|Template:+}} | {{shortcut|Template:+}} | ||
{{tempn|with|rad| | Inspired by [[wikt:Template:+obj|the corresponding Wiktionary template]], this template is used to generate formatted text beside definitions indicating case government information, or any other information regarding complements. | ||
== Parameters == | |||
The available parameters are as follows: | |||
: {{para|1}} | |||
:: language code + part of speech | |||
::: This parameter is only required for certain aspects of functionality. If none of the below functions requiring their specification are of use, this parameter may be omitted. If omitted, the following parameter can be entered as the first parameter. | |||
: {{para|2|req=1}}, {{para|3}} … | |||
:: government entry/ies | |||
: {{para|pos|opt=1}} | |||
:: alternative to entering part of speech information in {{para|1}} | |||
== Parameter building == | |||
If you would like a simple specification of government of a specific form, it can be entered as the first parameter. | |||
{{tempn|with|infinitive}} | |||
Produces: | |||
: {{with|infinitive}} | |||
<hr> | |||
If you would like to specify a case and have the term categorised, the following must apply: | |||
# the case must be specified in [[Module:government/data]] | |||
# the language code must be specified | |||
# the part of speech must be specified | |||
Any abbreviations of cases or parts of speech must also be specified as aliases in [[Module:government/data]]. Any of the following formats: | |||
{{tempn|with|rad|instrumental|pos=verb}} | |||
{{tempn|with|rad|ins|pos=v}} | {{tempn|with|rad|ins|pos=v}} | ||
{{tempn|with|rad verb| | {{tempn|with|rad verb|instrumental}} | ||
{{tempn|with|rad v|ins | {{tempn|with|rad v|ins}} | ||
: {{with|rad|ins}} + [[:Category:Radestrian verbs governing the instrumental]] (only | Produce: | ||
: {{with|rad|ins}} + [[:Category:Radestrian verbs governing the instrumental]] | |||
<hr> | |||
=== Link usage === | |||
To add term links, such as in the case of collocated adpositions, prepend the word to be linked with <code>:</code>. This requires the language code to be specified, but not necessarily the part of speech. | |||
{{tempn|with|ryn|:am}} | |||
Produces: | |||
: {{with|ryn|:am}} | |||
<hr> | |||
Multiple words will be linked as one entry, unless <code>:</code> is prepended to each new entry. | |||
{{tempn|with|rad|:er rigust}} | |||
{{tempn|with|rad|:er :rigust}} | |||
Produces: | |||
: {{with|rad|:er rigust}} | |||
: {{with|rad|:er :rigust}} | |||
<hr> | |||
If, then, you need a form specified with the linked entry, it must be added without a space directly afterwards in <code>(round brackets)</code>. All normal formatting of forms apply. It is worth noting that no categorisation occurs with forms appended to linked terms. | |||
{{tempn|with|rad|:la(dat)}} | |||
{{tempn|with|rad|:la(_NOTHING! MWAHAHA)}} | |||
Produces: | |||
: {{with|rad|:la(dat)}} | |||
: {{with|rad|:la(_NOTHING! MWAHAHA)}} | |||
<hr> | |||
This can also go before the term if it is a postposition. The <code>:</code> must still come only directly before the linked term. | |||
{{tempn|with|rad|(gen):maișen}} | |||
Produces: | |||
: {{with|rad|(gen):maișen}} | |||
=== Note and translation functions === | |||
Translations (and notes) are entered in <code><angle brackets></code> '''after''' the main specification of government, including after all formatting specifications. | |||
{{tempn|with|rad v|gen<someone>}} | |||
: {{with|rad|gen<someone>}} + [[:Category:Radestrian verbs governing the genitive]] | |||
The different note types are purely positional and are specified as follows: | |||
: <code><q:note></code> | |||
:: note before the current specification | |||
: <code><qq:note></code> | |||
:: note after the current specification | |||
: <code><q*:note></code> | |||
:: note prefacing the entire output | |||
{{tempn|with|rad|:la(dat)<q:obsolete>}} | |||
: {{with|rad|:la(dat)<q:obsolete>}} | |||
{{tempn|with|rad|:la(acc)<into something><qq:optional>}} | |||
: {{with|rad|:la(dat)<into something><qq:optional>}} | |||
{{tempn|with|rad|:la(acc)<into something><q*:verb often omitted>}} | |||
: {{with|rad|:la(dat)<into something><q*:verb often omitted>}} | |||
=== Multiple entry === | |||
Multiple complements can be specified in one parameter by dividing them with either <code>+</code> (''and'') or <code>/</code> (''or''). | |||
{{ | {{tempn|with|rad v|gen<someone> + :la(dat)<in something>}} | ||
: {{with|rad|(gen): | {{tempn|with|rad v|gen / :la(dat)}} | ||
{{tempn|with|rad v|gen + :la(dat) / dat}} | |||
: {{with|rad|gen<someone> + :la(dat)<in something>}} + [[:Category:Radestrian verbs governing the genitive]] | |||
: {{with|rad|gen / :la(dat)}} + [[:Category:Radestrian verbs governing the genitive]] | |||
: {{with|rad|gen + :la(dat) / dat}} + [[:Category:Radestrian verbs governing the genitive]] + [[:Category:Radestrian verbs governing the dative]] | |||
You can also specify multiple parameters to list multiple senses. | |||
{{tempn|with|rad v|gen<someone> + :la(dat)<in something>|ins<something> + :er(dat)<on something>}} | |||
: {{with|rad|gen<someone> + :la(dat)<in something>|ins<something> + :er(dat)<on something>}} + [[:Category:Radestrian verbs governing the genitive]] + [[:Category:Radestrian verbs governing the instrumental]] | |||
{{ | === Format functions === | ||
: {{with|dat}} | ==== Colours ==== | ||
If you would like to add or override the colour of the form, a hex code can be specified in <code>[square brackets]</code> directly after the form specification. If the form is specified with a linked term, the hex code must be specified '''outside''' the <code>(round brackets)</code>. | |||
{{tempn|with|rad|&transitive[CBA987] / :la(dat)[789ABC]}} | |||
: {{with|rad|&transitive[CBA987] / :la(dat)[789ABC]}} | |||
==== Glossary link override ==== | |||
If you would not like the form glossed, prepend it with <code>_</code>. This will deactivate aliases and any other form of auto-formatting, such as colouring. Only the italics will remain. | |||
{{tempn|with|_infinitive}} | |||
{{tempn|with|rad|:ha(_genitive)}} | |||
{{tempn|with|_acc}} | |||
Produces: | |||
: {{with|_infinitive}} | |||
: {{with|rad|:ha(_genitive)}} | |||
: {{with|_acc}} :( | |||
{{temp|with|:la(dat)}} | ==== Overriding ‘''with''’ ==== | ||
: {{with|:la(dat)}} | If you do not need the automatically generated ‘''with''’ text, prepend the citation with <code>&</code>. This will pass it onto the next specification. | ||
{{temp|with|rad|&transitive / :la(dat)}} | |||
: {{with|rad|&transitive / :la(dat)}} | |||
<hr> | |||
{{temp|with|rad| | {{temp|with|rad|&transitive / &:la(dat)}} | ||
: {{with|rad| | : {{with|rad|&transitive / &:la(dat)}} | ||
<hr> | |||
{{temp|with|rad| | Using it with <code>+</code> will omit the ‘''and''’. | ||
: {{with|rad| | {{temp|with|rad|&transitive + :la(dat)}} | ||
: {{with|rad|&transitive + :la(dat)}} | |||
=== Categorisation override === | |||
If you are adding a case and would not like it categorised, there are two options. | |||
{{ | ==== Option 1: do not specify a part of speech ==== | ||
: {{with|rad| | This only works if you would not like categorisation from anything specified in the template. | ||
{{tempn|with|rad|ins}} | |||
Produces: | |||
: {{with|rad|ins}} <s>+ [[:Category:Radestrian verbs governing the instrumental]]</s> | |||
{{ | ==== Option 2: prepend <code>*</code> ==== | ||
: {{with|rad|acc | This functionality is better if there are other elements which still require categorisation. It is most useful when you want to highlight a particular usage with a case that is nonetheless assumed (i.e. the accusative with transitive verbs), for which a category may arguably be redundant or unnecessary. | ||
{{tempn|with|rad v|dat<to someone> + *acc<something>}} | |||
Produces: | |||
: {{with|rad|dat<to someone> + *acc<something>}} + [[:Category:Radestrian verbs governing the dative]] <s>+ [[:Category:Radestrian verbs governing the accusative]]</s> | |||
'''Update: the combination of verb and accusative is now automatically recognised, so the category ''X verbs governing the accusative'' is now impossible.''' | |||
Latest revision as of 13:01, 6 August 2024
Uses Lua: |
Shortcut
{{+}} |
Inspired by the corresponding Wiktionary template, this template is used to generate formatted text beside definitions indicating case government information, or any other information regarding complements.
Parameters
The available parameters are as follows:
|1=
- language code + part of speech
- This parameter is only required for certain aspects of functionality. If none of the below functions requiring their specification are of use, this parameter may be omitted. If omitted, the following parameter can be entered as the first parameter.
- language code + part of speech
|2=
(required),|3=
…- government entry/ies
|pos=
(optional)- alternative to entering part of speech information in
|1=
- alternative to entering part of speech information in
Parameter building
If you would like a simple specification of government of a specific form, it can be entered as the first parameter.
{{with|infinitive}}
Produces:
- [with infinitive]
If you would like to specify a case and have the term categorised, the following must apply:
- the case must be specified in Module:government/data
- the language code must be specified
- the part of speech must be specified
Any abbreviations of cases or parts of speech must also be specified as aliases in Module:government/data. Any of the following formats:
{{with|rad|instrumental|pos=verb}} {{with|rad|ins|pos=v}} {{with|rad verb|instrumental}} {{with|rad v|ins}}
Produce:
Link usage
To add term links, such as in the case of collocated adpositions, prepend the word to be linked with :
. This requires the language code to be specified, but not necessarily the part of speech.
{{with|ryn|:am}}
Produces:
- [with am]
Multiple words will be linked as one entry, unless :
is prepended to each new entry.
{{with|rad|:er rigust}} {{with|rad|:er :rigust}}
Produces:
If, then, you need a form specified with the linked entry, it must be added without a space directly afterwards in (round brackets)
. All normal formatting of forms apply. It is worth noting that no categorisation occurs with forms appended to linked terms.
{{with|rad|:la(dat)}} {{with|rad|:la(_NOTHING! MWAHAHA)}}
Produces:
This can also go before the term if it is a postposition. The :
must still come only directly before the linked term.
{{with|rad|(gen):maișen}}
Produces:
Note and translation functions
Translations (and notes) are entered in <angle brackets>
after the main specification of government, including after all formatting specifications.
{{with|rad v|gen<someone>}}
- [with genitive ‘someone’] + Category:Radestrian verbs governing the genitive
The different note types are purely positional and are specified as follows:
<q:note>
- note before the current specification
<qq:note>
- note after the current specification
<q*:note>
- note prefacing the entire output
{{with|rad|:la(dat)<q:obsolete>}}
{{with|rad|:la(acc)<into something><qq:optional>}}
{{with|rad|:la(acc)<into something><q*:verb often omitted>}}
Multiple entry
Multiple complements can be specified in one parameter by dividing them with either +
(and) or /
(or).
{{with|rad v|gen<someone> + :la(dat)<in something>}} {{with|rad v|gen / :la(dat)}} {{with|rad v|gen + :la(dat) / dat}}
- [with genitive ‘someone’ and la (+ dative) ‘in something’] + Category:Radestrian verbs governing the genitive
- [with genitive or la (+ dative)] + Category:Radestrian verbs governing the genitive
- [with genitive and la (+ dative) or dative] + Category:Radestrian verbs governing the genitive + Category:Radestrian verbs governing the dative
You can also specify multiple parameters to list multiple senses.
{{with|rad v|gen<someone> + :la(dat)<in something>|ins<something> + :er(dat)<on something>}}
- [with genitive ‘someone’ and la (+ dative) ‘in something’; or with instrumental ‘something’ and er (+ dative) ‘on something’] + Category:Radestrian verbs governing the genitive + Category:Radestrian verbs governing the instrumental
Format functions
Colours
If you would like to add or override the colour of the form, a hex code can be specified in [square brackets]
directly after the form specification. If the form is specified with a linked term, the hex code must be specified outside the (round brackets)
.
{{with|rad|&transitive[CBA987] / :la(dat)[789ABC]}}
- [transitive or with la (+ dative)]
Glossary link override
If you would not like the form glossed, prepend it with _
. This will deactivate aliases and any other form of auto-formatting, such as colouring. Only the italics will remain.
{{with|_infinitive}} {{with|rad|:ha(_genitive)}} {{with|_acc}}
Produces:
- [with infinitive]
- [with ha (+ genitive)]
- [with acc] :(
Overriding ‘with’
If you do not need the automatically generated ‘with’ text, prepend the citation with &
. This will pass it onto the next specification.
{{with|rad|&transitive / :la(dat)}}
- [transitive or with la (+ dative)]
{{with|rad|&transitive / &:la(dat)}}
- [transitive or la (+ dative)]
Using it with +
will omit the ‘and’.
{{with|rad|&transitive + :la(dat)}}
- [transitive with la (+ dative)]
Categorisation override
If you are adding a case and would not like it categorised, there are two options.
Option 1: do not specify a part of speech
This only works if you would not like categorisation from anything specified in the template.
{{with|rad|ins}}
Produces:
Option 2: prepend *
This functionality is better if there are other elements which still require categorisation. It is most useful when you want to highlight a particular usage with a case that is nonetheless assumed (i.e. the accusative with transitive verbs), for which a category may arguably be redundant or unnecessary.
{{with|rad v|dat<to someone> + *acc<something>}}
Produces:
- [with dative ‘to someone’ and accusative ‘something’] + Category:Radestrian verbs governing the dative
+ Category:Radestrian verbs governing the accusative
Update: the combination of verb and accusative is now automatically recognised, so the category X verbs governing the accusative is now impossible.