模板:Xt

維基百科,自由的百科全書

示例

文件圖示 模板文件[檢視] [編輯] [歷史] [清除快取]

{{xt}}等(「example text」的縮寫)是文字格式模板,多在不便使用引號或粗體時,用彩色字體凸顯文字。

用法[編輯]

{{xt}}會將文字設為綠色襯線字體,用於凸顯正面示例格式手冊常用本模板標記一段話中的正確示例。如果不宜使用襯線體(如電腦代碼內),可換用{{bxt}}(改用粗體)或{{mxt}}(改用等寬字體)。如果希望示例文字自起一行,可換用{{xt2}}

若凸顯不佳或錯誤的示例,請使用 {{!xt}}{{!bxt}}{{!mxt}}{{!xt2}}等模板。

若凸顯廢棄、不確定、不可用等示例,可使用{{xtd}}(d代表deprecated)模板或其別名{{xtg}}(g代表grey)。相關模板還有{{bxtd}}{{mxtd}}

若凸顯中性示例,可使用{{xtn}}。此模板不修改文字顏色,惟將字體切換為襯線體。粗體版可使用{{bxtn}}

These templates cannot be used in mainspace (articles). Attempting to do so will throw an error.

These templates are not for use as quotation markup in talk pages; use {{tq}} instead.

Parameters[編輯]

  • |text here or |1=text here – The text to which to apply the markup. As with all templates, when the text has any equals characters ("="), explicitly prefix the text with |1= or the template will break.
  • |title=tooltip text here – Takes text, which cannot be marked up in any way, and displays it as a pop-up "tooltip" (in most browsers) when the cursor hovers over the span

Accessibility[編輯]

The accompanying change in typeface to a serif or mono-spaced type style, (example text) is to make it fully accessible for those with color blindness.

Keep accessibility more broadly in mind, and never construct examples such that a blind person, who may not be able to see the coloration, boldfacing, or monospace font change, cannot understand the examples. Especially indicate, with terms like "not", "don't", "wrong:", etc., that a negative example is a negative one, or with "deprecated", "avoid", etc., that deprecated material is deprecated.

Examples[編輯]

What you write
...for example, {{xt|1=''T'' = 293.15 K}}, but not {{!xt|1=''m''=5.4kg}}.
What you get
...for example, T = 293.15 K, but not m=5.4kg.
What you type What you get
this is an {{xt|inline typeface change}} for comparison this is an inline typeface change for comparison
this is an {{!xt|inline typeface change}} for comparison this is an inline typeface change for comparison
this is an {{xtn|inline typeface change}} for comparison this is an inline typeface change for comparison
this is an {{xtd|inline typeface change}} for comparison this is an inline typeface change for comparison
this is an {{mxt|inline typeface change}} for comparison this is an inline typeface change for comparison
this is an {{!mxt|inline typeface change}} for comparison this is an Template:!mxt for comparison
this is an {{mxtn|inline typeface change}} for comparison this is an Template:Mxtn for comparison
this is an {{mxtd|inline typeface change}} for comparison this is an Template:Mxtd for comparison
this is an {{bxt|inline typeface change}} for comparison this is an Template:Bxt for comparison
this is an {{!bxt|inline typeface change}} for comparison this is an Template:!bxt for comparison
this is an {{bxtn|inline typeface change}} for comparison this is an Template:Bxtn for comparison
this is an {{bxtd|inline typeface change}} for comparison this is an Template:Bxtd for comparison

See also[編輯]

Template:Xt see also