↑ arvau

Wikipedia / Help:Displaying a formula

There are three methods for displaying formulas in Wikipedia: raw HTML, HTML with math templates (abbreviated here as ), and a subset of latex implemented with the HTML markup (referred to as LaTeX in this article). Each method has some advantages and some disadvantages, which have evolved over time with improvements to the MediaWiki software. The Manual of Style Mathematics has not always evolved accordingly. So the how-to recommendations that appear below may differ from those of the Manual of Style. In this case, they express a consensus resulting of the practice of the most experienced members of WikiProject Mathematics and many discussions at Wikipedia talk:WikiProject Mathematics.

For example, the famous Einstein formula can be entered with:

Raw HTML: , which is rendered as

  • The template is used here only for avoiding a line break inside the formula.

  • : , which is rendered as

  • LaTeX:

Use of raw HTML

Variable names and many symbols appear very different to the reader when raw HTML is used compared to the other rendering methods. This may be confusing in the common case where several methods are used in the same article. Moreover, mathematicians who are used to reading and writing texts written with LaTeX often find the raw HTML rendering awful.

So, raw HTML should normally not be used for new content. However, raw HTML is still present in many mathematical articles. It is generally a good editing practice to convert it to format, but consistency must be respected; that is, such a conversion must be done in a whole article, or at least in a whole section. Moreover, such a conversion must be identified as such in the edit summary, and making other changes in the same edit should be avoided. This is to help other users identify changes that are possibly controversial (the "diff" of a conversion may be very large, and may hide other changes).

Converting raw HTML to is rather simple: when the formula is enclosed with , it suffices to change "nowrap" into "math". However, if the formula contains an equal sign, one has to add just before the formula for avoiding confusion with the template syntax; for example, . Also, vertical bars (), if any, must either be replaced with or avoided by using .

{{math}}

Both accepted by MOS:MATH, these two methods of writing mathematical expressions—using and LaTeX—have both advantages and disadvantages. The visual rendering of variable names is largely consistent between them, and displaying variables within the same paragraph using either method generally does not cause formatting issues.

The disadvantages of LaTeX include:

  • On some browser configurations, LaTeX inline formulas appear with a slight vertical misalignment, or with a font size that may be slightly different from that of the surrounding text. This is not a problem with a block displayed formula, and also typically not with inline formulas that exceed the normal line height marginally (for example, formulas with subscripts and superscripts).

  • The use of LaTeX in a piped link or in a section heading does not appear in blue in the linked text or the table of contents. Moreover, links to section headings containing LaTeX formulas do not always work as expected.

  • Finally, having many LaTeX formulas may significantly increase the processing time of a page. LaTeX formulas should be avoided in image captions or footnotes, because when the image is clicked for a larger display or a footnote is selected on a mobile device, LaTeX in the caption or footnote will not render.

Disadvantages of include:

  • not all formulas can be displayed,

  • complicated formulae may be poorly rendered,

  • except for the most common symbols such as letters, numerals, and basic punctuation, rendering of Unicode mathematical symbols can be inconsistent in size or alignment where fallback fonts do not match,

  • some readers may not have any font which includes certain uncommon symbols,

  • spaces within a formula must be directly managed (for example, by including explicit hair or thin spaces),

  • variable names must be italicized explicitly, and superscripts and subscripts must use an explicit tag or template, and

  • except for short formulas, the source of a formula typically has more markup overhead and can be difficult to read.

The common practice of most members of WikiProject Mathematics is the following:

  • Use of and for isolated variables and for simple inline formulas; or alternately the use of LaTeX for these purposes (optionally using the template), especially on articles with many complex formulas or where rendering seems inconsistent

  • Use of and for formulas in image captions, even if the rendering is mediocre

  • Use of LaTeX for separately displayed formulas and more complicated inline formulas

  • Use of LaTeX for formulas involving symbols that are not regularly rendered in Unicode (see Manual of Style/Mathematics § Blackboard bold)

  • Avoid formulas in section headings, and when this is necessary, use raw HTML (see for an example)

The choice between and LaTeX depends on the editor. Converting a page from one format to another must be done with stronger reasons than editor preference.

Display format of LaTeX

By default SVG images with non-visible MathML are generated. The text-only form of the LaTeX can be set via .

The hidden MathML can be used by screen readers and other assistive technology. In Firefox, to display the MathML:

In either case, you must have fonts that support MathML (see Mozilla Fonts for MathML) installed on your system. For copy-paste support in Firefox, you can also install MathML Copy.

Spaces and ordinary text

Formulas using multiple words and hyphens are not functional in . For example, this code, which gives a simple formula for calculating pollution risks:

Risk = \frac{Measured environmental concentration}{Predicted no-effect concentration}

produces this unreadable result:

A possible workaround is the use of \text:

\text{Risk} = \frac{\text{Measured environmental concentration}}{\text{Predicted no-effect concentration}}

which produces:

Use of HTML templates

TeX (LaTeX) markup is not the only way to render mathematical formulas. For simple inline formulas, the template and its associated templates are often preferred. The following comparison table shows that similar results can be achieved with the two methods. Here is a summary of the mathematical templates:

When writing sets or expressions involving braces, vertical bars, or equal signs within , care is required, as these characters can conflict with template syntax. To avoid such issues:

  • Use to safely enclose elements in curly braces ()

  • Use to wrap values in absolute value bars (), avoiding parser function confusion with template pipes.

  • For a single vertical bar (), use .

  • For an equal sign () within template parameters, use .

HTML entities

Though Unicode characters are generally preferred, sometimes HTML entities are needed to avoid problems with wikitext or confusion with other characters:

In the table below, the HTML syntax on the left produces the symbols on the right, but these symbols can also be entered directly into the wikitext either by typing them if they are available on the keyboard, by copy-pasting them, or by using the special character button () in the toolbar. (When editing any Wikipedia page in a desktop web browser, use the "Insert" pulldown menu immediately below the article text, or the "Special characters" menu immediately above the article text.) Normally, lowercase Greek letters should be entered in italics, that is, enclosed between two single quotes (for example,).

Superscripts and subscripts

Spacing

To avoid line-wrapping in the middle of a formula, use . If necessary, a non-breaking space () can be inserted with nbsp;. When an inline formula is long enough, it can be helpful to allow it to break across lines. Whether using LaTeX or templates, split the formula at each acceptable breakpoint into separate tags or templates with any binary relations or operators and intermediate whitespace included at the trailing end rather than leading end of a part.

Typically whitespace should be a regular space () or none at all. In rare circumstances, such as where one character overlaps another due to one being in italics, a thin space can be added with .

Additional

For more on Wikipedia how-tos and math style guidelines, see:

For more on special characters:

LaTeX basics

Math markup goes inside . Chemistry markup goes inside or . can be used in place of to avoid line-wrapping of adjacent text (with caveats). All these tags use TeX.

The TeX code has to be put literally: MediaWiki templates, predefined templates, and parameters cannot be used within math tags: pairs of double braces are ignored and "#" gives an error message. However, math tags work in the true and false parameters of an #if expression, etc. See m:Template:Demo of attempt to use parameters within TeX for more information.

The now deprecated tag was considered too ambiguous, and it has been replaced by .

LaTeX commands

LaTeX commands are case-sensitive, and take one of the following two formats:

  • They start with a backslash \ and then have a name consisting of letters only. Command names are terminated by a space, a number or any other "non-letter" character.

  • They consist of a backslash \ and exactly one non-letter.

Some commands need an argument, which has to be given between curly braces {} after the command name. Some commands support optional parameters, which are added after the command name in square brackets []. The general syntax is:

Special characters

The following symbols are reserved characters that either have a special meaning under LaTeX or are unavailable in all the fonts. If you enter them directly in your text, they will normally not render, but rather do things you did not intend.

# $ % ^ & _ { } ~ \

These characters can be entered by prefixing the escape character backslash \ or using special sequences:

\# \$ \% ^\wedge \& \_ \{ \} \sim \backslash

yielding:

The backslash character \ can not be entered by adding another backslash in front of it (); this sequence is used for line breaking. For introducing a backslash in math mode, you can use \backslash.

The command \tilde produces a tilde which is placed over the next letter. For example, \tilde{a}. To produce just a tilde character , use \tilde{\ }, placing a ~ over an empty box. Alternatively \sim, a large centred ~ which may be more appropriate in some situations.

The command \hat produces a hat over the next character, for example \hat{o}. For a stretchable version, use \widehat{abc}. The wedge \wedge. The sequence {}^\wedge the best equivalent to the ASCII caret ^ character.

Spaces

"Whitespace" characters, such as blank or tab, are treated uniformly as "space" by LaTeX. Several consecutive whitespace characters are treated as one "space". See for commands that produce spaces of different size.

Modified vertical spacing is accomplished via an optional parameter passed to the terminate line command, , passing it a number of units and the name of a unit; for example, means to add 0.6 "mu" units. Not all LaTeX units are available; available options are:

LaTeX environments

Environments in LaTeX have a role that is quite similar to commands, but they usually have effect on a wider part of formula. Their syntax is: Environments supported by Wikipedia include matrix, align, etc. See .

Rendering

The font sizes and types are independent of browser settings or CSS. Font sizes and types will often deviate from what HTML renders. Vertical alignment with the surrounding text can also be a problem; a work-around is described in . The CSS selector of the images is .

Apart from function and operator names, as is customary in mathematics, variables and letters are in italics; digits are not. For other text, (like variable labels) to avoid being rendered in italics like variables, use or (formerly ). You can also define new function names using . For example, . provides spacing before and after the operator name when appropriate, as when (with space to the left and right of "sn") and (with space to the left and not to the right). LaTeX's starred version, is not supported, but a workaround is to add instead. For example, renders as:

LaTeX does not have full support for Unicode characters, and not all characters render. Most Latin characters with accents render correctly. However some do not, in particular those that include multiple diacritics (e.g. with Latin letters used in Vietnamese) or that cannot be precomposed into a single character (such as the uppercase Latin letter W with ring ), or that use other diacritics (like the ogonek or the double grave accent, used in Central European languages like Polish, or the horn attached above some vowels in Vietnamese), or other modified letter forms (used in IPA notations, African languages, or in medieval texts), some digram ligatures (like in Dutch), or Latin letters borrowed from Greek, or small capitals, as well as superscripts and subscript letters. For example, and (used in Icelandic) will give errors.

The normal way of entering quotation marks in text mode (two back ticks for the left and two apostrophes for the right), such as will not work correctly. As a workaround, you can use the Unicode left and right quotation mark characters, which are available from the special characters button (), or "Symbols" dropdown panel beneath the editor: .

Force-rerendering of formulas

MediaWiki stores rendered formulas in a cache so that the images of those formulas do not need to be created each time the page is opened by a user. To force the rerendering of all formulas of a page, you must open it with the getter variables action=purge&mathpurge=true. Imagine for example there is a wrong rendered formula in the article Integral. To force the re-rendering of this formula you need to open the URL: https://en.wikipedia.org/w/index.php?title=Integral&action=purge&mathpurge=true

Afterwards you need to bypass your browser cache, so that the new created images of the formulas are actually downloaded.

Formatting using LaTeX

Functions, symbols, special characters

For a little more semantics on these symbols, see this brief TeX Cookbook or here TeX Cookbook.

Larger expressions

Subscripts, superscripts, integrals

Fractions, matrices, multilines

Parenthesizing big expressions, brackets, bars

You can use various delimiters with \left and \right:

Display attribute

The tag can take a display attribute with possible values of inline and block.

Inline

If the value of the display attribute is inline, the contents will be rendered in inline mode: there will be no new paragraph for the equation and the operators will be rendered to consume only a small amount of vertical space.

converges to 2; the vertical space between lines is not disturbed by large operators.

The code for the math example reads:

The quotation marks around inline are optional and is also valid.

Technically, the command \textstyle will be added to the user input before the TeX command is passed to the renderer. The result will be displayed without further formatting by outputting the image or MathML element to the page.

Block

In block-style, the equation is rendered in its own paragraph and the operators are rendered consuming less horizontal space. The equation is indented.

converges to 2.

It was entered as

Technically, the command \displaystyle will be added to the user input (if the user input does not already contain the string \displaystyle or \align) before the TeX command is passed to the renderer. The result will be displayed in a new paragraph. Therefore, the style of the MathImage is altered, i.e. the style attribute display: block; margin: auto; is added. For MathML, it is ensured that display=inline is replaced by display block which produces a new paragraph.

Not specified

If nothing is specified, the equation is rendered in the same display style as "block", but without using a new paragraph. If the equation does appear on a line by itself, it is not automatically indented.

converges to 2; the vertical space between lines is disturbed by large operators.

Or:

The sum

converges to 2.

In both cases, the math is coded as:

Equation numbering

The templates and can be used to number equations. The template can be used to refer to a numbered equation from surrounding text. For example, the following syntax:

produces the following result (note the equation number in the right margin):

Later on, the text can refer to this equation by its number using syntax like this:

The result looks like this:

  1. As seen in equation (), example text...

The equation number produced by is a link that the user can click to go immediately to the cited equation.

Alphabets and typefaces

Texvc (used in MediaWiki 1.32 and older) cannot render arbitrary Unicode characters. Those it can handle, can be entered by the expressions below. For others, such as Cyrillic, they can be entered as Unicode or HTML entities in running text, but cannot be used in displayed formulas.In the above directives, the text-mode layout algorithm is used: spaces and kerning "just work". In addition to the \math...{} font directives, the text-fonts such as \textit{} are also available. The text-fonts are subtly different from their math-font siblings.

Mixed text faces

Color

Equations can use color with the \color command. For example,The \color command colors all symbols to its right. However, if the \color command is enclosed in a pair of braces (e.g. {\color{Red}...}) then no symbols outside of those braces are affected.There are several alternate notation styles.Some color names are predeclared according to the following table, you can use them directly for the rendering of formulas (or for declaring the intended color of the page background).

Color should not be used as the only way to identify something, because it will become meaningless on black-and-white media or for color-blind people. See WP:Manual of Style (accessibility)#Color.

LaTeX does not have a command for setting the background color. The most effective way of setting a background color is by setting a CSS styling rule for a table cell:

Rendered as:Custom colors can be defined using:

Formatting issues

Spacing

TeX handles most spacing automatically, but you may sometimes want manual control.Automatic spacing may be broken in very long expressions (because they produce an overfull hbox in TeX):

This can be remedied by putting a pair of braces { } around the whole expression:

are employed as ordinary symbols, for example in bra–ket notation, additional spacing may have to be avoided:

Empty horizontal or vertical spacing

The phantom commands create empty horizontal and/or vertical space the same height and/or width of the argument.

Alignment with normal text flow

Because of the default CSS

should look good.

If you need to align it otherwise, use and play with the argument until you get it right; however, how it looks may depend on the browser and the browser settings.

If you rely on this workaround, if and when the rendering on the server gets fixed in a future release, this extra manual offset will suddenly make every affected formula align incorrectly. So use it sparingly, if at all.

Unimplemented elements and workarounds

The Math extension works by translating a LaTeX input to MathML and then optionally using MathJax 3 to render the MathML. As a result both the translator and MathJax can cause an equation to error out, with the feature appearing unimplemented. The authors of the Math extension try to make sure that every error is found in the "translating" step, so it is used even if not needed as a safety check. (Because MathJax's own tranlator is not used in any point, their list of differences cannot be used to predict whether an expression can be displayed through the Math extension.)

The full grammar for the subset of (La)TeX allowed by the current WikiTexVC checker can be found in parser.pegjs. This subset is much more restrictive than the MathJax subset, so do expect to see things that work in MathJax fail to work here. As the name suggests, it mostly implements the dialect accepted by texvc, representative of what was considered "enough" for LaTeX on the web circa 2007.

Special integral operators

The following integral operators that are not supported by the default font of MathJax 2.7 are available:

They have poor horizontal spacing, generate cropped SVG images unless used with other tall characters, and appear different from the usual integral symbol :

cf. phab:T348587. However, they render fine when MathML is used.

\oiint and \oiiint

Elements which are not yet implemented are , namely a two-fold integral with a circular curve through the centre of the two integrals, and similarly , a circular curve through three integrals. In contrast, exists for the single dimension (integration over a curved line within a plane or any space with higher dimension).

These elements appear in many contexts: denotes a surface integral over the closed 2d boundary of a 3d region (which occurs in much of 3d vector calculus and physical applications – like Maxwell's equations), likewise denotes integration over the closed 3d boundary (surface volume) of a 4d region, and they would be strong candidates for the next TeX version. As such there are a lot of workarounds in the present version.

  1. {| class="toccolours collapsible collapsed" width="80%" style="text-align:left"

! and using currently implemented symbols |- | looks like:

  • , which uses along with and (overdrawn after backspacing):

    , which uses twice (with some backward kerning) along with (also overdrawn after backpacing) to produce a more consistent circle:

(should also be preferably more tightly kerned) looks more or less like:

  • which uses three \int symbols (with more backward kerning) with \subset and \supset (overdrawn after backspacing):

    , which uses three symbols (with more backward kerning) along with (also overdrawn after backspacing):

|}

However, since no standardisation exists as yet, any workaround like this (which uses many symbols for backspacing) should be avoided, if possible. See below for a possibility using PNG image enforcement.

Note that (the double integral) and (the triple integral) are still not kerned as they should preferably be, and are currently rendered as if they were successive symbols; this is not a major problem for reading the formulas, even if the integral symbols before the last one do not have bounds, so it's best to avoid backspacing "hacks" as they may be inconsistent with a possible future better implementation of integrals symbols (with more precisely computed kerning positions).

\oiint and \oiiint as PNG images

These symbols are available as PNG images which are also integrated into two templates, and , which take care of the formatting around the symbols.

The templates have three parameters:

  1. preintegral: the text or formula immediately before the integral

  2. intsubscpt: the subscript below the integral

  3. integrand: the text or formula immediately after the integral

Examples
Oriented \oiint and \oiiint as PNG images

Some variants of and have arrows on them to indicate the sense of integration, such as a line integral around a closed curve in the clockwise sense, and higher dimensional analogues. These are not implemented in TeX on Wikipedia either, although the template is available - see link for details.

Arc notation \overarc

is not yet implemented to display the arc notation. However, there exists a workaround: use , which gives

For longer arcs, use :

3.

Triple dot \dddot

is not implemented. For a workaround use , which gives

.

Starred operatorname \operatorname*

The starred version of \operatorname is not currently supported. A workaround for is either or

Strikethrough

Strikethrough like or is not implemented, nor is overlapping like . This means struck characters like ƛ are difficult to type, except the hardcoded . A workaround suffix for a normal strikethrough is , and for elevated strikethrough is , which give

Formatting in \text

Formatting in is not supported. In other words, you cannot use:

but have to use:

More specifically, in Mathoid's MathJax, no processing is done to the contents of at all. The texvcjs component blocks the use of macros, but another way this behavior leaks through is in the processing of quotation marks, where the Unicode version must be used instead of :

It is currently impossible to get straight (typewriter) quotes in MathJax.

A similar but not-quite-related issue is that there is also no such thing as a "bold sans-serif" because formatting macros cannot be nested.

Automatic line-breaking

The current image-based implementation precludes automatic line-breaking of inline formulae after binary operators and "=" as seen in TeX. The only workarounds are to not write long formulae inline, or to split the formula into separate parts at each acceptable break point.

Readers wishing to enable automatic line-breaking can try to have the browser render the MathML itself or to use an alternate in-browser renderer.

Unicode characters

Non-ASCII Unicode characters like work in MathML, but not in Mathoid (server-side MathJax in SVG/PNG mode, after validation by texvcjs). They should be avoided for maximum compatibility.

MathJax itself supports Unicode characters in \text{}, but the texvcjs validator insists on blocking them (replicating old texvc behavior). A formal feature request and discussion is required to fix this.

Inline framed box

TeX has \fbox{} for putting text in a box, and LaTeX+AMSMath has \boxed{} where the inside is instead in math mode. Both are supported by MathJax, but neither is supported by Mathoid for some reason (possibly another one of those texvc bug-compatible featues). There is no workaround except using a different way to emphasize a part of your formula.

Syntax to avoid

Invisible Unicode characters

A rare but very frustrating cause of inexplicable syntax errors is invisible Unicode characters copied from some other source. For example, the Windows Calculator includes Unicode Bidirectional text control characters in its output: U+202D (left-to-right override) at the beginning and U+202C (pop directional formatting) at the end. These characters can be invisibly pasted into the Wikipedia editor, but will cause messages from the LaTeX renderer, despite the source appearing to be correct. It can usually be fixed by deleting and manually retyping the beginning and end of the pasted text.

Long variable names in math mode

In LaTeX (and compatible implementations such as MathJax), the math mode is designed with the assumption that variable names should be single letters. Breaking the rule causes visibly bad kerning. To work around this problem, either avoid using these kinds of variable names, or surround them with a typeface or text directive such as \mathit{WorkTab} (see § Alphabets and typefaces above). If a function name is intended, use \operatorname{func}.

Deprecated syntax

The texvc processor accepted some non-standard control sequences. These are now deprecated for Wikipedia use because the MathJax-based renderers do not support them. This is part of an effort to update the math engine. See mw:Extension:Math/Roadmap for details. A bot User:Texvc2LaTeXBot will replace this syntax on the English Wikipedia.

Chemistry

There are three ways to render chemical sum formulas as used in chemical equations:

  • ( is a deprecated alias for it)

  • and

is short for (where X is a chemical sum formula)

Technically, is a math tag with the extension mhchem enabled, according to the MathJax documentation.

Wikipedia:Manual of Style/Chemistry advises avoiding the and markup methods when possible.

Note that the commands \cee and \cf are disabled, because they are marked as deprecated in the mhchem LaTeX package documentation.

If the formula reaches a certain "complexity", spaces might be ignored ( might be rendered as if it were with a positive charge). In that case, write (and not as was previously suggested). This will allow auto-cleaning of formulas once the bug is fixed and/or a newer version of mhchem is available.

Please note that there are still major issues with mhchem support in MediaWiki. Some issues can be solved by enabling the extension using and formatting individual items with \ce. For example,

Molecular and condensed formula

Bonds

Charges

Addition compounds and stoichiometric numbers

Wiki linking

(Italic) Math

Upright text

Oxidation states

Greek characters

Isotopes

States

Subscripting states is not an IUPAC recommendation.

PrecipitatePrecipitate and gas formation

Reaction arrows

Note, the syntax , previously used as a workaround, currently causes render errors (as of August 2025). It should be replaced with the simpler syntax, .

Comparison of arrow symbols

Further examples using ordinary LaTeX tags

To align the equations or color them, use and .

Commutative diagrams

1 step method

3 step method

To make a commutative diagram, there are three steps:

  1. write the diagram in TeX

  2. convert to SVG

  3. upload the file to Wikimedia Commons

Diagrams in TeX

Xy-pic and the tikz-cd wrapper for TikZ are powerful and general-purpose diagram packages in . Diagrams created using Xy-pic can be found at Commons: Category:Xy-pic diagrams.

This is the markup for a diagram using the xymatrix syntax of xy-pic:

This is the same diagram using the barr syntax of xy-pic

This is the same diagram using tikz-cd.

Simpler packages include:

The following is a template for Xy-pic:

Using postscript drivers may in some cases give smoother curves and will handle fonts differently:

Convert to SVG

Once you have produced your diagram in LaTeX (or TeX), you can convert it to an SVG file using the following sequence of commands:

The pdfcrop and pdf2svg utilities are needed for this procedure. You can alternatively use pdf2svg from PDFTron for the last step.

If you do not have pdfTeX (which is unlikely) you can use the following commands to replace the first step (TeX → PDF):

In general, you will not be able to get anywhere with diagrams without TeX and Ghostscript, and the program is a useful tool for creating or modifying your diagrams by hand. There is also a utility which supports direct conversion from Postscript files to many vector graphics formats, but it requires a non-free plugin to convert to SVG, and regardless of the format, this editor has not been successful in using it to convert diagrams with diagonal arrows from TeX-created files.

These programs are:

Upload the file

As the diagram is your own work, upload it to Wikimedia Commons, so that all projects (notably, all languages) can use it without having to copy it to their language's Wiki. (If you've previously uploaded a file to somewhere other than Commons, to Commons.)

  1. Check size: Before uploading, check that the default size of the image is neither too large nor too small by opening in an SVG application and viewing at default size (100% scaling), otherwise adjust the -y option to dvips.

  2. Name: Make sure the file has a meaningful name.

  3. Upload: Login to Wikimedia Commons, then upload the file; for the Summary, give a brief description.

Now go to the image page and add a description, including the source code, using this template:

Source code

  • Include the source code in the image page, in the section of the Information}} template, so that the diagram can be edited in future.

  • Include the complete .tex file, not just the fragment, so future editors do not need to reconstruct a compilable file.

  • You may optionally make the source code section collapsible, using the cot}} or cob}} templates.

  • (Don't include it in the Summary section, which is just supposed to be a summary.)

  • License

  • The most common license for commutative diagrams is PD-self; some use PD-ineligible, especially for simple diagrams, or other licenses. Please do not use the GFDL, as it requires the entire text of the GFDL to be attached to any document that uses the diagram.

  • Description

  • If possible, link to a Wikipedia page relevant to the diagram. (The 1= is necessary if you use nest templates within the description, and harmless otherwise.)

  • Category

  • Include , so that it appears in commons:Category:Commutative diagrams. There are also subcategories, which you may choose to use.

  • Include image

  • Now include the image on the original page via . Use to invert colors in dark mode.

Examples

A sample conforming diagram is commons:File:PSU-PU.svg.

While links from formulas using LaTeX macros such as \href or \url or are currently not supported, one can link individual math expressions to Wikidata items to explain the meaning of individual terms of mathematical expressions. For example, links to a special page that displays additional information on that formula. To change the information shown on the special page, navigate to the Wikidata item linked at the bottom of the special page. Use the has part property to link parts of the equation to other Wikidata items with their respective Wikipedia articles. This is not limited to individual identifiers, but can also be used to link more complex terms.

In SVG rendering mode, a condensed version of that special page is shown as a popup. However, in native MathML mode, pop-ups are displayed for individual identifiers.

Examples of implemented TeX formulas

Quadratic polynomial

Quadratic formula

Tall parentheses and fractions

Integrals

Matrices and determinants

Summation

Differential equation

Complex numbers

Limits

Integral equation

Example

Continuation and cases

Prefixed subscript

Fraction and small fraction

Area of a quadrilateral

Volume of a spherical frustum

Multiple equations

The altered newline code \\[0.6ex] times the height of a single 'x' character.

See also

References

Footnotes

Citations