This template does not require a rating on Wikipedia's
content assessment scale. It is of interest to the following WikiProjects: | ||||||||
|
|
|
This page has archives. Sections older than 180 days may be automatically archived by Lowercase sigmabot III when more than 4 sections are present. |
Related discussion: Talk:Planck_constant#Seconds_vs._per_hertz. fgnievinski ( talk) 04:36, 6 November 2023 (UTC)
Primefac, since you seem to be active, I was wondering whether you might know of some way of implementing the double-stage referencing as in the CODATA value references at Hartree atomic units. That still has some shortcomings: (a) I have not found how to integrate the final full-detail CODATA 2018 reference cleanly into the references list rather than as a separate item, and (b) creating this reference from within the {{ Physical constants}} template, including avoiding duplication, is totally beyond me.
If we can figure out how to do this, we would be able to put all detail we wish into the final CODATA 2018 reference while keeping the individual value references compact. — Quondum 14:22, 1 January 2024 (UTC)
Opinions, please – I would like to get opinions on consolidating of the shared reference between all the references before I start sandboxing the changes to the template itself. I have a proposal with comparison here:
comparison of existing and proposed referencing
|
---|
Body text1.[1] Body text2. [2] Body text3. [2] Body text4. [3] Body text5. [4]
Body text1. [2] Body text2. [3] Body text3. [3] Body text4. [4] Body text4. [5]
|
When there are few invocations in an article, the reference is simply split into two, but when there are many, around the space is used. We can also include more specific detail with the consolidated shared reference if we wish, without the extra multiplying in the article. Look at Hartree atomic units for an example that approximates the proposal. The only issue I see is that the list of back-links on the shared reference is nonfunctional. ( Mathglot, thank you for the insightful input at WP:TEA.) — Quondum 16:23, 3 January 2024 (UTC)
<ref>...</ref>
code inside a string that the wikicode parser processes, but then gets dumped because it is inside an unused <span>...</span>
parameter. I'm not very happy with it: it is still a hack, and would like to be able to do this more cleanly. My
sandbox has two variants, where 'Variant 2' is less of a hack, but uses actual footnote tags rather than a bluelink, and is also not ideal in rendering. —
Quondum
22:02, 3 January 2024 (UTC)There are some larger issues related to yours, and I think it would help to mention them, as it might clarify things by situating your issue in a larger context. Some questions arise when citing large sources or repositories:
It seems to me that this template attempts to (or should) deal with all three of these questions. A is already handled, via the url in the data table reference footnote. B and C are not, if I understand it correctly (but I'm still learning more about this template, each time I look at it).
Wikipedia has different ways of dealing with these issues currently. The cases for book/journal-based citations are somewhat different than for web-based citations due to their nature. Here are four use cases that will help distinguish them:
The first three are well understood and have well documented, conventional solutions (i.e., named refs, or short footnotes with {{ sfn}} templates). However, to my knowledge, there is no single, standard, recommended solution for #4, and as a result, different solutions are seen (e.g., use a linked 'loc' param in sfn; use a linked 'at' param in {{ cite web}} or {{ rp}}; include location within <ref> tags but outside and following the CS1 template; write a wrapper template that does one of these, like {{ sfn legifrance}}. Template:Physical constants falls under the fourth use case, and therein lies the rub, I believe. Mathglot ( talk) 01:08, 4 January 2024 (UTC)
As labeled at the top of the previous subsection, question 'B' could be addressed by using standard named refs, if the data table and template were upgraded to handle the name attribute of the <ref> tag. If this were done, it would result in one full citation in the references section for each unique constant with a-b-c backlinks if the same exact constant were cited. An additional full, long citation would be generated for each additional constant, so if I understand what you want, this isn't desirable, because most of the same information identifying the NIST CODATA db would be repeated in the References section for every unique constant; close to what you have now; so that wouldn't be enough.
'C' could be handled as a combination of the solution for 'B', with the addition of a linked {{ rp}} param following the <ref> emitted by the template currently, by e "small, varying part" as the title and url. (Another way, would be switching to emitting {{ sfn}} templates instead of <ref> tags inline, and while that might've been easier if you were starting from scratch, but as there are already 87 transclusions, it's probably not worth it now.) This would make all your emitted refs except for the first one coded like this:
<ref name="CODATA-2018" />{{rp|at=[https://physics.nist.gov/cgi-bin/cuu/Value?bwien Wien wavelength displacement law constant]}}
and look like this,
[1]:
Wien wavelength displacement law constant which is very long for an inline {{
rp}} link; maybe use an abbreviated title instead in the data table instead, like this?
[1]:
Wien λ This {{
rp}} approach would require a modification to the data table and the template (most likely under control of a new param like |reuse=yes
or |named=yes
or similar to pull the value out of a slightly modified table which would supply the url
query string (bpwien
in this case) and the title on separate lines of the data item. (Actually, you could parse the title out of the existing ref, but just adding duplicate info is cheap, and keeps the template code simpler.) If it were me, I'd actually code it so that you could put any value for |reuse=
as an override of the default title and it would substitute that value in instead of the data table title, which would give you some transclusion-time control of the display string for the link, which might be useful in some situations.
Note that this solution would not look like the "References" section in your boxed proposed solution above; rather, you'd have only one, single citation for CODATA-2018 in the References section (just like the References section below), with a whole pile of backlink letters attached; so that if you had 20 transclusoins of the template in the body, youid have superscript letters a through t on the one reference (just a and b in this example), but all the links would work, back and forth. The links to the individual CODATA pages would be found inline, look like the examples above, and link to the citations below. If you wanted a situation where the twenty citations appear in the reference section rather than inline in the body, that would be doable, with inline <ref>s linking to the NIST page for the constant, and containing an embedded {{
sfnlink}} targeting the |ref=
param of the single COVID-2018 citation. That would look pretty close to your proposal. That could be done like this.
[2]
Mathglot (
talk)
02:12, 4 January 2024 (UTC)
|ref=
, like, |ref=long
or something; so you'd just code {{Physical constants|ref=long}}
and it would just spit it out, hard-coded in the tmeplate. (You could add overridable values if you wanted, so that e.g., |access-date=
would default to {{
subst:TODAY}} but you could override it by setting it with a new param). Or maybe even simpler, same idea, but code |ref=long
on only the first invocation of the template, so that one generates the long citation in the references section only for that one, and then all the other ones just pick it up because they use
named refs; or they link to it via the other solution with {{
sfnlink}} + citation |ref=
param, if you like that style better.
Mathglot (
talk)
02:35, 4 January 2024 (UTC)
<ref name="Foo">
with a {{cite book|page=12}}
embedded in it as the first one, and then later a <ref name="Foo" />{{rp|14–15}}
later on which links to the first one. Everybody knows that the second one is pages 14–15, even if the first one says 12. This is perhaps just another aspect of the "we don't really have standards for #4" in the
sidebar section above.
Mathglot (
talk)
08:34, 4 January 2024 (UTC)
References
Here is something based on an attribute that I found:
Proposal view
|
---|
Body text1. [2] Body text2. [3] Body text3. [3] Body text4. [4] Body text4. [5]
|
This is clean (the wikicode is not a hack, as my previous one was), and it does everything exactly as I wanted, including remotely injecting the long citation into the start of reflist without any backlinks (unnumbered and slightly separated, though). It does not prevent duplication, though, so the template needs to determine whether this is the first time that it is being invoked on the page. If I can find a way to avoid wikicode from being active the second time it appears in a page, I think the result will be good. — Quondum 15:06, 4 January 2024 (UTC)
[[mw:Help:Cite]]
⟶
mw:Help:Cite, and so on.)
Mathglot (
talk)
01:21, 5 January 2024 (UTC)
I see that the 2022 CODATA values have been published. We should have a strategy for creating a history of values, keeping the older version. For example, we could have
{{physconst|alpha}}
to mean 'latest'{{physconst|alpha|dataset=2018-CODATA}}
or similar to retrieve a specific year.This will naturally need some template development, which I am no expert in. It would be nice to retain a copy if the current Template:Physical constants/data
page of 2018 CODATA values accessible via the parameter, and progressively edit the new values into the current page as time allows. —
Quondum
22:48, 14 May 2024 (UTC)
I am finding that articles overwhelmingly prefer to include the value 0.0072973525643 rather than 7.2973525643×10−3 as the
fine-structure constant (including/especially with the rounded forms). So I intend to make this change along with checking uses, especially for the |round=
parameter, which will need to change. Mostly, articles just manually put in the value, which means that it does not automatically update. —
Quondum
19:54, 25 May 2024 (UTC)
This template does not require a rating on Wikipedia's
content assessment scale. It is of interest to the following WikiProjects: | ||||||||
|
|
|
This page has archives. Sections older than 180 days may be automatically archived by Lowercase sigmabot III when more than 4 sections are present. |
Related discussion: Talk:Planck_constant#Seconds_vs._per_hertz. fgnievinski ( talk) 04:36, 6 November 2023 (UTC)
Primefac, since you seem to be active, I was wondering whether you might know of some way of implementing the double-stage referencing as in the CODATA value references at Hartree atomic units. That still has some shortcomings: (a) I have not found how to integrate the final full-detail CODATA 2018 reference cleanly into the references list rather than as a separate item, and (b) creating this reference from within the {{ Physical constants}} template, including avoiding duplication, is totally beyond me.
If we can figure out how to do this, we would be able to put all detail we wish into the final CODATA 2018 reference while keeping the individual value references compact. — Quondum 14:22, 1 January 2024 (UTC)
Opinions, please – I would like to get opinions on consolidating of the shared reference between all the references before I start sandboxing the changes to the template itself. I have a proposal with comparison here:
comparison of existing and proposed referencing
|
---|
Body text1.[1] Body text2. [2] Body text3. [2] Body text4. [3] Body text5. [4]
Body text1. [2] Body text2. [3] Body text3. [3] Body text4. [4] Body text4. [5]
|
When there are few invocations in an article, the reference is simply split into two, but when there are many, around the space is used. We can also include more specific detail with the consolidated shared reference if we wish, without the extra multiplying in the article. Look at Hartree atomic units for an example that approximates the proposal. The only issue I see is that the list of back-links on the shared reference is nonfunctional. ( Mathglot, thank you for the insightful input at WP:TEA.) — Quondum 16:23, 3 January 2024 (UTC)
<ref>...</ref>
code inside a string that the wikicode parser processes, but then gets dumped because it is inside an unused <span>...</span>
parameter. I'm not very happy with it: it is still a hack, and would like to be able to do this more cleanly. My
sandbox has two variants, where 'Variant 2' is less of a hack, but uses actual footnote tags rather than a bluelink, and is also not ideal in rendering. —
Quondum
22:02, 3 January 2024 (UTC)There are some larger issues related to yours, and I think it would help to mention them, as it might clarify things by situating your issue in a larger context. Some questions arise when citing large sources or repositories:
It seems to me that this template attempts to (or should) deal with all three of these questions. A is already handled, via the url in the data table reference footnote. B and C are not, if I understand it correctly (but I'm still learning more about this template, each time I look at it).
Wikipedia has different ways of dealing with these issues currently. The cases for book/journal-based citations are somewhat different than for web-based citations due to their nature. Here are four use cases that will help distinguish them:
The first three are well understood and have well documented, conventional solutions (i.e., named refs, or short footnotes with {{ sfn}} templates). However, to my knowledge, there is no single, standard, recommended solution for #4, and as a result, different solutions are seen (e.g., use a linked 'loc' param in sfn; use a linked 'at' param in {{ cite web}} or {{ rp}}; include location within <ref> tags but outside and following the CS1 template; write a wrapper template that does one of these, like {{ sfn legifrance}}. Template:Physical constants falls under the fourth use case, and therein lies the rub, I believe. Mathglot ( talk) 01:08, 4 January 2024 (UTC)
As labeled at the top of the previous subsection, question 'B' could be addressed by using standard named refs, if the data table and template were upgraded to handle the name attribute of the <ref> tag. If this were done, it would result in one full citation in the references section for each unique constant with a-b-c backlinks if the same exact constant were cited. An additional full, long citation would be generated for each additional constant, so if I understand what you want, this isn't desirable, because most of the same information identifying the NIST CODATA db would be repeated in the References section for every unique constant; close to what you have now; so that wouldn't be enough.
'C' could be handled as a combination of the solution for 'B', with the addition of a linked {{ rp}} param following the <ref> emitted by the template currently, by e "small, varying part" as the title and url. (Another way, would be switching to emitting {{ sfn}} templates instead of <ref> tags inline, and while that might've been easier if you were starting from scratch, but as there are already 87 transclusions, it's probably not worth it now.) This would make all your emitted refs except for the first one coded like this:
<ref name="CODATA-2018" />{{rp|at=[https://physics.nist.gov/cgi-bin/cuu/Value?bwien Wien wavelength displacement law constant]}}
and look like this,
[1]:
Wien wavelength displacement law constant which is very long for an inline {{
rp}} link; maybe use an abbreviated title instead in the data table instead, like this?
[1]:
Wien λ This {{
rp}} approach would require a modification to the data table and the template (most likely under control of a new param like |reuse=yes
or |named=yes
or similar to pull the value out of a slightly modified table which would supply the url
query string (bpwien
in this case) and the title on separate lines of the data item. (Actually, you could parse the title out of the existing ref, but just adding duplicate info is cheap, and keeps the template code simpler.) If it were me, I'd actually code it so that you could put any value for |reuse=
as an override of the default title and it would substitute that value in instead of the data table title, which would give you some transclusion-time control of the display string for the link, which might be useful in some situations.
Note that this solution would not look like the "References" section in your boxed proposed solution above; rather, you'd have only one, single citation for CODATA-2018 in the References section (just like the References section below), with a whole pile of backlink letters attached; so that if you had 20 transclusoins of the template in the body, youid have superscript letters a through t on the one reference (just a and b in this example), but all the links would work, back and forth. The links to the individual CODATA pages would be found inline, look like the examples above, and link to the citations below. If you wanted a situation where the twenty citations appear in the reference section rather than inline in the body, that would be doable, with inline <ref>s linking to the NIST page for the constant, and containing an embedded {{
sfnlink}} targeting the |ref=
param of the single COVID-2018 citation. That would look pretty close to your proposal. That could be done like this.
[2]
Mathglot (
talk)
02:12, 4 January 2024 (UTC)
|ref=
, like, |ref=long
or something; so you'd just code {{Physical constants|ref=long}}
and it would just spit it out, hard-coded in the tmeplate. (You could add overridable values if you wanted, so that e.g., |access-date=
would default to {{
subst:TODAY}} but you could override it by setting it with a new param). Or maybe even simpler, same idea, but code |ref=long
on only the first invocation of the template, so that one generates the long citation in the references section only for that one, and then all the other ones just pick it up because they use
named refs; or they link to it via the other solution with {{
sfnlink}} + citation |ref=
param, if you like that style better.
Mathglot (
talk)
02:35, 4 January 2024 (UTC)
<ref name="Foo">
with a {{cite book|page=12}}
embedded in it as the first one, and then later a <ref name="Foo" />{{rp|14–15}}
later on which links to the first one. Everybody knows that the second one is pages 14–15, even if the first one says 12. This is perhaps just another aspect of the "we don't really have standards for #4" in the
sidebar section above.
Mathglot (
talk)
08:34, 4 January 2024 (UTC)
References
Here is something based on an attribute that I found:
Proposal view
|
---|
Body text1. [2] Body text2. [3] Body text3. [3] Body text4. [4] Body text4. [5]
|
This is clean (the wikicode is not a hack, as my previous one was), and it does everything exactly as I wanted, including remotely injecting the long citation into the start of reflist without any backlinks (unnumbered and slightly separated, though). It does not prevent duplication, though, so the template needs to determine whether this is the first time that it is being invoked on the page. If I can find a way to avoid wikicode from being active the second time it appears in a page, I think the result will be good. — Quondum 15:06, 4 January 2024 (UTC)
[[mw:Help:Cite]]
⟶
mw:Help:Cite, and so on.)
Mathglot (
talk)
01:21, 5 January 2024 (UTC)
I see that the 2022 CODATA values have been published. We should have a strategy for creating a history of values, keeping the older version. For example, we could have
{{physconst|alpha}}
to mean 'latest'{{physconst|alpha|dataset=2018-CODATA}}
or similar to retrieve a specific year.This will naturally need some template development, which I am no expert in. It would be nice to retain a copy if the current Template:Physical constants/data
page of 2018 CODATA values accessible via the parameter, and progressively edit the new values into the current page as time allows. —
Quondum
22:48, 14 May 2024 (UTC)
I am finding that articles overwhelmingly prefer to include the value 0.0072973525643 rather than 7.2973525643×10−3 as the
fine-structure constant (including/especially with the rounded forms). So I intend to make this change along with checking uses, especially for the |round=
parameter, which will need to change. Mostly, articles just manually put in the value, which means that it does not automatically update. —
Quondum
19:54, 25 May 2024 (UTC)