Difference between revisions of "Template:Accidental"

From blackwiki
Jump to navigation Jump to search
blackwiki>Dbolton
m (Added alternate text to double flat and double sharp images (for non-graphical browsers))
blackwiki>Dbolton
Line 10: Line 10:
 
<!--Hopefully the inline style attribute will be replace by a class reference to "accidental" in [[MediaWiki:Common.css]]-->
 
<!--Hopefully the inline style attribute will be replace by a class reference to "accidental" in [[MediaWiki:Common.css]]-->
  
==Purpose==
+
==Benefits==
The template correctly renders Unicode sharps ({{accidental|sharp}}) flats ({{accidental|flat}}) and natural signs ({{accidental|natural}}) in [[Internet Explorer]] which would otherwise display [[Mojibake|empty squares]]. The choice of fonts also improves the rendering in other browsers such as [[Mozilla Firefox]]. The idea is modeled after [[Template:IPA]]. See the table below to compare the results in your current browser.
+
The template correctly renders Unicode sharps ({{accidental|sharp}}) flats ({{accidental|flat}}) and natural signs ({{accidental|natural}}) in [[Internet Explorer]] which would otherwise display [[Mojibake|empty squares]]. The choice of fonts also improves the rendering in other browsers such as [[Mozilla Firefox]]. See the table below to compare the results in your current browser.
  
 
{| cellspacing="14"
 
{| cellspacing="14"
Line 39: Line 39:
 
<nowiki>{{accidental|sharp}}</nowiki> renders {{accidental|sharp}}<br/>
 
<nowiki>{{accidental|sharp}}</nowiki> renders {{accidental|sharp}}<br/>
 
<nowiki>{{accidental|doublesharp}}</nowiki> renders {{accidental|doublesharp}}
 
<nowiki>{{accidental|doublesharp}}</nowiki> renders {{accidental|doublesharp}}
 +
 +
==Purpose==
 +
# The template code should be easy to remember
 +
# The template should improve cross-browser support for music symbols
 +
# The template should reduce edit squabbles between [[Unicode]] sharps and flats versus [[ASCII]] b's and #'s. It should not be used to create new edit wars
 
</noinclude>
 
</noinclude>

Revision as of 22:58, 22 June 2007

{{{1}}}


Benefits

The template correctly renders Unicode sharps () flats () and natural signs () in Internet Explorer which would otherwise display empty squares. The choice of fonts also improves the rendering in other browsers such as Mozilla Firefox. See the table below to compare the results in your current browser.

Without template With template
Flat
Natural
Sharp

The template also makes use of SVG to display double flat (double flat) and double sharp (double sharp) signs since the corresponding Unicode characters are not widely supported.

Examples

Flat sign

{{accidental|flat}} renders
{{accidental|doubleflat}} renders double flat

Natural sign

{{accidental|natural}} renders

Sharp sign

{{accidental|sharp}} renders
{{accidental|doublesharp}} renders double sharp

Purpose

  1. The template code should be easy to remember
  2. The template should improve cross-browser support for music symbols
  3. The template should reduce edit squabbles between Unicode sharps and flats versus ASCII b's and #'s. It should not be used to create new edit wars