This site is supported by donations to The OEIS Foundation.

Template:(/doc

From OeisWiki
Jump to: navigation, search

This documentation subpage contains instructions, categories, or other information for Template:(. [<Edit> Template:(]

[⧼Purge⧽ Template:(/doc]

The {{(|expression to delimit|)}} mathematical formatting template delimits expressions with normal or larger size parentheses/square brackets/curly brackets (braces) for either HTML+CSS or LaTeX.

Note: neither a {{[|...|]}} (square bracket) template nor a {{{|...|}}} (brace) template works with MediaWiki!

Usage

{{(|expression to delimit|)}}

or

{{(|expression to delimit|)|type}}

or

{{(|expression to delimit|)|format}}

or

{{(|expression to delimit|)|type|format}}

where the mandatory [dummy] second argument must be ) for visual balancing of left and right delimiters, viz.

{{(|expression to delimit|)}}

and the [optional] third argument (type) is from

  • none: no delimiters;


  • ( ): normal ( ... );
  • big ( ): corresponds to \big( ... \big) in LaTeX;
  • Big ( ): corresponds to \Big( ... \Big) in LaTeX;
  • bigg ( ): corresponds to \bigg( ... \bigg) in LaTeX;
  • Bigg ( ): corresponds to \Bigg( ... \Bigg) in LaTeX;
  • auto ( ): corresponds to \left( ... \right) in LaTeX (default);


  • [ ]: normal [ ... ];
  • big [ ]: corresponds to \big[ ... \big] in LaTeX;
  • Big [ ]: corresponds to \Big[ ... \Big] in LaTeX;
  • bigg [ ]: corresponds to \bigg[ ... \bigg] in LaTeX;
  • Bigg [ ]: corresponds to \Bigg[ ... \Bigg] in LaTeX;
  • auto [ ]: corresponds to \left[ ... \right] in LaTeX;


  • ~ ~: normal { ... };
  • big ~ ~: corresponds to \big\{ ... \big\} in LaTeX;
  • Big ~ ~: corresponds to \Big\{ ... \Big\} in LaTeX;
  • bigg ~ ~: corresponds to \bigg\{ ... \bigg\} in LaTeX;
  • Bigg ~ ~: corresponds to \Bigg\{ ... \Bigg\} in LaTeX;
  • auto ~ ~: corresponds to \left\{ ... \right\} in LaTeX;


  • < >: normal ⟨ ... ⟩;
  • big < >: corresponds to \big\langle ... \big\rangle in LaTeX;
  • Big < >: corresponds to \Big\langle ... \Big\rangle in LaTeX;
  • bigg < >: corresponds to \bigg\langle ... \bigg\rangle in LaTeX;
  • Bigg < >: corresponds to \Bigg\langle ... \Bigg\rangle in LaTeX;
  • auto < >: corresponds to \left\langle ... \right\rangle in LaTeX;


  • << >>: normal ⟪ ... ⟫;
  • big << >>: corresponds to \big{\langle\langle} ... \big{\rangle\rangle} in LaTeX;
  • Big << >>: corresponds to \Big{\langle\langle} ... \Big{\rangle\rangle} in LaTeX;
  • bigg << >>: corresponds to \bigg{\langle\langle} ... \bigg{\rangle\rangle} in LaTeX;
  • Bigg << >>: corresponds to \Bigg{\langle\langle} ... \Bigg{\rangle\rangle} in LaTeX;
  • auto << >>: corresponds to \left{\langle\langle} ... \right{\rangle\rangle} in LaTeX;

and the [optional] format (either fourth argument, or third argument if type is omitted) is from

  • htm: HTML+CSS (default);
  • tex: LaTeX.

Examples

Non mathematical examples

See non mathematical examples.

Mathematical examples with automatically sized groupings

: {{math|{{(|{{frac|1|2}} {{op|+}} {{frac|{{sqrt|{{op|-}}3}}|2}}|)}}{{^|{{^|3|100%}}}} {{=}} {{(|''e''{{^|{{frac|''i''{{sp|1}}{{Gr|pi}}|3}}}}|)}}{{^|{{^|3|100%}}}} {{=}} {{op|-}}1.
|tex = \left( \frac{1}{2} + \frac{ \sqrt{-3} }{2} \right)^3 = \left( e^{ \frac{i \pi}{3} } \right)^3 = -1.|&&}}

yields the display style HTML+CSS

1
2
+
2  −3
2
 3 = e
i π
3
 3 = −1.

and with the $$ option, yields the display style LaTeX

The code (from Buffon’s constant)

: {{math|{{frac|2|{{Gr|pi}}|HTM}} {{=}} 1 + <!--
-->{{sum|''n''{{=}}1|infty|HTM}} ({{op|-}}1){{^|''n''}} (4{{sp|1}}''n'' + 1) <!--
-->{{(|{{frac|{{prod|''i''{{=}}1|''n''}} 2{{sp|1}}''i'' {{op|-}} 1|{{prod|''j''{{=}}1|''n''}} 2{{sp|1}}''j''|HTM}}|)}}{{^|{{^|3|100%}}}} {{=}}
|tex = \frac{2}{\pi} = 1 + \sum_{n=1}^{\infty} (-1)^{n} (4n + 1) \left( \frac{ \prod_{i=1}^n 2i - 1 }{ \prod_{j=1}^n 2j } \right)^3 = |&&}} <!--

  Broken in two to avoid "Error: String exceeds 10,000 character limit."

-->{{math|1 {{op|-}} 5 {{(|{{frac|1|2|HTM}}|)}}{{^|{{^|3|100%}}}} + 9 {{(|{{frac|3|8|HTM}}|)}}{{^|{{^|3|100%}}}} {{op|-}} 13 {{(|{{frac|5|16|HTM}}|)|Big ( )}}{{^|{{^|3|100%}}}} + {{...|cdots}}. 
|tex = \!\! 1 - 5 \left( \frac{1}{2} \right)^3 + 9 \left( \frac{3}{8} \right)^3 - 13 \left( \frac{5}{16} \right)^3 + \cdots.|&&}}

yields the display style HTML+CSS

2
π
= 1 +
n  = 1
  
(−1)n (4 n + 1)
n

i  = 1
2 i − 1
n

j  = 1
2 j
 3 =
1 − 5
1
2
 3 + 9
3
8
 3 − 13
5
16
 3 + .

and with the $$ option, yields the display style LaTeX

The code (from Buffon’s needle problem)

: {{math|''P''{{sp|1}}(''l'', ''d''{{sp|1}}) {{=}} <!--
-->{{(|{{int|0|{{Gr|pi}}|HTM}} sin ''{{Gr|theta}}''{{sp|2}}{{op|sdot}}{{frac|{{d|''{{Gr|theta}}''}}|{{Gr|pi}}|HTM}}|)}}{{sp|1}}{{op|sdot}}''P''{{sp|-5}}{{sub|{{sym|perp}}}}(''l'', ''d''{{sp|1}}) {{=}} <!--
-->{{(|{{frac|{{op|-}}{{sp|1}}[cos ''{{Gr|theta}}''{{sp|2}}]{{subsup|0|{{Gr|pi}}}}|{{Gr|pi}}|HTM}}|)}}{{op|sdot}}{{frac|''l''|''d''|HTM}} {{=}} {{frac|2|{{Gr|pi}}|HTM}}{{op|sdot}}{{frac|''l''|''d''|HTM}}{{sp|3}}.
|tex = P(l, d) 
= \left( \int_{0}^{\pi} \sin \theta \sdot \frac{d\theta}{\pi} \right) \sdot P_{\perp}(l, d)
= \left( \frac{- [\cos \theta]_{0}^{\pi}}{\pi} \right) \sdot \frac{l}{d} = \frac{2}{\pi} \sdot \frac{l}{d} \, .
|&&}}

yields the display style HTML+CSS

P (l, d ) =
π
0
sin θ   ⋅  
dθ
π
  ⋅  P(l, d ) =
− [cos θ  ] π0
π
 ⋅  
l
d
=
2
π
 ⋅  
l
d
 .

and with the $$ option, yields the display style LaTeX

Mathematical examples with manually sized groupings

The manually sized groupings render very badly in Chrome and MS Edge!
: {{math|{{(|{{frac|1|2}} {{op|+}} {{frac|{{sqrt|{{op|-}}3}}|2}}|)|Big}}{{^|{{^|3|100%}}}} {{=|sp}} {{(|''e''{{^|{{frac|''i''{{sp|1}}{{Gr|pi}}|3}}}}|)|big}}{{^|{{^|3|100%}}}} {{=|sp}} {{op|-}}1.
|tex = \left( \frac{1}{2} + \frac{ \sqrt{-3} }{2} \right)^3 = \left( e^{ \frac{i \pi}{3} } \right)^3 = -1.|&&}}

yields the display style HTML+CSS

  
1
2
+
2  −3
2
  
 3  = 
  e
i π
3
  
 3  =  −1.

and with the $$ option, yields the display style LaTeX

The code (from Buffon’s constant)

: {{math|{{frac|2|{{Gr|pi}}|HTM}} {{=|sp}} 1 + <!--
-->{{sum|''n''{{=}}1|infty|HTM}} ({{op|-}}1){{^|''n''}} (4{{sp|1}}''n'' + 1) <!--
-->{{(|{{frac|{{prod|''i''{{=}}1|''n''}} 2{{sp|1}}''i'' {{op|-}} 1|{{prod|''j''{{=}}1|''n''}} 2{{sp|1}}''j''|HTM}}|)|Big ( )}}{{^|{{^|3|100%}}}} {{=|sp}}
|tex = \frac{2}{\pi} = 1 + \sum_{n=1}^{\infty} (-1)^{n} (4n + 1) \left( \frac{ \prod_{i=1}^n 2i - 1 }{ \prod_{j=1}^n 2j } \right)^3 = |&&}} <!--

  Broken in two to avoid "Error: String exceeds 10,000 character limit."

-->{{math|1 {{op|-}} 5 {{(|{{frac|1|2|HTM}}|)|Big ( )}}{{^|{{^|3|100%}}}} + 9 {{(|{{frac|3|8|HTM}}|)|Big ( )}}{{^|{{^|3|100%}}}} {{op|-}} 13 {{(|{{frac|5|16|HTM}}|)|Big ( )}}{{^|{{^|3|100%}}}} + {{...|cdots}}. 
|tex = \!\! 1 - 5 \left( \frac{1}{2} \right)^3 + 9 \left( \frac{3}{8} \right)^3 - 13 \left( \frac{5}{16} \right)^3 + \cdots.|&&}}

yields the display style HTML+CSS

2
π
 =  1 +
n  = 1
  
(−1)n (4 n + 1)
  
n

i  = 1
2 i − 1
n

j  = 1
2 j
  
 3  = 
1 − 5
  
1
2
  
 3 + 9
  
3
8
  
 3 − 13
  
5
16
  
 3 + .

and with the $$ option, yields the display style LaTeX

The code (from Buffon’s needle problem)

: {{math|''P''{{sp|1}}(''l'', ''d''{{sp|2}}) {{=|sp}} <!--
-->{{(|{{int|0|{{Gr|pi}}|HTM}} sin ''{{Gr|theta}}''{{sp|2}}{{op|sdot}}{{frac|{{d|''{{Gr|theta}}''}}|{{Gr|pi}}|HTM}}|)|Big}}{{sp|1}}{{op|sdot}}''P''{{sp|-5}}{{sub|{{sym|perp}}}}(''l'', ''d''{{sp|1}}) {{=|sp}} <!--
-->{{(|{{frac|{{op|-}}{{sp|1}}[cos ''{{Gr|theta}}''{{sp|2}}]{{subsup|0|{{Gr|pi}}}}|{{Gr|pi}}|HTM}}|)|Big}}{{op|sdot}}{{frac|''l''|''d''|HTM}} {{=|sp}} {{frac|2|{{Gr|pi}}|HTM}}{{op|sdot}}{{frac|''l''|''d''|HTM}}{{sp|3}}.
|tex = P(l, d) 
= \left( \int_{0}^{\pi} \sin \theta \sdot \frac{d\theta}{\pi} \right) \sdot P_{\perp}(l, d)
= \left( \frac{- [\cos \theta]_{0}^{\pi}}{\pi} \right) \sdot \frac{l}{d} = \frac{2}{\pi} \sdot \frac{l}{d} \, .
|&&}}

yields the display style HTML+CSS

P (l, d  )  = 
  
π
0
sin θ   ⋅  
dθ
π
  
  ⋅  P(l, d )  = 
  
− [cos θ  ] π0
π
  
 ⋅  
l
d
 = 
2
π
 ⋅  
l
d
 .

and with the $$ option, yields the display style LaTeX

Maxwell’s equations

The code

{{indent}}{{math|
{{align|begin}}
{{oiint|{{sym|partial}}''V''||{{vec|E|b}}{{op|sdot}}{{d|{{vec|S|b}}}}|HTM}} {{&=}} <!--
  -->{{frac|1|''{{Gr|epsilon}}''{{sub|0}}|HTM}} {{iiint|''V''||''{{Gr|rho}}''{{sp|3}}{{d|''V''}}|HTM}} {{\\}}

{{oiint|{{sym|partial}}''V''||{{vec|B|b}}{{op|sdot}}{{d|{{vec|S|b}}}}|HTM}} {{&=}} 0 {{\\}}

{{oint|{{sym|partial}}''S''||{{vec|E|b}}{{op|sdot}}{{d|{{vec|x|b}}}}|HTM}} {{&=}} {{op|-}}{{iint|''S''||{{partial|{{vec|B|b}}|''t''|HTM}}{{op|sdot}}{{d|{{vec|S|b}}}}|HTM}} {{\\}}

{{oint|{{sym|partial}}''S''||{{vec|B|b}}{{op|sdot}}{{d|{{vec|x|b}}}}|HTM}} {{&=}} <!--
  -->{{iint|''S''||{{(|''{{Gr|mu}}''{{sub|0}}{{sp|1}}{{vec|J|b}} + {{frac|1|''c''{{^|2}}|HTM}} {{partial|{{vec|E|b}}|''t''|HTM}}|)|Big}}{{op|sdot}}{{d|{{vec|S|b}}}}|HTM}}
{{align|end}}
|&&}}

yields the display style HTML+CSS

     
Error: String exceeds 10,000 character limit.

The code (broken in three calls to {{math}} to avoid the pesky 10,000 character limit for template arguments)

{{indent}}{{math|
{{align|begin}}
{{oiint|{{sym|partial}}''V''||{{vec|E|b}}{{op|sdot}}{{d|{{vec|S|b}}}}|HTM}} {{&=}} <!--
  -->{{frac|1|''{{Gr|epsilon}}''{{sub|0}}|HTM}} {{iiint|''V''||''{{Gr|rho}}''{{sp|3}}{{d|''V''}}|HTM}} {{\\}}

{{oiint|{{sym|partial}}''V''||{{vec|B|b}}{{op|sdot}}{{d|{{vec|S|b}}}}|HTM}} {{&=}} 0 {{\\}}
{{align|end}}
|&&}}{{clear}}

{{indent}}{{nbsp|3}}{{math|
{{oint|{{sym|partial}}''S''||{{vec|E|b}}{{op|sdot}}{{d|{{vec|x|b}}}}|HTM}} {{&=}} {{op|-}}{{iint|''S''||{{partial|{{vec|B|b}}|''t''|HTM}}{{op|sdot}}{{d|{{vec|S|b}}}}|HTM}}
|&&}}{{clear}}

{{indent}}{{nbsp|3}}{{math|
{{oint|{{sym|partial}}''S''||{{vec|B|b}}{{op|sdot}}{{d|{{vec|x|b}}}}|HTM}} {{&=}} <!--
  -->{{iint|''S''||{{(|''{{Gr|mu}}''{{sub|0}}{{sp|1}}{{vec|J|b}} + {{frac|1|''c''{{^|2}}|HTM}} {{partial|{{vec|E|b}}|''t''|HTM}}|)|Big}}{{op|sdot}}{{d|{{vec|S|b}}}}|HTM}}
|&&}}

yields the display style HTML+CSS

     
V
V
E ⋅  dS
 = 
1
ϵ0
V
V
ρdV
V
V
B ⋅  dS
 =  0

        
S
S
E ⋅  dx
 =  −
S
S
B
t
 ⋅  dS

        
S
S
B ⋅  dx
 = 
S
S
  μ0J +
1
c 2
E
t
  
 ⋅  dS

The code

{{indent}}{{math|
{{align|begin|tex}}
{{oiint|{{sym|partial|tex}}''V''||{{vec|E|b|tex}}{{op|sdot|tex}}{{d|{{vec|S|b|tex}}|tex}}|TEX}} {{&=|tex}} <!--
  -->{{frac|1|''{{Gr|epsilon|tex}}''{{sub|0|tex}}|tex}} {{iiint|''V''||''{{Gr|rho|tex}}''{{sp|3|tex}}{{d|''V''|tex}}|TEX}} {{\\|tex}}

{{oiint|{{sym|partial|tex}}''V''||{{vec|B|b|tex}}{{op|sdot|tex}}{{d|{{vec|S|b|tex}}|tex}}|TEX}} {{&=|tex}} 0 {{\\|tex}}

{{oint|{{sym|partial|tex}}''S''||{{vec|E|b|tex}}{{op|sdot|tex}}{{d|{{vec|x|b|tex}}|tex}}|TEX}} {{&=|tex}} <!--
  -->{{op|-}}{{iint|''S''||{{partial|{{vec|B|b|tex}}|''t''|TEX}}{{op|sdot|tex}}{{d|{{vec|S|b|tex}}|tex}}|TEX}} {{\\|tex}} 

{{oint|{{sym|partial|tex}}''S''||{{vec|B|b|tex}}{{op|sdot|tex}}{{d|{{vec|x|b|tex}}|tex}}|TEX}} {{&=|tex}} <!--
  -->{{iint|''S''||{{(|''{{Gr|mu|tex}}''{{sub|0|tex}}{{sp|1|tex}}{{vec|J|b|tex}} + {{frac|1|''c''{{^|2|tex}}|tex}} <!--
  -->{{partial|{{vec|E|b|tex}}|''t''|TEX}}|)|Big|tex}}{{op|sdot|tex}}{{d|{{vec|S|b|tex}}|tex}}|TEX}}
{{align|end|tex}}
|$$}}

yields the display style LaTeX

     

Matrix examples

See {{matrix}} (uses {{(|expression to delimit|)}} for the matrix parentheses or square brackets).

See also