Template:Grammar example/doc
| This is a documentation subpage for Template:Grammar example. It may contain usage information, categories and other content that is not part of the original template page. |
| This template uses TemplateStyles: |
| This template uses Lua: |
| This template should never be substituted – use {{Grammar example}}. |
| This template is rated as alpha. It is ready for limited use and third-party feedback. It may be used on a small number of pages, but should be monitored closely. Suggestions for new features or adjustments to input and output are welcome. |
This template may be used to mark a grammar example in an article with the agreement controller and target[1] identified by typographical styling.
Usage
[edit]{{Grammar example|example sentence|controller=controling word(s)|target=target word(s)}}
{{Grammar example|example sentence|ctl=controling word(s)|targ=target word(s)}}
Parameters
[edit]This template has one required positional parameter, and two optional named parameters:
|1=– the example sentence (required) usually containing an agreement pair consisting of a controller and a target|controller=– the word(s) identifying the controlling element of an agreement element[1] (alias:|ctl=)|target=– the word(s) identifying the agreement target, i.e., an element reflecting a displaced feature value of the controller (alias:|targ=)
Examples
[edit]{{grex|Colorless green ideas sleep furiously.|ctl=ideas|targ=sleep}}→ Colorless green ideas sleep furiously.{{grex|All the world's a stage.|ctl=world|targ='s}}→ All the world's a stage.{{grex|The reports of my death are greatly exaggerated.|ctl=reports|targ=are}}→ The reports of my death are greatly exaggerated.{{grex|The fault, dear Brutus, is not in our stars.|ctl=fault|targ=is}}→ The fault, dear Brutus, is not in our stars.{{grex|Here come the clowns.|ctl=clowns|targ=come}}→ Here come the clowns.{{grex|Here comes the bride.|ctl=bride|targ=comes}}→ Here comes the bride.
Notes and limitations
[edit]This template is only a prototype. There is no implication or suggestion that the styles you see used here should be used in grammatical examples; only consensus can establish that. All styles are isolated in the styles.css page, so the template code does not need to be changed when the desired style changes.
This template marks up the example with CSS classes using string replacement, so the values of params controller and target should be unique in the example sentence. If they are not unique, the first word in the example sentence matching the param value will be marked up. (A future enhancement may alter this, if there is a need.)
If you would rather see different markup in example sentences than the style defined here, the classes may be overridden using your common.css. Any styles you define there will affect the style in all articles using this template.
- Refs
- 1 2 Cabredo Hofherr, Patricia (30 June 2020). "Agreement Morphology". In Aronoff, Mark (ed.). Oxford Research Encyclopedia of Linguistics. New York: Oxford Academic. doi:10.1093/acrefore/9780199384655.013.500. OCLC 8624504767. Retrieved 21 August 2026.
TemplateData
[edit]TemplateData for Grammar example
This template may be used to mark a grammatical example, with the agreement controller and target identified by typographical styling.
| Parameter | Description | Type | Status | |
|---|---|---|---|---|
| Example sentence | 1 | The example sentence. | String | required |
| Controller | controller | The text identifying the agreement controller. | String | optional |
| Target | target | The text identifying the agreement target. | String | optional |