Template:LaTeX mapping operators/doc: Difference between revisions

ArrowHead294 (talk | contribs)
mNo edit summary
ArrowHead294 (talk | contribs)
mNo edit summary
 
(22 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{dochead}}{{{{ROOTPAGENAME}} }}
{{dochead}}{{{{ROOTPAGENAME}} }}
This template allows LaTeX representations of [[monzo]]s, [[vals]], and monzo–val products by defining the operators in advance to avoid the need to manually enter brackets.
=== Usage ===
=== Usage ===
This template is mainly used to typeset [[Monzo]]s and [[val]]s, but multimonzos and multivals are also supported up to four dimensions.
This template is mainly used to typeset [[Monzo]]s and [[val]]s, but multimonzos and multivals are also supported up to four dimensions.
{| class="wikitable" style="text-align: center;"
 
{{Shortcut|texmap}}
 
{| class="wikitable"
|+ style="font-size: 105%;" | Pre-defined LaTeX control sequences for interval vectors
|+ style="font-size: 105%;" | Pre-defined LaTeX control sequences for interval vectors
|-
|-
! rowspan="2" | Operator !! colspan="2" | Example
! rowspan="2" | Operator
! colspan="2" | Example
! rowspan="2" | Definition
|-
! You type
! You get
|-
| <code>monzo</code>
| <code>{{nowrap|<nowiki>\monzo{-4 & 4 & -1}</nowiki>}}</code>
| <math>\monzo{-4 & 4 & -1}</math>
| [[Monzo]]
|-
|-
! You type !! You get
| <code>tmonzo</code>
| <code>{{nowrap|<nowiki>\tmonzo{-4 & 4 & -1}</nowiki>}}</code>
| <math>\tmonzo{-4 & 4 & -1}</math>
| Monzo (pipe variant)
|-
|-
| <code>\monzo{{(}}{{)}}</code> || <code>\monzo{{(}}-4 & 4 & -1{{)}}</code> || <math>\monzo{-4 & 4 & -1}</math>
| <code>bimonzo</code>
| <code>{{nowrap|<nowiki>\bimonzo{-4 & 4 & -1}</nowiki>}}</code>
| <math>\bimonzo{-4 & 4 & -1}</math>
| Bimonzo
|-
|-
| <code>\tmonzo{{(}}{{)}}</code> || <code>\tmonzo{{(}}-4 & 4 & -1{{)}}</code> || <math>\tmonzo{-4 & 4 & -1}</math>
| <code>bitmonzo</code>
| <code>{{nowrap|<nowiki>\bitmonzo{-4 & 4 & -1}</nowiki>}}</code>
| <math>\bitmonzo{-4 & 4 & -1}</math>
| Bimonzo (pipe variant)
|-
|-
| <code>\bimonzo{{(}}{{)}}</code> || <code>\bimonzo{{(}}-4 & 4 & -1{{)}}</code> || <math>\bimonzo{-4 & 4 & -1}</math>
| <code>trimonzo</code>
| <code>{{nowrap|<nowiki>\trimonzo{-4 & 4 & -1}</nowiki>}}</code>
| <math>\trimonzo{-4 & 4 & -1}</math>
| Trimonzo
|-
|-
| <code>\bitmonzo{{(}}{{)}}</code> || <code>\bitmonzo{{(}}-4 & 4 & -1{{)}}</code> || <math>\bitmonzo{-4 & 4 & -1}</math>
| <code>tritmonzo</code>
| <code>{{nowrap|<nowiki>\tritmonzo{-4 & 4 & -1}</nowiki>}}</code>
| <math>\tritmonzo{-4 & 4 & -1}</math>
| Trimonzo (pipe variant)
|-
|-
| <code>\trimonzo{{(}}{{)}}</code> || <code>\trimonzo{{(}}-4 & 4 & -1{{)}}</code> || <math>\trimonzo{-4 & 4 & -1}</math>
| <code>quadmonzo</code>
| <code>{{nowrap|<nowiki>\quadmonzo{-4 & 4 & -1}</nowiki>}}</code>
| <math>\quadmonzo{-4 & 4 & -1}</math>
| Quadmonzo
|-
|-
| <code>\tritmonzo{{(}}{{)}}</code> || <code>\tritmonzo{{(}}-4 & 4 & -1{{)}}</code> || <math>\tritmonzo{-4 & 4 & -1}</math>
| <code>quadtmonzo</code>
| <code>{{nowrap|<nowiki>\quadtmonzo{-4 & 4 & -1}</nowiki>}}</code>
| <math>\quadtmonzo{-4 & 4 & -1}</math>
| Quadmonzo (pipe variant)
|-
|-
| <code>\quadmonzo{{(}}{{)}}</code> || <code>\quadmonzo{{(}}-4 & 4 & -1{{)}}</code> || <math>\quadmonzo{-4 & 4 & -1}</math>
| <code>val</code>
| <code>{{nowrap|<nowiki>\val{12 & 19 & 28}</nowiki>}}</code>
| <math>\val{12 & 19 & 28}</math>
| [[Val]]
|-
|-
| <code>\quadtmonzo{{(}}{{)}}</code> || <code>\quadtmonzo{{(}}-4 & 4 & -1{{)}}</code> || <math>\quadtmonzo{-4 & 4 & -1}</math>
| <code>tval</code>
| <code>{{nowrap|<nowiki>\tval{12 & 19 & 28}</nowiki>}}</code>
| <math>\tval{12 & 19 & 28}</math>
| Val (pipe variant)
|-
|-
| <code>\val{{(}}{{)}}</code> || <code>\val{{(}}12 & 19 & 28{{)}}</code> || <math>\val{12 & 19 & 28}</math>
| <code>bival</code>
| <code>{{nowrap|<nowiki>\bival{12 & 19 & 28}</nowiki>}}</code>
| <math>\bival{12 & 19 & 28}</math>
| Bival
|-
|-
| <code>\tval{{(}}{{)}}</code> || <code>\tval{{(}}12 & 19 & 28{{)}}</code> || <math>\tval{12 & 19 & 28}</math>
| <code>bitval</code>
| <code>{{nowrap|<nowiki>\bitval{12 & 19 & 28}</nowiki>}}</code>
| <math>\bitval{12 & 19 & 28}</math>
| Bival (pipe variant)
|-
|-
| <code>\bival{{(}}{{)}}</code> || <code>\bival{{(}}12 & 19 & 28{{)}}</code> || <math>\bival{12 & 19 & 28}</math>
| <code>trival</code>
| <code>{{nowrap|<nowiki>\trival{12 & 19 & 28}</nowiki>}}</code>
| <math>\trival{12 & 19 & 28}</math>
| Trival
|-
|-
| <code>\bitval{{(}}{{)}}</code> || <code>\bitval{{(}}12 & 19 & 28{{)}}</code> || <math>\bitval{12 & 19 & 28}</math>
| <code>tritval</code>
| <code>{{nowrap|<nowiki>\tritval{12 & 19 & 28}</nowiki>}}</code>
| <math>\tritval{12 & 19 & 28}</math>
| Trival (pipe variant)
|-
|-
| <code>\trival{{(}}{{)}}</code> || <code>\trival{{(}}12 & 19 & 28{{)}}</code> || <math>\trival{12 & 19 & 28}</math>
| <code>quadval</code>
| <code>{{nowrap|<nowiki>\quadval{12 & 19 & 28}</nowiki>}}</code>
| <math>\quadval{12 & 19 & 28}</math>
| Quadval
|-
|-
| <code>\tritval{{(}}{{)}}</code> || <code>\tritval{{(}}12 & 19 & 28{{)}}</code> || <math>\tritval{12 & 19 & 28}</math>
| <code>quadtval</code>
| <code>{{nowrap|<nowiki>\quadtval{12 & 19 & 28}</nowiki>}}</code>
| <math>\quadtval{12 & 19 & 28}</math>
| Quadval (pipe variant)
|-
|-
| <code>\quadval{{(}}{{)}}</code> || <code>\quadval{{(}}12 & 19 & 28{{)}}</code> || <math>\quadval{12 & 19 & 28}</math>
| <code>rbra</code>
| <code>{{nowrap|<nowiki>\rbra{\monzo{1 & 2 & 3}</nowiki>}} & {{nowrap|<nowiki>\monzo{0 & -3 & -5}}</nowiki>}}</code>
| <math>\rbra{\monzo{1 & 2 & 3} & \monzo{0 & -3 & -5}}</math>
| rowspan="2" | [[Dave Keenan]] and [[Douglas Blumeyer]]'s<br />[[Extended bra-ket notation #Variant including curly and square brackets|variation]] on [[extended bra-ket notation]]
|-
|-
| <code>\quadtval{{(}}{{)}}</code> || <code>\quadtval{{(}}12 & 19 & 28{{)}}</code> || <math>\quadtval{12 & 19 & 28}</math>
| <code>rket</code>
| <code>{{nowrap|<nowiki>\rket{\val{1 & 2 & 3}</nowiki>}} & {{nowrap|<nowiki>\val{0 & -3 & -5}}</nowiki>}}</code>
| <math>\rket{\val{1 & 2 & 3} & \val{0 & -3 & -5}}</math>
|-
|-
| <code>\vmp{{(}}{{)}}</code> || <code>\vmp{{(}}12 & 19 & 28{{)}}{{(}}-4 & 4 & -1{{)}}</code> || <math>\vmp{12 & 19 & 28}{-4 & 4 & -1}</math>
| <code>vmp</code>
| <code>{{nowrap|<nowiki>\vmp{12 & 19 & 28}</nowiki>}}{{nowrap|<nowiki>{-4 & 4 & -1}</nowiki>}}</code>
| <math>\vmp{12 & 19 & 28}{-4 & 4 & -1}</math>
| Dot product of val and monzo
|-
|-
| <code>\wmp{{(}}{{)}}</code> || <code>\wmp{{(}}12 & 19 & 28{{)}}{{(}}-4 & 4 & -1{{)}}</code> || <math>\wmp{12 & 19 & 28}{-4 & 4 & -1}</math>
| <code>wmp</code>
| <code>{{nowrap|<nowiki>\wmp{12 & 19 & 28}</nowiki>}}{{nowrap|<nowiki>{-4 & 4 & -1}</nowiki>}}</code>
| <math>\wmp{12 & 19 & 28}{-4 & 4 & -1}</math>
| Dot product of bival and bimonzo
|}
|}


=== See also ===
=== See also ===
* [[:Template:LaTeX operators]] &ndash; For typesetting more basic mathematical functions.
* [[:Template:LaTeX preset characters]] – for predefining the bracket sequences.
* [[:Template:LaTeX operators]] – for typesetting more basic mathematical functions.