Difference between revisions of "Template:Bigmath/doc"

From blackwiki
Jump to navigation Jump to search
imported>Kri
(→‎See also: + * {{tmath}} and {{bigmath}})
imported>WOSlinker
(change source to syntaxhighlight)
 
(15 intermediate revisions by 9 users not shown)
Line 5: Line 5:
 
Use this template to embed stand-alone formulae in wikitext.  The mathematical capabilities of this template are very limited; use tables with <code>class="texhtml"</code> for formulae requiring non-linear layout.
 
Use this template to embed stand-alone formulae in wikitext.  The mathematical capabilities of this template are very limited; use tables with <code>class="texhtml"</code> for formulae requiring non-linear layout.
  
=== Example ===
+
=== Examples ===
<code><nowiki>
+
<syntaxhighlight lang="html">
{{bigmath|{{frac|&part;&sup2;<VAR >f</VAR >|&part;<VAR >r</VAR >&sup2;}} + {{frac|&part;<VAR >f</VAR >|<VAR >r</VAR > &part;<VAR >r</VAR >}} + {{frac|&part;&sup2;<VAR >f</VAR >|<VAR >r</VAR >&sup2;&part;&sup2;<VAR >&theta;</VAR >}} {{=}} 0}}
+
{{bigmath|{{sfrac|&part;&sup2;<var>f</var>|&part;<var>r</var>&sup2;}} + {{sfrac|&part;<var>f</var>|<var>r</var> &part;<var>r</var>}} + {{sfrac|&part;&sup2;<var>f</var>|<var>r</var>&sup2;&part;&sup2;<var>&theta;</var>}} {{=}} 0}}
</nowiki> </code>
+
</syntaxhighlight>
 
produces:
 
produces:
  
: {{bigmath|{{frac|&part;&sup2;<VAR >f</VAR >|&part;<VAR >r</VAR >&sup2;}} + {{frac|&part;<VAR >f</VAR >|<VAR >r</VAR > &part;<VAR >r</VAR >}} + {{frac|&part;&sup2;<VAR >f</VAR >|<VAR >r</VAR >&sup2;&part;&sup2;<VAR >&theta;</VAR >}} {{=}} 0}}
+
: {{bigmath|{{sfrac|&part;&sup2;<var>f</var>|&part;<var>r</var>&sup2;}} + {{sfrac|&part;<var>f</var>|<var>r</var> &part;<var>r</var>}} + {{sfrac|&part;&sup2;<var>f</var>|<var>r</var>&sup2;&part;&sup2;<var>&theta;</var>}} {{=}} 0}}
 +
 
 +
Use prefix "1=" to allow simple equals-signs. Italicize letters by double-tic (<code><nowiki>''f''</nowiki></code>):
 +
<syntaxhighlight lang="html">
 +
{{bigmath|1={{sfrac|&part;&sup2; ''f''|&part;''r''&sup2;}} + {{sfrac
 +
|&part;''f''|''r'' &part;''r''}} = 0}}
 +
</syntaxhighlight>
 +
 
 +
produces:
 +
 
 +
: {{bigmath|1={{sfrac|&part;&sup2; ''f''|&part;''r''&sup2;}} + {{sfrac
 +
|&part;''f''|''r'' &part;''r''}} = 0}}
 +
 
 +
Note that any extra spaces placed in the template will appear in the output. A long line can be split before any vertical-bar pipe ('|').
 +
 
 +
In contrast, there is <syntaxhighlight lang="tex"><math display=block>\frac{\part^2 f}{\part r^2} + \frac{\part f}{\part r} = 0</math></syntaxhighlight> which produces
 +
<math forcemathmode=mathml display=block>\frac{\partial^2 f}{\partial r^2} + \frac{\partial f}{\partial r} = 0.</math>
 +
This might be an alternative for more complex examples. If that's still too small, leave a comment on https://phabricator.wikimedia.org/T135419 please.
  
 
=== See also ===
 
=== See also ===
* {{tl|math}}
+
{{Math templates |notation}}
* {{tl|bigmath}}
 
* {{tl|tmath}} wraps a [[TeX|{{TeX}}]] math expression in <tt><nowiki><math></nowiki></tt> tags
 
  
<includeonly>
+
<includeonly>{{Sandbox other||
<!-- CATEGORIES AND INTERWIKIS HERE, THANKS -->
+
<!-- CATEGORIES HERE, THANKS -->
[[Category:Mathematical formatting templates|{{PAGENAME}}]]
+
[[Category:Mathematical formatting templates]]
</includeonly>
+
}}</includeonly>

Latest revision as of 07:37, 7 July 2020

Usage

Use this template to embed stand-alone formulae in wikitext. The mathematical capabilities of this template are very limited; use tables with class="texhtml" for formulae requiring non-linear layout.

Examples

{{bigmath|{{sfrac|&part;&sup2;<var>f</var>|&part;<var>r</var>&sup2;}} + {{sfrac|&part;<var>f</var>|<var>r</var> &part;<var>r</var>}} + {{sfrac|&part;&sup2;<var>f</var>|<var>r</var>&sup2;&part;&sup2;<var>&theta;</var>}} {{=}} 0}}

produces:

Template:Sfrac + Template:Sfrac + Template:Sfrac = 0

Use prefix "1=" to allow simple equals-signs. Italicize letters by double-tic (''f''):

{{bigmath|1={{sfrac|&part;&sup2; ''f''|&part;''r''&sup2;}} + {{sfrac
|&part;''f''|''r'' &part;''r''}} = 0}}

produces:

Template:Sfrac + Template:Sfrac = 0

Note that any extra spaces placed in the template will appear in the output. A long line can be split before any vertical-bar pipe ('|').

In contrast, there is

<math display=block>\frac{\part^2 f}{\part r^2} + \frac{\part f}{\part r} = 0</math>

which produces

<math forcemathmode=mathml display=block>\frac{\partial^2 f}{\partial r^2} + \frac{\partial f}{\partial r} = 0.</math> This might be an alternative for more complex examples. If that's still too small, leave a comment on https://phabricator.wikimedia.org/T135419 please.

See also