Jump to content

Template:Apostrophe/doc

From Wikivoyage

The {{Apostrophe}} template (more commonly invoked using its alias {{'}}) outputs a single, "straight" quotation mark (') with an extra ~2 pixels of leading space preceding it (assuming the use of the default Wikivoyage body text font size—the leading space amount is a derivative of the size of the font it appears in, scaling automatically to maintain the correct offset).

Usage

[edit]

This template is intended for use with italic text, amongst which the otherwise insignificant amount of leading space can serve to meaningfully enhance the character's visibility by matching the average amount of lateral shift encountered in most italic fonts. It accepts no parameters and is only capable of the aforementioned fixed output.

Example

[edit]

The ''Iliad''{{'}}s vocabulary is archaic.

…generates:

The Iliad's vocabulary is archaic.

The small amount of extra leading space before the apostrophe allows it to avoid colliding with the stroke of the italic d at the end of Iliad, making the text more readable.

Technical details

[edit]

The precise CSS declaration used by this template is padding-left: 0.1em;. The declaration is an inline style attribute of <span></span> tags whose contents is the lone HTML decimal entity &#39;. The tags also possess the class="nowrap" attribute, which on all official Wikimedia Foundation wikis imparts the CSS declaration white-space: nowrap; and serves in this instance to "glue" the mark to the adjacent text, ensuring that the layout engine always keeps them together on the same line.

TemplateData

[edit]

This is the TemplateData for Template:Apostrophe, for use by TemplateWizard, VisualEditor and other tools.

Template description

Outputs a single, "straight" quotation mark with a small amount of additional leading space, intended to enhance visibility of the mark when adjacent to bold or italic text

Template parameters

This template prefers inline formatting of parameters.

ParameterDescriptionTypeStatus
No parameters specified