Jump to content

Template:Spw/doc

From Wikisource

Usage

[edit]

This is an complement to the {{sp}} and {{lsp}} templates intended to integrate letterspacing in body text where it is used similarly to italics.

The main difference is that it uses the CSS property word-spacing to keep the spacing between words the same as normal text (as such, it has a smaller default spacing of 0.1em to keep it readable). It also surrounds its contents with a specifiable HTML tag indicating that its different appearance is more than strictly aesthetic (for example, it may appear underlined in a terminal browser or receive).

Due to the implementation, if a different {{word-spacing}} is desired, it must be used inside the content.

Parameters

[edit]
  • 1: (Most of) the text to space out.
  • 2: The last letter, which is not to be followed by letterspacing, but is part of the spaced-out text.
  • w (optional): the width of the letter-spacing (in em units), default 0.1. Word-spacing is reduced accordingly.
  • semantic (optional): The name of the HTML tag to use if the default of i is not the closest fit; for instance, em (if spaced text indicates emphasis) or cite (if spaced text indicates a title). This is only important/different in theory, and can be safely ignored if one does not know the difference.
  • lang (optional): The language code if applicable (as a less featureful alternative to surrounding with {{lang}}).
  • style (optional): Additional CSS properties.

Examples

[edit]

Example

The {{spw|quick brown fo|x}} jumps over the {{spw|lazy do|g}}.

The quick brown fox jumps over the lazy dog.

A temporary normal spacing in the middle of spaced text (often used for punctuation) can be accomplished with {{lsp}}:

Example

{{spw|The Wel{{lsp|0|l-}}Tempered Clavie|r|w=0.075}}

The Well-Tempered Clavier

See also

[edit]