Template:Val: Difference between revisions

From Xenharmonic Wiki
Jump to navigation Jump to search
Xenwolf (talk | contribs)
See also: explanation for common.css link
ArrowHead294 (talk | contribs)
mNo edit summary
 
(7 intermediate revisions by 2 users not shown)
Line 1: Line 1:
<includeonly><span class="val"><span class="left-delim">&#x27E8;</span>{{trim| {{{1|{{{text|0}}}}}} }}<span class="right-delim">&#93;</span></span></includeonly><noinclude>
<includeonly>{{#if: {{{legend|}}}|[[val]]:&nbsp;}}{{bra|{{{1|0}}}}}</includeonly><noinclude>
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).
{{documentation}}


== Usage example ==
[[Category:Formatting templates]]
 
; 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)
 
; You get (rendered)
: <span class="val"><span class="left-delim">&#x27E8;</span>{{trim| 31 49 72 87 }}<span class="right-delim">&#93;</span></span>
 
== 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]] ... contains style definition(s) for the <code>val class</code>
 
[[Category:Templates]]
</noinclude>
</noinclude>

Latest revision as of 16:21, 31 January 2025

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

This template eases typing vals by putting bra notation ( and ]) around its arguments and removing surrounding spaces. You may optionally include a legend.

Usage

You type You get (rendered)
{{val| 31 49 72 87 }} 31 49 72 87]
{{val|legend=1| 31 49 72 87 }} val31 49 72 87]

Tip: Adding spaces improves readability of the markup.

Technical note

This template calls Template:Bra to render the brackets.

See also