Template:Dash/doc: Difference between revisions
ArrowHead294 (talk | contribs) m De-escape |
ArrowHead294 (talk | contribs) mNo edit summary |
||
(6 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
{{dochead}} | {{dochead}}{{substitute|no}}{{clear}}{{lua}} | ||
This template converts a sequence separated by commas and spaces into one separated by dashes. | This template is designed to illustrate chains of intervals (fifths especially) without having to manually type out the entities such as <code>&mdash;</code> or <code>&ndash;</code>. It also allows the insertion of spaces in between the dashes and elements in order to reduce clutter. It converts a sequence separated by commas and spaces into one separated by dashes. | ||
=== Parameters === | === Parameters === | ||
Line 21: | Line 21: | ||
For the primary separator, separate items by <code>,</code> followed by one or more spaces (if no secondary separator is specified, any combination of commas and whitespaces of any length will be treated as a single separator, as long as it ends in one or more whitespaces). An additional separator can be invoked by separating items using two commas (<code>,,</code>) followed by one or more spaces. | For the primary separator, separate items by <code>,</code> followed by one or more spaces (if no secondary separator is specified, any combination of commas and whitespaces of any length will be treated as a single separator, as long as it ends in one or more whitespaces). An additional separator can be invoked by separating items using two commas (<code>,,</code>) followed by one or more spaces. | ||
==== Commas ==== | |||
'''Note:''' Comma characters that are not part of a separator must be escaped as <code>&#44;</code>. | |||
=== Usage === | === Usage === | ||
Line 27: | Line 30: | ||
To adjust spacing between list elements and dashes, use the <code>spaces</code> parameter (defaults to the regular space character). | To adjust spacing between list elements and dashes, use the <code>spaces</code> parameter (defaults to the regular space character). | ||
{| class="wikitable center-all" | {| class="wikitable center-all" | ||
|- | |||
! You type !! You get | ! You type !! You get | ||
|- | |- | ||
Line 45: | Line 49: | ||
{| class="wikitable center-all" | {| class="wikitable center-all" | ||
|- | |||
! You type !! You get | ! You type !! You get | ||
|- | |- | ||
Line 71: | Line 76: | ||
=== Examples === | === Examples === | ||
{| class="wikitable center-all" | {| class="wikitable center-all" | ||
|- | |||
! You type !! You get | ! You type !! You get | ||
|- | |- | ||
Line 95: | Line 101: | ||
| <code><nowiki>{{dash|F, C, G, D, A,, E,, B,, F♯|s=hair|d=oarr}}</nowiki></code> || {{{{ROOTPAGENAME}}|F, C, G, D, A,, E,, B,, F♯|s=hair|d=oarr}} | | <code><nowiki>{{dash|F, C, G, D, A,, E,, B,, F♯|s=hair|d=oarr}}</nowiki></code> || {{{{ROOTPAGENAME}}|F, C, G, D, A,, E,, B,, F♯|s=hair|d=oarr}} | ||
|} | |} | ||