टेम्पलेट:See section

विकिपीडिया से
Jump to navigation Jump to search

[prepended text] [target section(s)|anchor(s) [target-link options]] [(in [page link [page-link options]])] [postscript [postscript options]] [terminating punctuation]
Timeline (in History of Wikipedia)
See §§ 2000 and 2001 (in History of Wikipedia)

Template see section implements and formats links to properly wikimarked page sections and anchors in any single Wikipedia page. The template can handle up to four links of either type in any configuration, and may also link the page hosting the link targets. A range of supporting options is provided.

Usage[संपादन]

Structure[संपादन]

In this section, for presentation purposes only, required parameters are in bold; [square brackets] indicate parameter values; variables are italicized; explanatory text is in (parentheses).

Full parameter set in horizontal format
{{see section|pre= |[1] (section heading or anchor name)|[2] (2nd section heading or anchor name)|[3] (3rd section heading or anchor name)|[4] (4th section heading or anchor name)|page= |txt= |txt2= |txt3= |txt4= |sym= |sym2= |sym3= |sym4= |italics= |sep= |post= |term= }}
Full parameter set in vertical format

{{see section
|pre=
|[1] (section heading or anchor name)
|[2] (2nd section heading or anchor name)
|[3] (3rd section heading or anchor name)
|[4] (4th section heading or anchor name)
|page=
|txt=
|txt2=
|txt3=
|txt4=
|sym=
|sym2=
|sym3=
|sym4=
|italics=
|sep=
|post=
|term=
}}

Copy a blank version to use. All parameter names must be in lowercase. Use the "|" (pipe) character between each parameter. Delete unused parameters or options, and text in square brackets or parentheses (including brackets). See § Parameters for important details.

At least one section/anchor link is required; any mix of up to four such links in any single Wikipedia page may be utilized. When the link targets are not in the same page as the template, the links are normally followed by, in parentheses, the static text "in" and a wikilink to the page hosting the target anchor(s)/section(s). Undefined parameters are ignored; misspelled, empty or missing parameters display their default values, if any, or no value. Leading and trailing spaces ( ) are trimmed from parameter values; however, displayable values are separated by a single whitespace character. Appropriate punctuation may precede or follow this separator where relevant. There is no default trailing punctuation. Available options may override, enhance or extend template defaults. In most cases, usage errors will result in display of relevant error messages.

Applicability[संपादन]

The template may be used wherever consistently formatted links to page sections or anchors are desirable; a recommended use is as part of a cross-reference – please see MOS:XREF and MOS:SELFREF.

Parameters[संपादन]

A target section or target anchor (via anonymous parameter [1]) is required; some options may depend on other parameters or parameter properties. Incorrect parameter values will be flagged under almost all usage scenarios (see § Error messages).
Parameter names are in bold below, for presentation only.

Link parameters[संपादन]

There are four anonymous, ordered link parameters, and one named link parameter. The anonymous parameters may display links to as many as four sections or anchors present in a single page – multiple such links are separated by comma(s), or joined by "and". The named parameter (page), may be used to display a link to the related page; the default value for this parameter is the source page (the page hosting the template).

Required:

  • [1] (section|anchor): use the first anonymous parameter for the heading of an existing section or name of an existing anchor, which becomes a target section/target anchor. Note there is no validation for the user entry; misspelled or non-existent section/anchor links will display without error. Enter the section heading or anchor name in plain text – do not use any formatting or special editing (but see parameters sym[n][नोट 1] here, and txt[n][नोट 1] here). A value for this parameter is required.
 for examples see here (in target page) and here (in source page)

Optional (values may be required by other options):

  • [2] (2nd section|anchor): as [1] above; use the second anonymous parameter to link a second target section/target anchor in the relevant page.
  • [3] (3rd section|anchor): as above; use the third anonymous parameter to link a third target section/target anchor in the relevant page.
  • [4] (4th section|anchor): as above; use the fourth anonymous parameter to link a fourth target section/target anchor in the relevant page.
 for examples see here (two sections) and here (four sections)

Suggested/implied:

  • page: use this for the title of the page that includes the section(s) or anchor(s) to be linked (the target page); this parameter should be used when that page is other than the page that includes the template (the source page). The source page is the default value, and in such application the parameter should not be used or should be left empty; in any case, when the target section(s)/target anchor(s) are in the source page the parenthetical output will not display. Enter the title (including the namespace prefix, if any), in plain text – do not use any formatting or special editing (but see parameter italics).
 for examples see under parameter [1]
Note: while parameter page is normally ignored when it links the source page, other parameters may yet generate related page errors (example below).

Display parameters[संपादन]

Conditional (require values for the corresponding anonymous target-link parameters):

  • sym, sym2, sym3, sym4 (symbol): depending on the number of target sections or anchors, use any or all of these parameters to insert a section sign and non-breaking space (§ ) before each corresponding target-section link; or collectively, before all target-section links. Do not use for target-anchor links unless these are editor-inserted anchors that link target sections; in such cases also consider use of parameters txt[n] below.
    • set |sym=all only when all targets link sections; a double section sign (§§ ) will appear before the first target-section link
    • set |sym=y and/or |sym2=y and/or |sym3=y and/or |sym4=y to specifically apply before each corresponding target-section link
 for examples see here (all sections), and here (some sections)

Conditional (requires a target page value for parameter page):

  • italics: set |italics=y to italicize the target-page link; do not use when parameter page refers to the source page. Use this parameter only when the target-page title is already rendered in italics (WP:TITLE). Parenthetical portions of page titles are excluded from formatting and render properly, in plain text.
 for an example see here (includes other options)
Note: parameter italics is unnecessary when {{see section}} is used in a श्रे:Cross-reference templates – such templates' output is italicized by default.

Conditional (requires a value for parameter post below):

  • sep (separator): if you insert a postscript, you may use this parameter to add preceding punctuation, followed by a space.
 for an example see here (includes other options)

Optional:

  • term (termination): use this parameter to append trailing (terminating) punctuation to the template's output.
 for an example see here (includes other options)

Other parameters[संपादन]

Optional:

  • pre (prepend): use this parameter to add brief informational text that displays before the target-section/target-anchor link(s).
 for examples see here (includes other options), and here
  • post (postscript): use this parameter to add brief informational text or link notes that display after the target-page link, or after the target-section/target-anchor link(s) (if these are in the source page). You may also use the dependent parameter sep above to add trailing punctuation to the preceding target link.
 for examples see here (normal use) and here (with separator)

Conditional (require values for the corresponding anonymous target-link parameters):

  • txt, txt2, txt3, txt4 (link text): if the target link(s) are non-visible anchor names, use any or all of these parameters to display descriptive text for the corresponding link(s), instead of the anchor name. Usage of these parameters is recommended when linking to editor-inserted anchors with abbreviated or non-contextual names. Do not use for target sections unless these are linked by editor-inserted anchors.
 for examples see here (one target anchor, links section) and here (two anchors)

उदाहरण[संपादन]

General usage[संपादन]

Target section in target page

  • {{see section|page=History of Wikipedia|Timeline}}
produces: Timeline (in History of Wikipedia)

Target section in source page

  • {{see section|Usage}}

or

  • {{see section|page=Template:See section|Usage}}
either produce: Usage (in Template:See section)

Two target sections in source page

  • {{see section|Applicability|Expensive function}}
produces: Applicability and Expensive function

Four target sections in target page

  • {{see section|page=History of Wikipedia|2000|2001|2002|2003}}
produces: 2000, 2001, 2002 and 2003 (in History of Wikipedia)

With § symbol, in target page

  • {{see section|page=History of Wikipedia|Timeline|sym=y}}
produces: § Timeline (in History of Wikipedia)

With §§ symbol, in target page

  • {{see section|page=History of Wikipedia|2000|2001|sym=all}}
produces: §§ 2000 and 2001 (in History of Wikipedia)

With § symbol, both target types, in source page

  • {{see section|Usage|symbol|Other parameters|sym=y|sym3=y}}
produces: § Usage, symbol and § Other parameters

Target-page title in italics, § symbol, and prepended text

  • {{see section|pre=Also see|page=Star Wars|Box office performance|sym=y|italics=y}}
produces: Also see § Box office performance (in Star Wars)

Terminating punctuation, postscript, target-anchor link in source page

  • {{see section|symbol|post=in this page|term=;}}
produces: symbol in this page;

With prepended text, section linked by target anchor, link text, and § symbol, in target page

  • {{see section|pre=See|page=Help:Contents|gethelp|txt=Stuck?|sym=y}}
produces: See § Stuck? (in Help:Contents)

Two target anchors with link text, in source page

  • {{see section|symbol|ital|txt=sym|txt2=italics}}
produces: sym and italics

Cross-referencing usage[संपादन]

The following examples embed {{see section}} in {{xref}} and {{further2}}; for additional cross-reference templates see the श्रे:Cross-reference templates.
Also see note under parameter italics.

As a sentence, with prepended text, postscript, separating punctuation, and terminating punctuation, in target page

  • {{crossref|{{see section|pre=See|page=Greece|History|sep=,|post=for more information|term=.}}}}
produces: See History (in Greece), for more information.

Inline in sentence, with prepended text and § symbol, in target page

  • ... {{crossref|({{see section|pre=detailed at|page=Greece|History|sym=y}})}}.
produces: ... (detailed at § History (in Greece)).

Inline in a hatnote, references target page

  • {{further2|{{see section|page=Greece|History}}}}
produces the hatnote:

Error messages[संपादन]

Multiple errors are flagged per parameter; errors involving the same parameter may be mutually exclusive. Error messages may also appear conditionally, depending on the use of particular options; for example, when a third target section link is not defined, adding a symbol sign for the section (via parameter sym3), will produce a "link required" error even if correct (|sym3=y).
Messages replace the relevant parameter value(s), and appear in the following cases:[नोट 2]

Parameter [1]

  • First target-section/target-anchor link is missing: [error in template {{see section}}: the first target-section/target-anchor link is required]

Parameters [3], [4]

  • Intermediate target-section/target-anchor link is empty: [error in template {{see section}}: missing intermediate n target-section/target-anchor link] [नोट 1]

Parameter sym

  • Multiple target links required: [error in template {{see section}}: double section sign requires multiple target-section links]
  • Incorrect entry: [error in template {{see section}}: symbol option with wrong value]

Parameters sym2, sym3, sym4

  • Incorrect entry: [error in template {{see section}}: symbol option for the n target-section link with wrong value] [नोट 1]
  • Corresponding target link required: [error in template {{see section}}: n target-section symbol requires n target-section link] [नोट 1]

Parameters txt2, txt3, txt4

  • Corresponding target link required: [error in template {{see section}}: n target-anchor text requires n target-anchor link] [नोट 1]

Parameter italics

  • No target-page link specified, or source page: [error in template {{see section}}: italics option requires a target-page link]
  • Incorrect entry: [error in template {{see section}}: italics option with wrong value]

TemplateData[संपादन]

This is the TemplateData documentation for this template used by VisualEditor and other tools.

TemplateData for see section

This template implements and formats wikilinks to as many as four pre-existing sections or anchors of a single Wikipedia page, and to the page itself. Link targets may be any mix of sections and anchors. Recommended in cross-referencing applications.

Template parameters

This template prefers inline formatting of parameters.

ParameterDescriptionTypeStatus
Section|Anchor1

Heading of an existing target section or name of an existing target anchor at any Wikipedia page

Default
empty; must provide a value
Stringrequired
Second section|anchor2

Second pre-existing section or anchor in the same page; may be required by other options

Default
empty
Stringoptional
Third section|anchor3

Third pre-existing section or anchor in the same page; may be required by other options

Stringoptional
Fourth section|anchor4

Fourth pre-existing section or anchor in the same page; may be required by other options

Stringoptional
Pagepage

Title of page that contains the section(s) or anchor(s) to be linked (target page); leave blank if the sections or anchors are in the page hosting the template (the source page); a target-page link may be required by other options

Default
source page (appears empty)
Pagesuggested
Symbolsym

Set to "all" to display a double section sign (indicating multiple sections), requires multiple target links; or set to "y" to insert a single section sign; either appear before the first target link; for section links only; do not use for editor-inserted anchors unless these link target sections

Default
no symbol
Stringoptional
Symbol 2sym2

Set to "y" to insert the section sign before the second target link; for section links only; do not use for editor-inserted anchors unless these link target sections; requires corresponding target link

Default
no symbol
Booleanoptional
Symbol 3sym3

Set to "y" to insert the section sign before the third target link; for section links only; do not use for editor-inserted anchors unless these link target sections; requires corresponding target link

Default
no symbol
Booleanoptional
Symbol 4sym4

Set to "y" to insert the section sign before the fourth target link; for section links only; do not use for editor-inserted anchors unless these link target sections; requires corresponding target link

Default
no symbol
Booleanoptional
Prependpre

Use to add brief informational text; appears before the target link(s)

Default
no prepended text
Stringoptional
Link texttxt

Descriptive text for the first target link; for anchor links only; do not use for visible anchors; do not use for target sections unless these are linked by editor-inserted anchors

Default
no descriptive text
Stringoptional
Link text 2txt2

Descriptive text for the second target link; for anchor links only; do not use for visible anchors; do not use for target sections unless these are linked by editor-inserted anchors; requires corresponding target link

Default
no descriptive text
Stringoptional
Link text 3txt3

Descriptive text for the third target link; for anchor links only; do not use for visible anchors; do not use for target sections unless these are linked by editor-inserted anchors; requires corresponding target link

Default
no descriptive text
Stringoptional
Link text 4txt4

Descriptive text for the fourth target link; for anchor links only; do not use for visible anchors; do not use for target sections unless these are linked by editor-inserted anchors; requires corresponding target link

Default
no descriptive text
Stringoptional
Italicsitalics

When set to "y", it renders the target-page link in italics; requires a target-page link; use only when the target page title is already italicized; avoid using when this template is used in a cross-reference template

Default
no italics for target page
Booleanoptional
Postscriptpost

Use to add informational text that appears after the link to the target page (or after the target section/anchor links if these are in the source page)

Default
no postscript
Stringoptional
Separatorsep

Use to add punctuation that appears before a postscript; a space automatically follows the punctuation; requires use of 'Postscript'

Default
no separator
Stringoptional
Terminatorterm

Use to append trailing (terminating) punctuation

Default
no terminal punctuation
Stringoptional

इहो देखल जाय[संपादन]

Footnotes[संपादन]

  1. 1.0 1.1 1.2 1.3 1.4 1.5 Where n signifies a correspondingly numbered parameter; its value may be one of: 2, 3, or 4, or the number's ordinal.
  2. When error messages appear in live usage, the included template link to {{see section}} is active.