Difference between revisions of "Template:Sup and sub-related templates"

From blackwiki
Jump to navigation Jump to search
blackwiki>Sardanaphalus
(added {{±}}, third column)
m (48 revisions imported)
 
(42 intermediate revisions by 10 users not shown)
Line 1: Line 1:
{| style="overflow:auto;"
+
{{Navbox with columns
|- style="vertical-align:top;"
+
| name = Sup and sub-related templates
| <!---------------------------------------------------------------------------
+
| state = {{{state|}}}
                        {{Sup}} and related templates
+
| title = Superscript and subscript-related templates
  ---------------------------------------------------------------------------->
 
{| class="nowrap" cellspacing="0" cellpadding="0" style="margin:0;padding:0 3.0em 0 0;"
 
|colspan="2"| '''{{tl|Sup}} and related templates'''
 
----
 
|-----------------------------
 
|
 
* {{tl|sup}}
 
|
 
: (text{{sup|superscript}}{{nbsp|3}}{{sup|superscript}}text)
 
|-----------------------------
 
|
 
* {{tl|smallsup}} {{tl|ssup}}
 
|
 
: (text{{smallsup|small superscript}}{{nbsp|3}}{{smallsup|small superscript}}text)
 
|-----------------------------
 
|
 
* {{tl|isup}}
 
|
 
: (''text''{{isup|superscript}} &nbsp;vs. ''text''{{sup|superscript}})
 
|-----------------------------
 
|
 
* {{tl|e}}
 
|
 
: (1.23{{e|4}})
 
|-----------------------------
 
|
 
* {{tl|val}}
 
|
 
: ({{val|1.23|e=4}})
 
|-----------------------------
 
|}
 
  
| <!---------------------------------------------------------------------------
+
<!--------------------------- {{sup}}/{{sub}} and related ----------------------------->
                        {{Sub}} and related templates
+
| col1header = <nowiki>{{sup}}</nowiki> and related templates
  ---------------------------------------------------------------------------->
+
| col1 =
{| class="nowrap" cellspacing="0" cellpadding="0" style="margin:0;padding:0 3.0em 0 0;"
+
{{Aligned table
|colspan="2"| '''{{tl|Sub}} and related templates'''
+
  |cols=3 |class=nowrap
----
 
|-----------------------------
 
|
 
* {{tl|sub}}
 
|
 
: (text{{sub|subscript}}{{nbsp|3}}{{sub|subscript}}text)
 
|-----------------------------
 
|
 
* {{tl|smallsub}} {{tl|ssub}}
 
|
 
: (text{{smallsub|small subscript}}{{nbsp|3}}{{smallsub|small subscript}}text)
 
|-----------------------------
 
|
 
* {{tl|subsub}}
 
|
 
: (text{{subsub|double-subscripted}}{{nbsp|3}}{{subsub|double-subscripted}}text)
 
|-----------------------------
 
|}
 
  
| <!---------------------------------------------------------------------------
+
  | {{tlbare|sup}}       |
                      Templates combining super/subscripts
+
  | text{{sup|superscript}}{{spaces|4}}{{sup|superscript}}text
  ---------------------------------------------------------------------------->
 
{| class="nowrap" cellspacing="0" cellpadding="0" style="margin:0;padding:0;"
 
|colspan="2"| '''Templates combining super/subscripts'''
 
----
 
|-----------------------------
 
|
 
* {{tl|su}}
 
|
 
: (text{{su|p=p{{=}}superscript|b=b{{=}}subscript}}{{nbsp|3}}{{su|p=p{{=}}superscript|b=b{{=}}subscript}}text)
 
|-----------------------------
 
|
 
* {{tl|supsub}}
 
|
 
: (text{{supsub|sup|sub}}{{nbsp|3}}{{supsub|sup|sub}}text)
 
|-----------------------------
 
|
 
* {{tl|±}}
 
|
 
: (1.23{{±|4|2}})
 
|-----------------------------
 
|}
 
|-
 
  
|colspan="3"|
+
  | {{tlbare|smallsup}}  | ({{tlbare|ssup}})
----
+
  | text{{smallsup|small superscript}}{{spaces|4}}{{smallsup|small superscript}}text
* [[Subscript and superscript]]
 
|-
 
|}<noinclude>
 
  
[[Category:Wikipedia formatting and function templates| ]]
+
  | {{tlbare|i sup}}      | ({{tlbare|isup}}{{int:dot-separator}}{{tlbare|padlsup}})
 +
  | ''text''{{i sup|superscript}}{{spaces|2}}({{smaller|rather than:}}&nbsp;''text''{{sup|superscript}})
 +
 
 +
  | {{tlbare|i smallsup}} | ({{tlbare|issup}}{{int:dot-separator}}{{tlbare|padlssup}})
 +
  | ''text''{{i smallsup|small superscript}}{{spaces|2}}({{smaller|rather than:}}&nbsp;''text''{{smallsup|small superscript}})
 +
 
 +
  | {{tlbare|b sup}}      | ({{tlbare|bsup}})
 +
  | text{{b sup|superscript}}{{spaces|2}}({{smaller|rather than:}}&nbsp;text{{sup|superscript}})
 +
 
 +
  | {{tlbare|sub}}        |
 +
  | text{{sub|subscript}}{{spaces|4}}{{sub|subscript}}text
 +
 +
  | {{tlbare|smallsub}}  | ({{tlbare|ssub}})
 +
  | text{{smallsub|small subscript}}{{spaces|4}}{{smallsub|small subscript}}text
 +
 
 +
  | {{tlbare|subsub}}    |
 +
  | text{{subsub|double-subscripted}}{{spaces|4}}{{subsub|double-subscripted}}text
 +
}}
 +
 
 +
<!---------------------------- Combined sup/sub ------------------------------->
 +
| col2style = border-left:1px solid #aaa;
 +
| col2header = Combined super/subscripts
 +
| col2 =
 +
{{Aligned table
 +
  |cols=3 |class=nowrap
 +
  | {{tlbare|su}}        |
 +
  | text{{su|p=p&#61;superscript|b=b&#61;subscript}}{{spaces|4}}{{su|p=p&#61;superscript|b=b&#61;subscript}}text
 +
 
 +
  | {{tlbare|sup sub}}    |
 +
  | text{{sup sub|sup|sub}}{{spaces|4}}{{sup sub|sup|sub}}text
 +
 
 +
  | {{tlbare|±}}          |
 +
  | 1.23{{±|4|2}}
 +
 
 +
  | {{tlbare|overunderset}}&nbsp;/ {{tlbare|underoverset}} |
 +
  | {{overunderset|text|superscript|subscript}}
 +
}}
 +
 
 +
| below = [[Subscript and superscript]]
 +
 
 +
}}<noinclude>
 +
{{Documentation
 +
| content =
 +
{{Collapsible option |statename=optional}}
 +
{{Sandbox other||
 +
[[Category:Superscript and subscript templates| ]]
 +
[[Category:Documentation see also templates]]
 +
}}}}<!--(end Documentation)-->
 
</noinclude>
 
</noinclude>

Latest revision as of 09:37, 30 September 2020

Template documentation

Initial visibility: currently defaults to autocollapse

To set this template's initial visibility, the |state= parameter may be used:

  • |state=collapsed: {{Sup and sub-related templates|state=collapsed}} to show the template collapsed, i.e., hidden apart from its title bar
  • |state=expanded: {{Sup and sub-related templates|state=expanded}} to show the template expanded, i.e., fully visible
  • |state=autocollapse: {{Sup and sub-related templates|state=autocollapse}}
    • shows the template collapsed to the title bar if there is a {{navbar}}, a {{sidebar}}, or some other table on the page with the collapsible attribute
    • shows the template in its expanded state if there are no other collapsible items on the page

If the |state= parameter in the template on this page is not set, the template's initial visibility is taken from the |default= parameter in the Collapsible option template. For the template on this page, that currently evaluates to autocollapse.