This site is supported by donations to The OEIS Foundation.

Template:Curly bracket/doc

From OeisWiki
Jump to: navigation, search

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

[⧼Purge⧽ Template:Curly 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 {{curly bracket}} template ({{brace}} for short) makes large left or right curly brackets in HTML+CSS or LaTeX and is used by the {{(|...|)}} template to [curly] bracket expressions in HTML+CSS or LaTeX. The {{curly bracket}} template uses the {{curly bracket/glyph}} helper template ({{brace/glyph}} for short).

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

Usage

{{curly bracket|type|format}}

or

{{brace|type|format}}

or

{{brace|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.

Horizontal curly brackets (braces) in HTML+CSS:

To get horizontal curly brackets, we just have to build a left or right vertical curly bracket (of any size) with {{brace}} and wrap a left brace (a right brace) into

<span style="{{transform-rotate|90}}"> ... </span>

to get an {{overbrace}} (an {{underbrace}}) of same size.

Tests

The code (broken in 2 parts to avoid the pesky “Error: String exceeds 10,000 character limit.”

{{indent}}{{math| 
{{brace|l}}''x''{{^|2}} {{op|+}} ''y''{{^|{{sp|1}}2}}{{brace|r}}{{^|''k''}}, 
{{brace|big l}}{{frac|''x''{{^|2}} {{op|+}} 1|''x''{{^|2}} {{op|-}} 1|HTM}}{{brace|big r}}{{^|{{^|''k''|100%}}}},
{{brace|Big l}}{{frac|''x''{{^|2}} {{op|+}} 1|''x''{{^|2}} {{op|-}} 1|HTM}}{{brace|Big r}}{{^|{{^|{{^|''k''|100%}}|100%}}}},|&&}}{{math|
{{brace|bigg l}}{{frac|''x''{{^|2}} {{op|+}} {{frac|1|{{sqrt|1 {{op|+}} ''x''}}}}|''x''{{^|2}} {{op|-}} 1|HTM}}{{brace|bigg r}}{{^|{{^|{{^|{{^|''k''|100%}}|100%}}|100%}}}},
{{brace|Bigg l}}{{frac|''x''{{^|2}} {{op|+}} {{frac|1|{{sqrt|1 {{op|+}} ''x''}}}}|''x''{{^|2}} {{op|-}} {{frac|1|{{sqrt|1 {{op|-}} ''x''}}}}|HTM}}{{brace|Bigg r}}{{^|{{^|{{^|{{^|''k''|100%}}|100%}}|100%}}}}.
|&&}}

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

     
{x 2 + y  2}k,
⎰  
⎱  
x 2 + 1
x 2 − 1
  ⎱
  ⎰
k,
⎰  
⎱  
x 2 + 1
x 2 − 1
  ⎱
  ⎰
k,
⎧  
⎨  
⎩  
x 2 +
1
2  1 + x
x 2 − 1
  ⎫
  ⎬
  ⎭
k,
⎧  
⎨  
⎩  
x 2 +
1
2  1 + x
x 2
1
2  1 − x
  ⎫
  ⎬
  ⎭
k.

The code

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

yields the display style LaTeX

     

Examples

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

{{indent}}{{math|{{sum|''k''{{sp|1}}{{=}}1|infty|{{(|{{frac|16|5|HTM}}|)|big ~ ~}}{{^|{{^|''k''|100%}}}}|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}}|)|auto ~ ~|tex}}{{^|''k''|tex}}|TEX}}|$$}}

yields the display style LaTeX

     

See also