Template:Dash/doc: Difference between revisions

From Xenharmonic Wiki
Jump to navigation Jump to search
ArrowHead294 (talk | contribs)
No edit summary
ArrowHead294 (talk | contribs)
No edit summary
Line 54: Line 54:
| {{dash|A, B, C, D, E, F, G, H|s=hair|d=long}}
| {{dash|A, B, C, D, E, F, G, H|s=hair|d=long}}
|-
|-
| <syntaxhighlight lang="text">{{dash|A, B, C, D, E, F, G, H|s=space|d=medium}}</syntaxhighlight>
| <syntaxhighlight lang="text">{{dash|A, B, C, D, E, F, G, H|s=space|d=med}}</syntaxhighlight>
| {{dash|A, B, C, D, E, F, G, H|s=space|d=medium}}
| {{dash|A, B, C, D, E, F, G, H|s=space|d=medium}}
|-
|-
| <syntaxhighlight lang="text">{{dash|A, B, C, D, E, F, G, H|s=thin|d=medium}}</syntaxhighlight>
| <syntaxhighlight lang="text">{{dash|A, B, C, D, E, F, G, H|s=thin|d=med}}</syntaxhighlight>
| {{dash|A, B, C, D, E, F, G, H|s=thin|d=medium}}
| {{dash|A, B, C, D, E, F, G, H|s=thin|d=medium}}
|-
|-
| <syntaxhighlight lang="text">{{dash|A, B, C, D, E, F, G, H|s=hair|d=medium}}</syntaxhighlight>
| <syntaxhighlight lang="text">{{dash|A, B, C, D, E, F, G, H|s=hair|d=med}}</syntaxhighlight>
| {{dash|A, B, C, D, E, F, G, H|s=hair|d=medium}}
| {{dash|A, B, C, D, E, F, G, H|s=hair|d=medium}}
|-
|-

Revision as of 01:43, 13 May 2024

This template converts a sequence separated by spaces into one separated by dashes.

Usage

The list to be converted is passed as one unnamed argument, using a comma and one or more spaces (, ) as the separator.

To adjust spacing between list elements and dashes, use the spaces parameter (defaults to the regular space character).

You pass You get
s= Regular space
s=space
s=thin Thin space (U+2009 THIN SPACE)
s=hair Hair space (U+200A HAIR SPACE)

The dash used can be the regular hyphen-minus, an em dash, or an en dash. This is done with the sep parameter.

You pass You get
d= -
d=short
d=long Em dash (U+2014 — EM DASH)
d=med En dash (U+2013 – EN DASH)

Examples

You type You get
{{dash|A, B, C, D, E, F, G, H|s=space|d=long}}
A — B — C — D — E — F — G — H
{{dash|A, B, C, D, E, F, G, H|s=thin|d=long}}
A — B — C — D — E — F — G — H
{{dash|A, B, C, D, E, F, G, H|s=hair|d=long}}
A — B — C — D — E — F — G — H
{{dash|A, B, C, D, E, F, G, H|s=space|d=med}}
A – B – C – D – E – F – G – H
{{dash|A, B, C, D, E, F, G, H|s=thin|d=med}}
A – B – C – D – E – F – G – H
{{dash|A, B, C, D, E, F, G, H|s=hair|d=med}}
A – B – C – D – E – F – G – H
{{dash|A, B, C, D, E, F, G, H|s=space|d=}}
A - B - C - D - E - F - G - H
{{dash|A, B, C, D, E, F, G, H|s=thin|d=}}
A - B - C - D - E - F - G - H
{{dash|A, B, C, D, E, F, G, H|s=hair|d=}}
A - B - C - D - E - F - G - H