Template:`/doc: Difference between revisions

From Xenharmonic Wiki
Jump to navigation Jump to search
ArrowHead294 (talk | contribs)
Documentation
 
ArrowHead294 (talk | contribs)
mNo edit summary
 
(28 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{dochead}}{{wikipedia}}
{{dochead}}{{substitute|no}}{{clear}}{{wikipedia}}
This template uses the [[wikipedia:List of XML and HTML character entity references|decimal code]] for the apostrophe or single-quote character. When taking the possessive of titles, or when indicating the derivative of a function, this template prevents an apostrophe or single quote from becoming mistakenly interpreted with adjacent '''bold''' (<code><nowiki>'''</nowiki></code>) or ''italic'' (<code><nowiki>''</nowiki></code>) Wiki markup.<br /><br />
Sometimes, apostrophes may collide with certain characters such as lowercase ''d''{{`s}} and ''l''{{`s}}, especially after '''bold''' (<code><nowiki>'''</nowiki></code>) or ''italic'' (<code><nowiki>''</nowiki></code>) text. In these cases, {{plaincode|<nowiki>{{`}}</nowiki>}} and {{tlx|`s|plaincode}} can be used to prevent such collisions. This template is the same as {{tlx|&#39;|plaincode}} except that it inserts a small amount of space before the apostrophe.
 
Sometimes, apostrophes may collide with certain characters such as lowercase ''d''{{-'}}s and ''l''{{-'}}s, especially after '''bold''' or ''italic'' text. This template is the same as {{tlx|&#39;|plaincode}} except that it inserts a small amount of space before the apostrophe to avoid such collisions.


=== Usage ===
{| class="wikitable" style="text-align: center; margin: auto auto auto auto;"
{| class="wikitable" style="text-align: center; margin: auto auto auto auto;"
|-
|-
Line 9: Line 8:
! You get
! You get
|-
|-
| <code>The <nowiki>''Illiad''{{nbhsp}}{{'}}s</nowiki> vocabulary</code>
| <code><nowiki>''The Doobie Brothers''{{`}} latest album</nowiki></code>
| rowspan="2" | The ''Illiad''{{-'}}s vocabulary
| ''The Doobie Brothers''{{`}} latest album
|-
|-
| <code>The <nowiki>''Illiad''{{-'}}s</nowiki> vocabulary</code>
| <code><nowiki>''Le Serre Nuove dell{{`}}Ornellaia''</nowiki></code>
| ''Le Serre Nuove dell{{`}}Ornellaia''
|}
|}


<br /><hr />
=== Technical notes ===
{{esctl}}
This template does not insert any semantically invalid whitespace characters, but does all the spacing visually only, in [[CSS]].
 
The templates {{tlx|'|plaincode}} and {{plaincode|<nowiki>{{`}}</nowiki>}} are used in the ''opposite'' manner compared to on Wikipedia: On Wikipedia {{tlx|'|plaincode}} adds a space before the apostrophe and {{plaincode|<nowiki>{{`}}</nowiki>}} does not, whereas on the Xenharmonic Wiki {{plaincode|<nowiki>{{`}}</nowiki>}} adds spacing and {{tlx|'|plaincode}} does not.
 
When inserting an apostrophe before a lowercase "s", it is recommended to use {{tlx|`s|plaincode}}, as {{plaincode|<nowiki>{{`}}s</nowiki>}} can be somewhat awkward. For example: <code><nowiki>The ''Iliad''{{`s}} vocabulary</nowiki></code>
 
=== See also ===
* {{tlx|``|plaincode}} and {{tlx|-`|plaincode}} – used to insert a single prime
* {{tlx|"|plaincode}} and {{tlx|-"|plaincode}} – used to insert a double prime

Latest revision as of 18:59, 12 February 2026

This template should not be substituted.
English Wikipedia has an article on:

Sometimes, apostrophes may collide with certain characters such as lowercase d's and l's, especially after bold (''') or italic ('') text. In these cases, {{`}} and {{`s}} can be used to prevent such collisions. This template is the same as {{'}} except that it inserts a small amount of space before the apostrophe.

Usage

You type You get
''The Doobie Brothers''{{`}} latest album The Doobie Brothers' latest album
''Le Serre Nuove dell{{`}}Ornellaia'' Le Serre Nuove dell'Ornellaia

Technical notes

This template does not insert any semantically invalid whitespace characters, but does all the spacing visually only, in CSS.

The templates {{'}} and {{`}} are used in the opposite manner compared to on Wikipedia: On Wikipedia {{'}} adds a space before the apostrophe and {{`}} does not, whereas on the Xenharmonic Wiki {{`}} adds spacing and {{'}} does not.

When inserting an apostrophe before a lowercase "s", it is recommended to use {{`s}}, as {{`}}s can be somewhat awkward. For example: The ''Iliad''{{`s}} vocabulary

See also

  • {{``}} and {{-`}} – used to insert a single prime
  • {{"}} and {{-"}} – used to insert a double prime