Edge Rewrite
// HTMLRewriter · presentation

This page was redesigned at the edge.

Cloudflare fetched the original article and streamed it through HTMLRewriter to apply an entirely new visual system without rebuilding the source page.

Jump to content

Template talk:Nuclide

Page contents not supported in other languages.
Add topic
From Wikipedia, the free encyclopedia
Latest comment: 3 months ago by A Shortfall Of Gravitas in topic Expected behavior for periodic table abbreviations?

Seems that there is no talk page for this? There is a Tfm for {{nuclide}} and {{nuclide2}}. Does anyone here even notice? Since this one transcludes {{nuclide2}}, seems to me that instead of merging, we could just propose {{nuclide}} for deletion. That means that all the uses of this one should be change to {{nuclide2}} before the deletion. Putting the TFM notice in the templates really messes up tables that they are use in. That should encourage users of this one to change. Gah4 (talk) 20:17, 20 November 2016 (UTC)Reply

In case anyone doesn't know, this template transcludes {{nuclide2}}. There is a merge proposal, but it doesn't seem to me what is really needed. There is nothing wrong with {{nuclide2}}, so it makes more sense just to delete this one. Before that can be done, someone (or someones) need to change all the articles that use this one. If a bot can do that, it should be pretty easy. It takes some work for a person. The tables I use {{nuclide2}} in are program generated, so it isn't so hard to change, but then again they don't need changing. I suppose there are some that really need merging, but in many cases it is more work than it is worth. Gah4 (talk) 22:35, 20 November 2016 (UTC)Reply
I'm the guy that created this template and Nuclide2. I created the later because this one had some problems that were hard to fix without changing the arguments, which would break existing use of the template. I had already use this template on too many pages to change it manually and I didn't have a bot to automatically change it. So, I created a new template and put a large notice on this, the old one, not to use it. I also asked this template to be deleted at some point, which now might finally be happening (yay!). I think it's almost ten years overdue...
There is no reason for the Nuclide2 template to have a "2" in its name other than the above history. Once Nuclide is gone, Nuclide2 should be renamed. For all intents and purposes, this is the same as merging them.
This page is not the right place for a discussion; the tfm page is where you should voice your opinion about it, as that's where the decision will be made. SkyLined (talk) 23:36, 20 November 2016 (UTC)Reply
Yes I agree, and will continue there. I put this one here, just in case someone only reads it here. Gah4 (talk) 02:23, 21 November 2016 (UTC)Reply

Testing

[edit]

Test of this template: 1
1
H
4
2
He
7
3
Li
9
4
Be
11
5
B
12
6
C
14
7
N
16
8
O
19
9
F
20
10
Ne
23
11
Na
24
12
Mg
27
13
Al
28
14
Si
31
15
P
33
16
S
35
17
Cl
40
18
Ar
39
19
K
40
20
Ca
45
21
Sc
48
22
Ti
51
23
V
52
24
Cr
55
25
Mn
56
26
Fe
59
27
Co
58
28
Ni
63
29
Cu
64
30
Zn
69
31
Ga
74
32
Ge
75
33
As
80
34
Se
79
35
Br
84
36
Kr
85
37
Rb
88
38
Sr
89
39
Y
90
40
Zr
93
41
Nb
98
42
Mo
99
43
Tc
102
44
Ru
103
45
Rh
106
46
Pd
107
47
Ag
114
48
Cd
115
49
In
118
50
Sn
121
51
Sb
130
52
Te
127
53
I
132
54
Xe
133
55
Cs
138
56
Ba
139
57
La
140
58
Ce
141
59
Pr
142
60
Nd
145
61
Pm
152
62
Sm
153
63
Eu
158
64
Gd
159
65
Tb
164
66
Dy
165
67
Ho
166
68
Er
169
69
Tm
174
70
Yb
175
71
Lu
178
72
Hf
181
73
Ta
184
74
W
187
75
Re
192
76
Os
193
77
Ir
195
78
Pt
197
79
Au
202
80
Hg
205
81
Tl
208
82
Pb
209
83
Bi
210
84
Po
210
85
At
222
86
Rn
223
87
Fr
226
88
Ra
227
89
Ac
232
90
Th
231
91
Pa
238
92
U
237
93
Np
244
94
Pu
243
95
Am
247
96
Cm
247
97
Bk
251
98
Cf
252
99
Es
257
100
Fm
258
101
Md
259
102
No
262
103
Lr
261
104
Rf
262
105
Db
266
106
Sg
264
107
Bh
277
108
Hs
268
109
Mt
281
110
Ds
272
111
Rg
285
112
Cn
289
114
Fl
292
116
Lv
Gah4 (talk) 00:52, 22 November 2016 (UTC)Reply

[edit]

Special:WhatLinksHere/Template:Nuclide Gah4 (talk) 05:16, 24 November 2016 (UTC)Reply

DigitsInNumber

[edit]

Template {{DigitsInNumber}} is used but does not exist. --Obsuser (talk) 05:55, 6 May 2017 (UTC)Reply

FWIW it was deleted 03:16, 27 May 2008, so this does not appear to cause much problems. - SkyLined  Preceding unsigned comment added by 62.45.178.169 (talk)

Expected behavior for periodic table abbreviations?

[edit]

In terms of generating the wikitext, things seem to work fine when just using "U" or "Pu" instead of writing out the full element name, but there's a weird issue when I do this:

{{Nuclide|Uranium|239|link=yes}} which emits 239
92
U
.

vs.

{{Nuclide|U|239|link=yes}} which emits 239
92
U
.

Note that the second case links to a disambiguation page for U-239 because there was a German World War II submarine with that designation. Arguably the page on the submarine, German submarine U-239, should be aliased to "U-239 (German submarine)" so it shows in the search dropdown and the need for the probably rare case of it being searched for on here is clarified via the actual page rather than a 2 item disambiguation entry, but the fact that it works this way sort of begs the question of exactly what Template:LinkForElement is supposed to be doing... It appears that it should be doing a lookup of the name from either the lowercase abbreviation or full name and then returning the full name if I'm reading the documentation for #switch correctly but the result of {{LinkForElement|U|239}} does return u-239 which seems like the opposite of what the code is trying to accomplish... Looking at that code it seems the issue is that it doesn't bother attempting to expand the first parameter if there's a 2nd parameter; {{LinkForElement|U}} returns "uranium" as expected.

I posted this here because this is the template returning the bad link and depending on where else LinkForElement is used it might be better to only pass that template one parameter to get the element's full name if it was entered as the abbreviation (which reads more clearly in source pages since that's what this template produces as output) then concatenate the two together with a dash to form the link here. That also avoids breaking anything that was relying on the current behavior of LinkForElement for some reason (does the chem template use it?) and adds a minimal amount of code to this.

I would attempt to do it but wiki's template system is something of an abomination to me which is saying something since I used to deal with C++ template metaprogramming along with assembly languages for 5 different processor architectures and 2-3 ABIs for each for a living.  ;-) A Shortfall Of Gravitas (talk) 14:58, 23 April 2026 (UTC)Reply