Music Notation

This page was for an early demonstration. For the lastest version see Template:Accidental

Template proposal for correctly rendering sharp/flat signs at Wikipedia. The music template is based on the Unicode and IPA templates. Unfortunately, the Unicode template fails to corrently render sharps and flats in Internet Explorer, so a music-specific template is required.

Template proposal

{{music|♭}} renders

{{music|♯}} renders

Without the template, ♭ (♭) and ♯ (♯) appear as boxes in Internet Explorer 6 or 7. The template does not harm the appearence in Firefox or Opera. In fact the template's choice of fonts improves the rendering.

Code proposal

HTML

{{music|foo}} produces <span title="Music notation" class="music">foo</span>

CSS

MediaWiki:Common.css includes the class delarations for Unicode and IPA. To the same section add the following code

.music { font-family: "Lucida Sans Unicode", "Arial Unicode MS"; }