Template:Abbr

From Angelina Jordan Wiki

Documentation

This template provides a simple interface to the <abbr> HTML element. It should not be used for anything except abbreviations (including acronyms and initialisms). In particular, it should not be used merely for its side-effect (for most readers) of rendering text in a "tooltip" (for which see Template:Tooltip).

The template complains if it doesn't find two inputs (for the abbreviation and its meaning).

The name of this template is based on the word "abbreviation".

This template is used on a great many pages. Making any changes to it will cause lots of jobs to be added to the processing queue.

Usage

  • {{abbr|abbreviation|expanded form}}

Examples

  • {{abbr|NOK|Norwegian krone}}NOK

Typically you must "hover" on (or "mouseover") the abbreviation to see the expanded form. If that's not true for you, then you probably already know how to get the equivalent of a "tooltip" is in the user interface you are using.

Bad calls

  • {{abbr}}please provide abbreviation and expanded form
  • {{abbr|}}please provide abbreviation and expanded form
  • {{abbr|TOC}} ⇒ <abbr title="please provide expanded form">TOC
  • {{abbr||Table of Contents}}please provide abbreviation

Limitations

Links

The expanded-form text cannot contain a link. If it does, the wiki markup used to create the link will be visible in the expanded form:

  • {{abbr|NOK|[[wikipedia:Norwegian krone|Norwegian krone]]}}NOK

(If necessary, hover on "NOK" to see why this is not what you want.)

A simple workaround is to place the abbreviation inside the link instead of the other way around:

  • [[wikipedia:Norwegian krone|{{abbr|NOK|Norwegian krone}}]]NOK

Alternatively, you might be able to accomplish what you want by using a normal "piped" wikilink, since those are already set up to show a toolip containing the page title being linked to when hovered on. In such a case, the link target serves as the expanded form, and should be either an existing article or a redirect to one, as seen here:

  • [[Kringkastingsorkestret|KORK]]KORK

However, this won't work as expected if page previews are enabled (because then the text before the pipe will not be shown to the reader). But it doesn't really matter, since the target article of the link presumably will explain the meaning of the abbreviation being linked to early enough in the article text to be seen in the preview — in which case, piping is not even necessary:

Markup

The expanded-form text can contain HTML character entities (such as &ouml; for the letter ö), but not HTML elements (such as <i>italics</i>) or wiki markup (such as ''italics''). If such markup is used, it will either be visible in the expanded text or cause raw markup to be displayed, as seen here:

  • {{abbr|NGT|''Norway's Got Talent''}}NGT
  • {{abbr|NGT|<i>Norway's Got Talent</i>}} ⇒ <abbr title="Norway's Got Talent">NGT

Fortunately, there shouldn't be any real need for special styles in the expanded-form text.