- Questo topic ha 5 risposte, 2 partecipanti ed è stato aggiornato l'ultima volta 9 anni, 2 mesi fa da .
-
Topic
-
Buongiorno!Sto scrivendo delle dispense di chimica per i miei ragazzi. Il lavoro è a buon punto, ma mi sono arenato sulla composizione della tavola periodica. Su TeXample ho trovato un ottimo punto di partenza:
http://www.texample.net/tikz/examples/periodic-table-of-chemical-elements/
Pe ragioni didattiche, ho semplificato un po’ la tavola. Questo il codice (non minimo, chiedo scusa!):
`\documentclass[11pt,a4paper]{scrbook}\usepackage{classicthesis}
\usepackage{arsclassica}
\usepackage{tikz}
\usepackage{rotating}
\usepackage{scrextend}\usetikzlibrary{calc}
\begin{document}
\newcommand{\CommonElementTextFormat}[4]
{
\begin{minipage}{2.2cm}
\centering
{\textbf{#1} \hfill #2}%
\linebreak \linebreak
{\textbf{#3}}%
\linebreak \linebreak
{{#4}}
\end{minipage}
}\newcommand{\NaturalElementTextFormat}[4]
{
\CommonElementTextFormat{#1}{#2}{\Huge {#3}}{#4}
}\newcommand{\OutlineText}[1]
{
\ifpdf
\pdfliteral direct {0.5 w 1 Tr}{#1}%
\pdfliteral direct {1 w 0 Tr}%
\else
\pscharpath[shadow=false,
fillstyle=solid,
fillcolor=white,
linestyle=solid,
linecolor=black,
linewidth=.2pt]{#1}
\fi
}\newcommand{\SyntheticElementTextFormat}[4]
{
\ifpdf
\CommonElementTextFormat{#1}{#2}{\OutlineText{\Huge #3}}{#4}
\else
\CommonElementTextFormat{#1}{#2}{\OutlineText{\Huge #3}}{#4}
\fi
}%\changefontsizes{12.5pt}
\begin{sidewaysfigure}
\centering\begin{tikzpicture}[font=\sffamily\bfseries, scale=0.40, transform shape]
%% Fill Color Styles
\tikzstyle{ElementFill} = [fill=green!30]
\tikzstyle{AlkaliMetalFill} = [fill=blue!30]
\tikzstyle{AlkalineEarthMetalFill} = [fill=blue!30]
\tikzstyle{MetalFill} = [fill=blue!30]
\tikzstyle{MetalloidFill} = [fill=yellow!10]
\tikzstyle{NonmetalFill} = [fill=green!30]
\tikzstyle{HalogenFill} = [fill=green!30]
\tikzstyle{NobleGasFill} = [fill=green!30]
\tikzstyle{LanthanideActinideFill} = [fill=purple!30]%% Element Styles
\tikzstyle{Element} = [draw=black, ElementFill,
minimum width=2.75cm, minimum height=2.75cm, node distance=2.75cm]
\tikzstyle{AlkaliMetal} = [Element, AlkaliMetalFill]
\tikzstyle{AlkalineEarthMetal} = [Element, AlkalineEarthMetalFill]
\tikzstyle{Metal} = [Element, MetalFill]
\tikzstyle{Metalloid} = [Element, MetalloidFill]
\tikzstyle{Nonmetal} = [Element, NonmetalFill]
\tikzstyle{Halogen} = [Element, HalogenFill]
\tikzstyle{NobleGas} = [Element, NobleGasFill]
\tikzstyle{LanthanideActinide} = [Element, LanthanideActinideFill]
\tikzstyle{PeriodLabel} = [font={\sffamily\Huge}, node distance=2.0cm]
\tikzstyle{GroupLabel} = [font={\sffamily\Huge}, minimum width=2.75cm, node distance=2.0cm]
\tikzstyle{TitleLabel} = [font={\sffamily\Huge\bfseries}]%% Group 1 – IA
\node[name=H, Element] {\NaturalElementTextFormat{1}{1}{H}{Idrogeno}};
\node[name=Li, below of=H, AlkaliMetal] {\NaturalElementTextFormat{3}{7}{Li}{Litio}};
\node[name=Na, below of=Li, AlkaliMetal] {\NaturalElementTextFormat{11}{23}{Na}{Sodio}};
\node[name=K, below of=Na, AlkaliMetal] {\NaturalElementTextFormat{19}{39}{K}{Potassio}};
\node[name=Rb, below of=K, AlkaliMetal] {\NaturalElementTextFormat{37}{85,5}{Rb}{Rubidio}};
\node[name=Cs, below of=Rb, AlkaliMetal] {\NaturalElementTextFormat{55}{133}{Cs}{Cesio}};
\node[name=Fr, below of=Cs, AlkaliMetal] {\NaturalElementTextFormat{87}{223}{Fr}{Francio}};%% Group 2 – IIA
\node[name=Be, right of=Li, AlkalineEarthMetal] {\NaturalElementTextFormat{4}{9}{Be}{Berillio}};
\node[name=Mg, below of=Be, AlkalineEarthMetal] {\NaturalElementTextFormat{12}{24}{Mg}{Magnesio}};
\node[name=Ca, below of=Mg, AlkalineEarthMetal] {\NaturalElementTextFormat{20}{40}{Ca}{Calcium}};
\node[name=Sr, below of=Ca, AlkalineEarthMetal] {\NaturalElementTextFormat{38}{87{,}5}{Sr}{Stronzio}};
\node[name=Ba, below of=Sr, AlkalineEarthMetal] {\NaturalElementTextFormat{56}{137{,}3}{Ba}{Bario}};
\node[name=Ra, below of=Ba, AlkalineEarthMetal] {\NaturalElementTextFormat{88}{226}{Ra}{Radio}};%% Group 3 – IIIB
\node[name=Sc, right of=Ca, Metal] {\NaturalElementTextFormat{21}{45}{Sc}{Scandio}};
\node[name=Y, below of=Sc, Metal] {\NaturalElementTextFormat{39}{89}{Y}{Yttrio}};
\node[name=LaLu, below of=Y, LanthanideActinide] {\NaturalElementTextFormat{57-71}{}{\huge La-Lu}{Lantanidi}};
\node[name=AcLr, below of=LaLu, LanthanideActinide] {\NaturalElementTextFormat{89-103}{}{\huge Ac-Lr}{Attinidi}};%% Group 4 – IVB
\node[name=Ti, right of=Sc, Metal] {\NaturalElementTextFormat{22}{47,9}{Ti}{Titanio}};
\node[name=Zr, below of=Ti, Metal] {\NaturalElementTextFormat{40}{91,2}{Zr}{Zirconio}};
\node[name=Hf, below of=Zr, Metal] {\NaturalElementTextFormat{72}{178,5}{Hf}{Afnio}};%% Group 5 – VB
\node[name=V, right of=Ti, Metal] {\NaturalElementTextFormat{23}{51}{V}{Vanadio}};
\node[name=Nb, below of=V, Metal] {\NaturalElementTextFormat{41}{93}{Nb}{Niobio}};
\node[name=Ta, below of=Nb, Metal] {\NaturalElementTextFormat{73}{181}{Ta}{Tantalio}};%% Group 6 – VIB
\node[name=Cr, right of=V, Metal] {\NaturalElementTextFormat{24}{52}{Cr}{Cromo}};
\node[name=Mo, below of=Cr, Metal] {\NaturalElementTextFormat{42}{96}{Mo}{Molibdeno}};
\node[name=W, below of=Mo, Metal] {\NaturalElementTextFormat{74}{184}{W}{Tungsteno}};%% Group 7 – VIIB
\node[name=Mn, right of=Cr, Metal] {\NaturalElementTextFormat{25}{55}{Mn}{Manganese}};
\node[name=Tc, below of=Mn, Metal] {\NaturalElementTextFormat{43}{96}{Tc}{Tecnezio}};
\node[name=Re, below of=Tc, Metal] {\NaturalElementTextFormat{75}{186}{Re}{Renio}};%% Group 8 – VIIIB
\node[name=Fe, right of=Mn, Metal] {\NaturalElementTextFormat{26}{56}{Fe}{Ferro}};
\node[name=Ru, below of=Fe, Metal] {\NaturalElementTextFormat{44}{101}{Ru}{Rutenio}};
\node[name=Os, below of=Ru, Metal] {\NaturalElementTextFormat{76}{190}{Os}{Osmio}};%% Group 9 – VIIIB
\node[name=Co, right of=Fe, Metal] {\NaturalElementTextFormat{27}{59}{Co}{Cobalto}};
\node[name=Rh, below of=Co, Metal] {\NaturalElementTextFormat{45}{103}{Rh}{Rodio}};
\node[name=Ir, below of=Rh, Metal] {\NaturalElementTextFormat{77}{192}{Ir}{Iridio}};%% Group 10 – VIIIB
\node[name=Ni, right of=Co, Metal] {\NaturalElementTextFormat{28}{59}{Ni}{Nickel}};
\node[name=Pd, below of=Ni, Metal] {\NaturalElementTextFormat{46}{106,5}{Pd}{Palladio}};
\node[name=Pt, below of=Pd, Metal] {\NaturalElementTextFormat{78}{195}{Pt}{Platino}};%% Group 11 – IB
\node[name=Cu, right of=Ni, Metal] {\NaturalElementTextFormat{29}{63,5}{Cu}{Rame}};
\node[name=Ag, below of=Cu, Metal] {\NaturalElementTextFormat{47}{108}{Ag}{Argento}};
\node[name=Au, below of=Ag, Metal] {\NaturalElementTextFormat{79}{197}{Au}{Oro}};%% Group 12 – IIB
\node[name=Zn, right of=Cu, Metal] {\NaturalElementTextFormat{30}{65,5}{Zn}{Zinco}};
\node[name=Cd, below of=Zn, Metal] {\NaturalElementTextFormat{48}{112,5}{Cd}{Cadmio}};
\node[name=Hg, below of=Cd, Metal] {\NaturalElementTextFormat{80}{200,5}{Hg}{Mercurio}};%% Group 13 – IIIA
\node[name=Ga, right of=Zn, Metal] {\NaturalElementTextFormat{31}{70}{Ga}{Gallio}};
\node[name=Al, above of=Ga, Metal] {\NaturalElementTextFormat{13}{27}{Al}{Alluminio}};
\node[name=B, above of=Al, Metalloid] {\NaturalElementTextFormat{5}{11}{B}{Boro}};
\node[name=In, below of=Ga, Metal] {\NaturalElementTextFormat{49}{115}{In}{Indio}};
\node[name=Tl, below of=In, Metal] {\NaturalElementTextFormat{81}{204,5}{Tl}{Tallio}};%% Group 14 – IVA
\node[name=C, right of=B, Nonmetal] {\NaturalElementTextFormat{6}{12}{C}{Carbonio}};
\node[name=Si, below of=C, Metalloid] {\NaturalElementTextFormat{14}{28}{Si}{Silicio}};
\node[name=Ge, below of=Si, Metalloid] {\NaturalElementTextFormat{32}{72,5}{Ge}{Germanio}};
\node[name=Sn, below of=Ge, Metal] {\NaturalElementTextFormat{50}{119}{Sn}{Stagno}};
\node[name=Pb, below of=Sn, Metal] {\NaturalElementTextFormat{82}{207}{Pb}{Piombo}};%% Group 15 – VA
\node[name=N, right of=C, Nonmetal] {\NaturalElementTextFormat{7}{14}{N}{Azoto}};
\node[name=P, below of=N, Nonmetal] {\NaturalElementTextFormat{15}{31}{P}{Fosforo}};
\node[name=As, below of=P, Metalloid] {\NaturalElementTextFormat{33}{75}{As}{Arsenico}};
\node[name=Sb, below of=As, Metalloid] {\NaturalElementTextFormat{51}{122}{Sb}{Antimonio}};
\node[name=Bi, below of=Sb, Metal] {\NaturalElementTextFormat{83}{209}{Bi}{Bismuto}};%% Group 16 – VIA
\node[name=O, right of=N, Nonmetal] {\NaturalElementTextFormat{8}{16}{O}{Ossigeno}};
\node[name=S, below of=O, Nonmetal] {\NaturalElementTextFormat{16}{32}{S}{Zolfo}};
\node[name=Se, below of=S, Nonmetal] {\NaturalElementTextFormat{34}{79}{Se}{Selenio}};
\node[name=Te, below of=Se, Metalloid] {\NaturalElementTextFormat{52}{127,5}{Te}{Tellurio}};
\node[name=Po, below of=Te, Metalloid] {\NaturalElementTextFormat{84}{209}{Po}{Polonio}};%% Group 17 – VIIA
\node[name=F, right of=O, Halogen] {\NaturalElementTextFormat{9}{19}{F}{Fluoro}};
\node[name=Cl, below of=F, Halogen] {\NaturalElementTextFormat{17}{35,5}{Cl}{Cloro}};
\node[name=Br, below of=Cl, Halogen] {\NaturalElementTextFormat{35}{89}{Br}{Bromo}};
\node[name=I, below of=Br, Halogen] {\NaturalElementTextFormat{53}{127}{I}{Iodio}};
\node[name=At, below of=I, Halogen] {\NaturalElementTextFormat{85}{210}{At}{Astanio}};%% Group 18 – VIIIA
\node[name=Ne, right of=F, NobleGas] {\NaturalElementTextFormat{10}{20}{Ne}{Neon}};
\node[name=He, above of=Ne, NobleGas] {\NaturalElementTextFormat{2}{4}{He}{Elio}};
\node[name=Ar, below of=Ne, NobleGas] {\NaturalElementTextFormat{18}{40}{Ar}{Argon}};
\node[name=Kr, below of=Ar, NobleGas] {\NaturalElementTextFormat{36}{84}{Kr}{Kripton}};
\node[name=Xe, below of=Kr, NobleGas] {\NaturalElementTextFormat{54}{131,5}{Xe}{Xenon}};
\node[name=Rn, below of=Xe, NobleGas] {\NaturalElementTextFormat{86}{222}{Rn}{Radon}};%% Period
\node[name=Period1, left of=H, PeriodLabel] {1};
\node[name=Period2, left of=Li, PeriodLabel] {2};
\node[name=Period3, left of=Na, PeriodLabel] {3};
\node[name=Period4, left of=K, PeriodLabel] {4};
\node[name=Period5, left of=Rb, PeriodLabel] {5};
\node[name=Period6, left of=Cs, PeriodLabel] {6};
\node[name=Period7, left of=Fr, PeriodLabel] {7};%% Group
\node[name=Group1, above of=H, GroupLabel,yshift=5pt] {I};
\node[name=Group2, above of=Be, GroupLabel,yshift=5pt] {II};
\node[name=Group13, above of=B, GroupLabel,yshift=5pt] {III};
\node[name=Group14, above of=C, GroupLabel,yshift=5pt] {IV};
\node[name=Group15, above of=N, GroupLabel,yshift=5pt] {V};
\node[name=Group16, above of=O, GroupLabel,yshift=5pt] {VI};
\node[name=Group17, above of=F, GroupLabel,yshift=5pt] {VII};
\node[name=Group18, above of=He, GroupLabel,yshift=5pt] {VIII};%% Lanthanide
\node[name=La, below of=Hf, LanthanideActinide, yshift=-4cm] {\NaturalElementTextFormat{57}{138.91}{La}{Lanthanum}};
\node[name=Ce, right of=La, LanthanideActinide] {\NaturalElementTextFormat{58}{140}{Ce}{Cerio}};
\node[name=Pr, right of=Ce, LanthanideActinide] {\NaturalElementTextFormat{59}{140}{Pr}{Praseodimio}};
\node[name=Nd, right of=Pr, LanthanideActinide] {\NaturalElementTextFormat{60}{144}{Nd}{Neodimio}};
\node[name=Pm, right of=Nd, LanthanideActinide] {\NaturalElementTextFormat{61}{145}{Pm}{Promezio}};
\node[name=Sm, right of=Pm, LanthanideActinide] {\NaturalElementTextFormat{62}{150}{Sm}{Samario}};
\node[name=Eu, right of=Sm, LanthanideActinide] {\NaturalElementTextFormat{63}{152}{Eu}{Europio}};
\node[name=Gd, right of=Eu, LanthanideActinide] {\NaturalElementTextFormat{64}{157}{Gd}{Gadolinio}};
\node[name=Tb, right of=Gd, LanthanideActinide] {\NaturalElementTextFormat{65}{159}{Tb}{Terbio}};
\node[name=Dy, right of=Tb, LanthanideActinide] {\NaturalElementTextFormat{66}{162,5}{Dy}{Disprosio}};
\node[name=Ho, right of=Dy, LanthanideActinide] {\NaturalElementTextFormat{67}{165}{Ho}{Olmio}};
\node[name=Er, right of=Ho, LanthanideActinide] {\NaturalElementTextFormat{68}{167}{Er}{Erbio}};
\node[name=Tm, right of=Er, LanthanideActinide] {\NaturalElementTextFormat{69}{169}{Tm}{Tulio}};
\node[name=Yb, right of=Tm, LanthanideActinide] {\NaturalElementTextFormat{70}{173}{Yb}{Ytterbio}};
\node[name=Lu, right of=Yb, LanthanideActinide] {\NaturalElementTextFormat{71}{175}{Lu}{Lutezio}};%% Actinide
\node[name=Ac, below of=La, LanthanideActinide, yshift=-1cm] {\NaturalElementTextFormat{89}{227}{Ac}{Attinio}};
\node[name=Th, right of=Ac, LanthanideActinide] {\NaturalElementTextFormat{90}{232.04}{Th}{Torio}};
\node[name=Pa, right of=Th, LanthanideActinide] {\NaturalElementTextFormat{91}{23}{Pa}{Protoattonio}};
\node[name=U, right of=Pa, LanthanideActinide] {\NaturalElementTextFormat{92}{238}{U}{Uranio}};
\node[name=Np, right of=U, LanthanideActinide] {\NaturalElementTextFormat{93}{237}{Np}{Nettunio}};
\node[name=Pu, right of=Np, LanthanideActinide] {\NaturalElementTextFormat{94}{244}{Pu}{Plutonio}};
\node[name=Am, right of=Pu, LanthanideActinide] {\NaturalElementTextFormat{95}{243}{Am}{Americio}};
\node[name=Cm, right of=Am, LanthanideActinide] {\NaturalElementTextFormat{96}{247}{Cm}{Curio}};
\node[name=Bk, right of=Cm, LanthanideActinide] {\NaturalElementTextFormat{97}{247}{Bk}{Berkelio}};
\node[name=Cf, right of=Bk, LanthanideActinide] {\NaturalElementTextFormat{98}{251}{Cf}{Californio}};
\node[name=Es, right of=Cf, LanthanideActinide] {\NaturalElementTextFormat{99}{252}{Es}{Einsteinio}};
\node[name=Fm, right of=Es, LanthanideActinide] {\NaturalElementTextFormat{100}{257}{Fm}{Fermio}};
\node[name=Md, right of=Fm, LanthanideActinide] {\NaturalElementTextFormat{101}{258}{Md}{Mendelevio}};
\node[name=No, right of=Md, LanthanideActinide] {\NaturalElementTextFormat{102}{259}{No}{Nobelio}};
\node[name=Lr, right of=No, LanthanideActinide] {\NaturalElementTextFormat{103}{262}{Lr}{Laurenzio}};%% Draw dotted lines connecting Lanthanide breakout to main table
\draw (LaLu.north west) edge[dotted] (La.north west)
(LaLu.south west) edge[dotted] (La.south west)
;
\draw (AcLr.north west) edge[dotted] (Ac.north west)
(AcLr.south west) edge[dotted] (Ac.south west)
;%% Legend
\draw[black, MetalFill] ($(La.north -| Fr.west) + (1em,-4.0em)$)
rectangle +(3em, 3em) node{Metalli};
\draw[black, MetalloidFill] ($(La.north -| Fr.west) + (1em,-8em)$)
rectangle +(3em, 3em) node{Semimetalli};
\draw[black, NonmetalFill] ($(La.north -| Fr.west) + (1em,-12.0em)$)
rectangle +(3em, 3em) node{Non metalli};
\end{tikzpicture}
\caption{Tavola periodica}
\label{fig:tavolaperiodica}
\end{sidewaysfigure}\end{document}`
Il risultato mi soddisfa. Il mio solo problema è che le scritte sono un po’ troppo piccole! Tenete presente che le dispense andranno stampate in formato 17 x 24. Ho (naturalmente) ruotato la tavola e ho giocato con il valore di “scale”, ma “scale=0.40” è il massimo possibile, per me. Per valori più grandi, la tabella esce dalla pagina.Le scritte sono un po’ troppo piccole, ma niente di irrecuperabile: vanno solo ingrandite un po’ (un 30%, diciamo), lo spazio dentro le caselle ci sarebbe. Non so come farlo.
Ho provato con quel
`\changefontsizes{12.5pt}`
che trovate commentato nel codice che vi ho dato, ma la composizione delle caselle viene tutta sballata (provate per credere)!Ripeto, lo spazio per ingrandire un po’ le scritte, lasciando fisse le caselle (che sono al limite della loro grandezza possibile, per me), ci sarebbe: è che non so come farlo!
Grazie in anticipo, anche a nome dei miei studenti… 😉
- Devi essere connesso per rispondere a questo topic.