Template:Mapping/doc: Difference between revisions

From Xenharmonic Wiki
Jump to navigation Jump to search
m Undo revision 156725 by ArrowHead294 (talk). Readability
Tag: Undo
Update
 
(One intermediate revision by one other user not shown)
Line 1: Line 1:
{{dochead}}
{{dochead}}
This '''mapping''' template eases typing [[mapping]]s: it puts bra notation (<code>&#x27E8;</code> and <code>&#93;</code>) around each of its arguments and left and right brackets outside (it also removes surrounding spaces). You may optionally include a legend. Mappings are supported up to rank-4.
=== Usage ===
=== Usage ===
; You type
; You type
Line 5: Line 7:
: <code><nowiki>{{mapping| 1 0 -4 -13 | 0 1 4 10 }}</nowiki></code>
: <code><nowiki>{{mapping| 1 0 -4 -13 | 0 1 4 10 }}</nowiki></code>


:'''Tip:''' adding spaces improves readability of the wiki markup.
{{Spaces note}}


; You get
; You get
Line 12: Line 14:


; To include a legend, type
; To include a legend, type
: <code><nowiki>{{mapping|legend=0| 1 0 0 0 | 0 1 1 2 | 0 0 2 -1 }}</nowiki></code>
: <code><nowiki>{{mapping|legend=1| 1 0 0 0 | 0 1 1 2 | 0 0 2 -1 }}</nowiki></code>
: <code><nowiki>{{mapping|legend=1| 1 0 0 0 | 0 1 1 2 | 0 0 2 -1 }}</nowiki></code>
: <code><nowiki>{{mapping|legend=2| 1 0 0 0 | 0 1 1 2 | 0 0 2 -1 }}</nowiki></code>
: <code><nowiki>{{mapping|legend=2| 1 0 0 0 | 0 1 1 2 | 0 0 2 -1 }}</nowiki></code>
Line 17: Line 20:


; So you get
; So you get
: {{{{ROOTPAGENAME}}|legend=0| 1 0 0 0 | 0 1 1 2 | 0 0 2 -1 }}
: {{{{ROOTPAGENAME}}|legend=1| 1 0 0 0 | 0 1 1 2 | 0 0 2 -1 }}
: {{{{ROOTPAGENAME}}|legend=1| 1 0 0 0 | 0 1 1 2 | 0 0 2 -1 }}
: {{{{ROOTPAGENAME}}|legend=2| 1 0 0 0 | 0 1 1 2 | 0 0 2 -1 }}
: {{{{ROOTPAGENAME}}|legend=2| 1 0 0 0 | 0 1 1 2 | 0 0 2 -1 }}

Latest revision as of 12:30, 24 September 2026

This mapping template eases typing mappings: it puts bra notation (⟨ and ]) around each of its arguments and left and right brackets outside (it also removes surrounding spaces). You may optionally include a legend. Mappings are supported up to rank-4.

Usage

You type
{{mapping| 31 49 72 87 }}
{{mapping| 1 0 -4 -13 | 0 1 4 10 }}
💡Tip: Adding spaces improves readability of the markup.
You get
[⟨31 49 72 87]]
[⟨1 0 -4 -13], ⟨0 1 4 10]]
To include a legend, type
{{mapping|legend=0| 1 0 0 0 | 0 1 1 2 | 0 0 2 -1 }}
{{mapping|legend=1| 1 0 0 0 | 0 1 1 2 | 0 0 2 -1 }}
{{mapping|legend=2| 1 0 0 0 | 0 1 1 2 | 0 0 2 -1 }}
{{mapping|legend=3| 1 0 0 0 | 0 1 1 2 | 0 0 2 -1 }}
So you get
Mapping: [⟨1 0 0 0], ⟨0 1 1 2], ⟨0 0 2 -1]]
Mapping: [⟨1 0 0 0], ⟨0 1 1 2], ⟨0 0 2 -1]]
Subgroup-val mapping: [⟨1 0 0 0], ⟨0 1 1 2], ⟨0 0 2 -1]]
Gencom mapping: [⟨1 0 0 0], ⟨0 1 1 2], ⟨0 0 2 -1]]

Technical note

This template calls Template: Bra to render the brackets.

See also