This site is supported by donations to The OEIS Foundation.

Template:Square bracket/doc

From OeisWiki
Jump to: navigation, search

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

[⧼Purge⧽ Template:Square bracket/doc]

alt = This template is under construction...
This template is under construction.            

Please do not use this unfinished and/or still unreliable template.            


The {{square bracket}} template ({{sqbrack}} for short) makes large left or right square brackets in HTML+CSS or LaTeX and is used by the {{(|...|)}} template to [square] bracket expressions in HTML+CSS or LaTeX. The {{square bracket}} template uses the {{square bracket/glyph}} helper template ({{sqbrack/glyph}} for short).

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

Usage

{{square bracket|type|format}}

or

{{sqbrack|type|format}}

or

{{sqbrack|type}}

where the first argument (type) is from

  • l: [
  • r: ]
  • big l: corresponds to \big[ in LaTeX;
  • big r: corresponds to \big] in LaTeX;
  • Big l: corresponds to \Big[ in LaTeX;
  • Big r: corresponds to \Big] in LaTeX;
  • bigg l: corresponds to \bigg[ in LaTeX;
  • bigg r: corresponds to \bigg] in LaTeX;
  • Bigg l: corresponds to \Bigg[ in LaTeX;
  • Bigg r: corresponds to \Bigg] in LaTeX;
  • L or left: corresponds to \left[ in LaTeX;
  • R or right: corresponds to \right] in LaTeX;

and the [optional] second argument (format) is from

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

Tests

The code (broken in two to avoid the 10,000 characters limit for template arguments)

{{indent}}{{math| 
{{sqbrack|l}}{{sp|1}}{{frac|''x''{{^|2}} {{op|+}} 1|''x''{{^|2}} {{op|-}} 1}}{{sp|1}}{{sqbrack|r}}{{^|''k''}}, 
{{sqbrack|big l}}{{sp|2}}{{frac|''x''{{^|2}} {{op|+}} 1|''x''{{^|2}} {{op|-}} 1}}{{sp|2}}{{sqbrack|big r}}{{^|''k''}},
{{sqbrack|Big l}}{{sp|2}}{{frac|''x''{{^|2}} {{op|+}} 1|''x''{{^|2}} {{op|-}} 1}}{{sp|2}}{{sqbrack|Big r}}{{^|''k''}},
|&&}}<!--
-->{{math|
{{sqbrack|bigg l}}{{sp|3}}{{frac|''x''{{^|2}} {{op|+}} 1|''x''{{^|2}} {{op|-}} 1}}{{sp|3}}{{sqbrack|bigg r}}{{^|''k''}},
{{sqbrack|Bigg l}}{{sp|4}}{{frac|''x''{{^|2}} {{op|+}} 1|''x''{{^|2}} {{op|-}} 1}}{{sp|4}}{{sqbrack|Bigg r}}{{^|''k''}}.
|&&}}

yields the display style HTML+CSS (TODO: raise exponent automatically or manually?)

     
[
x 2 + 1
x 2 − 1
]
k,
  
x 2 + 1
x 2 − 1
  
k,
  
x 2 + 1
x 2 − 1
  
k,
x 2 + 1
x 2 − 1
k,
x 2 + 1
x 2 − 1
k.

The code

{{indent}}{{math| 
{{sqbrack|l|tex}}{{frac|''x''{{^|2|tex}} {{op|+}} 1|''x''{{^|2|tex}} {{op|-}} 1|tex}}{{sqbrack|r|tex}}{{^|''k''|tex}}, 
{{sqbrack|big l|tex}}{{frac|''x''{{^|2|tex}} {{op|+}} 1|''x''{{^|2|tex}} {{op|-}} 1|tex}}{{sqbrack|big r|tex}}{{^|''k''|tex}},
{{sqbrack|Big l|tex}}{{frac|''x''{{^|2|tex}} {{op|+}} 1|''x''{{^|2|tex}} {{op|-}} 1|tex}}{{sqbrack|Big r|tex}}{{^|''k''|tex}},
{{sqbrack|bigg l|tex}}{{frac|''x''{{^|2|tex}} {{op|+}} 1|''x''{{^|2|tex}} {{op|-}} 1|tex}}{{sqbrack|bigg r|tex}}{{^|''k''|tex}},
{{sqbrack|Bigg l|tex}}{{frac|''x''{{^|2|tex}} {{op|+}} 1|''x''{{^|2|tex}} {{op|-}} 1|tex}}{{sqbrack|Bigg r|tex}}{{^|''k''|tex}}.
|$$}}

yields the display style LaTeX

     

Examples

The code (using the {{(|...|)}} template, which uses this template)

{{indent}}{{math| {{sum|''k''{{=}}1|infty| {{(| {{frac|16|5}} |)|Big [ ]}}{{^|''k''}} |HTM}} |&&}}

yields the display style HTML+CSS

     
k  = 1
  
16
5
k

The code (using the {{(|...|)}} template, which uses this template)

{{indent}}{{math| {{sum|''k''{{=}}1|infty| {{(| {{frac|16|5|tex}} |)|Big [ ]|tex}}{{^|''k''|tex}} |TEX}} |$$}}

yields the display style LaTeX

     

See also