Template:Monzo: Difference between revisions

From Xenharmonic Wiki
Jump to navigation Jump to search
Xenwolf (talk | contribs)
Usage example: lowercase version better for usage
ArrowHead294 (talk | contribs)
mNo edit summary
 
(9 intermediate revisions by 3 users not shown)
Line 1: Line 1:
<includeonly><span class="monzo"><span class="left">&#91;</span>{{trim| {{{1|{{{text|0}}}}}} }}<span class="right">&#x27E9;</span></span></includeonly><noinclude>
<includeonly>{{#if: {{{legend|}}}|[[monzo]]:&nbsp;}}{{ket|{{{1|0}}}}}</includeonly><noinclude>
This template eases using [[monzo notation]], because the left angle bracket (<code>&#91;</code>) controls specific wiki functions and the greater sign (<code>&gt;</code>) - used as a surrogate for right angle bracket <code>&#x27E9;</code> ([[Unicode]] code point [https://www.compart.com/de/unicode/U+27E9 U+27E9]) - has a special meaning in HTML and also in the wiki text.
This '''monzo''' template eases typing [[monzo]]s by putting ket notation (<code>[</code> and <code>&#x27E9;</code>) around its arguments and removing surrounding spaces. You may optionally include a legend.  


== Usage example ==
{{documentation}}


; You type
[[Category:Formatting templates]]
: <code><nowiki>{{monzo| -19 12 }}</nowiki></code>


; You get (rendered)
<!-- Interwiki -->
: <span class="monzo"><span class="left">&#91;</span>{{trim| -19 12 }}<span class="right">&#x27E9;</span></span>
 
== See also ==
* [[Template:Val]]
 
[[Category:Templates]]
 
<!-- interwiki -->
[[de:Vorlage:Monzo]]
[[de:Vorlage:Monzo]]
[[es:Plantilla:Monzo]]
[[es:Plantilla:Monzo]]
</noinclude>
</noinclude>

Latest revision as of 00:07, 5 January 2025

This monzo template eases typing monzos by putting ket notation ([ and ) around its arguments and removing surrounding spaces. You may optionally include a legend.

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

Usage

You type You get (rendered)
{{monzo| -19 12 }} [-19 12
{{monzo|legend=1| -19 12 }} monzo[-19 12

Tip: Adding spaces improves readability of the markup.

Technical note

This template calls Template:Ket to render the brackets.

See also