模板:Mvar/doc

来自决策链云智库
< 模板:Mvar
Zeroclanzhang讨论 | 贡献2024年1月21日 (日) 23:08的版本 (创建页面,内容为“{{Documentation subpage}} <!-- Categories and interwikis go at the bottom of this page. --> {{high-use| 2796 }} The '''mvar''' template makes the argument italic and formats as mathematics. It is used to refer to individual variables in normal running text. It should not be used within a {{tl|math}} template. Note that digits in a variable name are conventionally not italic so {{tl|math}} should be used instead in for example <nowiki>{{math|''x''<sub>1</sub>}…”)
(差异) ←上一版本 | 最后版本 (差异) | 下一版本→ (差异)

The mvar template makes the argument italic and formats as mathematics. It is used to refer to individual variables in normal running text. It should not be used within a {{math}} template.

Note that digits in a variable name are conventionally not italic so {{math}} should be used instead in for example {{math|''x''<sub>1</sub>}} to produce x1. Functions and variables made up of multiple letters are conventionally set in upright letters so {{math}} should be used in that case too; for example {{math|cos}} to produce cos.

Usage

For example:

Let {{mvar|x}} be the maximum value used.

produces:

Let x be the maximum value used.

TemplateData

This is the TemplateData for this template used by TemplateWizard, VisualEditor and other tools. See a monthly parameter usage report for Template:Mvar in articles based on its TemplateData.

TemplateData for Mvar

Marks text as a variable and formats it as math

模板参数

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

参数描述类型状态
variable1

无描述

单行文本必需

See also

  • {{var}}, for non-mathematical variables
  • {{math}}, which formats its argument as mathematics
  • {{bigmath}}, the same as {{math}} but makes it bigger
  • {{tmath}}, which wraps a TeX math expression in <math> tags