Template:'/doc
Documentation
This template is used to show a single apostrophe character (') in situations where that would otherwise be misinterpreted as wiki markup. (In other words, it's basically a replacement for <nowiki>'</nowiki>, although the way it's actually implemented is different. To be specific, a <span> element is used to insert a small amount of padding to the left of the apostrophe, as explained below.)
Usage
{{'}}{{'|0}}{{'|width}}
When called with no input (first form above), the template adds 0.1 em↗ of padding (whitespace) to the left of the apostrophe (equivalent to a hairspace↗, except that it doesn't allow a line-break). This is because in many cases where this template is necessary, it's because the apostrophe is immediately following text that is italicized by using double apostrophes, ''like this''. In such a case, the apostrophe is likely to benefit from having a little additional space to its left because the characters in front of it are "leaning" to the right.
If the padding is not necessary, it can be suppressed by using the second form above, which sets the width of the padding to 0. Change the 0 to any other valid CSS width (e.g., 0.2em) to get that amount of padding instead (third form).
Examples
In the following examples, the "F" and "s" are there only to clarify what the template is doing.
''F''{{'}}s⇒ F's''F''{{'|}}s⇒ F's''F''{{'|0}}s⇒ F's''F'''s⇒ F's
In the second example, the padding width is being set to an empty value, which has the same effect as setting it to 0 (but actually setting it to 0 is preferable). Notice how in the second and third examples, where no padding is used, it's harder to see the apostrophe. (Actually, that will depend somewhat on your system configuration and browser settings. Most people will see the apostrophe smashed up against the top right of the F, resulting in something that looks somewhat like a serif↗. This is potentially confusing and is part of the justification for using this template.)
The fourth example, which doesn't use the template at all, is there just for comparison sake, and shows that the template is arguably optional in this case.
Here is a more complicated "real-world" example, which is exactly the kind of thing that motivated the creation of this template in the first place:
'''"Are You Lonesome Tonight"''' is a song that reached number one on ''Billboard''{{'}}s Hot 100 chart.
⇒ "Are You Lonesome Tonight" is a song that reached number one on Billboard's Hot 100 chart.
Without the call to this template, it would look like this:
'''"Are You Lonesome Tonight"''' is a song that reached number one on ''Billboard'''s Hot 100 chart.
⇒ "Are You Lonesome Tonight"' is a song that reached number one on Billboards Hot 100 chart.
Here the MediaWiki parser is seeing the three apostrophes in a row near the end of the line as pairing up with the three apostrophes at the beginning of the line, resulting in most of the line being rendered in bold. This problem could be fixed by using a <nowiki> element, like this:
'''"Are You Lonesome Tonight"''' is a song that reached number one on ''Billboard''<nowiki>'</nowiki>s Hot 100 chart.
⇒ "Are You Lonesome Tonight" is a song that reached number one on Billboard's Hot 100 chart.
As with the "F" before, the top of the italicized "d" here is a little close to the apostrophe (in many browsers, anyway).
When the extra padding provided by the template is not necessary due to the shape of the character immediately in front of the apostrophe, whether it's worth removing the padding is a judgment call:
''A''{{'}}s⇒ A's''A''{{'|0}}s⇒ A's
''D''{{'}}s⇒ D's''D''{{'|0}}s⇒ D's