Template:LaTeX operators: Difference between revisions
Jump to navigation
Jump to search
ArrowHead294 (talk | contribs) Make template for absolute value, floor, ceiling, and rounding operators in LaTeX |
ArrowHead294 (talk | contribs) mNo edit summary |
||
(12 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
<span style="display: none;"><math> | {{texchars}}<span style="display: none;"><math> | ||
\def\abs#1{\left|{#1}\right|} | \def\abs#1{\left|{#1}\right|} | ||
\def\norm#1{\left\|{#1}\right\|} | |||
\def\floor#1{\left\lfloor{#1}\right\rfloor} | \def\floor#1{\left\lfloor{#1}\right\rfloor} | ||
\def\ceil#1{\left\lceil{#1}\right\rceil} | \def\ceil#1{\left\lceil{#1}\right\rceil} | ||
\def\round#1{\left\lceil{#1}\right\rfloor} | \def\round#1{\left\lceil{#1}\right\rfloor} | ||
\def\rround#1{\left\lfloor{#1}\right\rceil} | \def\rround#1{\left\lfloor{#1}\right\rceil} | ||
</math></span> | </math></span><noinclude> | ||
{{documentation}} | |||
[[Category:LaTeX templates]] | |||
</noinclude> |
Latest revision as of 18:55, 30 January 2025
This template allows easy typesetting of the floor, ceiling, and rounding functions in LaTeX.
Usage
Place this template at the top of any page where these operators will need to be used.
Note: You can use {{texops}}
as a shortcut.
Operator | Example | Definition | |
---|---|---|---|
You type | You get | ||
floor |
\floor{x + y} |
[math]\displaystyle{ \floor{x + y} }[/math] | Floor (round down) |
ceil |
\ceil{x + y} |
[math]\displaystyle{ \ceil{x + y} }[/math] | Ceiling (round up) |
abs |
\abs{x + y} |
[math]\displaystyle{ \abs{x + y} }[/math] | Absolute value (magnitude) |
norm |
\norm{x + y} |
[math]\displaystyle{ \norm{x + y} }[/math] | Norm (magnitude) |
round |
\round{x + y} |
[math]\displaystyle{ \round{x + y} }[/math] | Round (to the nearest integer) |
rround |
\rround{x + y} |
[math]\displaystyle{ \rround{x + y} }[/math] | "Reverse round" (distance to nearest integer) |
See also
- Template:LaTeX mapping operators – a more advanced LaTeX template used for typesetting monzos and vals.
- Template:LaTeX preset characters – for predefining the bracket sequences.