Wide Periodic Table by yvl

a=i=0
"He w0 H
Li Be _0 B C N O F Ne
Na Mg _0 Al Si P S Cl Ar
K Ca 70 Sc Ti V Cr Mn Fe Co Ni Cu Zn Ga Ge As Se Br Kr
Rb Sr 70 Y Zr Nb Mo Tc Ru Rh Pd Ag Cd In Sn Sb Te I Xe
Cs Ba La Ce Pr Nd Pm Sm Eu Gd Tb Dy Ho Er Tm Yb Lu Hf Ta W Re Os Ir Pt Au Hg Tl Pb Bi Po At Rn
Fr Ra Ac Th Pa U Np Pu am Cm Bk Cf Es Fm Md No Lr Rf Db Sg Bh Hs Mt Ds Rg Cn Uut Uuq Uup Uuh Uus Uuo".map{|$_|a="+"
b=c="|"
split.map{|y|y=~/0/?(x=" "*y[0]
a+=x+"+"
b+=x=x+"|"
c+=x):(a+="---+"
b+="%3s|"%i+=1
c+="%3s|".%"%-2s"%y)}
puts a,b,c}
puts a

Note that non-ascii characters in the above source code will be escaped (such as \x9f).

download

return top