This site is supported by donations to The OEIS Foundation.

# Template:Sub/Tests

The following template is a testing template for the following templates:

## Tests

: The On-Line Encyclopedia of Integer Sequences{{sup|®}} (OEIS{{sup|®}}) Wiki yields (at default 75% relative size, the ® is too small):

The On-Line Encyclopedia of Integer Sequences® (OEIS®) Wiki

: The On-Line Encyclopedia of Integer Sequences{{sup|®|100%}} (OEIS{{sup|®|100%}}) Wiki yields (at 100% relative size, the ® is too big):

The On-Line Encyclopedia of Integer Sequences® (OEIS®) Wiki

: The On-Line Encyclopedia of Integer Sequences{{sup|®|87.5%}} (OEIS{{sup|®|87.5%}}) Wiki yields (at 87.5% relative size, the ® seems to be just the right size):

The On-Line Encyclopedia of Integer Sequences® (OEIS®) Wiki

: text{{sub|subscript}} yields

textsubscript

: text{{sub|subscript|75%}} yields

textsubscript

: text{{sub|subscript|100%}} yields

textsubscript

: text{{sup|superscript}} yields

textsuperscript

: text{{sup|superscript|75%}} yields

textsuperscript

: text{{sup|superscript|100%}} yields

textsuperscript

Subscript:

(...)

Superscript:

: before {{math|''f''{{sp|3}}{{sup|5}}{{sp|1}}(''x'') {{=}} ''f''{{sp|3}}({{sp|4}}''f''{{sp|3}}({{sp|4}}''f''{{sp|3}}({{sp|4}}''f''{{sp|3}}({{sp|4}}''f''{{sp|3}}(''x'')))))|&}} after yields the text style HTML+CSS

before
 f 5 (x) = f ( f ( f ( f ( f (x)))))
after

: before {{math|f^5 (x) {{=}} f(f(f(f(f(x)))))|$}} after yields the text style LaTeX before${\displaystyle \textstyle {f^{5}(x)=f(f(f(f(f(x)))))}}$ after Subscript: : before {{math|''a''{{sub|''n''}}|&}} after yields the text style HTML+CSS before  an after : before {{math|''a''{{sub|''n''|tex}}|$}} after yields the text style LaTeX

before${\displaystyle \textstyle {a_{n}{\!\,\!}}}$ after

: {{math|''a''{{sub|''n''}}|&&}} yields the display style HTML+CSS

 an

: {{math|''a''{{sub|''n''|tex}}|$$}} yields the display style LaTeX ${\displaystyle {\begin{array}{l}\displaystyle {a_{n}{\!\,\!}}\end{array}}}$ Subscript, then superscript: : before {{math|''a''{{sub|''n''}}{{sup|2}}|&}} after yields the text style HTML+CSS before  an2 after : before {{math|''a''{{sub|''n''|tex}}{{sup|2|tex}}|}} after yields the text style LaTeX before${\displaystyle \textstyle {a_{n}{\!\,\!}^{2}{\!\,\!}}}$ after : {{math|''a''{{sub|''n''{{sup|2}}}}|&&}} yields the display style HTML+CSS  an2 : {{math|''a''{{sub|''n''{{sup|2|tex}}|tex}}|$$}} yields the display style LaTeX

${\displaystyle {\begin{array}{l}\displaystyle {a_{n^{2}{\!\,\!}}{\!\,\!}}\end{array}}}$

Superscript, then subscript:

Code snippet taken from: Riemann curvature tensor.

The code

{{indent}}{{math|{{Gr|Gamma}}{{sup|''{{Gr|rho}}''}}{{sub|''{{Gr|sigma}}''{{sp|1}}''{{Gr|nu}}''}}|&&}}

yields the display style HTML+CSS

 Γρσ ν

while the code

{{indent}}{{math|{{Gr|Gamma|tex}}{{sup|''{{Gr|rho|tex}}''|tex}}{{sub|''{{Gr|sigma|tex}}'' ''{{Gr|nu|tex}}''|tex}}|$$}} yields the display style LaTeX ${\displaystyle {\begin{array}{l}\displaystyle {\Gamma ^{\rho }{\!\,\!}_{\sigma \nu }{\!\,\!}}\end{array}}}$ while the code {{indent}}{{math|{ \Gamma^{\rho} }_{\sigma \nu}|$$}}

yields the display style LaTeX

${\displaystyle {\begin{array}{l}\displaystyle {{\Gamma ^{\rho }}_{\sigma \nu }}\end{array}}}$

Subscript and superscript:

before : {{math|''a''{{subsup|''n''|2}}|&}} after yields the text style HTML+CSS

before
 a 2n
after

before : {{math|''a''{{subsup|''n''|2|tex}}|$}} after yields the text style LaTeX before${\displaystyle \textstyle {a_{n}^{2}}}$ after : {{math|''a''{{subsup|''n''|2}}|&&}} yields the display style HTML+CSS  a 2n : {{math|''a''{{subsup|''n''|2|tex}}|$$}} yields the display style LaTeX ${\displaystyle {\begin{array}{l}\displaystyle {a_{n}^{2}}\end{array}}}$ ### Simple mathematical tests and examples : before {{math|''x''{{sub|2}}|&}} after after yields the text style HTML+CSS before  x2 after : before {{math|''x''{{sub|2|tex}}|}} after yields the text style LaTeX before${\displaystyle \textstyle {x_{2}{\!\,\!}}}$ after : {{math|''x''{{sub|2}}|&&}} yields the display style HTML+CSS  x2 : {{math|''x''{{sub|2|tex}}|$$}} yields the display style LaTeX ${\displaystyle {\begin{array}{l}\displaystyle {x_{2}{\!\,\!}}\end{array}}}$ : before {{math|2{{^|2}}|&}} after yields the text style HTML+CSS before  2 2 after : before {{math|2{{^|2|tex}}|$}} after yields the text style LaTeX

before${\displaystyle \textstyle {2^{2}}}$ after

: {{math|2{{^|2}}|&&}} yields the display style HTML+CSS

 2 2

: {{math|2{{^|2|tex}}|$$}} yields the display style LaTeX ${\displaystyle {\begin{array}{l}\displaystyle {2^{2}}\end{array}}}$ : before {{math|''x''{{^|2}}|&}} after yields the text style HTML+CSS before  x 2 after : before {{math|''x''{{^|2|tex}}|}} after yields the text style LaTeX before${\displaystyle \textstyle {x^{2}}}$ after : {{math|''x''{{^|2}}|&&}} yields the display style HTML+CSS  x 2 : {{math|''x''{{^|2|tex}}|$$}} yields the display style LaTeX

${\displaystyle {\begin{array}{l}\displaystyle {x^{2}}\end{array}}}$

### More mathematical tests and examples

: before {{math|{{sqrt|''x''{{^|2}} + 1}}|&}} after yields the text style HTML+CSS

before
 2√  x 2 + 1
after

: before {{math|{{sqrt|''x''{{^|2|tex}} + 1|tex}}|$}} after yields the text style LaTeX before${\displaystyle \textstyle {\sqrt {x^{2}+1}}}$ after : {{math|{{sqrt|''x''{{^|2}} + 1}}|&&}} yields the display style HTML+CSS  2√ x 2 + 1 : {{math|{{sqrt|''x''{{^|2|tex}} + 1|tex}}|$$}} yields the display style LaTeX ${\displaystyle {\begin{array}{l}\displaystyle {\sqrt {x^{2}+1}}\end{array}}}$ : before {{math|{{root|''x''{{^|2}} + ''{{Gr|delta}}''{{^|2}}|3}}|&}} after yields the text style HTML+CSS before  3√ x 2 + δ 2 after : before {{math|{{root|''x''{{^|2|tex}} + ''{{Gr|delta|tex}}''{{^|2|tex}}|3|tex}}|}} after yields the text style LaTeX before${\displaystyle \textstyle {\sqrt[{3}]{x^{2}+\delta ^{2}}}}$ after : {{math|{{root|''x''{{^|2}} + ''{{Gr|delta}}''{{^|2}}|3}}|&&}} yields the display style HTML+CSS  3√ x 2 + δ 2 : {{math|{{root|''x''{{^|2|tex}} + ''{{Gr|delta|tex}}''{{^|2|tex}}|3|tex}}|$$}} yields the display style LaTeX ${\displaystyle {\begin{array}{l}\displaystyle {\sqrt[{3}]{x^{2}+\delta ^{2}}}\end{array}}}$ : before {{math|{{sqrt|2{{^|2}} + 1}}|&}} after yields the text style HTML+CSS before  2√ 2 2 + 1 after : before {{math|{{sqrt|2{{^|2|tex}} + 1|tex}}|$}} after yields the text style LaTeX

before${\displaystyle \textstyle {\sqrt {2^{2}+1}}}$ after

: {{math|{{sqrt|2{{^|2}} + 1}}|&&}} yields the display style HTML+CSS

 2√  2 2 + 1

: {{math|{{sqrt|2{{^|2|tex}} + 1|tex}}|}} yields the display style LaTeX

${\displaystyle {\begin{array}{l}\displaystyle {\sqrt {2^{2}+1}}\end{array}}}$

### Nested {{sub}} and/or {{sup}}

: 2{{sub|2{{sub|2{{sub|2{{sub|2}}}}}}}} yields

22222

: 2{{sub|2{{sub|2{{sub|2{{sub|2|75%}}|75%}}|75%}}|75%}} yields

22222

: 2{{sub|2{{sub|2{{sub|2{{sub|2|100%}}|100%}}|100%}}|75%}} yields

22222

: 2{{sub|2{{sub|2{{sub|2{{sub|2|133%}}|75%}}|133%}}|75%}} yields

22222

: 2{{sub|2{{sub|2{{sub|2{{sub|2|100%}}|100%}}|100%}}|100%}} yields

22222

: a{{sub|b{{sub|c{{sub|d{{sub|e|100%}}|100%}}|100%}}|100%}} yields

abcde

: a{{sub|b{{sub|c{{sub|d{{sub|e{{sup|4{{sup|3{{sup|2{{sup|1|100%}}|100%}}|100%}}|100%}}|100%}}|100%}}|100%}}|100%}} yields

abcde4321

: 2{{sup|2{{sup|2{{sup|2{{sup|2}}}}}}}} yields

22222

: 2{{sup|2{{sup|2{{sup|2{{sup|2|75%}}|75%}}|75%}}|75%}} yields

22222

: 2{{sup|2{{sup|2{{sup|2{{sup|2|100%}}|100%}}|100%}}|75%}} yields

22222

: 2{{sup|2{{sup|2{{sup|2{{sup|2|133%}}|75%}}|133%}}|75%}} yields

22222

: 2{{sup|2{{sup|2{{sup|2{{sup|2|100%}}|100%}}|100%}}|100%}} yields

22222

: a{{sup|b{{sup|c{{sup|d{{sup|e|100%}}|100%}}|100%}}|100%}} yields

abcde

: a{{sup|b{{sup|c{{sup|d{{sup|e{{sub|4{{sub|3{{sub|2{{sub|1|100%}}|100%}}|100%}}|100%}}|100%}}|100%}}|100%}}|100%}} yields

abcde4321

### Nested {{sub}} and/or {{sup}} and/or {{subsup}} and/or {{supsub}}

: x{{subsup|y{{supsub|b|a}}|z{{sub|c}}}} yields

x zcy b a

: x{{subsup|y{{supsub|b|a|t&t}}|z{{sub|c|100%}}}} yields

x zcy b a

: {{math|''x''{{subsup|''y''{{supsub|''b''|''a''|t&t}}|''z''{{sub|''c''|100%}}}}|&}} yields

 x zcy b a

: {{math|''x''{{subsup|''y''{{supsub|''b''|''a''|tex}}|''z''{{sub|''c''|tex}}|tex}}|$}} yields ${\displaystyle \textstyle {x_{y_{a}^{b}}^{z_{c}{\!\,\!}}}}$ : x{{subsup|y{{supsub|b|a}}|z{{sup|d}}}} yields x zdy b a : x{{subsup|y{{supsub|b|a|t&t}}|z{{sup|d|100%}}}} yields x zdy b a : {{math|''x''{{subsup|''y''{{supsub|''b''|''a''|t&t}}|''z''{{sup|''d''|100%}}}}|&}} yields  x zdy b a : {{math|''x''{{subsup|''y''{{supsub|''b''|''a''|tex}}|''z''{{sup|''d''|tex}}|tex}}|$}} yields

${\displaystyle \textstyle {x_{y_{a}^{b}}^{z^{d}{\!\,\!}}}}$

: x{{subsup|y{{supsub|b|a}}|z{{supsub|d|c}}}} yields

x z d cy b a

: x{{subsup|y{{supsub|b|a|t&t}}|z{{supsub|d|c|t&t}}}} yields

x z d cy b a

: {{math|''x''{{subsup|''y''{{supsub|''b''|''a''|t&t}}|''z''{{supsub|''d''|''c''|t&t}}}}|&}} yields

 x z d cy b a

: {{math|''x''{{subsup|''y''{{supsub|''b''|''a''|tex}}|''z''{{supsub|''d''|''c''|tex}}|tex}}|\$}} yields

${\displaystyle \textstyle {x_{y_{a}^{b}}^{z_{c}^{d}}}}$