Template:LaTeX operators/doc: Difference between revisions
ArrowHead294 (talk | contribs) mNo edit summary |
ArrowHead294 (talk | contribs) mNo edit summary |
||
(2 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
{{dochead}}{{{{ROOTPAGENAME}} }} | {{dochead}}{{{{ROOTPAGENAME}} }} | ||
This template allows easy typesetting of the floor, ceiling, and rounding functions in LaTeX. | |||
=== Usage === | === Usage === | ||
Place this template at the top of any page where these operators will need to be used. | Place this template at the top of any page where these operators will need to be used. | ||
Line 7: | Line 9: | ||
{| class="wikitable" style="text-align: center;" | {| class="wikitable" style="text-align: center;" | ||
|+ style="font-size: 105%;" | Pre-defined LaTeX control sequences | |+ style="font-size: 105%;" | Pre-defined LaTeX control sequences | ||
|- | |- | ||
! rowspan="2" | Operator !! colspan="2" | Example !! rowspan="2" | Definition | ! rowspan="2" | Operator !! colspan="2" | Example !! rowspan="2" | Definition | ||
|- | |- | ||
! You type !! You get | ! You type !! You get | ||
|- | |- | ||
| <code>floor</code> || <code>{{nowrap|\floor{ | | <code>floor</code> || <code>{{nowrap|<nowiki>\floor{x + y}</nowiki>}}</code> || <math>\floor{x + y}</math> || Floor (round down) | ||
|- | |- | ||
| <code>ceil</code> || <code>{{nowrap|\ceil{ | | <code>ceil</code> || <code>{{nowrap|<nowiki>\ceil{x + y}</nowiki>}}</code> || <math>\ceil{x + y}</math> || Ceiling (round up) | ||
|- | |- | ||
| <code>abs</code> || <code>{{nowrap|\abs{ | | <code>abs</code> || <code>{{nowrap|<nowiki>\abs{x + y}</nowiki>}}</code> || <math>\abs{x + y}</math> || Absolute value (magnitude) | ||
|- | |- | ||
| <code>norm</code> || <code>{{nowrap|\norm{ | | <code>norm</code> || <code>{{nowrap|<nowiki>\norm{x + y}</nowiki>}}</code> || <math>\norm{x + y}</math> || Norm (magnitude) | ||
|- | |- | ||
| <code>round</code> || <code>{{nowrap|\round{ | | <code>round</code> || <code>{{nowrap|<nowiki>\round{x + y}</nowiki>}}</code> || <math>\round{x + y}</math> || Round (to the nearest integer) | ||
|- | |- | ||
| <code>rround</code> || <code>{{nowrap|\rround{ | | <code>rround</code> || <code>{{nowrap|<nowiki>\rround{x + y}</nowiki>}}</code> || <math>\rround{x + y}</math> || "Reverse round" (distance to nearest integer) | ||
|} | |} | ||
=== See also === | === See also === | ||
* [[Template:LaTeX mapping operators]] | * [[Template:LaTeX mapping operators]] – a more advanced LaTeX template used for typesetting [[monzo]]s and [[val]]s. | ||
* [[Template:LaTeX preset characters]] | * [[Template:LaTeX preset characters]] – for predefining the bracket sequences. |