Template:Abs/doc: Difference between revisions

ArrowHead294 (talk | contribs)
Created page with "{{dochead}}{{wikipedia}} This template is designed to typeset the absolute value of a variable. === Usage === Typing <pre>{{abs|''x''}}</pre> gives {{abs|''x''}}"
 
ArrowHead294 (talk | contribs)
mNo edit summary
 
(4 intermediate revisions by the same user not shown)
Line 1: Line 1:
{{dochead}}{{wikipedia}}
{{dochead}}{{wikipedia}}
This template is designed to typeset the absolute value of a variable.
This template is designed to typeset the absolute value of a variable or expression. It is only necessary on fractions or when scaling is necessary; for individual variables (e.g. {{!}}x{{!}}) you can simply use <code><nowiki>{{!}}x{{!}}</nowiki></code> or <code>{{tl|pipe}}x{{tl|pipe}}</code>.


=== Usage ===
=== Parameters ===
Typing
; <code>{{{<nowiki />1}}}</code>
: The expression to be enclosed.


<pre>{{abs|''x''}}</pre>
; <code>{{{<nowiki />2}}}</code>
: Pass in <code>big</code> to stretch the absolute value bars for fractions.


gives
=== Usage ===
 
{| class="wikitable"
{{abs|''x''}}
|-
! You type !! You get
|-
| {{plaincode|<nowiki>{{abs|''x''}}</nowiki>}} || {{abs|''x''}}
|-
| {{plaincode|<nowiki>{{abs|{{sfrac|''x''|''y''}}|big}}</nowiki>}} || {{abs|{{sfrac|''x''|''y''}}|big}}
|}