Template:Intmath/testcases

From testwiki
Jump to navigation Jump to search

Template:Testcases notice

Template:Purge

Note: the Template:Tlx code is tweaked and/or optimized for use inside the Template:Tlx and Template:Tlx templates.

In IE, except for int, all the integrals seem to render in the beautiful font 'Lucida Sans Unicode', but in Firefox we get this ugly font (it is passable for text style, but would be really ugly in display style)! In which [ugly] font do the integral symbols, other than int, render? Also, in which font does int render? — TentaclesTalk or mailto:Tentacles 17:50, 22 March 2016 (UTC)

Compare vertical alignment and obliqueness of [rotated] int with other [italic] integral symbols:

Template:Intmath/sandboxTemplate:Intmath/sandboxTemplate:Intmath/sandbox
{{intmath/sandbox|int}}&#x200A;<!-- 1 hair space -->{{intmath/sandbox|oiint}}&#x200A;<!-- 1 hair space -->{{intmath/sandbox|int}}

Gamma function (non-italic int as default)

Sandbox: Γ(z) = Template:Intmath/sandbox ettz − 1dt    (With the Template:Tl template, the limits have a much better alignment with the integral symbol.)
Current: Γ(z) = Template:Intmath ettz − 1dt
Γ(''z'') = {{intmath||0|∞}} ''e''<sup>−''t''</sup>&#x200A;<!-- hair space -->''t''&#x200A;<!-- hair space --><sup>''z''&#x200A;<!-- hair space -->−&#x200A;<!-- hair space -->1</sup>''dt''

Gamma function

Sandbox: Γ(z) = Template:Intmath/sandbox ettz − 1dt    (With the Template:Tl template, the limits have a much better alignment with the integral symbol.)
Current: Γ(z) = Template:Intmath ettz − 1dt
Γ(''z'') = {{intmath|int|0|∞}} ''e''<sup>−''t''</sup>&#x200A;<!-- hair space -->''t''&#x200A;<!-- hair space --><sup>''z''&#x200A;<!-- hair space -->−&#x200A;<!-- hair space -->1</sup>''dt''

Line integral

Sandbox: Template:Intmath/sandbox F(x) ∙ dx = −Template:Intmath/sandbox F(x) ∙ dx
Current: Template:Intmath F(x) ∙ dx = −Template:Intmath F(x) ∙ dx
{{intmath|varointclockwise|''C''}} ''F''('''x''') ∙ ''d'''''x''' = −{{intmath|ointctrclockwise|''C''}} ''F''('''x''') ∙ ''d'''''x'''

Maxwell's equations

Sandbox:

Gauss's law Template:Intmath/sandbox EdS = Template:SfracTemplate:Intmath/sandbox ρ dV
Gauss's law for magnetism Template:Intmath/sandbox BdS = 0
Maxwell–Faraday equation Template:Intmath/sandbox Ed = −Template:Intmath/sandbox Template:SfracdS
Ampère's circuital law Template:Intmath/sandbox Bd = Template:Intmath/sandbox Template:Bigμ0J + Template:SfracTemplate:SfracTemplate:BigdS

Current:

Gauss's law Template:Intmath EdS = Template:SfracTemplate:Intmath ρ dV
Gauss's law for magnetism Template:Intmath BdS = 0
Maxwell–Faraday equation Template:Intmath Ed = −Template:Intmath Template:SfracdS
Ampère's circuital law Template:Intmath Bd = Template:Intmath Template:Bigμ0J + Template:SfracTemplate:SfracTemplate:BigdS
{{intmath|oiint|∂Ω}} '''E''' ∙ ''d'''''S''' = {{sfrac|1|''ε''<sub>0</sub>}}{{intmath|iiint|Ω}} ''ρ'' ''dV''
{{intmath|oiint|∂Ω}} '''B''' ∙ ''d'''''S''' = 0
{{intmath|oint|∂Σ}} '''E''' ∙ ''d''<nowiki />'''''ℓ<!-- ℓ -->''''' = −{{intmath|iint|Σ}} {{sfrac|∂'''B'''|∂''t''}} ∙ ''d'''''S'''
{{intmath|oint|∂Σ}} '''B''' ∙ ''d''<nowiki />'''''ℓ<!-- ℓ -->''''' = {{intmath|iint|Σ}} {{big|(}} <!-- hair space -->''μ''<sub>0</sub>'''J''' + {{sfrac|1|''c''<sup>2</sup>}}{{sfrac|∂'''E'''|∂''t''}}{{big|)}} ∙ ''d'''''S'''

Compare vertical alignment and obliqueness of [rotated] int with other [italic] integral symbols:

Template:Math
{{math| {{intmath/sandbox|int}}&#x200A;<!-- 1 hair space -->{{intmath/sandbox|oiint}}&#x200A;<!-- 1 hair space -->{{intmath/sandbox|int}} }}

Gamma function (non-italic int as default)

Sandbox: Template:Math
Current: Template:Math
{{math|Γ(''z'') {{=}} {{intmath||0|∞}} ''e''<sup>−''t''</sup>&#x200A;<!-- hair space -->''t''&#x200A;<!-- hair space --><sup>''z''&#x200A;<!-- hair space -->−&#x200A;<!-- hair space -->1</sup>''dt''}}

Gamma function

Sandbox: Template:Math
Current: Template:Math
{{math|Γ(''z'') {{=}} {{intmath|int|0|∞}} ''e''<sup>−''t''</sup>&#x200A;<!-- hair space -->''t''&#x200A;<!-- hair space --><sup>''z''&#x200A;<!-- hair space -->−&#x200A;<!-- hair space -->1</sup>''dt''}}

Line integral

Sandbox: Template:Math
Current: Template:Math
{{math|{{intmath|varointclockwise|''C''}} ''F''('''x''') ∙ ''d'''''x''' {{=}} −{{intmath|ointctrclockwise|''C''}} ''F''('''x''') ∙ ''d'''''x'''}}

Maxwell's equations

Sandbox:

Gauss's law Template:Math
Gauss's law for magnetism Template:Math
Maxwell–Faraday equation Template:Math
Ampère's circuital law Template:Math

Current:

Gauss's law Template:Math
Gauss's law for magnetism Template:Math
Maxwell–Faraday equation Template:Math
Ampère's circuital law Template:Math
{{math|{{intmath|oiint|∂Ω}} '''E''' ∙ ''d'''''S''' {{=}} {{sfrac|1|''ε''<sub>0</sub>}}{{intmath|iiint|Ω}} ''ρ'' ''dV''}}
{{math|{{intmath|oiint|∂Ω}} '''B''' ∙ ''d'''''S''' {{=}} 0}}
{{math|{{intmath|oint|∂Σ}} '''E''' ∙ ''d''<nowiki />'''''ℓ<!-- ℓ -->''''' {{=}} −{{intmath|iint|Σ}} {{sfrac|∂'''B'''|∂''t''}} ∙ ''d'''''S'''}}
{{math|{{intmath|oint|∂Σ}} '''B''' ∙ ''d''<nowiki />'''''ℓ<!-- ℓ -->''''' {{=}} {{intmath|iint|Σ}} {{big|(}} <!-- 1 hair space -->''μ''<sub>0</sub>'''J''' + {{sfrac|1|''c''<sup>2</sup>}}{{sfrac|∂'''E'''|∂''t''}}{{big|)}} ∙ ''d'''''S'''}}

Text style inline formulae

Sandbox: Line spacing is undisturbed.

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Gauss's Law: Template:Math Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Template:Math Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.

Current: Messes up the line spacing.

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Gauss's Law: Template:Math Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Template:Math Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.

Display style standalone formulae

Compare vertical alignment and obliqueness of [rotated] int with other [italic] integral symbols:

Template:Bigmath
{{Bigmath| {{intmath/sandbox|int}}&#x200A;<!-- 1 hair space -->{{intmath/sandbox|oiint}}&#x200A;<!-- 1 hair space -->{{intmath/sandbox|int}} }}

Gamma function

LaTeX:

The Gamma function is defined as

Γ(z)=0ettz1dt.

Sandbox:

The Gamma function is defined as

Template:Bigmath

Current:

The Gamma function is defined as

Template:Bigmath
{{Bigmath|Γ(''z'') {{=}} {{intmath|int|0|∞}} ''e''<sup>−''t''</sup>&#x200A;<!-- hair space -->''t''&#x200A;<!-- hair space --><sup>''z''&#x200A;<!-- hair space -->−&#x200A;<!-- hair space -->1</sup>''dt''.}}

Maxwell's equations

LaTeX:

Gauss's law:

Template:Oiint

Gauss's law for magnetism:

Template:Oiint

Maxwell–Faraday equation:

Σ𝐄d=Σ𝐁td𝐒

Ampère's circuital law:

Σ𝐁d=Σ(μ0𝐉+1c2𝐄t)d𝐒

Sandbox:

Gauss's law:

Template:Bigmath

Gauss's law for magnetism:

Template:Bigmath

Maxwell–Faraday equation:

Template:Bigmath

Ampère's circuital law:

Template:Bigmath

Current:

Gauss's law:

Template:Bigmath

Gauss's law for magnetism:

Template:Bigmath

Maxwell–Faraday equation:

Template:Bigmath

Ampère's circuital law:

Template:Bigmath
Gauss's law: :{{Bigmath|{{intmath|oiint|∂Ω}} '''E''' ∙ ''d'''''S''' {{=}} {{sfrac|1|''ε''<sub>0</sub>}}{{intmath|iiint|Ω}} ''ρ'' ''dV''}}
Gauss's law for magnetism: :{{Bigmath|{{intmath|oiint|∂Ω}} '''B''' ∙ ''d'''''S''' {{=}} 0}}
Maxwell–Faraday equation: :{{Bigmath|{{intmath|oint|∂Σ}} '''E''' ∙ ''d''<nowiki />'''''ℓ<!-- ℓ -->''''' {{=}} −{{intmath|iint|Σ}} {{sfrac|∂'''B'''|∂''t''}} ∙ ''d'''''S'''}}
Ampère's circuital law: :{{Bigmath|{{intmath|oint|∂Σ}} '''B''' ∙ ''d''<nowiki />'''''ℓ<!-- ℓ -->''''' {{=}} {{intmath|iint|Σ}} {{big|(}} <!-- 1 hair space -->''μ''<sub>0</sub>'''J''' + {{sfrac|1|''c''<sup>2</sup>}}{{sfrac|∂'''E'''|∂''t''}}{{big|)}} ∙ ''d'''''S'''}}

\iiiint and \idotsint

LaTeX:

<math>H {{=}} \iiiint_{\rm 4\mbox{-}ball} dH</math> yields

H=4-balldH

<math>H {{=}} \idotsint_{n{\rm \mbox{-}ball}} dH</math> yields

Failed to parse (unknown function "\idotsint"): {\displaystyle H {{=}} \idotsint_{n{\rm \mbox{-}ball}} dH}

<math>H {{=}} \int \cdots \int_{n{\rm \mbox{-}ball}} dH</math> yields

H=n-balldH

<math>H {{=}} \int \!\cdots\! \int_{n{\rm \mbox{-}ball}} dH</math> yields (the better spaced)

H=n-balldH

Sandbox:

{{math| H {{=}} {{intmath/sandbox|iiiint|4-ball}} ''dH'' }} yields the HTML text style Template:Math

{{math| H {{=}} {{intmath/sandbox|idotsint|''n''-ball}} ''dH'' }} yields the HTML text style Template:Math

{{bigmath| H {{=}} {{intmath/sandbox|iiiint|4-ball}} ''dH'' }} yields the HTML display style

Template:Bigmath

{{bigmath| H {{=}} {{intmath/sandbox|idotsint|''n''-ball}} ''dH'' }} yields the HTML display style

Template:Bigmath

Quotient of integrals

LaTeX:

<math>\frac{ \int_0^\infty x^{2n} e^{-a x^2}\,dx }{ \int_0^\infty x^{2(n-1)} e^{-a x^2}\,dx } = \frac{2n-1}{2a}</math> yields

0x2neax2dx0x2(n1)eax2dx=2n12a

Sandbox (without the tiny [fourth parameter] option):

:{{bigmath|<!-- 
-->{{sfrac
   | {{intmath/sandbox|int|0|∞}} ''x''<sup>2''n''</sup> ''e''<sup>−''ax''<sup>2</sup></sup> ''dx''<!-- 
-->| {{intmath/sandbox|int|0|∞}} ''x''<sup>2(''n''−1)</sup>  ''e''<sup>−''ax''<sup>2</sup></sup> ''dx''<!-- 
-->}} {{=}} {{sfrac|2''n'' − 1|2''a''}} }}

yields (Template:Tl should have vertical-align: middle;)

Template:Bigmath

Sandbox (with the tiny [fourth parameter] option):

:{{bigmath|<!-- 
-->{{sfrac
   | {{intmath/sandbox|int|0|∞|tiny}} ''x''<sup>2''n''</sup> ''e''<sup>−''ax''<sup>2</sup></sup> ''dx''<!-- 
-->| {{intmath/sandbox|int|0|∞|tiny}} ''x''<sup>2(''n''−1)</sup>  ''e''<sup>−''ax''<sup>2</sup></sup> ''dx''<!-- 
-->}} {{=}} {{sfrac|2''n'' − 1|2''a''}} }}

yields (Template:Tl should have vertical-align: middle;)

Template:Bigmath

Current:

:{{bigmath|<!-- 
-->{{sfrac
   | {{intmath|int|0|∞}} ''x''<sup>2''n''</sup> ''e''<sup>−''ax''<sup>2</sup></sup> ''dx''<!-- 
-->| {{intmath|int|0|∞}} ''x''<sup>2(''n''−1)</sup>  ''e''<sup>−''ax''<sup>2</sup></sup> ''dx''<!-- 
-->}} {{=}} {{sfrac|2''n'' − 1|2''a''}} }}

yields

Template:Bigmath

Sandbox (without the tiny [fourth parameter] option):

:{{bigmath|<!-- 
-->{{sfrac
   | {{intmath/sandbox|oiint|∂Ω}} '''E''' ∙ ''d'''''S'''<!-- 
-->| {{intmath/sandbox|iiint|Ω}} ''ρ'' ''dV''<!-- 
-->}} {{=}} {{sfrac|1|''ε''<sub>0</sub>}} }}

yields (Template:Tl should have vertical-align: middle;)

Template:Bigmath

Sandbox (with the tiny [fourth parameter] option):

:{{bigmath|<!-- 
-->{{sfrac
   | {{intmath/sandbox|oiint|∂Ω||tiny}} '''E''' ∙ ''d'''''S'''<!-- 
-->| {{intmath/sandbox|iiint|Ω||tiny}} ''ρ'' ''dV''<!-- 
-->}} {{=}} {{sfrac|1|''ε''<sub>0</sub>}} }}

yields (Template:Tl should have vertical-align: middle;)

Template:Bigmath