Template talk:Periodic: Difference between revisions

From Citizendium
Jump to navigation Jump to search
imported>David Yamakuchi
(→‎Usage: new section)
imported>David Yamakuchi
m (→‎Template Structure: new section)
Line 83: Line 83:
*[[User:David_Yamakuchi|David Yamakuchi]]   
*[[User:David_Yamakuchi|David Yamakuchi]]   
}}
}}
== 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)

Revision as of 17:53, 8 April 2008

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 table of the elements entry? 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)

Usage

Template Description

mini configurable table of the elements used in {{Elem_Infobox}}

Execution

   
    
{{Elem_Infobox   
|background1=ffffff   
|align=left   
|elementColor=fefeaa   
|elName=Scandium   
|elMass=44.96   
|elSym=Sc   
|elNum=21   
|elClass=Transition Metal   
|eltrnCfg=Ar3d<sup>1</sup>-4s<sup>2</sup>   
|no1=2   
|no2=8   
|no3=9   
|no4=2   
|properties=    
|compounds=    
|uses=   
|hazard= toxic   
}}   
    

Sample

Scandium
44.955910(8) 2
8
9
2
  Sc
21
Ar3d1-4s2
[ ? ] Transition Metal:
Hazard:
toxic

Caveats

each cell design is under {{ele}}. The only stuff to be adjusted here are background colors, opacity, border styles, etc, anything that does not affect each cell.

Authors


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)