Template:Cite compare/doc: Difference between revisions
Richardpruen (talk | contribs) m 1 revision imported: Templates and CSS files |
imported>Trappist the monk |
||
Line 10: | Line 10: | ||
{{tlf|cite compare}} is controlled by four parameters: | {{tlf|cite compare}} is controlled by four parameters: | ||
* {{para| | * {{para|template}} – selects which of the CS1 templates will be compared; for {{tlx|cite web}}, {{para|template|web}}; for {{tlx|cite journal}}, {{para|template|journal}}; etc.; '''alias''': {{para|{{xtd|mode}}}} (deprecated) | ||
** {{para|{{xtd|mode}}}} – deprecated alias of {{para|template}}; for {{tlx|cite web}}, {{para|mode|web}}; for {{tlx|cite journal}}, {{para|mode|journal}}; etc.; deprecated because cs1|2 supports a parameter called {{para|mode}} | |||
* {{para|old}} – when set to <code>yes</code>, includes the citation as rendered by {{tlx|citation/core}} | * {{para|old}} – when set to <code>yes</code>, includes the citation as rendered by {{tlx|citation/core}} | ||
* {{para|comment}} – when set to a comment, displays the comment at the bottom of the comparison table | * {{para|comment}} – when set to a comment, displays the comment at the bottom of the comparison table | ||
Line 17: | Line 18: | ||
=== Display only live === | === Display only live === | ||
<code><nowiki>{{cite compare | | <code><nowiki>{{cite compare |template=web |nosandbox=yes |url=http://www.example.com |website=Example Website |title=Example comparison}}</nowiki></code> | ||
{{cite compare | | {{cite compare |template=web |nosandbox=yes |url=http://www.example.com |website=Example Website |title=Example comparison}} | ||
===Compare old, live and sandbox=== | ===Compare old, live and sandbox=== | ||
Adding {{para|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, {{tl|cite web/old}} is the reference version against which the initial Lua implementation to {{tlf|cite web}} were compared. | Adding {{para|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, {{tl|cite web/old}} is the reference version against which the initial Lua implementation to {{tlf|cite web}} were compared. | ||
<code><nowiki>{{cite compare | | <code><nowiki>{{cite compare |template=web |old=yes |url=http://www.example.com |website=Example Website |title=Example comparison}}</nowiki></code> | ||
{{cite compare | | {{cite compare |template=web |old=yes |url=http://www.example.com |website=Example Website |title=Example comparison}} | ||
===Compare with comment=== | ===Compare with comment=== | ||
To add a comment regarding the comparison, set {{para|comment|<comment text>}}. If <comment text> contains a vertical bar or pipe (|) use {{tlx|!}}. | To add a comment regarding the comparison, set {{para|comment|<comment text>}}. If <comment text> contains a vertical bar or pipe (|) use {{tlx|!}}. | ||
<code><nowiki>{{cite compare | | <code><nowiki>{{cite compare |template=web |comment=Comment about {{!}}comment=<comment text> |header=(additional header text) |url=http://www.example.com |website=Example Website |title=Example comparison}}</nowiki></code> | ||
{{cite compare | | {{cite compare |template=web |comment=Comment about {{!}}comment=<comment text> |header=(additional header text) |url=http://www.example.com |website=Example Website |title=Example comparison}} | ||
<includeonly> | <includeonly> |
Latest revision as of 19:28, 10 April 2023
Lua error: Internal error: The interpreter exited with status 127.
Lua error: Internal error: The interpreter exited with status 127. 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 Lua error: Internal error: The interpreter exited with status 127. simply add CS1 template parameters to {{cite compare}}
. For example, a simple Lua error: Internal error: The interpreter exited with status 127. comparison might look like this:
{{cite compare |mode=web |url=http://www.example.com |website=Example Website |title=Example comparison}}
which produces this output:
Wikitext | Lua error: Internal error: The interpreter exited with status 127. |
---|---|
Live | Lua error: Internal error: The interpreter exited with status 127. |
Sandbox | Lua error: Internal error: The interpreter exited with status 127. |
Usage
The default display is a comparison between sandbox and the current live CS1 template.
Lua error: Internal error: The interpreter exited with status 127. is controlled by four parameters:
|template=
– selects which of the CS1 templates will be compared; for {{cite web}},|template=web
; for {{cite journal}},|template=journal
; etc.; alias:|mode=
(deprecated)|mode=
– deprecated alias of|template=
; for {{cite web}},|mode=web
; for {{cite journal}},|mode=journal
; etc.; deprecated because cs1|2 supports a parameter called|mode=
|old=
– when set toyes
, 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 |template=web |nosandbox=yes |url=http://www.example.com |website=Example Website |title=Example comparison}}
Wikitext | Lua error: Internal error: The interpreter exited with status 127. |
---|---|
Live | Lua error: Internal error: The interpreter exited with status 127. |
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 Lua error: Internal error: The interpreter exited with status 127. were compared.
{{cite compare |template=web |old=yes |url=http://www.example.com |website=Example Website |title=Example comparison}}
Wikitext | Lua error: Internal error: The interpreter exited with status 127. |
---|---|
Old | Lua error: Internal error: The interpreter exited with status 127. |
Live | Lua error: Internal error: The interpreter exited with status 127. |
Sandbox | Lua error: Internal error: The interpreter exited with status 127. |
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 |template=web |comment=Comment about {{!}}comment=<comment text> |header=(additional header text) |url=http://www.example.com |website=Example Website |title=Example comparison}}
Wikitext | Lua error: Internal error: The interpreter exited with status 127. |
---|---|
Live | Lua error: Internal error: The interpreter exited with status 127. |
Sandbox | Lua error: Internal error: The interpreter exited with status 127. |
Comment about |comment=<comment text> |