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
 
(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}}
|}

Latest revision as of 13:29, 15 July 2025

English Wikipedia has an article on:

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 {{!}}x{{!}} or {{pipe}}x{{pipe}}.

Parameters

{{{1}}}
The expression to be enclosed.
{{{2}}}
Pass in big to stretch the absolute value bars for fractions.

Usage

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