Template:Multival: Difference between revisions

From Xenharmonic Wiki
Jump to navigation Jump to search
Created page with "<includeonly>{{#if: {{{legend|}}} | Wedgie: }}<span class="val"><span class="left-delim">⟨{{#switch: {{{rank|2}}} | 2 = ⟨ | 3 = ⟨⟨ | 4 = &..."
 
ArrowHead294 (talk | contribs)
mNo edit summary
 
(8 intermediate revisions by 2 users not shown)
Line 1: Line 1:
<includeonly>{{#if: {{{legend|}}} | [[Wedgie]]:&nbsp;}}<span class="val"><span class="left-delim">&#x27E8;{{#switch: {{{rank|2}}} | 2 = &#x27E8; | 3 = &#x27E8;&#x27E8; | 4 = &#x27E8;&#x27E8;&#x27E8; }}</span>{{trim| {{{1|{{{text|0}}}}}} }}<span class="right-delim">&#93;{{#switch: {{{rank|2}}} | 2 = &#93; | 3 = &#93;&#93; | 4 = &#93;&#93;&#93; }}</span></span></includeonly><noinclude>
<includeonly>{{#if: {{{legend|}}}|[[Wedgie]]:&nbsp;}}<span class="val"><span class="left-delim">&#x27E8;{{#switch: {{{rank|2}}}
 
| #default=&#x27E8;
This template eases using [[wedgie]] notation: it puts the right brackets (<code>&#x27E8;&#x27E8;</code> and <code>&#93;&#93;</code>) around its arguments (it also removes surrounding space).
| 3=&#x27E8;&#x27E8;
 
| 4=&#x27E8;&#x27E8;&#x27E8;
You can select bi-, tri-, or quad-val by specifying a second argument as <code>2</code> (default), <code>3</code>, or <code>4</code>.
}}&#x200A;</span>{{trim|{{{1|0}}}}}<span class="right-delim">&#x200A;&#93;{{#switch: {{{rank|2}}}
 
| #default=&#93;
; You type
| 3=&#93;&#93;
* <code><nowiki>{{Multival| 1 4 10 4 13 12 }}</nowiki></code>
| 4=&#93;&#93;&#93;
* <code><nowiki>{{Multival| rank=3 | 4 -3 -14 -4 }}</nowiki></code>
}}</span></span></includeonly><noinclude>
 
{{documentation}}
; You get
* {{ {{PAGENAME}} | 1 4 10 4 13 12 }}
* {{ {{PAGENAME}} | rank=3 | 4 -3 -14 -4 }}
 
; To include a legend, type
* <code><nowiki>{{Multival| legend=1 | rank=3 | 4 -3 -14 -4 }}</nowiki></code>
 
; So you get
* {{ {{PAGENAME}} | legend=1 | rank=3 | 4 -3 -14 -4 }}
 
[[Category:Templates]]


[[Category:Formatting templates]]
</noinclude>
</noinclude>

Latest revision as of 19:28, 30 January 2025

Template documentation[view] [edit] [history] [purge]

This template eases using wedgie notation: it puts the right brackets (⟨⟨ and ]]) around its arguments (it also removes surrounding space).

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

Usage

You type You get
{{multival| 1 4 10 4 13 12 }} ⟨⟨ 1 4 10 4 13 12 ]]
{{multival|rank=3| 4 -3 -14 -4 }} ⟨⟨⟨ 4 -3 -14 -4 ]]]

To include a legend, type

  • {{multival|legend=1|rank=3| 4 -3 -14 -4 }}

This produces

  • Wedgie⟨⟨⟨ 4 -3 -14 -4 ]]]

See also