Difference between revisions of "Template:Double+single+double/doc"

From blackwiki
Jump to navigation Jump to search
imported>SMcCandlish
(update)
imported>SMcCandlish
(code cleanup)
Line 9: Line 9:
 
*Using the template:
 
*Using the template:
  
:<code><nowiki>Kwan was quoted as saying, "She disputed his statement that 'Voltaire never said "I disapprove of what you say, but I will defend to the death your right to say it.</nowiki><span style="color:red;"><nowiki>{{</nowiki>" ' "<nowiki>}}</nowiki></span></code>
+
:<code>Kwan was quoted as saying, "She disputed his statement that 'Voltaire never said "I disapprove of what you say, but I will defend to the death your right to say it.<span style="color:fuchsia;"><strong><nowiki>{{" ' "}}</strong></nowiki></span></code>
  
:Kwan was quoted as saying, "She disputed his statement that 'Voltaire never said "I disapprove of what you say, but I will defend to the death your right to say it.<span style="color:red;">{{Double single double}}</span>
+
:Kwan was quoted as saying, "She disputed his statement that 'Voltaire never said "I disapprove of what you say, but I will defend to the death your right to say it.{{Double single double}}
  
 
*For comparison, here is the completely unspaced version:
 
*For comparison, here is the completely unspaced version:
  
:<code>Kwan was quoted as saying, "She disputed his statement that 'Voltaire never said "I disapprove of what you say, but I will defend to the death your right to say it.<span style="color:red;">"'"</span></code>
+
:<code>Kwan was quoted as saying, "She disputed his statement that 'Voltaire never said "I disapprove of what you say, but I will defend to the death your right to say it.<span style="color:fuchsia;"><strong>"'"</strong></span></code>
  
:Kwan was quoted as saying, "She disputed his statement that 'Voltaire never said "I disapprove of what you say, but I will defend to the death your right to say it.<span style="color:red;">"'"</span>
+
:Kwan was quoted as saying, "She disputed his statement that 'Voltaire never said "I disapprove of what you say, but I will defend to the death your right to say it."'"
  
 
*And here is the version with a semantically incorrect non-breaking space character:
 
*And here is the version with a semantically incorrect non-breaking space character:
  
:<code>Kwan was quoted as saying, "She disputed his statement that 'Voltaire never said "I disapprove of what you say, but I will defend to the death your right to say it.<span style="color:red;">"&amp;nbsp;'&amp;nbsp;"</span></code>
+
:<code>Kwan was quoted as saying, "She disputed his statement that 'Voltaire never said "I disapprove of what you say, but I will defend to the death your right to say it.<span style="color:fuchsia;"><strong>"&amp;nbsp;'&amp;nbsp;"</strong></span></code>
  
:Kwan was quoted as saying, "She disputed his statement that 'Voltaire never said "I disapprove of what you say, but I will defend to the death your right to say it.<span style="color:red;">"&nbsp;'&nbsp;"</span>
+
:Kwan was quoted as saying, "She disputed his statement that 'Voltaire never said "I disapprove of what you say, but I will defend to the death your right to say it."&nbsp;'&nbsp;"
  
 
:When rendered, the non-breaking-spaced version looks similar to or the same as the template version, but improperly mixes content and presentation.
 
:When rendered, the non-breaking-spaced version looks similar to or the same as the template version, but improperly mixes content and presentation.

Revision as of 08:02, 11 December 2009

Usage

The {{" ' "}} (or {{Double single double}} in long form) template is for use a) at the beginning of a "double-quoted" quotation that begins a 'single-quoted' quotation that in turn begins an enclosing "double-quoted" quotation, or b) at the end of a "double-quoted" quotation that ends a 'single-quoted' quotation that in turn ends an enclosing "double-quoted" quotation. Its purpose is to slightly space the single and double quotation marks apart for legibility, without actually inserting a space character. It does this with CSS, and does so because the insertion of extraneous space characters of any kind would be a violation of the semantic integrity of the web content of the article or other page in which it appeared.

Example (with highlighting added for clarity)
  • Using the template:
Kwan was quoted as saying, "She disputed his statement that 'Voltaire never said "I disapprove of what you say, but I will defend to the death your right to say it.{{" ' "}}</strong>
Kwan was quoted as saying, "She disputed his statement that 'Voltaire never said "I disapprove of what you say, but I will defend to the death your right to say it."'"
  • For comparison, here is the completely unspaced version:
Kwan was quoted as saying, "She disputed his statement that 'Voltaire never said "I disapprove of what you say, but I will defend to the death your right to say it."'"
Kwan was quoted as saying, "She disputed his statement that 'Voltaire never said "I disapprove of what you say, but I will defend to the death your right to say it."'"
  • And here is the version with a semantically incorrect non-breaking space character:
Kwan was quoted as saying, "She disputed his statement that 'Voltaire never said "I disapprove of what you say, but I will defend to the death your right to say it."&nbsp;'&nbsp;"
Kwan was quoted as saying, "She disputed his statement that 'Voltaire never said "I disapprove of what you say, but I will defend to the death your right to say it." ' "
When rendered, the non-breaking-spaced version looks similar to or the same as the template version, but improperly mixes content and presentation.

Mozilla/Firefox note

On some Mozilla-based browsers, the spacing is not perfectly even on both sides of the single-quote. There isn't anything we can do about this without making it look equally imperfect in most or all other browsers. This is a Mozilla bug, not a MediaWiki bug.

See also