Template:Multimonzo: Difference between revisions

From Xenharmonic Wiki
Jump to navigation Jump to search
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}}}}}}..."
 
Cmloegcmluin (talk | contribs)
correct rank to nullity
Line 1: Line 1:
<includeonly><span class="monzo"><span class="left-delim">&#91;{{#switch: {{{rank|2}}} | 2 = &#91; | 3 = &#91;&#91; | 4 = &#91;&#91;&#91; }}</span>{{trim| {{{1|{{{text|0}}}}}} }}<span class="right-delim">⟩{{#switch: {{{rank|2}}} | 2 = ⟩ | 3 = ⟩⟩ | 4 = ⟩⟩⟩ }}</span></span></includeonly><noinclude>
<includeonly><span class="monzo"><span class="left-delim">&#91;{{#switch: {{{nullity|2}}} | 2 = &#91; | 3 = &#91;&#91; | 4 = &#91;&#91;&#91; }}</span>{{trim| {{{1|{{{text|0}}}}}} }}<span class="right-delim">⟩{{#switch: {{{nullity|2}}} | 2 = ⟩ | 3 = ⟩⟩ | 4 = ⟩⟩⟩ }}</span></span></includeonly><noinclude>


This template eases using nested kets, such as for [[The_dual|multimonzos]]: it puts the correct brackets (<code>&#91;&#91;</code> and <code>⟩⟩</code>) around its arguments (it also removes surrounding space).
This template eases using nested kets, such as for [[The_dual|multimonzos]]: it puts the correct brackets (<code>&#91;&#91;</code> and <code>⟩⟩</code>) around its arguments (it also removes surrounding space).
Line 7: Line 7:
; You type
; You type
* <code><nowiki>{{Multimonzo| 12 -13 4 10 -4 1 }}</nowiki></code>
* <code><nowiki>{{Multimonzo| 12 -13 4 10 -4 1 }}</nowiki></code>
* <code><nowiki>{{Multimonzo| rank=3 | -87 72 -49 31 }}</nowiki></code>
* <code><nowiki>{{Multimonzo| nullity=3 | -87 72 -49 31 }}</nowiki></code>


; You get
; You get
* {{ {{PAGENAME}} | 12 -13 4 10 -4 1 }}
* {{ {{PAGENAME}} | 12 -13 4 10 -4 1 }}
* {{ {{PAGENAME}} | rank=3 | -87 72 -49 31 }}
* {{ {{PAGENAME}} | nullity=3 | -87 72 -49 31 }}


[[Category:Templates]]
[[Category:Templates]]


</noinclude>
</noinclude>

Revision as of 16:16, 18 May 2021


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| nullity=3 | -87 72 -49 31 }}
You get
  • [[12 -13 4 10 -4 1⟩⟩
  • [[[-87 72 -49 31⟩⟩⟩