跳转到内容

Template:Grammatical category label/doc

维基百科,自由的百科全书

This template formats a single linguistic glossing abbreviation (a "grammatical category label"). For example, {{gcl|CONT}} produces: CONT. Hovering the mouse over the abbreviation displays a tooltip with its meaning, which in this case is "continuous aspect".

Usage

[编辑]
  • {{gcl|CONT}}CONT       (Hover text: "continuous aspect")
  • {{gcl|CONT|continuative}}CONT       (Hover text: "continuative")
  • {{gcl|CONT|continuative|Continuative aspect}}CONT       (Links to: Continuative aspect)
  • {{gcl|CONT|glossing=wikilink}}CONT       (Links to: Continuous aspect)
    • Alternative: {{gcl|CONT||}}CONT

To specify a meaning different from the default one,[1] pass it as a second parameter after the abbreviation itself: {{gcl|CONT|continuative}} gives: CONT.

The abbreviation will be rendered as a link to the relevant article if the |glossing= parameter is set to wikilink, thus {{gcl|CLF|glossing=wikilink}} gives: CLF. The Wikipedia article is specified by the third parameter: {{gcl|CLF|classifier|Chinese classifier}} gives: CLF. The presence of this third parameter (even if empty) will force the abbreviation to be displayed as a wikilink – {{gcl|CLF||}} is equivalent to {{gcl|CLF|glossing=wikilink}}.

This template is mainly used within {{interlinear}}. It will exempt its content from the default glossing behaviour in the interlinear text. This can be needed in several circumstances:

  • to set the meaning of an abbreviation that is otherwise not recognised;
  • to use an abbreviation with a meaning different from the default one, or linking to a different article from the default one;
  • to apply formatting to a portion of a glossing abbreviation (within {{interlinear}} this would prevent the abbreviation from being recognised);
  • to exempt an abbreviation from the default {{interlinear}} formatting. To this end, two further values of the |glossing= parameter can be used: |glossing=no link will force the use of the default formatting as an abbreviation with a tooltip, without turning it into a wikilink; |glossing=no abbr will only format the label in small caps without treating it as an abbreviation. Additional CSS styles[2] can be set using the |style= parameter.

To prevent a string from being treated as a glossing label at all, use {{no gloss}}.

TemplateData

[编辑]
以下是该模板的模板数据,适用于可视化编辑器等工具。

Grammatical category label模板数据

This template formats a single linguistic glossing abbreviation. This template is mainly used within {{interlinear}}. To prevent a string from being treated as a glossing label at all, use {{no gloss}}.

模板参数

此模板首选参数不换行的行内格式。

参数描述类型状态
Abbreviation1

A single linguistic glossing abbreviation. For the list of automatically-recognized abbreviations, see the documentation.

示例值
CONT
单行文本必需
Meaning2

A meaning different from the default one

示例值
continuative
单行文本可选
Article3

Link to this Wikipedia article, or if empty, link automatically.

示例值
Continuative aspect
页面名称可选
Glossingglossing

If "wikilink", the abbreviation will be rendered as a link to the relevant article; alternatively, set parameter 3 to empty. If "no link", the abbreviation will not be linked. If "no abbr", the label will not be treated as an abbreviation.

推荐值
wikilink no link no abbr
默认值
"wikilink" (replace as needed)
自动值
wikilink
单行文本可选
Stylestyle

Additional CSS styles

wikitext片段可选

Notes

[编辑]
  1. ^ The default assignments come from the module data page.
  2. ^ See https://www.w3schools.com/html/html_styles.asp, with the caveat that not all html features are available in wikitext, see Help:HTML in wikitext.