Template:Monzo list: Difference between revisions

Created page with "<includeonly>{{#if: {{{legend|}}} | Monzo list: }}<span class="left-delim">[</span>{{ket| {{{1|0}}} }}{{#if: {{{2|}}}|, {{ket| {{{2|}}} }} }}{{#if: {{{3|}}}|, {{k..."
 
ArrowHead294 (talk | contribs)
mNo edit summary
 
(3 intermediate revisions by 2 users not shown)
Line 1: Line 1:
<includeonly>{{#if: {{{legend|}}} | [[Monzo list]]:&nbsp;}}<span class="left-delim">&#91;</span>{{ket| {{{1|0}}} }}{{#if: {{{2|}}}|, {{ket| {{{2|}}} }} }}{{#if: {{{3|}}}|, {{ket| {{{3|}}} }} }}{{#if: {{{4|}}}|, {{ket| {{{4|}}} }} }}<span class="right-delim">&#93;</span></includeonly><noinclude>
<includeonly>{{#if: {{{legend|}}}|[[Monzo list]]:&nbsp;}}<span class="left-delim">&#91;</span>{{ket| {{{1|0}}} }}{{#if: {{{2|}}}|, {{ket| {{{2|}}} }} }}{{#if: {{{3|}}}|, {{ket| {{{3|}}} }} }}{{#if: {{{4|}}}|, {{ket| {{{4|}}} }} }}<span class="right-delim">&#93;</span></includeonly><noinclude>
This '''monzo list''' template eases typing [[monzo list]]s: it puts ket 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. Monzo lists are supported up to rank-4.
{{documentation}}


== Usage ==
[[Category:Formatting templates]]
; You type
: <code><nowiki>{{monzo list| 1 0 0 0 }}</nowiki></code>
: <code><nowiki>{{monzo list| 1 0 0 | 0 0 1 }}</nowiki></code>
: <code><nowiki>{{monzo list|legend=1| 1 0 0 0 | 0 1 1/4 0 | -3 0 5/2 0 }}</nowiki></code>
 
:'''Tip''': adding spaces improves readability of the wiki markup.
 
; You get (rendered)
: {{{{PAGENAME}}| 1 0 0 0 }}
: {{{{PAGENAME}}| 1 0 0 | 0 0 1 }}
: {{{{PAGENAME}}|legend=1| 1 0 0 0 | 0 1 1/4 0 | -3 0 5/2 0 }}
 
== Technical note ==
This template calls [[Template: Ket]] to render the brackets.
 
== See also ==
* [[Template: Mapping]]
* [[Template: Monzo]]
* [[Template: Ket]]
 
[[Category:Templates]]
</noinclude>
</noinclude>