0

I am making a card with properties of Periodic Table of Elements. I wish had the mass number, like this using pstricks:

    \documentclass[12pt,a1paper]{article}
    \usepackage[a1paper,margin=0cm]{geometry} %fija los márgenes
\newcommand{\carta}[2]{
    \begin{pspicture}(-2,-3)(2,3)
        % colores fondo
        \pspolygon[linearc=.2,fillstyle=solid,fillcolor=lightgray,linewidth=.1pt](-2,0)(-2,3)(2,3)(2,0)
        \pspolygon[linearc=.2,fillstyle=solid,fillcolor=lightgray!75,linewidth=.1pt](-2,0)(-2,-3)(2,-3)(2,0)
        %\psframe*[fillstyle=solid,fillcolor=lightgray,linewidth=2pt](-2,0)(2,3)
        % línea divisoria
        \psline[linecolor=red,linewidth=3pt]{-}(-2,0)(2,0)
        \pspolygon[linearc=.2,linewidth=2pt](-2,-3)(-2,3)(2,3)(2,-3)
        % tipo de carta
        \uput[d](0,3){\parbox{3cm}{\centering\large{\textrm#1}}}
        \uput[u]{180}(0,-3){\parbox{3cm}{\centering\large{\textrm#1}}}
        % valor de carta
        \rput(0,1){\Huge{#2}}
        \rput{180}(0,-1){\Huge{#2}}
    \end{pspicture}
}
\begin{document}

\carta{Símbolo elemento}{\ECFPookie{H}} \carta{Nombre elemento}{\ECFPookie{\large{Hidrógeno}}} \multido{}{94}{ \carta{Tipo de elemento}{\color{white}{Metal}} } \multido{}{17}{ \carta{Tipo de elemento}{\color{brown}{No Metal}} } \multido{}{7}{ \carta{Tipo de elemento}{\color{blue}{Gas Noble}} }

\multido{\i=1+1}{118}{ \carta{Número atómico $Z$}{$\i$} \carta{Cantidad de protones}{$\i$} \carta{Cantidad de electrones}{$\i$} } \multido{\i=0+1}{118}{ \carta{Cantidad de neutrones}{$\i$} } \end{document}

works fine for now, but the mass number, names and neutron there aren't sequencied like proton and electron. For the neutrons we have: 0, 2, 4, 5, 6, 7, 6, 10, ie almost aleatory.

I think if I make a csv data for all, because it would be easier to write. The problem is that I do not know if is possible to link multido and csv file, so that I read the cycle from there.

Writing one by one for 118 elements, including names and symbols, would be tedious and a lot of code.

Ingmar
  • 6,690
  • 5
  • 26
  • 47
Darío
  • 449
  • 1
  • 6

0 Answers0