మూస:Cite compare/doc

వికీపీడియా నుండి
Jump to navigation Jump to search

{{cite compare}} is a debug and documentation tool that allows editors to compare the output created by the various versions of a Citation Style 1 (CS1) template. To invoke {{cite compare}} simply add CS1 template parameters to {{cite compare}}. For example, a simple {{cite web}} comparison might look like this: {{cite compare |mode=web |url=http://www.example.com |website=Example Website |title=Example comparison}} which produces this output:

Cite web comparison
WT {{cite web|title=Example comparison|url=http://www.example.com|website=Example Website}}
Live "Example comparison". Example Website.
Sandbox "Example comparison". Example Website.

Usage[మార్చు]

The default display is a comparison between sandbox and the current live CS1 template.

{{cite compare}} is controlled by four parameters:

  • |mode= – selects which of the CS1 templates will be compared; for {{cite web}}, |mode=web; for {{cite journal}}, |mode=journal; etc.
  • |old= – when set, includes the citation as rendered by {{citation/core}}
  • |comment= – when set to a comment, displays the comment at the bottom of the comparison table
  • |header= – when set, displays additional header text
  • |nosandbox= – when set, removes the line for the sandbox

Display only live[మార్చు]

{{cite compare |mode=web |nosandbox=yes |url=http://www.example.com |website=Example Website |title=Example comparison}}

Cite web comparison
WT {{cite web|title=Example comparison|url=http://www.example.com|website=Example Website}}
Live "Example comparison". Example Website.

Compare old, live and sandbox[మార్చు]

Adding |old=yes will display a comparison of all three versions of a CS1 citation: the current live template, the sandbox template, and the old, pre-Lua-based versions. The non-Lua-based templates are at pages labeled old; for example, {{cite web/old}} is the reference version against which the initial Lua implementation to {{cite web}} were compared.

{{cite compare |mode=web |old=yes |url=http://www.example.com |website=Example Website |title=Example comparison}}

Cite web comparison
WT {{cite web|title=Example comparison|url=http://www.example.com|website=Example Website}}
Old "Example comparison". http://www.example.com. 
Live "Example comparison". Example Website.
Sandbox "Example comparison". Example Website.

Compare with comment[మార్చు]

To add a comment regarding the comparison, set |comment=<comment text>. If <comment text> contains a vertical bar or pipe (|) use {{!}}.

{{cite compare |mode=web |comment=Comment about {{!}}comment=<comment text> |header=(additional header text) |url=http://www.example.com |website=Example Website |title=Example comparison}}

Cite web comparison (additional header text)
WT {{cite web|title=Example comparison|url=http://www.example.com|website=Example Website}}
Live "Example comparison". Example Website.
Sandbox "Example comparison". Example Website.
Comment about |comment=<comment text>

See also[మార్చు]