Template:Distinguish/doc: Difference between revisions

From Saintapedia
Jump to navigation Jump to search
>Tomoneill
(established from wikipedia - http://en.wikipedia.org/w/index.php?title=Template:Distinguish/doc&oldid=499378734)
 
(copy from https://en.wikipedia.org/wiki/Template:Distinguish/doc)
Line 1: Line 1:
{{Documentation subpage}}
{{Documentation subpage}}
<!-- EDIT TEMPLATE DOCUMENTATION BELOW THIS LINE -->
{{tsh|dist|ntbcw|confuse}}
<!-- Please add categories at the bottom of this page, and interwikis at Wikidata (see Wikipedia:Wikidata) -->
{{High-use| 65005 }}
{{Lua|Module:distinguish}}
 
== Description ==
The "distinguish" template produces a [[WP:HAT|hatnote]] to point out to our readers the existence of one or more articles whose title(s) is, or are, similar to the page in question. It is used in cases where the distinction between the titles is generally obvious and does not need further explanation.
 
For those cases where an explanation is required, please use the templates {{tl|For}} and {{tl|About}}. For use on category pages, the corresponding template is {{Tl|Category distinguish}}.
 
== Usage ==
== Usage ==
<nowiki>{{Distinguish|foo}}</nowiki> {{Distinguish|foo}}
Here is an example of its standard usage on the article about the mathematical [[Astroid]]:
{{tlx|distinguish|Asteroid}}        → {{Distinguish|Asteroid}}
 
This hatnote can be used to distinguish the topic from multiple other topics, as for [[Corundum]] or [[Bangala language]]:
{{tlx|distinguish|Carborundum|Conundrum}} → {{Distinguish|Carborundum|Conundrum}}
{{tlx|distinguish|Bangla language|Mbangala language|Ngala language}} → {{Distinguish|Bangla language|Mbangala language|Ngala language}}
 
The {{para|text}} parameter can be used to create customized text, in case context is required. An example is on the article [[Phobos (mythology)]], which  contains a customized hatnote to distinguish it and "[[Phoebus]]" (a redirect of [[Apollo]]). Both links lead to topics about Greek gods, so the [[WP:NCDAB|parenthetical disambiguation]] in "Phobos (mythology)" is insufficient to disambiguate the two. Since it [[WP:HNR|is typically not preferable to link a redirect]] in a hatnote, the article "Apollo" is linked to directly and a short explanation fills in the necessary context:
{{tlx|distinguish|text {{=}} Phoebus, an epithet of the Greek god &#91;&#91;Apollo]]}} → {{Distinguish|text = Phoebus, an epithet of the Greek god [[Apollo]] }}
 
Note that a final period is automatically added at the end of the sentence, and that only one blue link is used per disambiguated topic (i.e, do not type <code><nowiki>...an [[epithet]] of the [[Greek]] god [[Apollo]].</nowiki></code>
 
When the target is a disambiguation page, display of the parentheses may be avoided by escaping the vertical bar using the [[Help:Magic words|magic word]] {{Tl|!}}:
{{Tick}}{{tlx|distinguish|Crossfire (disambiguation)&#123;&#123;&#33;&#125;&#125;Crossfire}} → {{Distinguish|Crossfire (disambiguation){{!}}Crossfire}}
The escape is necessary, otherwise the template will read the next text as another topic:
{{Cross}}{{tlx|distinguish|Crossfire (disambiguation)|Crossfire}} → {{Distinguish|Crossfire (disambiguation)|Crossfire}}
 
== When to use ==
This hatnote is generally used when readers have misspelled their desired title, and the error would be apparent by simply displaying the alternative term without further explanation. For example, consider a reader looking for the punctuation mark who instead ends up at [[coma]]:
: [[Coma]]
: {{Distinguish|Comma}}
 
Readers are presumed to recognize that they actually wanted ''comma'' by merely looking at the spelling, and this case generally requires no further explanation.
 
However, {{tlx|distinguish}} is not suitable when the difference is not readily apparent without additional details. Consider a reader looking for a game they believe is named Reversi:
: {{cross}} [[Reversi]]
: {{Distinguish|Reversis}}


<nowiki>{{Distinguish|foo|bar}}</nowiki> {{Distinguish|foo|bar}}
In the above hatnote, it is not generally apparent how the suggested Reversis is different from Reversi, which is also a game.


<nowiki>{{Distinguish|foo|bar|something}}</nowiki> {{Distinguish|foo|bar|something}}
In this case you should use {{tlx|about}} instead of {{tlc|distinguish}}. The difference is to provide explanation upfront without requiring the reader to click through and differentiate the terms on their own.
: {{tick}} [[Reversi]]
:: ''This article is about the board game. For the card game, see [[Reversis]].''


<nowiki>{{Distinguish|foo|bar|something|baz}}</nowiki> {{Distinguish|foo|bar|something|baz}}
{{tlc|Distinguish}} should only be used when the ambiguity exists for a portion of the readership that is sufficient to warrant a hatnote. Care should be taken to [[WP:TRHAT|avoid trivial uses]].
 
== TemplateData ==
{{TemplateData header}}
<templatedata>
{
"params": {
"1": {
"label": "Name of article",
"description": "Name of article that you want to link to",
"type": "wiki-page-name",
                        "suggested": true
},
"2": {
"label": "Optional additional article to link (2)",
"description": "Optional additional article to link",
"type": "wiki-page-name"
},
"3": {
"label": "Optional additional article to link (3)",
"description": "Optional additional article to link",
"type": "wiki-page-name"
},
"4": {
"label": "Optional additional article to link (4)",
"description": "Optional additional article to link",
"type": "wiki-page-name"
},
        "text": {
            "label": "Custom text",
            "description": "Custom message in wikitext; e.g. \"[[foo]] and [[Bar (computer science)|bar]]\" produces \"Not to be confused with [[foo]] and [[Bar (computer science)|bar]].\"",
            "type": "string"
        },
        "selfref": {
            "label": "Self reference",
            "description": "If set, marks note as being a self reference, to not be shown when content is reused",
            "type": "boolean"
        }
 
},
"description": "A hatnote used when there is an ambiguity in an article's title.",
"paramOrder": [
"1",
"2",
"3",
"4",
                "text",
                "selfref"
],
"format": "inline"
}
</templatedata>


== Redirects ==
== Redirects ==
* {{tl|Not to be confused with}}
* {{tl|Confused}}
* {{tl|Confused}}
* {{tl|Confuse}}
* {{tl|Confuse}}
* {{tl|Misspelling}}
* {{tl|Misspelling}}
* {{tl|Nottobeconfusedwith}}
* {{tl|Ntbcw}}


== See also ==
== See also ==
* {{tl|Distinguish2}}, for multiple disambiguation targets or prepending "the".
* {{tl|About}}
 
* {{tl|Category distinguish}}
{{Otheruses templates}}
* {{tl|For}}
 
* {{tl|Redirect}}
<includeonly>
* {{tl|R from misspelling}}
<!--Categories-->
[[Category:Disambiguation and redirection templates|{{PAGENAME}}]]
[[Category:Hatnote templates]]


</includeonly>
{{Hatnote templates}}
<includeonly>{{sandbox other||
<!-- Add categories below this line, and interwikis at Wikidata -->
[[Category:Disambiguation and redirection hatnote templates]]
}}</includeonly>

Revision as of 21:51, 31 August 2024

Description

The "distinguish" template produces a hatnote to point out to our readers the existence of one or more articles whose title(s) is, or are, similar to the page in question. It is used in cases where the distinction between the titles is generally obvious and does not need further explanation.

For those cases where an explanation is required, please use the templates {{For}} and {{About}}. For use on category pages, the corresponding template is {{Category distinguish}}.

Usage

Here is an example of its standard usage on the article about the mathematical Astroid:

{{distinguish|Asteroid}}

This hatnote can be used to distinguish the topic from multiple other topics, as for Corundum or Bangala language:

{{distinguish|Carborundum|Conundrum}}

{{distinguish|Bangla language|Mbangala language|Ngala language}}

The |text= parameter can be used to create customized text, in case context is required. An example is on the article Phobos (mythology), which contains a customized hatnote to distinguish it and "Phoebus" (a redirect of Apollo). Both links lead to topics about Greek gods, so the parenthetical disambiguation in "Phobos (mythology)" is insufficient to disambiguate the two. Since it is typically not preferable to link a redirect in a hatnote, the article "Apollo" is linked to directly and a short explanation fills in the necessary context:

{{distinguish|text = Phoebus, an epithet of the Greek god [[Apollo]]}}

Note that a final period is automatically added at the end of the sentence, and that only one blue link is used per disambiguated topic (i.e, do not type ...an [[epithet]] of the [[Greek]] god [[Apollo]].

When the target is a disambiguation page, display of the parentheses may be avoided by escaping the vertical bar using the magic word {{!}}:

☑Y{{distinguish|Crossfire (disambiguation){{!}}Crossfire}}

The escape is necessary, otherwise the template will read the next text as another topic:

☒N{{distinguish|Crossfire (disambiguation)|Crossfire}}

When to use

This hatnote is generally used when readers have misspelled their desired title, and the error would be apparent by simply displaying the alternative term without further explanation. For example, consider a reader looking for the punctuation mark who instead ends up at coma:

Coma

Readers are presumed to recognize that they actually wanted comma by merely looking at the spelling, and this case generally requires no further explanation.

However, {{distinguish}} is not suitable when the difference is not readily apparent without additional details. Consider a reader looking for a game they believe is named Reversi:

☒N Reversi

In the above hatnote, it is not generally apparent how the suggested Reversis is different from Reversi, which is also a game.

In this case you should use {{about}} instead of {{distinguish}}. The difference is to provide explanation upfront without requiring the reader to click through and differentiate the terms on their own.

☑Y Reversi
This article is about the board game. For the card game, see Reversis.

{{Distinguish}} should only be used when the ambiguity exists for a portion of the readership that is sufficient to warrant a hatnote. Care should be taken to avoid trivial uses.

TemplateData

This is the TemplateData for this template used by TemplateWizard, VisualEditor and other tools. See a monthly parameter usage report for Template:Distinguish in articles based on its TemplateData.

TemplateData for Distinguish

A hatnote used when there is an ambiguity in an article's title.

Template parameters

This template prefers inline formatting of parameters.

ParameterDescriptionTypeStatus
Name of article1

Name of article that you want to link to

Page namesuggested
Optional additional article to link (2)2

Optional additional article to link

Page nameoptional
Optional additional article to link (3)3

Optional additional article to link

Page nameoptional
Optional additional article to link (4)4

Optional additional article to link

Page nameoptional
Custom texttext

Custom message in wikitext; e.g. "[[foo]] and [[Bar (computer science)|bar]]" produces "Not to be confused with [[foo]] and [[Bar (computer science)|bar]]."

Stringoptional
Self referenceselfref

If set, marks note as being a self reference, to not be shown when content is reused

Booleanoptional

Redirects

See also

Template:Hatnote templates