• Home
  • Random
  • Nearby
  • Log in
  • Settings
Donate Now If Wikipedia is useful to you, please give today.
  • About Wikipedia
  • Disclaimers
Wikipedia

Template:Equation

  • Template
  • Talk
  • Language
  • Watch
  • Edit

1 {\displaystyle {1}} {\displaystyle {1}}

Template documentation[view] [edit] [history] [purge]

Purpose

edit

This template gives an equation passed in as numbered parameter {{{1}}} a number {{{2}}}, which is displayed in the far right column. This also creates an anchor (#equation-{{{2}}}), which can be adjusted with the id parameter.

Usage

edit
{{Equation|1=e = m c^2|2=1}}
{{Equation|1=a^2 + b^2 = c^2|2=2}}
{{Equation|1=X(t) = V_0 t + A t^2|2=3}}

results in:

e = m c 2 {\displaystyle e=mc^{2}} {\displaystyle e=mc^{2}} (1)

a 2 + b 2 = c 2 {\displaystyle a^{2}+b^{2}=c^{2}} {\displaystyle a^{2}+b^{2}=c^{2}} (2)

X ( t ) = V 0 t + A t 2 {\displaystyle X(t)=V_{0}t+At^{2}} {\displaystyle X(t)=V_{0}t+At^{2}} (3)

Note: Wikisyntax (e.g. formatting templates like {{sub}}) doesn't work in this template, use LaTeX syntax instead.
Note: When converting from a plain <math> tag to this template, you will need to replace the pipe symbol | with {{!}} and }} with } }.

TemplateData

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

TemplateData for Equation

This template generates an equation (passed in LaTeX) with a number to the right. It also generates an anchor so that the equation can be linked to from other parts of the page.

Template parameters[Edit template data]

This template prefers block formatting of parameters.

ParameterDescriptionTypeStatus
Equation (LaTeX)1

See Wikipedia:LaTeX for instructions if unfamiliar.

Example
e^{iz} = \cos(z) + i \sin(z)
Stringrequired
Equation number2

The number of the equation, also used to generate the anchor

Stringsuggested
Anchor idid

The anchor id. If you set this to "my-eqn" (no quotes), the link [[#my-eqn|see my equation]] will take you to the equation.

Default
Defaults to "equation-" + the equation number, if that is specified.
Stringoptional
The above documentation is transcluded from Template:Equation/doc. (edit | history)
Editors can experiment in this template's sandbox (create | mirror) and testcases (create) pages.
Add categories to the /doc subpage. Subpages of this template.
Retrieved from "https://en.wikipedia.org/w/index.php?title=Template:Equation&oldid=1280697646"
Last edited on 15 March 2025, at 23:22

Languages

    • অসমীয়া
    • Asturianu
    • Català
    • Dansk
    • Español
    • Euskara
    • Galego
    • Bahasa Indonesia
    • Português
    • Русский
    • کوردی
    • Українська
    • 粵語
    • 中文
    Wikipedia
    • Wikimedia Foundation
    • Powered by MediaWiki
    • This page was last edited on 15 March 2025, at 23:22 (UTC).
    • Content is available under CC BY-SA 4.0 unless otherwise noted.
    • Privacy policy
    • About Wikipedia
    • Disclaimers
    • Contact Wikipedia
    • Code of Conduct
    • Developers
    • Statistics
    • Cookie statement
    • Terms of Use
    • Desktop