Template talk:Periodic: Difference between revisions

From Citizendium
Jump to navigation Jump to search
imported>David E. Volk
(→‎Hydrogen: hydrogen is a non-metal)
m (Text replacement - "Periodic table of elements " to "Periodic table")
 
(23 intermediate revisions by 6 users not shown)
Line 3: Line 3:
Is Hydrogen considered an Alkali Metal?--[[User:David Yamakuchi|David Yamakuchi]] 15:14, 7 April 2008 (CDT)
Is Hydrogen considered an Alkali Metal?--[[User:David Yamakuchi|David Yamakuchi]] 15:14, 7 April 2008 (CDT)


: A good question! I'm on the road with references, but... I do recall that in certain phases (e.g. solid) it does have metallic properties. However, it doesn't have other properties typical of alkali metals (such as violently reacting with water). I will let a chemistry expert take this one on, though! [[User:J. Noel Chiappa|J. Noel Chiappa]] 16:38, 7 April 2008 (CDT)
: A good question! I'm on the road without references, but... I do recall that in certain phases (e.g. solid) it does have some metallic properties. However, it doesn't have other properties typical of alkali metals (such as violently reacting with water). I will let a chemistry expert take this one on, though! [[User:J. Noel Chiappa|J. Noel Chiappa]] 16:38, 7 April 2008 (CDT)


:: In chemistry books that use color to denote metals, metalloids and non-metals, hydrogen is colored as a non-metal, which it is.  Thus, it is grouped with C,N,O,F,P,S,Cl, etc.  I don't know what you want to do with your new elemental box, but you have two choices, add it to the non-metals for hi-lighting or do not group it with anything. [[User:David E. Volk|David E. Volk]] 08:24, 8 April 2008 (CDT)
:: In chemistry books that use color to denote metals, metalloids and non-metals, hydrogen is colored as a non-metal, which it is.  Thus, it is grouped with C,N,O,F,P,S,Cl, etc.  I don't know what you want to do with your new elemental box, but you have two choices, add it to the non-metals for hi-lighting or do not group it with anything. [[User:David E. Volk|David E. Volk]] 08:24, 8 April 2008 (CDT)
::: I would say not group it with anything. It's a bit of an odd duck, chemistry-wise. I mean, with metals it forms hydrides, with many of the elements you name it also forms compounds (in some cases as an electron donor, in others as a receiver), etc. [[User:J. Noel Chiappa|J. Noel Chiappa]] 08:39, 8 April 2008 (CDT)
::: For what it's worth, our current [[Periodic table of elements|Periodic Table]] shows it in ''both'' alkali metals and halogens (because it has some aspects of both). So I think "none" is the way to go. [[User:J. Noel Chiappa|J. Noel Chiappa]] 08:48, 8 April 2008 (CDT)
I have also seen it listed above both the alkali metals and the halogens on many a table for the reason you stated, it is an odd duck. [[User:David E. Volk|David E. Volk]] 08:57, 8 April 2008 (CDT)
==Linkable but not clickable==
How come the table isn't clickable, but hovering over it points you to the [[Periodic table of elements|Periodic table]]entry?  This can be easily fixed by creating a small alpha imagemap and repeating it a lot, if that'll fix it. --[[User:Robert W King|Robert W King]] 13:23, 8 April 2008 (CDT)
:You know, I wanted to ask about that.  The link works in Firefox but not in ie.  Why?  If you've got a fix, then by all means...fix away :-)--[[User:David Yamakuchi|David Yamakuchi]] 13:34, 8 April 2008 (CDT)
::What's the syntax in the template that registers it as a clickable link? --[[User:Robert W King|Robert W King]] 13:50, 8 April 2008 (CDT)
:::It's in Elem Infobox It's an if that basically says: if "there's an elClass variable defined" then "go ahead and call the Periodic template"--[[User:David Yamakuchi|David Yamakuchi]] 13:59, 8 April 2008 (CDT)
:::That way it won't show up on the older pages until we touch them up.--[[User:David Yamakuchi|David Yamakuchi]] 14:00, 8 April 2008 (CDT)
::::Where did it go? --[[User:Robert W King|Robert W King]] 14:17, 8 April 2008 (CDT)
==size here==
Just looking here this is where all the size is. I tried one thing that didn't work, I'll think a bit more. [[User:Chris Day|Chris Day]] 16:32, 8 April 2008 (CDT)
: lil better?  I'm finding the code documenting is a large part of the problem.  Do I hear subpage?--[[User:David Yamakuchi|David Yamakuchi]] 17:01, 8 April 2008 (CDT)
== Template Structure ==
The logic could be made simpler...I think.  I dont know the syntax but I suspect that we could do something like:
<pre>{{ele|
|{{if case1 (set #one color and opacity)|
|else if case2 (set #two color and opacity)|
|else if...etc.
}}
</pre>
We could do this once for each element and that would be less calls of ele and just as many calls to if.--[[User:David Yamakuchi|David Yamakuchi]] 18:53, 8 April 2008 (CDT)
::I think it could be simpler, I did not change any of the code but there did seem to be parts that are not used as far as I could tell. But maybe you have plans for some things that I did not ''see''. [[User:Chris Day|Chris Day]] 19:02, 8 April 2008 (CDT)
:Using [http://en.citizendium.org/wiki?title=Template:Periodic&diff=100306240&oldid=100306234 this hack] (for transition metals it only calls on the template used, either {{tl|element on}}, {{tl|transition on}} or {{tl|transition off}}) I can reduce the ''pre-expand include size'' from 322 kbytes to 268 kbytes. The ''post-expand include size'' is reduced to 173 kbytes from 201 kbytes. If you do something similar on all the other classes then that will reduce the number of times the ele template is used by three fold. There might be something more elegant too, I just have not had time to look at your code closely. [[User:Chris Day|Chris Day]] 18:55, 8 April 2008 (CDT)

Latest revision as of 05:33, 6 March 2024

Hydrogen

Is Hydrogen considered an Alkali Metal?--David Yamakuchi 15:14, 7 April 2008 (CDT)

A good question! I'm on the road without references, but... I do recall that in certain phases (e.g. solid) it does have some metallic properties. However, it doesn't have other properties typical of alkali metals (such as violently reacting with water). I will let a chemistry expert take this one on, though! J. Noel Chiappa 16:38, 7 April 2008 (CDT)
In chemistry books that use color to denote metals, metalloids and non-metals, hydrogen is colored as a non-metal, which it is. Thus, it is grouped with C,N,O,F,P,S,Cl, etc. I don't know what you want to do with your new elemental box, but you have two choices, add it to the non-metals for hi-lighting or do not group it with anything. David E. Volk 08:24, 8 April 2008 (CDT)
I would say not group it with anything. It's a bit of an odd duck, chemistry-wise. I mean, with metals it forms hydrides, with many of the elements you name it also forms compounds (in some cases as an electron donor, in others as a receiver), etc. J. Noel Chiappa 08:39, 8 April 2008 (CDT)
For what it's worth, our current Periodic Table shows it in both alkali metals and halogens (because it has some aspects of both). So I think "none" is the way to go. J. Noel Chiappa 08:48, 8 April 2008 (CDT)

I have also seen it listed above both the alkali metals and the halogens on many a table for the reason you stated, it is an odd duck. David E. Volk 08:57, 8 April 2008 (CDT)

Linkable but not clickable

How come the table isn't clickable, but hovering over it points you to the Periodic tableentry? This can be easily fixed by creating a small alpha imagemap and repeating it a lot, if that'll fix it. --Robert W King 13:23, 8 April 2008 (CDT)

You know, I wanted to ask about that. The link works in Firefox but not in ie. Why? If you've got a fix, then by all means...fix away :-)--David Yamakuchi 13:34, 8 April 2008 (CDT)
What's the syntax in the template that registers it as a clickable link? --Robert W King 13:50, 8 April 2008 (CDT)
It's in Elem Infobox It's an if that basically says: if "there's an elClass variable defined" then "go ahead and call the Periodic template"--David Yamakuchi 13:59, 8 April 2008 (CDT)
That way it won't show up on the older pages until we touch them up.--David Yamakuchi 14:00, 8 April 2008 (CDT)
Where did it go? --Robert W King 14:17, 8 April 2008 (CDT)

size here

Just looking here this is where all the size is. I tried one thing that didn't work, I'll think a bit more. Chris Day 16:32, 8 April 2008 (CDT)

lil better? I'm finding the code documenting is a large part of the problem. Do I hear subpage?--David Yamakuchi 17:01, 8 April 2008 (CDT)

Template Structure

The logic could be made simpler...I think. I dont know the syntax but I suspect that we could do something like:

{{ele|
|{{if case1 (set #one color and opacity)|
|else if case2 (set #two color and opacity)|
|else if...etc.
}}

We could do this once for each element and that would be less calls of ele and just as many calls to if.--David Yamakuchi 18:53, 8 April 2008 (CDT)

I think it could be simpler, I did not change any of the code but there did seem to be parts that are not used as far as I could tell. But maybe you have plans for some things that I did not see. Chris Day 19:02, 8 April 2008 (CDT)
Using this hack (for transition metals it only calls on the template used, either {{element on}}, {{transition on}} or {{transition off}}) I can reduce the pre-expand include size from 322 kbytes to 268 kbytes. The post-expand include size is reduced to 173 kbytes from 201 kbytes. If you do something similar on all the other classes then that will reduce the number of times the ele template is used by three fold. There might be something more elegant too, I just have not had time to look at your code closely. Chris Day 18:55, 8 April 2008 (CDT)