Difference between revisions of "Template:±/doc"

From Nesdev wiki
Jump to navigationJump to search
m (fix interwiki link)
 
Line 13: Line 13:
 
* {{tl|sup}} : {{sup|superscript}} text
 
* {{tl|sup}} : {{sup|superscript}} text
 
* {{tl|e}} : (1.23{{e|4}})
 
* {{tl|e}} : (1.23{{e|4}})
* {{tl|Val/units}} : for formatting unit names (contents of parameters <tt>u<tt> or <tt>up</tt>)
+
* {{tl|Val/units}} : for formatting unit names (contents of parameters <tt>u</tt> or <tt>up</tt>)
* {{tl|Val/unitswithlink}} : for formatting unit names with links (contents of parameters <tt>ul<tt> or <tt>upl</tt>)
+
* {{tl|Val/unitswithlink}} : for formatting unit names with links (contents of parameters <tt>ul</tt> or <tt>upl</tt>)
 
* [[wikipedia:Subscript and superscript]]
 
* [[wikipedia:Subscript and superscript]]
  

Latest revision as of 05:06, 18 February 2017

{{#if: |

40px This is the template documentation page for Template:±.
This page may not be intended to be viewed directly.
Links using variables may appear broken; do not replace these with hardcoded page names or URLs.

{{#if:x||

}} |{{#ifeq: doc | doc

 | 

{{

   #ifeq: show | show
   | {{#switch:

| left =

{{#switch:{{#if: | {{{smallimage}}} | 40px }} | none =

| #default =

}} {{#if:{{#if: | {{{smallimageright}}} | }} | {{#ifeq:{{#if: | {{{smallimageright}}} | }}|none | | }} }}

| #default =

{{#switch:40px | none =

| #default =

}}

{{#if: | {{#ifeq:|none

 | 
| }} }}

}}

   }}{{
   #if: 
   | 
   | {{#ifeq:Template|Template|}}
 }}

| }} }}

Usage

{{± | plusValue | minusValue}}

So to get: 70{{#if:2.0
|{{#if:1.8
   |+2.0
−1.8
|±2.0 }} |±

}}

You would use: 70{{±|2.0|1.8}}

See also

  • {{su{{#if:|

|{{{2}}} }}{{#if:| |{{{3}}} }}{{#if:| |{{{4}}} }}{{#if:| |{{{5}}} }}{{#if:| |... }}}} – general form of {{±{{#if:| |{{{2}}} }}{{#if:| |{{{3}}} }}{{#if:| |{{{4}}} }}{{#if:| |{{{5}}} }}{{#if:| |... }}}} for formatting exponents, or two-values incertainty one below the other (monospaced : currently not printable to PDF)

|{{{2}}} }}{{#if:| |{{{3}}} }}{{#if:| |{{{4}}} }}{{#if:| |{{{5}}} }}{{#if:| |... }}}} : subscript text

|{{{2}}} }}{{#if:| |{{{3}}} }}{{#if:| |{{{4}}} }}{{#if:| |{{{5}}} }}{{#if:| |... }}}} : superscript text

  • {{e{{#if:|

|{{{2}}} }}{{#if:| |{{{3}}} }}{{#if:| |{{{4}}} }}{{#if:| |{{{5}}} }}{{#if:| |... }}}} : (1.23Template:E)

|{{{2}}} }}{{#if:| |{{{3}}} }}{{#if:| |{{{4}}} }}{{#if:| |{{{5}}} }}{{#if:| |... }}}} : for formatting unit names (contents of parameters u or up)

|{{{2}}} }}{{#if:| |{{{3}}} }}{{#if:| |{{{4}}} }}{{#if:| |{{{5}}} }}{{#if:| |... }}}} : for formatting unit names with links (contents of parameters ul or upl)