Template:Abs: Difference between revisions
Jump to navigation
Jump to search
ArrowHead294 (talk | contribs) mNo edit summary |
ArrowHead294 (talk | contribs) mNo edit summary |
||
| Line 1: | Line 1: | ||
<includeonly>{{ | <includeonly><span style{{=}}"display: inline-block; margin: {{#expr: 4 * ({{{2|1.8}}} - 1)}}px 0px {{#expr: 4 * ({{{2|1.8}}} - 1)}}px 0px; transform: scale(1, {{{2|1.8}}});">{{pipe}}</span>{{#if: {{{1|}}}|<span style{{=}}"padding-left: 0.1em; padding-right: 0.1em; white-space: nowrap;">{{{1}}}</span>|}}<span style{{=}}"display: inline-block; margin: {{#expr: 4 * ({{{2|1.8}}} - 1)}}px 0px {{#expr: 4 * ({{{2|1.8}}} - 1)}}px 0px; transform: scale(1, {{{2|1.8}}});">{{pipe}}</span></includeonly><noinclude> | ||
{{documentation}} | {{documentation}} | ||
[[Category:Formatting templates]] | [[Category:Formatting templates]] | ||
</noinclude> | </noinclude> | ||
Revision as of 00:39, 30 May 2025
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
bigto stretch the absolute value bars for fractions.
Usage
| You type | You get |
|---|---|
{{abs|''x''}} |
|x| |
{{abs|{{sfrac|''x''|''y''}}|big}} |
<span style="display: inline-block; margin: Expression error: Unrecognized word "big".px 0px Expression error: Unrecognized word "big".px 0px; transform: scale(1, big);">|x/y<span style="display: inline-block; margin: Expression error: Unrecognized word "big".px 0px Expression error: Unrecognized word "big".px 0px; transform: scale(1, big);">| |
