Template:Val: Difference between revisions

From Xenharmonic Wiki
Jump to navigation Jump to search
Xenwolf (talk | contribs)
m fixed closing span
Xenwolf (talk | contribs)
Reworked: inline CSS moved to external CSS site+user, usage text much shorter, technical details moved down
Line 1: Line 1:
<includeonly><span style="white-space: nowrap; background-color:#f8f9ff"><span style="padding: 0 0.15em">&#x27E8;</span>{{trim| {{{1|{{{text|0}}}}}} }}<span style="padding: 0 0.15em">&#93;</span></span></includeonly><noinclude>
<includeonly><span class="val"><span class="left-delim">&#x27E8;</span>{{trim| {{{1|{{{text|0}}}}}} }}<span class="right-delim">&#93;</span></span></includeonly><noinclude>
This template eases using [[Vals_and_Tuning_Space|val notation]], because the accurate mathematical symbol used when writing it is the left angle bracket "⟨" ([[Unicode]] code point [https://www.compart.com/unicode/U+27E8 U+27E8]), which is not easy for most users to type, and so they instead use the visual approximation of the less-than symbol "<".  
This template eases using [[val notation]]: it puts the right brackets (<code>&#x27E8;</code> and <code>&#93;</code>) around its arguments (it also removes surrounding space).


Usage example:
== Usage example ==
<nowiki>{{val| 31 49 72 87 }}</nowiki>


...will be rendered as
; You type
: <code><nowiki>{{val| 31 49 72 87 }}</nowiki></code> or the equivalent
: <code><nowiki>{{val|text= 31 49 72 87 }}</nowiki></code>
(the option of adding spaces supports readability of the wiki markup)


<span style="white-space: nowrap; background-color:#f8f9ff"><span style="padding: 0 0.15em">&#x27E8;</span>31 49 72 87<span style="padding: 0 0.15em">]</span>
; You get (rendered)
: <span class="val"><span class="left-delim">&#x27E8;</span>{{trim| 31 49 72 87 }}<span class="right-delim">&#93;</span></span>


:''See also [[template:monzo]]''
== Technical Note ==
 
[[Code point]] [https://www.compart.com/unicode/U+27E8 U+27E8] is used for the left angle bracket <code>⟨</code>, the ASCII approximation is less-than symbol (<code>&lt;</code> or <code>&amp;lt;</code>).
 
== See also ==
 
* [[Template:Monzo]]
* [[Template:Rbrack]]
* [[Template:Trim]]
* [[MediaWiki:Common.css]]


[[Category:Templates]]
[[Category:Templates]]
</noinclude>
</noinclude>

Revision as of 12:03, 31 May 2020

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

Usage example

You type
{{val| 31 49 72 87 }} or the equivalent
{{val|text= 31 49 72 87 }}

(the option of adding spaces supports readability of the wiki markup)

You get (rendered)
31 49 72 87]

Technical Note

Code point U+27E8 is used for the left angle bracket , the ASCII approximation is less-than symbol (< or &lt;).

See also