Template:Abs/doc: Difference between revisions

From Xenharmonic Wiki
Jump to navigation Jump to search
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
Line 2: Line 2:
This template is designed to typeset the absolute value of a variable.
This template is designed to typeset the absolute value of a variable.


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


<pre>{{abs|''x''}}</pre>
; <code>{{{<nowiki />2}}}</code>
: The scale factor, used to stretch or compress the absolute value bars.


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

Revision as of 15:57, 17 April 2025

English Wikipedia has an article on:

This template is designed to typeset the absolute value of a variable.

Parameters

{{{1}}}
The expression to be enclosed.
{{{2}}}
The scale factor, used to stretch or compress the absolute value bars.

Usage

You type You get
{{abs|''x''}} |x|
{{abs|{{sfrac|''x''|''y''}}|1.8}} |x/y|