Template:Multimonzo

From Xenharmonic Wiki
Revision as of 15:24, 6 May 2021 by Cmloegcmluin (talk | contribs) (Created page with "<includeonly><span class="monzo"><span class="left-delim">[{{#switch: {{{rank|2}}} | 2 = [ | 3 = [[ | 4 = [[[ }}</span>{{trim| {{{1|{{{text|0}}}}}}...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search


This template eases using nested kets, such as for multimonzos: it puts the correct brackets ([[ and ⟩⟩) around its arguments (it also removes surrounding space).

You can select bi-, tri-, or quad-monzo by specifying a second argument as 2 (default), 3, or 4.

You type
  • {{Multimonzo| 12 -13 4 10 -4 1 }}
  • {{Multimonzo| rank=3 | -87 72 -49 31 }}
You get
  • [[12 -13 4 10 -4 1⟩⟩
  • [[[-87 72 -49 31⟩⟩⟩