Difference between revisions of "Template:Accidental"

From blackwiki
Jump to navigation Jump to search
blackwiki>Dbolton
(test)
blackwiki>Dbolton
(fix)
Line 1: Line 1:
 
<span class="accidental" style="font-family: Lucida Sans Unicode, Arial Unicode MS;">{{#switch: {{{1}}}
 
<span class="accidental" style="font-family: Lucida Sans Unicode, Arial Unicode MS;">{{#switch: {{{1}}}
 
  | flat = &#x266d;
 
  | flat = &#x266d;
 +
| doubleflat = [[Image:Doubleflat.svg|8px]]
 
  | natural = &#x266e;
 
  | natural = &#x266e;
 
  | sharp = &#x266f;
 
  | sharp = &#x266f;
 
  | doublesharp = [[Image:DoubleSharp.svg|8px]]
 
  | doublesharp = [[Image:DoubleSharp.svg|8px]]
| doubleflat = [[Image:DoubleFlat.svg|8px]]
 
 
  | #default = {{{1}}}
 
  | #default = {{{1}}}
 
}}</span><noinclude>
 
}}</span><noinclude>
Line 29: Line 29:
 
===Flat sign===
 
===Flat sign===
 
<nowiki>{{accidental|flat}}</nowiki> renders {{accidental|flat}}<br/>
 
<nowiki>{{accidental|flat}}</nowiki> renders {{accidental|flat}}<br/>
<nowiki>{{accidental|doubleflat}}</nowiki> renders {{accidental|double flat}}
+
<nowiki>{{accidental|doubleflat}}</nowiki> renders {{accidental|doubleflat}}
  
 
===Natural sign===
 
===Natural sign===
Line 36: Line 36:
 
===Sharp sign===
 
===Sharp sign===
 
<nowiki>{{accidental|sharp}}</nowiki> renders {{accidental|sharp}}<br/>
 
<nowiki>{{accidental|sharp}}</nowiki> renders {{accidental|sharp}}<br/>
<nowiki>{{accidental|doublesharp}}</nowiki> renders {{accidental|double sharp}}
+
<nowiki>{{accidental|doublesharp}}</nowiki> renders {{accidental|doublesharp}}
 
</noinclude>
 
</noinclude>

Revision as of 01:14, 22 June 2007

{{{1}}}


Purpose

The template correctly renders Unicode sharps () flats () and natural signs () in Internet Explorer which would show empty squares instead of the proper symbol. The idea is modeled after Template:IPA. The choice of fonts also improves the rendering in other browsers such as Mozilla Firefox.

Without template With template
Flat
Natural
Sharp

Examples

Flat sign

{{accidental|flat}} renders
{{accidental|doubleflat}} renders Doubleflat.svg

Natural sign

{{accidental|natural}} renders

Sharp sign

{{accidental|sharp}} renders
{{accidental|doublesharp}} renders DoubleSharp.svg