![]() | This is an archive of past discussions. Do not edit the contents of this page. If you wish to start a new discussion or revive an old one, please do so on the current talk page. |
Archive 5 | ← | Archive 9 | Archive 10 | Archive 11 | Archive 12 | Archive 13 | → | Archive 15 |
While experimenting to reduce the internal processing stages of template {Citation/core}, I have created new Template:Citation/author to handle the formatting of each author name, perhaps allowing for displaying 12 or more authors in the future, while also reducing the "MediaWiki expansion depth" of {Citation/core}. Previously, each surname has been nested as if-else-else-else-else to 8 surnames deep, and if surname2/last2 is omitted, then surname3 and others would not appear. Instead, {Citation/author} allows any other surnames to be displayed, even if surname2 or surname7 were to be omitted. I noticed how some articles have surname15 (or last15?), so do we want to display those extra author names, beyond display-authors=8? - Wikid77 17:52, 9 January 2011 (UTC)
|Trunc=
parameter already does this. Try providing {{
citation/core}}
with, say, six authors, and set |Trunc=3
. In {{
citation}}
, {{
cite book}}
and {{
cite journal}}
(poss others) this is the |display-authors=
parameter, and if omitted the default is 8. That's why giving nine authors replaces the last one with "et al.". --
Redrose64 (
talk)
20:10, 9 January 2011 (UTC)
09-Jan-2011: I have found that combining Template:Cite_book with {Citation/core} can cut the resource usage by 56%, using less than half of the MediaWiki preprocessor resources, as when {Citation/core} is separate. The key resource is the "post-expand include size" such as 3800 bytes reduced to 1800 bytes per Cite_book entry (with total post-expand limit=2,000 kb or 2,048,000 bytes). At first, I tried omitting rare parameters, such as surname5 to surname8 or editor-surname3, but restored all the parameters, using only the technical change to combine templates. Even omitting the COinS metadata saved only 700 bytes, whereas combining templates saved 2,000 bytes per {Cite_book} usage. There are some possible alternatives:
In a sample test, I ran an edit-preview of the {Cite_book} references in article " Abraham Lincoln" and they were reduced by over 55% from 198,000 to 90,000 bytes, just as a proof of concept. The post-expand limit mainly affects medical and chemistry articles; however, the 55% reduction could benefit many other subject areas as well. Currently, {Cite_web} has nearly 797,000 usages, while {Cite_book} has 284,000 and growing. I realize how rewriting these templates could be considered a major shock, so this is just the beginning of discussing various options. - talk 00:41, 10 January 2011 (UTC)
12-Jan-2011: Weeks have passed, and no one has objected to removing the separator between Series and Volume, to show a volume 4 as "Title of Series 4". Also, new optional parameter "volume-name" will show the unbolded title of a volume, in the same location, but with a separator. Those changes will be requested, below, as topic: " #Update for Volume and volume-name". Do we want to include any other related changes at the same time? The doc page will be updated soon after the changes are installed successfully. Any changes to template {Cite_book} will be discussed there, on the Template_talk:Cite_book page instead. - Wikid77 09:47, 12 January 2011 (UTC)
12-Jan-2011: Because templates can be lightning fast, when written considering performance options, there is ample time for {Citation/core} to generate "smart-formatting" of the Volume, such as bolded when Volume is only a number-and/or-letter combination (such as volume "15a" or "E" or "XIX") but unbolded otherwise (such as "Volume 4: The lesser snails"). Then, to handle the various exception cases, a new parameter "volume-bold=yes" or "volume-bold=no" would force the decision rather than have auto-bolding look for a volume number/letter. Such auto-bolding would avoid having to edit thousands of articles which currently have a volume name in Parameter "Volume" (rather than just having "15a"). Also, new users would just set a name (or number) in parameter "Volume" without worring about the format unless it was a rare exception. So, the smart-formatting would use a bolded value when parameter Volume was "15a" or "E" or "XIX" (etc.), but otherwise put a separator, then show the unbolded text from Volume. For exceptions (perhaps 1 in 500), include "volume-bold=yes" (or "no"). Does that seem more acceptable? I am listening and trying to follow real-world styles here. - Wikid77 23:51, 12 January 2011 (UTC)
{{
editprotected|Template:Citation/core}}
14-Jan-2011:
Template:Citation/core needs to be updated from
Template:Citation/core/sandbox3 (the 3rd sandbox version) to omit the separator {{{Sep}}} between Series & Volume, plus support new parameter "volume-bold=no" (or "=yes") and trigger the automatic unbolded formatting of volume (preceded by the separator "," or "."). The COinS metadata will be unchanged, because "&rft.volume" is set from "Volume" regardless of the bolded/unbolded format. The hyphenated name "volume-bold" was chosen to allow unique wikisearch for articles using it, similar to searching parameter "display-authors". (Template differences can be checked by editing {Citation/core/sandbox3}, replacing the edit-buffer from view {Citation/core} & then "Show changes" during edit-preview mode).
Performance: The post-expand size for Volume drops 66% due to omitting 2 <nowiki/> tags (of 44 bytes each); the
expansion depth is unchanged, as 4 #if-#switch for Volume are smaller than if-else nesting for Surname2. IMPACT: At the least, 1.1 million articles will be reformatted, because Citation/core is used by {
Cite_web}, {
Cite_book}, {Cite_journal}, {Cite_news}, etc.
Some testcases:
{{
cite journal}}
: Cite journal requires |journal=
(
help){{
cite book}}
: |volume=
has extra text (
help)After updating {Citation/core}, the results should match. Because prior bolding, of long volume names, was excessive bolding, this change will be perceived mostly as a "bug fix" which removes the glaring overkill of bolding when not wanted for volume names. - Wikid77 ( talk) 13:35, 14 January 2011 (UTC)
The following are questions about the Volume parameter:
volume
unbolded now? I thought we're talking about the edition off a new parameter, like volume-title
or volume-unbold
. —
bender235 (
talk)
14:39, 14 January 2011 (UTC)
{{Cite book|title=Stuff|volume=</b>Book 3: More stuff<b>}}
{{Cite journal|title=Nature |volume=</b>Archive 2010b<b>}}
{{Cite book|title=Taxonomy Rules|volume=</b>Vol. 4: Taxonomy of Invertebrates<b>}}
Why not have Volume-notbold? Answer: The problems with having a 2nd Volume parameter named "Volume-notbold=myvolume" (rather than set switch: volume-bold=no) are several:
For all those reasons, considered earlier, the parameter "volume-name" was also dropped, and the single parameter "Volume" was selected to hold any volume id, with the bolding removed by setting new parameter "volume-bold=no". - Wikid77 15:24, 23 January 2011 (UTC)
{{#if:{{{Volume|{{{Volume-bold|}}}}}}|'''{{{Volume|{{{Volume-bold|}}}}}}'''|{{{Volume-notbold}}}}}
. Re the naming (notbold vs. unbold vs. whatever), I have no strong preference. Re people who have not read the docs misunderstanding the usage, they should RTFdocs. Re other concerns too tedious to list here, no comment.What happens if unbolding was already forced by </b>? Answer: That technique would still work after volume-bold was implemented, due to the "<" being considered as starting a non-bolded name:
So if, over the past years, many people had altered thousands of article citations to force a non-bolded volume id (using: </b>), those citations would still remain unbolded, despite allowing new option "volume-bold=no" as an alternative. No articles need to be changed after {{Citation/core}} is updated to have parameter volume-bold. - Wikid77 15:24, 23 January 2011 (UTC)
Someone noticed a problem in {{
cite journal}} when using |quote=
and I confirmed it in core:
{{Citation/core |Periodical=Example |URL=http://example.org |quote=Now is the time to quote}}
Example, http://example.org,+"Now is the time to quote"
As can be seen, a comma and an encoded space are being stuffed into the url. ---— Gadget850 (Ed) talk 18:14, 26 January 2011 (UTC)
{{
citation/make link}}
, but I now believe that it's the code below the heading "URL and AccessDate". --
Redrose64 (
talk)
20:44, 26 January 2011 (UTC)
http://example.org,
renders as
http://example.org,http://example.org, 
renders as
http://example.org,+http://example.org, 
renders as
http://example.org, http://example.org,  
renders as
http://example.org, |{{{Sep|,}}} "{{{quote}}}"
to |{{{Sep|,}}}<!--blank char required here-->  "{{{quote}}}"
should fix it.
Wtmitchell
(talk) (earlier Boracay Bill)
23:59, 27 January 2011 (UTC)This is a citation to a letter to the editor. It doesn't look right here:
{{
citation}}
: |contribution=
ignored (
help); Check date values in: |date=
(
help); Missing or empty |title=
(
help), Letter to the editor.(Check the source). Any suggestions? ---- CharlesGillingham ( talk) 06:34, 3 February 2011 (UTC)
|contribution=Darwin among the Machines
{{
citation}}
: |contribution=
ignored (
help); Check date values in: |date=
(
help); Missing or empty |title=
(
help), Letter to the editor.Sure, but this one of those cases where the source is famous enough to have an article of its own. Shouldn't we have a link to both the article and the online source? ---- CharlesGillingham ( talk) 18:36, 3 February 2011 (UTC)
{{
citation}}
: Check date values in: |date=
(
help), Letter to the editor. Collected as
Butler, Samuel, "Darwin among the Machines",
A First Year in Canterbury Settlement with Other Early Texts, New Zealand Electronic Text Centre.Check for instance:
They all exceed some limit. -- Magioladitis ( talk) 15:34, 11 February 2011 (UTC)
There appear to be two issues with the core citation template in regards to editor lists. First, unlike the author list, which displays et al. in italics, the editor list displays "et al." without italics. This is inconsistent. Also, long editor lists that get truncated to et al. create a double full stop: "et al.." – VisionHolder « talk » 21:02, 28 February 2011 (UTC)
Perhaps I'm doing something wrong at
Template:Cite_doi/10.1007.2FBF02986061, but the URL is not forming a wikilink, presumably because of the |trans_title=
parameter.
Martin (
Smith609 –
Talk)
17:10, 4 March 2011 (UTC)
http://
part is mandatory for all URLs unless they begin with some other protocol such as ftp:, mailto: etc. --
Redrose64 (
talk)
18:06, 4 March 2011 (UTC)
Due to the overly featurefull template this has become, it has also become increasingly slow, as most of you are undoubtedly aware. As such, I am working on an extension to write this template into PHP, which should generate a much faster output, known as TemplateAdventures. An unfortunate issue is - however - that it is lessen in ease of modification if such should be desired at a later point.
Therefore am I opening up for suggestions at its talk page (I'd prefer it if you replied there, as my watch list is ever growing here, and I receive email notifications on mw.org) as well as examples and their desired output, so I can get parameters and interests working.
It is currently in testing at my test wiki. -- Svip pong 18:47, 19 April 2011 (UTC)
{{#citation:news|title=What is a title, truly?|url=http://example.com/}}
which would use the style/type of 'news'. We can possibly come to an agreement on types of styles, and what difference they produce. --
Svip
pong
22:26, 22 April 2011 (UTC){{#citation:APA |last=Blow |first=Joe |title=What is a title, truly? |periodical=The Journal |volume=5 |year=2011 |url=http://example.com/}}
To avoid rocking the boat too much upon implementation, the default would be styling like we have now (which is slightly non-standard APA). Version 1.0 would basically replicate {{
Citation}} and ignore the first argument, then specific implementations for APA, MLA, Bluebook, etc., would come later.
COGDEN
07:13, 27 April 2011 (UTC)
![]() | This is an archive of past discussions. Do not edit the contents of this page. If you wish to start a new discussion or revive an old one, please do so on the current talk page. |
Archive 5 | ← | Archive 9 | Archive 10 | Archive 11 | Archive 12 | Archive 13 | → | Archive 15 |
While experimenting to reduce the internal processing stages of template {Citation/core}, I have created new Template:Citation/author to handle the formatting of each author name, perhaps allowing for displaying 12 or more authors in the future, while also reducing the "MediaWiki expansion depth" of {Citation/core}. Previously, each surname has been nested as if-else-else-else-else to 8 surnames deep, and if surname2/last2 is omitted, then surname3 and others would not appear. Instead, {Citation/author} allows any other surnames to be displayed, even if surname2 or surname7 were to be omitted. I noticed how some articles have surname15 (or last15?), so do we want to display those extra author names, beyond display-authors=8? - Wikid77 17:52, 9 January 2011 (UTC)
|Trunc=
parameter already does this. Try providing {{
citation/core}}
with, say, six authors, and set |Trunc=3
. In {{
citation}}
, {{
cite book}}
and {{
cite journal}}
(poss others) this is the |display-authors=
parameter, and if omitted the default is 8. That's why giving nine authors replaces the last one with "et al.". --
Redrose64 (
talk)
20:10, 9 January 2011 (UTC)
09-Jan-2011: I have found that combining Template:Cite_book with {Citation/core} can cut the resource usage by 56%, using less than half of the MediaWiki preprocessor resources, as when {Citation/core} is separate. The key resource is the "post-expand include size" such as 3800 bytes reduced to 1800 bytes per Cite_book entry (with total post-expand limit=2,000 kb or 2,048,000 bytes). At first, I tried omitting rare parameters, such as surname5 to surname8 or editor-surname3, but restored all the parameters, using only the technical change to combine templates. Even omitting the COinS metadata saved only 700 bytes, whereas combining templates saved 2,000 bytes per {Cite_book} usage. There are some possible alternatives:
In a sample test, I ran an edit-preview of the {Cite_book} references in article " Abraham Lincoln" and they were reduced by over 55% from 198,000 to 90,000 bytes, just as a proof of concept. The post-expand limit mainly affects medical and chemistry articles; however, the 55% reduction could benefit many other subject areas as well. Currently, {Cite_web} has nearly 797,000 usages, while {Cite_book} has 284,000 and growing. I realize how rewriting these templates could be considered a major shock, so this is just the beginning of discussing various options. - talk 00:41, 10 January 2011 (UTC)
12-Jan-2011: Weeks have passed, and no one has objected to removing the separator between Series and Volume, to show a volume 4 as "Title of Series 4". Also, new optional parameter "volume-name" will show the unbolded title of a volume, in the same location, but with a separator. Those changes will be requested, below, as topic: " #Update for Volume and volume-name". Do we want to include any other related changes at the same time? The doc page will be updated soon after the changes are installed successfully. Any changes to template {Cite_book} will be discussed there, on the Template_talk:Cite_book page instead. - Wikid77 09:47, 12 January 2011 (UTC)
12-Jan-2011: Because templates can be lightning fast, when written considering performance options, there is ample time for {Citation/core} to generate "smart-formatting" of the Volume, such as bolded when Volume is only a number-and/or-letter combination (such as volume "15a" or "E" or "XIX") but unbolded otherwise (such as "Volume 4: The lesser snails"). Then, to handle the various exception cases, a new parameter "volume-bold=yes" or "volume-bold=no" would force the decision rather than have auto-bolding look for a volume number/letter. Such auto-bolding would avoid having to edit thousands of articles which currently have a volume name in Parameter "Volume" (rather than just having "15a"). Also, new users would just set a name (or number) in parameter "Volume" without worring about the format unless it was a rare exception. So, the smart-formatting would use a bolded value when parameter Volume was "15a" or "E" or "XIX" (etc.), but otherwise put a separator, then show the unbolded text from Volume. For exceptions (perhaps 1 in 500), include "volume-bold=yes" (or "no"). Does that seem more acceptable? I am listening and trying to follow real-world styles here. - Wikid77 23:51, 12 January 2011 (UTC)
{{
editprotected|Template:Citation/core}}
14-Jan-2011:
Template:Citation/core needs to be updated from
Template:Citation/core/sandbox3 (the 3rd sandbox version) to omit the separator {{{Sep}}} between Series & Volume, plus support new parameter "volume-bold=no" (or "=yes") and trigger the automatic unbolded formatting of volume (preceded by the separator "," or "."). The COinS metadata will be unchanged, because "&rft.volume" is set from "Volume" regardless of the bolded/unbolded format. The hyphenated name "volume-bold" was chosen to allow unique wikisearch for articles using it, similar to searching parameter "display-authors". (Template differences can be checked by editing {Citation/core/sandbox3}, replacing the edit-buffer from view {Citation/core} & then "Show changes" during edit-preview mode).
Performance: The post-expand size for Volume drops 66% due to omitting 2 <nowiki/> tags (of 44 bytes each); the
expansion depth is unchanged, as 4 #if-#switch for Volume are smaller than if-else nesting for Surname2. IMPACT: At the least, 1.1 million articles will be reformatted, because Citation/core is used by {
Cite_web}, {
Cite_book}, {Cite_journal}, {Cite_news}, etc.
Some testcases:
{{
cite journal}}
: Cite journal requires |journal=
(
help){{
cite book}}
: |volume=
has extra text (
help)After updating {Citation/core}, the results should match. Because prior bolding, of long volume names, was excessive bolding, this change will be perceived mostly as a "bug fix" which removes the glaring overkill of bolding when not wanted for volume names. - Wikid77 ( talk) 13:35, 14 January 2011 (UTC)
The following are questions about the Volume parameter:
volume
unbolded now? I thought we're talking about the edition off a new parameter, like volume-title
or volume-unbold
. —
bender235 (
talk)
14:39, 14 January 2011 (UTC)
{{Cite book|title=Stuff|volume=</b>Book 3: More stuff<b>}}
{{Cite journal|title=Nature |volume=</b>Archive 2010b<b>}}
{{Cite book|title=Taxonomy Rules|volume=</b>Vol. 4: Taxonomy of Invertebrates<b>}}
Why not have Volume-notbold? Answer: The problems with having a 2nd Volume parameter named "Volume-notbold=myvolume" (rather than set switch: volume-bold=no) are several:
For all those reasons, considered earlier, the parameter "volume-name" was also dropped, and the single parameter "Volume" was selected to hold any volume id, with the bolding removed by setting new parameter "volume-bold=no". - Wikid77 15:24, 23 January 2011 (UTC)
{{#if:{{{Volume|{{{Volume-bold|}}}}}}|'''{{{Volume|{{{Volume-bold|}}}}}}'''|{{{Volume-notbold}}}}}
. Re the naming (notbold vs. unbold vs. whatever), I have no strong preference. Re people who have not read the docs misunderstanding the usage, they should RTFdocs. Re other concerns too tedious to list here, no comment.What happens if unbolding was already forced by </b>? Answer: That technique would still work after volume-bold was implemented, due to the "<" being considered as starting a non-bolded name:
So if, over the past years, many people had altered thousands of article citations to force a non-bolded volume id (using: </b>), those citations would still remain unbolded, despite allowing new option "volume-bold=no" as an alternative. No articles need to be changed after {{Citation/core}} is updated to have parameter volume-bold. - Wikid77 15:24, 23 January 2011 (UTC)
Someone noticed a problem in {{
cite journal}} when using |quote=
and I confirmed it in core:
{{Citation/core |Periodical=Example |URL=http://example.org |quote=Now is the time to quote}}
Example, http://example.org,+"Now is the time to quote"
As can be seen, a comma and an encoded space are being stuffed into the url. ---— Gadget850 (Ed) talk 18:14, 26 January 2011 (UTC)
{{
citation/make link}}
, but I now believe that it's the code below the heading "URL and AccessDate". --
Redrose64 (
talk)
20:44, 26 January 2011 (UTC)
http://example.org,
renders as
http://example.org,http://example.org, 
renders as
http://example.org,+http://example.org, 
renders as
http://example.org, http://example.org,  
renders as
http://example.org, |{{{Sep|,}}} "{{{quote}}}"
to |{{{Sep|,}}}<!--blank char required here-->  "{{{quote}}}"
should fix it.
Wtmitchell
(talk) (earlier Boracay Bill)
23:59, 27 January 2011 (UTC)This is a citation to a letter to the editor. It doesn't look right here:
{{
citation}}
: |contribution=
ignored (
help); Check date values in: |date=
(
help); Missing or empty |title=
(
help), Letter to the editor.(Check the source). Any suggestions? ---- CharlesGillingham ( talk) 06:34, 3 February 2011 (UTC)
|contribution=Darwin among the Machines
{{
citation}}
: |contribution=
ignored (
help); Check date values in: |date=
(
help); Missing or empty |title=
(
help), Letter to the editor.Sure, but this one of those cases where the source is famous enough to have an article of its own. Shouldn't we have a link to both the article and the online source? ---- CharlesGillingham ( talk) 18:36, 3 February 2011 (UTC)
{{
citation}}
: Check date values in: |date=
(
help), Letter to the editor. Collected as
Butler, Samuel, "Darwin among the Machines",
A First Year in Canterbury Settlement with Other Early Texts, New Zealand Electronic Text Centre.Check for instance:
They all exceed some limit. -- Magioladitis ( talk) 15:34, 11 February 2011 (UTC)
There appear to be two issues with the core citation template in regards to editor lists. First, unlike the author list, which displays et al. in italics, the editor list displays "et al." without italics. This is inconsistent. Also, long editor lists that get truncated to et al. create a double full stop: "et al.." – VisionHolder « talk » 21:02, 28 February 2011 (UTC)
Perhaps I'm doing something wrong at
Template:Cite_doi/10.1007.2FBF02986061, but the URL is not forming a wikilink, presumably because of the |trans_title=
parameter.
Martin (
Smith609 –
Talk)
17:10, 4 March 2011 (UTC)
http://
part is mandatory for all URLs unless they begin with some other protocol such as ftp:, mailto: etc. --
Redrose64 (
talk)
18:06, 4 March 2011 (UTC)
Due to the overly featurefull template this has become, it has also become increasingly slow, as most of you are undoubtedly aware. As such, I am working on an extension to write this template into PHP, which should generate a much faster output, known as TemplateAdventures. An unfortunate issue is - however - that it is lessen in ease of modification if such should be desired at a later point.
Therefore am I opening up for suggestions at its talk page (I'd prefer it if you replied there, as my watch list is ever growing here, and I receive email notifications on mw.org) as well as examples and their desired output, so I can get parameters and interests working.
It is currently in testing at my test wiki. -- Svip pong 18:47, 19 April 2011 (UTC)
{{#citation:news|title=What is a title, truly?|url=http://example.com/}}
which would use the style/type of 'news'. We can possibly come to an agreement on types of styles, and what difference they produce. --
Svip
pong
22:26, 22 April 2011 (UTC){{#citation:APA |last=Blow |first=Joe |title=What is a title, truly? |periodical=The Journal |volume=5 |year=2011 |url=http://example.com/}}
To avoid rocking the boat too much upon implementation, the default would be styling like we have now (which is slightly non-standard APA). Version 1.0 would basically replicate {{
Citation}} and ignore the first argument, then specific implementations for APA, MLA, Bluebook, etc., would come later.
COGDEN
07:13, 27 April 2011 (UTC)