Template:Chord: Difference between revisions
Jump to navigation
Jump to search
(Created page with "<noinclude>Use this template to place a chord above a line of text. Usage example: <pre>"Sore ja {{chord|ma|F}}ta ne" tte te o {{chord|fu|A}}tte</pre> "Sore ja {{chord|ma|F}}ta ne" tte te o {{chord|fu|A}}tte Notes: * Generally the template should enclose a single syllable or mora. * The first parameter is the text. The second parameter is the chord. * It will automatically convert <tt>b</tt> to ♭ and <tt>#</tt> to ♯ for you. </noinclude><includeonly><templatestyl...") |
No edit summary |
||
(3 intermediate revisions by the same user not shown) | |||
Line 8: | Line 8: | ||
* Generally the template should enclose a single syllable or mora. | * Generally the template should enclose a single syllable or mora. | ||
* The first parameter is the text. The second parameter is the chord. | * The first parameter is the text. The second parameter is the chord. However, if there is only one parameter, it is the chord. | ||
* It will automatically convert <tt>b</tt> to ♭ and <tt>#</tt> to ♯ for you. | * It will automatically convert <tt>b</tt> to ♭ and <tt>#</tt> to ♯ for you. | ||
* If several longer chords are placed close together, they will overlap. | |||
* If you need to avoid this, you can specify the optional '''width''' parameter, which reserves space for a specified number of letters. | |||
</noinclude><includeonly><templatestyles | </noinclude><includeonly><templatestyles | ||
src="Chord/styles.css" | src="Chord/styles.css" | ||
/><span | /><span | ||
data-chord="{{#replace:{{#replace:{{{2}}}|b|♭}}|#|♯}}">{{{1}}}</span></includeonly> | {{#if:{{{width|}}}|style="display: inline-block; width:{{{width}}}ch"}} | ||
data-chord="{{#replace:{{#replace:{{{2|{{{1}}}}}}|b|♭}}|#|♯}}">{{#if:{{{2|}}}|{{{1}}}}}</span></includeonly> |
Latest revision as of 06:43, 23 February 2024
Use this template to place a chord above a line of text. Usage example:
"Sore ja {{chord|ma|F}}ta ne" tte te o {{chord|fu|A}}tte
"Sore ja mata ne" tte te o futte
Notes:
- Generally the template should enclose a single syllable or mora.
- The first parameter is the text. The second parameter is the chord. However, if there is only one parameter, it is the chord.
- It will automatically convert b to ♭ and # to ♯ for you.
- If several longer chords are placed close together, they will overlap.
- If you need to avoid this, you can specify the optional width parameter, which reserves space for a specified number of letters.