Template:with/documentation: Difference between revisions

From Laenkea
Jump to navigation Jump to search
No edit summary
 
(19 intermediate revisions by the same user not shown)
Line 3: Line 3:
{{shortcut|Template:+}}
{{shortcut|Template:+}}


{{temp|with|rad|ins|pos=v}}
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 verb|instrumental}}
{{tempn|with|rad v|ins}}
Produce:
: {{with|rad|ins}} + [[:Category:Radestrian verbs governing the instrumental]]
: {{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>}}


{{temp|with|rad|:la(dat)}}
=== Multiple entry ===
: {{with|rad|:la(dat)}} (preposition)
Multiple complements can be specified in one parameter by dividing them with either <code>+</code> (''and'') or <code>/</code> (''or'').


{{temp|with|rad|:la(dat)}}
{{tempn|with|rad v|gen<someone> + :la(dat)<in something>}}
: {{with|rad|(gen):haleval}} (postposition)
{{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]]


{{temp|with|rad|&transitive / :la(dat)}}
You can also specify multiple parameters to list multiple senses.
: {{with|rad|&transitive / :la(dat)}} (no ''with'' text)


If you don't want to use links (<code>:</code>), then the language code parameter can be omitted.
{{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]]


{{temp|with|dat}}
=== 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]}}


Trying this with links will error.
==== 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)}}


{{temp|with|rad|&transitive / &:la(dat)}}
<hr>
: {{with|rad|&transitive / &:la(dat)}} (no ''with'' text x2)


{{temp|with|rad|_transitive / :la(dat)}}
{{temp|with|rad|&transitive / &:la(dat)}}
: {{with|rad|_transitive / :la(dat)}} (no glossary link, just wikitext, still italicised)
: {{with|rad|&transitive / &:la(dat)}}


{{temp|with|rad|acc[CBA987] / :la(dat)[789ABC]}}
<hr>
: {{with|rad|acc[CBA987] / :la(dat)[789ABC]}} (custom colours)


{{temp|with|rad|acc / :la(dat)|multiple}}
Using it with <code>+</code> will omit the ‘''and''’.
: {{with|rad|acc / :la(dat)|multiple}}
{{temp|with|rad|&transitive + :la(dat)}}
: {{with|rad|&transitive + :la(dat)}}


{{temp|with|rad|:er :rigun(gen)}}
=== Categorisation override ===
: {{with|rad|:er :rigun(gen)}} (multiple links)
If you are adding a case and would not like it categorised, there are two options.


{{temp|with|rad|acc / :la(dat)<q:obsolete>}}
==== Option 1: do not specify a part of speech ====
: {{with|rad|acc / :la(dat)<q:obsolete>}}
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>


{{temp|with|rad|acc / :la(acc)<into something><qq:sounds weird tho>}}
==== Option 2: prepend <code>*</code> ====
: {{with|rad|acc / :la(dat)<into something><qq:sounds weird tho>}}
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>


{{temp|with|rad|acc / :la(acc)<into something><q*:special note>}}
'''Update: the combination of verb and accusative is now automatically recognised, so the category ''X verbs governing the accusative'' is now impossible.'''
: {{with|rad|acc / :la(dat)<into something><q*:special note>}}

Latest revision as of 13:01, 6 August 2024

Edit-copy green.svg Documentation for Template:with. [edit]
This page contains usage information, categories, interwiki links and other content describing the template.

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.
|2= (required), |3=
government entry/ies
|pos= (optional)
alternative to entering part of speech information in |1=

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:

  1. the case must be specified in Module:government/data
  2. the language code must be specified
  3. 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:

[with instrumental] + Category:Radestrian verbs governing the instrumental

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:

[with er rigust]
[with er rigust]

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:

[with la (+ dative)]
[with la (+ NOTHING! MWAHAHA)]

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:

[with (genitive +) maișen]

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 (obsolete) la (+ dative)]
{{with|rad|:la(acc)<into something><qq:optional>}}
[with la (+ dative) ‘into something’ (optional)]
{{with|rad|:la(acc)<into something><q*:verb often omitted>}}
[(verb often omitted) with la (+ dative) ‘into something’]

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:

[with instrumental] + Category:Radestrian verbs governing the instrumental

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.