Template:Sagittal: Difference between revisions
Jump to navigation
Jump to search
Dave Keenan (talk | contribs) Made "sagitype"and "sagittal" into links. |
Dave Keenan (talk | contribs) Fixed problem where (|\ was too low on Apple Macs after the previous workaround for its inverted glyph in the current version of Bravura Text. |
||
| Line 1: | Line 1: | ||
<includeonly><span class="bravura" style="font-size: {{{size|250%}}}; line-height: {{{height|16px}}}; vertical-align: -0.3em; {{#switch: | <includeonly>{{#ifeq: | ||
{{#replace: | |||
{{#replace: | |||
{{{1|}}}¦{{{2|⌫}}}¦{{{3|⌫}}}¦{{{4|⌫}}} | | |||
¦⌫ | }} | | |||
{{pipe}} | ¦ }} | | |||
(¦\ | | |||
<span style="display: inline-block; transform: scaleY(-1);"><span class="bravura" style="font-size: {{{size|250%}}}; line-height: {{{height|16px}}}; vertical-align: -0.225em;"></span></span> | | |||
<span class="bravura" style="font-size: {{{size|250%}}}; line-height: {{{height|16px}}}; vertical-align: -0.3em; {{#switch: | |||
{{#replace: | {{#replace: | ||
{{#replace: | {{#replace: | ||
| Line 36: | Line 44: | ||
(¦) = "> | | (¦) = "> | | ||
(!) = "> | | (!) = "> | | ||
(¦\ = | (¦\ = "> | | ||
(!/ = "> | | (!/ = "> | | ||
)¦¦( = "> | | )¦¦( = "> | | ||
| Line 284: | Line 292: | ||
¦⌫ | }} | | ¦⌫ | }} | | ||
¦ | {{pipe}} }} | ¦ | {{pipe}} }} | ||
}}</span>⁠ ⁠</includeonly><noinclude> | }}</span>}}⁠ ⁠</includeonly><noinclude> | ||
The '''Sagittal''' template converts a [[sagitype]] code (the pictorial ASCII code for sagittal) into a [[sagittal]] symbol in the BravuraText font. | The '''Sagittal''' template converts a [[sagitype]] code (the pictorial ASCII code for sagittal) into a [[sagittal]] symbol in the BravuraText font. | ||
Revision as of 22:48, 11 October 2024
The Sagittal template converts a sagitype code (the pictorial ASCII code for sagittal) into a sagittal symbol in the BravuraText font.
The Sagittal template converts a sagitype code (the pictorial ASCII code for sagittal) into a sagittal symbol in the BravuraText font. There are also ASCII codes for lettered noteheads and staff segments. See the source code for the full list.
Usage notes
This template accepts one unnamed argument and two named arguments:
- Text in the form of sagitype, representing a sagittal or related symbol.
- (optional) size = a CSS font-size value; defaults to "250%".
- (optional) height = a CSS line-height value, e.g. "16px"; defaults to "0.6em".
Notes:
- Pipe characters (
|) do not need to be escaped. - Short-sagitype (single-character codes for common sagittals) is not yet supported.
Examples
| You type | You get |
|---|---|
{{sagittal| /| }} |
|
{{sagittal| !) }} |
|