%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Hugo Gomes @ 06/05/2026 v2.1.6a
% Hugo Gomes @ 03/05/2026 v2.1.6
% Hugo Gomes @ 10/02/2025 v2.1.5
% Hugo Gomes @ 08/09/2024 v2.1.4
% Hugo Gomes @ 07/08/2024 v2.1.3
% Hugo Gomes @ 01/08/2024 v2.1.2
% Hugo Gomes @ 07/07/2024 v2.1.1
% Hugo Gomes @ 03/04/2024 v2.1.0a
% Hugo Gomes @ 14/02/2024 v2.1.0
% Hugo Gomes @ 29/05/2023 v2.0.1
% Hugo Gomes @ 20/02/2023 v2.0.0
% Hugo Gomes @ 08/11/2022 v1.0.1
% Hugo Gomes @ 10/10/2022 v1.0.0
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\NeedsTeXFormat{LaTeX2e}%
\ProvidesPackage{pgf-PeriodicTable}[03/05/2026 pgf-PeriodicTable v2.1.6a]%%
\RequirePackage{tikz}%
\usetikzlibrary{fadings}%
\tikzfading[name=aumentax, left color=transparent!80, right color=transparent!1]%
\tikzfading[name=diminuix, left color=transparent!1, right color=transparent!80]%
\tikzfading[name=aumentay, top color=transparent!80, bottom color=transparent!1]%
\tikzfading[name=diminuiy, bottom color=transparent!80, top color=transparent!1]%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% check the engine and load font packages
% changed in v2.1.3
% pdfLaTeX --------------------------------------------------
\ifx\pdftexversion\undefined\else%
%\RequirePackage[T1]{fontenc} since v2.1.6 loaded after language detection -> T1 (latin) or T2A (cyrilic)
\edef\pgfPT@fontspec{0}\edef\pgfPT@engine{0}%
\fi% -----------------------------------------------------------
% LuaLaTeX --------------------------------------------------
\ifx\directlua\undefined\else%
\RequirePackage{fontspec}[2020/02/03]\edef\pgfPT@fontspec{1}\edef\pgfPT@engine{1}%
\fi% -----------------------------------------------------------
% XeLaTeX ---------------------------------------------------
\ifx\XeTeXrevision\undefined\else%
\RequirePackage{fontspec}[2020/02/03]\edef\pgfPT@fontspec{1}\edef\pgfPT@engine{2}%
\fi% -----------------------------------------------------------
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% ifs to user language and list of user translations available
\newif\ifpgfPT@user@lang\pgfPT@user@langfalse%
\newif\ifpgfPT@user@lang@isvalid\pgfPT@user@lang@isvalidfalse%
% ISO code language list ------------------------------------->
% added zh in v2.1.5; added uk,ru,sl in v2.1.6
\def\pggPT@userlanguage@ISOcode@list{nl/Nederlands,zh/Chinese,uk/Ukrainian,ru/Russian,sl/Slovenian}%
% ----------------------------------------------------------------
\def\pggPT@userlanguage@ISOcode@check#1{%
\edef\pgfPT@tmpISOcode{#1}%
\def\pggPT@userlanguage@ISOcode@validate##1/##2\relax{\edef\pggPT@userlanguage@ISOcode@curr{##1}\edef\pggPT@userlanguage@ISOcode@currName{##2}}%
\@for\@pgfPT@tmp:=\pggPT@userlanguage@ISOcode@list\do{\expandafter\pggPT@userlanguage@ISOcode@validate\@pgfPT@tmp\relax%
\ifx\pggPT@userlanguage@ISOcode@curr\pgfPT@tmpISOcode\relax\global\pgfPT@user@lang@isvalidtrue%
\edef\pggPT@userlanguage@ISOcode{\pggPT@userlanguage@ISOcode@curr}%
\edef\pggPT@userlanguage@ISOcode@Name{\pggPT@userlanguage@ISOcode@currName}\fi%
}% END \@for
}%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% ifs to typeset with \zhnumber
\newif\ifpgfPT@zhnumbers@Z\pgfPT@zhnumbers@Zfalse%
\newif\ifpgfPT@zhnumbers@per\pgfPT@zhnumbers@perfalse%
\newif\ifpgfPT@zhnumbers@gr\pgfPT@zhnumbers@grfalse%
% macro to set the zhnumber ifs to true or false
% \pgfPTzhnumber[true|false]{what list} -> default [true]
\def\pgfPTzhnumber{\@ifnextchar[{\@pgfPT@zhnumber}{\@pgfPT@zhnumber[true]}}%
\def\@pgfPT@zhnumber[#1]#2{%
\@for\@pgfPT@tmp:=#2\do{\csname pgfPT@zhnumbers@\@pgfPT@tmp#1\endcsname}%
}%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% if to compatibility with 'extdash' package with 'shortcuts' option - new in v2.1.6
\newif\ifpgfPT@extd@sh\pgfPT@extd@shfalse%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\DeclareOption{pt}{\def\pgfPT@defaultLanguage{pt}}%
\DeclareOption{en}{\def\pgfPT@defaultLanguage{en}}%
\DeclareOption{fr}{\def\pgfPT@defaultLanguage{fr}}%
\DeclareOption{de}{\def\pgfPT@defaultLanguage{de}}%
\DeclareOption{it}{\def\pgfPT@defaultLanguage{it}}%
\DeclareOption{es}{\def\pgfPT@defaultLanguage{es}}%
\DeclareOption{br}{\def\pgfPT@defaultLanguage{br}}%
\DeclareOption{beamer}{\def\pgfPT@beamer{setting small caps compatibility with beamer via 'lmodern' package.}}% new in v2.1.5
\DeclareOption{beamer*}{\def\pgfPT@beamerstar{setting small caps compatibility with beamer via T1 cmr fonts.}}% new in v2.1.5
\DeclareOption{beamer**}{\def\pgfPT@beamerstar{setting small caps compatibility with beamer via T1 cmr fonts.}%
\def\pgfPT@suppressfontwrn{suppressing small caps font substitution warnings with the 'silence' package.}}% new in v2.1.5
\DeclareOption{dvnnumerals}{%
\ifnum\pgfPT@fontspec=0\relax%
\def\pgfPT@dvn@wrn{\PackageError{pgfPT}{package option 'numerals=dvn' (Devanagari Numerals) requires 'fontspec' package with XeLaTeX engine...}{}}%
\else\ifx\pdfextension\undefined\relax% XeLaTeX%
\newfontfamily\pgfPTdvn[Mapping=devanagarinumerals]{Eczar}%
\def\pgfPTdvnfont{\@ifnextchar[{\@pgfPTdvnfont}{\@pgfPTdvnfont[]}}%
\def\@pgfPTdvnfont[#1]#2{\renewfontfamily\pgfPTdvn[Mapping=devanagarinumerals,#1]{#2}}%
\let\pgfPTnumberfont\pgfPTdvn\let\pgfPT@printnum\relax%
\else\def\pgfPT@dvn@wrn{\PackageError{pgfPT}{package option 'numerals=dvn' (Devanagari Numerals) requires XeLaTeX engine...}{}}%
\fi\fi%
}%
\DeclareOption{zhnumerals}{%
\ifnum\pgfPT@fontspec=0\relax%
\def\pgfPT@zh@wrn{\PackageError{pgfPT}{package option 'numerals=zh' (Mandarin Numerals) requires 'fontspec' package with XeLaTeX or LuaLaTeX engines...}{}}%
\else\def\pgfPT@zhnumerals{}\fi}%
\DeclareOption{hyperref}{\def\pgfPT@optionhyperref{}}% new in v2.1.6
\DeclareOption{extdash}{\def\pgfPT@optionextdash{}}% new in v2.1.6
\DeclareOption*{%
\edef\pgfPT@processOption@equal{=}\edef\pgfPT@processOption@STOP{}%
\def\pgfPT@processOption#1#2\relax{\edef\pgfPT@processOption@curchar{#1}\edef\pgfPT@processOption@remain{#2}%
\def\pgfPT@getOption##1=##2\relax{%
% option numerals=<dvn|zh>
\edef\pgfPT@tmpOptionA{##1}\edef\pgfPT@tmpOptionB{numerals}\ifx\pgfPT@tmpOptionA\pgfPT@tmpOptionB%
\edef\pgfPT@tmpOptionA{##2}\edef\pgfPT@tmpOptionB{zh}\ifx\pgfPT@tmpOptionA\pgfPT@tmpOptionB\ExecuteOptions{zhnumerals}\else%
\edef\pgfPT@tmpOptionA{##2}\edef\pgfPT@tmpOptionB{dvn}\ifx\pgfPT@tmpOptionA\pgfPT@tmpOptionB\ExecuteOptions{dvnnumerals}\else%
\@latex@error{Unknown value '\pgfPT@tmpOptionA' for option 'numerals' passed to '\@currname'}%
{The option '\CurrentOption' was not declared in \@cls@pkg\space'\@currname', perhaps you\MessageBreak misspelled its name. Try typing \space <return>\space to proceed.}%
\fi\fi% END option numerals
% option userlang=<language ISO code>
\else\edef\pgfPT@tmpOptionB{userlang}\ifx\pgfPT@tmpOptionA\pgfPT@tmpOptionB%
\pggPT@userlanguage@ISOcode@check{##2}%
\ifpgfPT@user@lang@isvalid%
\message{Loading \pggPT@userlanguage@ISOcode@Name\space language data...}%
\edef\pgfPT@langtest{zh}\ifx\pgfPT@langtest\pggPT@userlanguage@ISOcode\relax\def\pgfPT@lang@zh{}% if Chinese... (new v2.1.5)
\else\edef\pgfPT@langtest{uk}\ifx\pgfPT@langtest\pggPT@userlanguage@ISOcode\relax\def\pgfPT@lang@cyrilic{}% if Ukrainian... (new v2.1.6)
\else\edef\pgfPT@langtest{ru}\ifx\pgfPT@langtest\pggPT@userlanguage@ISOcode\relax\def\pgfPT@lang@cyrilic{}% if Russian... (new v2.1.6)
\fi\fi\fi%
% END option userlang=<language ISO code>
\pgfPT@user@langtrue\def\pgfPT@defaultLanguage{user}%
\else%
\@latex@error{Unknown language ISO code '\pgfPT@tmpISOcode' for \@cls@pkg\space`\@currname'}%
{The language ISO code '\pgfPT@tmpISOcode' was not declared in \@cls@pkg\space'\@currname', perhaps you\MessageBreak misspelled its name. Try typing \space <return>\space to proceed.}%
\fi% \ifpgfPT@user@lang@isvalid%
\else%
\@latex@error{Unknown option '\pgfPT@tmpOptionA' for \@cls@pkg\space`\@currname'}%
{The option '\CurrentOption' was not declared in \@cls@pkg\space'\@currname', perhaps you\MessageBreak misspelled its name. Try typing \space <return>\space to proceed with the default language (en).}%
\fi\fi% % END option userlang
}% END \pgfPT@getOption
\ifx\pgfPT@processOption@curchar\pgfPT@processOption@equal\relax%
\expandafter\pgfPT@getOption\CurrentOption\relax%
\else\ifx\pgfPT@processOption@remain\pgfPT@processOption@STOP\relax%
\else\expandafter\pgfPT@processOption#2\pgfPT@processOption@STOP\relax\fi\fi%
}% END \pgfPT@processOption
\expandafter\pgfPT@processOption\CurrentOption\pgfPT@processOption@STOP\relax%
}% END \DeclareOption*
\ExecuteOptions{en}%
\ProcessOptions\relax%
% making compatibility with extdash shortcuts ... new in v2.1.6
\ifx\pgfPT@optionextdash\undefined\relax\else%
\pgfPT@extd@shtrue%
%% package extdash with shortcuts option
%% defines incompatible shortcut commands with pgf-PeriodicTable*:
%%      * hyphenation points in the labels def's (pgfPT.labels.tex)
%% Command         Shortcut
%% \Hyphdash           \-/
%% \Endash               \--
%% \Emdash              \---
%% \Halfspace            \-,
%Disable the \- shortcuts of extdash
\def\pgfPTextd@shOFF{%
\DeclareRobustCommand{\HyphOrDash}{\relax}%
}%
%Re-enable the \- shortcuts of extdash
\def\pgfPTextd@shON{%
% the original command @ extdash.sty
\DeclareRobustCommand{\HyphOrDash}{%
\let\EXD@break\@empty%
\@ifnextchar/{\EXD@d@sh}{%
\@ifnextchar-{\EXD@hdash}{%
\@ifnextchar,{\EXD@sp@ce}{\EXD@hyph}%
}}}%
}%
\fi%
% Loading fontenc with T1 -> if(pdfLaTeX && !cyrilic) new in v2.1.6
\ifnum\pgfPT@fontspec=0\relax% pdfLaTeX
\ifx\pgfPT@lang@cyrilic\undefined\relax\RequirePackage[T1]{fontenc}\fi%
\fi%
% loading hyperref... new in v2.1.6
\ifx\pgfPT@optionhyperref\undefined\relax\else%
\RequirePackage{hyperref}%
\def\pgfPT@hyperref[#1]#2\relax{\hyperref[#1]{#2}}%
\fi%
% setting beamer \textsc compatibility with beamer and pdfLaTeX. new in v2.1.5
\ifx\pgfPT@beamer\undefined\relax\else%
\ifnum\pgfPT@fontspec=0\relax% pdfLaTeX
\RequirePackage{lmodern}%
\PackageWarning{pgfPT}{\pgfPT@beamer}\else% XeLaTeX or LuaLaTeX
\PackageWarning{pgfPT}{option 'beamer' ignored.}\fi\fi%
\ifx\pgfPT@beamerstar\undefined\relax\else%
\ifnum\pgfPT@fontspec=0\relax% pdfLaTeX
\DeclareFontShape{T1}{cmss}{m}{sc}{<->sub*cmr/m/sc}{}%
\DeclareFontShape{T1}{cmss}{m}{scsl}{<->sub*cmr/m/scsl}{}%
\DeclareFontShape{T1}{cmss}{bx}{sc}{<->sub*cmr/bx/sc}{}%
\DeclareFontShape{T1}{cmss}{bx}{scsl}{<->sub*cmr/bx/scsl}{}%
\PackageWarning{pgfPT}{\pgfPT@beamerstar}
\ifx\pgfPT@suppressfontwrn\undefined\relax\else% suppressing font warnings
\PackageWarning{pgfPT}{\pgfPT@suppressfontwrn}%
\RequirePackage{silence}%
\WarningFilter{latexfont}{Font shape `T1/cmss/m/sc'}%
\WarningFilter{latexfont}{Font shape `T1/cmss/m/scsl'}%
\WarningFilter{latexfont}{Font shape `T1/cmss/bx/sc'}%
\WarningFilter{latexfont}{Font shape `T1/cmss/bx/scsl'}%
\WarningFilter{latexfont}{Font shape `T1/cmss/m/scit'}%
\WarningFilter{latexfont}{Font shape `T1/cmss/bx/scit'}%
\fi%
\else% XeLaTeX or LuaLaTeX
\PackageWarning{pgfPT}{Option 'beamer' ignored.}\fi\fi%
%
\ifx\pgfPT@dvn@wrn\undefined\relax\else\pgfPT@dvn@wrn\fi%
\ifx\pgfPT@zh@wrn\undefined\relax\else\pgfPT@zh@wrn\fi%
\ifx\pgfPT@zhnumerals\undefined\relax\else%
\RequirePackage{zhnumber}%
\pgfPT@zhnumbers@Ztrue\pgfPT@zhnumbers@pertrue\pgfPT@zhnumbers@grtrue%
%\newfontfamily\pgfPTzhthenumberfont[Script=CJK,AutoFakeBold=4]{SimSun}% changed in v2.1.5 to ->
\newfontfamily\pgfPTzhthenumberfont[Script=CJK,AutoFakeBold=4]{BabelStoneHan.ttf}%
\def\pgfPTzhnumberfont{\@ifnextchar[{\@pgfPTzhnumfont}{\@pgfPTzhnumfont[]}}% changed in v2.1.5
\def\@pgfPTzhnumfont[#1]#2{\renewfontfamily\pgfPTzhthenumberfont[Script=CJK,#1]{#2}}%
\let\pgfPTnumberfont\pgfPTzhthenumberfont% changed in v2.1.5
\let\pgfPTzhfont\pgfPTzhnumberfont% new in v2.1.5 for compatibility with previous versions
\let\pgfPT@printnum\zhnumber%
\fi%
\ifx\pgfPT@printnum\undefined\relax\let\pgfPT@printnum\relax\let\pgfPTnumberfont\relax\fi%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Chinese language
\ifx\pgfPT@lang@zh\undefined\relax\else% Chinese
\ifnum\pgfPT@fontspec=0\relax%
\PackageError{pgfPT}{package option 'userlang=zh' (Chinese) requires 'fontspec' package with XeLaTeX or LuaLaTeX engines...}{}%
\else%
% setting font features
\def\pgfPT@zhFontFeatures{[Script=CJK,AutoFakeBold=4]}%
\def\pgfPTzhFontFeatures#1{\def\pgfPT@zhFontFeatures{[Script=CJK,#1]}}%
% extra font selection for ideographs not available in «common» fonts (UTF-8 ranges not available)
% - defaults:
\def\pgfPT@fontzhSS{BabelStoneHan.ttf}% font for names of elements Z={109,112.113,117,118} ->
%                                             meitnerium, copernicium, nihonium, tennessine, oganesson
\def\pgfPT@fontzhSSB{BabelStoneHan.ttf}% font for names of elements Z={104,105,106,107,108,110,111,114} ->
%                                                      rutherfordium, dubnium, seaborgium, bohrium, hassium,darmstadtium, roentgenium, flerovium
\def\pgfPT@fontzhSSLv{BabelStoneHan.ttf}% font for name of element Z={116} -> livermorium
% - user choices
\def\pgfPTzhtextfontSS#1{\def\pgfPT@fontzhSS{#1}}%
\def\pgfPTzhtextfontSSB#1{\def\pgfPT@fontzhSSB{#1}}%
\def\pgfPTzhtextfontLv#1{\def\pgfPT@fontzhSSLv{#1}}%
\fi%
\fi%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Ukrainian language or Russian language
\ifx\pgfPT@lang@cyrilic\undefined\relax\else% Ukrainian or Russian
\ifnum\pgfPT@fontspec=0\relax%
\RequirePackage[T2A]{fontenc}%
\RequirePackage[utf8x]{inputenc}%
\else%
% setting font features
\defaultfontfeatures{Ligatures={TeX}}%
\fi%
\fi%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% process user language
\ifpgfPT@user@lang%
\input{translations/pgfPT.lang.\pggPT@userlanguage@ISOcode.tex}%
\else%
\input{translations/pgfPT.lang.undefined.tex}%
\fi%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\newcount\pgfPT@counta\newcount\pgfPT@countb%
\newcount\pgfPT@countc\newcount\pgfPT@countd%
\newcount\pgfPT@counte\newcount\pgfPT@countf%
\newcount\pgfPT@num%
\newdimen\pgfPT@dima%
\newdimen\pgfPT@dimb%
\newdimen\pgfPT@dimc%
\newdimen\pgfPT@boxwd%
\newdimen\pgfPT@boxht%
\newdimen\pgfPT@data@Z@natwd%
\newdimen\pgfPT@data@DiscY@natwd%
\newdimen\pgfPT@tmpwd%
\newdimen\pgfPT@tmpht%
\newif\ifpgfPT@temp%
\newif\ifpgfPT@found%
\newif\ifpgfPTis@backcolorsolid%
\newif\ifpgfPTis@labeldrawn%
\newif\ifpgfPT@drawLaAc%
\newif\ifpgfPT@Zliststar\pgfPT@Zliststarfalse% v2.1.5
\newif\ifpgfPT@lsfig@extra\pgfPT@lsfig@extratrue% v2.1.6
\newif\ifpgfPT@overrideacros\pgfPT@overrideacrosfalse% v2.1.6
\newif\ifpgfPT@radiosymbolisimage\pgfPT@radiosymbolisimagetrue% v2.1.6
\def\pgfPT@true{true}%
\def\pgfPT@TRUE{TRUE}%
\def\pgfPT@false{false}%
\def\pgfPT@relax{}%
\def\pgfPT@space{ }%
\def\pgfPT@unit@d@gcm{g/cm3}% v1.0.1
\def\pgfPT@unit@d@gdm{g/dm3}% v1.0.1
\def\pgfPT@unit@d@both{both}% v1.0.1
\def\pgfPT@unit@ls@A{A}% v1.0.1
\def\pgfPT@box@zerodepth#1{{\setbox0=\hbox{#1}\dp0=0pt\box0\relax}}%
\def\pgfPT@mbox@zerodepth#1{{\setbox0=\hbox{#1}\dp0=0pt\mbox{\box0}\relax}}%
\def\pgfPT@box@smash#1{{\setbox0=\hbox{#1}\dp0=0pt\ht0=0pt\box0\relax}}%
\def\pgfPTg@bblespaces#1\relax{\edef\pgfPT@listn@spaces{\zap@space#1 \@empty}}%
\newsavebox\pgfPT@radiobox%
\newsavebox\pgfPT@econfbox%
\newsavebox\pgfPT@tmpbox%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\def\@pgfPT@setlayers{%
\ifx\@pgfPT@resetlayers\undefined\relax\edef\@pgfPT@resetlayers{\pgf@layerlist}\fi%
\pgfsetlayers{\@pgfPT@resetlayers}%
\edef\@pgfPT@layers{pgfPTpaperlayer,pgfPTbacklayer,\pgf@layerlist}%
\pgfdeclarelayer{pgfPTbacklayer}%
\pgfdeclarelayer{pgfPTpaperlayer}%
\pgfsetlayers{\@pgfPT@layers}%
}%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\input{pgfPT.buildcell.tex}% Loading cell building macros
\input{pgfPT.formatNumbers.tex}% Loading number formatting
\input{pgfPT.drawing.keys.tex}% Loading keys for the Periodic Table Layout
\input{pgfPT.backcolors.keys.tex}% Loading keys for the Periodic Table colors
\input{pgfPT.data.tex}% Loading the data of the elements in the Periodic Table
\input{pgfPT.names.tex}% Loading the names of the elements in the Periodic Table
\input{pgfPT.labels.tex}% Loading language labels
\input{pgfPT.process.language.tex}% Macros for process language labels
\input{pgfPT.input.library.tex}% Loading the input library mechanism (new v2.0.0)
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% --------------------------------------------------------------------------------------------------
% commands #################################################
% Setting global style for the Periodic Table
\def\pgfPTstyle[#1]{\pgfPTresetstyle\relax\tikzset{/pgfPerTable/.cd,#1}}%
% END !! \pgfPTstyle
%
% Resetting global style for the Periodic Table
\def\pgfPTresetstyle{\tikzset{/pgfPerTable/.cd,languages,other languages font,other languages color,%
font,IUPAC,capitalize element names=false,show title,show period numbers,show group numbers,%
show legend,legend xshift,legend yshift,legend acronyms,legend acronyms at right=false,legend acronyms font size,legend back color,show legend pins,show extra legend,legend radio color,%
legend CS color,legend Z color,show blocks=false,show families=false,show MNM line,show periodic variations=false,%
show label LaAc,title font,title color,cell width,cell height,cell style,label font,period label color,group label color,%
label LaAc font,group numbers,Roman label color,Z list,Z links,Z links color,Z links outline width,radio symbol,radio font,radio font color,%
CS solid, CS liquid,CS gas,CS synt,CS font,CS render mode,CS outline color,CS outline width,%
decimal separator,Z backcolor,Z color,Z font,Z align,Z padding,Z use box width=false,name color,name font,name align,Ar color,Ar font,Ar label,Ar precision,%
R color,R font,Rcov color,Rcov font,Rion color,Rion font,Ei color,Ei font,eneg color,eneg font,eaff color,eaff font,%
O color,O font,O Roman=false,Tmelt color,Tmelt font,TmeltC color,TmeltC font,Tboil color,Tboil font,TboilC color,TboilC font,%
eDist color,eDist font,eDist sep,eConfign color,eConfign font,eConfignl color,eConfignl font,d color,d font,Cp color,Cp font,%
kT color,kT font,ls color,ls font,ls align,ls,lsa color,lsa font,lsb color,lsb font,lsc color,lsc font,lsca color,lsca font,%
DiscY color,DiscY font,DiscY BC scale,DiscC color,DiscC font,spectra color,spectra font,MNM line color,MNM line width,%DiscC,
blocks font,s block color,s block font color,s block line width,p block color,p block font color,p block line width,d block color,d block font color,d block line width,%
f block color,f block font color,f block line width,families font,r family color,r family font color,r family line width,tm family color,tm family font color,tm family line width,%
itm family color,itm family font color,itm family line width,varR color,varR font,varEi color,varEi font,vareaff color,vareaff font,varR font color,varEi font color,vareaff font color,%
only cells=false,only cells plus Z=false,only cells with periods and group numbers=false,%
only cells with periods and group numbers plus Z=false,back color scheme,back color,%
Z exercise list,exercise list in capitals,exercise list color,exercise list font,%
d unit,d precision,E precision,ls unit,ls precision,T precision,Cp precision,kT precision%
}%
\tikzset{/pgfPerTable/.cd,legend box,legend pins,extra legend,background}%
}%
% END !! \pgfPTresetstyle
%
% Drawing the Periodic Table
% the main macro do draw the Periodic Table of Elements
% \pfgfPT[<keys>] ----------------------------------------------------------------------------------------------
% OUTPUT: a full or partial graphical Periodic Table of Elements
\def\pgfPT{\relax\@ifnextchar[\pgfPT@draw{\pgfPT@draw[]}}%
\def\pgfPT@draw[#1]{%
\@pgfPT@setlayers%
\tikz[every node/.append style={inner sep=0pt,below right}]{%
% extdash compatibility -> new in v2.1.6
\ifpgfPT@extd@sh\pgfPTextd@shOFF\fi%
% changing defaults for Chinese -> new in v2.1.5
\ifnum\pgfPT@fontspec=1\relax% fontspec is loaded
\ifx\pgfPT@lang@zh\undefined\relax% other languages
\else% Chinese
\let\pgfPTnamefont\footnotesize\relax\let\pgfPTCSfont\large\relax\let\pgfPTtitlefont\LARGE\relax%
\ifpgfPT@zhnumbers@Z\relax\else\let\pgfPTZfont\scriptsize\relax\edef\@pgf@zhZspace{0ex}\let\pgfPTZspace\@pgf@zhZspace\relax\fi%
\fi\fi%
\pgfkeys{/pgfPerTable/.cd,#1}%
% setting the font
\ifnum\pgfPT@fontspec=1\relax% fontspec is loaded
    \edef\pgfPT@defaultfont{phv}%
    \ifx\pgfPT@lang@zh\undefined\relax% other languages -> new if in v2.1.5
        \ifx\pgfPT@lang@cyrilic\undefined\relax% ukrainian or russian -> new if in v2.1.6
            \ifx\pgfPTglobalfont\pgfPT@defaultfont\relax\edef\pgfPTglobalfont{TeX Gyre Heros}\fi% replacing 'phv' by 'TeX Gyre Heros'
            \setmainfont{\pgfPTglobalfont}%
            \ifx\NoAutoSpacing\undefined\relax\else\NoAutoSpacing\fi% XeLaTeX/LuaLaTeX -> removing «extra space» before ':' for babel:french
        \else% ukrainian or russian
            \ifx\pgfPTglobalfont\pgfPT@defaultfont\relax\edef\pgfPTglobalfont{Noto Serif}\fi% replacing 'phv' by 'Noto Serif'
            \setmainfont{\pgfPTglobalfont}%
        \fi% ukrainian or russian
    \else% Chinese -> new in v2.1.5
        \ifx\pgfPTglobalfont\pgfPT@defaultfont\relax\edef\pgfPTglobalfont{BabelStoneHan.ttf}\fi% replacing 'phv' by 'BabelStone Han'
            \setmainfont[\pgfPT@zhFontFeatures]{\pgfPTglobalfont}%
    \fi% Chinese
\else% fontenc is loaded (with T1 or T2A option)
\ifx\pgfPT@lang@cyrilic\undefined\relax% ukrainian or russian -> new in v2.1.6
\else\edef\pgfPTglobalfont{antt}\fi% replacing 'phv' by 'Antikwa Torunska'
\fontfamily{\pgfPTglobalfont}\selectfont\renewcommand*\rmdefault{\pgfPTglobalfont}\fi%
%
\edef\pgfPT@doc@fsize{\f@size}%
\input{pgfPT.coordinates.tex}%
% loading the cell style
\pgfPT@loadcell[\pgfPTcellstyle]%
\ifx\pgfPTZexlist\@empty\relax%
\else%
    \global\pgfPTexModetrue%
    \ifpgfPTonlycellsZ\relax\else%
    \ifpgfPTonlycellsPerAndGroupNum\relax\else%
    \ifpgfPTonlycellsPerAndGroupNumZ\relax\else%
    \global\pgfPTonlycellstrue\fi\fi\fi%
\fi%
% process fake styles
\ifpgfPTonlycells%
    \pgfkeys{/pgfPerTable/.cd,back color scheme=solid,show title=false,show period numbers=false,show group numbers=false,show legend=false,show MNM line=false}%
    % Setting all if<what>'s to false:
    \@for\@pgfPT@tmp:=\pgfPT@contents@acronyms\do{\expandafter\csname pgfPT@\@pgfPT@tmp false\endcsname\relax}%
\fi%
\ifpgfPTonlycellsZ%
    \pgfkeys{/pgfPerTable/.cd,back color scheme=solid,show title=false,show period numbers=false,show group numbers=false,show legend=false,show MNM line=false}%
    \pgfPT@loadcell[\pgfPTcellstyle]%
    % Setting all if<what>'s to false:
    \@for\@pgfPT@tmp:=\pgfPT@contents@acronyms\do{\expandafter\csname pgfPT@\@pgfPT@tmp false\endcsname\relax}%
    \pgfPT@Ztrue%
\fi%
\ifpgfPTonlycellsPerAndGroupNum%
    \pgfkeys{/pgfPerTable/.cd,back color scheme=solid,show title=false,show legend=false,show MNM line=false}%
    % Setting all if<what>'s to false:
    \@for\@pgfPT@tmp:=\pgfPT@contents@acronyms\do{\expandafter\csname pgfPT@\@pgfPT@tmp false\endcsname\relax}%
\fi%
\ifpgfPTonlycellsPerAndGroupNumZ%
    \pgfkeys{/pgfPerTable/.cd,back color scheme=solid,show title=false,show legend=false,show MNM line=false}%
    \pgfPT@loadcell[\pgfPTcellstyle]%
    % Setting all if<what>'s to false:
    \@for\@pgfPT@tmp:=\pgfPT@contents@acronyms\do{\expandafter\csname pgfPT@\@pgfPT@tmp false\endcsname\relax}%
    \pgfPT@Ztrue%
\fi%
% end fake styles
% process the Z list ----->
\pgfPT@processlist%
% process the Z links -----> new in v2.1.6
\ifx\pgfPTZlinks\pgfPT@relax{}\relax\else%
\pgfPT@processlinks%
\def\pgfPT@Zlinkstrue{}\fi%
% process background colors of the cells:
% if user chooses 'solid' then all cells have the chosen color
% else loads a color scheme  ----->
\edef\pgfPT@teststra{solid}\edef\pgfPT@teststrb{\pgfPTbcs}%
\ifx\pgfPT@teststra\pgfPT@teststrb\pgfPTis@backcolorsolidtrue\else\pgfPTis@backcolorsolidfalse\fi%
\ifpgfPTis@backcolorsolid%
\xglobal\colorlet{cpgfPTTMP}{\pgfPTbcsolid}\edef\pgfPT@@colorlist{}%
\else%
\edef\pgfPT@@colorlist{\csname pgfPT@backColorsScheme@\pgfPTbcs\endcsname}%
\fi%
% setting colors for the chemical symbols ----->
\colorlet{solido}{\pgfPTcSQsol}%
\colorlet{liquido}{\pgfPTcSQliq}%
\colorlet{gasoso}{\pgfPTcSQgas}%
\colorlet{sintetico}{\pgfPTcSQsint}%
% getting the stroke rgb components for the outline of chemical symbols ----->
\pgfPT@extract@rgb@stroke{\pgfPTCSolc}%
% setting the text render mode for the chemical symbols ----->
\edef\pgfPT@teststra{fill}\edef\pgfPT@teststrb{\pgfPTCSrender}%
\ifx\pgfPT@teststra\pgfPT@teststrb\edef\pgfPT@CS@txt@render{0}\else\edef\pgfPT@teststra{outline}\relax%
\ifx\pgfPT@teststra\pgfPT@teststrb\edef\pgfPT@CS@txt@render{1}\else\relax\edef\pgfPT@CS@txt@render{2}\fi\relax\fi%
% computing and defining shifts ----->
\pgfmathparse{-.075*\pgfPTcellwd}\edef\pgfPT@perlabel@xshift{\pgfmathresult}%
\pgfmathparse{.075*\pgfPTcellht}\edef\pgfPT@grlabel@yshift{\pgfmathresult}%
\pgfmathparse{.5*\pgfPTcellwd}\edef\pgfPT@@xshift{\pgfmathresult}% ??? ELIMINAR buildcell
\pgfmathparse{-.5*\pgfPTcellht}\edef\pgfPT@CS@yshift{\pgfmathresult}% ELIMINAR buildcell
\ifpgfPT@radio\pgfmathsetlength{\pgfPT@dima}{.9*\pgfPT@data@radio@ht}\fi%
% new in v2.1.6: checking if radio is default image or an image or text ----->
\def\pgfPT@radio@default{pgfPT_radio_symbol.pdf}%
\ifx\pgfPT@radio@default\pgfPTradiosymbol\relax%
\savebox{\pgfPT@radiobox}{\includegraphics[height=\pgfPT@dima]{pgfPT_radio_symbol.pdf}}
\else%
\def\pgfPT@radiosymbol@isIMG##1##2\relax{%
\def\pgfPT@isIMG@i{##1}\def\pgfPT@isIMG@ii{##2}%
\ifx\pgfPT@isIMG@ii\pgfPT@relax\relax\pgfPT@radiosymbolisimagefalse%
\else\pgfPT@radiosymbolisimagefalse\ifx\pgfPT@isIMG@i\pgfPT@dot\relax\pgfPT@radiosymbolisimagetrue%
\else\expandafter\pgfPT@radiosymbol@isIMG\pgfPT@isIMG@ii\relax\fi% \pgfPT@isIMG@i\pgfPT@dot
\fi% \pgfPT@isIMG@ii\pgfPT@relax
}%
\expandafter\pgfPT@radiosymbol@isIMG\pgfPTradiosymbol\relax%
\ifpgfPT@radiosymbolisimage\savebox{\pgfPT@radiobox}{\includegraphics[height=\pgfPT@dima]{\pgfPTradiosymbol}}%
\else\def\pgfPT@radiobox@text{\pgfPTradiosymbol}\fi% \ifpgfPT@radiosymbolisimage
\fi% \pgfPT@radio@default\pgfPTradiosymbol
% computing and defining the font size for standard atomic weight ----->
\ifpgfPT@Arstar\pgfPTArfont\selectfont\pgfmathsetlength{\pgfPT@dimb}{.825*\f@size}\relax\fi%
% shifts for Z, if in the corners of the cell
\pgfmathsetlength{\pgfPT@tmpwd}{\pgfPTcellwd}%
\pgfmathsetlength{\pgfPT@tmpht}{\pgfPTcellht}%
\ifx\pgfPT@data@Z@x\undefined\relax\else%
\xdef\@pgfPT@Zxshift{0pt}\xdef\@pgfPT@Zyshift{0pt}\relax% new in v2.1.6 to allow the Z position to be changed
\ifdim\pgfPT@data@Z@x=0pt\relax\xdef\@pgfPT@Zxshift{\pgfPTcelllinewd}\fi%
\ifdim\pgfPT@data@Z@x=\pgfPT@tmpwd\relax\xdef\@pgfPT@Zxshift{-\pgfPTcelllinewd}\fi%
\ifdim\pgfPT@data@Z@y=0pt\relax\xdef\@pgfPT@Zyshift{\pgfPTcelllinewd}\fi%
\ifdim\pgfPT@data@Z@y=\pgfPT@tmpht\relax\xdef\@pgfPT@Zyshift{-\pgfPTcelllinewd}\fi%
\fi%
% drawing the cells of lanthanides and actinides  ----->
\ifpgfPTIUPACMMIX%
    \global\pgfPT@drawLaAcfalse%
    \foreach \Z in \pgfPT@@cellslist {%
        \ifnum\Z=72\global\pgfPT@drawLaActrue\breakforeach\fi%
    }%
    \edef\pgfPT@teststrb{\pgfPTcells}%
    \edef\pgfPT@teststra{G4}\ifx\pgfPT@teststra\pgfPT@teststrb\pgfPT@drawLaAcfalse\fi%
    \edef\pgfPT@teststra{G3}\ifx\pgfPT@teststra\pgfPT@teststrb\pgfPT@drawLaActrue\edef\pgfPT@@cellslist{\pgfPT@cells@GIIILaAc}\fi%
    \edef\pgfPT@teststra{P6}\ifx\pgfPT@teststra\pgfPT@teststrb\pgfPT@drawLaActrue\edef\pgfPT@@cellslist{\pgfPT@cells@PVIwLa}\fi%
    \edef\pgfPT@teststra{La}\ifx\pgfPT@teststra\pgfPT@teststrb\pgfPT@drawLaAcfalse\edef\pgfPT@@cellslist{\pgfPT@cells@lanthanoids}\fi%
    \edef\pgfPT@teststra{spd}\ifx\pgfPT@teststra\pgfPT@teststrb\pgfPT@drawLaActrue\edef\pgfPT@@cellslist{\pgfPT@cells@spdwLaAc}\fi%
    \edef\pgfPT@teststra{d}\ifx\pgfPT@teststra\pgfPT@teststrb\pgfPT@drawLaActrue\edef\pgfPT@@cellslist{\pgfPT@cells@dwLaAc}\fi%
    \ifpgfPT@drawLaAc%
        \ifpgfPTis@backcolorsolid\relax\else\pgfPT@processbackcolor{57}\fi%
        \draw[fill=cpgfPTTMP,line width=\pgfPTcelllinewd,draw=\pgfPTcelllinecolor] (xLa) rectangle ++(\pgfPTcellwd,-\pgfPTcellht);
        \edef\pgfPT@teststrb{\pgfPTbcs}%
        \edef\pgfPT@teststra{PS}\ifx\pgfPT@teststra\pgfPT@teststrb\pgfPT@processbackcolor{61}\fill[cpgfPTTMP] ([xshift={4/15*\pgfPTcellwd}]xLa) rectangle ++(\pgfPTcellwd/15,-\pgfPTcellht);\draw (xLa) -- ++(\pgfPTcellwd,0);\fi%
        \edef\pgfPT@teststra{Radio}\ifx\pgfPT@teststra\pgfPT@teststrb\pgfPT@processbackcolor{61}\fill[cpgfPTTMP] ([xshift={4/15*\pgfPTcellwd}]xLa) rectangle ++(\pgfPTcellwd/15,-\pgfPTcellht);\draw (xLa) -- ++(\pgfPTcellwd,0);\draw ([yshift=-\pgfPTcellht]xLa) -- ++(\pgfPTcellwd,0);\fi%
        \edef\pgfPT@teststra{Blocks}\ifx\pgfPT@teststra\pgfPT@teststrb\pgfPT@processbackcolor{58}\fill[cpgfPTTMP] ([xshift={1/15*\pgfPTcellwd}]xLa) rectangle ++(\pgfPTcellwd*14/15,-\pgfPTcellht);\draw (xLa) -- ++(\pgfPTcellwd,0);\fi%
        \ifpgfPT@Z
            \ifpgfZuseboxwidth{\pgfPTZfont\pgfPTnumberfont%
            \ifpgfPT@zhnumbers@Z\let\pgfPT@printnum\zhnumber%
                \pgfmathparse{width("\pgfPT@printnum{57}\ -\ \pgfPT@printnum{71}")}\pgfmathsetlength{\pgfPT@data@Z@natwd}{\pgfmathresult}%
                \ifdim\pgfPT@data@Z@natwd>\pgfPT@data@Z@wd\relax%
                    \pgfmathparse{\pgfPT@data@Z@wd-2*\pgfPTZspace-.3333em}\pgfmathsetlength{\pgfPT@data@Z@natwd}{\pgfmathresult}%
                    \node[fill=\pgfPTZback,font=\pgfPTZfont,text=\pgfPTZcolor,align=\pgfPTZalign,text width=\pgfPT@data@Z@wd]%
                        at ([xshift=.5*\@pgfPT@Zxshift,yshift=-.5*\@pgfPT@Zyshift]xLa) {\vbox to\pgfPT@data@Z@ht{\vfil\hspace{\pgfPTZspace}\resizebox{\pgfPT@data@Z@natwd}{\height}{\pgfPT@printnum{57}\ -\ \pgfPT@printnum{71}}\hspace{\pgfPTZspace}\vfil}};%
                \else%
                    \node[fill=\pgfPTZback,font=\pgfPTZfont,text=\pgfPTZcolor,align=\pgfPTZalign,text width=\pgfPT@data@Z@wd]%
                        at ([xshift=.5*\@pgfPT@Zxshift,yshift=-.5*\@pgfPT@Zyshift]xLa) {\vbox to\pgfPT@data@Z@ht{\vfil\hspace{\pgfPTZspace}\pgfPT@printnum{57}\ -\ \pgfPT@printnum{71}\hspace{\pgfPTZspace}\vfil}};%
                \fi%
            \else\let\pgfPT@printnum\relax%
                \node[fill=\pgfPTZback,font=\pgfPTZfont,text=\pgfPTZcolor,align=\pgfPTZalign,text width=\pgfPT@data@Z@wd]%
                    at ([xshift=.5*\@pgfPT@Zxshift,yshift=-.5*\@pgfPT@Zyshift]xLa) {\vbox to\pgfPT@data@Z@ht{\vfil\hspace{\pgfPTZspace}\pgfPT@printnum{57--71}\hspace{\pgfPTZspace}\vfil}};%
            \fi%
            }%
            \else{%
                \ifpgfPT@zhnumbers@Z\let\pgfPT@printnum\zhnumber%
                    \pgfPTZfont\pgfPTnumberfont\pgfmathparse{width("\pgfPT@printnum{57}\ -\ \pgfPT@printnum{71}")}\pgfmathsetlength{\pgfPT@data@Z@natwd}{\pgfmathresult}%
                    \ifdim\pgfPT@data@Z@natwd>\pgfPT@data@Z@wd\relax\edef\@pgfPT@resizebox{1}\edef\pgfPT@zh@scale{1}% \pgfPT@zh@scale -> new in v2.1.5 to scale the Z background in Chinese without zhnumbers
                    \pgfmathparse{\pgfPT@data@Z@wd-1ex}\pgfmathsetlength{\pgfPT@data@Z@natwd}{\pgfmathresult}\else\edef\@pgfPT@resizebox{0}\fi%
                \else\let\pgfPT@printnum\relax%
                    \pgfPTZfont\pgfPTnumberfont\pgfmathparse{width("\pgfPT@printnum{57}\ --\ \pgfPT@printnum{71}")}\pgfmathsetlength{\pgfPT@data@Z@natwd}{\pgfmathresult}%
                    \ifx\pgfPT@lang@zh\undefined\relax\edef\pgfPT@zh@scale{1}\else\edef\pgfPT@zh@scale{.8}\fi%
                \fi%
                \node[fill=\pgfPTZback,font=\pgfPTZfont,text=\pgfPTZcolor,text width={\pgfPT@zh@scale*\pgfPT@data@Z@natwd},inner xsep=.5ex]%
                at ([xshift=.5*\@pgfPT@Zxshift,yshift=-.5*\@pgfPT@Zyshift]xLa) {%
                    \ifpgfPT@zhnumbers@Z%
                        \ifnum\@pgfPT@resizebox=1\relax%
                        \vbox to\pgfPT@data@Z@ht{\vfil\resizebox{\pgfPT@data@Z@natwd}{\height}{\pgfPT@printnum{57}\ -\ \pgfPT@printnum{71}}\vfil}%
                        \else%
                        \vbox to\pgfPT@data@Z@ht{\vfil\pgfPT@printnum{57}\ -\ \pgfPT@printnum{71}\vfil}%
                        \fi%
                    \else%
                        \vbox to\pgfPT@data@Z@ht{\vfil\pgfPT@printnum{57--71}\vfil}%
                    \fi%
                    };}%
            \fi%
        \fi%
        \ifpgfPT@name\pgfPT@setlabels[\pgfPTlanguages]{La}%
            \edef\pgfPT@tmp@label@defaultLanguage{}\edef\pgfPT@tmp@labels@otherLanguages{}\pgfPT@counta=0\relax%
            \@for\pgfPT@tmp:=\pgfPTlanguages\do{%
                \ifnum\pgfPT@counta=0\relax%
                    \edef\pgfPT@tmp@label@defaultLanguage{\csname pgfPT@labels@La@\pgfPT@tmp\endcsname}%
                \else%
                    \edef\pgfPT@tmp@labels@otherLanguages{\pgfPT@tmp@labels@otherLanguages\hbox to \pgfPTcellwd{\hfil\csname pgfPT@labels@La@\pgfPT@tmp\endcsname\hfil}\vskip-1pt}%
                \fi%
                \advance\pgfPT@counta by 1\relax%
                }%
            \node[font=\pgfPTotherLangFont,text=\pgfPTnamecolor,text width=\pgfPTcellwd,text centered,inner xsep=0pt] at%
            ([yshift=-.5*\pgfPTcellht]xLa)%
            {\mbox{\pgfPTnamefont\pgfPT@tmp@label@defaultLanguage}\ifnum\pgfPT@counta>1\\ [-1pt]\color{\pgfPTotherLangColor}\pgfPT@tmp@labels@otherLanguages\fi};%
        \fi%
    \fi%
    \global\pgfPT@drawLaAcfalse%
    \foreach \Z in \pgfPT@@cellslist {%
        \ifnum\Z=104\global\pgfPT@drawLaActrue\breakforeach\fi%
    }%
    \edef\pgfPT@teststrb{\pgfPTcells}%
    \edef\pgfPT@teststra{G4}\ifx\pgfPT@teststra\pgfPT@teststrb\pgfPT@drawLaAcfalse\fi%
    \edef\pgfPT@teststra{G3}\ifx\pgfPT@teststra\pgfPT@teststrb\pgfPT@drawLaActrue\fi%
    \edef\pgfPT@teststra{P7}\ifx\pgfPT@teststra\pgfPT@teststrb\pgfPT@drawLaActrue\edef\pgfPT@@cellslist{\pgfPT@cells@PVIIwAc}\fi%
    \edef\pgfPT@teststra{Ac}\ifx\pgfPT@teststra\pgfPT@teststrb\pgfPT@drawLaAcfalse\edef\pgfPT@@cellslist{\pgfPT@cells@actinoids}\fi%
    \edef\pgfPT@teststra{spd}\ifx\pgfPT@teststra\pgfPT@teststrb\pgfPT@drawLaActrue\fi%
    \edef\pgfPT@teststra{d}\ifx\pgfPT@teststra\pgfPT@teststrb\pgfPT@drawLaActrue\fi%
    \ifpgfPT@drawLaAc%
        \ifpgfPTis@backcolorsolid\relax\else\pgfPT@processbackcolor{89}\fi%
        \draw[fill=cpgfPTTMP,line width=\pgfPTcelllinewd,draw=\pgfPTcelllinecolor] (xAc) rectangle ++(\pgfPTcellwd,-\pgfPTcellht);
        \edef\pgfPT@teststrb{\pgfPTbcs}%
        \edef\pgfPT@teststra{PS}\ifx\pgfPT@teststra\pgfPT@teststrb\pgfPT@processbackcolor{93}\fill[cpgfPTTMP] ([xshift={4/15*\pgfPTcellwd}]xAc) rectangle ++(\pgfPTcellwd*11/15,-\pgfPTcellht);\draw (xAc) -- ++(\pgfPTcellwd,0);\draw ([yshift=-\pgfPTcellht]xAc) -- ++(\pgfPTcellwd,0);\fi%
        \edef\pgfPT@teststra{Blocks}\ifx\pgfPT@teststra\pgfPT@teststrb\pgfPT@processbackcolor{90}\fill[cpgfPTTMP] ([xshift={1/15*\pgfPTcellwd}]xAc) rectangle ++(\pgfPTcellwd*14/15,-\pgfPTcellht);\draw (xAc) -- ++(\pgfPTcellwd,0);\draw ([yshift=-\pgfPTcellht]xAc) -- ++(\pgfPTcellwd,0);\fi%
        \ifpgfPT@Z%
            \ifpgfZuseboxwidth{\pgfPTZfont\pgfPTnumberfont%
            \ifpgfPT@zhnumbers@Z\let\pgfPT@printnum\zhnumber%
                \pgfmathparse{width("\pgfPT@printnum{89}\ -\ \pgfPT@printnum{103}")}\pgfmathsetlength{\pgfPT@data@Z@natwd}{\pgfmathresult}%
                \ifdim\pgfPT@data@Z@natwd>\pgfPT@data@Z@wd\relax%
                    \pgfmathparse{\pgfPT@data@Z@wd-2*\pgfPTZspace-.3333em}\pgfmathsetlength{\pgfPT@data@Z@natwd}{\pgfmathresult}%
                    \node[fill=\pgfPTZback,font=\pgfPTZfont,text=\pgfPTZcolor,align=\pgfPTZalign,text width=\pgfPT@data@Z@wd]%
                        at ([xshift=.5*\@pgfPT@Zxshift,yshift=-.5*\@pgfPT@Zyshift]xAc) {\vbox to\pgfPT@data@Z@ht{\vfil\hspace{\pgfPTZspace}\resizebox{\pgfPT@data@Z@natwd}{\height}{\pgfPT@printnum{89}\ -\ \pgfPT@printnum{103}}\hspace{\pgfPTZspace}\vfil}};%
                \else%
                    \node[fill=\pgfPTZback,font=\pgfPTZfont,text=\pgfPTZcolor,align=\pgfPTZalign,text width=\pgfPT@data@Z@wd]%
                        at ([xshift=.5*\@pgfPT@Zxshift,yshift=-.5*\@pgfPT@Zyshift]xAc) {\vbox to\pgfPT@data@Z@ht{\vfil\hspace{\pgfPTZspace}\pgfPT@printnum{89}\ -\ \pgfPT@printnum{103}\hspace{\pgfPTZspace}\vfil}};%
                \fi%
            \else\let\pgfPT@printnum\relax%
                \node[fill=\pgfPTZback,font=\pgfPTZfont,text=\pgfPTZcolor,align=\pgfPTZalign,text width=\pgfPT@data@Z@wd]%
                    at ([xshift=.5*\@pgfPT@Zxshift,yshift=-.5*\@pgfPT@Zyshift]xAc) {\vbox to\pgfPT@data@Z@ht{\vfil\hspace{\pgfPTZspace}\pgfPT@printnum{89--103}\hspace{\pgfPTZspace}\vfil}};%
            \fi%
            }%
            \else{%
                \ifpgfPT@zhnumbers@Z\let\pgfPT@printnum\zhnumber%
                    \pgfPTZfont\pgfPTnumberfont\pgfmathparse{width("\pgfPT@printnum{89}\ -\ \pgfPT@printnum{103}")}\pgfmathsetlength{\pgfPT@data@Z@natwd}{\pgfmathresult}%
                    \ifdim\pgfPT@data@Z@natwd>\pgfPT@data@Z@wd\relax\edef\@pgfPT@resizebox{1}\edef\pgfPT@zh@scale{1}%
                    \pgfmathparse{\pgfPT@data@Z@wd-1ex}\pgfmathsetlength{\pgfPT@data@Z@natwd}{\pgfmathresult}\else\edef\@pgfPT@resizebox{0}\fi%
                \else\let\pgfPT@printnum\relax%
                    \pgfPTZfont\pgfPTnumberfont\pgfmathparse{width("\pgfPT@printnum{89}\ --\ \pgfPT@printnum{103}")}\pgfmathsetlength{\pgfPT@data@Z@natwd}{\pgfmathresult}%
                    \ifx\pgfPT@lang@zh\undefined\relax\edef\pgfPT@zh@scale{1}\else\edef\pgfPT@zh@scale{.85}\fi%
                \fi%
                \node[fill=\pgfPTZback,font=\pgfPTZfont,text=\pgfPTZcolor,text width={\pgfPT@zh@scale*\pgfPT@data@Z@natwd},inner xsep=.5ex]%
                at ([xshift=.5*\@pgfPT@Zxshift,yshift=-.5*\@pgfPT@Zyshift]xAc) {%
                    \ifpgfPT@zhnumbers@Z%
                        \ifnum\@pgfPT@resizebox=1\relax%
                        \vbox to\pgfPT@data@Z@ht{\vfil\resizebox{\pgfPT@data@Z@natwd}{\height}{\pgfPT@printnum{89}\ -\ \pgfPT@printnum{103}}\vfil}%
                        \else%
                        \vbox to\pgfPT@data@Z@ht{\vfil\pgfPT@printnum{89}\ -\ \pgfPT@printnum{103}\vfil}%
                        \fi%
                    \else%
                        \vbox to\pgfPT@data@Z@ht{\vfil\pgfPT@printnum{89--103}\vfil}%
                    \fi%
                    };}%
            \fi%
        \fi%
        \ifpgfPT@name\pgfPT@setlabels[\pgfPTlanguages]{Ac}%
            \edef\pgfPT@tmp@label@defaultLanguage{}\edef\pgfPT@tmp@labels@otherLanguages{}\pgfPT@counta=0\relax%
            \@for\pgfPT@tmp:=\pgfPTlanguages\do{%
                \ifnum\pgfPT@counta=0\relax%
                    \edef\pgfPT@tmp@label@defaultLanguage{\csname pgfPT@labels@Ac@\pgfPT@tmp\endcsname}%
                \else%
                    \edef\pgfPT@tmp@labels@otherLanguages{\pgfPT@tmp@labels@otherLanguages\hbox to \pgfPTcellwd{\hfil\csname pgfPT@labels@Ac@\pgfPT@tmp\endcsname\hfil}\vskip-1pt}%
                \fi%
                \advance\pgfPT@counta by 1\relax%
                }%
            \node[font=\pgfPTotherLangFont,text=\pgfPTnamecolor,text width=\pgfPTcellwd,text centered,inner xsep=0pt] at%
            ([yshift=-.5*\pgfPTcellht]xAc)%
            {\mbox{\pgfPTnamefont\pgfPT@tmp@label@defaultLanguage}\ifnum\pgfPT@counta>1\\ [-1pt]\color{\pgfPTotherLangColor}\pgfPT@tmp@labels@otherLanguages\fi};%
        \fi%
    \fi%
\else% IUPACMMXIX false
    \edef\pgfPT@teststrb{\pgfPTcells}%
    \edef\pgfPT@teststra{lanthanoids}\ifx\pgfPT@teststra\pgfPT@teststrb\pgfPT@drawLaAcfalse\xdef\pgfPT@@cellslist{\pgfPT@cells@La}\fi%
    \edef\pgfPT@teststra{actinoids}\ifx\pgfPT@teststra\pgfPT@teststrb\pgfPT@drawLaAcfalse\xdef\pgfPT@@cellslist{\pgfPT@cells@Ac}\fi%
\fi%
% drawing the cells of the Periodic Table ----->
\foreach \Z in \pgfPT@@cellslist {%
    \ifpgfPTis@backcolorsolid\relax\else\pgfPT@processbackcolor{\Z}\fi%
    \pgfPT@getdata{\Z}%
    % drawing the cell
    \draw[fill=cpgfPTTMP,line width=\pgfPTcelllinewd,draw=\pgfPTcelllinecolor] (\Z) rectangle ++(\pgfPTcellwd,-\pgfPTcellht);
    % append the Z box
    \ifpgfPT@Z%
        \ifpgfZuseboxwidth{\pgfPTZfont\pgfPTnumberfont%
            \ifpgfPT@zhnumbers@Z\let\pgfPT@printnum\zhnumber%
                \pgfmathparse{width("\pgfPT@printnum{\Z}")}\pgfmathsetlength{\pgfPT@data@Z@natwd}{\pgfmathresult}%
                \ifdim\pgfPT@data@Z@natwd>\pgfPT@data@Z@wd\relax%
                    \pgfmathparse{\pgfPT@data@Z@wd-2*\pgfPTZspace-.3333em}\pgfmathsetlength{\pgfPT@data@Z@natwd}{\pgfmathresult}%
                    \node[fill=\pgfPTZback,font=\pgfPTZfont,text=\pgfPTZcolor,align=\pgfPTZalign,text width=\pgfPT@data@Z@wd]%
                        at ([xshift=.5*\pgfPT@data@Z@x,yshift=-.5*\pgfPT@data@Z@y]\Z)
                        {\vbox to\pgfPT@data@Z@ht{\vfil\hspace{\pgfPTZspace}\resizebox{\pgfPT@data@Z@natwd}{\height}{\pgfPT@printnum{\Z}}\hspace{\pgfPTZspace}\vfil}};
                \else%
                    \node[fill=\pgfPTZback,font=\pgfPTZfont,text=\pgfPTZcolor,align=\pgfPTZalign,text width=\pgfPT@data@Z@wd]%
                        at ([xshift=.5*\pgfPT@data@Z@x,yshift=-.5*\pgfPT@data@Z@y]\Z)
                        {\vbox to\pgfPT@data@Z@ht{\vfil\hspace{\pgfPTZspace}\pgfPT@printnum{\Z}\hspace{\pgfPTZspace}\vfil}};
                \fi%
            \else\let\pgfPT@printnum\relax%
                \node[fill=\pgfPTZback,font=\pgfPTZfont,text=\pgfPTZcolor,align=\pgfPTZalign,text width=\pgfPT@data@Z@wd]%
                    at ([xshift=.5*\pgfPT@data@Z@x,yshift=-.5*\pgfPT@data@Z@y]\Z)
                    {\vbox to\pgfPT@data@Z@ht{\vfil\hspace{\pgfPTZspace}\pgfPT@printnum{\Z}\hspace{\pgfPTZspace}\vfil}};
            \fi%
            }%
        \else%
            {%
            \ifpgfPT@zhnumbers@Z\let\pgfPT@printnum\zhnumber%
                \pgfPTZfont\pgfPTnumberfont\pgfmathparse{width("\pgfPT@printnum{\Z}")}\pgfmathsetlength{\pgfPT@data@Z@natwd}{\pgfmathresult}%
                \ifdim\pgfPT@data@Z@natwd>\pgfPT@data@Z@wd\relax\edef\@pgfPT@resizebox{1}%
                \pgfmathparse{\pgfPT@data@Z@wd-1ex}\pgfmathsetlength{\pgfPT@data@Z@natwd}{\pgfmathresult}\else\edef\@pgfPT@resizebox{0}\fi%
            \else\let\pgfPT@printnum\relax%
                \pgfPTZfont\pgfPTnumberfont\pgfmathparse{width("\pgfPT@printnum{\Z}")}\pgfmathsetlength{\pgfPT@data@Z@natwd}{\pgfmathresult}%
            \fi%
            \node[fill=\pgfPTZback,font=\pgfPTZfont,text=\pgfPTZcolor,text width=\pgfPT@data@Z@natwd,inner xsep=.5ex]%
            at ([xshift=\pgfPT@data@Z@x+.5*\@pgfPT@Zxshift,yshift=-\pgfPT@data@Z@y-.5*\@pgfPT@Zyshift]\Z) {%
                    \ifpgfPT@zhnumbers@Z%
                        \ifnum\@pgfPT@resizebox=1\relax%
                        \vbox to\pgfPT@data@Z@ht{\vfil\resizebox{\pgfPT@data@Z@natwd}{\height}{\pgfPT@printnum{\Z}}\vfil}%
                        \else%
                        \vbox to\pgfPT@data@Z@ht{\vfil\pgfPT@printnum{\Z}\vfil}%
                        \fi%
                    \else%
                        \vbox to\pgfPT@data@Z@ht{\vfil\pgfPT@printnum{\Z}\vfil}%
                    \fi%
                    };}%
        \fi%
    \fi%
    % the Chemical Symbol
    \ifpgfPT@CS%
        \ifx\pgfPT@Zlinkstrue\undefined\relax% new in v2.1.6
            \pgfPT@extract@rgb@fill{\pgfPT@data@cor}%
            \node[font=\pgfPTCSfont,text width=\pgfPT@data@CS@wd,text centered]%
            at ([xshift={\pgfPT@data@CS@x},yshift={-\pgfPT@data@CS@y}]\Z)%
            {\vbox to\pgfPT@data@CS@ht{\vfil\pgfPT@box@zerodepth{\pgfPT@lt[\pgfPTCSolwd](\pgfPT@data@CS)(\pgfPT@rs,\pgfPT@gs,\pgfPT@bs)(\pgfPT@rf,\pgfPT@gf,\pgfPT@bf)(\pgfPT@CS@txt@render)}\vfil}};%
        \else% Z links
            \edef\pgfPT@currZlink{\csname pgfPT@@cells\@roman{\Z}@link\endcsname}%
            \expandafter\ifx\csname pgfPT@@cells\@roman{\Z}@link\endcsname\pgfPT@currZlink\relax% link
            \pgfPT@extract@rgb@fill{\pgfPT@data@cor}%
%            \ifx\pgfPT@relax\pgfPTZlinkscolor\relax%
%            \pgfPT@extract@rgb@fill{\pgfPT@data@cor}\else%
%            \pgfPT@extract@rgb@fill{\pgfPTZlinkscolor}\fi%
            {\def\pgfPTCSolwd{\pgfPTZlinksolwd}%
            \ifx\pgfPT@relax\pgfPTZlinkscolor\relax\else%
            \pgfPT@extract@rgb@stroke{\pgfPTZlinkscolor}%
            \fi%
            \node[font=\pgfPTCSfont,text width=\pgfPT@data@CS@wd,text centered]%
            at ([xshift={\pgfPT@data@CS@x},yshift={-\pgfPT@data@CS@y}]\Z)%
            {\vbox to\pgfPT@data@CS@ht{\vfil\pgfPT@box@zerodepth{%
            \pgfPT@hyperref[\pgfPT@currZlink]\pgfPT@lt[\pgfPTCSolwd](\pgfPT@data@CS)(\pgfPT@rs,\pgfPT@gs,\pgfPT@bs)(\pgfPT@rf,\pgfPT@gf,\pgfPT@bf)(\pgfPT@CS@txt@render)\relax%
            }\vfil}};}%
            \else% no link
            \pgfPT@extract@rgb@fill{\pgfPT@data@cor}%
            \node[font=\pgfPTCSfont,text width=\pgfPT@data@CS@wd,text centered]%
            at ([xshift={\pgfPT@data@CS@x},yshift={-\pgfPT@data@CS@y}]\Z)%
            {\vbox to\pgfPT@data@CS@ht{\vfil\pgfPT@box@zerodepth{%
            \pgfPT@lt[\pgfPTCSolwd](\pgfPT@data@CS)(\pgfPT@rs,\pgfPT@gs,\pgfPT@bs)(\pgfPT@rf,\pgfPT@gf,\pgfPT@bf)(\pgfPT@CS@txt@render)%
            }\vfil}};%
            \fi%
        \fi%
    \fi%
    % the Name
    \ifpgfPT@name\relax%
        \pgfPT@setnames[\pgfPTlanguages]{\Z}%
            \edef\pgfPT@tmp@name@defaultLanguage{}\edef\pgfPT@tmp@name@otherLanguages{}\pgfPT@counta=0\relax%
            \pgfmathsetlength{\pgfPT@boxwd}{\pgfPT@data@name@wd}%
            \pgfPTotherLangFont\selectfont\pgfmathsetlength{\pgfPT@dima}{.25*\f@size}%
            \@for\pgfPT@tmp:=\pgfPTlanguages\do{%
                \ifnum\pgfPT@counta=0\relax%
                    \edef\pgfPT@tmp@name@defaultLanguage{\csname pgfPTdata@name@\@roman{\Z}@\pgfPT@tmp\endcsname}%
                    \ifx\pgfPTNames\pgfPT@true\relax\edef\pgfPT@tmp@name@defaultLanguage{\expandafter\pgfPT@namec@p\pgfPT@tmp@name@defaultLanguage\relax}\else%
                    \ifx\pgfPTNames\pgfPT@TRUE\relax\edef\pgfPT@tmp@name@defaultLanguage{\pgfPT@makeUppercase\pgfPT@tmp@name@defaultLanguage\relax}\fi\fi%
                \else%
                    \edef\pgfPT@tmp@n@me{\csname pgfPTdata@name@\@roman{\Z}@\pgfPT@tmp\endcsname}%
                    \ifx\pgfPTNames\pgfPT@true\relax\edef\pgfPT@tmp@n@me{\expandafter\pgfPT@namec@p\pgfPT@tmp@n@me\relax}\else%
                    \ifx\pgfPTNames\pgfPT@TRUE\relax\edef\pgfPT@tmp@n@me{\pgfPT@makeUppercase\pgfPT@tmp@n@me\relax}\fi\fi%
                    \edef\pgfPT@tmp@name@otherLanguages{\pgfPT@tmp@name@otherLanguages\vskip-\pgfPT@dima\hbox to %
                    \pgfPT@boxwd{\hfil\mbox{\pgfPT@box@zerodepth{\pgfPT@tmp@n@me}}\hfil}}%
                \fi%
                \advance\pgfPT@counta by 1\relax%
                }%
            \ifnum\pgfPT@counta=1\relax% one language
            \pgfmathsetlength{\pgfPT@dimb}{.5*\pgfPT@data@name@ht}%
            \node[font=\pgfPTnamefont,text=\pgfPTnamecolor,text width=\pgfPT@data@name@wd,align=\pgfPTnamealign] at%
            ([xshift=\pgfPT@data@name@x,yshift=-\pgfPT@data@name@y]\Z)%
            {\vbox to \pgfPT@data@name@ht{\vfil\vbox to \pgfPT@dimb{\vfil\pgfPT@box@smash{\pgfPT@tmp@name@defaultLanguage}}\vfil}};%
            \else% more languages
            \pgfmathsetlength{\pgfPT@boxht}{.333*\pgfPT@data@name@ht}%
            \node[font=\pgfPTnamefont,text=\pgfPTnamecolor,text width=\pgfPT@data@name@wd,align=\pgfPTnamealign] (theName) at%
            ([xshift=\pgfPT@data@name@x,yshift=-\pgfPT@data@name@y]\Z)%
            {\vbox to \pgfPT@boxht{\vfil\pgfPT@box@smash{\pgfPT@tmp@name@defaultLanguage}}};%
            \ifnum\pgfPT@counta>2\relax%
                \pgfmathsetlength{\pgfPT@boxht}{.667*\pgfPT@data@name@ht}%
                \pgfmathsetlength{\pgfPT@dimb}{.5*\pgfPT@data@name@ht}%
                \node[font=\pgfPTotherLangFont,text=\pgfPTotherLangColor,text width=\pgfPT@data@name@wd,align=\pgfPTnamealign,below] at ([yshift={-.2*\pgfPT@dima}]theName.south)%
                {\vbox to \pgfPT@boxht{\vfil\vbox to \pgfPT@dimb{\vfil\pgfPT@tmp@name@otherLanguages}\vfil\vfil}};%
            \else%
                \pgfmathsetlength{\pgfPT@boxht}{.333*\pgfPT@data@name@ht}%
                \pgfmathsetlength{\pgfPT@dimb}{.3*\pgfPT@data@name@ht}%
                \node[font=\pgfPTotherLangFont,text=\pgfPTotherLangColor,text width=\pgfPT@data@name@wd,align=\pgfPTnamealign,below] at ([yshift={-.2*\pgfPT@dima}]theName.south)%
                {\vbox to \pgfPT@boxht{\vfil\vbox to \pgfPT@dimb{\vfil\pgfPT@tmp@name@otherLanguages}\vfil}};%
            \fi%
            \fi%
    \fi%
    % the Atomic weight
    \ifpgfPT@Ar%
            \ifnum\pgfPTArprecision<0\relax%
                \node[font=\pgfPTArfont,text=\pgfPTArcolor,text width=\pgfPT@data@Ar@wd,text centered]%
                at ([xshift=\pgfPT@data@Ar@x,yshift=-\pgfPT@data@Ar@y]\Z) {\vbox to\pgfPT@data@Ar@ht{\vfil\pgfPT@box@zerodepth{\pgfPT@formatnumber{-1}{\pgfPT@data@Ar}}\vfil}};% changed in v2.1.5
            \else\ifnum\pgfPTArprecision>3\relax%
                \node[font=\pgfPTArfont,text=\pgfPTArcolor,text width=\pgfPT@data@Ar@wd,text centered]%
                at ([xshift=\pgfPT@data@Ar@x,yshift=-\pgfPT@data@Ar@y]\Z) {\vbox to\pgfPT@data@Ar@ht{\vfil\pgfPT@box@zerodepth{\pgfPT@formatnumber{-1}{\pgfPT@data@Ar}}\vfil}};% % changed in v2.1.5
            \else%
                \node[font=\pgfPTArfont,text=\pgfPTArcolor,text width=\pgfPT@data@Ar@wd,text centered]%
                at ([xshift=\pgfPT@data@Ar@x,yshift=-\pgfPT@data@Ar@y]\Z) {\vbox to\pgfPT@data@Ar@ht{\vfil\pgfPT@box@zerodepth{\pgfPT@formatnumber{\pgfPTArprecision}{\pgfPT@data@Ar}}\vfil}};%
            \fi\fi%\fi%
    \fi%
    \ifpgfPT@Arstar% changed in v2.1.5
        \ifx\pgfPTdecimalseparator\pgfPT@dot\relax%
        \node[font=\pgfPTArfont,%
            text=\pgfPTArcolor,text width=\pgfPT@data@Arstar@wd,text centered]%
            at ([xshift=\pgfPT@data@Arstar@x,yshift=-\pgfPT@data@Arstar@y]\Z) %
            {\setbox0=\hbox{\pgfPT@data@Arstar}\ifdim\wd0>.95\textwidth\relax%
            \vbox to\pgfPT@data@Arstar@ht{\vfil\resizebox{.95\textwidth}{!}{\pgfPT@box@zerodepth{\pgfPT@data@Arstar}}\vfil}%
            \else\vbox to\pgfPT@data@Arstar@ht{\vfil\pgfPT@box@zerodepth{\pgfPT@data@Arstar}\vfil}\fi%
            };%
        \else% replace . in value1/2 by user decimal separator and the , by ; in [value1,value2] if it is the case
        \node[font=\pgfPTArfont,%
            text=\pgfPTArcolor,text width=\pgfPT@data@Arstar@wd,text centered]%
            at ([xshift=\pgfPT@data@Arstar@x,yshift=-\pgfPT@data@Arstar@y]\Z) %
            {\setbox0=\hbox{\expandafter\pgfPT@formatArstar\pgfPT@data@Arstar\relax}\ifdim\wd0>.95\textwidth\relax%
            \vbox to\pgfPT@data@Arstar@ht{\vfil\resizebox{.95\textwidth}{!}{\pgfPT@box@zerodepth{\usebox0}}\vfil}%
            \else\vbox to\pgfPT@data@Arstar@ht{\vfil\pgfPT@box@zerodepth{\usebox0}\vfil}\fi%
            };%
        \fi%
    \fi%
    % radioactivity
    \ifpgfPT@radio\relax\ifnum\pgfPT@data@radio=1\relax%
        \node[text width=\pgfPT@data@radio@wd,text centered,font=\pgfPTradiofont,color=\pgfPTradiofontcolor] at ([xshift=\pgfPT@data@radio@x,yshift=-\pgfPT@data@radio@y]\Z)%
        {\vbox to\pgfPT@data@radio@ht{\vfil\ifpgfPT@radiosymbolisimage\usebox{\pgfPT@radiobox}\else\pgfPT@radiobox@text\fi\vfil}};%
    \fi\fi%
    \ifpgfPT@eConfign\relax%
        \begin{pgfinterruptpicture}%
        \setbox0=\hbox{\pgfPT@set@econfig[n]{\pgfPT@data@eConfign}}%
        \global\setbox\pgfPT@econfbox\box0%
        \end{pgfinterruptpicture}%
        \node[text width=\pgfPT@data@eConfign@wd,text centered,font=\pgfPTeConfignfont,text=\pgfPTeConfigncolor] at ([xshift=\pgfPT@data@eConfign@x,yshift=-\pgfPT@data@eConfign@y]\Z)%
        {\vbox to \pgfPT@data@eConfign@ht{\vfil\pgfPT@box@zerodepth{\usebox{\pgfPT@econfbox}}\vfil\vfil}};%
        \fi%
    % eConfignl -> Electronic Configuration (increasing n+l)
    \ifpgfPT@eConfignl\relax%
        \begin{pgfinterruptpicture}%
        \setbox0=\hbox{\pgfPT@set@econfig[]{\pgfPT@data@eConfignl}}%
        \global\setbox\pgfPT@econfbox\box0%
        \end{pgfinterruptpicture}%
        \node[text width=\pgfPT@data@eConfignl@wd,text centered,font=\pgfPTeConfignlfont,text=\pgfPTeConfignlcolor] at ([xshift=\pgfPT@data@eConfignl@x,yshift=-\pgfPT@data@eConfignl@y]\Z)%
        {\vbox to \pgfPT@data@eConfignl@ht{\vfil\pgfPT@box@zerodepth{\usebox{\pgfPT@econfbox}}\vfil\vfil}};%
    \fi%
    % DiscC -> Discover Country
    \ifpgfPT@DiscC\relax%
        \pgfPT@set@country{\pgfPT@data@DiscC}%
            \pgfmathsetlength{\pgfPT@boxht}{.8*\pgfPT@data@DiscC@ht}%
            \node[text width=\pgfPT@data@DiscC@wd,text centered] at ([xshift=\pgfPT@data@DiscC@x,yshift=-\pgfPT@data@DiscC@y]\Z)%
            {\vbox to\pgfPT@data@DiscC@ht{\vfil\includegraphics[height=\pgfPT@boxht]{flags/\pgfPT@country@flag.pdf}\vfil\vfil}};%
    \fi%
    % R -> Atomic Radius (Empirycal)
    \ifpgfPT@R\relax%
        \node[font=\pgfPTRfont,text=\pgfPTRcolor,text width=\pgfPT@data@R@wd,text centered]%
                at ([xshift=\pgfPT@data@R@x,yshift=-\pgfPT@data@R@y]\Z) {\vbox to\pgfPT@data@R@ht{\vfil%
                \edef\pgfPT@test{\pgfPT@data@R}\ifx\pgfPT@test\pgfPT@na\relax\vbox to0pt{---}\else% new in v2.1.6
                \pgfPT@data@R\fi\vfil}};%
    \fi%
    % Rcov -> Covalente Radius
    \ifpgfPT@Rcov\relax%
        \node[font=\pgfPTRcovfont,text=\pgfPTRcovcolor,text width=\pgfPT@data@Rcov@wd,text centered]%
                at ([xshift=\pgfPT@data@Rcov@x,yshift=-\pgfPT@data@Rcov@y]\Z) {\vbox to\pgfPT@data@Rcov@ht{\vfil%
                \edef\pgfPT@test{\pgfPT@data@Rcov}\ifx\pgfPT@test\pgfPT@na\relax\vbox to0pt{---}\else% new in v2.1.6
                \pgfPT@data@Rcov\fi\vfil}};%
    \fi%
    % Rion -> Ionic Radius
    \ifpgfPT@Rion\relax%
        \node[font=\pgfPTRionfont,text=\pgfPTRioncolor,text width=\pgfPT@data@Rion@wd,text centered]%
                at ([xshift=\pgfPT@data@Rion@x,yshift=-\pgfPT@data@Rion@y]\Z) {%
                    \setbox0=\hbox{\pgfPT@data@Rion}\pgfmathsetlength{\pgfPT@dima}{\wd0}%
                    \ifdim\pgfPT@dima>.975\linewidth\relax%
                        \vbox to\pgfPT@data@Rion@ht{\vfil\pgfPT@box@zerodepth{\resizebox{.95\linewidth}{\height}{\scalebox{.75}{\pgfPT@data@Rion}}}\vfil}%
                    \else%
                        \vbox to\pgfPT@data@Rion@ht{\vfil\pgfPT@box@zerodepth{\scalebox{.75}{\pgfPT@data@Rion}}\vfil}%
                    \fi%
                    };%
    \fi%
    % Ei -> First Ionization Energy
    \ifpgfPT@Ei\relax%
            \ifnum\pgfPTEprecision<0\relax%
                \node[font=\pgfPTEifont,text=\pgfPTEicolor,text width=\pgfPT@data@Ei@wd,text centered]%
                    at ([xshift=\pgfPT@data@Ei@x,yshift=-\pgfPT@data@Ei@y]\Z) {\vbox to\pgfPT@data@Ei@ht{\vfil\pgfPT@formatnumber{-1}{\pgfPT@data@Ei}\vfil}};% changed in v2.1.5
            \else\ifnum\pgfPTEprecision>2\relax%0
                \node[font=\pgfPTEifont,text=\pgfPTEicolor,text width=\pgfPT@data@Ei@wd,text centered]%
                    at ([xshift=\pgfPT@data@Ei@x,yshift=-\pgfPT@data@Ei@y]\Z) {\vbox to\pgfPT@data@Ei@ht{\vfil\pgfPT@formatnumber{-1}{\pgfPT@data@Ei}\vfil}};% changed in v2.1.5
            \else%
                \node[font=\pgfPTEifont,text=\pgfPTEicolor,text width=\pgfPT@data@Ei@wd,text centered]%
                    at ([xshift=\pgfPT@data@Ei@x,yshift=-\pgfPT@data@Ei@y]\Z) {\vbox to\pgfPT@data@Ei@ht{\vfil\pgfPT@formatnumber{\pgfPTEprecision}{\pgfPT@data@Ei}\vfil}};%
            \fi\fi%
    \fi%
    % eneg -> Electronegativity (Pauling)
    \ifpgfPT@eneg\relax%
        \node[font=\pgfPTenegfont,text=\pgfPTenegcolor,text width=\pgfPT@data@eneg@wd,text centered]%
                at ([xshift=\pgfPT@data@eneg@x,yshift=-\pgfPT@data@eneg@y]\Z) {\vbox to\pgfPT@data@eneg@ht{\vfil%
                \edef\pgfPT@test{\pgfPT@data@eneg}\ifx\pgfPT@test\pgfPT@na\relax\vbox to0pt{---}\else% new in v2.1.6
                \pgfPT@formatnumber{-1}{\pgfPT@data@eneg}\fi\vfil}};% fixed replacing decimal separator in v2.1.6
    \fi%
    % eaff -> Electroaffinity
    \ifpgfPT@eaff\relax%
            \ifnum\pgfPTEprecision<0\relax%
                \node[font=\pgfPTeafffont,text=\pgfPTeaffcolor,text width=\pgfPT@data@eaff@wd,text centered]%
                    at ([xshift=\pgfPT@data@eaff@x,yshift=-\pgfPT@data@eaff@y]\Z) {\vbox to\pgfPT@data@eaff@ht{\vfil%
                    \edef\pgfPT@test{\pgfPT@data@eaff}\ifx\pgfPT@test\pgfPT@na\relax\vbox to0pt{---}\else% new in v2.1.6
                    \pgfPT@formatnumber{-1}{\pgfPT@data@eaff}\fi\vfil}};% changed in v2.1.5
            \else\ifnum\pgfPTEprecision>1\relax%
                \node[font=\pgfPTeafffont,text=\pgfPTeaffcolor,text width=\pgfPT@data@eaff@wd,text centered]%
                    at ([xshift=\pgfPT@data@eaff@x,yshift=-\pgfPT@data@eaff@y]\Z) {\vbox to\pgfPT@data@eaff@ht{\vfil%
                    \edef\pgfPT@test{\pgfPT@data@eaff}\ifx\pgfPT@test\pgfPT@na\relax\vbox to0pt{---}\else% new in v2.1.6
                    \pgfPT@formatnumber{-1}{\pgfPT@data@eaff}\fi\vfil}};% changed in v2.1.5
            \else%
                \node[font=\pgfPTeafffont,text=\pgfPTeaffcolor,text width=\pgfPT@data@eaff@wd,text centered]%
                    at ([xshift=\pgfPT@data@eaff@x,yshift=-\pgfPT@data@eaff@y]\Z) {\vbox to\pgfPT@data@eaff@ht{\vfil%
                    \edef\pgfPT@test{\pgfPT@data@eaff}\ifx\pgfPT@test\pgfPT@na\relax\vbox to0pt{---}\else% new in v2.1.6
                    \pgfPT@formatnumber{\pgfPTEprecision}{\pgfPT@data@eaff}\fi\vfil}};%
            \fi\fi%
    \fi%
    % O -> Oxidation States
    \ifpgfPT@O\relax%
        \ifpgfPTORoman% new in v2.1.1
            \ifnum\Z=25\relax% Mn
            \node[font=\pgfPTOfont,text=\pgfPTOcolor,text width=\pgfPT@data@O@wd,text centered]%
                at ([xshift=\pgfPT@data@O@x,yshift=-\pgfPT@data@O@y]\Z) %
                {\vbox to\pgfPT@data@O@ht{\vfil\pgfPT@box@zerodepth{\resizebox{.95\linewidth}{\height}{\pgfPT@data@ORoman}}\vfil}};%
            \else%
            \node[font=\pgfPTOfont,text=\pgfPTOcolor,text width=\pgfPT@data@O@wd,text centered]%
                at ([xshift=\pgfPT@data@O@x,yshift=-\pgfPT@data@O@y]\Z) {\vbox to\pgfPT@data@O@ht{\vfil%
                    \def\pgfPT@test{\pgfPT@data@ORoman}\expandafter\ifx\pgfPT@test\pgfPT@na\relax\vbox to0pt{---}\else% new in v2.1.6
                    \pgfPT@box@zerodepth{\pgfPT@data@ORoman}\fi\vfil}};%
            \fi%
        \else%
            \ifnum\Z=25\relax% Mn
            \node[font=\pgfPTOfont,text=\pgfPTOcolor,text width=\pgfPT@data@O@wd,text centered]%
                at ([xshift=\pgfPT@data@O@x,yshift=-\pgfPT@data@O@y]\Z) %
                {\vbox to\pgfPT@data@O@ht{\vfil\pgfPT@box@zerodepth{\resizebox{.95\linewidth}{\height}{\pgfPT@data@O}}\vfil}};%
            \else%
            \node[font=\pgfPTOfont,text=\pgfPTOcolor,text width=\pgfPT@data@O@wd,text centered]%
                at ([xshift=\pgfPT@data@O@x,yshift=-\pgfPT@data@O@y]\Z) {\vbox to\pgfPT@data@O@ht{\vfil%
                    \def\pgfPT@test{\pgfPT@data@O}\expandafter\ifx\pgfPT@test\pgfPT@na\relax\vbox to0pt{---}\else% new in v2.1.6
                    \pgfPT@box@zerodepth{\pgfPT@data@O}\fi\vfil}};%
            \fi%
        \fi%
    \fi%
    % Tmelt -> Melting Point (Kelvin)
    \ifpgfPT@Tmelt\relax%
            \ifnum\pgfPTTprecision<0\relax%
                \node[font=\pgfPTTmeltfont,text=\pgfPTTmeltcolor,text width=\pgfPT@data@Tmelt@wd,text centered]%
                    at ([xshift=\pgfPT@data@Tmelt@x,yshift=-\pgfPT@data@Tmelt@y]\Z) {%
                    \setbox0=\hbox{\pgfPT@data@Tmelt}\pgfmathsetlength{\pgfPT@dima}{\wd0}%
                    \ifdim\pgfPT@dima>.975\linewidth\relax%
                        \vbox to\pgfPT@data@Tmelt@ht{\vfil\resizebox{.95\linewidth}{\height}{\pgfPT@formatnumber{-1}{\pgfPT@data@Tmelt}}\vfil}% changed in v2.1.5
                    \else%
                        \vbox to\pgfPT@data@Tmelt@ht{\vfil%
                        \edef\pgfPT@test{\pgfPT@data@Tmelt}\ifx\pgfPT@test\pgfPT@na\relax\vbox to0pt{---}\else% new in v2.1.6
                        \pgfPT@formatnumber{-1}{\pgfPT@data@Tmelt}\fi\vfil}% changed in v2.1.5
                    \fi%
                    };%
            \else\ifnum\pgfPTTprecision>4\relax%
                \node[font=\pgfPTTmeltfont,text=\pgfPTTmeltcolor,text width=\pgfPT@data@Tmelt@wd,text centered]%
                    at ([xshift=\pgfPT@data@Tmelt@x,yshift=-\pgfPT@data@Tmelt@y]\Z) {
                    \setbox0=\hbox{\pgfPT@formatnumber{-1}{\pgfPT@data@Tmelt}}\pgfmathsetlength{\pgfPT@dima}{\wd0}% changed in v2.1.5
                    \ifdim\pgfPT@dima>.975\linewidth\relax%
                        \vbox to\pgfPT@data@Tmelt@ht{\vfil\resizebox{.95\linewidth}{\height}{\pgfPT@formatnumber{-1}{\pgfPT@data@Tmelt}}\vfil}% changed in v2.1.5
                    \else%
                        \vbox to\pgfPT@data@Tmelt@ht{\vfil%
                        \edef\pgfPT@test{\pgfPT@data@Tmelt}\ifx\pgfPT@test\pgfPT@na\relax\vbox to0pt{---}\else% new in v2.1.6
                        \pgfPT@formatnumber{-1}{\pgfPT@data@Tmelt}\fi\vfil}% changed in v2.1.5
                    \fi%
                    };%
            \else%
                \node[font=\pgfPTTmeltfont,text=\pgfPTTmeltcolor,text width=\pgfPT@data@Tmelt@wd,text centered]%
                    at ([xshift=\pgfPT@data@Tmelt@x,yshift=-\pgfPT@data@Tmelt@y]\Z) {%
                    \setbox0=\hbox{\pgfPT@formatnumber{\pgfPTTprecision}{\pgfPT@data@Tmelt}}\pgfmathsetlength{\pgfPT@dima}{\wd0}%
                    \ifdim\pgfPT@dima>.95\linewidth\relax%
                        \vbox to\pgfPT@data@Tmelt@ht{\vfil\resizebox{.925\linewidth}{\height}{\usebox0}\vfil}%
                    \else%
                        \vbox to\pgfPT@data@Tmelt@ht{\vfil%
                        \edef\pgfPT@test{\pgfPT@data@Tmelt}\ifx\pgfPT@test\pgfPT@na\relax\vbox to0pt{---}\else% new in v2.1.6
                        \usebox0\fi\vfil}%
                    \fi%
                    };%
            \fi\fi%
    \fi%
    % TmeltC -> Melting Point (degrees Celsius)
    \ifpgfPT@TmeltC\relax%
            \ifnum\pgfPTTprecision<0\relax%
                \node[font=\pgfPTTmeltCfont,text=\pgfPTTmeltCcolor,text width=\pgfPT@data@TmeltC@wd,text centered]%
                    at ([xshift=\pgfPT@data@TmeltC@x,yshift=-\pgfPT@data@TmeltC@y]\Z) {%
                    \setbox0=\hbox{\pgfPT@formatnumber{-1}{\pgfPT@data@TmeltC}}\pgfmathsetlength{\pgfPT@dima}{\wd0}% changed in v2.1.5
                    \ifdim\pgfPT@dima>.95\linewidth\relax%
                        \vbox to\pgfPT@data@TmeltC@ht{\vfil\resizebox{.925\linewidth}{\height}{\pgfPT@formatnumber{-1}{\pgfPT@data@TmeltC}}\vfil}% changed in v2.1.5
                    \else%
                        \vbox to\pgfPT@data@TmeltC@ht{\vfil%
                        \edef\pgfPT@test{\pgfPT@data@TmeltC}\ifx\pgfPT@test\pgfPT@na\relax\vbox to0pt{---}\else% new in v2.1.6
                        \pgfPT@formatnumber{-1}{\pgfPT@data@TmeltC}\fi\vfil}% changed in v2.1.5
                    \fi%
                    };%
            \else\ifnum\pgfPTTprecision>4\relax%
                \node[font=\pgfPTTmeltCfont,text=\pgfPTTmeltCcolor,text width=\pgfPT@data@TmeltC@wd,text centered]%
                    at ([xshift=\pgfPT@data@TmeltC@x,yshift=-\pgfPT@data@TmeltC@y]\Z) {%
                    \setbox0=\hbox{\pgfPT@formatnumber{-1}{\pgfPT@data@TmeltC}}\pgfmathsetlength{\pgfPT@dima}{\wd0}% changed in v2.1.5
                    \ifdim\pgfPT@dima>.95\linewidth\relax%
                        \vbox to\pgfPT@data@TmeltC@ht{\vfil\resizebox{.925\linewidth}{\height}{\pgfPT@formatnumber{-1}{\pgfPT@data@TmeltC}}\vfil}% changed in v2.1.5
                    \else%
                        \vbox to\pgfPT@data@TmeltC@ht{\vfil%
                        \edef\pgfPT@test{\pgfPT@data@TmeltC}\ifx\pgfPT@test\pgfPT@na\relax\vbox to0pt{---}\else% new in v2.1.6
                        \pgfPT@formatnumber{-1}{\pgfPT@data@TmeltC}\fi\vfil}% changed in v2.1.5
                    \fi%
                    };%
            \else%
                \node[font=\pgfPTTmeltCfont,text=\pgfPTTmeltCcolor,text width=\pgfPT@data@TmeltC@wd,text centered]%
                    at ([xshift=\pgfPT@data@TmeltC@x,yshift=-\pgfPT@data@TmeltC@y]\Z) {%
                    \setbox0=\hbox{\pgfPT@formatnumber{\pgfPTTprecision}{\pgfPT@data@TmeltC}}\pgfmathsetlength{\pgfPT@dima}{\wd0}%
                    \ifdim\pgfPT@dima>.95\linewidth\relax%
                        \vbox to\pgfPT@data@TmeltC@ht{\vfil\resizebox{.925\linewidth}{\height}{\usebox0}\vfil}%
                    \else%
                        \vbox to\pgfPT@data@TmeltC@ht{\vfil%
                        \edef\pgfPT@test{\pgfPT@data@TmeltC}\ifx\pgfPT@test\pgfPT@na\relax\vbox to0pt{---}\else% new in v2.1.6
                        \usebox0\fi\vfil}%
                    \fi%
                    };%
            \fi\fi%
    \fi%
    % Tboil -> Boiling Point (Kelvin)
    \ifpgfPT@Tboil\relax%
            \ifnum\pgfPTTprecision<0\relax%
                \node[font=\pgfPTTboilfont,text=\pgfPTTboilcolor,text width=\pgfPT@data@Tboil@wd,text centered]%
                    at ([xshift=\pgfPT@data@Tboil@x,yshift=-\pgfPT@data@Tboil@y]\Z) {%
                    \setbox0=\hbox{\pgfPT@formatnumber{-1}{\pgfPT@data@Tboil}}\pgfmathsetlength{\pgfPT@dima}{\wd0}% changed in v2.1.5
                    \ifdim\pgfPT@dima>.95\linewidth\relax%
                        \vbox to\pgfPT@data@Tboil@ht{\vfil\resizebox{.925\linewidth}{\height}{\pgfPT@formatnumber{-1}{\pgfPT@data@Tboil}}\vfil}% changed in v2.1.5
                    \else%
                        \vbox to\pgfPT@data@Tboil@ht{\vfil%
                        \edef\pgfPT@test{\pgfPT@data@Tboil}\ifx\pgfPT@test\pgfPT@na\relax\vbox to0pt{---}\else% new in v2.1.6
                        \pgfPT@formatnumber{-1}{\pgfPT@data@Tboil}\fi\vfil}% changed in v2.1.5
                    \fi%
                    };%
            \else\ifnum\pgfPTTprecision>2\relax%
                \node[font=\pgfPTTboilfont,text=\pgfPTTboilcolor,text width=\pgfPT@data@Tboil@wd,text centered]%
                    at ([xshift=\pgfPT@data@Tboil@x,yshift=-\pgfPT@data@Tboil@y]\Z) {%
                    \setbox0=\hbox{\pgfPT@formatnumber{-1}{\pgfPT@data@Tboil}}\pgfmathsetlength{\pgfPT@dima}{\wd0}% changed in v2.1.5
                    \ifdim\pgfPT@dima>.95\linewidth\relax%
                        \vbox to\pgfPT@data@Tboil@ht{\vfil\resizebox{.925\linewidth}{\height}{\pgfPT@formatnumber{-1}{\pgfPT@data@Tboil}}\vfil}% changed in v2.1.5
                    \else%
                        \vbox to\pgfPT@data@Tboil@ht{\vfil%
                        \edef\pgfPT@test{\pgfPT@data@Tboil}\ifx\pgfPT@test\pgfPT@na\relax\vbox to0pt{---}\else% new in v2.1.6
                        \pgfPT@formatnumber{-1}{\pgfPT@data@Tboil}\fi\vfil}% changed in v2.1.5
                    \fi%
                    };%
            \else%
                \node[font=\pgfPTTboilfont,text=\pgfPTTboilcolor,text width=\pgfPT@data@Tboil@wd,text centered]%
                    at ([xshift=\pgfPT@data@Tboil@x,yshift=-\pgfPT@data@Tboil@y]\Z) {%
                    \setbox0=\hbox{\pgfPT@formatnumber{\pgfPTTprecision}{\pgfPT@data@Tboil}}\pgfmathsetlength{\pgfPT@dima}{\wd0}%
                    \ifdim\pgfPT@dima>.95\linewidth\relax%
                        \vbox to\pgfPT@data@Tboil@ht{\vfil\resizebox{.925\linewidth}{\height}{\usebox0}\vfil}%
                    \else%
                        \vbox to\pgfPT@data@Tboil@ht{\vfil%
                        \edef\pgfPT@test{\pgfPT@data@Tboil}\ifx\pgfPT@test\pgfPT@na\relax\vbox to0pt{---}\else% new in v2.1.6
                        \usebox0\fi\vfil}%
                    \fi%
                    };%
            \fi\fi%
    \fi%
    % TboilC -> Boiling Point (degrees Celsius)
    \ifpgfPT@TboilC\relax%
            \ifnum\pgfPTTprecision<0\relax%
                \node[font=\pgfPTTboilCfont,text=\pgfPTTboilCcolor,text width=\pgfPT@data@TboilC@wd,text centered]%
                    at ([xshift=\pgfPT@data@TboilC@x,yshift=-\pgfPT@data@TboilC@y]\Z) {%
                    \setbox0=\hbox{\pgfPT@formatnumber{-1}{\pgfPT@data@TboilC}}\pgfmathsetlength{\pgfPT@dima}{\wd0}% changed in v2.1.5
                    \ifdim\pgfPT@dima>.95\linewidth\relax%
                        \vbox to\pgfPT@data@TboilC@ht{\vfil\resizebox{.925\linewidth}{\height}{\pgfPT@formatnumber{-1}{\pgfPT@data@TboilC}}\vfil}% changed in v2.1.5
                    \else%
                        \vbox to\pgfPT@data@TboilC@ht{\vfil%
                        \edef\pgfPT@test{\pgfPT@data@TboilC}\ifx\pgfPT@test\pgfPT@na\relax\vbox to0pt{---}\else% new in v2.1.6
                        \pgfPT@formatnumber{-1}{\pgfPT@data@TboilC}\fi\vfil}% changed in v2.1.5
                    \fi%
                    };%
            \else\ifnum\pgfPTTprecision>2\relax%
                \node[font=\pgfPTTboilCfont,text=\pgfPTTboilCcolor,text width=\pgfPT@data@TboilC@wd,text centered]%
                    at ([xshift=\pgfPT@data@TboilC@x,yshift=-\pgfPT@data@TboilC@y]\Z) {%
                    \setbox0=\hbox{\pgfPT@formatnumber{-1}{\pgfPT@data@TboilC}}\pgfmathsetlength{\pgfPT@dima}{\wd0}% changed in v2.1.5
                    \ifdim\pgfPT@dima>.95\linewidth\relax%
                        \vbox to\pgfPT@data@TboilC@ht{\vfil\resizebox{.925\linewidth}{\height}{\pgfPT@formatnumber{-1}{\pgfPT@data@TboilC}}\vfil}% changed in v2.1.5
                    \else%
                        \vbox to\pgfPT@data@TboilC@ht{\vfil%
                        \edef\pgfPT@test{\pgfPT@data@TboilC}\ifx\pgfPT@test\pgfPT@na\relax\vbox to0pt{---}\else% new in v2.1.6
                        \pgfPT@formatnumber{-1}{\pgfPT@data@TboilC}\fi\vfil}% changed in v2.1.5
                    \fi%
                    };%
            \else%
                \node[font=\pgfPTTboilCfont,text=\pgfPTTboilCcolor,text width=\pgfPT@data@TboilC@wd,text centered]%
                    at ([xshift=\pgfPT@data@TboilC@x,yshift=-\pgfPT@data@TboilC@y]\Z) {%
                    \setbox0=\hbox{\pgfPT@formatnumber{\pgfPTTprecision}{\pgfPT@data@TboilC}}\pgfmathsetlength{\pgfPT@dima}{\wd0}%
                    \ifdim\pgfPT@dima>.95\linewidth\relax%
                        \vbox to\pgfPT@data@TboilC@ht{\vfil\resizebox{.925\linewidth}{\height}{\usebox0}\vfil}%
                    \else%
                        \vbox to\pgfPT@data@TboilC@ht{\vfil%
                        \edef\pgfPT@test{\pgfPT@data@TboilC}\ifx\pgfPT@test\pgfPT@na\relax\vbox to0pt{---}\else% new in v2.1.6
                        \usebox0\fi\vfil}%
                    \fi%
                    };%
            \fi\fi%
    \fi%
    % eDist -> Electron Distribuition
    \ifpgfPT@eDist\relax%
        {% new in v2.1.6 -> font selection inside this group
        \pgfPTeDistfont\selectfont\pgfmathsetlength{\pgfPT@dima}{.8*\f@size}%
        \node[font=\pgfPTeDistfont\fontsize{\pgfPT@dima}{\pgfPT@dima}\selectfont,text=\pgfPTeDistcolor,text width=\pgfPT@data@eDist@wd,text centered]%
                at ([xshift=\pgfPT@data@eDist@x,yshift=-\pgfPT@data@eDist@y]\Z) {\vbox to\pgfPT@data@eDist@ht{\vfil\pgfPT@data@eDist\vfil}};%
        }%
    \fi%
    % d -> Density
    \ifpgfPT@d\relax%
        \edef\pgfPT@maxprecision{4}%
        \ifx\pgfPTdunit\pgfPT@unit@d@gcm\relax% g/cm3
            \pgfPT@shiftdot[3]{\pgfPT@data@d}\let\pgfPT@data@d\pgfPT@shiftval\relax%
            \edef\pgfPT@maxprecision{7}%
        \else\ifx\pgfPTdunit\pgfPT@unit@d@both\relax% g/cm3 (solid, liquid, synthetic) g/dm3 (gas)
            \edef\pgfPT@testestado{gasoso}\ifx\pgfPT@data@cor\pgfPT@testestado\relax\else%
            \pgfPT@shiftdot[3]{\pgfPT@data@d}\let\pgfPT@data@d\pgfPT@shiftval\relax\edef\pgfPT@maxprecision{7}\fi%
        \fi\fi%
            \ifnum\pgfPTdprecision<0\relax%
                \node[font=\pgfPTdfont,text=\pgfPTdcolor,text width=\pgfPT@data@d@wd,text centered]%
                at ([xshift=\pgfPT@data@d@x,yshift=-\pgfPT@data@d@y]\Z) {%
                \setbox0=\hbox{\pgfPT@formatnumber{-1}{\pgfPT@data@d}}\pgfmathsetlength{\pgfPT@dima}{\wd0}% changed in v2.1.5
                    \ifdim\pgfPT@dima>.95\linewidth\relax%
                        \vbox to\pgfPT@data@d@ht{\vfil\resizebox{.925\linewidth}{\height}{\pgfPT@formatnumber{-1}{\pgfPT@data@d}}\vfil}% changed in v2.1.5
                    \else%
                        \vbox to\pgfPT@data@d@ht{\vfil%
                        \edef\pgfPT@test{\pgfPT@data@d}\ifx\pgfPT@test\pgfPT@na\relax\vbox to0pt{---}\else% new in v2.1.6
                        \pgfPT@formatnumber{-1}{\pgfPT@data@d}\fi\vfil}% changed in v2.1.5
                    \fi%
                };%
            \else\ifnum\pgfPTdprecision>\pgfPT@maxprecision\relax%
                \node[font=\pgfPTdfont,text=\pgfPTdcolor,text width=\pgfPT@data@d@wd,text centered]%
                at ([xshift=\pgfPT@data@d@x,yshift=-\pgfPT@data@d@y]\Z) {%
                \setbox0=\hbox{\pgfPT@formatnumber{-1}{\pgfPT@data@d}}\pgfmathsetlength{\pgfPT@dima}{\wd0}% changed in v2.1.5
                    \ifdim\pgfPT@dima>.95\linewidth\relax%
                        \vbox to\pgfPT@data@d@ht{\vfil\resizebox{.925\linewidth}{\height}{\pgfPT@formatnumber{-1}{\pgfPT@data@d}}\vfil}% changed in v2.1.5
                    \else%
                        \vbox to\pgfPT@data@d@ht{\vfil%
                        \edef\pgfPT@test{\pgfPT@data@d}\ifx\pgfPT@test\pgfPT@na\relax\vbox to0pt{---}\else% new in v2.1.6
                        \pgfPT@formatnumber{-1}{\pgfPT@data@d}\fi\vfil}% changed in v2.1.5
                    \fi%
                };%
            \else%
                \node[font=\pgfPTdfont,text=\pgfPTdcolor,text width=\pgfPT@data@d@wd,text centered]%
                at ([xshift=\pgfPT@data@d@x,yshift=-\pgfPT@data@d@y]\Z) {%
                \setbox0=\hbox{\pgfPT@formatnumber{\pgfPTdprecision}{\pgfPT@data@d}}\pgfmathsetlength{\pgfPT@dima}{\wd0}%
                    \ifdim\pgfPT@dima>.95\linewidth\relax%
                        \vbox to\pgfPT@data@d@ht{\vfil\resizebox{.925\linewidth}{\height}{\usebox0}\vfil}%
                    \else%
                        \vbox to\pgfPT@data@d@ht{\vfil%
                        \edef\pgfPT@test{\pgfPT@data@d}\ifx\pgfPT@test\pgfPT@na\relax\vbox to0pt{---}\else% new in v2.1.6
                        \usebox0\fi\vfil}%
                    \fi%
                };%
            \fi\fi%
    \fi%
    % Cp -> Specific heat capacity (25ºC, 100kPa)
    \ifpgfPT@Cp\relax%
            \ifnum\pgfPTCpprecision<0\relax%
                \node[font=\pgfPTCpfont,text=\pgfPTCpcolor,text width=\pgfPT@data@Cp@wd,text centered]%
                    at ([xshift=\pgfPT@data@Cp@x,yshift=-\pgfPT@data@Cp@y]\Z) {%
                    \setbox0=\hbox{\pgfPT@formatnumber{-1}{\pgfPT@data@Cp}}\pgfmathsetlength{\pgfPT@dima}{\wd0}% changed in v2.1.6
                    \ifdim\pgfPT@dima>.95\linewidth\relax%
                    \vbox to\pgfPT@data@Cp@ht{\vfil%
                    \edef\pgfPT@test{\pgfPT@data@Cp}\ifx\pgfPT@test\pgfPT@na\relax\vbox to0pt{---}\else% new in v2.1.6
                    \resizebox{.925\linewidth}{\height}{\pgfPT@formatnumber{-1}{\pgfPT@data@Cp}}\fi\vfil}%
                    \else%
                    \vbox to\pgfPT@data@Cp@ht{\vfil%
                    \edef\pgfPT@test{\pgfPT@data@Cp}\ifx\pgfPT@test\pgfPT@na\relax\vbox to0pt{---}\else% new in v2.1.6
                    \pgfPT@formatnumber{-1}{\pgfPT@data@Cp}\fi\vfil}%
                    \fi};% changed in v2.1.5
            \else\ifnum\pgfPTCpprecision>2\relax%
                \node[font=\pgfPTCpfont,text=\pgfPTCpcolor,text width=\pgfPT@data@Cp@wd,text centered]%
                    at ([xshift=\pgfPT@data@Cp@x,yshift=-\pgfPT@data@Cp@y]\Z) {%
                    \setbox0=\hbox{\pgfPT@formatnumber{-1}{\pgfPT@data@Cp}}\pgfmathsetlength{\pgfPT@dima}{\wd0}% changed in v2.1.6
                    \ifdim\pgfPT@dima>.95\linewidth\relax%
                    \vbox to\pgfPT@data@Cp@ht{\vfil%
                    \edef\pgfPT@test{\pgfPT@data@Cp}\ifx\pgfPT@test\pgfPT@na\relax\vbox to0pt{---}\else% new in v2.1.6
                    \resizebox{.925\linewidth}{\height}{\pgfPT@formatnumber{-1}{\pgfPT@data@Cp}}\fi\vfil}%
                    \else%
                    \vbox to\pgfPT@data@Cp@ht{\vfil%
                    \edef\pgfPT@test{\pgfPT@data@Cp}\ifx\pgfPT@test\pgfPT@na\relax\vbox to0pt{---}\else% new in v2.1.6
                    \pgfPT@formatnumber{-1}{\pgfPT@data@Cp}\fi\vfil}%
                    \fi};% changed in v2.1.5
            \else%
                \node[font=\pgfPTCpfont,text=\pgfPTCpcolor,text width=\pgfPT@data@Cp@wd,text centered]%
                    at ([xshift=\pgfPT@data@Cp@x,yshift=-\pgfPT@data@Cp@y]\Z) {
                    \setbox0=\hbox{\pgfPT@formatnumber{\pgfPTCpprecision}{\pgfPT@data@Cp}}\pgfmathsetlength{\pgfPT@dima}{\wd0}% changed in v2.1.6
                    \ifdim\pgfPT@dima>.95\linewidth\relax%
                    \vbox to\pgfPT@data@Cp@ht{\vfil%
                    \edef\pgfPT@test{\pgfPT@data@Cp}\ifx\pgfPT@test\pgfPT@na\relax\vbox to0pt{---}\else% new in v2.1.6
                    \resizebox{.925\linewidth}{\height}{\pgfPT@formatnumber{\pgfPTCpprecision}{\pgfPT@data@Cp}}\fi\vfil}%
                    \else%
                    \vbox to\pgfPT@data@Cp@ht{\vfil%
                    \edef\pgfPT@test{\pgfPT@data@Cp}\ifx\pgfPT@test\pgfPT@na\relax\vbox to0pt{---}\else% new in v2.1.6
                    \pgfPT@formatnumber{\pgfPTCpprecision}{\pgfPT@data@Cp}\fi\vfil}%
                    \fi};% changed in v2.1.6
            \fi\fi%
    \fi%
    % kT -> Thermal Condutivity (25ºC)
    \ifpgfPT@kT\relax%
            \ifnum\pgfPTkTprecision<0\relax%
                \node[font=\pgfPTkTfont,text=\pgfPTkTcolor,text width=\pgfPT@data@kT@wd,text centered]%
                    at ([xshift=\pgfPT@data@kT@x,yshift=-\pgfPT@data@kT@y]\Z) {%
                    \setbox0=\hbox{\pgfPT@formatnumber{-1}{\pgfPT@data@kT}}\pgfmathsetlength{\pgfPT@dima}{\wd0}% changed in v2.1.5
                    \ifdim\pgfPT@dima>.95\linewidth\relax%
                        \vbox to\pgfPT@data@kT@ht{\vfil\resizebox{.925\linewidth}{\height}{\pgfPT@formatnumber{-1}{\pgfPT@data@kT}}\vfil}% changed in v2.1.5
                    \else%
                        \vbox to\pgfPT@data@kT@ht{\vfil%
                        \edef\pgfPT@test{\pgfPT@data@kT}\ifx\pgfPT@test\pgfPT@na\relax\vbox to0pt{---}\else% new in v2.1.6
                        \pgfPT@formatnumber{-1}{\pgfPT@data@kT}\fi\vfil}% changed in v2.1.5
                    \fi%
                    };%
            \else\ifnum\pgfPTkTprecision>4\relax%
                \node[font=\pgfPTkTfont,text=\pgfPTkTcolor,text width=\pgfPT@data@kT@wd,text centered]%
                    at ([xshift=\pgfPT@data@kT@x,yshift=-\pgfPT@data@kT@y]\Z) {%
                    \setbox0=\hbox{\pgfPT@formatnumber{-1}{\pgfPT@data@kT}}\pgfmathsetlength{\pgfPT@dima}{\wd0}% changed in v2.1.5
                    \ifdim\pgfPT@dima>.95\linewidth\relax%
                        \vbox to\pgfPT@data@kT@ht{\vfil\resizebox{.925\linewidth}{\height}{\pgfPT@formatnumber{-1}{\pgfPT@data@kT}}\vfil}% changed in v2.1.5
                    \else%
                        \vbox to\pgfPT@data@kT@ht{\vfil%
                        \edef\pgfPT@test{\pgfPT@data@kT}\ifx\pgfPT@test\pgfPT@na\relax\vbox to0pt{---}\else% new in v2.1.6
                        \pgfPT@formatnumber{-1}{\pgfPT@data@kT}\fi\vfil}% changed in v2.1.5
                    \fi%
                    };%
            \else%
                \node[font=\pgfPTkTfont,text=\pgfPTkTcolor,text width=\pgfPT@data@kT@wd,text centered]%
                    at ([xshift=\pgfPT@data@kT@x,yshift=-\pgfPT@data@kT@y]\Z) {%
                    \setbox0=\hbox{\pgfPT@formatnumber{\pgfPTkTprecision}{\pgfPT@data@kT}}\pgfmathsetlength{\pgfPT@dima}{\wd0}%
                    \ifdim\pgfPT@dima>.95\linewidth\relax%
                        \vbox to\pgfPT@data@kT@ht{\vfil\resizebox{.925\linewidth}{\height}{\usebox0}\vfil}%
                    \else%
                        \vbox to\pgfPT@data@kT@ht{\vfil%
                        \edef\pgfPT@test{\pgfPT@data@kT}\ifx\pgfPT@test\pgfPT@na\relax\vbox to0pt{---}\else% new in v2.1.6
                        \usebox0\fi\vfil}%
                    \fi%
                    };%
            \fi\fi%
    \fi%
    % ls -> Lattice Structure
    \ifpgfPT@ls\relax%
        \pgfmathsetlength{\pgfPT@boxht}{.9*\pgfPT@data@ls@ht}%
        % fig,txt,fig+txt,txt+fig,fig*,txt*,fig+txt*,txt+fig* ::new in v2.1.6: starred versions to omit the lattice figure in extra legend
        \edef\pgfPT@ls@txt{txt}%
        \edef\pgfPT@ls@figtxt{fig+txt}%
        \edef\pgfPT@ls@txtfig{txt+fig}%
        \edef\pgfPT@ls@fig@star{fig*}% new in v2.1.6
        \edef\pgfPT@ls@txt@star{txt*}% new in v2.1.6
        \edef\pgfPT@ls@figtxt@star{fig+txt*}% new in v2.1.6
        \edef\pgfPT@ls@txtfig@star{txt+fig*}% new in v2.1.6
        \edef\pgfPT@ls@keyvalue{\pgfPTlstxtfig}
        \ifx\pgfPT@ls@fig@star\pgfPT@ls@keyvalue\relax%
            \global\pgfPT@lsfig@extrafalse\edef\pgfPT@ls@keyvalue{fig}%
        \else\ifx\pgfPT@ls@txt@star\pgfPT@ls@keyvalue\relax%
            \global\pgfPT@lsfig@extrafalse\edef\pgfPT@ls@keyvalue{txt}%
        \else\ifx\pgfPT@ls@figtxt@star\pgfPT@ls@keyvalue\relax%
            \global\pgfPT@lsfig@extrafalse\edef\pgfPT@ls@keyvalue{fig+txt}%
        \else\ifx\pgfPT@ls@txtfig@star\pgfPT@ls@keyvalue\relax%
            \global\pgfPT@lsfig@extrafalse\edef\pgfPT@ls@keyvalue{txt+fig}%
        \else\global\pgfPT@lsfig@extratrue\fi\fi\fi\fi% new in v2.1.6
        \ifx\pgfPT@ls@txt\pgfPT@ls@keyvalue\relax%
            %txt
            \node[font=\pgfPTlsfont,text=\pgfPTlscolor,text width=\pgfPT@data@ls@wd,align=\pgfPTlsalign] at ([xshift=\pgfPT@data@ls@x,yshift=-\pgfPT@data@ls@y]\Z)%
            {\vbox to\pgfPT@data@ls@ht{\vfil%
                    \edef\pgfPT@test{\pgfPT@data@ls}\ifx\pgfPT@test\pgfPT@na\relax\vbox to0pt{---}\else% new in v2.1.6
                    \makebox[.2ex][s]{}\pgfPT@box@zerodepth{\pgfPT@data@ls}\makebox[.5ex][s]{}\fi\vfil}};%
        \else\ifx\pgfPT@ls@figtxt\pgfPT@ls@keyvalue\relax%
            %fig+txt
            \node[font=\pgfPTlsfont,text=\pgfPTlscolor,text width=\pgfPT@data@ls@wd,align=\pgfPTlsalign] at ([xshift=\pgfPT@data@ls@x,yshift=-\pgfPT@data@ls@y]\Z)%
            {\vbox to\pgfPT@data@ls@ht{\vfil\tikz{\node (lsfig) {\makebox[.2ex][s]{}\includegraphics[height=\pgfPT@boxht]{lattice/pgfPT_ls_\pgfPT@data@ls.pdf}\makebox[.2ex][s]{}};%
                \node[right,anchor=mid west] at (lsfig.east) {\pgfPT@box@zerodepth{\pgfPT@data@ls\makebox[.5ex][s]{}}};}\vfil}};%
        \else\ifx\pgfPT@ls@txtfig\pgfPT@ls@keyvalue\relax%
            % txt+fig
            \node[font=\pgfPTlsfont,text=\pgfPTlscolor,text width=\pgfPT@data@ls@wd,align=\pgfPTlsalign] at ([xshift=\pgfPT@data@ls@x,yshift=-\pgfPT@data@ls@y]\Z)%
            {\vbox to\pgfPT@data@ls@ht{\vfil\tikz{\node (lstxt) {\makebox[.2ex][s]{}\pgfPT@box@zerodepth{\pgfPT@data@ls\makebox[.5ex][s]{}}};%
                \node[right] at (lstxt.east) {\includegraphics[height=\pgfPT@boxht]{lattice/pgfPT_ls_\pgfPT@data@ls.pdf}\makebox[.2ex][s]{}};}\vfil}};%
        \else% apply the default option whatever the value of the key
            %fig
            \node[font=\pgfPTlsfont,text=\pgfPTlscolor,text width=\pgfPT@data@ls@wd,align=\pgfPTlsalign] at ([xshift=\pgfPT@data@ls@x,yshift=-\pgfPT@data@ls@y]\Z)%
            {\vbox to\pgfPT@data@ls@ht{\vfil\makebox[.2ex][s]{}\includegraphics[height=\pgfPT@boxht]{lattice/pgfPT_ls_\pgfPT@data@ls.pdf}\makebox[.5ex][s]{}\vfil}};%
        \fi\fi\fi%
    \fi%
    % lsa -> Lattice constant: a
    \ifpgfPT@lsa\relax%
        \edef\pgfPT@maxprecision{1}%
        \ifx\pgfPTlsunit\pgfPT@unit@ls@A\relax% angstrom
            \pgfPT@shiftdot[2]{\pgfPT@data@lsa}\let\pgfPT@data@lsa\pgfPT@shiftval\relax%
            \edef\pgfPT@maxprecision{3}%
        \fi%
            \ifnum\pgfPTlsprecision<0\relax%
                \node[font=\pgfPTlsafont,text=\pgfPTlsacolor,text width=\pgfPT@data@lsa@wd,text centered]%
                    at ([xshift=\pgfPT@data@lsa@x,yshift=-\pgfPT@data@lsa@y]\Z) {%
                    \setbox0=\hbox{\pgfPT@formatnumber{-1}{\pgfPT@data@lsa}}\pgfmathsetlength{\pgfPT@dima}{\wd0}% changed in v2.1.6
                    \ifdim\pgfPT@dima>.95\linewidth\relax%
                    \vbox to\pgfPT@data@lsa@ht{\vfil%
                    \edef\pgfPT@test{\pgfPT@data@lsa}\ifx\pgfPT@test\pgfPT@na\relax\vbox to0pt{---}\else% new in v2.1.6
                    \resizebox{.925\linewidth}{\height}{\pgfPT@formatnumber{-1}{\pgfPT@data@lsa}}\fi\vfil}%
                    \else%
                    \vbox to\pgfPT@data@lsa@ht{\vfil%
                    \edef\pgfPT@test{\pgfPT@data@lsa}\ifx\pgfPT@test\pgfPT@na\relax\vbox to0pt{---}\else% new in v2.1.6
                    \pgfPT@formatnumber{-1}{\pgfPT@data@lsa}\fi\vfil}%
                    \fi};% changed in v2.1.5
            \else\ifnum\pgfPTlsprecision>\pgfPT@maxprecision\relax%
                \node[font=\pgfPTlsafont,text=\pgfPTlsacolor,text width=\pgfPT@data@lsa@wd,text centered]%
                    at ([xshift=\pgfPT@data@lsa@x,yshift=-\pgfPT@data@lsa@y]\Z) {%
                    \setbox0=\hbox{\pgfPT@formatnumber{-1}{\pgfPT@data@lsa}}\pgfmathsetlength{\pgfPT@dima}{\wd0}% changed in v2.1.6
                    \ifdim\pgfPT@dima>.95\linewidth\relax%
                    \vbox to\pgfPT@data@lsa@ht{\vfil%
                    \edef\pgfPT@test{\pgfPT@data@lsa}\ifx\pgfPT@test\pgfPT@na\relax\vbox to0pt{---}\else% new in v2.1.6
                    \resizebox{.925\linewidth}{\height}{\pgfPT@formatnumber{-1}{\pgfPT@data@lsa}}\fi\vfil}%
                    \else%
                    \vbox to\pgfPT@data@lsa@ht{\vfil%
                    \edef\pgfPT@test{\pgfPT@data@lsa}\ifx\pgfPT@test\pgfPT@na\relax\vbox to0pt{---}\else% new in v2.1.6
                    \pgfPT@formatnumber{-1}{\pgfPT@data@lsa}\fi\vfil}%
                    \fi};% changed in v2.1.5
            \else%
                \node[font=\pgfPTlsafont,text=\pgfPTlsacolor,text width=\pgfPT@data@lsa@wd,text centered]%
                    at ([xshift=\pgfPT@data@lsa@x,yshift=-\pgfPT@data@lsa@y]\Z) {%
                    \setbox0=\hbox{\pgfPT@formatnumber{\pgfPTlsprecision}{\pgfPT@data@lsa}}\pgfmathsetlength{\pgfPT@dima}{\wd0}% changed in v2.1.6
                    \ifdim\pgfPT@dima>.95\linewidth\relax%
                    \vbox to\pgfPT@data@lsa@ht{\vfil%
                    \edef\pgfPT@test{\pgfPT@data@lsa}\ifx\pgfPT@test\pgfPT@na\relax\vbox to0pt{---}\else% new in v2.1.6
                    \resizebox{.925\linewidth}{\height}{\pgfPT@formatnumber{\pgfPTlsprecision}{\pgfPT@data@lsa}}\fi\vfil}%
                    \else%
                    \vbox to\pgfPT@data@lsa@ht{\vfil%
                    \edef\pgfPT@test{\pgfPT@data@lsa}\ifx\pgfPT@test\pgfPT@na\relax\vbox to0pt{---}\else% new in v2.1.6
                    \pgfPT@formatnumber{\pgfPTlsprecision}{\pgfPT@data@lsa}\fi\vfil}%
                    \fi};% changed in v2.1.5
            \fi\fi%
    \fi%
    % lsb -> Lattice constant: b
    \ifpgfPT@lsb\relax%
        \edef\pgfPT@maxprecision{1}%
        \ifx\pgfPTlsunit\pgfPT@unit@ls@A\relax% angstrom
            \pgfPT@shiftdot[2]{\pgfPT@data@lsb}\let\pgfPT@data@lsb\pgfPT@shiftval\relax%
            \edef\pgfPT@maxprecision{3}%
        \fi%
            \ifnum\pgfPTlsprecision<0\relax%
                \node[font=\pgfPTlsbfont,text=\pgfPTlsbcolor,text width=\pgfPT@data@lsb@wd,text centered]%
                    at ([xshift=\pgfPT@data@lsb@x,yshift=-\pgfPT@data@lsb@y]\Z) {%
                    \setbox0=\hbox{\pgfPT@formatnumber{-1}{\pgfPT@data@lsb}}\pgfmathsetlength{\pgfPT@dima}{\wd0}% changed in v2.1.6
                    \ifdim\pgfPT@dima>.95\linewidth\relax%
                    \vbox to\pgfPT@data@lsb@ht{\vfil\resizebox{.925\linewidth}{\height}{\pgfPT@formatnumber{-1}{\pgfPT@data@lsb}}\vfil}%
                    \else%
                    \vbox to\pgfPT@data@lsb@ht{\vfil\pgfPT@formatnumber{-1}{\pgfPT@data@lsb}\vfil}%
                    \fi};% changed in v2.1.5
            \else\ifnum\pgfPTlsprecision>\pgfPT@maxprecision\relax%
                \node[font=\pgfPTlsbfont,text=\pgfPTlsbcolor,text width=\pgfPT@data@lsb@wd,text centered]%
                    at ([xshift=\pgfPT@data@lsb@x,yshift=-\pgfPT@data@lsb@y]\Z) {%
                    \setbox0=\hbox{\pgfPT@formatnumber{-1}{\pgfPT@data@lsb}}\pgfmathsetlength{\pgfPT@dima}{\wd0}% changed in v2.1.6
                    \ifdim\pgfPT@dima>.95\linewidth\relax%
                    \vbox to\pgfPT@data@lsb@ht{\vfil\resizebox{.925\linewidth}{\height}{\pgfPT@formatnumber{-1}{\pgfPT@data@lsb}}\vfil}%
                    \else%
                    \vbox to\pgfPT@data@lsb@ht{\vfil\pgfPT@formatnumber{-1}{\pgfPT@data@lsb}\vfil}%
                    \fi};% changed in v2.1.5
            \else%
                \node[font=\pgfPTlsbfont,text=\pgfPTlsbcolor,text width=\pgfPT@data@lsb@wd,text centered]%
                    at ([xshift=\pgfPT@data@lsb@x,yshift=-\pgfPT@data@lsb@y]\Z) {%
                    \setbox0=\hbox{\pgfPT@formatnumber{\pgfPTlsprecision}{\pgfPT@data@lsb}}\pgfmathsetlength{\pgfPT@dima}{\wd0}% changed in v2.1.6
                    \ifdim\pgfPT@dima>.95\linewidth\relax%
                    \vbox to\pgfPT@data@lsb@ht{\vfil\resizebox{.925\linewidth}{\height}{\pgfPT@formatnumber{\pgfPTlsprecision}{\pgfPT@data@lsb}}\vfil}%
                    \else%
                    \vbox to\pgfPT@data@lsb@ht{\vfil\pgfPT@formatnumber{\pgfPTlsprecision}{\pgfPT@data@lsb}\vfil}%
                    \fi};%
            \fi\fi%
    \fi%
    % lsc -> Lattice constant: c
    \ifpgfPT@lsc\relax%
        \edef\pgfPT@maxprecision{1}%
        \ifx\pgfPTlsunit\pgfPT@unit@ls@A\relax% angstrom
            \pgfPT@shiftdot[2]{\pgfPT@data@lsc}\let\pgfPT@data@lsc\pgfPT@shiftval\relax%
            \edef\pgfPT@maxprecision{3}%
        \fi%
            \ifnum\pgfPTlsprecision<0\relax%
                \node[font=\pgfPTlscfont,text=\pgfPTlsccolor,text width=\pgfPT@data@lsc@wd,text centered]%
                    at ([xshift=\pgfPT@data@lsc@x,yshift=-\pgfPT@data@lsc@y]\Z) {%
                    \setbox0=\hbox{\pgfPT@formatnumber{-1}{\pgfPT@data@lsc}}\pgfmathsetlength{\pgfPT@dima}{\wd0}% changed in v2.1.6
                    \ifdim\pgfPT@dima>.95\linewidth\relax%
                    \vbox to\pgfPT@data@lsc@ht{\vfil\resizebox{.925\linewidth}{\height}{\pgfPT@formatnumber{-1}{\pgfPT@data@lsc}}\vfil}%
                    \else%
                    \vbox to\pgfPT@data@lsc@ht{\vfil\pgfPT@formatnumber{-1}{\pgfPT@data@lsc}\vfil}%
                    \fi};% changed in v2.1.5
            \else\ifnum\pgfPTlsprecision>\pgfPT@maxprecision\relax%
                \node[font=\pgfPTlscfont,text=\pgfPTlsccolor,text width=\pgfPT@data@lsc@wd,text centered]%
                    at ([xshift=\pgfPT@data@lsc@x,yshift=-\pgfPT@data@lsc@y]\Z) {%
                    \setbox0=\hbox{\pgfPT@formatnumber{-1}{\pgfPT@data@lsc}}\pgfmathsetlength{\pgfPT@dima}{\wd0}% changed in v2.1.6
                    \ifdim\pgfPT@dima>.95\linewidth\relax%
                    \vbox to\pgfPT@data@lsc@ht{\vfil\resizebox{.925\linewidth}{\height}{\pgfPT@formatnumber{-1}{\pgfPT@data@lsc}}\vfil}%
                    \else%
                    \vbox to\pgfPT@data@lsc@ht{\vfil\pgfPT@formatnumber{-1}{\pgfPT@data@lsc}\vfil}%
                    \fi};% changed in v2.1.5
            \else%
                \node[font=\pgfPTlscfont,text=\pgfPTlsccolor,text width=\pgfPT@data@lsc@wd,text centered]%
                    at ([xshift=\pgfPT@data@lsc@x,yshift=-\pgfPT@data@lsc@y]\Z) {%
                    \setbox0=\hbox{\pgfPT@formatnumber{\pgfPTlsprecision}{\pgfPT@data@lsc}}\pgfmathsetlength{\pgfPT@dima}{\wd0}% changed in v2.1.6
                    \ifdim\pgfPT@dima>.95\linewidth\relax%
                    \vbox to\pgfPT@data@lsc@ht{\vfil\resizebox{.925\linewidth}{\height}{\pgfPT@formatnumber{\pgfPTlsprecision}{\pgfPT@data@lsc}}\vfil}%
                    \else%
                    \vbox to\pgfPT@data@lsc@ht{\vfil\pgfPT@formatnumber{\pgfPTlsprecision}{\pgfPT@data@lsc}\vfil}%
                    \fi};%
            \fi\fi%
    \fi%
    % lsca -> Lattice c/a ratio:
    \ifpgfPT@lsca\relax%
            \ifnum\pgfPTlsprecision<0\relax%
                \node[font=\pgfPTlscafont,text=\pgfPTlscacolor,text width=\pgfPT@data@lsca@wd,text centered]%
                    at ([xshift=\pgfPT@data@lsca@x,yshift=-\pgfPT@data@lsca@y]\Z) {%
                    \setbox0=\hbox{\pgfPT@formatnumber{-1}{\pgfPT@data@lsca}}\pgfmathsetlength{\pgfPT@dima}{\wd0}% changed in v2.1.6
                    \ifdim\pgfPT@dima>.95\linewidth\relax%
                    \vbox to\pgfPT@data@lsca@ht{\vfil\resizebox{.925\linewidth}{\height}{\pgfPT@formatnumber{-1}{\pgfPT@data@lsca}}\vfil}%
                    \else%
                    \vbox to\pgfPT@data@lsca@ht{\vfil\pgfPT@formatnumber{-1}{\pgfPT@data@lsca}\vfil}%
                    \fi};% changed in v2.1.5
            \else\ifnum\pgfPTlsprecision>1\relax%
                \node[font=\pgfPTlscafont,text=\pgfPTlscacolor,text width=\pgfPT@data@lsca@wd,text centered]%
                    at ([xshift=\pgfPT@data@lsca@x,yshift=-\pgfPT@data@lsca@y]\Z) {%
                    \setbox0=\hbox{\pgfPT@formatnumber{-1}{\pgfPT@data@lsca}}\pgfmathsetlength{\pgfPT@dima}{\wd0}% changed in v2.1.6
                    \ifdim\pgfPT@dima>.95\linewidth\relax%
                    \vbox to\pgfPT@data@lsca@ht{\vfil\resizebox{.925\linewidth}{\height}{\pgfPT@formatnumber{-1}{\pgfPT@data@lsca}}\vfil}%
                    \else%
                    \vbox to\pgfPT@data@lsca@ht{\vfil\pgfPT@formatnumber{-1}{\pgfPT@data@lsca}\vfil}%
                    \fi};% changed in v2.1.5
            \else%
                \node[font=\pgfPTlscafont,text=\pgfPTlscacolor,text width=\pgfPT@data@lsca@wd,text centered]%
                    at ([xshift=\pgfPT@data@lsca@x,yshift=-\pgfPT@data@lsca@y]\Z) {%
                    \setbox0=\hbox{\pgfPT@formatnumber{\pgfPTlsprecision}{\pgfPT@data@lsca}}\pgfmathsetlength{\pgfPT@dima}{\wd0}% changed in v2.1.6
                    \ifdim\pgfPT@dima>.95\linewidth\relax%
                    \vbox to\pgfPT@data@lsca@ht{\vfil\resizebox{.925\linewidth}{\height}{\pgfPT@formatnumber{\pgfPTlsprecision}{\pgfPT@data@lsca}}\vfil}%
                    \else%
                    \vbox to\pgfPT@data@lsca@ht{\vfil\pgfPT@formatnumber{\pgfPTlsprecision}{\pgfPT@data@lsca}\vfil}%
                    \fi};%
            \fi\fi%
    \fi%
    % DiscY -> Discover Year
    \ifpgfPT@DiscY\relax
            \node[font=\pgfPTDiscYfont,text=\pgfPTDiscYcolor,text width=\pgfPT@data@DiscY@wd,text centered]%
                at ([xshift=\pgfPT@data@DiscY@x,yshift=-\pgfPT@data@DiscY@y]\Z) {\vbox to\pgfPT@data@DiscY@ht{\vfil\mbox{\pgfPT@data@DiscY}\vfil}};%
    \fi%
    % spectra -> spectra
    \ifpgfPT@spectra\relax%
        \ifnum\pgfPT@data@spectra=1\relax%
        \pgfmathsetlength{\pgfPT@boxht}{.9*\pgfPT@data@spectra@ht}%
            \node[text width=\pgfPT@data@spectra@wd,text centered] at ([xshift=\pgfPT@data@spectra@x,yshift=-\pgfPT@data@spectra@y]\Z)%
            {\setbox0=\vbox to\pgfPT@data@spectra@ht{\vfil\includegraphics[height=\pgfPT@boxht]{spectra/pgfPT_spec\Z.pdf}\vfil\vfil}%
            \ifdim\wd0>.95\textwidth\relax\vbox to\pgfPT@data@spectra@ht{\resizebox{.75\textwidth}{!}{\usebox0}}\else\usebox0\fi%
            };%
        \fi%
    \fi%
}% end foreach \Z
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% new in v2.1.5
% process the empty list
\ifpgfPT@Zliststar%
\ifx\pgfPT@emptycellslist@options\undefined\relax\else%
\edef\pgfPT@emptycellslist@option@noZ{hide Z}%
\edef\pgfPT@emptycellslist@option@bc{back color}%
\def\pgfPT@emptycellslist@option@decompose##1=##2\relax{%
            \edef\pgfPT@emptycellslist@option@decompose@i{##1}%
            \edef\pgfPT@emptycellslist@option@decompose@ii{##2}}%
\@for\@pgfPT@tmp:=\pgfPT@emptycellslist@options\do{%
        \ifx\@pgfPT@tmp\pgfPT@emptycellslist@option@noZ\relax\edef\pgfPT@emptycellslist@noZ{}%
            \else%
            \expandafter\pgfPT@emptycellslist@option@decompose\@pgfPT@tmp\relax%
            \ifx\pgfPT@emptycellslist@option@decompose@i\pgfPT@emptycellslist@option@bc\relax%
            \edef\pgfPT@emptycellslist@bc{\pgfPT@emptycellslist@option@decompose@ii}%
            \else%
            \PackageError{pgfPT}{Unknown option '\@pgfPT@tmp'. It will be ignored...}{}%
            \fi%
        \fi%
        }%
\fi%
\foreach \Z in \pgfPT@@emptycellslist {%
\ifx\pgfPT@emptycellslist@bc\undefined\relax%
\ifpgfPTis@backcolorsolid\relax\else\pgfPT@processbackcolor{\Z}\fi%
\else\colorlet{cpgfPTTMP}{\pgfPT@emptycellslist@bc}%
\fi%
    % drawing the cell
    \draw[fill=cpgfPTTMP,line width=\pgfPTcelllinewd,draw=\pgfPTcelllinecolor] (\Z) rectangle ++(\pgfPTcellwd,-\pgfPTcellht);
\ifx\pgfPT@emptycellslist@noZ\undefined\relax%
    % append the Z box
    \ifpgfPT@Z%
        \ifpgfZuseboxwidth{\pgfPTZfont\pgfPTnumberfont%
            \ifpgfPT@zhnumbers@Z\let\pgfPT@printnum\zhnumber%
                \pgfmathparse{width("\pgfPT@printnum{\Z}")}\pgfmathsetlength{\pgfPT@data@Z@natwd}{\pgfmathresult}%
                \ifdim\pgfPT@data@Z@natwd>\pgfPT@data@Z@wd\relax%
                    \pgfmathparse{\pgfPT@data@Z@wd-2*\pgfPTZspace-.3333em}\pgfmathsetlength{\pgfPT@data@Z@natwd}{\pgfmathresult}%
                    \node[fill=\pgfPTZback,font=\pgfPTZfont,text=\pgfPTZcolor,align=\pgfPTZalign,text width=\pgfPT@data@Z@wd]%
                        at ([xshift=.5*\pgfPT@data@Z@x,yshift=-.5*\pgfPT@data@Z@y]\Z)
                        {\vbox to\pgfPT@data@Z@ht{\vfil\hspace{\pgfPTZspace}\resizebox{\pgfPT@data@Z@natwd}{\height}{\pgfPT@printnum{\Z}}\hspace{\pgfPTZspace}\vfil}};
                \else%
                    \node[fill=\pgfPTZback,font=\pgfPTZfont,text=\pgfPTZcolor,align=\pgfPTZalign,text width=\pgfPT@data@Z@wd]%
                        at ([xshift=.5*\pgfPT@data@Z@x,yshift=-.5*\pgfPT@data@Z@y]\Z)
                        {\vbox to\pgfPT@data@Z@ht{\vfil\hspace{\pgfPTZspace}\pgfPT@printnum{\Z}\hspace{\pgfPTZspace}\vfil}};
                \fi%
            \else\let\pgfPT@printnum\relax%
                \node[fill=\pgfPTZback,font=\pgfPTZfont,text=\pgfPTZcolor,align=\pgfPTZalign,text width=\pgfPT@data@Z@wd]%
                    at ([xshift=.5*\pgfPT@data@Z@x,yshift=-.5*\pgfPT@data@Z@y]\Z)
                    {\vbox to\pgfPT@data@Z@ht{\vfil\hspace{\pgfPTZspace}\pgfPT@printnum{\Z}\hspace{\pgfPTZspace}\vfil}};
            \fi%
            }%
        \else%
            {%
            \ifpgfPT@zhnumbers@Z\let\pgfPT@printnum\zhnumber%
                \pgfPTZfont\pgfPTnumberfont\pgfmathparse{width("\pgfPT@printnum{\Z}")}\pgfmathsetlength{\pgfPT@data@Z@natwd}{\pgfmathresult}%
                \ifdim\pgfPT@data@Z@natwd>\pgfPT@data@Z@wd\relax\edef\@pgfPT@resizebox{1}%
                \pgfmathparse{\pgfPT@data@Z@wd-1ex}\pgfmathsetlength{\pgfPT@data@Z@natwd}{\pgfmathresult}\else\edef\@pgfPT@resizebox{0}\fi%
            \else\let\pgfPT@printnum\relax%
                \pgfPTZfont\pgfPTnumberfont\pgfmathparse{width("\pgfPT@printnum{\Z}")}\pgfmathsetlength{\pgfPT@data@Z@natwd}{\pgfmathresult}%
            \fi%
            \node[fill=\pgfPTZback,font=\pgfPTZfont,text=\pgfPTZcolor,text width=\pgfPT@data@Z@natwd,inner xsep=.5ex]%
            at ([xshift=\pgfPT@data@Z@x+.5*\@pgfPT@Zxshift,yshift=-\pgfPT@data@Z@y-.5*\@pgfPT@Zyshift]\Z) {%
                    \ifpgfPT@zhnumbers@Z%
                        \ifnum\@pgfPT@resizebox=1\relax%
                        \vbox to\pgfPT@data@Z@ht{\vfil\resizebox{\pgfPT@data@Z@natwd}{\height}{\pgfPT@printnum{\Z}}\vfil}%
                        \else%
                        \vbox to\pgfPT@data@Z@ht{\vfil\pgfPT@printnum{\Z}\vfil}%
                        \fi%
                    \else%
                        \vbox to\pgfPT@data@Z@ht{\vfil\pgfPT@printnum{\Z}\vfil}%
                    \fi%
                    };}%
        \fi%
    \fi%
\fi%
\let\pgfPT@emptycellslist@noZ\undefined\relax%
\let\pgfPT@emptycellslist@bc\undefined\relax%
}%
\pgfPT@Zliststarfalse\edef\pgfPT@@cellslist{\pgfPT@@cellslist,\pgfPT@@emptycellslist}%
\fi%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\ifpgfPTexMode%
    \expandafter\pgfPT@get@limits\pgfPT@@cellslist\relax%
    \pgfmathsetcount{\pgfPT@countc}{\pgfPT@limits@min-1}%
    \pgfmathsetcount{\pgfPT@countd}{\pgfPT@limits@max+1}%
    \pgfPT@counta=1\pgfPT@countb=0\relax\edef\pgfPT@ex@add{}%
    {\pgfPTZexlistfont\selectfont\pgfmathparse{height("A")}\xdef\pgfPT@htA{\pgfmathresult}}%
    \@for\Z:=\pgfPTZexlist\do{%
        \ifnum\Z>\pgfPT@countc\relax\ifnum\Z<\pgfPT@countd\relax% puts the letter if only inside the limits of the cells drawn...
            \node[font=\pgfPTZexlistfont,text=\pgfPTZexlistcolor,text width=\pgfPTcellwd,text centered,inner sep=0pt,anchor=base] %
                at ([xshift={.5*\pgfPTcellwd},yshift={-.5*\pgfPTcellht-.5*\pgfPT@htA}]\Z)%
                {\pgfPT@ex@add\ifpgfPTexCapitals\@Alph\pgfPT@counta\relax\else\@alph\pgfPT@counta\relax\fi};%
            \advance\pgfPT@counta by1\relax%
            \ifnum\pgfPT@counta=27\relax
                \ifnum\pgfPT@countb=0\relax\edef\pgfPT@ex@add{a}\else%
                \ifnum\pgfPT@countb=1\relax\edef\pgfPT@ex@add{b}\else%
                \ifnum\pgfPT@countb=2\relax\edef\pgfPT@ex@add{c}\else%
                \ifnum\pgfPT@countb=3\relax\edef\pgfPT@ex@add{d}%
                \fi\fi\fi\fi%
                \pgfPT@counta=1\advance\pgfPT@countb by1\relax%
                \ifpgfPTexCapitals\edef\pgfPT@ex@add{\expandafter\uppercase{\pgfPT@ex@add}}\fi%
            \fi%
        \fi\fi% limits
    }%
    \global\pgfPTexModefalse\global\pgfPTonlycellsfalse%
\fi%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% labels of periods and groups -----> \pgfPT@@cellslist
% periods -->
\ifpgfPTperlabels%
\global\pgfPTis@labeldrawnfalse%
\ifnum\pgfPT@fontspec=1\relax\setmainfont{\pgfPTglobalfont}\else\fontfamily{\pgfPTglobalfont}\selectfont\fi\fontseries{\seriesdefault}\fontshape{\shapedefault}%
\foreach \per in {1,...,7} {%
    \edef\pgfPT@@perlist{\csname pgfPT@cells@P\@Roman\per\endcsname}%
    \foreach \Zsearch in \pgfPT@@perlist{%
        \foreach \Z in \pgfPT@@cellslist {%
            \ifnum\Z=\Zsearch\global\pgfPTis@labeldrawntrue%
            \ifpgfPTIUPACMMIX\edef\pgfPT@teststrb{\pgfPTcells}\edef\pgfPT@teststra{d}\ifx\pgfPT@teststra\pgfPT@teststrb\ifnum\Z>48\pgfmathparse{-1.075*\pgfPTcellwd}\edef\pgfPT@perlabel@xshift{\pgfmathresult}\fi\fi\fi%
            {\pgfPTlabfont\pgfPTnumberfont\ifpgfPT@zhnumbers@per\let\pgfPT@printnum\zhnumber\else\let\pgfPT@printnum\relax\fi%
            \node[left,font=\pgfPTlabfont,text=\pgfPTlabpercolor] at%
            ([xshift=\pgfPT@perlabel@xshift,yshift=\pgfPT@CS@yshift]\Z) {\pgfPT@printnum{\per}};%
            }\breakforeach\fi%
        }%
        \ifpgfPTis@labeldrawn\global\pgfPTis@labeldrawnfalse\breakforeach\fi%
    }%
}%
% process if labels 'lanthanoids' & 'actinoids' are shown in block f -->
\ifx\pgfPTLaAclabelsUSER\@empty% USER CHOICE VALUE IS EMPTY
    \ifpgfPTIUPACMMIX\pgfPTLaAclabelsfalse\else\pgfPTLaAclabelstrue\fi% EU
\else\ifx\pgfPTLaAclabelsUSER\pgfPT@true\pgfPTLaAclabelstrue\else\ifx\pgfPTLaAclabelsUSER\pgfPT@false\pgfPTLaAclabelsfalse% USER
    \else%
    \ifpgfPTIUPACMMIX\pgfPTLaAclabelsfalse\else\pgfPTLaAclabelstrue\fi%
    \PackageError{pgfPT}{value of key 'show label LaAc' must be 'true' or 'false' not '\pgfPTLaAclabelsUSER'. It will be ignored...}{}%
    \fi\fi% USER doesn't provide 'true'|'false'
\fi%
% lanthanoids -->
\global\pgfPTis@labeldrawnfalse%
\ifpgfPTIUPACMMIX%
\pgfPT@setlabels[\pgfPTlanguages]{La}%
    \edef\pgfPT@tmp@label@defaultLanguage{}\edef\pgfPT@tmp@labels@otherLanguages{}\pgfPT@counta=0\relax%
    \@for\pgfPT@tmp:=\pgfPTlanguages\do{%
        \ifnum\pgfPT@counta=0\relax%
            \edef\pgfPT@tmp@label@defaultLanguage{\csname pgfPT@labels@La@\pgfPT@tmp\endcsname}%
        \else%
            \edef\pgfPT@tmp@labels@otherLanguages{\pgfPT@tmp@labels@otherLanguages\hbox to 0pt{\hfil\csname pgfPT@labels@La@\pgfPT@tmp\endcsname\hfil}\vskip-1pt}%
        \fi%
        \advance\pgfPT@counta by 1\relax%
    }%
    \pgfPTlabLaAcfont\selectfont\pgfmathsetlength{\pgfPT@dima}{.75*\f@size}%
    \pgfmathparse{width("\noexpand\pgfPT@tmp@label@defaultLanguage")}%
    \edef\pgfPT@labelboxwd{\pgfmathresult}%
    \ifnum\pgfPT@fontspec=1\relax\setmainfont{\pgfPTglobalfont}\else\fontfamily{\pgfPTglobalfont}\selectfont\fi\fontseries{\seriesdefault}\fontshape{\shapedefault}%
    \foreach \Zsearch in \pgfPT@cells@lanthanoids{%
        \foreach \Z in \pgfPT@@cellslist {%
            \ifnum\Z=\Zsearch\global\pgfPTis@labeldrawntrue%
            {\pgfPTlabfont\pgfPTnumberfont\ifpgfPT@zhnumbers@per\let\pgfPT@printnum\zhnumber\else\let\pgfPT@printnum\relax\fi%
            \node[left,font=\pgfPTlabfont,text=\pgfPTlabpercolor] at ([xshift=\pgfPT@perlabel@xshift,yshift=\pgfPT@CS@yshift]\Z) {\pgfPT@printnum{6}};}%
            \ifpgfPTLaAclabels\pgfPT@processbackcolor{57}%
            \node[below left,font=\pgfPTlabLaAcfont,text=cpgfPTTMP,inner ysep=0pt,text width=\pgfPT@labelboxwd] at ([xshift=\pgfPT@perlabel@xshift]\Z)%
                    {\pgfPT@tmp@label@defaultLanguage\ifnum\pgfPT@counta>1\relax\fontsize{\pgfPT@dima}{\pgfPT@dima}\selectfont\\ [-1pt]\pgfPT@tmp@labels@otherLanguages\fi};\fi%
            \breakforeach\fi%
        }%
    \ifpgfPTis@labeldrawn\global\pgfPTis@labeldrawnfalse\breakforeach\fi%
    }%
\else%
    \pgfPT@setlabels[\pgfPTlanguages]{La}%
    \edef\pgfPT@tmp@label@defaultLanguage{}\edef\pgfPT@tmp@labels@otherLanguages{}\pgfPT@counta=0\relax%
    \@for\pgfPT@tmp:=\pgfPTlanguages\do{%
        \ifnum\pgfPT@counta=0\relax%
            \edef\pgfPT@tmp@label@defaultLanguage{\csname pgfPT@labels@La@\pgfPT@tmp\endcsname}%
        \else%
            \edef\pgfPT@tmp@labels@otherLanguages{\pgfPT@tmp@labels@otherLanguages\hbox to 0pt{\hfil\csname pgfPT@labels@La@\pgfPT@tmp\endcsname\hfil}\vskip-1pt}%
        \fi%
        \advance\pgfPT@counta by 1\relax%
    }%
    \pgfPTlabLaAcfont\selectfont\pgfmathsetlength{\pgfPT@dima}{.75*\f@size}%
    \pgfmathparse{width("\noexpand\pgfPT@tmp@label@defaultLanguage")}%
    \edef\pgfPT@labelboxwd{\pgfmathresult}%
    \ifnum\pgfPT@fontspec=1\relax\setmainfont{\pgfPTglobalfont}\else\fontfamily{\pgfPTglobalfont}\selectfont\fi\fontseries{\seriesdefault}\fontshape{\shapedefault}%
    \foreach \Zsearch in \pgfPT@cells@La{%
        \foreach \Z in \pgfPT@@cellslist {%
            \ifnum\Z=\Zsearch\global\pgfPTis@labeldrawntrue%
                {\pgfPTlabfont\pgfPTnumberfont\ifpgfPT@zhnumbers@per\let\pgfPT@printnum\zhnumber\else\let\pgfPT@printnum\relax\fi%
                \node[left,font=\pgfPTlabfont,text=\pgfPTlabpercolor] at ([xshift=\pgfPT@perlabel@xshift,yshift=\pgfPT@CS@yshift]\Z) {\pgfPT@printnum{6}};}%
                \ifpgfPTLaAclabels\pgfPT@processbackcolor{57}%
                    \node[below left,font=\pgfPTlabLaAcfont,text=cpgfPTTMP,inner ysep=0pt,text width=\pgfPT@labelboxwd] at ([xshift=\pgfPT@perlabel@xshift]\Z)%
                    {\pgfPT@tmp@label@defaultLanguage\ifnum\pgfPT@counta>1\relax\fontsize{\pgfPT@dima}{\pgfPT@dima}\selectfont\\ [-1pt]\pgfPT@tmp@labels@otherLanguages\fi};\fi%
                \breakforeach\fi%
        }%
    \ifpgfPTis@labeldrawn\global\pgfPTis@labeldrawnfalse\breakforeach\fi%
    }%
\ifnum\pgfPT@fontspec=1\relax\setmainfont{\pgfPTglobalfont}\else\fontfamily{\pgfPTglobalfont}\selectfont\fi\fontseries{\seriesdefault}\fontshape{\shapedefault}%
\fi%
\ifnum\pgfPT@fontspec=1\relax\setmainfont{\pgfPTglobalfont}\else\fontfamily{\pgfPTglobalfont}\selectfont\fi\fontseries{\seriesdefault}\fontshape{\shapedefault}%
% actinoids -->
\global\pgfPTis@labeldrawnfalse%
\ifpgfPTIUPACMMIX%
    \pgfPT@setlabels[\pgfPTlanguages]{Ac}%
    \edef\pgfPT@tmp@label@defaultLanguage{}\edef\pgfPT@tmp@labels@otherLanguages{}\pgfPT@counta=0\relax%
    \@for\pgfPT@tmp:=\pgfPTlanguages\do{%
        \ifnum\pgfPT@counta=0\relax%
            \edef\pgfPT@tmp@label@defaultLanguage{\csname pgfPT@labels@Ac@\pgfPT@tmp\endcsname}%
        \else%
            \edef\pgfPT@tmp@labels@otherLanguages{\pgfPT@tmp@labels@otherLanguages\hbox to 0pt{\hfil\csname pgfPT@labels@Ac@\pgfPT@tmp\endcsname\hfil}\vskip-1pt}%
        \fi%
        \advance\pgfPT@counta by 1\relax%
    }%
    \pgfPTlabLaAcfont\selectfont\pgfmathsetlength{\pgfPT@dima}{.75*\f@size}%
    \pgfmathparse{width("\noexpand\pgfPT@tmp@label@defaultLanguage")}%
    \edef\pgfPT@labelboxwd{\pgfmathresult}%
    \ifnum\pgfPT@fontspec=1\relax\setmainfont{\pgfPTglobalfont}\else\fontfamily{\pgfPTglobalfont}\selectfont\fi\fontseries{\seriesdefault}\fontshape{\shapedefault}%
    \foreach \Zsearch in \pgfPT@cells@actinoids{%
        \foreach \Z in \pgfPT@@cellslist {%
            \ifnum\Z=\Zsearch\global\pgfPTis@labeldrawntrue%
            {\pgfPTlabfont\pgfPTnumberfont\ifpgfPT@zhnumbers@per\let\pgfPT@printnum\zhnumber\else\let\pgfPT@printnum\relax\fi%
            \node[left,font=\pgfPTlabfont,text=\pgfPTlabpercolor] at ([xshift=\pgfPT@perlabel@xshift,yshift=\pgfPT@CS@yshift]\Z) {\pgfPT@printnum{7}};}%
            \ifpgfPTLaAclabels\pgfPT@processbackcolor{89}%
            \node[below left,font=\pgfPTlabLaAcfont,text=cpgfPTTMP,inner ysep=0pt,text width=\pgfPT@labelboxwd] at ([xshift=\pgfPT@perlabel@xshift]\Z)%
                    {\pgfPT@tmp@label@defaultLanguage\ifnum\pgfPT@counta>1\relax\fontsize{\pgfPT@dima}{\pgfPT@dima}\selectfont\\ [-1pt]\pgfPT@tmp@labels@otherLanguages\fi};\fi%
        \breakforeach\fi%
        }%
    \ifpgfPTis@labeldrawn\global\pgfPTis@labeldrawnfalse\breakforeach\fi%
    }%
\else%
    \pgfPT@setlabels[\pgfPTlanguages]{Ac}%
    \edef\pgfPT@tmp@label@defaultLanguage{}\edef\pgfPT@tmp@labels@otherLanguages{}\pgfPT@counta=0\relax%
    \@for\pgfPT@tmp:=\pgfPTlanguages\do{%
        \ifnum\pgfPT@counta=0\relax%
            \edef\pgfPT@tmp@label@defaultLanguage{\csname pgfPT@labels@Ac@\pgfPT@tmp\endcsname}%
        \else%
            \edef\pgfPT@tmp@labels@otherLanguages{\pgfPT@tmp@labels@otherLanguages\hbox to 0pt{\hfil\csname pgfPT@labels@Ac@\pgfPT@tmp\endcsname\hfil}\vskip-1pt}%
        \fi%
        \advance\pgfPT@counta by 1\relax%
    }%
    \pgfPTlabLaAcfont\selectfont\pgfmathsetlength{\pgfPT@dima}{.75*\f@size}%
    \pgfmathparse{width("\noexpand\pgfPT@tmp@label@defaultLanguage")}%
    \edef\pgfPT@labelboxwd{\pgfmathresult}%
    \ifnum\pgfPT@fontspec=1\relax\setmainfont{\pgfPTglobalfont}\else\fontfamily{\pgfPTglobalfont}\selectfont\fi\fontseries{\seriesdefault}\fontshape{\shapedefault}%
    \foreach \Zsearch in \pgfPT@cells@Ac{%
        \foreach \Z in \pgfPT@@cellslist {%
            \ifnum\Z=\Zsearch\global\pgfPTis@labeldrawntrue%
                {\pgfPTlabfont\pgfPTnumberfont\ifpgfPT@zhnumbers@per\let\pgfPT@printnum\zhnumber\else\let\pgfPT@printnum\relax\fi%
                \node[left,font=\pgfPTlabfont,text=\pgfPTlabpercolor] at ([xshift=\pgfPT@perlabel@xshift,yshift=\pgfPT@CS@yshift]\Z) {\pgfPT@printnum{7}};}%
                \ifpgfPTLaAclabels\pgfPT@processbackcolor{89}%
                    \node[below left,font=\pgfPTlabLaAcfont,text=cpgfPTTMP,inner ysep=0pt,text width=\pgfPT@labelboxwd] at ([xshift=\pgfPT@perlabel@xshift]\Z)%
                    {\pgfPT@tmp@label@defaultLanguage\ifnum\pgfPT@counta>1\relax\fontsize{\pgfPT@dima}{\pgfPT@dima}\selectfont\\ [-1pt]\pgfPT@tmp@labels@otherLanguages\fi};\fi%
                \breakforeach\fi%
        }%
    \ifpgfPTis@labeldrawn\global\pgfPTis@labeldrawnfalse\breakforeach\fi%
    }%
\ifnum\pgfPT@fontspec=1\relax\setmainfont{\pgfPTglobalfont}\else\fontfamily{\pgfPTglobalfont}\selectfont\fi\fontseries{\seriesdefault}\fontshape{\shapedefault}%
\fi%
\ifnum\pgfPT@fontspec=1\relax\setmainfont{\pgfPTglobalfont}\else\fontfamily{\pgfPTglobalfont}\selectfont\fi\fontseries{\seriesdefault}\fontshape{\shapedefault}%
\fi%
% groups --> changed in v2.1.5 to accommodate IUPAC*/CAS* with zhnumbers
\ifpgfPTgrlabels%
\global\pgfPTis@labeldrawnfalse%
\pgfPT@gr@numbers{\pgfPTgrnum}% new in v2.1.1
\ifpgfPTIUPACMMIX% IUPAC TRUE
\foreach \group in {1,2,4,5,...,18} {%
    \edef\pgfPT@@grlist{\csname pgfPT@cells@G\@Roman\group\endcsname}%
    \foreach \Zsearch in \pgfPT@@grlist{%
        \foreach \Z in \pgfPT@@cellslist {%
            \ifnum\Z=\Zsearch\global\pgfPTis@labeldrawntrue%
                {% begin font group
                \pgfPTlabfont\pgfPTnumberfont\colorlet{pgfPT@grcolor}{\pgfPTlabgrcolor}%
                \ifpgfPT@zhnumbers@gr%
                    \ifpgfPT@grRoman\let\pgfPT@printnum\pgfPT@gr@Roman\colorlet{pgfPT@grcolor}{\pgfPTRomanlabgrcolor}\else\let\pgfPT@printnum\zhnumber\fi%
                \else%
                    \ifpgfPT@grUSER\let\pgfPT@printnum\pgfPT@USER@grlabel\relax\else% new in v2.1.6
                    \ifpgfPT@grRoman\let\pgfPT@printnum\pgfPT@gr@Roman\colorlet{pgfPT@grcolor}{\pgfPTRomanlabgrcolor}\else%
                    \let\pgfPT@printnum\relax\fi\fi%
                \fi%
                \node[above,font=\pgfPTlabfont,text=pgfPT@grcolor] at%
                ([xshift=\pgfPT@@xshift,yshift=\pgfPT@grlabel@yshift]\Z) {\pgfPT@printnum{\group}};
                \ifpgfPT@grarabic\colorlet{pgfPT@grcolor}{\pgfPTlabgrcolor}%
                \ifpgfPT@zhnumbers@gr\let\pgfPT@printnum\zhnumber\else\let\pgfPT@printnum\relax\fi%
                \node[above,font=\pgfPTlabfont,text=pgfPT@grcolor] at%
                ([xshift=\pgfPT@@xshift,yshift=\pgfPT@grlabel@yshift+2ex]\Z) {\pgfPT@printnum{\group}};\fi
                }% end font group
            \breakforeach\fi% End \ifnum\Z=\Zsearch
        }% End foreach \Z
        \ifpgfPTis@labeldrawn\global\pgfPTis@labeldrawnfalse\breakforeach\fi%
    }% End foreach \Zsearch
}% End foreach \group
\global\pgfPTis@labeldrawnfalse%
\foreach \Zsearch in \pgfPT@cells@GIIILaAc{%
    \foreach \Z in \pgfPT@@cellslist {%
        \ifnum\Z=\Zsearch\global\pgfPTis@labeldrawntrue%
        {\pgfPTlabfont\pgfPTnumberfont\colorlet{pgfPT@grcolor}{\pgfPTlabgrcolor}
            \ifpgfPT@zhnumbers@gr%
                \ifpgfPT@grRoman\let\pgfPT@printnum\pgfPT@gr@Roman\colorlet{pgfPT@grcolor}{\pgfPTRomanlabgrcolor}\else\let\pgfPT@printnum\zhnumber\fi%
            \else%
                \ifpgfPT@grUSER\let\pgfPT@printnum\pgfPT@USER@grlabel\relax\else% new in v2.1.6
                \ifpgfPT@grRoman\let\pgfPT@printnum\pgfPT@gr@Roman\colorlet{pgfPT@grcolor}{\pgfPTRomanlabgrcolor}\else%
                \let\pgfPT@printnum\relax\fi\fi%
            \fi%
            \node[above,font=\pgfPTlabfont,text=pgfPT@grcolor] at%
            ([xshift=\pgfPT@@xshift,yshift=\pgfPT@grlabel@yshift]\Z) {\pgfPT@printnum{3}};
            \ifpgfPT@grarabic\colorlet{pgfPT@grcolor}{\pgfPTlabgrcolor}%
            \ifpgfPT@zhnumbers@gr\let\pgfPT@printnum\zhnumber\else\let\pgfPT@printnum\relax\fi%
            \node[above,font=\pgfPTlabfont,text=pgfPT@grcolor] at%
            ([xshift=\pgfPT@@xshift,yshift=\pgfPT@grlabel@yshift+2ex]\Z) {\pgfPT@printnum{3}};\fi}%
        \breakforeach\fi%
    }%
    \ifpgfPTis@labeldrawn\global\pgfPTis@labeldrawnfalse\breakforeach\fi%
}% End foreach
\else% IUPAC FALSE
\foreach \group in {1,...,18} {%
    \edef\pgfPT@@grlist{\csname pgfPT@cells@G\@Roman\group\endcsname}%
    \foreach \Zsearch in \pgfPT@@grlist{%
        \foreach \Z in \pgfPT@@cellslist {%
            \ifnum\Z=\Zsearch\global\pgfPTis@labeldrawntrue%
            {\pgfPTlabfont\pgfPTnumberfont\colorlet{pgfPT@grcolor}{\pgfPTlabgrcolor}
            \ifpgfPT@zhnumbers@gr%
                \ifpgfPT@grRoman\let\pgfPT@printnum\pgfPT@gr@Roman\colorlet{pgfPT@grcolor}{\pgfPTRomanlabgrcolor}\else\let\pgfPT@printnum\zhnumber\fi%
            \else%
                \ifpgfPT@grUSER\let\pgfPT@printnum\pgfPT@USER@grlabel\relax\else% new in v2.1.6
                \ifpgfPT@grRoman\let\pgfPT@printnum\pgfPT@gr@Roman\colorlet{pgfPT@grcolor}{\pgfPTRomanlabgrcolor}\else%
                \let\pgfPT@printnum\relax\fi\fi%
            \fi%%
            \node[above,font=\pgfPTlabfont,text=pgfPT@grcolor] at%
            ([xshift=\pgfPT@@xshift,yshift=\pgfPT@grlabel@yshift]\Z) {\pgfPT@printnum{\group}};%
            \ifpgfPT@grarabic\colorlet{pgfPT@grcolor}{\pgfPTlabgrcolor}%
            \ifpgfPT@zhnumbers@gr\let\pgfPT@printnum\zhnumber\else\let\pgfPT@printnum\relax\fi%
            \node[above,font=\pgfPTlabfont,text=pgfPT@grcolor] at%
            ([xshift=\pgfPT@@xshift,yshift=\pgfPT@grlabel@yshift+2ex]\Z) {\pgfPT@printnum{\group}};\fi}%
            \breakforeach\fi%
        }%
        \ifpgfPTis@labeldrawn\global\pgfPTis@labeldrawnfalse\breakforeach\fi%
    }%
}% End foreach
\fi% End \ifpgfPTIUPACMMIX
\fi% End \ifpgfPTgrlabels
% End of labels
%
% Legend and title ----->
% title -->
\ifpgfPTtitulo\pgfPT@setlabels[\pgfPTlanguages]{titulo}%
%
\edef\pgfPT@tmp@titulo@defaultLanguage{}\edef\pgfPT@tmp@titulo@otherLanguages{}\pgfPT@counta=0\relax%
\pgfmathsetlength{\pgfPT@boxwd}{18*\pgfPTcellwd}%
            \@for\pgfPT@tmp:=\pgfPTlanguages\do{%
                \ifnum\pgfPT@counta=0\relax%
                    \edef\pgfPT@tmp@titulo@defaultLanguage{\csname pgfPT@labels@titulo@\pgfPT@tmp\endcsname}%
                \else%
                    \edef\pgfPT@tmp@titulo@otherLanguages{\pgfPT@tmp@titulo@otherLanguages\hbox to \pgfPT@boxwd{\hfil\mbox{\csname pgfPT@labels@titulo@\pgfPT@tmp\endcsname}\hfil}}%
                \fi%
                \advance\pgfPT@counta by 1\relax%
                }%
            \node[font=\pgfPTtitlefont,text=\pgfPTtitlecolor,above right,text width=18*\pgfPTcellwd,text centered,inner xsep=0pt,text depth=0pt] (theTitle) at (title)% v2.1.6: added -> text depth=0pt
            {\pgfPT@tmp@titulo@defaultLanguage};%
            \ifnum\pgfPT@counta>1\relax%
                \pgfPTtitlefont\selectfont\pgfmathsetlength{\pgfPT@dima}{.75*\f@size}%
                \node[font=\pgfPTotherLangFont\fontsize{\pgfPT@dima}{\pgfPT@dima}\selectfont,text=\pgfPTotherLangColor,below,text width=18*\pgfPTcellwd,text centered,inner xsep=0pt] at ([yshift={-.1*\pgfPTcellht}]theTitle.south)% v2.16: -.075*\pgfPTcellht -> -.1*\pgfPTcellht
                {\vbox{\pgfPT@tmp@titulo@otherLanguages}};%
                \ifnum\pgfPT@fontspec=1\relax\setmainfont{\pgfPTglobalfont}\else\fontfamily{\pgfPTglobalfont}\selectfont\fi\fontseries{\seriesdefault}\fontshape{\shapedefault}%
            \fi%
\fi%
% legend -->
\ifpgfPTlegenda%
\pgfPT@countb=0\relax\@for\pgfPT@tmp:=\pgfPTlanguages\do{\advance\pgfPT@countb by 1\relax}%
\ifpgfPTlegacro% use acronyms ##############################################
\draw[fill=\pgfPTlegendbackcolor,draw=\pgfPTcelllinecolor,line width=\pgfPTcelllinewd] (0) rectangle ++(\pgfPTcellwd,-\pgfPTcellht);%
    % append the Z box
    \ifpgfPT@Z%
        \ifpgfPT@overrideacros% new v2.1.6 -> using custom acronyms
        \pgfPT@setacro[\pgfPTlanguages]{Z}%
        \node[fill=\pgfPTZback,font=\pgfPTZfont,text=\pgfPTZcolor,below right,inner sep=1.5pt] (LZ)%
            at ([xshift=\pgfPT@data@Z@x,yshift=-\pgfPT@data@Z@y]0) {\pgfPT@theacro};%
        \else%
        \node[fill=\pgfPTZback,font=\pgfPTZfont,text=\pgfPTZcolor,below right,inner sep=1.5pt] (LZ)%
            at ([xshift=\pgfPT@data@Z@x,yshift=-\pgfPT@data@Z@y]0) {Z};%
        \fi%
    \fi%
    % the Chemical Symbol
    \ifpgfPT@CS%
        \pgfPT@extract@rgb@fill{\pgfPTlegendCScolor}%
        \pgfPTCSfont\selectfont%
        \ifnum\pgfPT@countb=2\relax\pgfmathsetlength{\pgfPT@dima}{.5*\f@size}\pgfmathsetlength{\pgfPT@dimb}{.3*\f@size}%
            \else\ifnum\pgfPT@countb>2\relax\pgfmathsetlength{\pgfPT@dima}{.35*\f@size}\pgfmathsetlength{\pgfPT@dimb}{.2*\f@size}%
            \else\pgfmathsetlength{\pgfPT@dima}{.6*\f@size}\fi\fi%
        \pgfPT@setacro[\pgfPTlanguages]{CS}%
        \node[font=\pgfPTCSfont,text width=\pgfPT@data@CS@wd,text centered,text depth=0pt,minimum height=\pgfPT@data@CS@ht] (LCS)%
        at ([xshift=\pgfPT@data@CS@x,yshift=-\pgfPT@data@CS@y]0)
        {\pgfPT@lt[\pgfPTCSolwd](\pgfPT@theacro)(\pgfPT@rs,\pgfPT@gs,\pgfPT@bs)(\pgfPT@rf,\pgfPT@gf,\pgfPT@bf)(\pgfPT@CS@txt@render)};
        % pin it...
        \ifpgfPTlegendapins%
        \pgfmathsetlength{\pgfPT@dimc}{\pgfPT@data@CS@x+\pgfPT@data@CS@wd}%
        \ifdim\pgfPT@dimc<\pgfPTcellwd\pgfmathsetlength{\pgfPT@dimc}{\pgfPTcellwd-\pgfPT@dimc}\else\pgfmathsetlength{\pgfPT@dimc}{0pt}\fi%
        \draw[fill=black!30,line width=.05pt,draw=black!50] (LCS.east) circle(.05*\pgfPTcellwd) ++(.05*\pgfPTcellwd,0) -- ++(\pgfPT@dimc+.35*\pgfPTcellwd,0);
        \pgfPTCSfont\selectfont\ifnum\pgfPT@countb>1\relax\pgfmathsetlength{\pgfPT@dima}{.35*\f@size}\pgfmathsetlength{\pgfPT@dimb}{.25*\f@size}
        \else\pgfmathsetlength{\pgfPT@dima}{.35*\f@size}\fi%
        %\fontsize{\pgfPT@doc@fsize}{\pgfPT@doc@fsize}\selectfont\relax%
        %\fontsize{\pgfPTlegendacrofontsize}{\pgfPTlegendacrofontsize}\selectfont\relax%
        \ifx\pgfPT@lang@cyrilic\undefined\relax% ukrainian or russian -> new if in v2.1.6
            \ifx\pgfPT@fitwidthtrue\undefined\relax% no fitting the page width -> new if in v2.1.6
            \def\pgfPT@txtwd@factor{0.75}\else\def\pgfPT@txtwd@factor{0.975}\fi%
        \else% ukrainian or russian
        \def\pgfPT@txtwd@factor{1}\fi%
        \node[legendpins,%
                text width={\pgfPT@txtwd@factor*\pgfPTcellwd+.2*(\pgfPT@countb-1)*\pgfPTcellwd-4pt},font=\fontsize{\the\pgfPT@dima}{\the\pgfPT@dima}\selectfont,inner xsep=2pt,inner ysep=1pt]%
                at ([xshift={\pgfPT@dimc+.2*\pgfPTcellwd},yshift={.25*\pgfPT@data@CS@ht}]LCS.east)%
                {%
                \pgfPT@extract@rgb@fill{solido}\pgfPT@pinEstado{solido}%
                \pgfPT@lt[\pgfPTCSolwd](\pgfPT@tmp@label@defaultLanguage)(\pgfPT@rs,\pgfPT@gs,\pgfPT@bs)(\pgfPT@rf,\pgfPT@gf,\pgfPT@bf)(\pgfPT@CS@txt@render)%
                \ifnum\pgfPT@counta>1\relax\\ [-.5ex]%
                {\fontsize{\the\pgfPT@dimb}{\the\pgfPT@dimb}\selectfont%
                \pgfPT@lt[\pgfPTCSolwd](\pgfPT@tmp@labels@otherLanguages)(\pgfPT@rs,\pgfPT@gs,\pgfPT@bs)(\pgfPT@rf,\pgfPT@gf,\pgfPT@bf)(\pgfPT@CS@txt@render)%
                }\fi%
                \\ [.5ex]\pgfPT@extract@rgb@fill{liquido}\pgfPT@pinEstado{liquido}%
                \pgfPT@lt[\pgfPTCSolwd](\pgfPT@tmp@label@defaultLanguage)(\pgfPT@rs,\pgfPT@gs,\pgfPT@bs)(\pgfPT@rf,\pgfPT@gf,\pgfPT@bf)(\pgfPT@CS@txt@render)%
                \ifnum\pgfPT@counta>1\relax\\ [-.5ex]%
                {\fontsize{\the\pgfPT@dimb}{\the\pgfPT@dimb}\selectfont%
                \pgfPT@lt[\pgfPTCSolwd](\pgfPT@tmp@labels@otherLanguages)(\pgfPT@rs,\pgfPT@gs,\pgfPT@bs)(\pgfPT@rf,\pgfPT@gf,\pgfPT@bf)(\pgfPT@CS@txt@render)%
                }\fi%
                \\ [.5ex]\pgfPT@extract@rgb@fill{gasoso}\pgfPT@pinEstado{gasoso}%
                \pgfPT@lt[\pgfPTCSolwd](\pgfPT@tmp@label@defaultLanguage)(\pgfPT@rs,\pgfPT@gs,\pgfPT@bs)(\pgfPT@rf,\pgfPT@gf,\pgfPT@bf)(\pgfPT@CS@txt@render)%
                \ifnum\pgfPT@counta>1\relax\\ [-.5ex]%
                {\fontsize{\the\pgfPT@dimb}{\the\pgfPT@dimb}\selectfont%
                \pgfPT@lt[\pgfPTCSolwd](\pgfPT@tmp@labels@otherLanguages)(\pgfPT@rs,\pgfPT@gs,\pgfPT@bs)(\pgfPT@rf,\pgfPT@gf,\pgfPT@bf)(\pgfPT@CS@txt@render)%
                }\fi%
                \\ [.5ex]\pgfPT@extract@rgb@fill{sintetico}\pgfPT@pinEstado{sintetico}%
                \pgfPT@lt[\pgfPTCSolwd](\pgfPT@tmp@label@defaultLanguage)(\pgfPT@rs,\pgfPT@gs,\pgfPT@bs)(\pgfPT@rf,\pgfPT@gf,\pgfPT@bf)(\pgfPT@CS@txt@render)%
                \ifnum\pgfPT@counta>1\relax\\ [-.5ex]%
                {\fontsize{\the\pgfPT@dimb}{\the\pgfPT@dimb}\selectfont%
                \pgfPT@lt[\pgfPTCSolwd](\pgfPT@tmp@labels@otherLanguages)(\pgfPT@rs,\pgfPT@gs,\pgfPT@bs)(\pgfPT@rf,\pgfPT@gf,\pgfPT@bf)(\pgfPT@CS@txt@render)%
                }\fi%
                };%
        \fi\fi%
        \ifnum\pgfPT@fontspec=1\relax\setmainfont{\pgfPTglobalfont}\else\fontfamily{\pgfPTglobalfont}\selectfont\fi\fontseries{\seriesdefault}\fontshape{\shapedefault}%
    % the Name
    \ifpgfPT@name%
        \ifpgfPT@overrideacros% new v2.1.6 -> using custom acronyms
        \pgfPT@setacro[\pgfPTlanguages]{name}%
        \node[font=\pgfPTnamefont,text=\pgfPTnamecolor,text width=\pgfPT@data@name@wd,align=\pgfPTnamealign,inner xsep=0pt,%
                  text depth=0pt,minimum height=\pgfPT@data@name@ht]%
            at ([xshift=\pgfPT@data@name@x,yshift=-\pgfPT@data@name@y]0) {\pgfPT@theacro};%
        \else%
        \node[font=\pgfPTnamefont,text=\pgfPTnamecolor,text width=\pgfPT@data@name@wd,align=\pgfPTnamealign,inner xsep=0pt,%
                  text depth=0pt,minimum height=\pgfPT@data@name@ht]%
            at ([xshift=\pgfPT@data@name@x,yshift=-\pgfPT@data@name@y]0)%
            {N};%
        \fi%
    \fi%
    % the Atomic weight
    \ifpgfPT@Ar%
        \edef\pgfPT@tmptest{\pgfPTArlabel}\edef\pgfPT@tmp@m{m}%
        \ifx\pgfPT@tmptest\pgfPT@tmp@m\relax\let\pgfPT@labels@Ar\pgfPT@labels@Ar@m\else\let\pgfPT@labels@Ar\pgfPT@labels@Ar@w\fi%
        \ifpgfPT@overrideacros% new v2.1.6 -> using custom acronyms
        \pgfPT@setacro[\pgfPTlanguages]{Ar}%
        \node[font=\pgfPTArfont,text=\pgfPTArcolor,text width=\pgfPT@data@Ar@wd,text centered,inner xsep=0pt,%
                  text depth=0pt,minimum height=\pgfPT@data@Ar@ht]%
            at ([xshift=\pgfPT@data@Ar@x,yshift=-\pgfPT@data@Ar@y]0)%
            {\pgfPT@theacro};%
        \else%
        \node[font=\pgfPTArfont,text=\pgfPTArcolor,text width=\pgfPT@data@Ar@wd,text centered,inner xsep=0pt,%
                  text depth=0pt,minimum height=\pgfPT@data@Ar@ht]%
            at ([xshift=\pgfPT@data@Ar@x,yshift=-\pgfPT@data@Ar@y]0)%
            {Ar};%
        \fi%
    \fi%
    \ifpgfPT@Arstar%
        \edef\pgfPT@tmptest{\pgfPTArlabel}\edef\pgfPT@tmp@m{m}%
        \ifx\pgfPT@tmptest\pgfPT@tmp@m\relax\let\pgfPT@labels@Arstar\pgfPT@labels@Arstar@m\else\let\pgfPT@labels@Arstar\pgfPT@labels@Arstar@w\fi%
        \ifpgfPT@overrideacros% new v2.1.6 -> using custom acronyms
        \pgfPT@setacro[\pgfPTlanguages]{Ar}%
        \node[font=\pgfPTArfont,text=\pgfPTArcolor,text width=\pgfPT@data@Arstar@wd,text centered,inner xsep=0pt,%
                  text depth=0pt,minimum height=\pgfPT@data@Arstar@ht]%
            at ([xshift=\pgfPT@data@Arstar@x,yshift=-\pgfPT@data@Arstar@y]0)%
            {\pgfPT@theacro};%
        \else%
        \node[font=\pgfPTArfont,text=\pgfPTArcolor,text width=\pgfPT@data@Arstar@wd,text centered,inner xsep=0pt,%
                  text depth=0pt,minimum height=\pgfPT@data@Arstar@ht]%
            at ([xshift=\pgfPT@data@Arstar@x,yshift=-\pgfPT@data@Arstar@y]0)%
            {Ar};%
        \fi%
    \fi%
    % radioactivity
    \ifpgfPT@radio%
    \pgfPTotherLangFont\selectfont%
    \ifx\pgfPT@fitwidthtrue\undefined\relax% no fitting the page width -> new if in v2.1.6
    \pgfmathsetlength{\pgfPT@dima}{.85*\f@size}\else\pgfmathsetlength{\pgfPT@dima}{.5*\f@size}\fi%
    \node[text width=\pgfPT@data@radio@wd,text centered,inner sep=0pt,opacity=\ifpgfPT@radiosymbolisimage.25\else1\fi,font=\pgfPTradiofont,\pgfPTradiofontcolor] (Lradio)%
    at ([xshift=\pgfPT@data@radio@x,yshift=-\pgfPT@data@radio@y]0)
%    {\includegraphics[height=\pgfPT@data@radio@ht]{pgfPT_radio_symbol.pdf}};%
    {\ifpgfPT@radiosymbolisimage\usebox{\pgfPT@radiobox}\else\pgfPT@radiobox@text\fi};%
        \ifpgfPT@overrideacros% new v2.1.6 -> using custom acronyms
        \pgfPT@setacro[\pgfPTlanguages]{radio}%
        \node[text width=\pgfPT@data@radio@wd,text centered,inner sep=0pt,font=\fontsize{\the\pgfPT@dima}{\the\pgfPT@dima}\selectfont,%
             text depth=0pt,minimum height=\pgfPT@data@radio@ht,text=\pgfPTlegendradiocolor]%
        at ([xshift=\pgfPT@data@radio@x,yshift=-\pgfPT@data@radio@y]0) {\pgfPT@theacro};%
        \else%
        \node[text width=\pgfPT@data@radio@wd,text centered,inner sep=0pt,font=\fontsize{\the\pgfPT@dima}{\the\pgfPT@dima}\selectfont,%
             text depth=0pt,minimum height=\pgfPT@data@radio@ht,text=\pgfPTlegendradiocolor]%
        at ([xshift=\pgfPT@data@radio@x,yshift=-\pgfPT@data@radio@y]0) {\ifpgfPT@radiosymbolisimage Ra\fi};%
        \fi%
    \ifnum\pgfPT@fontspec=1\relax\setmainfont{\pgfPTglobalfont}\else\fontfamily{\pgfPTglobalfont}\selectfont\fi\fontseries{\seriesdefault}\fontshape{\shapedefault}%
    \fi%
    % R -> Atomic Radius (Empirycal)
    \ifpgfPT@R%
        \ifpgfPT@overrideacros% new v2.1.6 -> using custom acronyms
        \pgfPT@setacro[\pgfPTlanguages]{R}%
        \node[font=\pgfPTRfont,text=\pgfPTRcolor,text width=\pgfPT@data@R@wd,text centered,inner xsep=0pt,%
                  text depth=0pt,minimum height=\pgfPT@data@R@ht]%
            at ([xshift=\pgfPT@data@R@x,yshift=-\pgfPT@data@R@y]0)%
            {\pgfPT@theacro};%
        \else%
        \node[font=\pgfPTRfont,text=\pgfPTRcolor,text width=\pgfPT@data@R@wd,text centered,inner xsep=0pt,%
                  text depth=0pt,minimum height=\pgfPT@data@R@ht]%
            at ([xshift=\pgfPT@data@R@x,yshift=-\pgfPT@data@R@y]0)%
            {R};%
        \fi%
    \fi%
    % Rcov -> Covalente Radius
    \ifpgfPT@Rcov%
        \ifpgfPT@overrideacros% new v2.1.6 -> using custom acronyms
        \pgfPT@setacro[\pgfPTlanguages]{Rcov}%
        \node[font=\pgfPTRcovfont,text=\pgfPTRcovcolor,text width=\pgfPT@data@Rcov@wd,text centered,inner xsep=0pt,%
                  text depth=0pt,minimum height=\pgfPT@data@Rcov@ht]%
            at ([xshift=\pgfPT@data@Rcov@x,yshift=-\pgfPT@data@Rcov@y]0)%
            {\pgfPT@theacro};%
        \else%
        \node[font=\pgfPTRcovfont,text=\pgfPTRcovcolor,text width=\pgfPT@data@Rcov@wd,text centered,inner xsep=0pt,%
                  text depth=0pt,minimum height=\pgfPT@data@Rcov@ht]%
            at ([xshift=\pgfPT@data@Rcov@x,yshift=-\pgfPT@data@Rcov@y]0)%
            {Rc};%
        \fi%
    \fi%
    % Rion -> Ionic Radius
    \ifpgfPT@Rion%
        \ifpgfPT@overrideacros% new v2.1.6 -> using custom acronyms
        \pgfPT@setacro[\pgfPTlanguages]{Rion}%
        \node[font=\pgfPTRionfont,text=\pgfPTRioncolor,text width=\pgfPT@data@Rion@wd,text centered,inner xsep=0pt,%
                  text depth=0pt,minimum height=\pgfPT@data@Rion@ht]%
            at ([xshift=\pgfPT@data@Rion@x,yshift=-\pgfPT@data@Rion@y]0)%
            {\pgfPT@theacro};%
        \else%
        \node[font=\pgfPTRionfont,text=\pgfPTRioncolor,text width=\pgfPT@data@Rion@wd,text centered,inner xsep=0pt,%
                  text depth=0pt,minimum height=\pgfPT@data@Rion@ht]%
            at ([xshift=\pgfPT@data@Rion@x,yshift=-\pgfPT@data@Rion@y]0)%
            {Ri};%
        \fi%
    \fi%
    % Ei -> First Ionization Energy
    \ifpgfPT@Ei%
        \ifpgfPT@overrideacros% new v2.1.6 -> using custom acronyms
        \pgfPT@setacro[\pgfPTlanguages]{Ei}%
        \node[font=\pgfPTEifont,text=\pgfPTEicolor,text width=\pgfPT@data@Ei@wd,text centered,inner xsep=0pt,%
                  text depth=0pt,minimum height=\pgfPT@data@Ei@ht]%
            at ([xshift=\pgfPT@data@Ei@x,yshift=-\pgfPT@data@Ei@y]0)%
            {\pgfPT@theacro};%
        \else%
        \node[font=\pgfPTEifont,text=\pgfPTEicolor,text width=\pgfPT@data@Ei@wd,text centered,inner xsep=0pt,%
                  text depth=0pt,minimum height=\pgfPT@data@Ei@ht]%
            at ([xshift=\pgfPT@data@Ei@x,yshift=-\pgfPT@data@Ei@y]0)%
            {Ei};%
        \fi%
    \fi%
    % eneg -> Electronegativity (Pauling)
    \ifpgfPT@eneg%
        \ifpgfPT@overrideacros% new v2.1.6 -> using custom acronyms
        \pgfPT@setacro[\pgfPTlanguages]{eneg}%
        \node[font=\pgfPTenegfont,text=\pgfPTenegcolor,text width=\pgfPT@data@eneg@wd,text centered,inner xsep=0pt,%
                  text depth=0pt,minimum height=\pgfPT@data@eneg@ht]%
            at ([xshift=\pgfPT@data@eneg@x,yshift=-\pgfPT@data@eneg@y]0)%
            {\pgfPT@theacro};%
        \else%
        \node[font=\pgfPTenegfont,text=\pgfPTenegcolor,text width=\pgfPT@data@eneg@wd,text centered,inner xsep=0pt,%
                  text depth=0pt,minimum height=\pgfPT@data@eneg@ht]%
            at ([xshift=\pgfPT@data@eneg@x,yshift=-\pgfPT@data@eneg@y]0)%
            {en};%
        \fi%
    \fi%
    % eaff -> Electroaffinity
    \ifpgfPT@eaff%
        \ifpgfPT@overrideacros% new v2.1.6 -> using custom acronyms
        \pgfPT@setacro[\pgfPTlanguages]{eaff}%
        \node[font=\pgfPTeafffont,text=\pgfPTeaffcolor,text width=\pgfPT@data@eaff@wd,text centered,inner xsep=0pt,%
                  text depth=0pt,minimum height=\pgfPT@data@eaff@ht]%
            at ([xshift=\pgfPT@data@eaff@x,yshift=-\pgfPT@data@eaff@y]0)%
            {\pgfPT@theacro};%
        \else%
        \node[font=\pgfPTeafffont,text=\pgfPTeaffcolor,text width=\pgfPT@data@eaff@wd,text centered,inner xsep=0pt,%
                  text depth=0pt,minimum height=\pgfPT@data@eaff@ht]%
            at ([xshift=\pgfPT@data@eaff@x,yshift=-\pgfPT@data@eaff@y]0)%
            {Eea};%
        \fi%
    \fi%
    % O -> Oxidation States
    \ifpgfPT@O%
        \ifpgfPT@overrideacros% new v2.1.6 -> using custom acronyms
        \pgfPT@setacro[\pgfPTlanguages]{O}%
        \node[font=\pgfPTOfont,text=\pgfPTOcolor,text width=\pgfPT@data@O@wd,text centered,inner xsep=0pt,%
                  text depth=0pt,minimum height=\pgfPT@data@O@ht]%
            at ([xshift=\pgfPT@data@O@x,yshift=-\pgfPT@data@O@y]0)%
            {\pgfPT@theacro};%
        \else%
        \node[font=\pgfPTOfont,text=\pgfPTOcolor,text width=\pgfPT@data@O@wd,text centered,inner xsep=0pt,%
                  text depth=0pt,minimum height=\pgfPT@data@O@ht]%
            at ([xshift=\pgfPT@data@O@x,yshift=-\pgfPT@data@O@y]0)%
            {O};%
        \fi%
    \fi%
    % Tmelt -> Melting Point (Kelvin)
    \ifpgfPT@Tmelt%
        \pgfPT@setacro[\pgfPTlanguages]{Tmelt}%
        \node[font=\pgfPTTmeltfont,text=\pgfPTTmeltcolor,text width=\pgfPT@data@Tmelt@wd,text centered,inner xsep=0pt,%
                  text depth=0pt,minimum height=\pgfPT@data@Tmelt@ht]%
            at ([xshift=\pgfPT@data@Tmelt@x,yshift=-\pgfPT@data@Tmelt@y]0)%
            {\pgfPT@theacro\ifpgfPT@TmeltC\hspace{.15ex}K\fi};%{Tm};%
    \fi%
    % TmeltC -> Melting Point (degrees Celsius)
    \ifpgfPT@TmeltC%
        \pgfPT@setacro[\pgfPTlanguages]{TmeltC}%
        \node[font=\pgfPTTmeltCfont,text=\pgfPTTmeltCcolor,text width=\pgfPT@data@TmeltC@wd,text centered,inner xsep=0pt,%
                  text depth=0pt,minimum height=\pgfPT@data@TmeltC@ht]%
            at ([xshift=\pgfPT@data@TmeltC@x,yshift=-\pgfPT@data@TmeltC@y]0)%
            {\pgfPT@theacro\ifpgfPT@Tmelt\hspace{.15ex}C\fi};%{Tm};%
    \fi%
    % Tboil -> Boiling Point (Kelvin)
    \ifpgfPT@Tboil%
        \pgfPT@setacro[\pgfPTlanguages]{Tboil}%
        \node[font=\pgfPTTboilfont,text=\pgfPTTboilcolor,text width=\pgfPT@data@Tboil@wd,text centered,inner xsep=0pt,%
                  text depth=0pt,minimum height=\pgfPT@data@Tboil@ht]%
            at ([xshift=\pgfPT@data@Tboil@x,yshift=-\pgfPT@data@Tboil@y]0)%
            {\pgfPT@theacro\ifpgfPT@TboilC\hspace{.15ex}K\fi};%{Tb};%
    \fi%
    % TboilC -> Boiling Point (degrees Celsius)
    \ifpgfPT@TboilC%
        \pgfPT@setacro[\pgfPTlanguages]{TboilC}%
        \node[font=\pgfPTTboilCfont,text=\pgfPTTboilCcolor,text width=\pgfPT@data@TboilC@wd,text centered,inner xsep=0pt,%
                  text depth=0pt,minimum height=\pgfPT@data@TboilC@ht]%
            at ([xshift=\pgfPT@data@TboilC@x,yshift=-\pgfPT@data@TboilC@y]0)%
            {\pgfPT@theacro\ifpgfPT@Tboil\hspace{.15ex}C\fi};%{Tb};%
    \fi%
    % eDist -> Electron Distribuition
    \ifpgfPT@eDist%
        \pgfPT@setacro[\pgfPTlanguages]{eDist}%
        \node[font=\pgfPTeDistfont,text=\pgfPTeDistcolor,text width=\pgfPT@data@eDist@wd,text centered,inner xsep=0pt,%
                  text depth=0pt,minimum height=\pgfPT@data@eDist@ht]%
            at ([xshift=\pgfPT@data@eDist@x,yshift=-\pgfPT@data@eDist@y]0)%
            {\pgfPT@theacro};%
    \fi%
    % eConfign -> Electronic Configuration (increasing n)
    \ifpgfPT@eConfign%
        \pgfPT@setacro[\pgfPTlanguages]{eConfign}%
        \node[font=\pgfPTeConfignfont,text=\pgfPTeConfigncolor,text width=\pgfPT@data@eConfign@wd,text centered,inner xsep=0pt,%
                  text depth=0pt,minimum height=\pgfPT@data@eConfign@ht]%
            at ([xshift=\pgfPT@data@eConfign@x,yshift=-\pgfPT@data@eConfign@y]0)%
            {\pgfPT@theacro};%
    \fi%
    % eConfignl -> Electronic Configuration (increasing n+l)
    \ifpgfPT@eConfignl%
        \pgfPT@setacro[\pgfPTlanguages]{eConfignl}%
        \node[font=\pgfPTeConfignlfont,text=\pgfPTeConfignlcolor,text width=\pgfPT@data@eConfignl@wd,text centered,inner xsep=0pt,%
                  text depth=0pt,minimum height=\pgfPT@data@eConfignl@ht]%
            at ([xshift=\pgfPT@data@eConfignl@x,yshift=-\pgfPT@data@eConfignl@y]0)%
            {\pgfPT@theacro};%
    \fi%
    % d -> Density
    \ifpgfPT@d%
        \ifpgfPT@overrideacros% new v2.1.6 -> using custom acronyms
        \pgfPT@setacro[\pgfPTlanguages]{d}%
        \node[font=\pgfPTdfont,text=\pgfPTdcolor,text width=\pgfPT@data@d@wd,text centered,inner xsep=0pt,%
                  text depth=0pt,minimum height=\pgfPT@data@d@ht]%
            at ([xshift=\pgfPT@data@d@x,yshift=-\pgfPT@data@d@y]0)%
            {\pgfPT@theacro};%
        \else%
        \node[font=\pgfPTdfont,text=\pgfPTdcolor,text width=\pgfPT@data@d@wd,text centered,inner xsep=0pt,%
                  text depth=0pt,minimum height=\pgfPT@data@d@ht]%
            at ([xshift=\pgfPT@data@d@x,yshift=-\pgfPT@data@d@y]0)%
            {d};%
        \fi%
    \fi%
    % Cp -> Specific heat capacity (25ºC, 100kPa)
    \ifpgfPT@Cp%
        \ifpgfPT@overrideacros% new v2.1.6 -> using custom acronyms
        \pgfPT@setacro[\pgfPTlanguages]{Cp}%
        \node[font=\pgfPTCpfont,text=\pgfPTCpcolor,text width=\pgfPT@data@Cp@wd,text centered,inner xsep=0pt,%
                  text depth=0pt,minimum height=\pgfPT@data@Cp@ht]%
            at ([xshift=\pgfPT@data@Cp@x,yshift=-\pgfPT@data@Cp@y]0)%
            {\pgfPT@theacro};%
        \else%
        \node[font=\pgfPTCpfont,text=\pgfPTCpcolor,text width=\pgfPT@data@Cp@wd,text centered,inner xsep=0pt,%
                  text depth=0pt,minimum height=\pgfPT@data@Cp@ht]%
            at ([xshift=\pgfPT@data@Cp@x,yshift=-\pgfPT@data@Cp@y]0)%
            {Cp};%
        \fi%
    \fi%
    % kT -> Thermal Condutivity (25ºC)
    \ifpgfPT@kT%
        \ifpgfPT@overrideacros% new v2.1.6 -> using custom acronyms
        \pgfPT@setacro[\pgfPTlanguages]{kT}%
        \node[font=\pgfPTkTfont,text=\pgfPTkTcolor,text width=\pgfPT@data@kT@wd,text centered,inner xsep=0pt,%
                  text depth=0pt,minimum height=\pgfPT@data@kT@ht]%
            at ([xshift=\pgfPT@data@kT@x,yshift=-\pgfPT@data@kT@y]0)%
            {\pgfPT@theacro};%
        \else%
        \node[font=\pgfPTkTfont,text=\pgfPTkTcolor,text width=\pgfPT@data@kT@wd,text centered,inner xsep=0pt,%
                  text depth=0pt,minimum height=\pgfPT@data@kT@ht]%
            at ([xshift=\pgfPT@data@kT@x,yshift=-\pgfPT@data@kT@y]0)%
            {kT};%
        \fi%
    \fi%
    % ls -> Lattice Structure
    \ifpgfPT@ls%
        \pgfPT@setacro[\pgfPTlanguages]{ls}%
        \node[font=\pgfPTlsfont,text=\pgfPTlscolor,text width=\pgfPT@data@ls@wd,text centered,inner xsep=0pt,%
                  text depth=0pt,minimum height=\pgfPT@data@ls@ht]%
            at ([xshift=\pgfPT@data@ls@x,yshift=-\pgfPT@data@ls@y]0)%
            {\pgfPT@theacro};%
        \ifpgfPTlegendaextra%
            \pgfPTlsfont\selectfont%
                \ifnum\pgfPT@countb>1\relax\pgfmathsetlength{\pgfPT@dima}{.67*\f@size}\pgfmathsetlength{\pgfPT@dimb}{.55*\f@size}%
                \else\pgfmathsetlength{\pgfPT@dima}{.78*\f@size}\pgfmathsetlength{\pgfPT@dimb}{.625*\f@size}\fi%
                \ifpgfPT@DiscC% insere a legenda extra para a estrutura da rede (existindo as bandeiras)
                    \ifnum\pgfPT@countb>1\relax\pgfmathsetlength{\pgfPT@boxht}{.66*\f@size}\else\pgfmathsetlength{\pgfPT@boxht}{.75*\f@size}\fi%
                    \pgfmathsetlength{\pgfPT@boxwd}{.2*\pgfPTcellwd}%
                    \node[extralegend,%
                        text width=1.8*\pgfPTcellwd,font=\pgfPTlsfont\fontsize{\the\pgfPT@dima}{\the\pgfPT@dima}\selectfont,text=\pgfPTlscolor,%
                        inner xsep=2pt,inner ysep=1pt]
                        at (EXTRA) {%
                        \global\pgfPT@countc=0%
                        \@for\pgfPT@lssigla:={bcc,bcort,ctetr,dia,fcc,fcort,hcp,hex,mono,rho,sc,tric,tetr}\do{%
                            \pgfPT@legend{ls@\pgfPT@lssigla}%
                            \tikz{%
                                \node[text width=\pgfPT@boxwd,text centered,inner sep=0pt] (exFlag) at (0,0) %
                                    {\ifpgfPT@lsfig@extra\includegraphics[height=\pgfPT@boxht]{lattice/pgfPT_ls_\pgfPT@lssigla.pdf}\\ [-.75ex]\pgfPT@lssigla%
                                    \else\setbox0=\vbox{\includegraphics[height=\pgfPT@boxht]{lattice/pgfPT_ls_\pgfPT@lssigla.pdf}\vskip-.75ex\pgfPT@lssigla}%
                                    \vbox to\ht0{\vfill\pgfPT@box@smash{\pgfPT@lssigla}\vfill}\fi};% changed in v2.1.6
                                \node[below right,text width=1.55*\pgfPTcellwd,inner xsep=0pt] at ([xshift=.025*\pgfPTcellwd]exFlag.north east) {%
                                    \ifpgfPT@lsfig@extra%
                                    \pgfPT@box@zerodepth{\pgfPT@tmp@label@defaultLanguage}%
                                    \ifnum\pgfPT@counta>1\relax\\ {\fontsize{\the\pgfPT@dimb}{\the\pgfPT@dimb}\selectfont\color{\pgfPTotherLangColor}%
                                    \pgfPT@tmp@labels@otherLanguages}\fi%
                                    \else\setbox0=\vbox{\includegraphics[height=\pgfPT@boxht]{lattice/pgfPT_ls_\pgfPT@lssigla.pdf}\vskip-.75ex\pgfPT@lssigla}%
                                        \ifnum\pgfPT@counta>1\relax%
                                        \vbox to\ht0{\vfill\pgfPT@box@smash{\vbox{\pgfPT@box@zerodepth{\pgfPT@tmp@label@defaultLanguage}%
                                        \vskip0pt\fontsize{\the\pgfPT@dimb}{\the\pgfPT@dimb}\selectfont\color{\pgfPTotherLangColor}%
                                        \pgfPT@tmp@labels@otherLanguages}%
                                        }}%
                                        \else%
                                        \vbox to\ht0{\vfill\pgfPT@box@smash{\hskip1em\pgfPT@tmp@label@defaultLanguage}\vfill}%
                                        \fi%
                                    \fi%
                                };%
                            }%
                        \global\advance\pgfPT@countc by1\relax%
                        \ifnum\pgfPT@countc<13\relax\ifpgfPT@lsfig@extra\relax\vspace{-.27ex}\else\vspace{-.215ex}\fi\newline\fi% -.1775ex
                        }%
                    };
                \else% apenas a estrutura da rede
                    \pgfmathsetlength{\pgfPT@boxht}{.75*\f@size}%
                    \pgfmathsetlength{\pgfPT@boxwd}{.25*\pgfPTcellwd}%
                    \node[extralegend,%
                        text width=2*\pgfPTcellwd,font=\pgfPTlsfont\fontsize{\the\pgfPT@dima}{\the\pgfPT@dima}\selectfont,text=\pgfPTlscolor,%
                        inner xsep=2pt,inner ysep=1pt]
                        at ([xshift=\pgfPTcellwd]EXTRA) {%
                        \global\pgfPT@countc=0%
                        \@for\pgfPT@lssigla:={bcc,bcort,ctetr,dia,fcc,fcort,hcp,hex,mono,rho,sc,tric,tetr}\do{%
                            \pgfPT@legend{ls@\pgfPT@lssigla}%
                            \tikz{%
                                \node[text width=\pgfPT@boxwd,text centered,inner sep=0pt] (exFlag) at (0,0) %
                                    {\ifpgfPT@lsfig@extra\includegraphics[height=\pgfPT@boxht]{lattice/pgfPT_ls_\pgfPT@lssigla.pdf}\\ [-.75ex]\pgfPT@lssigla%
                                    \else\setbox0=\vbox{\includegraphics[height=\pgfPT@boxht]{lattice/pgfPT_ls_\pgfPT@lssigla.pdf}\vskip-.75ex\pgfPT@lssigla}%
                                    \vbox to\ht0{\vfill\pgfPT@box@smash{\pgfPT@lssigla}\vfill}\fi};% changed in v2.1.6
                                \node[below right,text width=1.55*\pgfPTcellwd,inner xsep=0pt] at ([xshift=.025*\pgfPTcellwd]exFlag.north east) {%
                                    \ifpgfPT@lsfig@extra%
                                    \pgfPT@box@zerodepth{\pgfPT@tmp@label@defaultLanguage}%
                                    \ifnum\pgfPT@counta>1\relax\\ {\fontsize{\the\pgfPT@dimb}{\the\pgfPT@dimb}\selectfont\color{\pgfPTotherLangColor}%
                                    \pgfPT@tmp@labels@otherLanguages}\fi%
                                    \else\setbox0=\vbox{\includegraphics[height=\pgfPT@boxht]{lattice/pgfPT_ls_\pgfPT@lssigla.pdf}\vskip-.75ex\pgfPT@lssigla}%
                                        \ifnum\pgfPT@counta>1\relax%
                                        \vbox to\ht0{\vfill\pgfPT@box@smash{\vbox{\pgfPT@box@zerodepth{\pgfPT@tmp@label@defaultLanguage}%
                                        \vskip0pt\fontsize{\the\pgfPT@dimb}{\the\pgfPT@dimb}\selectfont\color{\pgfPTotherLangColor}%
                                        \pgfPT@tmp@labels@otherLanguages}%
                                        }}%
                                        \else%
                                        \vbox to\ht0{\vfill\pgfPT@box@smash{\hskip1ex\pgfPT@tmp@label@defaultLanguage}\vfill}%
                                        \fi%
                                    \fi%
                                };%
                            }%
                        \global\advance\pgfPT@countc by1\relax%
                        \ifnum\pgfPT@countc<13\relax\vspace{-.1775ex}\newline\fi%
                        }%
                    };
                \fi%
                \ifnum\pgfPT@fontspec=1\relax\setmainfont{\pgfPTglobalfont}\else\fontfamily{\pgfPTglobalfont}\selectfont\fi\fontseries{\seriesdefault}\fontshape{\shapedefault}%
            \fi% legenda extra
    \fi%
    % lsa -> Lattice constant: a
    \ifpgfPT@lsa%
        \pgfPT@setacro[\pgfPTlanguages]{lsa}%
        \node[font=\pgfPTlsafont,text=\pgfPTlsacolor,text width=\pgfPT@data@lsa@wd,text centered,inner xsep=0pt,%
                  text depth=0pt,minimum height=\pgfPT@data@lsa@ht]%
            at ([xshift=\pgfPT@data@lsa@x,yshift=-\pgfPT@data@lsa@y]0)%
            {\pgfPT@theacro};%
    \fi%
    % lsb -> Lattice constant: b
    \ifpgfPT@lsb%
        \pgfPT@setacro[\pgfPTlanguages]{lsb}%
        \node[font=\pgfPTlsbfont,text=\pgfPTlsbcolor,text width=\pgfPT@data@lsb@wd,text centered,inner xsep=0pt,%
                  text depth=0pt,minimum height=\pgfPT@data@lsb@ht]%
            at ([xshift=\pgfPT@data@lsb@x,yshift=-\pgfPT@data@lsb@y]0)%
            {\pgfPT@theacro};%
    \fi%
    % lsc -> Lattice constant: c
    \ifpgfPT@lsc%
        \pgfPT@setacro[\pgfPTlanguages]{lsc}%
        \node[font=\pgfPTlscfont,text=\pgfPTlsccolor,text width=\pgfPT@data@lsc@wd,text centered,inner xsep=0pt,%
                  text depth=0pt,minimum height=\pgfPT@data@lsc@ht]%
            at ([xshift=\pgfPT@data@lsc@x,yshift=-\pgfPT@data@lsc@y]0)%
            {\pgfPT@theacro};%
    \fi%
    % lsca -> Lattice c/a ratio:
    \ifpgfPT@lsca%
        \pgfPT@setacro[\pgfPTlanguages]{lsca}%
        \node[font=\pgfPTlscafont,text=\pgfPTlscacolor,text width=\pgfPT@data@lsca@wd,text centered,inner xsep=0pt,%
                  text depth=0pt,minimum height=\pgfPT@data@lsca@ht]%
            at ([xshift=\pgfPT@data@lsca@x,yshift=-\pgfPT@data@lsca@y]0)%
            {\pgfPT@theacro};%
    \fi%
    % DiscY -> Discover Year
    \ifpgfPT@DiscY%
        \pgfPT@setacro[\pgfPTlanguages]{DiscY}%
        \node[font=\pgfPTDiscYfont,text=\pgfPTDiscYcolor,text width=\pgfPT@data@DiscY@wd,text centered,inner xsep=0pt,%
                  text depth=0pt,minimum height=\pgfPT@data@DiscY@ht]%
            at ([xshift=\pgfPT@data@DiscY@x,yshift=-\pgfPT@data@DiscY@y]0)%
            {\pgfPT@theacro};%
    \fi%
    % DiscC -> Discover Country
    \ifpgfPT@DiscC%
        \pgfPT@setacro[\pgfPTlanguages]{DiscC}%
        \node[font=\pgfPTDiscCfont,text=\pgfPTDiscCcolor,text width=\pgfPT@data@DiscC@wd,text centered,inner xsep=0pt,%
                  text depth=0pt,minimum height=\pgfPT@data@DiscC@ht]%
            at ([xshift=\pgfPT@data@DiscC@x,yshift=-\pgfPT@data@DiscC@y]0)%
            {\pgfPT@theacro};%
        \ifpgfPTlegendaextra%
            \pgfPTDiscCfont\selectfont%
                \ifnum\pgfPT@countb>1\relax\pgfmathsetlength{\pgfPT@dima}{.67*\f@size}\pgfmathsetlength{\pgfPT@dimb}{.55*\f@size}\edef\pgfPT@nodepos{below right}\edef\pgfPT@nodeat{north east}%
                \else\pgfmathsetlength{\pgfPT@dima}{.78*\f@size}\edef\pgfPT@nodepos{right}\edef\pgfPT@nodeat{east}\fi%
                \ifpgfPT@ls% insere a legenda extra para as bandeiras (existindo a estrutura da rede)
                    \pgfmathsetlength{\pgfPT@boxht}{.6*\f@size}%
                    \pgfmathsetlength{\pgfPT@boxwd}{.2*\pgfPTcellwd}%
                    \node[extralegend,%
                        text width=2*\pgfPTcellwd,font=\pgfPTDiscCfont\fontsize{\the\pgfPT@dima}{\the\pgfPT@dima}\selectfont,text=\pgfPTDiscCcolor,%
                        inner xsep=2pt,inner ysep=1pt]
                        at ([xshift=2*\pgfPTcellwd]EXTRA) {%
                    \@for\pgfPT@country:={0,1,2,3,4,5,8,11,12,13,14,15,17,18,20,21,22,25}\do{%
                        \pgfPT@set@country{\pgfPT@country}%
                        \tikz{%
                        \node[text width=\pgfPT@boxwd,text centered,inner sep=0pt] (exFlag) at (0,0) {\includegraphics[height=\pgfPT@boxht]{flags/\pgfPT@country@flag.pdf}};%
                        \global\pgfPT@countc=0%
                        \node[\pgfPT@nodepos,text width=1.75*\pgfPTcellwd,inner xsep=0pt] at ([xshift=.025*\pgfPTcellwd]exFlag.\pgfPT@nodeat) {%
                        \@for\pgfPT@tmp:=\pgfPTlanguages\do{%
                            \ifnum\pgfPT@countc=0\relax%
                                \pgfPT@box@zerodepth{\csname pgfPT@country@name@\pgfPT@tmp\endcsname}%
                                \else%
                                {\fontsize{\the\pgfPT@dimb}{\the\pgfPT@dimb}\selectfont\color{\pgfPTotherLangColor}
                                \ \pgfPT@box@zerodepth{\csname pgfPT@country@name@\pgfPT@tmp\endcsname}}%
                                \fi%
                            \global\advance\pgfPT@countc by1\relax%
                            }%
                            };%
                        }%
                        \ifnum\pgfPT@country<25\relax\vspace{1pt}\newline\fi%
                        }%
                    };
                \else% apenas as bandeiras
                    \pgfmathsetlength{\pgfPT@boxht}{.6*\f@size}%
                    \pgfmathsetlength{\pgfPT@boxwd}{.2*\pgfPTcellwd}%
                    \node[extralegend,%
                        text width=2.5*\pgfPTcellwd,font=\pgfPTDiscCfont\fontsize{\the\pgfPT@dima}{\the\pgfPT@dima}\selectfont,text=\pgfPTDiscCcolor,%
                        inner xsep=2pt,inner ysep=1pt]
                        at ([xshift=.875*\pgfPTcellwd]EXTRA) {%
                    \@for\pgfPT@country:={0,1,2,3,4,5,8,11,12,13,14,15,17,18,20,21,22,25}\do{%
                        \pgfPT@set@country{\pgfPT@country}%
                        \tikz{%
                        \node[text width=\pgfPT@boxwd,text centered,inner sep=0pt] (exFlag) at (0,0) {\includegraphics[height=\pgfPT@boxht]{flags/\pgfPT@country@flag.pdf}};%
                        \global\pgfPT@countc=0%
                        \node[below right,text width=3.75*\pgfPTcellwd,inner xsep=0pt] at ([xshift=.025*\pgfPTcellwd]exFlag.north east) {%
                        \@for\pgfPT@tmp:=\pgfPTlanguages\do{%
                            \ifnum\pgfPT@countc=0\relax%
                                \pgfPT@box@zerodepth{\csname pgfPT@country@name@\pgfPT@tmp\endcsname}%
                                \else%
                                {\fontsize{\the\pgfPT@dimb}{\the\pgfPT@dimb}\selectfont\color{\pgfPTotherLangColor}
                                \ \pgfPT@box@zerodepth{\csname pgfPT@country@name@\pgfPT@tmp\endcsname}}%
                                \fi%
                            \global\advance\pgfPT@countc by1\relax%
                            }%
                            };%
                        }%
                        \ifnum\pgfPT@country<25\relax\vspace{1pt}\newline\fi%
                        }%
                    };
                \fi%
                \ifnum\pgfPT@fontspec=1\relax\setmainfont{\pgfPTglobalfont}\else\fontfamily{\pgfPTglobalfont}\selectfont\fi\fontseries{\seriesdefault}\fontshape{\shapedefault}%
            \fi% legenda extra
    \fi%
    % spectra -> spectra
    \ifpgfPT@spectra%
        \pgfPT@setacro[\pgfPTlanguages]{spectra}%
        \node[font=\pgfPTspectrafont,text=\pgfPTspectracolor,text width=\pgfPT@data@spectra@wd,text centered,inner xsep=0pt,%
                  text depth=0pt,minimum height=\pgfPT@data@spectra@ht]%
            at ([xshift=\pgfPT@data@spectra@x,yshift=-\pgfPT@data@spectra@y]0)%
            {\pgfPT@theacro};%
    \fi%
    % acronyms description
    %\fontsize{\pgfPT@doc@fsize}{\pgfPT@doc@fsize}\selectfont% changed in v2.1.5
    \fontsize{\pgfPTlegendacrofontsize}{\pgfPTlegendacrofontsize}\selectfont%
    \ifnum\pgfPT@countb=2\relax\pgfmathsetlength{\pgfPT@dima}{.4*\f@size}\pgfmathsetlength{\pgfPT@dimb}{.3*\f@size}%
            \else\ifnum\pgfPT@countb>2\relax\pgfmathsetlength{\pgfPT@dima}{.3*\f@size}\pgfmathsetlength{\pgfPT@dimb}{.2*\f@size}%
            \else\pgfmathsetlength{\pgfPT@dima}{.45*\f@size}\fi\fi%
    \ifpgfPT@ls\ifpgfPT@DiscC\pgfPTlegacrorightfalse\fi\fi% new in v2.1.6
    \ifpgfPTlegacroright% new in v2.1.6
    \ifpgfPTlegendapins\def\@pgfPT@legend@xshift{2*\pgfPTcellwd}\else\def\@pgfPT@legend@xshift{\pgfPTcellwd}\fi%
    \node[below right,text width={2.5*\pgfPTcellwd+.3*(\pgfPT@countb-1)*\pgfPTcellwd-4pt},inner sep=2pt,%
             font=\fontsize{\the\pgfPT@dima}{\the\pgfPT@dima}\selectfont,%
             fill=\pgfPTlegendbackcolor,line width=\pgfPTcelllinewd,minimum height=\pgfPTcellht] (legend) %
        at ([xshift={\@pgfPT@legend@xshift+.3*\pgfPT@doc@fsize}]0)%
        {%
        \edef\pgfPTCScolor{\pgfPTlegendCScolor}\edef\pgfPTradiocolor{\pgfPTlegendradiocolor}\edef\pgfPTArstarcolor{\pgfPTArcolor}%
        \ifx\pgfPTlegendZcolor\@empty\relax\edef\pgfPTZcolor{\pgfPTZback}\else\edef\pgfPTZcolor{\pgfPTlegendZcolor}\fi%
        \@for\pgfPT@tmp:=\pgfPT@legend@content\do{%
            \tikz[minimum height=0pt]{\node[text={\csname pgfPT\pgfPT@tmp color\endcsname},text depth=0pt,
                               font=\csname pgfPT\pgfPT@tmp font\endcsname\fontsize{\the\pgfPT@dima}{\the\pgfPT@dima}\selectfont] %
              {\pgfPT@setacro[\pgfPTlanguages]{\pgfPT@tmp}\pgfPT@theacro%
                \edef\pgfPT@test@tmp{\pgfPT@tmp}%
                \ifpgfPT@TboilC\ifpgfPT@Tboil\edef\pgfPT@test@TboilC{TboilC}\ifx\pgfPT@test@tmp\pgfPT@test@TboilC\hspace{.15ex}C\fi\fi\fi%
                \ifpgfPT@Tboil\ifpgfPT@TboilC\edef\pgfPT@test@Tboil{Tboil}\ifx\pgfPT@test@tmp\pgfPT@test@Tboil\hspace{.15ex}K\fi\fi\fi%
                \ifpgfPT@TmeltC\ifpgfPT@Tmelt\edef\pgfPT@test@TmeltC{TmeltC}\ifx\pgfPT@test@tmp\pgfPT@test@TmeltC\hspace{.15ex}C\fi\fi\fi%
                \ifpgfPT@Tmelt\ifpgfPT@TmeltC\edef\pgfPT@test@Tmelt{Tmelt}\ifx\pgfPT@test@tmp\pgfPT@test@Tmelt\hspace{.15ex}K\fi\fi\fi%
                :\ %
                \pgfPT@acroDesc{\pgfPT@tmp}%
                \ifx\pgfPT@lang@ru\undefined\relax% russian -> new if in v2.1.6
                    \pgfPT@tmp@acro@defaultLanguage%
                \else% resizing Ar acroDesc in russian
                    \edef\pgfPT@rus@Ar{Ar}\ifx\pgfPT@rus@Ar\pgfPT@tmp\relax%
                    \resizebox{.95\width}{\height}{\pgfPT@tmp@acro@defaultLanguage}\else\pgfPT@tmp@acro@defaultLanguage\fi%
                \fi%
                \pgfPT@setUnit{\pgfPT@tmp}\ \ifnum\pgfPT@counta>1\relax%
                {\fontsize{\the\pgfPT@dimb}{\the\pgfPT@dimb}\selectfont\color{\pgfPTotherLangColor}\pgfPT@tmp@acro@otherLanguages}\fi};%
            }\\ %
            }% end do \pgfPT@legend@content
        };% end node
        \begin{pgfonlayer}{pgfPTbacklayer}%
        \path[line width=\pgfPTcelllinewd,legendbox,rounded corners=2pt] %
        ([xshift=2pt,yshift=-2pt]legend.south east) rectangle ([xshift=-2pt,yshift=2pt]0);%
        \end{pgfonlayer}%
    \else% \ifpgfPTlegacroright
    \node[below right,text width={2.5*\pgfPTcellwd+.3*(\pgfPT@countb-1)*\pgfPTcellwd-4pt},inner sep=2pt,%
             font=\fontsize{\the\pgfPT@dima}{\the\pgfPT@dima}\selectfont,%
             fill=\pgfPTlegendbackcolor,line width=\pgfPTcelllinewd] (legend) %
        at ([yshift={-\pgfPTcellht-.3*\pgfPT@doc@fsize}]0)%
        {%
        \edef\pgfPTCScolor{\pgfPTlegendCScolor}\edef\pgfPTradiocolor{\pgfPTlegendradiocolor}\edef\pgfPTArstarcolor{\pgfPTArcolor}%
        \ifx\pgfPTlegendZcolor\@empty\relax\edef\pgfPTZcolor{\pgfPTZback}\else\edef\pgfPTZcolor{\pgfPTlegendZcolor}\fi%
        \edef\pgfPTradiocolor{\pgfPTradiofontcolor}\edef\pgfPT@acro@radio{radio}% new v2.1.6
        \@for\pgfPT@tmp:=\pgfPT@legend@content\do{%
            \tikz[minimum height=0pt]{\node[text={\csname pgfPT\pgfPT@tmp color\endcsname},text depth=0pt,
                               font=\csname pgfPT\pgfPT@tmp font\endcsname\fontsize{\the\pgfPT@dima}{\the\pgfPT@dima}\selectfont] %
              {\pgfPT@setacro[\pgfPTlanguages]{\pgfPT@tmp}%
                \ifx\pgfPT@acro@radio\pgfPT@tmp\relax\ifpgfPT@radiosymbolisimage\else\let\pgfPT@theacro\relax\pgfPT@radiobox@text\fi\fi%
                \pgfPT@theacro%
                \edef\pgfPT@test@tmp{\pgfPT@tmp}%
                \ifpgfPT@TboilC\ifpgfPT@Tboil\edef\pgfPT@test@TboilC{TboilC}\ifx\pgfPT@test@tmp\pgfPT@test@TboilC\hspace{.15ex}C\fi\fi\fi%
                \ifpgfPT@Tboil\ifpgfPT@TboilC\edef\pgfPT@test@Tboil{Tboil}\ifx\pgfPT@test@tmp\pgfPT@test@Tboil\hspace{.15ex}K\fi\fi\fi%
                \ifpgfPT@TmeltC\ifpgfPT@Tmelt\edef\pgfPT@test@TmeltC{TmeltC}\ifx\pgfPT@test@tmp\pgfPT@test@TmeltC\hspace{.15ex}C\fi\fi\fi%
                \ifpgfPT@Tmelt\ifpgfPT@TmeltC\edef\pgfPT@test@Tmelt{Tmelt}\ifx\pgfPT@test@tmp\pgfPT@test@Tmelt\hspace{.15ex}K\fi\fi\fi%
                :\ %
                \pgfPT@acroDesc{\pgfPT@tmp}%
                \ifx\pgfPT@lang@ru\undefined\relax% russian -> new if in v2.1.6
                    \pgfPT@tmp@acro@defaultLanguage%
                \else% resizing Ar acroDesc in russian
                    \edef\pgfPT@rus@Ar{Ar}\ifx\pgfPT@rus@Ar\pgfPT@tmp\relax%
                    \resizebox{.95\width}{\height}{\pgfPT@tmp@acro@defaultLanguage}\else\pgfPT@tmp@acro@defaultLanguage\fi%
                \fi%
                \pgfPT@setUnit{\pgfPT@tmp}\ \ifnum\pgfPT@counta>1\relax%
                {\fontsize{\the\pgfPT@dimb}{\the\pgfPT@dimb}\selectfont\color{\pgfPTotherLangColor}\pgfPT@tmp@acro@otherLanguages}\fi};%
            }\\ %
            }% end do \pgfPT@legend@content
        };% end node
        \begin{pgfonlayer}{pgfPTbacklayer}%
        \path[line width=\pgfPTcelllinewd,legendbox,rounded corners=2pt] %
        ([xshift=2pt,yshift=-2pt]legend.south east) rectangle ([xshift=-2pt,yshift=2pt]0);%
        \end{pgfonlayer}%
    \fi%
    \ifnum\pgfPT@fontspec=1\relax\setmainfont{\pgfPTglobalfont}\else\fontfamily{\pgfPTglobalfont}\selectfont\fi\fontseries{\seriesdefault}\fontshape{\shapedefault}%
\else% use full description #################################################
\pgfPT@count@note=0%
\ifnum\pgfPT@countb>1\relax%
    \edef\pgfPT@legendscale{1.75}%
    \pgfmathparse{2*\pgfPT@loadcell@scaleX}\edef\pgfPT@legendscaleX{\pgfmathresult}%
    \pgfmathparse{2*\pgfPT@loadcell@scaleY}\edef\pgfPT@legendscaleY{\pgfmathresult}%
\else%
    \edef\pgfPT@legendscale{1.5}%
    \pgfmathparse{1.5*\pgfPT@loadcell@scaleX}\edef\pgfPT@legendscaleX{\pgfmathresult}%
    \pgfmathparse{1.5*\pgfPT@loadcell@scaleY}\edef\pgfPT@legendscaleY{\pgfmathresult}%
\fi%
\pgfmathsetlength{\pgfPT@dima}{\pgfPT@legendscaleX}%
\pgfmathsetlength{\pgfPT@dimb}{\pgfPT@legendscaleY}%
\ifdim\pgfPT@dima>2.25pt\relax%
\edef\pgfPT@legendscaleX{2.25}%
\fi%
\ifdim\pgfPT@dimb>2.25pt\relax%
\edef\pgfPT@legendscaleY{2.25}%
\fi%
\ifdim\pgfPT@dima>\pgfPT@dimb\relax%
    \edef\pgfPT@txtscale{\pgfPT@legendscaleY}%
\else%
    \edef\pgfPT@txtscale{\pgfPT@legendscaleX}%
\fi%
\fontsize{\pgfPT@doc@fsize}{\pgfPT@doc@fsize}\selectfont\relax%
\draw[fill=\pgfPTlegendbackcolor] (0) rectangle ++({\pgfPT@legendscaleX*\pgfPTcellwd},-\pgfPT@legendscaleY*\pgfPTcellht);
    \ifpgfPT@Z\pgfPTZfont\selectfont\pgfmathsetlength{\pgfPT@dima}{1.5*\pgfPT@loadcell@scaleX*\f@size}%
        \node[fill=\pgfPTZback,font=\pgfPTZfont\fontsize{\the\pgfPT@dima}{\the\pgfPT@dima}\selectfont,text=\pgfPTZcolor,below right,inner sep=1.5pt] (LZ)%
            at ([xshift=\pgfPT@legendscaleX*\pgfPT@data@Z@x,yshift=-\pgfPT@legendscaleY*\pgfPT@data@Z@y]0) {Z};%
        \ifnum\pgfPT@countb=2\relax\pgfmathsetlength{\pgfPT@dima}{.5*\f@size*\pgfPT@txtscale}\pgfmathsetlength{\pgfPT@dimb}{.4*\f@size*\pgfPT@txtscale}%
            \else\ifnum\pgfPT@countb>2\relax\pgfmathsetlength{\pgfPT@dima}{.4*\f@size*\pgfPT@txtscale}\pgfmathsetlength{\pgfPT@dimb}{.3*\f@size*\pgfPT@txtscale}%
            \else\pgfmathsetlength{\pgfPT@dima}{.6*\f@size*\pgfPT@txtscale}\fi\fi%
        \pgfPT@leglabel{Z}%
        \node[right,font=\pgfPTZfont\fontsize{\the\pgfPT@dima}{\the\pgfPT@dima}\selectfont,text=\pgfPTZback,text width=\pgfPT@data@Z@wd,inner xsep=1pt]%
            at (LZ.east) {\pgfPT@putleglabel{Z}};%
        \ifnum\pgfPT@fontspec=1\relax\setmainfont{\pgfPTglobalfont}\else\fontfamily{\pgfPTglobalfont}\selectfont\fi\fontseries{\seriesdefault}\fontshape{\shapedefault}%
    \fi%
    % the Chemical Symbol
    \ifpgfPT@CS\pgfPT@extract@rgb@fill{\pgfPTlegendCScolor}%
        \pgfPTCSfont\selectfont%
        \ifnum\pgfPT@countb=2\relax\pgfmathsetlength{\pgfPT@dima}{.5*\f@size*\pgfPT@txtscale}\pgfmathsetlength{\pgfPT@dimb}{.3*\f@size*\pgfPT@txtscale}%
            \else\ifnum\pgfPT@countb>2\relax\pgfmathsetlength{\pgfPT@dima}{.35*\f@size*\pgfPT@txtscale}\pgfmathsetlength{\pgfPT@dimb}{.2*\f@size*\pgfPT@txtscale}%
            \else\pgfmathsetlength{\pgfPT@dima}{.5*\f@size*\pgfPT@txtscale}\fi\fi%
        \pgfPT@legend{CS}%
        \edef\pgfPT@checkf@nt{fmm}\edef\pgfPT@f@nt{\f@family}%
        \ifx\pgfPT@f@nt\pgfPT@checkf@nt\relax\pgfmathsetlength{\pgfPT@dima}{.65*\pgfPT@dima}\pgfmathparse{-.75*\pgfPT@dima}\edef\pgfPT@extra@shift{\pgfmathresult}\else\edef\pgfPT@extra@shift{0pt}\fi%
        \node[font=\pgfPTCSfont\fontsize{\the\pgfPT@dima}{\the\pgfPT@dima}\selectfont,text width={\pgfPT@legendscaleX*\pgfPT@data@CS@wd},text centered,text depth=0pt] (LCS)%
        at ([xshift=\pgfPT@legendscaleX*\pgfPT@data@CS@x,yshift=-\pgfPT@legendscaleY*\pgfPT@data@CS@y+\pgfPT@extra@shift]0)
        {\pgfPT@lt[\pgfPTCSolwd](\pgfPT@tmp@label@defaultLanguage)(\pgfPT@rs,\pgfPT@gs,\pgfPT@bs)(\pgfPT@rf,\pgfPT@gf,\pgfPT@bf)(\pgfPT@CS@txt@render)%
        \ifnum\pgfPT@counta>1\relax\\ %
        {\fontsize{\the\pgfPT@dimb}{\the\pgfPT@dimb}\selectfont%
        \pgfPT@lt[\pgfPTCSolwd](\pgfPT@tmp@labels@otherLanguages)(\pgfPT@rs,\pgfPT@gs,\pgfPT@bs)(\pgfPT@rf,\pgfPT@gf,\pgfPT@bf)(\pgfPT@CS@txt@render)%
        }\fi};
        \ifnum\pgfPT@fontspec=1\relax\setmainfont{\pgfPTglobalfont}\else\fontfamily{\pgfPTglobalfont}\selectfont\fi\fontseries{\seriesdefault}\fontshape{\shapedefault}%
        % pin it...
        \ifpgfPTlegendapins%
        \pgfmathsetlength{\pgfPT@dimc}{\pgfPT@data@CS@x+\pgfPT@data@CS@wd}%
        \ifdim\pgfPT@dimc<\pgfPTcellwd\pgfmathsetlength{\pgfPT@dimc}{\pgfPTcellwd-\pgfPT@dimc}\else\pgfmathsetlength{\pgfPT@dimc}{0pt}\fi%
        \draw[fill=black!30,line width=.05pt,draw=black!50] (LCS.east) circle(.05*\pgfPTcellwd) ++(.05*\pgfPTcellwd,0) -- ++(\pgfPT@dimc+.35*\pgfPTcellwd,0);
        \pgfPTCSfont\selectfont%
        \ifnum\pgfPT@countb>1\relax\pgfmathsetlength{\pgfPT@dima}{.45*\f@size}\pgfmathsetlength{\pgfPT@dimb}{.3*\f@size}
        \else\pgfmathsetlength{\pgfPT@dima}{.425*\f@size}\fi%
        \ifnum\pgfPT@fontspec=1\relax\setmainfont{\pgfPTglobalfont}\else\fontfamily{\pgfPTglobalfont}\selectfont\fi\fontseries{\seriesdefault}\fontshape{\shapedefault}%
        \fontsize{\pgfPT@doc@fsize}{\pgfPT@doc@fsize}\selectfont\relax%
        \node[legendpins,%
                text width={.7*\pgfPT@legendscale*\pgfPTcellwd-4pt},font=\fontsize{\the\pgfPT@dima}{\the\pgfPT@dima}\selectfont,inner xsep=2pt,inner ysep=1pt]
                at ([xshift={\pgfPT@legendscaleX*\pgfPT@dimc+.2*\pgfPTcellwd},yshift={.25*\pgfPT@data@CS@ht}]LCS.east)%
                {%
                \pgfPT@extract@rgb@fill{solido}\pgfPT@pinEstado{solido}%
                \pgfPT@lt[\pgfPTCSolwd](\pgfPT@tmp@label@defaultLanguage)(\pgfPT@rs,\pgfPT@gs,\pgfPT@bs)(\pgfPT@rf,\pgfPT@gf,\pgfPT@bf)(\pgfPT@CS@txt@render)%
                \ifnum\pgfPT@counta>1\relax\\ [-.5ex]%
                {\fontsize{\the\pgfPT@dimb}{\the\pgfPT@dimb}\selectfont%
                \pgfPT@lt[\pgfPTCSolwd](\pgfPT@tmp@labels@otherLanguages)(\pgfPT@rs,\pgfPT@gs,\pgfPT@bs)(\pgfPT@rf,\pgfPT@gf,\pgfPT@bf)(\pgfPT@CS@txt@render)%
                }\fi%
                \\ [.5ex]\pgfPT@extract@rgb@fill{liquido}\pgfPT@pinEstado{liquido}%
                \pgfPT@lt[\pgfPTCSolwd](\pgfPT@tmp@label@defaultLanguage)(\pgfPT@rs,\pgfPT@gs,\pgfPT@bs)(\pgfPT@rf,\pgfPT@gf,\pgfPT@bf)(\pgfPT@CS@txt@render)%
                \ifnum\pgfPT@counta>1\relax\\ [-.5ex]%
                {\fontsize{\the\pgfPT@dimb}{\the\pgfPT@dimb}\selectfont%
                \pgfPT@lt[\pgfPTCSolwd](\pgfPT@tmp@labels@otherLanguages)(\pgfPT@rs,\pgfPT@gs,\pgfPT@bs)(\pgfPT@rf,\pgfPT@gf,\pgfPT@bf)(\pgfPT@CS@txt@render)%
                }\fi%
                \\ [.5ex]\pgfPT@extract@rgb@fill{gasoso}\pgfPT@pinEstado{gasoso}%
                \pgfPT@lt[\pgfPTCSolwd](\pgfPT@tmp@label@defaultLanguage)(\pgfPT@rs,\pgfPT@gs,\pgfPT@bs)(\pgfPT@rf,\pgfPT@gf,\pgfPT@bf)(\pgfPT@CS@txt@render)%
                \ifnum\pgfPT@counta>1\relax\\ [-.5ex]%
                {\fontsize{\the\pgfPT@dimb}{\the\pgfPT@dimb}\selectfont%
                \pgfPT@lt[\pgfPTCSolwd](\pgfPT@tmp@labels@otherLanguages)(\pgfPT@rs,\pgfPT@gs,\pgfPT@bs)(\pgfPT@rf,\pgfPT@gf,\pgfPT@bf)(\pgfPT@CS@txt@render)%
                }\fi%
                \\ [.5ex]\pgfPT@extract@rgb@fill{sintetico}\pgfPT@pinEstado{sintetico}%
                \pgfPT@lt[\pgfPTCSolwd](\pgfPT@tmp@label@defaultLanguage)(\pgfPT@rs,\pgfPT@gs,\pgfPT@bs)(\pgfPT@rf,\pgfPT@gf,\pgfPT@bf)(\pgfPT@CS@txt@render)%
                \ifnum\pgfPT@counta>1\relax\\ [-.5ex]%
                {\fontsize{\the\pgfPT@dimb}{\the\pgfPT@dimb}\selectfont%
                \pgfPT@lt[\pgfPTCSolwd](\pgfPT@tmp@labels@otherLanguages)(\pgfPT@rs,\pgfPT@gs,\pgfPT@bs)(\pgfPT@rf,\pgfPT@gf,\pgfPT@bf)(\pgfPT@CS@txt@render)%
                }\fi%
                };%
        \fi\fi%
        \ifnum\pgfPT@fontspec=1\relax\setmainfont{\pgfPTglobalfont}\else\fontfamily{\pgfPTglobalfont}\selectfont\fi\fontseries{\seriesdefault}\fontshape{\shapedefault}%
    % the Name
    \ifpgfPT@name%
        \pgfPTnamefont\selectfont%
            \ifnum\pgfPT@countb=2\relax\pgfmathsetlength{\pgfPT@dima}{.7*\f@size*\pgfPT@txtscale}\pgfmathsetlength{\pgfPT@dimb}{.55*\f@size*\pgfPT@txtscale}%
            \else\ifnum\pgfPT@countb>2\relax\pgfmathsetlength{\pgfPT@dima}{.6*\f@size*\pgfPT@txtscale}\pgfmathsetlength{\pgfPT@dimb}{.35*\f@size*\pgfPT@txtscale}%
            \else\pgfmathsetlength{\pgfPT@dima}{.85*\f@size*\pgfPT@txtscale}\fi\fi%
            \pgfPT@leglabel{name}%
            \node[font=\pgfPTnamefont\fontsize{\the\pgfPT@dima}{\the\pgfPT@dima}\selectfont,text=\pgfPTnamecolor,%
                text width={\pgfPT@legendscaleX*\pgfPT@data@name@wd},align=\pgfPTnamealign,inner xsep=0pt]%
            at ([xshift=\pgfPT@legendscaleX*\pgfPT@data@name@x,yshift=-\pgfPT@legendscaleY*\pgfPT@data@name@y]0)%
            {%
            \pgfPT@putleglabel{name}%
            };%
        \ifnum\pgfPT@fontspec=1\relax\setmainfont{\pgfPTglobalfont}\else\fontfamily{\pgfPTglobalfont}\selectfont\fi\fontseries{\seriesdefault}\fontshape{\shapedefault}%
    \fi%
    % the Atomic weight
    \ifpgfPT@Ar%
        \edef\pgfPT@tmptest{\pgfPTArlabel}\edef\pgfPT@tmp@m{m}%
        \ifx\pgfPT@tmptest\pgfPT@tmp@m\relax\let\pgfPT@labels@Ar\pgfPT@labels@Ar@m\else\let\pgfPT@labels@Ar\pgfPT@labels@Ar@w\fi%
        \pgfPTArfont\selectfont%
            \ifnum\pgfPT@countb=2\relax\pgfmathsetlength{\pgfPT@dima}{.7*\f@size*\pgfPT@txtscale}\pgfmathsetlength{\pgfPT@dimb}{.55*\f@size*\pgfPT@txtscale}%
            \else\ifnum\pgfPT@countb>2\relax\pgfmathsetlength{\pgfPT@dima}{.6*\f@size*\pgfPT@txtscale}\pgfmathsetlength{\pgfPT@dimb}{.35*\f@size*\pgfPT@txtscale}%
            \else\pgfmathsetlength{\pgfPT@dima}{.85*\f@size*\pgfPT@txtscale}\fi\fi%
            \pgfPT@leglabel{Ar}%
            \node[font=\pgfPTArfont\fontsize{\the\pgfPT@dima}{\the\pgfPT@dima}\selectfont,text=\pgfPTArcolor,text depth=0pt,%
                text width={\pgfPT@legendscaleX*\pgfPT@data@Ar@wd},text centered,inner xsep=0pt]%
            at ([xshift=\pgfPT@legendscaleX*\pgfPT@data@Ar@x,yshift=-\pgfPT@legendscaleY*\pgfPT@data@Ar@y]0)%
            {%
            \pgfPT@putleglabel{Ar}%
            };%
        \ifnum\pgfPT@fontspec=1\relax\setmainfont{\pgfPTglobalfont}\else\fontfamily{\pgfPTglobalfont}\selectfont\fi\fontseries{\seriesdefault}\fontshape{\shapedefault}%
    \fi%
    \ifpgfPT@Arstar%
        \edef\pgfPT@tmptest{\pgfPTArlabel}\edef\pgfPT@tmp@m{m}%
        \ifx\pgfPT@tmptest\pgfPT@tmp@m\relax\let\pgfPT@labels@Arstar\pgfPT@labels@Arstar@m\else\let\pgfPT@labels@Arstar\pgfPT@labels@Arstar@w\fi%
        \pgfPTArfont\selectfont%
            \ifnum\pgfPT@countb=2\relax\pgfmathsetlength{\pgfPT@dima}{.7*\f@size*\pgfPT@txtscale}\pgfmathsetlength{\pgfPT@dimb}{.55*\f@size*\pgfPT@txtscale}%
            \else\ifnum\pgfPT@countb>2\relax\pgfmathsetlength{\pgfPT@dima}{.6*\f@size*\pgfPT@txtscale}\pgfmathsetlength{\pgfPT@dimb}{.35*\f@size*\pgfPT@txtscale}%
            \else\pgfmathsetlength{\pgfPT@dima}{.85*\f@size*\pgfPT@txtscale}\fi\fi%
            \pgfPT@leglabel{Arstar}%
            \node[font=\pgfPTArfont\fontsize{\the\pgfPT@dima}{\the\pgfPT@dima}\selectfont,text=\pgfPTArcolor,text depth=0pt,%
                text width={\pgfPT@legendscaleX*\pgfPT@data@Arstar@wd},text centered,inner xsep=0pt]%
            at ([xshift=\pgfPT@legendscaleX*\pgfPT@data@Arstar@x,yshift=-\pgfPT@legendscaleY*\pgfPT@data@Arstar@y]0)%
            {
            \pgfPT@putleglabel{Arstar}%
            };
        \ifnum\pgfPT@fontspec=1\relax\setmainfont{\pgfPTglobalfont}\else\fontfamily{\pgfPTglobalfont}\selectfont\fi\fontseries{\seriesdefault}\fontshape{\shapedefault}%
    \fi%
    % radioactivity
    \ifpgfPT@radio%
    \pgfmathsetlength{\pgfPT@dima}{\pgfPT@data@radio@ht*\pgfPT@loadcell@scaleY}%
    \node[text width={\pgfPT@legendscaleX*\pgfPT@data@radio@wd-2pt},text centered,inner sep=1pt,opacity=\ifpgfPT@radiosymbolisimage.6\else1\fi,font=\pgfPTradiofont,\pgfPTradiofontcolor] (Lradio)%
    at ([xshift=\pgfPT@legendscaleX*\pgfPT@data@radio@x,yshift=-\pgfPT@legendscaleY*\pgfPT@data@radio@y]0)
%    {\includegraphics[height=\pgfPT@dima]{pgfPT_radio_symbol.pdf}};
    {\ifpgfPT@radiosymbolisimage\resizebox{!}{\pgfPT@dima}{\usebox{\pgfPT@radiobox}}\else\pgfPT@radiobox@text\fi};%
    % pin it...
        \ifpgfPTlegendapins%
        \pgfPTotherLangFont\selectfont%
        \ifnum\pgfPT@countb>1\relax\pgfmathsetlength{\pgfPT@dima}{.65*\f@size}\pgfmathsetlength{\pgfPT@dimb}{.45*\f@size}%
        \else\pgfmathsetlength{\pgfPT@dima}{.825*\f@size}\fi%
        \fontsize{\pgfPT@doc@fsize}{\pgfPT@doc@fsize}\selectfont\relax%
        \pgfPT@pinEstado{radio}%
        \pgfmathsetlength{\pgfPT@dimc}{\pgfPT@data@radio@x+\pgfPT@data@radio@wd}%
        \ifdim\pgfPT@dimc<\pgfPTcellwd\pgfmathsetlength{\pgfPT@dimc}{\pgfPTcellwd-\pgfPT@dimc}\else\pgfmathsetlength{\pgfPT@dimc}{0pt}\fi%
        \draw[fill=black!30,line width=.05pt,draw=black!50] (Lradio.east) circle(.05*\pgfPTcellwd) ++(.05*\pgfPTcellwd,0) -- ++(.35*\pgfPTcellwd,0);
        \node[font=\pgfPTotherLangFont\fontsize{\the\pgfPT@dima}{\the\pgfPT@dima}\selectfont,text width={.7*\pgfPT@legendscale*\pgfPTcellwd-4pt},%
            legendpins,%
            inner xsep=2pt,inner ysep=1pt,anchor=west,text=\pgfPTlegendradiocolor]
        at ([xshift={\pgfPT@legendscaleX*\pgfPT@dimc+.2*\pgfPTcellwd}]Lradio.east)%
        {\pgfPT@tmp@label@defaultLanguage%
            \ifnum\pgfPT@counta>1\relax\\ [-.25ex]{\fontsize{\the\pgfPT@dimb}{\the\pgfPT@dimb}\selectfont\color{\pgfPTotherLangColor}%
                \pgfPT@tmp@labels@otherLanguages}\fi%
        };
        \ifnum\pgfPT@fontspec=1\relax\setmainfont{\pgfPTglobalfont}\else\fontfamily{\pgfPTglobalfont}\selectfont\fi\fontseries{\seriesdefault}\fontshape{\shapedefault}%
        \fi%
    \fi%
    % R -> Atomic Radius (Empirycal)
    \ifpgfPT@R%
        \pgfPTRfont\selectfont%
            \ifnum\pgfPT@countb=2\relax\pgfmathsetlength{\pgfPT@dima}{.7*\f@size*\pgfPT@txtscale}\pgfmathsetlength{\pgfPT@dimb}{.55*\f@size*\pgfPT@txtscale}%
            \else\ifnum\pgfPT@countb>2\relax\pgfmathsetlength{\pgfPT@dima}{.6*\f@size*\pgfPT@txtscale}\pgfmathsetlength{\pgfPT@dimb}{.35*\f@size*\pgfPT@txtscale}%
            \else\pgfmathsetlength{\pgfPT@dima}{.85*\f@size*\pgfPT@txtscale}\fi\fi%
            \pgfPT@leglabel{R}%
            \node[font=\pgfPTRfont\fontsize{\the\pgfPT@dima}{\the\pgfPT@dima}\selectfont,text=\pgfPTRcolor,%
                text width={\pgfPT@legendscaleX*\pgfPT@data@R@wd},text centered,inner xsep=0pt]%
            at ([xshift=\pgfPT@legendscaleX*\pgfPT@data@R@x,yshift=-\pgfPT@legendscaleY*\pgfPT@data@R@y]0)%
            {
            \pgfPT@putleglabel{R}%
            };
        \ifnum\pgfPT@fontspec=1\relax\setmainfont{\pgfPTglobalfont}\else\fontfamily{\pgfPTglobalfont}\selectfont\fi\fontseries{\seriesdefault}\fontshape{\shapedefault}%
    \fi%
    % Rcov -> Covalente Radius
    \ifpgfPT@Rcov%
        \pgfPTRcovfont\selectfont%
            \ifnum\pgfPT@countb=2\relax\pgfmathsetlength{\pgfPT@dima}{.7*\f@size*\pgfPT@txtscale}\pgfmathsetlength{\pgfPT@dimb}{.55*\f@size*\pgfPT@txtscale}%
            \else\ifnum\pgfPT@countb>2\relax\pgfmathsetlength{\pgfPT@dima}{.6*\f@size*\pgfPT@txtscale}\pgfmathsetlength{\pgfPT@dimb}{.35*\f@size*\pgfPT@txtscale}%
            \else\pgfmathsetlength{\pgfPT@dima}{.85*\f@size*\pgfPT@txtscale}\fi\fi%
            \pgfPT@leglabel{Rcov}%
            \node[font=\pgfPTRcovfont\fontsize{\the\pgfPT@dima}{\the\pgfPT@dima}\selectfont,text=\pgfPTRcovcolor,%
                text width={\pgfPT@legendscaleX*\pgfPT@data@Rcov@wd},text centered,inner xsep=0pt]%
            at ([xshift=\pgfPT@legendscaleX*\pgfPT@data@Rcov@x,yshift=-\pgfPT@legendscaleY*\pgfPT@data@Rcov@y]0)%
            {
            \pgfPT@putleglabel[\pgfPT@labels@unit@pm]{Rcov}%
            };
        \ifnum\pgfPT@fontspec=1\relax\setmainfont{\pgfPTglobalfont}\else\fontfamily{\pgfPTglobalfont}\selectfont\fi\fontseries{\seriesdefault}\fontshape{\shapedefault}%
    \fi%
    % Rion -> Ionic Radius
    \ifpgfPT@Rion%
        \pgfPTRionfont\selectfont%
            \ifnum\pgfPT@countb=2\relax\pgfmathsetlength{\pgfPT@dima}{.7*\f@size*\pgfPT@txtscale}\pgfmathsetlength{\pgfPT@dimb}{.55*\f@size*\pgfPT@txtscale}%
            \else\ifnum\pgfPT@countb>2\relax\pgfmathsetlength{\pgfPT@dima}{.6*\f@size*\pgfPT@txtscale}\pgfmathsetlength{\pgfPT@dimb}{.35*\f@size*\pgfPT@txtscale}%
            \else\pgfmathsetlength{\pgfPT@dima}{.85*\f@size*\pgfPT@txtscale}\fi\fi%
            \pgfPT@leglabel{Rion}%
            \node[font=\pgfPTRionfont\fontsize{\the\pgfPT@dima}{\the\pgfPT@dima}\selectfont,text=\pgfPTRioncolor,%
                text width={\pgfPT@legendscaleX*\pgfPT@data@Rion@wd},text centered,inner xsep=0pt]%
            at ([xshift=\pgfPT@legendscaleX*\pgfPT@data@Rion@x,yshift=-\pgfPT@legendscaleY*\pgfPT@data@Rion@y]0)%
            {
            \pgfPT@putleglabel[\pgfPT@labels@unit@pm]{Rion}%
            };
        \ifnum\pgfPT@fontspec=1\relax\setmainfont{\pgfPTglobalfont}\else\fontfamily{\pgfPTglobalfont}\selectfont\fi\fontseries{\seriesdefault}\fontshape{\shapedefault}%
    \fi%
    % Ei -> First Ionization Energy
    \ifpgfPT@Ei%
        \pgfPTEifont\selectfont%
            \ifnum\pgfPT@countb=2\relax\pgfmathsetlength{\pgfPT@dima}{.7*\f@size*\pgfPT@txtscale}\pgfmathsetlength{\pgfPT@dimb}{.55*\f@size*\pgfPT@txtscale}%
            \else\ifnum\pgfPT@countb>2\relax\pgfmathsetlength{\pgfPT@dima}{.6*\f@size*\pgfPT@txtscale}\pgfmathsetlength{\pgfPT@dimb}{.35*\f@size*\pgfPT@txtscale}%
            \else\pgfmathsetlength{\pgfPT@dima}{.85*\f@size*\pgfPT@txtscale}\fi\fi%
            \pgfPT@leglabel{Ei}%
            \node[font=\pgfPTEifont\fontsize{\the\pgfPT@dima}{\the\pgfPT@dima}\selectfont,text=\pgfPTEicolor,%
                text width={\pgfPT@legendscaleX*\pgfPT@data@Ei@wd},text centered,inner xsep=0pt]%
            at ([xshift=\pgfPT@legendscaleX*\pgfPT@data@Ei@x,yshift=-\pgfPT@legendscaleY*\pgfPT@data@Ei@y]0)%
            {
            \pgfPT@putleglabel[\pgfPT@labels@unit@kJmol]{Ei}%
            };
        \ifnum\pgfPT@fontspec=1\relax\setmainfont{\pgfPTglobalfont}\else\fontfamily{\pgfPTglobalfont}\selectfont\fi\fontseries{\seriesdefault}\fontshape{\shapedefault}%
    \fi%
    % eneg -> Electronegativity (Pauling)
    \ifpgfPT@eneg%
        \pgfPTenegfont\selectfont%
            \ifnum\pgfPT@countb=2\relax\pgfmathsetlength{\pgfPT@dima}{.7*\f@size*\pgfPT@txtscale}\pgfmathsetlength{\pgfPT@dimb}{.55*\f@size*\pgfPT@txtscale}%
            \else\ifnum\pgfPT@countb>2\relax\pgfmathsetlength{\pgfPT@dima}{.6*\f@size*\pgfPT@txtscale}\pgfmathsetlength{\pgfPT@dimb}{.35*\f@size*\pgfPT@txtscale}%
            \else\pgfmathsetlength{\pgfPT@dima}{.85*\f@size*\pgfPT@txtscale}\fi\fi%
            \pgfPT@leglabel{eneg}%
            \node[font=\pgfPTArfont\fontsize{\the\pgfPT@dima}{\the\pgfPT@dima}\selectfont,text=\pgfPTenegcolor,%
                text width={\pgfPT@legendscaleX*\pgfPT@data@eneg@wd},text centered,inner xsep=0pt]%
            at ([xshift=\pgfPT@legendscaleX*\pgfPT@data@eneg@x,yshift=-\pgfPT@legendscaleY*\pgfPT@data@eneg@y]0)%
            {
            \pgfPT@putleglabel{eneg}%
            };
        \ifnum\pgfPT@fontspec=1\relax\setmainfont{\pgfPTglobalfont}\else\fontfamily{\pgfPTglobalfont}\selectfont\fi\fontseries{\seriesdefault}\fontshape{\shapedefault}%
    \fi%
    % eaff -> Electroaffinity
    \ifpgfPT@eaff%
        \pgfPTeafffont\selectfont%
            \ifnum\pgfPT@countb=2\relax\pgfmathsetlength{\pgfPT@dima}{.7*\f@size*\pgfPT@txtscale}\pgfmathsetlength{\pgfPT@dimb}{.55*\f@size*\pgfPT@txtscale}%
            \else\ifnum\pgfPT@countb>2\relax\pgfmathsetlength{\pgfPT@dima}{.6*\f@size*\pgfPT@txtscale}\pgfmathsetlength{\pgfPT@dimb}{.35*\f@size*\pgfPT@txtscale}%
            \else\pgfmathsetlength{\pgfPT@dima}{.85*\f@size*\pgfPT@txtscale}\fi\fi%
            \pgfPT@leglabel{eaff}%
            \node[font=\pgfPTeafffont\fontsize{\the\pgfPT@dima}{\the\pgfPT@dima}\selectfont,text=\pgfPTeaffcolor,%
                text width={\pgfPT@legendscaleX*\pgfPT@data@eaff@wd},text centered,inner xsep=0pt]%
            at ([xshift=\pgfPT@legendscaleX*\pgfPT@data@eaff@x,yshift=-\pgfPT@legendscaleY*\pgfPT@data@eaff@y]0)%
            {
            \pgfPT@putleglabel[\pgfPT@labels@unit@kJmol]{eaff}%
            };
        \ifnum\pgfPT@fontspec=1\relax\setmainfont{\pgfPTglobalfont}\else\fontfamily{\pgfPTglobalfont}\selectfont\fi\fontseries{\seriesdefault}\fontshape{\shapedefault}%
    \fi%
    % O -> Oxidation States
    \ifpgfPT@O%
        \pgfPTOfont\selectfont%
            \ifnum\pgfPT@countb=2\relax\pgfmathsetlength{\pgfPT@dima}{.7*\f@size*\pgfPT@txtscale}\pgfmathsetlength{\pgfPT@dimb}{.55*\f@size*\pgfPT@txtscale}%
            \else\ifnum\pgfPT@countb>2\relax\pgfmathsetlength{\pgfPT@dima}{.6*\f@size*\pgfPT@txtscale}\pgfmathsetlength{\pgfPT@dimb}{.35*\f@size*\pgfPT@txtscale}%
            \else\pgfmathsetlength{\pgfPT@dima}{.85*\f@size*\pgfPT@txtscale}\fi\fi%
            \pgfPT@leglabel{O}%
            \node[font=\pgfPTOfont\fontsize{\the\pgfPT@dima}{\the\pgfPT@dima}\selectfont,text=\pgfPTOcolor,%
                text width={\pgfPT@legendscaleX*\pgfPT@data@O@wd},text centered,inner xsep=0pt]%
            at ([xshift=\pgfPT@legendscaleX*\pgfPT@data@O@x,yshift=-\pgfPT@legendscaleY*\pgfPT@data@O@y]0)%
            {
            \pgfPT@putleglabel{O}%
            };
        \ifnum\pgfPT@fontspec=1\relax\setmainfont{\pgfPTglobalfont}\else\fontfamily{\pgfPTglobalfont}\selectfont\fi\fontseries{\seriesdefault}\fontshape{\shapedefault}%
    \fi%
    % Tmelt -> Melting Point (Kelvin)
    \ifpgfPT@Tmelt%
        \pgfPTTmeltfont\selectfont%
            \ifnum\pgfPT@countb=2\relax\pgfmathsetlength{\pgfPT@dima}{.7*\f@size*\pgfPT@txtscale}\pgfmathsetlength{\pgfPT@dimb}{.55*\f@size*\pgfPT@txtscale}%
            \else\ifnum\pgfPT@countb>2\relax\pgfmathsetlength{\pgfPT@dima}{.6*\f@size*\pgfPT@txtscale}\pgfmathsetlength{\pgfPT@dimb}{.35*\f@size*\pgfPT@txtscale}%
            \else\pgfmathsetlength{\pgfPT@dima}{.85*\f@size*\pgfPT@txtscale}\fi\fi%
            \pgfPT@leglabel{Tmelt}%
            \node[font=\pgfPTTmeltfont\fontsize{\the\pgfPT@dima}{\the\pgfPT@dima}\selectfont,text=\pgfPTTmeltcolor,%
                text width={\pgfPT@legendscaleX*\pgfPT@data@Tmelt@wd},text centered,inner xsep=0pt]%
            at ([xshift=\pgfPT@legendscaleX*\pgfPT@data@Tmelt@x,yshift=-\pgfPT@legendscaleY*\pgfPT@data@Tmelt@y]0)%
            {
            \pgfPT@putleglabel[\pgfPT@labels@unit@kelvin]{Tmelt}%
            };
        \ifnum\pgfPT@fontspec=1\relax\setmainfont{\pgfPTglobalfont}\else\fontfamily{\pgfPTglobalfont}\selectfont\fi\fontseries{\seriesdefault}\fontshape{\shapedefault}%
    \fi%
    % TmeltC -> Melting Point (degrees Celsius)
    \ifpgfPT@TmeltC%
        \pgfPTTmeltCfont\selectfont%
            \ifnum\pgfPT@countb=2\relax\pgfmathsetlength{\pgfPT@dima}{.7*\f@size*\pgfPT@txtscale}\pgfmathsetlength{\pgfPT@dimb}{.55*\f@size*\pgfPT@txtscale}%
            \else\ifnum\pgfPT@countb>2\relax\pgfmathsetlength{\pgfPT@dima}{.6*\f@size*\pgfPT@txtscale}\pgfmathsetlength{\pgfPT@dimb}{.35*\f@size*\pgfPT@txtscale}%
            \else\pgfmathsetlength{\pgfPT@dima}{.85*\f@size*\pgfPT@txtscale}\fi\fi%
            \pgfPT@leglabel{TmeltC}%
            \node[font=\pgfPTTmeltCfont\fontsize{\the\pgfPT@dima}{\the\pgfPT@dima}\selectfont,text=\pgfPTTmeltCcolor,%
                text width={\pgfPT@legendscaleX*\pgfPT@data@TmeltC@wd},text centered,inner xsep=0pt]%
            at ([xshift=\pgfPT@legendscaleX*\pgfPT@data@TmeltC@x,yshift=-\pgfPT@legendscaleY*\pgfPT@data@TmeltC@y]0)%
            {
            \pgfPT@putleglabel[\pgfPT@labels@unit@degC]{TmeltC}%
            };
        \ifnum\pgfPT@fontspec=1\relax\setmainfont{\pgfPTglobalfont}\else\fontfamily{\pgfPTglobalfont}\selectfont\fi\fontseries{\seriesdefault}\fontshape{\shapedefault}%
    \fi%
    % Tboil -> Boiling Point (Kelvin)
    \ifpgfPT@Tboil%
        \pgfPTTboilfont\selectfont%
            \ifnum\pgfPT@countb=2\relax\pgfmathsetlength{\pgfPT@dima}{.7*\f@size*\pgfPT@txtscale}\pgfmathsetlength{\pgfPT@dimb}{.55*\f@size*\pgfPT@txtscale}%
            \else\ifnum\pgfPT@countb>2\relax\pgfmathsetlength{\pgfPT@dima}{.6*\f@size*\pgfPT@txtscale}\pgfmathsetlength{\pgfPT@dimb}{.35*\f@size*\pgfPT@txtscale}%
            \else\pgfmathsetlength{\pgfPT@dima}{.85*\f@size*\pgfPT@txtscale}\fi\fi%
            \pgfPT@leglabel{Tboil}%
            \node[font=\pgfPTTboilfont\fontsize{\the\pgfPT@dima}{\the\pgfPT@dima}\selectfont,text=\pgfPTTboilcolor,%
                text width={\pgfPT@legendscaleX*\pgfPT@data@Tboil@wd},text centered,inner xsep=0pt]%
            at ([xshift=\pgfPT@legendscaleX*\pgfPT@data@Tboil@x,yshift=-\pgfPT@legendscaleY*\pgfPT@data@Tboil@y]0)%
            {
            \pgfPT@putleglabel[\pgfPT@labels@unit@kelvin]{Tboil}%
            };
        \ifnum\pgfPT@fontspec=1\relax\setmainfont{\pgfPTglobalfont}\else\fontfamily{\pgfPTglobalfont}\selectfont\fi\fontseries{\seriesdefault}\fontshape{\shapedefault}%
    \fi%
    % TboilC -> Boiling Point (degrees Celsius)
    \ifpgfPT@TboilC%
        \pgfPTTboilCfont\selectfont%
            \ifnum\pgfPT@countb=2\relax\pgfmathsetlength{\pgfPT@dima}{.7*\f@size*\pgfPT@txtscale}\pgfmathsetlength{\pgfPT@dimb}{.55*\f@size*\pgfPT@txtscale}%
            \else\ifnum\pgfPT@countb>2\relax\pgfmathsetlength{\pgfPT@dima}{.6*\f@size*\pgfPT@txtscale}\pgfmathsetlength{\pgfPT@dimb}{.35*\f@size*\pgfPT@txtscale}%
            \else\pgfmathsetlength{\pgfPT@dima}{.85*\f@size*\pgfPT@txtscale}\fi\fi%
            \pgfPT@leglabel{TboilC}%
            \node[font=\pgfPTTboilCfont\fontsize{\the\pgfPT@dima}{\the\pgfPT@dima}\selectfont,text=\pgfPTTboilCcolor,%
                text width={\pgfPT@legendscaleX*\pgfPT@data@TboilC@wd},text centered,inner xsep=0pt]%
            at ([xshift=\pgfPT@legendscaleX*\pgfPT@data@TboilC@x,yshift=-\pgfPT@legendscaleY*\pgfPT@data@TboilC@y]0)%
            {
            \pgfPT@putleglabel[\pgfPT@labels@unit@degC]{TboilC}%
            };
        \ifnum\pgfPT@fontspec=1\relax\setmainfont{\pgfPTglobalfont}\else\fontfamily{\pgfPTglobalfont}\selectfont\fi\fontseries{\seriesdefault}\fontshape{\shapedefault}%
    \fi%
    % eDist -> Electron Distribuition
    \ifpgfPT@eDist%
        \pgfPTeDistfont\selectfont%
            \ifnum\pgfPT@countb=2\relax\pgfmathsetlength{\pgfPT@dima}{.7*\f@size*\pgfPT@txtscale}\pgfmathsetlength{\pgfPT@dimb}{.55*\f@size*\pgfPT@txtscale}%
            \else\ifnum\pgfPT@countb>2\relax\pgfmathsetlength{\pgfPT@dima}{.6*\f@size*\pgfPT@txtscale}\pgfmathsetlength{\pgfPT@dimb}{.35*\f@size*\pgfPT@txtscale}%
            \else\pgfmathsetlength{\pgfPT@dima}{.85*\f@size*\pgfPT@txtscale}\fi\fi%
            \pgfPT@leglabel{eDist}%
            \node[font=\pgfPTeDistfont\fontsize{\the\pgfPT@dima}{\the\pgfPT@dima}\selectfont,text=\pgfPTeDistcolor,%
                text width={\pgfPT@legendscaleX*\pgfPT@data@eDist@wd},text centered,inner xsep=0pt]%
            at ([xshift=\pgfPT@legendscaleX*\pgfPT@data@eDist@x,yshift=-\pgfPT@legendscaleY*\pgfPT@data@eDist@y]0)%
            {
            \pgfPT@putleglabel{eDist}%
            };
        \ifnum\pgfPT@fontspec=1\relax\setmainfont{\pgfPTglobalfont}\else\fontfamily{\pgfPTglobalfont}\selectfont\fi\fontseries{\seriesdefault}\fontshape{\shapedefault}%
    \fi%
    % eConfign -> Electronic Configuration (increasing n)
    \ifpgfPT@eConfign%
        \pgfPTeConfignfont\selectfont%
            \ifnum\pgfPT@countb=2\relax\pgfmathsetlength{\pgfPT@dima}{.7*\f@size*\pgfPT@txtscale}\pgfmathsetlength{\pgfPT@dimb}{.55*\f@size*\pgfPT@txtscale}%
            \else\ifnum\pgfPT@countb>2\relax\pgfmathsetlength{\pgfPT@dima}{.6*\f@size*\pgfPT@txtscale}\pgfmathsetlength{\pgfPT@dimb}{.35*\f@size*\pgfPT@txtscale}%
            \else\pgfmathsetlength{\pgfPT@dima}{.85*\f@size*\pgfPT@txtscale}\fi\fi%
            \pgfPT@leglabel{eConfig}%
            \node[font=\pgfPTeConfignfont\fontsize{\the\pgfPT@dima}{\the\pgfPT@dima}\selectfont,text=\pgfPTeConfigncolor,%
                text width={\pgfPT@legendscaleX*\pgfPT@data@eConfign@wd},text centered,inner xsep=0pt]%
            at ([xshift=\pgfPT@legendscaleX*\pgfPT@data@eConfign@x,yshift=-\pgfPT@legendscaleY*\pgfPT@data@eConfign@y]0)%
            {
            \pgfPT@putleglabel{eConfign}%
            };
        \ifnum\pgfPT@fontspec=1\relax\setmainfont{\pgfPTglobalfont}\else\fontfamily{\pgfPTglobalfont}\selectfont\fi\fontseries{\seriesdefault}\fontshape{\shapedefault}%
    \fi%
    % eConfignl -> Electronic Configuration (increasing n+l)
    \ifpgfPT@eConfignl%
        \pgfPTeConfignlfont\selectfont%
            \ifnum\pgfPT@countb=2\relax\pgfmathsetlength{\pgfPT@dima}{.7*\f@size*\pgfPT@txtscale}\pgfmathsetlength{\pgfPT@dimb}{.55*\f@size*\pgfPT@txtscale}%
            \else\ifnum\pgfPT@countb>2\relax\pgfmathsetlength{\pgfPT@dima}{.6*\f@size*\pgfPT@txtscale}\pgfmathsetlength{\pgfPT@dimb}{.35*\f@size*\pgfPT@txtscale}%
            \else\pgfmathsetlength{\pgfPT@dima}{.85*\f@size*\pgfPT@txtscale}\fi\fi%
            \pgfPT@leglabel{eConfig}%
            \node[font=\pgfPTeConfignlfont\fontsize{\the\pgfPT@dima}{\the\pgfPT@dima}\selectfont,text=\pgfPTeConfignlcolor,%
                text width={\pgfPT@legendscaleX*\pgfPT@data@eConfignl@wd},text centered,inner xsep=0pt]%
            at ([xshift=\pgfPT@legendscaleX*\pgfPT@data@eConfignl@x,yshift=-\pgfPT@legendscaleY*\pgfPT@data@eConfignl@y]0)%
            {
            \pgfPT@putleglabel{eConfignl}%
            };
        \ifnum\pgfPT@fontspec=1\relax\setmainfont{\pgfPTglobalfont}\else\fontfamily{\pgfPTglobalfont}\selectfont\fi\fontseries{\seriesdefault}\fontshape{\shapedefault}%
    \fi%
    % d -> Density
    \ifpgfPT@d%
        \pgfPTdfont\selectfont%
            \ifnum\pgfPT@countb=2\relax\pgfmathsetlength{\pgfPT@dima}{.7*\f@size*\pgfPT@txtscale}\pgfmathsetlength{\pgfPT@dimb}{.55*\f@size*\pgfPT@txtscale}%
            \else\ifnum\pgfPT@countb>2\relax\pgfmathsetlength{\pgfPT@dima}{.6*\f@size*\pgfPT@txtscale}\pgfmathsetlength{\pgfPT@dimb}{.35*\f@size*\pgfPT@txtscale}%
            \else\pgfmathsetlength{\pgfPT@dima}{.85*\f@size*\pgfPT@txtscale}\fi\fi%
            \pgfPT@leglabel{d}%
            \node[font=\pgfPTdfont\fontsize{\the\pgfPT@dima}{\the\pgfPT@dima}\selectfont,text=\pgfPTdcolor,%
                text width={\pgfPT@legendscaleX*\pgfPT@data@d@wd},text centered,inner xsep=0pt]%
            at ([xshift=\pgfPT@legendscaleX*\pgfPT@data@d@x,yshift=-\pgfPT@legendscaleY*\pgfPT@data@d@y]0)%
            {
            \pgfPT@putleglabel[\pgfPT@labels@unit@d]{d}%
            };
        \ifnum\pgfPT@fontspec=1\relax\setmainfont{\pgfPTglobalfont}\else\fontfamily{\pgfPTglobalfont}\selectfont\fi\fontseries{\seriesdefault}\fontshape{\shapedefault}%
    \fi%
    % Cp -> Specific heat capacity (25ºC, 100kPa)
    \ifpgfPT@Cp%
        \pgfPTCpfont\selectfont\advance\pgfPT@count@note by1\relax%
            \ifnum\pgfPT@countb=2\relax\pgfmathsetlength{\pgfPT@dima}{.7*\f@size*\pgfPT@txtscale}\pgfmathsetlength{\pgfPT@dimb}{.55*\f@size*\pgfPT@txtscale}%
            \else\ifnum\pgfPT@countb>2\relax\pgfmathsetlength{\pgfPT@dima}{.6*\f@size*\pgfPT@txtscale}\pgfmathsetlength{\pgfPT@dimb}{.35*\f@size*\pgfPT@txtscale}%
            \else\pgfmathsetlength{\pgfPT@dima}{.85*\f@size*\pgfPT@txtscale}\fi\fi%
            \pgfPT@leglabel{Cp}%
            \node[font=\pgfPTCpfont\fontsize{\the\pgfPT@dima}{\the\pgfPT@dima}\selectfont,text=\pgfPTCpcolor,%
                text width={\pgfPT@legendscaleX*\pgfPT@data@Cp@wd},text centered,inner xsep=0pt]%
            at ([xshift=\pgfPT@legendscaleX*\pgfPT@data@Cp@x,yshift=-\pgfPT@legendscaleY*\pgfPT@data@Cp@y]0)%
            {
            \pgfPT@putleglabel[\pgfPT@labels@unit@Cp]{Cp}%
            };
        \ifnum\pgfPT@fontspec=1\relax\setmainfont{\pgfPTglobalfont}\else\fontfamily{\pgfPTglobalfont}\selectfont\fi\fontseries{\seriesdefault}\fontshape{\shapedefault}%
    \fi%
    % kT -> Thermal Condutivity (25ºC)
    \ifpgfPT@kT%
        \pgfPTkTfont\selectfont\advance\pgfPT@count@note by1\relax%
            \ifnum\pgfPT@countb=2\relax\pgfmathsetlength{\pgfPT@dima}{.7*\f@size*\pgfPT@txtscale}\pgfmathsetlength{\pgfPT@dimb}{.55*\f@size*\pgfPT@txtscale}%
            \else\ifnum\pgfPT@countb>2\relax\pgfmathsetlength{\pgfPT@dima}{.6*\f@size*\pgfPT@txtscale}\pgfmathsetlength{\pgfPT@dimb}{.35*\f@size*\pgfPT@txtscale}%
            \else\pgfmathsetlength{\pgfPT@dima}{.85*\f@size*\pgfPT@txtscale}\fi\fi%
            \pgfPT@leglabel{kT}%
            \node[font=\pgfPTkTfont\fontsize{\the\pgfPT@dima}{\the\pgfPT@dima}\selectfont,text=\pgfPTkTcolor,%
                text width={\pgfPT@legendscaleX*\pgfPT@data@kT@wd},text centered,inner xsep=0pt]%
            at ([xshift=\pgfPT@legendscaleX*\pgfPT@data@kT@x,yshift=-\pgfPT@legendscaleY*\pgfPT@data@kT@y]0)%
            {
            \pgfPT@putleglabel[\pgfPT@labels@unit@kT]{kT}%
            };
        \ifnum\pgfPT@fontspec=1\relax\setmainfont{\pgfPTglobalfont}\else\fontfamily{\pgfPTglobalfont}\selectfont\fi\fontseries{\seriesdefault}\fontshape{\shapedefault}%
    \fi%
    % NOTES for Cp & kT:
            \ifnum\pgfPT@count@note=1\relax%
                \ifpgfPT@Cp%
                \pgfPTCpfont\selectfont%
                \ifnum\pgfPT@countb=2\relax\pgfmathsetlength{\pgfPT@dima}{.7*\f@size}\pgfmathsetlength{\pgfPT@dimb}{.55*\f@size}%
                \else\ifnum\pgfPT@countb>2\relax\pgfmathsetlength{\pgfPT@dima}{.6*\f@size}\pgfmathsetlength{\pgfPT@dimb}{.35*\f@size}%
                \else\pgfmathsetlength{\pgfPT@dima}{.85*\f@size}\fi\fi%
                \pgfmathsetlength{\pgfPT@dimc}{.555*\pgfPT@dima}%
                \node[below right,font=\pgfPTCpfont\fontsize{\the\pgfPT@dima}{\the\pgfPT@dima}\selectfont,text=\pgfPTCpcolor,inner ysep=1pt] %
                at ([yshift=-\pgfPT@legendscaleY*\pgfPTcellht]0.south west) {%
                \raisebox{.777ex}{\fontsize{\pgfPT@dimc}{\pgfPT@dimc}\selectfont(a)} %
                @ 25\raisebox{.777ex}{\fontsize{\pgfPT@dimc}{\pgfPT@dimc}\selectfont o}C,100\hspace{.1ex}kPa};%
                \else\ifpgfPT@kT%
                \pgfPTkTfont\selectfont%
                \ifnum\pgfPT@countb=2\relax\pgfmathsetlength{\pgfPT@dima}{.7*\f@size}\pgfmathsetlength{\pgfPT@dimb}{.55*\f@size}%
                \else\ifnum\pgfPT@countb>2\relax\pgfmathsetlength{\pgfPT@dima}{.6*\f@size}\pgfmathsetlength{\pgfPT@dimb}{.35*\f@size}%
                \else\pgfmathsetlength{\pgfPT@dima}{.85*\f@size}\fi\fi%
                \pgfmathsetlength{\pgfPT@dimc}{.555*\pgfPT@dima}%
                \node[below right,font=\pgfPTkTfont\fontsize{\the\pgfPT@dima}{\the\pgfPT@dima}\selectfont,text=\pgfPTkTcolor,inner ysep=1pt] %
                at ([yshift=-\pgfPT@legendscaleY*\pgfPTcellht]0.south west) {%
                \raisebox{.777ex}{\fontsize{\pgfPT@dimc}{\pgfPT@dimc}\selectfont(a)} %
                @ 25\raisebox{.777ex}{\fontsize{\pgfPT@dimc}{\pgfPT@dimc}\selectfont o}C};%
                \fi\fi%
            \else\ifnum\pgfPT@count@note=2\relax% \pgfPT@count@note=1
                \ifdim\pgfPT@data@kT@y=\pgfPT@data@Cp@y\relax%
                \ifdim\pgfPT@data@kT@x>\pgfPT@data@Cp@x\relax% Cp -> a ; kT -> b
                    \pgfPTCpfont\selectfont% Cp ---->
                    \ifnum\pgfPT@countb=2\relax\pgfmathsetlength{\pgfPT@dima}{.7*\f@size}\pgfmathsetlength{\pgfPT@dimb}{.55*\f@size}%
                    \else\ifnum\pgfPT@countb>2\relax\pgfmathsetlength{\pgfPT@dima}{.6*\f@size}\pgfmathsetlength{\pgfPT@dimb}{.35*\f@size}%
                    \else\pgfmathsetlength{\pgfPT@dima}{.85*\f@size}\fi\fi%
                    \pgfmathsetlength{\pgfPT@dimc}{.555*\pgfPT@dima}%
                    \node[below right,font=\pgfPTCpfont\fontsize{\the\pgfPT@dima}{\the\pgfPT@dima}\selectfont,text=\pgfPTCpcolor,inner ysep=1pt] (noteA)%
                        at ([yshift=-\pgfPT@legendscaleY*\pgfPTcellht]0.south west) {%
                        \raisebox{.777ex}{\fontsize{\pgfPT@dimc}{\pgfPT@dimc}\selectfont(a)} %
                        @ 25\raisebox{.777ex}{\fontsize{\pgfPT@dimc}{\pgfPT@dimc}\selectfont o}C,100\hspace{.1ex}kPa};%
                    \pgfPTkTfont\selectfont% kT ---->
                    \ifnum\pgfPT@countb=2\relax\pgfmathsetlength{\pgfPT@dima}{.7*\f@size}\pgfmathsetlength{\pgfPT@dimb}{.55*\f@size}%
                    \else\ifnum\pgfPT@countb>2\relax\pgfmathsetlength{\pgfPT@dima}{.6*\f@size}\pgfmathsetlength{\pgfPT@dimb}{.35*\f@size}%
                    \else\pgfmathsetlength{\pgfPT@dima}{.85*\f@size}\fi\fi%
                    \pgfmathsetlength{\pgfPT@dimc}{.555*\pgfPT@dima}%
                    \node[below right,font=\pgfPTkTfont\fontsize{\the\pgfPT@dima}{\the\pgfPT@dima}\selectfont,text=\pgfPTkTcolor,inner ysep=1pt] %
                        at ([yshift=.65ex]noteA.south west) {%
                        \raisebox{.777ex}{\fontsize{\pgfPT@dimc}{\pgfPT@dimc}\selectfont(b)} %
                        @ 25\raisebox{.777ex}{\fontsize{\pgfPT@dimc}{\pgfPT@dimc}\selectfont o}C};%
                \else% kT -> a ; Cp -> b
                    \pgfPTkTfont\selectfont% kT ---->
                    \ifnum\pgfPT@countb=2\relax\pgfmathsetlength{\pgfPT@dima}{.7*\f@size}\pgfmathsetlength{\pgfPT@dimb}{.55*\f@size}%
                    \else\ifnum\pgfPT@countb>2\relax\pgfmathsetlength{\pgfPT@dima}{.6*\f@size}\pgfmathsetlength{\pgfPT@dimb}{.35*\f@size}%
                    \else\pgfmathsetlength{\pgfPT@dima}{.85*\f@size}\fi\fi%
                    \pgfmathsetlength{\pgfPT@dimc}{.555*\pgfPT@dima}%
                    \node[below right,font=\pgfPTkTfont\fontsize{\the\pgfPT@dima}{\the\pgfPT@dima}\selectfont,text=\pgfPTkTcolor,inner ysep=1pt]  (noteA)%
                        at ([yshift=-\pgfPT@legendscaleY*\pgfPTcellht]0.south west) {%
                        \raisebox{.777ex}{\fontsize{\pgfPT@dimc}{\pgfPT@dimc}\selectfont(a)} %
                        @ 25\raisebox{.777ex}{\fontsize{\pgfPT@dimc}{\pgfPT@dimc}\selectfont o}C};%
                    \pgfPTCpfont\selectfont% Cp ---->
                    \ifnum\pgfPT@countb=2\relax\pgfmathsetlength{\pgfPT@dima}{.7*\f@size}\pgfmathsetlength{\pgfPT@dimb}{.55*\f@size}%
                    \else\ifnum\pgfPT@countb>2\relax\pgfmathsetlength{\pgfPT@dima}{.6*\f@size}\pgfmathsetlength{\pgfPT@dimb}{.35*\f@size}%
                    \else\pgfmathsetlength{\pgfPT@dima}{.85*\f@size}\fi\fi%
                    \pgfmathsetlength{\pgfPT@dimc}{.555*\pgfPT@dima}%
                    \node[below right,font=\pgfPTCpfont\fontsize{\the\pgfPT@dima}{\the\pgfPT@dima}\selectfont,text=\pgfPTCpcolor,inner ysep=1pt] %
                        at ([yshift=.65ex]noteA.south west) {%
                        \raisebox{.777ex}{\fontsize{\pgfPT@dimc}{\pgfPT@dimc}\selectfont(b)} %
                        @ 25\raisebox{.777ex}{\fontsize{\pgfPT@dimc}{\pgfPT@dimc}\selectfont o}C,100\hspace{.1ex}kPa};%
                \fi%
                \else%\pgfPT@data@kT@y=\pgfPT@data@Cp@y\fi%
                \ifdim\pgfPT@data@kT@y>\pgfPT@data@Cp@y\relax% Cp -> a ; kT -> b
                    \pgfPTCpfont\selectfont% Cp ---->
                    \ifnum\pgfPT@countb=2\relax\pgfmathsetlength{\pgfPT@dima}{.7*\f@size}\pgfmathsetlength{\pgfPT@dimb}{.55*\f@size}%
                    \else\ifnum\pgfPT@countb>2\relax\pgfmathsetlength{\pgfPT@dima}{.6*\f@size}\pgfmathsetlength{\pgfPT@dimb}{.35*\f@size}%
                    \else\pgfmathsetlength{\pgfPT@dima}{.85*\f@size}\fi\fi%
                    \pgfmathsetlength{\pgfPT@dimc}{.555*\pgfPT@dima}%
                    \node[below right,font=\pgfPTCpfont\fontsize{\the\pgfPT@dima}{\the\pgfPT@dima}\selectfont,text=\pgfPTCpcolor,inner ysep=1pt] (noteA)%
                        at ([yshift=-\pgfPT@legendscaleY*\pgfPTcellht]0.south west) {%
                        \raisebox{.777ex}{\fontsize{\pgfPT@dimc}{\pgfPT@dimc}\selectfont(a)} %
                        @ 25\raisebox{.777ex}{\fontsize{\pgfPT@dimc}{\pgfPT@dimc}\selectfont o}C,100\hspace{.1ex}kPa};%
                    \pgfPTkTfont\selectfont% kT ---->
                    \ifnum\pgfPT@countb=2\relax\pgfmathsetlength{\pgfPT@dima}{.7*\f@size}\pgfmathsetlength{\pgfPT@dimb}{.55*\f@size}%
                    \else\ifnum\pgfPT@countb>2\relax\pgfmathsetlength{\pgfPT@dima}{.6*\f@size}\pgfmathsetlength{\pgfPT@dimb}{.35*\f@size}%
                    \else\pgfmathsetlength{\pgfPT@dima}{.85*\f@size}\fi\fi%
                    \pgfmathsetlength{\pgfPT@dimc}{.555*\pgfPT@dima}%
                    \node[below right,font=\pgfPTkTfont\fontsize{\the\pgfPT@dima}{\the\pgfPT@dima}\selectfont,text=\pgfPTkTcolor,inner ysep=1pt] %
                        at ([yshift=.65ex]noteA.south west) {%
                        \raisebox{.777ex}{\fontsize{\pgfPT@dimc}{\pgfPT@dimc}\selectfont(b)} %
                        @ 25\raisebox{.777ex}{\fontsize{\pgfPT@dimc}{\pgfPT@dimc}\selectfont o}C};%
                \else% kT -> a ; Cp -> b
                    \pgfPTkTfont\selectfont% kT ---->
                    \ifnum\pgfPT@countb=2\relax\pgfmathsetlength{\pgfPT@dima}{.7*\f@size}\pgfmathsetlength{\pgfPT@dimb}{.55*\f@size}%
                    \else\ifnum\pgfPT@countb>2\relax\pgfmathsetlength{\pgfPT@dima}{.6*\f@size}\pgfmathsetlength{\pgfPT@dimb}{.35*\f@size}%
                    \else\pgfmathsetlength{\pgfPT@dima}{.85*\f@size}\fi\fi%
                    \pgfmathsetlength{\pgfPT@dimc}{.555*\pgfPT@dima}%
                    \node[below right,font=\pgfPTkTfont\fontsize{\the\pgfPT@dima}{\the\pgfPT@dima}\selectfont,text=\pgfPTkTcolor,inner ysep=1pt]  (noteA)%
                        at ([yshift=-\pgfPT@legendscaleY*\pgfPTcellht]0.south west) {%
                        \raisebox{.777ex}{\fontsize{\pgfPT@dimc}{\pgfPT@dimc}\selectfont(a)} %
                        @ 25\raisebox{.777ex}{\fontsize{\pgfPT@dimc}{\pgfPT@dimc}\selectfont o}C};%
                    \pgfPTCpfont\selectfont% Cp ---->
                    \ifnum\pgfPT@countb=2\relax\pgfmathsetlength{\pgfPT@dima}{.7*\f@size}\pgfmathsetlength{\pgfPT@dimb}{.55*\f@size}%
                    \else\ifnum\pgfPT@countb>2\relax\pgfmathsetlength{\pgfPT@dima}{.6*\f@size}\pgfmathsetlength{\pgfPT@dimb}{.35*\f@size}%
                    \else\pgfmathsetlength{\pgfPT@dima}{.85*\f@size}\fi\fi%
                    \pgfmathsetlength{\pgfPT@dimc}{.555*\pgfPT@dima}%
                    \node[below right,font=\pgfPTCpfont\fontsize{\the\pgfPT@dima}{\the\pgfPT@dima}\selectfont,text=\pgfPTCpcolor,inner ysep=1pt] %
                        at ([yshift=.65ex]noteA.south west) {%
                        \raisebox{.777ex}{\fontsize{\pgfPT@dimc}{\pgfPT@dimc}\selectfont(b)} %
                        @ 25\raisebox{.777ex}{\fontsize{\pgfPT@dimc}{\pgfPT@dimc}\selectfont o}C,100\hspace{.1ex}kPa};%
                \fi\fi%
            \fi\fi% \else\ifnum\pgfPT@count@note=2
            \ifnum\pgfPT@fontspec=1\relax\setmainfont{\pgfPTglobalfont}\else\fontfamily{\pgfPTglobalfont}\selectfont\fi\fontseries{\seriesdefault}\fontshape{\shapedefault}%
    % END OF NOTES for Cp & kT <-------
    % ls -> Lattice Structure
    \ifpgfPT@ls%
        \pgfPTlsfont\selectfont%
            \ifnum\pgfPT@countb=2\relax\pgfmathsetlength{\pgfPT@dima}{.5*\f@size*\pgfPT@txtscale}\pgfmathsetlength{\pgfPT@dimb}{.35*\f@size*\pgfPT@txtscale}%
            \else\ifnum\pgfPT@countb>2\relax\pgfmathsetlength{\pgfPT@dima}{.3*\f@size*\pgfPT@txtscale}\pgfmathsetlength{\pgfPT@dimb}{.2*\f@size*\pgfPT@txtscale}%
            \else\pgfmathsetlength{\pgfPT@dima}{.6*\f@size*\pgfPT@txtscale}\fi\fi%
            \pgfPT@leglabel{ls}%
            \node[font=\pgfPTlsfont\fontsize{\the\pgfPT@dima}{\the\pgfPT@dima}\selectfont,text=\pgfPTlscolor,%
                text width={0.75*\pgfPT@legendscaleX*\pgfPT@data@ls@wd},text centered,inner xsep=0pt]%
            at ([xshift={0.25*\pgfPT@legendscaleX*\pgfPT@data@ls@wd+\pgfPT@legendscaleX*\pgfPT@data@ls@x},yshift=-\pgfPT@legendscaleY*\pgfPT@data@ls@y]0)%
            {
            \pgfPT@putleglabel{ls}%
            };
            \ifpgfPTlegendaextra%
                \ifnum\pgfPT@countb=2\relax\pgfmathsetlength{\pgfPT@dima}{.7*\f@size}\pgfmathsetlength{\pgfPT@dimb}{.55*\f@size}%
                    \else\ifnum\pgfPT@countb>2\relax\pgfmathsetlength{\pgfPT@dima}{.6*\f@size}\pgfmathsetlength{\pgfPT@dimb}{.35*\f@size}%
                    \else\pgfmathsetlength{\pgfPT@dima}{.78*\f@size}\fi\fi% .85
                \ifpgfPT@DiscC% insere a legenda extra para a estrutura da rede (existindo as bandeiras)
                    \pgfmathsetlength{\pgfPT@boxht}{.72*\f@size}% .77
                    \pgfmathsetlength{\pgfPT@boxwd}{.2*\pgfPTcellwd}%
                    \node[extralegend,%
                        text width=1.8*\pgfPTcellwd,font=\pgfPTlsfont\fontsize{\the\pgfPT@dima}{\the\pgfPT@dima}\selectfont,text=\pgfPTlscolor,%
                        inner xsep=2pt,inner ysep=1pt]
                        at (EXTRA) {%
                        \global\pgfPT@countc=0%
                        \@for\pgfPT@lssigla:={bcc,bcort,ctetr,dia,fcc,fcort,hcp,hex,mono,rho,sc,tric,tetr}\do{%
                            \pgfPT@legend{ls@\pgfPT@lssigla}%
                            \tikz{%
                                \node[text width=\pgfPT@boxwd,text centered,inner sep=0pt] (exFlag) at (0,0) %
                                    {\ifpgfPT@lsfig@extra\includegraphics[height=\pgfPT@boxht]{lattice/pgfPT_ls_\pgfPT@lssigla.pdf}\\ [-.75ex]\pgfPT@lssigla%
                                    \else\setbox0=\vbox{\includegraphics[height=\pgfPT@boxht]{lattice/pgfPT_ls_\pgfPT@lssigla.pdf}\vskip-.75ex\pgfPT@lssigla}%
                                    \vbox to\ht0{\vfill\pgfPT@box@smash{\pgfPT@lssigla}\vfill}\fi};% changed in v2.1.6
                                \node[below right,text width=1.55*\pgfPTcellwd,inner xsep=0pt] at ([xshift=.025*\pgfPTcellwd]exFlag.north east) {%
                                    \ifpgfPT@lsfig@extra%
                                    \pgfPT@box@zerodepth{\pgfPT@tmp@label@defaultLanguage}%
                                    \ifnum\pgfPT@counta>1\relax\\ {\fontsize{\the\pgfPT@dimb}{\the\pgfPT@dimb}\selectfont\color{\pgfPTotherLangColor}%
                                    \pgfPT@tmp@labels@otherLanguages}\fi%
                                    \else\setbox0=\vbox{\includegraphics[height=\pgfPT@boxht]{lattice/pgfPT_ls_\pgfPT@lssigla.pdf}\vskip-.75ex\pgfPT@lssigla}%
                                        \ifnum\pgfPT@counta>1\relax%
                                        \vbox to\ht0{\vfill\pgfPT@box@smash{\vbox{\pgfPT@box@zerodepth{\pgfPT@tmp@label@defaultLanguage}%
                                        \vskip0pt\fontsize{\the\pgfPT@dimb}{\the\pgfPT@dimb}\selectfont\color{\pgfPTotherLangColor}%
                                        \pgfPT@tmp@labels@otherLanguages}%
                                        }}%
                                        \else%
                                        \vbox to\ht0{\vfill\pgfPT@box@smash{\hskip1em\pgfPT@tmp@label@defaultLanguage}\vfill}%
                                        \fi%
                                    \fi%
                                };%
                            }%
                        \global\advance\pgfPT@countc by1\relax%
                        \ifnum\pgfPT@countc<13\relax\ifpgfPT@lsfig@extra\relax\vspace{-.19ex}\else\vspace{-.1365ex}\fi\newline\fi%
                        }%
                    };
                \else% apenas a estrutura da rede
                    \pgfmathsetlength{\pgfPT@boxht}{.75*\f@size}%
                    \pgfmathsetlength{\pgfPT@boxwd}{.25*\pgfPTcellwd}%
                    \node[extralegend,%
                        text width=2*\pgfPTcellwd,font=\pgfPTlsfont\fontsize{\the\pgfPT@dima}{\the\pgfPT@dima}\selectfont,text=\pgfPTlscolor,%
                        inner xsep=2pt,inner ysep=1pt]
                        at ([xshift=\pgfPTcellwd]EXTRA) {%
                        \global\pgfPT@countc=0%
                        \@for\pgfPT@lssigla:={bcc,bcort,ctetr,dia,fcc,fcort,hcp,hex,mono,rho,sc,tric,tetr}\do{%
                            \pgfPT@legend{ls@\pgfPT@lssigla}%
                            \tikz{%
                                \node[text width=\pgfPT@boxwd,text centered,inner sep=0pt] (exFlag) at (0,0) %
                                    {\ifpgfPT@lsfig@extra\includegraphics[height=\pgfPT@boxht]{lattice/pgfPT_ls_\pgfPT@lssigla.pdf}\\ [-.75ex]\pgfPT@lssigla%
                                    \else\setbox0=\vbox{\includegraphics[height=\pgfPT@boxht]{lattice/pgfPT_ls_\pgfPT@lssigla.pdf}\vskip-.75ex\pgfPT@lssigla}%
                                    \vbox to\ht0{\vfill\pgfPT@box@smash{\pgfPT@lssigla}\vfill}\fi};% changed in v2.1.6
                                \node[below right,text width=1.55*\pgfPTcellwd,inner xsep=0pt] at ([xshift=.025*\pgfPTcellwd]exFlag.north east) {%
                                    \ifpgfPT@lsfig@extra%
                                    \pgfPT@box@zerodepth{\pgfPT@tmp@label@defaultLanguage}%
                                    \ifnum\pgfPT@counta>1\relax\\ {\fontsize{\the\pgfPT@dimb}{\the\pgfPT@dimb}\selectfont\color{\pgfPTotherLangColor}%
                                    \pgfPT@tmp@labels@otherLanguages}\fi%
                                    \else\setbox0=\vbox{\includegraphics[height=\pgfPT@boxht]{lattice/pgfPT_ls_\pgfPT@lssigla.pdf}\vskip-.75ex\pgfPT@lssigla}%
                                        \ifnum\pgfPT@counta>1\relax%
                                        \vbox to\ht0{\vfill\pgfPT@box@smash{\vbox{\pgfPT@box@zerodepth{\pgfPT@tmp@label@defaultLanguage}%
                                        \vskip0pt\fontsize{\the\pgfPT@dimb}{\the\pgfPT@dimb}\selectfont\color{\pgfPTotherLangColor}%
                                        \pgfPT@tmp@labels@otherLanguages}%
                                        }}%
                                        \else%
                                        \vbox to\ht0{\vfill\pgfPT@box@smash{\hskip1ex\pgfPT@tmp@label@defaultLanguage}\vfill}%
                                        \fi%
                                    \fi%
                                };%
                            }%
                        \global\advance\pgfPT@countc by1\relax%
                        \ifnum\pgfPT@countc<13\relax\vspace{-.1775ex}\newline\fi%
                        }%
                    };
                \fi%
            \fi% legenda extra
        \ifnum\pgfPT@fontspec=1\relax\setmainfont{\pgfPTglobalfont}\else\fontfamily{\pgfPTglobalfont}\selectfont\fi\fontseries{\seriesdefault}\fontshape{\shapedefault}%
    \fi%
    % lsa -> Lattice constant: a
    \ifpgfPT@lsa%
        \pgfPTlsafont\selectfont%
            \ifnum\pgfPT@countb=2\relax\pgfmathsetlength{\pgfPT@dima}{.7*\f@size*\pgfPT@txtscale}\pgfmathsetlength{\pgfPT@dimb}{.55*\f@size*\pgfPT@txtscale}%
            \else\ifnum\pgfPT@countb>2\relax\pgfmathsetlength{\pgfPT@dima}{.6*\f@size*\pgfPT@txtscale}\pgfmathsetlength{\pgfPT@dimb}{.35*\f@size*\pgfPT@txtscale}%
            \else\pgfmathsetlength{\pgfPT@dima}{.85*\f@size*\pgfPT@txtscale}\fi\fi%
            \pgfPT@leglabel{lsa}%
            \node[font=\pgfPTlsafont\fontsize{\the\pgfPT@dima}{\the\pgfPT@dima}\selectfont,text=\pgfPTlsacolor,%
                text width={\pgfPT@legendscaleX*\pgfPT@data@lsa@wd},text centered,inner xsep=0pt]%
            at ([xshift=\pgfPT@legendscaleX*\pgfPT@data@lsa@x,yshift=-\pgfPT@legendscaleY*\pgfPT@data@lsa@y]0)%
            {
            \pgfPT@putleglabel[\pgfPT@labels@unit@ls]{lsa}%
            };
        \ifnum\pgfPT@fontspec=1\relax\setmainfont{\pgfPTglobalfont}\else\fontfamily{\pgfPTglobalfont}\selectfont\fi\fontseries{\seriesdefault}\fontshape{\shapedefault}%
    \fi%
    % lsb -> Lattice constant: b
    \ifpgfPT@lsb%
        \pgfPTlsbfont\selectfont%
            \ifnum\pgfPT@countb=2\relax\pgfmathsetlength{\pgfPT@dima}{.7*\f@size*\pgfPT@txtscale}\pgfmathsetlength{\pgfPT@dimb}{.55*\f@size*\pgfPT@txtscale}%
            \else\ifnum\pgfPT@countb>2\relax\pgfmathsetlength{\pgfPT@dima}{.6*\f@size*\pgfPT@txtscale}\pgfmathsetlength{\pgfPT@dimb}{.35*\f@size*\pgfPT@txtscale}%
            \else\pgfmathsetlength{\pgfPT@dima}{.85*\f@size*\pgfPT@txtscale}\fi\fi%
            \pgfPT@leglabel{lsb}%
            \node[font=\pgfPTlsbfont\fontsize{\the\pgfPT@dima}{\the\pgfPT@dima}\selectfont,text=\pgfPTlsbcolor,%
                text width={\pgfPT@legendscaleX*\pgfPT@data@lsb@wd},text centered,inner xsep=0pt]%
            at ([xshift=\pgfPT@legendscaleX*\pgfPT@data@lsb@x,yshift=-\pgfPT@legendscaleY*\pgfPT@data@lsb@y]0)%
            {
            \pgfPT@putleglabel[\pgfPT@labels@unit@ls]{lsb}%
            };
        \ifnum\pgfPT@fontspec=1\relax\setmainfont{\pgfPTglobalfont}\else\fontfamily{\pgfPTglobalfont}\selectfont\fi\fontseries{\seriesdefault}\fontshape{\shapedefault}%
    \fi%
    % lsc -> Lattice constant: c
    \ifpgfPT@lsc%
        \pgfPTlscfont\selectfont%
            \ifnum\pgfPT@countb=2\relax\pgfmathsetlength{\pgfPT@dima}{.7*\f@size*\pgfPT@txtscale}\pgfmathsetlength{\pgfPT@dimb}{.55*\f@size*\pgfPT@txtscale}%
            \else\ifnum\pgfPT@countb>2\relax\pgfmathsetlength{\pgfPT@dima}{.6*\f@size*\pgfPT@txtscale}\pgfmathsetlength{\pgfPT@dimb}{.35*\f@size*\pgfPT@txtscale}%
            \else\pgfmathsetlength{\pgfPT@dima}{.85*\f@size*\pgfPT@txtscale}\fi\fi%
            \pgfPT@leglabel{lsc}%
            \node[font=\pgfPTlscfont\fontsize{\the\pgfPT@dima}{\the\pgfPT@dima}\selectfont,text=\pgfPTlsccolor,%
                text width={\pgfPT@legendscaleX*\pgfPT@data@lsc@wd},text centered,inner xsep=0pt]%
            at ([xshift=\pgfPT@legendscaleX*\pgfPT@data@lsc@x,yshift=-\pgfPT@legendscaleY*\pgfPT@data@lsc@y]0)%
            {
            \pgfPT@putleglabel[\pgfPT@labels@unit@ls]{lsc}%
            };
        \ifnum\pgfPT@fontspec=1\relax\setmainfont{\pgfPTglobalfont}\else\fontfamily{\pgfPTglobalfont}\selectfont\fi\fontseries{\seriesdefault}\fontshape{\shapedefault}%
    \fi%
    % lsca -> Lattice c/a ratio:
    \ifpgfPT@lsca%
        \pgfPTlscafont\selectfont%
            \ifnum\pgfPT@countb=2\relax\pgfmathsetlength{\pgfPT@dima}{.7*\f@size*\pgfPT@txtscale}\pgfmathsetlength{\pgfPT@dimb}{.55*\f@size*\pgfPT@txtscale}%
            \else\ifnum\pgfPT@countb>2\relax\pgfmathsetlength{\pgfPT@dima}{.6*\f@size*\pgfPT@txtscale}\pgfmathsetlength{\pgfPT@dimb}{.35*\f@size*\pgfPT@txtscale}%
            \else\pgfmathsetlength{\pgfPT@dima}{.85*\f@size*\pgfPT@txtscale}\fi\fi%
            \pgfPT@leglabel{lsca}%
            \node[font=\pgfPTlscafont\fontsize{\the\pgfPT@dima}{\the\pgfPT@dima}\selectfont,text=\pgfPTlscacolor,%
                text width={\pgfPT@legendscaleX*\pgfPT@data@lsca@wd},text centered,inner xsep=0pt]%
            at ([xshift=\pgfPT@legendscaleX*\pgfPT@data@lsca@x,yshift=-\pgfPT@legendscaleY*\pgfPT@data@lsca@y]0)%
            {
            \pgfPT@putleglabel{lsca}%
            };
        \ifnum\pgfPT@fontspec=1\relax\setmainfont{\pgfPTglobalfont}\else\fontfamily{\pgfPTglobalfont}\selectfont\fi\fontseries{\seriesdefault}\fontshape{\shapedefault}%
    \fi%
    % DiscY -> Discover Year
    \ifpgfPT@DiscY%
        \pgfPTDiscYfont\selectfont%
            \ifnum\pgfPT@countb=2\relax\pgfmathsetlength{\pgfPT@dima}{.7*\f@size*\pgfPT@txtscale}\pgfmathsetlength{\pgfPT@dimb}{.55*\f@size*\pgfPT@txtscale}%
            \else\ifnum\pgfPT@countb>2\relax\pgfmathsetlength{\pgfPT@dima}{.6*\f@size*\pgfPT@txtscale}\pgfmathsetlength{\pgfPT@dimb}{.35*\f@size*\pgfPT@txtscale}%
            \else\pgfmathsetlength{\pgfPT@dima}{.85*\f@size*\pgfPT@txtscale}\fi\fi%
            \pgfPT@leglabel{DiscY}%
            \node[font=\pgfPTDiscYfont\fontsize{\the\pgfPT@dima}{\the\pgfPT@dima}\selectfont,text=\pgfPTDiscYcolor,%
                text width={\pgfPT@legendscaleX*\pgfPT@data@DiscY@wd},text centered,inner xsep=0pt]%
            at ([xshift=\pgfPT@legendscaleX*\pgfPT@data@DiscY@x,yshift=-\pgfPT@legendscaleY*\pgfPT@data@DiscY@y]0)%
            {
            \pgfPT@putleglabel{DiscY}%
            };
        \ifnum\pgfPT@fontspec=1\relax\setmainfont{\pgfPTglobalfont}\else\fontfamily{\pgfPTglobalfont}\selectfont\fi\fontseries{\seriesdefault}\fontshape{\shapedefault}%
    \fi%
    % DiscC -> Discover Country
    \ifpgfPT@DiscC%
        \pgfPTDiscCfont\selectfont%
            \ifnum\pgfPT@countb=2\relax\pgfmathsetlength{\pgfPT@dima}{.7*\f@size*\pgfPT@txtscale}\pgfmathsetlength{\pgfPT@dimb}{.55*\f@size*\pgfPT@txtscale}%
            \else\ifnum\pgfPT@countb>2\relax\pgfmathsetlength{\pgfPT@dima}{.6*\f@size*\pgfPT@txtscale}\pgfmathsetlength{\pgfPT@dimb}{.35*\f@size*\pgfPT@txtscale}%
            \else\pgfmathsetlength{\pgfPT@dima}{.85*\f@size*\pgfPT@txtscale}\fi\fi%
            \pgfPT@leglabel{DiscC}%
            \node[font=\pgfPTDiscCfont\fontsize{\the\pgfPT@dima}{\the\pgfPT@dima}\selectfont,text=\pgfPTDiscCcolor,%
                text width={\pgfPT@legendscaleX*\pgfPT@data@DiscC@wd},text centered,inner xsep=0pt]%
            at ([xshift=\pgfPT@legendscaleX*\pgfPT@data@DiscC@x,yshift=-\pgfPT@legendscaleY*\pgfPT@data@DiscC@y]0)%
            {
            \pgfPT@putleglabel{DiscC}%
            };
            \ifpgfPTlegendaextra%
                \ifnum\pgfPT@countb>1\relax\pgfmathsetlength{\pgfPT@dima}{.67*\f@size}\pgfmathsetlength{\pgfPT@dimb}{.55*\f@size}\edef\pgfPT@nodepos{below right}\edef\pgfPT@nodeat{north east}%
                \else\pgfmathsetlength{\pgfPT@dima}{.78*\f@size}\edef\pgfPT@nodepos{right}\edef\pgfPT@nodeat{east}\fi%
                \ifpgfPT@ls% insere a legenda extra para as bandeiras (existindo a estrutura da rede)
                    \pgfmathsetlength{\pgfPT@boxht}{.6*\f@size}%
                    \pgfmathsetlength{\pgfPT@boxwd}{.2*\pgfPTcellwd}%
                    \node[extralegend,%
                        text width=2*\pgfPTcellwd,font=\pgfPTDiscCfont\fontsize{\the\pgfPT@dima}{\the\pgfPT@dima}\selectfont,text=\pgfPTDiscCcolor,%
                        inner xsep=2pt,inner ysep=1pt]
                        at ([xshift=2*\pgfPTcellwd]EXTRA) {%
                    \@for\pgfPT@country:={0,1,2,3,4,5,8,11,12,13,14,15,17,18,20,21,22,25}\do{%
                        \pgfPT@set@country{\pgfPT@country}%
                        \tikz{%
                        \node[text width=\pgfPT@boxwd,text centered,inner sep=0pt] (exFlag) at (0,0) {\includegraphics[height=\pgfPT@boxht]{flags/\pgfPT@country@flag.pdf}};%
                        \global\pgfPT@countc=0%
                        \node[\pgfPT@nodepos,text width=1.75*\pgfPTcellwd,inner xsep=0pt] at ([xshift=.025*\pgfPTcellwd]exFlag.\pgfPT@nodeat) {%
                        \@for\pgfPT@tmp:=\pgfPTlanguages\do{%
                            \ifnum\pgfPT@countc=0\relax%
                                \pgfPT@box@zerodepth{\csname pgfPT@country@name@\pgfPT@tmp\endcsname}%
                                \else%
                                {\fontsize{\the\pgfPT@dimb}{\the\pgfPT@dimb}\selectfont\color{\pgfPTotherLangColor}
                                \ \pgfPT@box@zerodepth{\csname pgfPT@country@name@\pgfPT@tmp\endcsname}}%
                                \fi%
                            \global\advance\pgfPT@countc by1\relax%
                            }%
                            };%
                        }%
                        \ifnum\pgfPT@country<25\relax\vspace{1pt}\newline\fi%
                        }%
                    };
                \else% apenas as bandeiras
                    \pgfmathsetlength{\pgfPT@boxht}{.6*\f@size}%
                    \pgfmathsetlength{\pgfPT@boxwd}{.2*\pgfPTcellwd}%
                    \node[extralegend,%
                        text width=2.5*\pgfPTcellwd,font=\pgfPTDiscCfont\fontsize{\the\pgfPT@dima}{\the\pgfPT@dima}\selectfont,text=\pgfPTDiscCcolor,%
                        inner xsep=2pt,inner ysep=1pt]
                        at ([xshift=.875*\pgfPTcellwd]EXTRA) {%
                    \@for\pgfPT@country:={0,1,2,3,4,5,8,11,12,13,14,15,17,18,20,21,22,25}\do{%
                        \pgfPT@set@country{\pgfPT@country}%
                        \tikz{%
                        \node[text width=\pgfPT@boxwd,text centered,inner sep=0pt] (exFlag) at (0,0) {\includegraphics[height=\pgfPT@boxht]{flags/\pgfPT@country@flag.pdf}};%
                        \global\pgfPT@countc=0%
                        \node[below right,text width=2.2*\pgfPTcellwd,inner xsep=0pt] at ([xshift=.025*\pgfPTcellwd]exFlag.north east) {%
                        \@for\pgfPT@tmp:=\pgfPTlanguages\do{%
                            \ifnum\pgfPT@countc=0\relax%
                                \pgfPT@box@zerodepth{\csname pgfPT@country@name@\pgfPT@tmp\endcsname}%
                                \else%
                                {\fontsize{\the\pgfPT@dimb}{\the\pgfPT@dimb}\selectfont\color{\pgfPTotherLangColor}
                                \ \pgfPT@box@zerodepth{\csname pgfPT@country@name@\pgfPT@tmp\endcsname}}%
                                \fi%
                            \global\advance\pgfPT@countc by1\relax%
                            }%
                            };%
                        }%
                        \ifnum\pgfPT@country<25\relax\vspace{1pt}\newline\fi%
                        }%
                    };
                \fi%
            \fi% legenda extra
        \ifnum\pgfPT@fontspec=1\relax\setmainfont{\pgfPTglobalfont}\else\fontfamily{\pgfPTglobalfont}\selectfont\fi\fontseries{\seriesdefault}\fontshape{\shapedefault}%
    \fi%
    % spectra -> spectra
    \ifpgfPT@spectra%
        \pgfPTspectrafont\selectfont%
            \ifnum\pgfPT@countb=2\relax\pgfmathsetlength{\pgfPT@dima}{.7*\f@size*\pgfPT@txtscale}\pgfmathsetlength{\pgfPT@dimb}{.55*\f@size*\pgfPT@txtscale}%
            \else\ifnum\pgfPT@countb>2\relax\pgfmathsetlength{\pgfPT@dima}{.6*\f@size*\pgfPT@txtscale}\pgfmathsetlength{\pgfPT@dimb}{.35*\f@size*\pgfPT@txtscale}%
            \else\pgfmathsetlength{\pgfPT@dima}{.85*\f@size*\pgfPT@txtscale}\fi\fi%
            \pgfPT@leglabel{spectra}%
            \node[font=\pgfPTspectrafont\fontsize{\the\pgfPT@dima}{\the\pgfPT@dima}\selectfont,text=\pgfPTspectracolor,%
                text width={\pgfPT@legendscaleX*\pgfPT@data@spectra@wd},text centered,inner xsep=0pt]%
            at ([xshift=\pgfPT@legendscaleX*\pgfPT@data@spectra@x,yshift=-\pgfPT@legendscaleY*\pgfPT@data@spectra@y]0)%
            {
            \pgfPT@putleglabel{spectra}%
            };
        \ifnum\pgfPT@fontspec=1\relax\setmainfont{\pgfPTglobalfont}\else\fontfamily{\pgfPTglobalfont}\selectfont\fi\fontseries{\seriesdefault}\fontshape{\shapedefault}%
    \fi%
    \global\pgfPT@dima=0pt\relax%
\fi\fi% end legend
% End of Legend and title
% MNM line (Metal Non Metal line)
% get the limits of Z
\ifpgfPTMNMline%
\expandafter\pgfPT@get@limits\pgfPT@@cellslist\relax%
\ifnum\pgfPT@limits@min=1\relax\ifnum\pgfPT@limits@max=118\relax\ifnum\pgfPT@element@count>87\relax% draw the line
\draw[line width=\pgfPTMNMlinewidth,\pgfPTMNMlinecolor] (5.north west)%
 -- ++(0,-\pgfPTcellht) -- ++(\pgfPTcellwd,0)%
 -- ++(0,-\pgfPTcellht) -- ++(\pgfPTcellwd,0)%
 -- ++(0,-\pgfPTcellht) -- ++(\pgfPTcellwd,0)%
 -- ++(0,-\pgfPTcellht) -- ++(\pgfPTcellwd,0)%
 -- ++(0,-\pgfPTcellht);%
\fi\fi\fi%
\fi%
% Blocks
\ifpgfPTblocos%
% get the limits of Z
\expandafter\pgfPT@get@limits\pgfPT@@cellslist\relax%
\ifnum\pgfPT@limits@min=1\relax\ifnum\pgfPT@limits@max=118\relax\ifnum\pgfPT@element@count>87\relax%
% draw the blocks
\pgfPT@countb=0\relax\@for\pgfPT@tmp:=\pgfPTlanguages\do{\advance\pgfPT@countb by 1\relax}%
\pgfPTblocksfont\selectfont%
\ifnum\pgfPT@countb>1\relax\pgfmathsetlength{\pgfPT@dima}{.75*\f@size}\pgfmathsetlength{\pgfPT@dimb}{.55*\f@size}%
\else\pgfmathsetlength{\pgfPT@dima}{\f@size}\fi%
% bloco s
\pgfPT@legend{blocos}%
\colorlet{pgfPTcolortemp}{\pgfPTsblockcolor}%
\draw[line width=\pgfPTsblocklinewidth,pgfPTcolortemp!50!black,fill=\pgfPTsblockcolor,opacity=.7] %
(1) -- ++(\pgfPTcellwd,0) -- (4) -- ++(\pgfPTcellwd,0) -- ([xshift=\pgfPTcellwd,yshift=-\pgfPTcellht]88) -- ([yshift=-\pgfPTcellht]87) -- cycle;
\draw[line width=\pgfPTsblocklinewidth,pgfPTcolortemp!50!black,fill=\pgfPTsblockcolor,opacity=.7] (2) -- ++(\pgfPTcellwd,0) -- ++(0,-\pgfPTcellht) -- ++(-\pgfPTcellwd,0) -- cycle;%
\ifx\pgfPTsblockfontcolor\@empty\relax%
\let\pgfPTtxtcolor\pgfPTsblockcolor\relax%
\else%
\let\pgfPTtxtcolor\pgfPTsblockfontcolor\relax%
\fi%
\colorlet{pgfPTfontcolortemp}{\pgfPTtxtcolor}%
\node[font=\pgfPTblocksfont\fontsize{\the\pgfPT@dima}{\the\pgfPT@dima}\selectfont,line width=\pgfPTsblocklinewidth,%
draw=pgfPTcolortemp!50!black,fill=white,text width=1.8*\pgfPTcellwd,text centered,inner ysep=.5ex,%
text=pgfPTfontcolortemp,rounded corners=2pt,minimum height=.5*\pgfPTcellht,anchor=mid] %
at (\pgfPTcellwd,-1.5*\pgfPTcellht) {\pgfPT@box@zerodepth{\pgfPT@tmp@label@defaultLanguage}%
            \ifnum\pgfPT@counta>1\relax\\ {\fontsize{\the\pgfPT@dimb}{\the\pgfPT@dimb}\selectfont\color{pgfPTfontcolortemp!85!transparent}%
                \pgfPT@tmp@labels@otherLanguages}\fi};
% bloco p
\pgfPT@legend{blocop}%
\colorlet{pgfPTcolortemp}{\pgfPTpblockcolor}%
\draw[line width=\pgfPTpblocklinewidth,pgfPTcolortemp!50!black,fill=\pgfPTpblockcolor,opacity=.7] %
(5) -- ++(6*\pgfPTcellwd,0) -- ++(0,-6*\pgfPTcellht) -- ++(-6*\pgfPTcellwd,0) -- cycle;%
\ifx\pgfPTpblockfontcolor\@empty\relax%
\let\pgfPTtxtcolor\pgfPTpblockcolor\relax%
\else%
\let\pgfPTtxtcolor\pgfPTpblockfontcolor\relax%
\fi%
\colorlet{pgfPTfontcolortemp}{\pgfPTtxtcolor}%
\node[font=\pgfPTblocksfont\fontsize{\the\pgfPT@dima}{\the\pgfPT@dima}\selectfont,line width=\pgfPTpblocklinewidth,%
draw=pgfPTcolortemp!50!black,fill=white,text width=1.8*\pgfPTcellwd,text centered,inner ysep=.5ex,%
text=pgfPTfontcolortemp,rounded corners=2pt,minimum height=.5*\pgfPTcellht,anchor=mid] %
at (15*\pgfPTcellwd,-1.5*\pgfPTcellht) {\pgfPT@box@zerodepth{\pgfPT@tmp@label@defaultLanguage}%
            \ifnum\pgfPT@counta>1\relax\\ {\fontsize{\the\pgfPT@dimb}{\the\pgfPT@dimb}\selectfont\color{pgfPTfontcolortemp!85!transparent}%
                \pgfPT@tmp@labels@otherLanguages}\fi};
% bloco d
\pgfPT@legend{blocod}%
\colorlet{pgfPTcolortemp}{\pgfPTdblockcolor}%
\ifpgfPTIUPACMMIX%
    \draw[line width=\pgfPTdblocklinewidth,pgfPTcolortemp!50!black,fill=\pgfPTdblockcolor,opacity=.7] %
    (21) -- ++(10*\pgfPTcellwd,0) -- ++(0,-4*\pgfPTcellht) -- ++(-9*\pgfPTcellwd,0) -- ++(0,2*\pgfPTcellht)%
    -- ++(-\pgfPTcellwd,0) -- ++(0,2*\pgfPTcellht) -- cycle;%
    \edef\pgfPT@testa{spd}%
    \ifx\pgfPTcells\pgfPT@testa\relax% f isn't present
    \else%
    \draw[line width=\pgfPTdblocklinewidth,pgfPTcolortemp!50!black,fill=\pgfPTdblockcolor,opacity=.7] %
    (57) -- ++(\pgfPTcellwd,0) -- ++(0,-2*\pgfPTcellht) -- ++(-\pgfPTcellwd,0) -- cycle;%
    \fi%
    \ifx\pgfPTdblockfontcolor\@empty\relax%
    \let\pgfPTtxtcolor\pgfPTdblockcolor\relax%
    \else%
    \let\pgfPTtxtcolor\pgfPTdblockfontcolor\relax%
    \fi%
    \colorlet{pgfPTfontcolortemp}{\pgfPTtxtcolor}%
    \node[font=\pgfPTblocksfont\fontsize{\the\pgfPT@dima}{\the\pgfPT@dima}\selectfont,line width=\pgfPTdblocklinewidth,%
        draw=pgfPTcolortemp!50!black,fill=white,text width=1.8*\pgfPTcellwd,text centered,inner ysep=.5ex,%
        text=pgfPTfontcolortemp,rounded corners=2pt,minimum height=.5*\pgfPTcellht,anchor=mid] %
        at (7*\pgfPTcellwd,-3.5*\pgfPTcellht) {\pgfPT@box@zerodepth{\pgfPT@tmp@label@defaultLanguage}%
            \ifnum\pgfPT@counta>1\relax\\ {\fontsize{\the\pgfPT@dimb}{\the\pgfPT@dimb}\selectfont\color{pgfPTfontcolortemp!85!transparent}%
                \pgfPT@tmp@labels@otherLanguages}\fi};
\else%
    \draw[line width=\pgfPTdblocklinewidth,pgfPTcolortemp!50!black,fill=\pgfPTdblockcolor,opacity=.7] %
    (21) -- ++(10*\pgfPTcellwd,0) -- ++(0,-4*\pgfPTcellht) -- ++(-10*\pgfPTcellwd,0) -- ++(0,4*\pgfPTcellht) -- cycle;%
    \ifx\pgfPTdblockfontcolor\@empty\relax%
    \let\pgfPTtxtcolor\pgfPTdblockcolor\relax%
    \else%
    \let\pgfPTtxtcolor\pgfPTdblockfontcolor\relax%
    \fi%
    \colorlet{pgfPTfontcolortemp}{\pgfPTtxtcolor}%
    \node[font=\pgfPTblocksfont\fontsize{\the\pgfPT@dima}{\the\pgfPT@dima}\selectfont,line width=\pgfPTdblocklinewidth,%
    draw=pgfPTcolortemp!50!black,fill=white,text width=1.8*\pgfPTcellwd,text centered,inner ysep=.5ex,%
    text=pgfPTfontcolortemp,rounded corners=2pt,minimum height=.5*\pgfPTcellht,anchor=mid] %
    at (7*\pgfPTcellwd,-3.5*\pgfPTcellht) {\pgfPT@box@zerodepth{\pgfPT@tmp@label@defaultLanguage}%
            \ifnum\pgfPT@counta>1\relax\\ {\fontsize{\the\pgfPT@dimb}{\the\pgfPT@dimb}\selectfont\color{pgfPTfontcolortemp!85!transparent}%
                \pgfPT@tmp@labels@otherLanguages}\fi};
\fi%
% bloco f
\edef\pgfPT@testa{spd}%
\ifx\pgfPTcells\pgfPT@testa\relax% no block f
\else%
\pgfPT@legend{blocof}%
\colorlet{pgfPTcolortemp}{\pgfPTfblockcolor}%
\draw[line width=\pgfPTfblocklinewidth,pgfPTcolortemp!50!black,fill=\pgfPTfblockcolor,opacity=.7] %
    (58) -- ++(14*\pgfPTcellwd,0) -- ++(0,-2*\pgfPTcellht) -- ++(-14*\pgfPTcellwd,0) -- cycle;%
\ifx\pgfPTfblockfontcolor\@empty\relax%
\let\pgfPTtxtcolor\pgfPTfblockcolor\relax%
\else%
\let\pgfPTtxtcolor\pgfPTfblockfontcolor\relax%
\fi%
\colorlet{pgfPTfontcolortemp}{\pgfPTtxtcolor}%
\ifpgfPTIUPACMMIX%
    \node[font=\pgfPTblocksfont\fontsize{\the\pgfPT@dima}{\the\pgfPT@dima}\selectfont,line width=\pgfPTfblocklinewidth,%
    draw=pgfPTcolortemp!50!black,fill=white,text width=1.8*\pgfPTcellwd,text centered,inner ysep=.5ex,%
    text=pgfPTfontcolortemp,rounded corners=2pt,minimum height=.5*\pgfPTcellht,anchor=mid] %
    at (10*\pgfPTcellwd,-8*\pgfPTcellht) {\pgfPT@box@zerodepth{\pgfPT@tmp@label@defaultLanguage}%
            \ifnum\pgfPT@counta>1\relax\\ {\fontsize{\the\pgfPT@dimb}{\the\pgfPT@dimb}\selectfont\color{pgfPTfontcolortemp!85!transparent}%
                \pgfPT@tmp@labels@otherLanguages}\fi};
\else%
    \node[font=\pgfPTblocksfont\fontsize{\the\pgfPT@dima}{\the\pgfPT@dima}\selectfont,line width=\pgfPTfblocklinewidth,%
    draw=pgfPTcolortemp!50!black,fill=white,text width=1.8*\pgfPTcellwd,text centered,inner ysep=.5ex,%
    text=pgfPTfontcolortemp,rounded corners=2pt,minimum height=.5*\pgfPTcellht,anchor=mid] %
    at (9.5*\pgfPTcellwd,-8*\pgfPTcellht) {\pgfPT@box@zerodepth{\pgfPT@tmp@label@defaultLanguage}%
            \ifnum\pgfPT@counta>1\relax\\ {\fontsize{\the\pgfPT@dimb}{\the\pgfPT@dimb}\selectfont\color{pgfPTfontcolortemp!85!transparent}%
                \pgfPT@tmp@labels@otherLanguages}\fi};
\fi% IUPAC
\fi%
\fi\fi\fi\fi% END Blocks
\ifnum\pgfPT@fontspec=1\relax\setmainfont{\pgfPTglobalfont}\else\fontfamily{\pgfPTglobalfont}\selectfont\fi\fontseries{\seriesdefault}\fontshape{\shapedefault}%
%
% Families
\ifpgfPTfamilias%
% get the limits of Z
\expandafter\pgfPT@get@limits\pgfPT@@cellslist\relax%
\ifnum\pgfPT@limits@min=1\relax\ifnum\pgfPT@limits@max=118\relax\ifnum\pgfPT@element@count>87\relax%
% draw the families
\pgfPT@countb=0\relax\@for\pgfPT@tmp:=\pgfPTlanguages\do{\advance\pgfPT@countb by 1\relax}%
\pgfPTfamiliesfont\selectfont%
\ifnum\pgfPT@countb>1\relax\pgfmathsetlength{\pgfPT@dima}{.75*\f@size}\pgfmathsetlength{\pgfPT@dimb}{.55*\f@size}%
\else\pgfmathsetlength{\pgfPT@dima}{\f@size}\fi%
% elementos representativos
\pgfPT@legend{blocor}%
\colorlet{pgfPTcolortemp}{\pgfPTrblockcolor}%
\draw[line width=\pgfPTrblocklinewidth,pgfPTcolortemp!50!black,fill=\pgfPTrblockcolor,opacity=.7] %
(1) -- ++(\pgfPTcellwd,0) -- ++(0,-\pgfPTcellht) -- ++(\pgfPTcellwd,0) -- ++(0,-6*\pgfPTcellht)%
 -- ++(-2*\pgfPTcellwd,0) -- cycle;
\draw[line width=\pgfPTrblocklinewidth,pgfPTcolortemp!50!black,fill=\pgfPTrblockcolor,opacity=.7] %
(12*\pgfPTcellwd,-\pgfPTcellht) -- ++(5*\pgfPTcellwd,0) -- ++(0,\pgfPTcellht)%
 -- ++(\pgfPTcellwd,0) -- ++(0,-7*\pgfPTcellht) -- ++(-6*\pgfPTcellwd,0) -- cycle;%
\ifx\pgfPTrblockfontcolor\@empty\relax%
\let\pgfPTtxtcolor\pgfPTrblockcolor\relax%
\else%
\let\pgfPTtxtcolor\pgfPTrblockfontcolor\relax%
\fi%
\colorlet{pgfPTfontcolortemp}{\pgfPTtxtcolor}%
\node[font=\pgfPTfamiliesfont\fontsize{\the\pgfPT@dima}{\the\pgfPT@dima}\selectfont,line width=\pgfPTrblocklinewidth,%
draw=pgfPTcolortemp!50!black,fill=white,text width=5*\pgfPTcellwd,text centered,inner sep=.5ex,%
text=pgfPTfontcolortemp,rounded corners=2pt,minimum height=.5*\pgfPTcellht,anchor=mid,above] (ler)%
at (7*\pgfPTcellwd,-1.5*\pgfPTcellht) {\pgfPT@box@zerodepth{\pgfPT@tmp@label@defaultLanguage}%
            \ifnum\pgfPT@counta>1\relax\\ {\fontsize{\the\pgfPT@dimb}{\the\pgfPT@dimb}\selectfont\color{pgfPTfontcolortemp!85!transparent}%
                \pgfPT@tmp@labels@otherLanguages}\fi};
\draw[line width=0.25ex,pgfPTcolortemp!50!black,-stealth,double,double distance=1pt] (ler.west) .. controls ++(-.5*\pgfPTcellwd,0) .. (2*\pgfPTcellwd,-1.5*\pgfPTcellht);%
\draw[line width=0.25ex,pgfPTcolortemp!50!black,-stealth,double,double distance=1pt] (ler.east) .. controls ++(.5*\pgfPTcellwd,0) .. (12*\pgfPTcellwd,-1.5*\pgfPTcellht);%
% metais de transicao
\pgfPT@legend{blocot}%
\colorlet{pgfPTcolortemp}{\pgfPTtblockcolor}%
\ifpgfPTIUPACMMIX%
    \draw[line width=\pgfPTtblocklinewidth,pgfPTcolortemp!50!black,fill=\pgfPTtblockcolor,opacity=.7] %
    (21) -- ++(10*\pgfPTcellwd,0) -- ++(0,-4*\pgfPTcellht) -- ++(-9*\pgfPTcellwd,0) -- ++(0,2*\pgfPTcellht)%
    -- ++(-\pgfPTcellwd,0) -- ++(0,2*\pgfPTcellht) -- cycle;%
    \edef\pgfPT@testa{spd}%
    \ifx\pgfPTcells\pgfPT@testa\relax% f isn't present
    \else%
    \draw[line width=\pgfPTtblocklinewidth,pgfPTcolortemp!50!black,fill=\pgfPTtblockcolor,opacity=.7] %
    (57) -- ++(\pgfPTcellwd,0) -- ++(0,-2*\pgfPTcellht) -- ++(-\pgfPTcellwd,0) -- cycle;%
    \fi%
    \ifx\pgfPTtblockfontcolor\@empty\relax%
    \let\pgfPTtxtcolor\pgfPTtblockcolor\relax%
    \else%
    \let\pgfPTtxtcolor\pgfPTtblockfontcolor\relax%
    \fi%
    \colorlet{pgfPTfontcolortemp}{\pgfPTtxtcolor}%
    \node[font=\pgfPTfamiliesfont\fontsize{\the\pgfPT@dima}{\the\pgfPT@dima}\selectfont,line width=\pgfPTtblocklinewidth,%
        draw=pgfPTcolortemp!50!black,fill=white,text width=4*\pgfPTcellwd,text centered,inner sep=.5ex,%
        text=pgfPTfontcolortemp,rounded corners=2pt,minimum height=.5*\pgfPTcellht,anchor=mid] %
        at (7*\pgfPTcellwd,-3.5*\pgfPTcellht) {\pgfPT@box@zerodepth{\pgfPT@tmp@label@defaultLanguage}%
            \ifnum\pgfPT@counta>1\relax\\ {\fontsize{\the\pgfPT@dimb}{\the\pgfPT@dimb}\selectfont\color{pgfPTfontcolortemp!85!transparent}%
                \pgfPT@tmp@labels@otherLanguages}\fi};
\else%
    \draw[line width=\pgfPTtblocklinewidth,pgfPTcolortemp!50!black,fill=\pgfPTtblockcolor,opacity=.7] %
    (21) -- ++(10*\pgfPTcellwd,0) -- ++(0,-4*\pgfPTcellht) -- ++(-10*\pgfPTcellwd,0) -- ++(0,4*\pgfPTcellht) -- cycle;%
    \ifx\pgfPTtblockfontcolor\@empty\relax%
    \let\pgfPTtxtcolor\pgfPTtblockcolor\relax%
    \else%
    \let\pgfPTtxtcolor\pgfPTtblockfontcolor\relax%
    \fi%
    \colorlet{pgfPTfontcolortemp}{\pgfPTtxtcolor}%
    \node[font=\pgfPTfamiliesfont\fontsize{\the\pgfPT@dima}{\the\pgfPT@dima}\selectfont,line width=\pgfPTtblocklinewidth,%
    draw=pgfPTcolortemp!50!black,fill=white,text width=4*\pgfPTcellwd,text centered,inner sep=.5ex,%
    text=pgfPTfontcolortemp,rounded corners=2pt,minimum height=.5*\pgfPTcellht,anchor=mid] %
    at (7*\pgfPTcellwd,-3.5*\pgfPTcellht) {\pgfPT@box@zerodepth{\pgfPT@tmp@label@defaultLanguage}%
            \ifnum\pgfPT@counta>1\relax\\ {\fontsize{\the\pgfPT@dimb}{\the\pgfPT@dimb}\selectfont\color{pgfPTfontcolortemp!85!transparent}%
                \pgfPT@tmp@labels@otherLanguages}\fi};
\fi%
% metais de transicao internos
\edef\pgfPT@testa{spd}%
\ifx\pgfPTcells\pgfPT@testa\relax% f isn't present
\else%
\pgfPT@legend{blocoi}%
\colorlet{pgfPTcolortemp}{\pgfPTiblockcolor}%
\draw[line width=\pgfPTiblocklinewidth,pgfPTcolortemp!50!black,fill=\pgfPTiblockcolor,opacity=.7] %
(58) -- ++(14*\pgfPTcellwd,0) -- ++(0,-2*\pgfPTcellht) -- ++(-14*\pgfPTcellwd,0) -- cycle;%
\ifx\pgfPTiblockfontcolor\@empty\relax%
\let\pgfPTtxtcolor\pgfPTiblockcolor\relax%
\else%
\let\pgfPTtxtcolor\pgfPTiblockfontcolor\relax%
\fi%
\colorlet{pgfPTfontcolortemp}{\pgfPTtxtcolor}%
\ifpgfPTIUPACMMIX%
    \node[font=\pgfPTfamiliesfont\fontsize{\the\pgfPT@dima}{\the\pgfPT@dima}\selectfont,line width=\pgfPTiblocklinewidth,%
    draw=pgfPTcolortemp!50!black,fill=white,text width=5*\pgfPTcellwd,text centered,inner sep=.5ex,%
    text=pgfPTfontcolortemp,rounded corners=2pt,minimum height=.5*\pgfPTcellht,anchor=mid] %
    at (10*\pgfPTcellwd,-8*\pgfPTcellht) {\pgfPT@box@zerodepth{\pgfPT@tmp@label@defaultLanguage}%
            \ifnum\pgfPT@counta>1\relax\\ {\fontsize{\the\pgfPT@dimb}{\the\pgfPT@dimb}\selectfont\color{pgfPTfontcolortemp!85!transparent}%
                \pgfPT@tmp@labels@otherLanguages}\fi};
\else%
    \node[font=\pgfPTfamiliesfont\fontsize{\the\pgfPT@dima}{\the\pgfPT@dima}\selectfont,line width=\pgfPTiblocklinewidth,%
    draw=pgfPTcolortemp!50!black,fill=white,text width=5*\pgfPTcellwd,text centered,inner sep=.5ex,%
    text=pgfPTfontcolortemp,rounded corners=2pt,minimum height=.5*\pgfPTcellht,anchor=mid] %
    at (9.5*\pgfPTcellwd,-8*\pgfPTcellht) {\pgfPT@box@zerodepth{\pgfPT@tmp@label@defaultLanguage}%
            \ifnum\pgfPT@counta>1\relax\\ {\fontsize{\the\pgfPT@dimb}{\the\pgfPT@dimb}\selectfont\color{pgfPTfontcolortemp!85!transparent}%
                \pgfPT@tmp@labels@otherLanguages}\fi};
\fi%
\fi%
\fi\fi\fi\fi% END Families
\ifnum\pgfPT@fontspec=1\relax\setmainfont{\pgfPTglobalfont}\else\fontfamily{\pgfPTglobalfont}\selectfont\fi\fontseries{\seriesdefault}\fontshape{\shapedefault}%
% Variacoes
\edef\@pgfPT@varpage@xshift{0pt}%
\edef\@pgfPT@varpage@yshift{0pt}%
\ifpgfPTvariations%
% get the limits of Z
\expandafter\pgfPT@get@limits\pgfPT@@cellslist\relax%
\ifnum\pgfPT@limits@min=1\relax\ifnum\pgfPT@limits@max=118\relax\ifnum\pgfPT@element@count>87\relax% draw the periodic variations (Ei, Eion, Eaff)
\pgfPT@countb=0\relax\@for\pgfPT@tmp:=\pgfPTlanguages\do{\advance\pgfPT@countb by 1\relax}%
% Determine shifts for the variations
\pgfPT@countc=0\relax%
\ifpgfPT@R\advance\pgfPT@countc by1\relax\fi%
\ifpgfPT@Ei\advance\pgfPT@countc by1\relax\fi%
\ifpgfPT@eaff\advance\pgfPT@countc by1\relax\fi%
\ifnum\pgfPT@countc=1\relax%
    \edef\pgfPT@Rvar@shift{0}%
    \edef\pgfPT@Eivar@shift{0}%
    \edef\pgfPT@eaffvar@shift{0}%
    \pgfmathparse{\pgfPTcellwd+.1875*\pgfPTcellwd}\edef\@pgfPT@varpage@xshift{\pgfmathresult}%
    \pgfmathparse{.625*\pgfPTcellwd}\edef\@pgfPT@varpage@yshift{\pgfmathresult}%
\else\ifnum\pgfPT@countc=2\relax%
    \pgfmathparse{1.725*\pgfPTcellwd+.1875*\pgfPTcellwd}\edef\@pgfPT@varpage@xshift{\pgfmathresult}%
    \pgfmathparse{.725*\pgfPTcellwd+.625*\pgfPTcellwd}\edef\@pgfPT@varpage@yshift{\pgfmathresult}%
    \pgfmathparse{.725*\pgfPTcellwd}\edef\pgfPT@var@shift{\pgfmathresult}%
    % R & Ei
    \ifpgfPT@R\ifpgfPT@Ei\relax%
        \ifdim\pgfPT@data@R@y<\pgfPT@data@Ei@y\relax%
            \edef\pgfPT@Rvar@shift{\pgfPT@var@shift}%
            \edef\pgfPT@Eivar@shift{0}%
        \else%
            \edef\pgfPT@Rvar@shift{0}%
            \edef\pgfPT@Eivar@shift{\pgfPT@var@shift}%
        \fi%
    \fi\fi%
    % R & eaff
    \ifpgfPT@R\ifpgfPT@eaff\relax%
        \ifdim\pgfPT@data@R@y<\pgfPT@data@eaff@y\relax%
            \edef\pgfPT@Rvar@shift{\pgfPT@var@shift}%
            \edef\pgfPT@eaffvar@shift{0}%
        \else%
            \edef\pgfPT@Rvar@shift{0}%
            \edef\pgfPT@eaffvar@shift{\pgfPT@var@shift}%
        \fi%
    \fi\fi%
    % Ei & eaff
    \ifpgfPT@Ei\ifpgfPT@eaff\relax%
        \ifdim\pgfPT@data@Ei@y<\pgfPT@data@eaff@y\relax%
            \edef\pgfPT@Eivar@shift{\pgfPT@var@shift}%
            \edef\pgfPT@eaffvar@shift{0}%
        \else%
            \edef\pgfPT@Eivar@shift{0}%
            \edef\pgfPT@eaffvar@shift{\pgfPT@var@shift}%
        \fi%
    \fi\fi%
\else\ifnum\pgfPT@countc=3\relax%
    \pgfmathparse{2.45*\pgfPTcellwd+.1875*\pgfPTcellwd}\edef\@pgfPT@varpage@xshift{\pgfmathresult}%
    \pgfmathparse{1.45*\pgfPTcellwd+.625*\pgfPTcellwd}\edef\@pgfPT@varpage@yshift{\pgfmathresult}%
    \pgfmathparse{.725*\pgfPTcellwd}\edef\pgfPT@var@shift{\pgfmathresult}%
    \pgfmathparse{1.45*\pgfPTcellwd}\edef\pgfPT@var@shiftshift{\pgfmathresult}%
    % R->Ei->eaff
        \ifdim\pgfPT@data@R@y<\pgfPT@data@Ei@y\relax%
            \ifdim\pgfPT@data@R@y<\pgfPT@data@eaff@y\relax%
                \ifdim\pgfPT@data@Ei@y<\pgfPT@data@eaff@y\relax%
                    \edef\pgfPT@Rvar@shift{\pgfPT@var@shiftshift}%
                    \edef\pgfPT@Eivar@shift{\pgfPT@var@shift}%
                    \edef\pgfPT@eaffvar@shift{0}%
                \else%
                % R->eaff->Ei
                    \edef\pgfPT@Rvar@shift{\pgfPT@var@shiftshift}%
                    \edef\pgfPT@Eivar@shift{0}%
                    \edef\pgfPT@eaffvar@shift{\pgfPT@var@shift}%
        \fi\fi\fi%
    % Ei->R->eaff
        \ifdim\pgfPT@data@Ei@y<\pgfPT@data@R@y\relax%
            \ifdim\pgfPT@data@Ei@y<\pgfPT@data@eaff@y\relax%
                \ifdim\pgfPT@data@R@y<\pgfPT@data@eaff@y\relax%
                    \edef\pgfPT@Rvar@shift{\pgfPT@var@shift}%
                    \edef\pgfPT@Eivar@shift{\pgfPT@var@shiftshift}%
                    \edef\pgfPT@eaffvar@shift{0}%
                \else%
                % Ei->eaff->R
                    \edef\pgfPT@Rvar@shift{0}%
                    \edef\pgfPT@Eivar@shift{\pgfPT@var@shiftshift}%
                    \edef\pgfPT@eaffvar@shift{\pgfPT@var@shift}%
        \fi\fi\fi%
    % eaff->R->Ei
        \ifdim\pgfPT@data@eaff@y<\pgfPT@data@R@y\relax%
            \ifdim\pgfPT@data@eaff@y<\pgfPT@data@Ei@y\relax%
                \ifdim\pgfPT@data@R@y<\pgfPT@data@Ei@y\relax%
                    \edef\pgfPT@Rvar@shift{\pgfPT@var@shift}%
                    \edef\pgfPT@Eivar@shift{0}%
                    \edef\pgfPT@eaffvar@shift{\pgfPT@var@shiftshift}%
                \else%
                % eaff->Ei->R
                    \edef\pgfPT@Rvar@shift{0}%
                    \edef\pgfPT@Eivar@shift{\pgfPT@var@shift}%
                    \edef\pgfPT@eaffvar@shift{\pgfPT@var@shiftshift}%
        \fi\fi\fi%
    % R=Ei->eaff
        \ifdim\pgfPT@data@R@y=\pgfPT@data@Ei@y\relax%
            \ifdim\pgfPT@data@R@y<\pgfPT@data@eaff@y\relax%
                    \edef\pgfPT@Rvar@shift{\pgfPT@var@shiftshift}%
                    \edef\pgfPT@Eivar@shift{\pgfPT@var@shift}%
                    \edef\pgfPT@eaffvar@shift{0}%
                \else%
                % R->eaff->Ei
                    \edef\pgfPT@Rvar@shift{\pgfPT@var@shiftshift}%
                    \edef\pgfPT@Eivar@shift{0}%
                    \edef\pgfPT@eaffvar@shift{\pgfPT@var@shift}%
        \fi\fi%
    % R->Ei=eaff
        \ifdim\pgfPT@data@R@y=\pgfPT@data@eaff@y\relax%
            \ifdim\pgfPT@data@R@y<\pgfPT@data@Eif@y\relax%
                    \edef\pgfPT@Rvar@shift{0}%
                    \edef\pgfPT@Eivar@shift{\pgfPT@var@shift}%
                    \edef\pgfPT@eaffvar@shift{\pgfPT@var@shiftshift}%
                \else%
                % R->eaff->Ei
                    \edef\pgfPT@Rvar@shift{\pgfPT@var@shiftshift}%
                    \edef\pgfPT@Eivar@shift{\pgfPT@var@shift}%
                    \edef\pgfPT@eaffvar@shift{0}%
        \fi\fi%
    % R=eaff->Ei
        \ifdim\pgfPT@data@R@y=\pgfPT@data@eaff@y\relax%
            \ifdim\pgfPT@data@R@y<\pgfPT@data@eaff@y\relax%
                    \edef\pgfPT@Rvar@shift{0}%
                    \edef\pgfPT@Eivar@shift{\pgfPT@var@shift}%
                    \edef\pgfPT@eaffvar@shift{\pgfPT@var@shiftshift}%
                \else%
                % R->eaff->Ei
                    \edef\pgfPT@Rvar@shift{\pgfPT@var@shiftshift}%
                    \edef\pgfPT@Eivar@shift{\pgfPT@var@shift}%
                    \edef\pgfPT@eaffvar@shift{0}%
        \fi\fi%
    % R=eaff=Ei
        \ifdim\pgfPT@data@R@y=\pgfPT@data@eaff@y\relax%
            \ifdim\pgfPT@data@R@y=\pgfPT@data@eaff@y\relax%
                    \edef\pgfPT@Rvar@shift{0}%
                    \edef\pgfPT@Eivar@shift{\pgfPT@var@shift}%
                    \edef\pgfPT@eaffvar@shift{\pgfPT@var@shiftshift}%
        \fi\fi%
\fi\fi\fi%
% end of shifts
% R var
\ifpgfPT@R%
\pgfPTvarRfont\selectfont%
\ifnum\pgfPT@countb>1\relax\pgfmathsetlength{\pgfPT@dima}{.85*\f@size}\pgfmathsetlength{\pgfPT@dimb}{.65*\f@size}%
\else\pgfmathsetlength{\pgfPT@dima}{\f@size}\fi%
\colorlet{pgfPTcolortemp}{\pgfPTvarRcolor}\colorlet{pgfPTfontcolortemp}{\pgfPTvarRfontcolor}%
\pgfPT@pinEstado{Rdim}%
\draw[fill=\pgfPTvarRcolor,\pgfPTvarRcolor,path fading=diminuix] %
(-\pgfPTcellwd-\pgfPT@Rvar@shift,\pgfPTcellht+\pgfPT@Rvar@shift) -- ++(0,.1875*\pgfPTcellwd) -- ++(19*\pgfPTcellwd,0) %
-- ++(-.09375*\pgfPTcellwd,.25*\pgfPTcellwd) -- ++(.375*\pgfPTcellwd,-.4375*\pgfPTcellwd) %
-- ++(-.375*\pgfPTcellwd,-.4375*\pgfPTcellwd) -- ++(.09375*\pgfPTcellwd,.25*\pgfPTcellwd) %
-- ++(-19*\pgfPTcellwd,0) -- ++(0,.1875*\pgfPTcellwd) -- cycle;%
\node[font=\pgfPTvarRfont\fontsize{\the\pgfPT@dima}{\the\pgfPT@dima}\selectfont,text=\pgfPTvarRfontcolor,anchor=mid,minimum height=.375*\pgfPTcellwd] (variacao)%
             at (9*\pgfPTcellwd-\pgfPT@Rvar@shift,\pgfPTcellht+\pgfPT@Rvar@shift) %
            {\pgfPT@box@zerodepth{\pgfPT@tmp@label@defaultLanguage}};%
            \ifnum\pgfPT@counta>1\relax%
            \node[font=\pgfPTvarRfont\fontsize{\the\pgfPT@dimb}{\the\pgfPT@dimb}\selectfont,text=pgfPTfontcolortemp!85!transparent,above]%
            at (variacao.north) {\pgfPT@tmp@labels@otherLanguages};\fi%
\pgfPT@pinEstado{Raum}%
\draw[fill=\pgfPTvarRcolor,\pgfPTvarRcolor,path fading=aumentay] %
(-\pgfPTcellwd-\pgfPT@Rvar@shift,\pgfPTcellht+\pgfPT@Rvar@shift) -- ++(-.1875*\pgfPTcellwd,0) -- ++(0,-8*\pgfPTcellht) %
-- ++(-.25*\pgfPTcellwd,.09375*\pgfPTcellwd) -- ++(.4375*\pgfPTcellwd,-.375*\pgfPTcellwd) %
-- ++(.4375*\pgfPTcellwd,.375*\pgfPTcellwd) -- ++(-.25*\pgfPTcellwd,-.09375*\pgfPTcellwd) %
-- ++(0,8*\pgfPTcellht) -- ++(-.1875*\pgfPTcellwd,0) -- cycle;%
\node[font=\pgfPTvarRfont\fontsize{\the\pgfPT@dima}{\the\pgfPT@dima}\selectfont,text=\pgfPTvarRfontcolor,rotate=270,anchor=mid,minimum height=.375*\pgfPTcellwd] (variacao)%
             at (-\pgfPTcellwd-\pgfPT@Rvar@shift,-3.5*\pgfPTcellht+\pgfPT@Rvar@shift) %
            {\pgfPT@box@zerodepth{\pgfPT@tmp@label@defaultLanguage}};%
            \ifnum\pgfPT@counta>1\relax%
            \node[font=\pgfPTvarRfont\fontsize{\the\pgfPT@dimb}{\the\pgfPT@dimb}\selectfont,text=pgfPTfontcolortemp!85!transparent,rotate=270,below]%
            at ([xshift=-.0375*\pgfPTcellwd]variacao.south) {\pgfPT@tmp@labels@otherLanguages};\fi%
\draw[fill=pgfPTcolortemp!60!black,draw=pgfPTcolortemp!60!black] (-\pgfPTcellwd-\pgfPT@Rvar@shift,\pgfPTcellht+\pgfPT@Rvar@shift) circle(.3125*\pgfPTcellwd) %
    node[font=\pgfPTvarRfont,text=pgfPTcolortemp!25!white,anchor=mid] {R};%
\ifnum\pgfPT@fontspec=1\relax\setmainfont{\pgfPTglobalfont}\else\fontfamily{\pgfPTglobalfont}\selectfont\fi\fontseries{\seriesdefault}\fontshape{\shapedefault}%
\fi%
% Ei var
\ifpgfPT@Ei%
\pgfPTvarEifont\selectfont%
\ifnum\pgfPT@countb>1\relax\pgfmathsetlength{\pgfPT@dima}{.85*\f@size}\pgfmathsetlength{\pgfPT@dimb}{.65*\f@size}%
\else\pgfmathsetlength{\pgfPT@dima}{\f@size}\fi%
\colorlet{pgfPTcolortemp}{\pgfPTvarEicolor}\colorlet{pgfPTfontcolortemp}{\pgfPTvarEifontcolor}%
\pgfPT@pinEstado{Eiaum}%
\draw[fill=\pgfPTvarEicolor,\pgfPTvarEicolor,path fading=aumentax] %
(-\pgfPTcellwd-\pgfPT@Eivar@shift,\pgfPTcellht+\pgfPT@Eivar@shift) -- ++(0,.1875*\pgfPTcellwd) -- ++(19*\pgfPTcellwd,0) %
-- ++(-.09375*\pgfPTcellwd,.25*\pgfPTcellwd) -- ++(.375*\pgfPTcellwd,-.4375*\pgfPTcellwd) %
-- ++(-.375*\pgfPTcellwd,-.4375*\pgfPTcellwd) -- ++(.09375*\pgfPTcellwd,.25*\pgfPTcellwd) %
-- ++(-19*\pgfPTcellwd,0) -- ++(0,.1875*\pgfPTcellwd) -- cycle;%
\node[font=\pgfPTvarEifont\fontsize{\the\pgfPT@dima}{\the\pgfPT@dima}\selectfont,text=\pgfPTvarEifontcolor,anchor=mid,minimum height=.375*\pgfPTcellwd] (variacao)%
             at (9*\pgfPTcellwd-\pgfPT@Eivar@shift,\pgfPTcellht+\pgfPT@Eivar@shift) %
            {\pgfPT@box@zerodepth{\pgfPT@tmp@label@defaultLanguage}};%
            \ifnum\pgfPT@counta>1\relax%
            \node[font=\pgfPTvarEifont\fontsize{\the\pgfPT@dimb}{\the\pgfPT@dimb}\selectfont,text=pgfPTfontcolortemp!85!transparent,above]%
            at (variacao.north) {\pgfPT@tmp@labels@otherLanguages};\fi%
\pgfPT@pinEstado{Eidim}%
\draw[fill=\pgfPTvarEicolor,\pgfPTvarEicolor,path fading=diminuiy] %
(-\pgfPTcellwd-\pgfPT@Eivar@shift,\pgfPTcellht+\pgfPT@Eivar@shift) -- ++(-.1875*\pgfPTcellwd,0) -- ++(0,-8*\pgfPTcellht) %
-- ++(-.25*\pgfPTcellwd,.09375*\pgfPTcellwd) -- ++(.4375*\pgfPTcellwd,-.375*\pgfPTcellwd) %
-- ++(.4375*\pgfPTcellwd,.375*\pgfPTcellwd) -- ++(-.25*\pgfPTcellwd,-.09375*\pgfPTcellwd) %
-- ++(0,8*\pgfPTcellht) -- ++(-.1875*\pgfPTcellwd,0) -- cycle;%
\node[font=\pgfPTvarEifont\fontsize{\the\pgfPT@dima}{\the\pgfPT@dima}\selectfont,text=\pgfPTvarEifontcolor,rotate=270,anchor=mid,minimum height=.375*\pgfPTcellwd] (variacao)%
             at (-\pgfPTcellwd-\pgfPT@Eivar@shift,-3.5*\pgfPTcellht+\pgfPT@Eivar@shift) %
            {\pgfPT@box@zerodepth{\pgfPT@tmp@label@defaultLanguage}};%
            \ifnum\pgfPT@counta>1\relax%
            \node[font=\pgfPTvarEifont\fontsize{\the\pgfPT@dimb}{\the\pgfPT@dimb}\selectfont,text=pgfPTfontcolortemp!85!transparent,rotate=270,below]%
            at ([xshift=-.0375*\pgfPTcellwd]variacao.south) {\pgfPT@tmp@labels@otherLanguages};\fi%
\draw[fill=pgfPTcolortemp!60!black,draw=pgfPTcolortemp!60!black] (-\pgfPTcellwd-\pgfPT@Eivar@shift,\pgfPTcellht+\pgfPT@Eivar@shift) circle(.3125*\pgfPTcellwd) %
    node[font=\pgfPTvarEifont,text=pgfPTcolortemp!25!white,anchor=mid] {E\raisebox{-.2ex}{i}};%
\ifnum\pgfPT@fontspec=1\relax\setmainfont{\pgfPTglobalfont}\else\fontfamily{\pgfPTglobalfont}\selectfont\fi\fontseries{\seriesdefault}\fontshape{\shapedefault}%
\fi%
% Eaff var
\ifpgfPT@eaff%
\pgfPTvareafffont\selectfont%
\ifnum\pgfPT@countb>1\relax\pgfmathsetlength{\pgfPT@dima}{.85*\f@size}\pgfmathsetlength{\pgfPT@dimb}{.65*\f@size}%
\else\pgfmathsetlength{\pgfPT@dima}{\f@size}\fi%
\colorlet{pgfPTcolortemp}{\pgfPTvareaffcolor}\colorlet{pgfPTfontcolortemp}{\pgfPTvareafffontcolor}%
\pgfPT@pinEstado{eaffaum}%
\draw[fill=\pgfPTvareaffcolor,\pgfPTvareaffcolor,path fading=aumentax] %
(-\pgfPTcellwd-\pgfPT@eaffvar@shift,\pgfPTcellht+\pgfPT@eaffvar@shift) -- ++(0,.1875*\pgfPTcellwd) -- ++(19*\pgfPTcellwd,0) %
-- ++(-.09375*\pgfPTcellwd,.25*\pgfPTcellwd) -- ++(.375*\pgfPTcellwd,-.4375*\pgfPTcellwd) %
-- ++(-.375*\pgfPTcellwd,-.4375*\pgfPTcellwd) -- ++(.09375*\pgfPTcellwd,.25*\pgfPTcellwd) %
-- ++(-19*\pgfPTcellwd,0) -- ++(0,.1875*\pgfPTcellwd) -- cycle;%
\node[font=\pgfPTvareafffont\fontsize{\the\pgfPT@dima}{\the\pgfPT@dima}\selectfont,text=\pgfPTvareafffontcolor,anchor=mid,minimum height=.375*\pgfPTcellwd] (variacao)%
             at (9*\pgfPTcellwd-\pgfPT@eaffvar@shift,\pgfPTcellht+\pgfPT@eaffvar@shift) %
            {\pgfPT@box@zerodepth{\pgfPT@tmp@label@defaultLanguage}};%
            \ifnum\pgfPT@counta>1\relax%
            \node[font=\pgfPTvareafffont\fontsize{\the\pgfPT@dimb}{\the\pgfPT@dimb}\selectfont,text=pgfPTfontcolortemp!85!transparent,above]%
            at (variacao.north) {\pgfPT@tmp@labels@otherLanguages};\fi%
\pgfPT@pinEstado{eaffdim}%
\draw[fill=\pgfPTvareaffcolor,\pgfPTvareaffcolor,path fading=diminuiy] %
(-\pgfPTcellwd-\pgfPT@eaffvar@shift,\pgfPTcellht+\pgfPT@eaffvar@shift) -- ++(-.1875*\pgfPTcellwd,0) -- ++(0,-8*\pgfPTcellht) %
-- ++(-.25*\pgfPTcellwd,.09375*\pgfPTcellwd) -- ++(.4375*\pgfPTcellwd,-.375*\pgfPTcellwd) %
-- ++(.4375*\pgfPTcellwd,.375*\pgfPTcellwd) -- ++(-.25*\pgfPTcellwd,-.09375*\pgfPTcellwd) %
-- ++(0,8*\pgfPTcellht) -- ++(-.1875*\pgfPTcellwd,0) -- cycle;%
\node[font=\pgfPTvareafffont\fontsize{\the\pgfPT@dima}{\the\pgfPT@dima}\selectfont,text=\pgfPTvareafffontcolor,rotate=270,anchor=mid,minimum height=.375*\pgfPTcellwd] (variacao)%
             at (-\pgfPTcellwd-\pgfPT@eaffvar@shift,-3.5*\pgfPTcellht+\pgfPT@eaffvar@shift) %
            {\pgfPT@box@zerodepth{\pgfPT@tmp@label@defaultLanguage}};%
            \ifnum\pgfPT@counta>1\relax%
            \node[font=\pgfPTvareafffont\fontsize{\the\pgfPT@dimb}{\the\pgfPT@dimb}\selectfont,text=pgfPTfontcolortemp!85!transparent,rotate=270,below]%
            at ([xshift=-.0375*\pgfPTcellwd]variacao.south) {\pgfPT@tmp@labels@otherLanguages};\fi%
\draw[fill=pgfPTcolortemp!60!black,draw=pgfPTcolortemp!60!black] (-\pgfPTcellwd-\pgfPT@eaffvar@shift,\pgfPTcellht+\pgfPT@eaffvar@shift) circle(.3125*\pgfPTcellwd) %
    node[font=\pgfPTvareafffont,text=pgfPTcolortemp!25!white,anchor=mid] {E\raisebox{-.2ex}{ea}};%
\ifnum\pgfPT@fontspec=1\relax\setmainfont{\pgfPTglobalfont}\else\fontfamily{\pgfPTglobalfont}\selectfont\fi\fontseries{\seriesdefault}\fontshape{\shapedefault}%
\fi%
\fi\fi\fi\fi% END Variacoes
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% the background (paper)
\expandafter\pgfPT@get@limits\pgfPT@@cellslist\relax%
\ifnum\pgfPT@limits@min=1\relax\ifnum\pgfPT@limits@max=118\relax%
\pgfPT@dima=0pt\pgfPT@dimb=0pt\relax%
\ifpgfPTperlabels%
\begin{pgfinterruptpicture}%
\setbox0=\hbox{\ifnum\pgfPT@fontspec=1\relax\setmainfont{\pgfPTglobalfont}\else\fontfamily{\pgfPTglobalfont}\selectfont\fi\pgfPTlabfont\selectfont7}\global\pgfPT@dima=\wd0%
\end{pgfinterruptpicture}%
\pgfmathsetlength{\pgfPT@dima}{-\pgfPT@dima+2*\pgfPT@perlabel@xshift}%
\else%
\pgfmathsetlength{\pgfPT@dima}{\pgfPT@perlabel@xshift}%
\fi% pgfPTperlabels
\ifpgfPTtitulo%
\begin{pgfinterruptpicture}%
\setbox0=\hbox{\ifnum\pgfPT@fontspec=1\relax\setmainfont{\pgfPTglobalfont}\else\fontfamily{\pgfPTglobalfont}\selectfont\fi\pgfPTtitlefont\selectfont P}\global\pgfPT@dimb=\ht0%
\end{pgfinterruptpicture}%
\pgfmathsetlength{\pgfPT@dimb}{\pgfPT@dimb+.5*\pgfPTcellht+5pt}%
\else%
\ifpgfPTgrlabels%
\begin{pgfinterruptpicture}%
\setbox0=\hbox{\ifnum\pgfPT@fontspec=1\relax\setmainfont{\pgfPTglobalfont}\else\fontfamily{\pgfPTglobalfont}\selectfont\fi\pgfPTlabfont\selectfont7}\global\pgfPT@dimb=\ht0%
\end{pgfinterruptpicture}%
\pgfmathsetlength{\pgfPT@dimb}{\pgfPT@dimb+5pt}%
\else%
\pgfmathsetlength{\pgfPT@dimb}{5pt}%
\fi% pgfPTgrlabels
\fi% pgfPTtitulo
\ifpgfPTvariations%
\pgfmathparse{.4375*\pgfPTcellwd}\edef\@paper@right@shift{\pgfmathresult}%
\pgfmathparse{.2125*\pgfPTcellwd}\edef\@paper@bottom@shift{\pgfmathresult}%
\else%
\edef\@paper@right@shift{0pt}%
\edef\@paper@bottom@shift{0pt}%
\fi%
\ifnum\pgfPT@element@count=118\relax%
\begin{pgfonlayer}{pgfPTpaperlayer}
\path[thebackground] ([xshift={\pgfPT@dima-\@pgfPT@varpage@xshift},yshift={\pgfPT@dimb+\@pgfPT@varpage@yshift}]\pgfPT@limits@min)
rectangle
([xshift={\pgfPTcellwd-\pgfPT@perlabel@xshift+\@paper@right@shift},yshift={-3.5*\pgfPTcellht-5pt}]\pgfPT@limits@max);%
\end{pgfonlayer}
\else\ifnum\pgfPT@element@count>87\relax% s,p,d
\begin{pgfonlayer}{pgfPTpaperlayer}
\path[thebackground] ([xshift={\pgfPT@dima-\@pgfPT@varpage@xshift},yshift={\pgfPT@dimb+\@pgfPT@varpage@yshift}]\pgfPT@limits@min)
rectangle
([xshift={\pgfPTcellwd-\pgfPT@perlabel@xshift+\@paper@right@shift},yshift={-\pgfPTcellht-5pt-\@paper@bottom@shift}]\pgfPT@limits@max);%
\end{pgfonlayer}\fi%
\fi% \pgfPT@element@count=118
\fi\fi% min=1 & max 118
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% corrected in v2.1.2: \@pgfPT@resetlayers -> \pgfsetlayers{\@pgfPT@resetlayers}
%              ... Warning: Missing character: There is no m (U+006D) in font nullfont! ...
\pgfsetlayers{\@pgfPT@resetlayers}% Restoring pgf layers to those used in the document
\fontseries{\seriesdefault}\fontshape{\shapedefault}\fontfamily{\familydefault}\selectfont% Restoring the font settings to normal mode in the document
% extdash compatibility -> new in v2.1.6
\ifpgfPT@extd@sh\pgfPTextd@shON\fi%
}% end tikz
}%
% END !! \pgfPT -----------------------------------------------------------------------------------
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% ---------------------------------------------------------------------------------------------------
% Internal Utils ################################################
% internal macro -> pgfPT@processlist -----------------------------------------------------------
% Analyze the key and store the list of Z numbers in \pgfPT@@cellslist ------------------------
\def\pgfPT@processlist{%
\def\pgfPT@processlist@firstchar##1##2\relax{\edef\pgfPT@tmp{##1}\edef\pgfPT@theotherchars{##2}}% changed in v2.1.5
\expandafter\pgfPT@processlist@firstchar\pgfPTcells\relax%
    %\pgfPTcells is a list of Z numbers preceded with a star -> new in v2.1.5
    \edef\pgfPT@liststar{*}%
    \ifx\pgfPT@tmp\pgfPT@liststar\relax%
    \expandafter\pgfPT@processZlist@star@makeTheLists\pgfPT@theotherchars\relax%
    \else%
    \ifcat1\pgfPT@tmp\relax%
        %\pgfPTcells is a list of Z numbers
        \edef\pgfPT@@cellslist{\pgfPTcells}%
    \else%
        %\pgfPTcells is a <name>
        \pgfPT@counta=1\pgfPT@countb=0%
        \def\pgfPT@stra{\expandafter\string\pgfPTcells}\edef\pgfPT@teststra{\pgfPT@stra}%
        \@for\@myarg:=\pgfPT@cells@names@list\do{%
            \def\pgfPT@strb{\expandafter\string\@myarg}\edef\pgfPT@teststrb{\pgfPT@strb}%
            \ifx\pgfPT@teststra\pgfPT@teststrb\pgfPT@countb=\pgfPT@counta\fi%
            \advance\pgfPT@counta by1%
            }%
        \ifnum\pgfPT@countb=0\relax\edef\pgfPT@@cellslist{\csname pgfPT@cells@\pgfPTcells\endcsname}\else%
            \ifnum\pgfPT@countb=1\relax\edef\pgfPT@@cellslist{\pgfPT@cells@GIwH}\else%
                \ifnum\pgfPT@countb>1\relax%
                    \ifnum\pgfPT@countb>19\relax\def\pgfPT@fchar{P}\advance\pgfPT@countb by-19\relax%
                        \ifnum\pgfPT@countb>7\relax\def\pgfPT@extra{full}\advance\pgfPT@countb by-2\else\def\pgfPT@extra{}\fi%
                    \else%
                        \advance\pgfPT@countb by-1\def\pgfPT@fchar{G}\def\pgfPT@extra{}%
                    \fi%
                    \edef\pgfPT@@cellslist{\csname pgfPT@cells@\pgfPT@fchar\@Roman\pgfPT@countb\pgfPT@extra\endcsname}%
                \fi%
            \fi%
        \fi%
    \fi%
    \fi%
}%
% ---- new in v2.1.5
% \pgfPT@processZlist@star@makeTheLists
% store the original list in \pgfPT@@cellslist
% and makes the list \pgfPT@@emptycellslist with the 'gaps' in the original list
% Example: original list=*({empty list options}){1,...,5,9,10,...24} -> \pgfPT@@cellslist={1,...,5,9,10,...24} and \pgfPT@@emptycellslist={6,7,8}
% empty list options available: hide Z, back color
\def\pgfPT@processZlist@star@makeTheLists#1\relax{\ignorespaces%
\expandafter\pgfPT@processlist@firstchar#1\relax%
\edef\pgfPT@leftpar{(}%
\ifx\pgfPT@tmp\pgfPT@leftpar\relax% options to empty cells
\def\pgfPT@emptycellslist@get@options(##1)##2\relax{\edef\pgfPT@emptycellslist@options{##1}\edef\pgfPT@@cellslist{##2}}%
\expandafter\pgfPT@emptycellslist@get@options#1\relax%
\else%
\edef\pgfPT@@cellslist{#1}%
\fi%
\def\pgfPT@@emptycellslist{}%
\expandafter\@pgfPT@processZlist@star@makeTheLists\pgfPT@@cellslist\relax%
}%
\def\@pgfPT@processZlist@star@makeTheLists#1\relax{\ignorespaces%
\pgfPT@countf=0% counter to indicate the start (0 -> first list element; 1 -> other list elements)
\foreach \n in {#1} {%
        \ifnum\pgfPT@countf=0\relax\xdef\pgfPT@@auxlist@start{\n}\global\pgfPT@countf=1\relax\else%
        \xdef\pgfPT@@auxlist@finish{\n}\fi%
        }%
\foreach \n in {\pgfPT@@auxlist@start,...,\pgfPT@@auxlist@finish} {%
            \gdef\pgfPT@foundinlist{0}% false
            \foreach \p in {#1} {%
                            \ifnum\n=\p\relax\gdef\pgfPT@foundinlist{1}\breakforeach\fi% true
                            }%
            \ifnum\pgfPT@foundinlist=1\relax\else\xdef\pgfPT@@emptycellslist{\pgfPT@@emptycellslist,\n}\fi%
            }%
\def\pgfPT@cleanemptycellslist,##1\relax{\edef\pgfPT@@emptycellslist{##1}}%
\ifx\pgfPT@@emptycellslist\empty\relax\else%
\pgfPT@Zliststartrue\expandafter\pgfPT@cleanemptycellslist\pgfPT@@emptycellslist\relax\fi%
}%
% ----
% END !! \pgfPT@processlist ----------------------------------------------------------------------
%
% internal macro -> pgfPT@processlinks -----------------------------------------------------------
% Analyze the key and store the list of Z numbers in \pgfPT@@cellswithlinks ------------------------
% input:    Z links={1/llink1,(...),20/link20} !!! no tikz dot syntax !!!
%             Z links={G1/llink1,(...),G18/link18} !!! no tikz dot syntax !!!
%             Z links={P1/llink1,(...),P7/link7} !!! no tikz dot syntax !!!
%             Z links={s/llink1,(...),spd/link8} !!! no tikz dot syntax !!!
%             or any combination...
%             if Groups and Periods or whatever are mixed the last provided «link» will be used!!
% output: \pgfPT@@cellswithlinks -> a list of Z with 'links'
%            \pgfPT@@cells\@roman{\Z}@link -> stored 'link' for \Z
\def\pgfPT@processlinks{\ignorespaces%
\def\pgfPT@processlinks@firstchar##1##2\relax{\edef\pgfPT@tmp{##1}\edef\pgfPT@theotherchars{##2}}%
\def\pgfPT@processlinks@getinfo##1/##2\relax{\edef\pgfPT@link@Z{##1}\edef\pgfPT@link@ref{##2}}%
\edef\pgfPT@@cellswithlinks{}%
\@for\@pgfPT@tmpLinks:=\pgfPTZlinks\do{%
    \expandafter\pgfPT@processlinks@firstchar\@pgfPT@tmpLinks\relax%
    \ifcat1\pgfPT@tmp\relax%
        %\@pgfPT@tmpLinks is a Z number
        \expandafter\pgfPT@processlinks@getinfo\@pgfPT@tmpLinks\relax%
        \edef\pgfPT@@cellswithlinks{\pgfPT@@cellswithlinks,\pgfPT@link@Z}%
        \expandafter\edef\csname pgfPT@@cells\@roman{\pgfPT@link@Z}@link\endcsname{\pgfPT@link@ref}%
    \else%
        %\@pgfPT@tmpLinks is a <name>
        \pgfPT@counta=1\pgfPT@countb=0%
        \expandafter\pgfPT@processlinks@getinfo\@pgfPT@tmpLinks\relax%
        \edef\pgfPT@teststra{\pgfPT@link@Z}%
        \@for\@myarg:=\pgfPT@cells@names@list\do{%
            \edef\pgfPT@teststrb{\@myarg}%
            \ifx\pgfPT@teststra\pgfPT@teststrb\pgfPT@countb=\pgfPT@counta\fi%
            \advance\pgfPT@counta by1%
            }%
        \ifnum\pgfPT@countb=0\relax\edef\pgfPT@@cellswithlinks@tmp{\csname pgfPT@cells@\pgfPTcells\endcsname}\else%
            \ifnum\pgfPT@countb=1\relax\edef\pgfPT@@cellswithlinks@tmp{\pgfPT@cells@GIwH}\else%
                \ifnum\pgfPT@countb>1\relax%
                    \ifnum\pgfPT@countb>19\relax\def\pgfPT@fchar{P}\advance\pgfPT@countb by-19\relax%
                        \ifnum\pgfPT@countb>7\relax\def\pgfPT@extra{full}\advance\pgfPT@countb by-2\else\def\pgfPT@extra{}\fi%
                    \else%
                        \advance\pgfPT@countb by-1\def\pgfPT@fchar{G}\def\pgfPT@extra{}%
                    \fi%
                    \edef\pgfPT@@cellswithlinks@tmp{\csname pgfPT@cells@\pgfPT@fchar\@Roman\pgfPT@countb\pgfPT@extra\endcsname}%
                \fi%
            \fi%
        \fi%
    \@for\@myargi:=\pgfPT@@cellswithlinks@tmp\do{%
        \edef\pgfPT@@cellswithlinks{\pgfPT@@cellswithlinks,\@myargi}%
        \expandafter\edef\csname pgfPT@@cells\@roman{\@myargi}@link\endcsname{\pgfPT@link@ref}%
    }% end do
    \fi%
}% end do
\def\pgfPT@cleancellswithlinks,##1\relax{\edef\pgfPT@@cellswithlinks{##1}}%
\expandafter\pgfPT@cleancellswithlinks\pgfPT@@cellswithlinks\relax%
}%
% ----
% END !! \pgfPT@processlinks ----------------------------------------------------------------------
%
% INPUT: number list -> {??,...,??}
% OUTPUT \pgfPT@limits@min & \pgfPT@limits@max %% & \pgfPT@element@count
\def\pgfPT@get@limits#1\relax{%
\expandafter\pgfPT@get@limits@min#1,\relax%
\expandafter\pgfPT@get@limits@max#1,\relax%
}%
\def\pgfPT@get@limits@min#1,#2\relax{\edef\pgfPT@limits@min{#1}}%
\def\pgfPT@get@limits@max#1,#2\relax{%
\edef\pgfPT@testa{#2}\edef\pgfPT@testb{}%
\ifx\pgfPT@testa\pgfPT@testb\relax%
\edef\pgfPT@limits@max{#1}\edef\pgfPT@element@count{1}%
\else%
\pgfPT@countf=1%
\@for\pgfPT@tmp:=#2\do{\ifx\pgfPT@tmp\pgfPT@testb\relax\else\edef\pgfPT@limits@max{\pgfPT@tmp}\fi}%
\global\pgfPT@countf=0\relax%
\foreach \n in \pgfPT@@cellslist{\global\advance\pgfPT@countf by1}\edef\pgfPT@element@count{\the\pgfPT@countf}\relax%
\fi%
}%
%
% internal macro -> \pgfPT@processbackcolor ---------------------------------------------------
% Analyze the cells back color scheme and store the current color in cpgfPTTMP ---------------
\def\pgfPT@processbackcolor#1{%
    \global\pgfPT@counta=1\global\pgfPT@countb=#1%%
    \foreach \R/\G/\B in \pgfPT@@colorlist {%
        \ifnum\pgfPT@counta=\pgfPT@countb\relax\xglobal\definecolor{cpgfPTTMP}{rgb}{\R,\G,\B}\breakforeach\fi%
        \global\advance\pgfPT@counta by1%
    }%
}%
% END !! \pgfPT@processbackcolor ---------------------------------------------------------------
%
% internal macro -> \pgfPT@lt --------------------------------------------------------------------
% renders text via pdfliteral:  -------------
% #1 outline width width #2 txt #3 #4 #5 rgb stroke color  #6 #7 #8 rgb fill color -----------
%                                       #9 txt render mode (0 - fill 1 - stroke 2 - fill then stroke ---------
% changed in v2.1.3
\ifcase\pgfPT@engine\relax% pdfLaTeX
\def\pgfPT@lt[#1](#2)(#3,#4,#5)(#6,#7,#8)(#9){\pdfliteral direct {#1 w #3 #4 #5 RG #6 #7 #8 rg #9 Tr}{#2}\pdfliteral direct {0 0 0 rg 1 w 0 Tr}}%
\or% LuaLaTeX
\protected\def\pdfliteral{\pdfextension literal}%
\def\pgfPT@lt[#1](#2)(#3,#4,#5)(#6,#7,#8)(#9){\pdfliteral direct {#1 w #3 #4 #5 RG #6 #7 #8 rg #9 Tr}{#2}\pdfliteral direct {0 0 0 rg 1 w 0 Tr}}%
\or% XeLaTeX
\def\pgfPT@lt[#1](#2)(#3,#4,#5)(#6,#7,#8)(#9){\special{pdf:literal direct #1 w #3 #4 #5 RG #6 #7 #8 rg #9 Tr}#2\special{pdf:literal direct 0 0 0 rg 1 w 0 Tr}}%
\fi%
% END !! \pgfPT@lt --------------------------------------------------------------------------------
%
% internals macros -> \pgfPT@extract@rgb@stroke  ---------------------------------------------
%                                 \pgfPT@set@rgb@stroke ------------------------------------------------
%                                 \pgfPT@extract@rgb@fill ------------------------------------------------
%                                 \pgfPT@set@rgb@fill ----------------------------------------------------
% auxiliary macros to set the rgb components of one color ---------------------------------------
% with use of \extractcolorspecs from xcolor package ---------------------------------------------
% each component is stored in \pgfPT@«r, g or b» & «s or f» -------------------------------------
% v3.1.3: added conversion of the color to rgb :: \colorlet{#1}[rgb]{#1}
\def\pgfPT@extract@rgb@stroke#1{\colorlet{#1}[rgb]{#1}\extractcolorspecs{#1}{\pgfPTcolmodel}{\pgfPTcolinfo}\expandafter\pgfPT@set@rgb@stroke\pgfPTcolinfo\relax}%
\def\pgfPT@set@rgb@stroke#1,#2,#3\relax{\def\pgfPT@rs{#1}\def\pgfPT@gs{#2}\def\pgfPT@bs{#3}}%
\def\pgfPT@extract@rgb@fill#1{\colorlet{#1}[rgb]{#1}\extractcolorspecs{#1}{\pgfPTcolmodel}{\pgfPTcolinfo}\expandafter\pgfPT@set@rgb@fill\pgfPTcolinfo\relax}%
\def\pgfPT@set@rgb@fill#1,#2,#3\relax{\def\pgfPT@rf{#1}\def\pgfPT@gf{#2}\def\pgfPT@bf{#3}}%
% END !! \pgfPT@«color macros» ------------------------------------------------------------------
%
% #########################################################
% built-in cell styles
\def\pgfPT@builtincells@names{pgfPT2lang,pgfPT3lang,pgfPTR,pgfPTEi,pgfPTeaff,pgfPTREi,pgfPTls,pgfPTdisc}%
%
\pgfPT@builtincellstyle{pgfPT2lang}(6,3)[%
(1;1-2;Z),(1;3;radio),%
(2-3;1.5-3.5;CS),(4-5;1-3;name),%
(6;1-3;Ar)%
]%
\pgfPT@builtincellstyle{pgfPT3lang}(7,3)[%
(1;1-2;Z),(1;3;radio),%
(2-3;1.5-3.5;CS),(4-6;1-3;name),%
(7;1-3;Ar)%
]%
\pgfPT@builtincellstyle{pgfPTR}(5,3)[%
(1;1-2;Z),(1;3;radio),%
(2-3;1.5-3.5;CS),(4;1-3;name),%
(5;1-3;R)%
]%
\pgfPT@builtincellstyle{pgfPTEi}(5,3)[%
(1;1-2;Z),(1;3;radio),%
(2-3;1.5-3.5;CS),(4;1-3;name),%
(5;1-3;Ei)%
]%
\pgfPT@builtincellstyle{pgfPTeaff}(5,3)[%
(1;1-2;Z),(1;3;radio),%
(2-3;1.5-3.5;CS),(4;1-3;name),%
(5;1-3;eaff)%
]%
\pgfPT@builtincellstyle{pgfPTREi}(6,3)[%
(1;1-2;Z),(1;3;radio),%
(2-3;1.5-3.5;CS),(4;1-3;name),%
(5;1-3;R),(6;1-3;Ei)%
]%
\pgfPT@builtincellstyle{pgfPTls}(5,3)[%
(1;1-2.5;Z),(1;2.5-3;ls),%
(2-3;1.5-3.5;CS),(4;1-3;name),%
(5;1-3;Ar)%
]%
\pgfPT@builtincellstyle{pgfPTdisc}(6,3)[%
(1;1-2;Z),(1;3;radio),%
(2-3;1.5-3.5;CS),(4;1-3;name),%
(5;1-3;DiscC),%
(6;1-3;DiscY)%
]%
% #########################################################
\endinput%
