Template:Abs: Difference between revisions

From Vigyanwiki
Template>Cedar101
m (<source lang="html">)
Template>Deacon Vorbis
(split out doc subpage)
Line 1: Line 1:
<includeonly>&#124;{{#if:{{{1|}}}|<span class="nowrap" style="padding-left:0.1em; padding-right:0.1em;">{{{1}}}</span>|&nbsp;&middot;&nbsp;}}&#124;</includeonly><noinclude>
<includeonly>&#124;{{#if:{{{1|}}}|<span class="nowrap" style="padding-left:0.1em; padding-right:0.1em;">{{{1}}}</span>|&nbsp;&middot;&nbsp;}}&#124;</includeonly><noinclude>
{{documentation|content=
{{documentation}}
This template may be used to enclose text between two [[vertical bar]]s ({{unichar|007C|vertical line}}), such as to denote the [[absolute value]].  It adds padding (of width 0.1 em) on each side inside the bars.
 
== Usage ==
<pre>
When {{math|{{abs|''x''}} < 7}}, the function is positive.
</pre>
When {{math|{{abs|''x''}} < 7}}, the function is positive.
 
<pre>
The notation {{math|{{abs}}}} means ''absolute value''.
</pre>
The notation {{math|{{abs}}}} means ''absolute value''.
 
== Alternatives ==
This template is equivalent to enclosing the text between two {{tlx|pipe}} templates (plus padding of width similar to [[hair space]]s around the argument)
<source lang="html">
When {{math|{{pipe}}&#x200A;<!-- hair space -->''x''&#x200A;{{pipe}} < 7}}, the function is positive.
</source>
When {{math|{{pipe}}&#x200A;<!-- hair space -->''x''&#x200A;{{pipe}} < 7}}, the function is positive.
 
== See also ==
* {{tl|pipe}}
* {{tl|norm}}
* {{tl|bra-ket}}
* {{tl|langle}} and {{tl|rangle}}


[[Category:Mathematical formatting templates]]
[[Category:Mathematical formatting templates]]
}}</noinclude>
</noinclude>

Revision as of 02:09, 20 November 2019

Template documentation