Movatterモバイル変換


[0]ホーム

URL:


Jump to content
WikipediaThe Free Encyclopedia
Search

Template:Annotated link

Permanently protected template
From Wikipedia, the free encyclopedia
Template documentation[view] [edit] [history] [purge]
WarningThis template is used onapproximately 15,000 pages and changes may be widely noticed. Test changes in the template's/sandbox or/testcases subpages, or in your ownuser subpage. Consider discussing changes on thetalk page before implementing them.
This template usesLua:

Usage

Typically to be used in lists to provide an annotated link using theshort description for the linked page. For example: inSee also sections "editors should provide a brief annotation when a link's relevance is not immediately apparent, when the meaning of the term may not be generally known, or when the term is ambiguous".

By default, the short description of the linked page will be derived from the{{short description}} template responsible for setting the short description for that page. If a template is not transcluded in the page, the description will be blank. This behavior can be manipulated and other formatting options allow for the presentation of useful annotations even without a short description, which may still become available and therefore displayed at a later date.

Information in article titles should generallynot be repeated in the short description. Therefore, the display text of annotated links should usually retain anyparenthetical disambiguation.

Limitations

Some pages are assigned short descriptions by automatic methods;templates that generate short descriptions includeinfoboxes that use the data provided to its parameters to create a suitable short description, which may overrule other short descriptions that exist for or on the page.The module responsible for fetching the description is currently not able to detect or determine this type of dynamically created short description.

This template should not be used for annotating links on disambiguation pages. The relevant discussion is atWikipedia talk:Disambiguation/Archive 50 § Use of annotated links and concludes:

  • They contain formatting that is not in line with the long-established formatting for disambiguation entries atMOS:DAB.
  • The text of the descriptions is frequently not optimal for disambiguation pages, as it may be neither distinguishing nor succinct.
  • They would remove control of the text from the disambiguation page itself, and allow disambiguation pages to be modified without appearing in the edit history of the page itself, or in notifications relating to the page. (This reason is not fixable, and is sufficient reason not to use the template or any modification thereof.)

Basic

The most basic usage is:

Markup:{{Annotated link|Wikipedia}}
Result:Wikipedia – Free online crowdsourced encyclopedia

The text shown for the link may bepiped if desired or required (such as for addingitalics to thenames of works):

Markup:{{Annotated link|Wikipedia:Policies and guidelines|Policies and guidelines}}
Result:Policies and guidelines – Wikimedia procedural policy
Markup:{{Annotated link|Mona Lisa|''Mona Lisa''}}
Result:Mona Lisa – Painting by Leonardo da Vinci

Foreign language formatting options are available for the link text; seebelow.

If thelist format is unsuitable fordash separation of the link from the description, it may be replaced with something suitable:

Markup:{{Annotated link|Wikipedia:Policies and guidelines|Policies and guidelines|,}}
Result:Policies and guidelines, Wikimedia procedural policy

The examples above use unnamed parameters 1–3. The parameters can also be named or explicitly numbered:

Markup:{{Annotated link|name=Wikipedia:Policies and guidelines|display=Policies and guidelines|dash=,}}
Markup:{{Annotated link|1=Wikipedia:Policies and guidelines|2=Policies and guidelines|3=,}}

There are many possible configurations beyond this; as described below, and most parameters have aliases.

Extended

There are manyavailable parameters, broken down into the following sections:

Template links

Links to templates will be automatically formatted as would be expected by{{template link}}:

Markup:{{Annotated link|Template:Annotated link}}
Result: {{Annotated link}}

Formatting as would be expected by{{template link expanded}} may be applied by adding|template_link=code:

Markup:{{Annotated link | Template:Annotated link | template_link=code }}
Result:{{Annotated link}}

If this formatting is determined to be inappropriate for the circumstance; use|template_link=no to disable it:

Markup:{{Annotated link | Template:Annotated link | template_link=no }}
Result:Template:Annotated link

If the template link formatting is disabled; use the second parameter,|2= or|display= to affect the text display:

Markup:{{Annotated link | Template:Annotated link | Annotated link | template_link=no }}
Result:Annotated link

Quoting link titles

Sometitles of works, such assong titles, should be double quoted; this formatting may be applied using|quote=yes:

Markup:{{Annotated link | The Partisan | quote=yes }}
Result: "The Partisan" – 1943 song by Anna Marly and Emmanuel d'Astier, popularised by Leonard Cohen in 1969

Additional abbreviation

A parenthesized abbreviation may be added following the link using|abbr= if desired:

Markup:{{Annotated link | London Academy of Music and Dramatic Art | abbr=LAMDA }}
Result:London Academy of Music and Dramatic Art (LAMDA) – Drama school in Hammersmith, London

A title for the abbreviation may be provided with|abbr_title= if suitable:

Markup:{{Annotated link | London Academy of Music and Dramatic Art | abbr=LAMDA | abbr_title=London Academy of Music and Dramatic Art }}
Result:London Academy of Music and Dramatic Art (LAMDA) – Drama school in Hammersmith, London

An alternative name for the linked entity may be added following the link (and abbreviation if also added) using|aka= if desired; the alternative name will be prepended with ", also known as":

Markup:{{Annotated link | Royal National Theatre | aka=the National Theatre of Great Britain }}
Result:Royal National Theatre, also known as the National Theatre of Great Britain – Theatre in London, England

Foreign language formatting options are available for this parameter; seebelow.

Additional information

Even more information may be wedged in between the previously stated information and that of the potentially following description; use|wedge= to add it is desired:

Markup:{{Annotated link | Grape | wedge=can be used to make wine }}
Result:Grape, can be used to make wine – Fruit growing on woody vines in clusters

Foreign language formatting options are available for this parameter; seebelow.

Foreign language text

Foreign language text should be formatted in accordance withMOS:OTHERLANG; this template provides all the necessary options to control the formatting. The module invoked by this template, usesModule:Lang (the module powering{{lang}}) to do the formatting, and all the options are fully described on their documentation pages.

If the link text is of a foreign language (editor discretion determines if this is appropriate); control the formatting with:|link_lang=<language code>,|link_lang_italic=,|link_lang_nocat=,|link_lang_size=,|link_lang_cat= and|link_lang_rtl=

If the|aka= text is of a foreign language (again; editor discretion); control the formatting with:|aka_lang=<language code>,|aka_lang_italic=,|aka_lang_nocat=,|aka_lang_size=,|aka_lang_cat=,|aka_lang_rtl=

If the|wedge= text is of a foreign language (again; editor discretion); control the formatting with:|wedge_lang=<language code>,|wedge_lang_italic=,|wedge_lang_nocat=,|wedge_lang_size=,|wedge_lang_cat=,|wedge_lang_rtl=

This template invokesModule:Annotated link, which in turn usesModule:GetShortDescription to (as the name suggests) get the short description.

Controlling the fallback for a short description

Further information:Module:GetShortDescription/doc

If a|fallback= value is provided, and no description is found by the expressed route, the appended description will be the stated fallback value.

Markup:{{Annotated link | Example | only=explicit | fallback=a fallback description }}
Result:Example – a fallback description

Controlling the case of the first character of a short description

Short descriptions on the English Wikipediashould be formatted with an uppercase first letter. By default, the short descriptions retrieved by this template are displayed as they are typed in the page from which they are extracted, but this may be overridden if required using|desc_first_letter_case=upper or|desc_first_letter_case=lower.

Parameters

This is theTemplateData for this template used byTemplateWizard,VisualEditor and other tools.See a monthly parameter usage report forTemplate:Annotated link in articles based on its TemplateData.

TemplateData for Annotated link

Table of all template parameters, aliases, expected and required values

a link created and annotated using a short description and other optional additions

Template parameters[Edit template data]

ParameterDescriptionTypeStatus
Page name (including namespace)1nametitle

Title of the page to be linked and annotated

Page namerequired
Link display text2displaydisp

The text to be displayed in the link

Default
name
Lineoptional
Separator3dashcomma

Replace the dash with something else

Default
Example
,
Lineoptional
Template link formattingtemplate_linktemplate-linktl

Disable special formatting of links to pages in the Template namespace

Suggested values
nocode
Lineoptional
Quote linksquotequote_linkquote-linkql

Double quotation of the link

Suggested values
yes
Lineoptional
Abbreviationabbrabbreviation

Abbreviation to be displayed in parentheses after the link

Lineoptional
Abbreviation titleabbr_titleabbr-titleabbreviation_titleabbreviation-titleat

Provide a title for an abbreviation

Lineoptional
Also known asaka

Alternative names to display after the link (and abbreviation if provided)

Lineoptional
Additional informationwedgeinsertextra

Additional information to display after the link (and abbr and aka if provided)

Lineoptional
Description first letter casedesc_first_letter_casedesc-first-letter-casedesc_casedesc-casecase

Control to case of the first letter of a short description

Suggested values
upperlower
Default
lower
Lineoptional
Categorisation of spaceless descriptionsspace_catspace-cat

Disable categorisation of pages displaying descriptions containing no space characters

Suggested values
no
Lineoptional
Limit description searchonly

Dictate the only source for a short description

Suggested values
explicitwikidata
Lineoptional
Description preferenceprefer

Suggest a prefered source for a short description

Suggested values
explicitwikidata
Default
explicit
Lineoptional
Description fallbackfallback

Provide a fallback description in the event no other is available

Lineoptional
Link text foreign language codelink_langlink-langll

Provide a language code for foreign language link text

Example
ja
Lineoptional
Link text foreign language italicslink_lang_italiclink-lang-italiclli

Control the italic presentation of foreign language link text

Suggested values
yesnounsetinvertdefault
Lineoptional
Link text foreign language categorisationlink_lang_nocatlink-lang-nocatllnc

Dictate the categorisation of foreign language link text

Suggested values
yesytrueton1
Lineoptional
Link text foreign language categorisationlink_lang_catlink-lang-catllc

Dictate the categorisation of foreign language link text

Suggested values
nonfalsefoff0
Lineoptional
Link text foreign language sizelink_lang_sizelink-lang-sizells

Control the size presentation of foreign language link text

Example
1.5em
Lineoptional
Link text foreign language rtllink_lang_rtllink-lang-rtlllr

Control the rtl presentation of foreign language link text

Suggested values
noyes
Default
no
Lineoptional
Aka text foreign language codeaka_langaka-langal

Provide a language code for foreign language aka text

Example
ja
Lineoptional
Aka text foreign language italicsaka_lang_italicaka-lang-italicali

Control the italic presentation of foreign language aka text

Suggested values
yesnounsetinvertdefault
Lineoptional
Aka text foreign language categorisationaka_lang_nocataka-lang-nocatalnc

Dictate the categorisation of foreign language aka text

Suggested values
yesytrueton1
Lineoptional
Aka text foreign language categorisationaka_lang_cataka-lang-catalc

Dictate the categorisation of foreign language aka text

Suggested values
nonfalsefoff0
Lineoptional
Aka text foreign language sizeaka_lang_sizeaka-lang-sizeals

Control the size presentation of foreign language aka text

Example
1.5em
Lineoptional
Aka text foreign language rtlaka_lang_rtlaka-lang-rtlalr

Control the rtl presentation of foreign language aka text

Suggested values
noyes
Default
no
Lineoptional
Additional information foreign language codewedge_langwedge-langinsert_langinsert-langextra_langextra-langwl

Provide a language code for foreign language wedge text

Example
ja
Lineoptional
Additional information foreign language italicswedge_lang_italicwedge-lang-italicinsert_lang_italicinsert-lang-italicextra_lang_italicextra-lang-italicwli

Control the italic presentation of foreign language wedge text

Suggested values
yesnounsetinvertdefault
Lineoptional
Additional information foreign language categorisationwedge_lang_nocatwedge-lang-nocatinsert_lang_nocatinsert-lang-nocatextra_lang_nocatextra-lang-nocatwlnc

Dictate the categorisation of foreign language wedge text

Suggested values
yesytrueton1
Lineoptional
Additional information foreign language categorisationwedge_lang_catwedge-lang-catinsert_lang_catinsert-lang-catextra_lang_catextra-lang-catwlc

Dictate the categorisation of foreign language wedge text

Suggested values
nonfalsefoff0
Lineoptional
Additional information foreign language sizewedge_lang_sizewedge-lang-sizeinsert_lang_sizeinsert-lang-sizeextra_lang_sizeextra-lang-sizewls

Control the size presentation of foreign language wedge text

Example
1.5em
Lineoptional
Additional information foreign language rtlwedge_lang_rtlwedge-lang-rtlinsert_lang_rtlinsert-lang-rtlextra_lang_rtlextra-lang-rtlwlr

Control the rtl presentation of foreign language wedge text

Suggested values
noyes
Default
no
Lineoptional
Foreign language description formattingdesc_lang_nodesc-lang-nodlno

Dictate if foreign language description text should be formatted

Suggested values
yes
Lineoptional
Foreign language description italicsdesc_lang_italicdesc-lang-italicdli

Control the italic presentation of foreign language description text

Suggested values
yesnounsetinvertdefault
Lineoptional
Foreign language description categorisationdesc_lang_nocatdesc-lang-nocatdlnc

Dictate the categorisation of foreign language description text

Suggested values
yesytrueton1
Lineoptional
Foreign language description categorisationdesc_lang_catdesc-lang-catdlc

Dictate the categorisation of foreign language description text

Suggested values
nonfalsefoff0
Lineoptional
Foreign language description sizedesc_lang_sizedesc-lang-sizedls

Control the size presentation of foreign language description text

Example
1.5em
Lineoptional
Foreign language description rtldesc_lang_rtldesc-lang-rtldlr

Control the rtl presentation of foreign language description text

Suggested values
noyes
Default
no
Lineoptional

Preview warnings and maintenance categories

Module:GetShortDescription may create warnings about detected issues with{{short description}} configurations, that show above the preview content during editing. These warnings are not about the page being edited, but about the pages for which the annotated links are being created. If any preview warnings are shown; please consider visiting the indicated pages to analyse and possibly fix the issues.

It may also showalarming messages (they're red but not necessarily errors) about its function. If it is not clear how to fix the problem indicated; don't continue trying to annotate the link with this template as the messages will be visible to all readers of Wikipedia. If any alarming messages are displayed on saved pages as a result of issues, the page showing those messages will be added to the maintenanceCategory:Pages displaying alarming messages about Module:GetShortDescription.

Module:Annotated link may also show alarming messages about its function and in much the same way will add pages toCategory:Pages displaying alarming messages about Module:Annotated link.

Several other maintenance categories exist for potential issues with the annotations:

  • Category:Pages displaying short descriptions with no spaces via Module:Annotated link will be populated by pages where the module has been invoked to provide annotations that include a description with no spaces. If a page in this category is analysed by an interested editor, and it is determined that the description is appropriate for use; add|space_cat=no to the{{annotated link}} to disable the categorisation. If the description is not appropriate; the interested editor can either try to fix it at the source, use|only= to potentially select another description, or remove the use of this template and create a custom annotation for the link manually.
  • Category:Pages displaying short descriptions matching their page name via Module:Annotated link will be populated by pages where the module has been invoked to provide annotations contain descriptions that have (case insensitive) equality with the name of the linked page i.e. "Wikipedia article" with a short description of "wikipedia article". Please consider reviewing the instances.

A handy tool for finding category intersections is available.

See also

The abovedocumentation istranscluded fromTemplate:Annotated link/doc.(edit |history)
Editors can experiment in this template'ssandbox(edit |diff) andtestcases(edit) pages.
Add categories to the/doc subpage.Subpages of this template.
Retrieved from "https://en.wikipedia.org/w/index.php?title=Template:Annotated_link&oldid=1138878433"
Categories:
Hidden categories:

[8]ページ先頭

©2009-2026 Movatter.jp