Template:with/documentation: Difference between revisions
TheNightAvl (talk | contribs) No edit summary Tags: Mobile edit Mobile web edit Advanced mobile edit |
TheNightAvl (talk | contribs) Tags: Mobile edit Mobile web edit Advanced mobile edit |
||
Line 67: | Line 67: | ||
=== Note and translation functions === | === Note and translation functions === | ||
Translations (and notes) are entered in <code><angle brackets></code> '''after''' the main specification of government. | 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>}} | {{tempn|with|rad v|gen<someone>}} |
Revision as of 22:41, 4 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 before 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 &
.
{{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