Template:Abs: Difference between revisions

From Xenharmonic Wiki
Jump to navigation Jump to search
ArrowHead294 (talk | contribs)
mNo edit summary
ArrowHead294 (talk | contribs)
mNo edit summary
 
(3 intermediate revisions by the same user not shown)
Line 1: Line 1:
<includeonly>{{pipe}}{{#if: {{{1|}}}|<span style="padding-left: 0.1em; padding-right: 0.1em; white-space: nowrap;">{{{1}}}</span>|}}{{pipe}}</includeonly><noinclude>
<includeonly>{{#ifeq: {{lc: {{{2|}}}}}|big|<span style{{=}}"display: inline-block; margin: 3.2px 0px 3.2px 0px; transform: scale(1, 1.8);">{{pipe}}</span>|{{pipe}}}}{{#if: {{{1|}}}|<span style{{=}}"padding-left: 0.1em; padding-right: 0.1em; white-space: nowrap;">{{{1}}}</span>|}}{{#ifeq: {{lc: {{{2|}}}}}|big|<span style{{=}}"display: inline-block; margin: 3.2px 0px 3.2px 0px; transform: scale(1, 1.8);">{{pipe}}</span>|{{pipe}}}}</includeonly><noinclude>
{{documentation}}
{{documentation}}


[[Category:Formatting templates]]
[[Category:Formatting templates]]
</noinclude>
</noinclude>

Latest revision as of 13:28, 15 July 2025

Template documentation[view] [edit] [history] [purge]
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|