%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Definitions for pgf-PeriodicTable Manual
% 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
\def\pgfPTversion{2.1.6}%
\def\pgfPTnewinversion#1{new in v#1}%
\def\pgfPTchangedinversion#1{changed in v#1}%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\usepackage[ansinew]{inputenc}
\usepackage{verdana}
%
\addtolength{\textwidth}{3.5cm}
\addtolength{\textheight}{2.5cm}
\addtolength{\topmargin}{-1.25cm}
\setlength{\parindent}{0pt}
\setlength{\oddsidemargin}{0pt}
\setcounter{secnumdepth}{1}%
\setcounter{tocdepth}{4}
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\pgfdeclarelayer{back}%
\pgfsetlayers{back,main}%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\usetikzlibrary{shadows}%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\usepackage{makeidx}
\makeindex%
% ------------------------------------------------------------------------------------------------------------------------------------
% BUILD SEQUENCE:
% 1) pdflatex.exe "pgf-PeriodicTableManual.tex"
% 2) makeindex.exe -s "pgf-PeriodicTableManual.ist" "pgf-PeriodicTableManual.idx"
% 3) pdflatex.exe "pgf-PeriodicTableManual.tex"
% ------------------------------------------------------------------------------------------------------------------------------------
\usepackage[skins]{tcolorbox}
\tcbuselibrary{breakable}
\usepackage[english]{babel}
\usepackage{pifont}
%\usepackage[pdfstartview={ },colorlinks=true, linkcolor=black!50!green, citecolor=gray, urlcolor=teal, hyperindex, plainpages=false,bookmarksopenlevel=1,bookmarksopen=true]{hyperref}%
\hypersetup{%Start options on pdf
pdfstartview={ },colorlinks=true, linkcolor=black!50!green, citecolor=gray, urlcolor=teal, hyperindex, plainpages=false,bookmarksopenlevel=1,bookmarksopen=true,
pdftitle = {Manual for pgf-PeriodicTable (v\pgfPTversion)},%
pdfsubject = {Periodic Table of Elements},%
pdfkeywords = {Draw the Periodic Table of Elements in a simple way via pgf/TikZ environment. It's possible to draw a full or partial Periodic Table of Elements},%
pdfauthor = {\textcopyright Hugo Gomes},%
pdfproducer = {pdfeTeX-1.\the\pdftexversion\pdftexrevision},
}%End options on pdf
\usepackage{fancyhdr}
\usepackage{lastpage}
\mylastpage{-1}%
\renewcommand{\headrulewidth}{0.4pt}%
\renewcommand{\footrulewidth}{0.4pt}%
\addtolength{\headheight}{25pt}%
\fancypagestyle{pgfPTManual}{%
\fancyhf{} % clear all header and footer fields
\fancyhead[R]{\usefont{T1}{vna}{m}{n}\nouppercase{\leftmark}}%
\fancyhead[L]{\color{blue!70!black}pgf-PeriodicTable \pgfPTversion}%
\fancyfoot[R]{\usefont{T1}{vna}{m}{n}\textbf{\thepage\ of \pageref{LastPage}}}%
\fancyfoot[L]{\ }}%
\fancypagestyle{plain}{%
\addtolength{\textwidth}{3.5cm}%
\fancyhf{} % clear all header and footer fields
\fancyhead[R]{\usefont{T1}{vna}{m}{n}\nouppercase{\leftmark}}%
\fancyhead[L]{\color{blue!70!black}pgf-PeriodicTable \pgfPTversion}%
\fancyfoot[R]{\usefont{T1}{vna}{m}{n}\textbf{\thepage\ of \pageref{LastPage}}}%
\fancyfoot[L]{\ }}%
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{amsmath}
\usepackage{tabularx}
\usepackage{calc}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\makeatletter%
\renewenvironment{theindex}%
               {\if@twocolumn%
                  \@restonecolfalse%
                \else%
                  \@restonecoltrue%
                \fi%
%             \twocolumn[\section*{\indexname}]%
                \twocolumn[\section{\indexname}]%
                \@mkboth{\MakeUppercase\indexname}%
                        {\MakeUppercase\indexname}%
                \thispagestyle{plain}\parindent\z@%
                \parskip\z@ \@plus .3\p@\relax%
                \columnseprule \z@%
                \columnsep 35\p@%
                \let\item\@idxitem}%
               {\if@restonecol\onecolumn\else\clearpage\fi}%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\def\pack{\large\texttt{\color{blue!70!black}pgf-PeriodicTable}\normalsize}%
\def\txttt#1{\large\texttt{#1}\normalsize}%
\def\txttikz{{\fontfamily{cmr}\selectfont Ti\emph{k}Z}}%
\def\ie{\textit{i.e.\/}}%
\def\eg{\textit{e.g.\/}}%
\def\myldots{\tikz{\fill (0,0) circle(.6pt);\fill (2.4pt,0) circle(.6pt);\fill (4.8pt,0) circle(.6pt);}}%
\def\cyan#1{\textcolor{cyan!50!black}{#1}}%
\def\dcyan#1{\textcolor{cyan!30!black}{#1}}%
\def\gray#1{\textcolor{black!50}{#1}}%
\def\blue#1{\textcolor{blue!50!black}{#1}}%
\def\lblue#1{\textcolor{blue!70!black}{#1}}%
\def\green#1{\textcolor{green!50!black}{#1}}%
\def\red#1{\textcolor{red!50!black}{#1}}%
\def\orange#1{\textcolor{orange!80!black}{#1}}%
\def\bs#1{\textcolor{blue!50!black}{\textbackslash#1}}%
\def\lb{\textcolor{blue!50!black}{\{}}%
\def\rb{\textcolor{blue!50!black}{\}}}%
\def\lp{\textcolor{blue!50!black}{[}}%
\def\rp{\textcolor{blue!50!black}{]}}%
\def\fnt#1#2{\begingroup\fontfamily{#1}\selectfont#1\ -- #2\endgroup}%
\def\pgfPTM@quote{\tikz{\pgfmathparse{height("l")}\edef\@lht{\pgfmathresult}\draw[line width=.75pt,line cap=round] (0,0) (0,\@lht-.65pt) -- ++(0,-1.65pt);}}
\def\sq#1{\pgfPTM@quote\makebox[.875pt][s]{}\textcolor{green!50!black}{#1}\makebox[.875pt][s]{}\pgfPTM@quote}%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\def\pgfPTMcolorDemo#1#2{\setbox0=\hbox{\makebox[23pt][s]{}#2}\vbox to 8pt{\hsize=\wd0\tikz{\draw[#1!50!black,fill=#1,rounded corners=2pt] (0,0) rectangle (20pt,8pt);\node[font=\small,right,inner sep=0pt] at (23pt,2.75pt) {#2};}}}%
\def\pgfPTMselectfont{\string\selectfont}%
\def\pgfPTMtiny{\string\tiny}%
\def\pgfPTMscriptsize{\string\scriptsize}%
\def\pgfPTMfootnotesize{\string\footnotesize}%
\def\pgfPTMsmall{\string\small}%
\def\pgfPTMlarge{\string\large}%
\def\pgfPTMLarge{\string\Large}%
\def\pgfPTMLARGE{\string\LARGE}%
\def\pgfPTMhuge{\string\huge}%
\def\pgfPTMHuge{\string\Huge}%
\def\pgfPTMitshape{\string\itshape}%
\def\pgfPTMbfseries{\string\bfseries}%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\def\pgfPTMzerodepth#1{{\setbox0=\hbox{#1}\dp0=0pt\box0\relax}}%
\def\pgfPTMparbox#1{{\setbox0=\vbox{\parshape=2 0pt \linewidth 10pt \the\dimexpr \linewidth-10pt\relax{#1}}\usebox0\relax}}%
\def\pgfPTMline{\tikz{\fill[black!10,rounded corners=2pt] (0,0) rectangle (\linewidth,-4pt);}}%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\newdimen\pgfPTMspace\pgfPTMspace=0pt%
% \pgfPTmacro{macro name}[options list]
\def\pgfPTMmacro#1[#2]{\ignorespaces%
\edef\pgfPTM@optionslist{#2}%
\ifx\pgfPTM@optionslist\@empty\relax\textcolor{blue!50!black}{\textbackslash #1}%
\else%
\textcolor{blue!50!black}{\textbackslash #1[}\textcolor{red!50!black}{\detokenize\expandafter{\pgfPTM@optionslist}}\textcolor{blue!50!black}{]}%
\fi%
}%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% \pgfPTmacrobox[alignment]{macro name}[options list]
\def\pgfPTMmacrobox{\@ifnextchar[\pgfPTM@macrobox{\pgfPTM@macrobox[c]}}%
\def\pgfPTM@macrobox[#1]#2[#3]{\ignorespaces%
\edef\pgfPTM@optionslist{#3}%
\edef\pgfPTM@align{#1}\edef\pgfPTM@align@c{c}%
\ifx\pgfPTM@align\pgfPTM@align@c\relax\def\pgfPTM@alignment{flush center}\else\def\pgfPTM@alignment{left}\fi%
\ifx\pgfPTM@optionslist\@empty\relax%
\tikz{\node[text width=\linewidth-8pt,inner xsep=4pt,align=\pgfPTM@alignment,fill=black!10,rounded corners=2pt] %
{\textcolor{blue!50!black}{\textbackslash #2}};}%
\else%
\tikz{\node[text width=\linewidth-8pt,inner xsep=4pt,align=\pgfPTM@alignment,fill=black!10,rounded corners=2pt] %
{\textcolor{blue!50!black}{\textbackslash #2[}\textcolor{red!50!black}{\detokenize\expandafter{\pgfPTM@optionslist}}\textcolor{blue!50!black}{]}};}%
\fi%
}%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\definecolor{cItemList}{rgb}{0.55,0.78,0.25}
\newenvironment{itemlist}{%
\begin{list}{\hfill$\boldsymbol{\checkmark}$}{\setlength{\parsep}{0pt}\setlength{\topsep}{4pt}\setlength{\leftmargin}{6mm}\setlength{\labelwidth}{1em}\setlength{\labelsep}{1pt}}}{\end{list}}
\tcolorboxenvironment{itemlist}{breakable,blanker,before skip=2pt,after skip=4pt,
                                                borderline west={2.8pt}{.75pt}{cItemList!75!black},
                                                borderline west={2.8pt}{3.55pt}{cItemList!75!black!50!white},
                                                borderline west={2.8pt}{6.35pt}{cItemList!25!white}}%
\newenvironment{itembar}{\footnotesize%
\begin{list}{\hfill$\boldsymbol{\checkmark}$}{\setlength{\parsep}{0pt}\setlength{\topsep}{4pt}\setlength{\leftmargin}{6mm}\setlength{\labelwidth}{1em}\setlength{\labelsep}{1pt}}}{\end{list}}
\tcolorboxenvironment{itembar}{breakable,blanker,before skip=6pt,after skip=6pt,
                                                borderline west={2.8pt}{.75pt}{blue!75!black},
                                                borderline west={2.8pt}{3.55pt}{blue!75!black!50!white},
                                                borderline west={2.8pt}{6.35pt}{blue!25!white}}%
\newtcbox{\use}{enhanced,nobeforeafter,tcbox raise base,boxrule=0.4pt,top=0mm,bottom=0mm,%
  right=0mm,left=15mm,arc=1pt,boxsep=2pt,%
  colframe=cyan!50!black,coltext=cyan!25!black,colback=cyan!10!white,fontupper=\scriptsize,%
  overlay={\begin{tcbclipinterior}\fill[cyan!50!white] (frame.south west)%
    rectangle node[text=white,font=\scriptsize\bfseries,anchor=mid] {USAGE:} ([xshift=15mm]frame.north west);\end{tcbclipinterior}}}
\newtcbox{\uselib}{enhanced,nobeforeafter,tcbox raise base,boxrule=0.4pt,top=0mm,bottom=0mm,%
  right=0mm,left=15mm,arc=1pt,boxsep=2pt,%
  colframe=cyan!50!black,coltext=cyan!25!black,colback=cyan!10!white,fontupper=\small,%
  overlay={\begin{tcbclipinterior}\fill[cyan!50!white] (frame.south west)%
    rectangle node[text=white,font=\small\bfseries,anchor=mid] {USAGE: } ([xshift=15mm]frame.north west);\end{tcbclipinterior}}}%
\newcommand\mymfbox[2][gray]{\begin{tcolorbox}
[breakable,enhanced,arc=2.5pt,outer arc=2.5pt,colback=#1!10!white,colframe=#1!50!black,boxsep=3pt,left=3pt,right=3pt,top=3pt,bottom=3pt,boxrule=1pt]
#2\end{tcolorbox}}
\def\mysmile{\tikz[scale=1.2]{\path[fill=yellow] (0,0) circle (.15cm);
                               \fill[black!90] (45:.9mm) circle (.175mm);
                               \fill[black!90] (135:.9mm) circle (.175mm);
                               \draw[line width=.15mm,black!90] (215:.9mm) arc (215:325:.9mm);}}
\newcommand\tcexemplo[2][EXEMPLO:]{\begin{tcolorbox}[breakable,enhanced,fonttitle=\bfseries,
                            colback=green!5!white,colframe=white!50!green,title=#1,after title={\hfill\mysmile},
                            ]
                            #2
                            \end{tcolorbox}}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% \pgfPTMbuildcell(lines,columns)[entries]
\def\pgfPTMbuildcell(#1,#2)[#3]{\ignorespaces%
\tikz{\node[text width=\linewidth-8pt,inner xsep=4pt,align=left,fill=black!10,rounded corners=2pt] %
{\textcolor{blue!50!black}{\textbackslash pgfPTbuildcell(}\textcolor{red!50!black}{#1,#2}\textcolor{blue!50!black}{)}%
\textcolor{black!50}{\% #1\ rows by #2 columns}\\ \textcolor{blue!50!black}{[}%
\textcolor{red!50!black}{\detokenize\expandafter{#3}}\textcolor{blue!50!black}{]}};}%
}%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% \pgfPTMbtn{txt}
\definecolor{btnBack}{RGB}{237,237,237}%
\definecolor{btnBorder}{RGB}{127,116,112}%
\def\pgfPTMbtn#1{\tikz[baseline=(X.base)]{\node[draw=btnBorder,fill=btnBack,rounded corners=1.5pt,inner sep=2pt,font=\small,text=black,anchor=base] (X) {\pgfPT@box@zerodepth{#1}};}}%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% \pgfPTMbuildcellstyle{name}(lines,columns)[entries]
\def\pgfPTMbuildcellstyle#1(#2,#3)[#4]{\ignorespaces%
\tikz{\node[text width=\linewidth-8pt,inner xsep=4pt,align=left,fill=black!10,rounded corners=2pt] %
{\textcolor{blue!50!black}{\textbackslash pgfPTbuildcellstyle\{}\textcolor{red!50!black}{#1}\textcolor{blue!50!black}{\}}%
\textcolor{blue!50!black}{(}\textcolor{red!50!black}{#2,#3}\textcolor{blue!50!black}{)}%
\textcolor{black!50}{\% #2\ rows by #3 columns}\\ \textcolor{blue!50!black}{[}%
\textcolor{red!50!black}{\detokenize\expandafter{#4}}\textcolor{blue!50!black}{]}};}%
}%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% \pgfPTMpreviewcellstyle[scale factor]{name}
\def\pgfPTMpreviewcellstyle[#1]#2{\ignorespaces%
\edef\pgfPTM@optionslist{#1}%
\ifx\pgfPTM@optionslist\@empty\relax%
\tikz{\node[text width=\linewidth-8pt,inner xsep=4pt,align=center,fill=black!10,rounded corners=2pt] %
{\textcolor{blue!50!black}{\textbackslash pgfPTpreviewcellstyle\{}\textcolor{red!50!black}{#2}\textcolor{blue!50!black}{\}}};}%
\else%
\tikz{\node[text width=\linewidth-8pt,inner xsep=4pt,align=center,fill=black!10,rounded corners=2pt] %
{\textcolor{blue!50!black}{\textbackslash pgfPTpreviewcellstyle[}\textcolor{red!50!black}{#1}\textcolor{blue!50!black}{]\{}%
\textcolor{red!50!black}{#2}\textcolor{blue!50!black}{\}}};}%
\fi%
}%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% \pgfPTMpreviewcellstyle(line;column;what)(line_i to line_f)(column_i to column_f)
\def\pgfPTMcelldesign(#1;#2;#3)(#4 to #5)(#6 to #7){%
\makebox[\linewidth][c]{\begin{tikzpicture}
\draw[line width=1pt,fill=black!10] (0,0) rectangle ++(3,-4);
\foreach \x in {1,2}{\draw[dotted,line width=.8pt,red] (\x cm,0) node[above,xshift=-.5cm] {\x} -- ++(0,-4);}\node[red,above] at (2.5,0) {3};
\foreach \y in {1,...,4}{\draw[dotted,line width=.8pt,blue] (0,-.8*\y cm) node[left,yshift=.4cm] {\y} -- ++(3,0);}\node[blue,left] at (0,-3.6) {5};
\draw[line width=1pt,double distance=1pt,-stealth] (3.5,-2) -- ++(3,0) node[midway,above] {\green{(#1;#2;#3)}};
\draw[line width=1pt,fill=black!10] (7,0) rectangle ++(3,-4);
\foreach \x in {1,2}{\draw[dotted,line width=.8pt,red] (7cm+\x cm,0) node[above,xshift=-.5cm] {\x} -- ++(0,-4);}\node[red,above] at (9.5,0) {3};
\foreach \y in {1,...,4}{\draw[dotted,line width=.8pt,blue] (7cm,-.8*\y cm) node[left,yshift=.4cm] {\y} -- ++(3,0);}\node[blue,left] at (7,-3.6) {5};
\draw[green!50!black,fill=green!50!white,opacity=.5] (6cm+#6cm,-0.8*#4cm+.8cm) rectangle ++(#7cm-#6cm,-.8*#5cm+.8*#4cm) node[midway,opacity=1] {\green{#3}};
\end{tikzpicture}}}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% \pgfPTMnewColorScheme[<trailing color (default=1/1/1 e.g. white)>]{name}{list}
\def\pgfPTMnewColorScheme[#1]#2#3{\ignorespaces%
\edef\pgfPTM@optionslist{#1}%
\ifx\pgfPTM@optionslist\@empty\relax%
\tikz{\node[text width=\linewidth-8pt,inner xsep=4pt,align=center,fill=black!10,rounded corners=2pt] %
{\textcolor{blue!50!black}{\textbackslash pgfPTnewColorScheme\{}\textcolor{red!50!black}{#2}\textcolor{blue!50!black}{\}\{}%
\textcolor{red!50!black}{#3}\textcolor{blue!50!black}{\}}};}%
\else%
\tikz{\node[text width=\linewidth-8pt,inner xsep=4pt,align=center,fill=black!10,rounded corners=2pt] %
{\textcolor{blue!50!black}{\textbackslash pgfPTnewColorScheme[}\textcolor{red!50!black}{#1}\textcolor{blue!50!black}{]\{}%
\textcolor{red!50!black}{#2}\textcolor{blue!50!black}{\}\{}%
\textcolor{red!50!black}{#3}\textcolor{blue!50!black}{\}}};}%
\fi%
}%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% \pgfPTMnewZlist{name}{list}
\def\pgfPTMnewZlist#1#2{\ignorespaces%
\tikz{\node[text width=\linewidth-8pt,inner xsep=4pt,align=center,fill=black!10,rounded corners=2pt] %
{\textcolor{blue!50!black}{\textbackslash pgfPTnewZlist\{}\textcolor{red!50!black}{#1}\textcolor{blue!50!black}{\}\{}%
\textcolor{red!50!black}{#2}\textcolor{blue!50!black}{\}}};}%
}%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% \pgfPTMsetLanguage{language flag}
\def\pgfPTMsetLanguage#1{\ignorespaces%
\tikz{\node[text width=\linewidth-8pt,inner xsep=4pt,align=center,fill=black!10,rounded corners=2pt] %
{\textcolor{blue!50!black}{\textbackslash pgfPTsetLanguage\{}\textcolor{red!50!black}{#1}\textcolor{blue!50!black}{\}}};}%
}%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% \pgfPTMoption[version]{level}{option}{default}{description} level=3-> subsubsection; level=4-> paragraph
\def\pgfPTMoption{\@ifnextchar[\pgfPTM@option{\pgfPTM@option[]}}%
\def\pgfPTM@option[#1]#2#3#4#5{\index{OPTIONS@\textbf{OPTIONS}!#3}\ignorespaces%
\ifnum#2=3\relax\vskip-4.75ex\vskip-18pt\ \subsubsection*{}\addcontentsline{toc}{subsubsection}{\texorpdfstring{$\rightsquigarrow$ #3}{#3}}%
\else\ifnum#2=4\relax\vskip-4.75ex\vskip-20pt\ \paragraph*{}\addcontentsline{toc}{paragraph}{\texorpdfstring{$\rightsquigarrow$ #3}{#3}}\ \\ [8pt]%
\fi\fi%
\edef\pgfPTM@version{#1}%
\begin{tikzpicture}%
\node[below right,font=\small\bfseries] (a) at (0,0) {\hypertarget{option:#3}{#3}};%
\node[below left,font=\small] (b) at (\textwidth-.3333em,0) {default: \itshape#4};%
\node[below right,text=black!80,font=\small,text width=\textwidth-.6666em] (c) at (a.south west) %
{#5\ifx\pgfPTM@version\@empty\relax\else\hfill\textit{\textcolor{blue}{(\pgfPTM@version)}}\fi};%
\begin{pgfonlayer}{back}%
\path[left color=orange!20,right color=black!20!orange!30,rounded corners=2pt] (a.north west) rectangle (c.south east);%
\end{pgfonlayer}%
\end{tikzpicture}%
}%
\def\pgfPTendoption{\\ [-6.75pt]\tikz{\path[left color=orange!20,right color=black!20!orange!30,rounded corners=2pt] (0,0) rectangle ++(\textwidth,-4.5pt);}}%
% \pgfPTMoptiontxt{description}
\def\pgfPTMoptiontxt#1{%
\begin{tikzpicture}%
\node[below right,text=black!80,font=\small,text width=\textwidth-.6666em] (a) at (0,0) {#1};%
\begin{pgfonlayer}{back}%
\path[draw=orange,left color=orange!10,right color=black!5!orange!15,rounded corners=2pt] (a.north west) rectangle (a.south east);%
\end{pgfonlayer}%
\end{tikzpicture}%
}%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% \pgfPTMstyle[version]{level}{style}{default}{description} level=3-> subsubsection; level=4-> paragraph
\def\pgfPTMstyle{\@ifnextchar[\pgfPTM@style{\pgfPTM@style[]}}%
\def\pgfPTM@style[#1]#2#3#4#5{\index{STYLES@\textbf{STYLES}!#3}\ignorespaces%
\ifnum#2=3\relax\vskip-4.75ex\vskip-18pt\ \subsubsection*{}\addcontentsline{toc}{subsubsection}{\texorpdfstring{\hspace{0.73003pt}\ding{252}\ #3}{#3}}%
\else\ifnum#2=4\relax\vskip-4.75ex\vskip-20pt\ \paragraph*{}\addcontentsline{toc}{paragraph}{\texorpdfstring{\hspace{0.73003pt}\ding{252}\ #3}{#3}}\ \\ [8pt]%
\fi\fi%
\edef\pgfPTM@version{#1}%
\begin{tikzpicture}%
\node[below right,font=\small\bfseries] (a) at (0,0) {\hypertarget{style:#3}{#3}};%
\node[below left,font=\small] (b) at (\textwidth-.3333em,0) {default: \itshape#4};%
\node[below right,text=black!80,font=\small,text width=\textwidth-.6666em] (c) at (a.south west) %
{#5\ifx\pgfPTM@version\@empty\relax\else\hfill\textit{\textcolor{blue}{(\pgfPTM@version)}}\fi};%
\begin{pgfonlayer}{back}%
\path[left color=cyan!20,right color=black!20!cyan!30,rounded corners=2pt] (a.north west) rectangle (c.south east);%
\end{pgfonlayer}%
\end{tikzpicture}%
}%
% \pgfPTMstyletxt[version]{level}{style}{txt}{description} level=3-> subsubsection; level=4-> paragraph
\def\pgfPTMstyletxt{\@ifnextchar[\pgfPTM@styletxt{\pgfPTM@styletxt[]}}%
\def\pgfPTM@styletxt[#1]#2#3#4#5{\index{STYLES@\textbf{STYLES}!#3}\ignorespaces%
\ifnum#2=3\relax\vskip-4.75ex\vskip-18pt\ \subsubsection*{}\addcontentsline{toc}{subsubsection}{\texorpdfstring{\hspace{0.73003pt}\ding{252}\ #3}{#3}}%
\else\ifnum#2=4\relax\vskip-4.75ex\vskip-20pt\ \paragraph*{}\addcontentsline{toc}{paragraph}{\texorpdfstring{\hspace{0.73003pt}\ding{252}\ #3}{#3}}\ \\ [8pt]%
\fi\fi%
\edef\pgfPTM@version{#1}%
\begin{tikzpicture}%
\node[below right,font=\small\bfseries] (a) at (0,0) {\hypertarget{option:#3}{#3}};%
\node[below left,font=\small] (b) at (\textwidth-.3333em,0) {\itshape#4};%
\node[below right,text=black!80,font=\small,text width=\textwidth-.6666em] (c) at (a.south west) %
{#5\ifx\pgfPTM@version\@empty\relax\else\hfill\textit{\textcolor{blue}{(\pgfPTM@version)}}\fi};%
\begin{pgfonlayer}{back}%
\path[left color=cyan!20,right color=black!20!cyan!30,rounded corners=2pt] (a.north west) rectangle (c.south east);%
\end{pgfonlayer}%
\end{tikzpicture}%
}%
\def\pgfPTendstyle{\\ [-6.75pt]\tikz{\path[left color=cyan!20,right color=black!20!cyan!30,rounded corners=2pt] (0,0) rectangle ++(\textwidth,-4.5pt);}}%
% \pgfPTMoptiontxt{description}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% for data table
\newdimen\cellht%
\newdimen\wdbi\newdimen\wdbii\newdimen\wdbiii\newdimen\wdbiv%
\newdimen\boxinnersep\boxinnersep=16pt\relax%
%
\def\header{%
\wdbi=.125\linewidth\wdbii=.2\linewidth\wdbiii=.2\linewidth\wdbiv=.475\linewidth%
\begin{tikzpicture}[every node/.style={inner sep=0pt,font=\scriptsize\bfseries,fill=black!30,below right,text height=10pt,text depth=4pt,text=white,draw=black!30}]
\node[text width=\wdbi] (acron) at (0,0) {\ acronym};% 1
\node[text width=\wdbii] (desc) at ([xshift=-1pt]acron.north east) {\ description};% 2
\node[text width=\wdbiii] (unit) at ([xshift=-1pt]desc.north east) {\ unit};% 3
\node[text width=\wdbiv] at ([xshift=-1pt]unit.north east) {\ remarks (compiled from @date)};% 4
\end{tikzpicture}%
}%
\def\linhaimpar#1#2#3#4{%
\@linha{#1}{#2}{#3}{#4}[black!5]
}%
\def\linhapar#1#2#3#4{%
\@linha{#1}{#2}{#3}{#4}[black!10]
}%
\def\@linha#1#2#3#4[#5]{%
\wdbi=.125\linewidth\wdbii=.2\linewidth\wdbiii=.2\linewidth\wdbiv=.475\linewidth%
\advance\wdbi  by-\boxinnersep\relax%
\advance\wdbii  by-\boxinnersep\relax%
\advance\wdbiii  by-\boxinnersep\relax%
\advance\wdbiv  by-\boxinnersep\relax%
\setbox0=\vbox{\hsize=\wdbi\scriptsize#1}%
\setbox1=\vbox{\hsize=\wdbii\scriptsize#2}%
\setbox2=\vbox{\hsize=\wdbiii\scriptsize#3}%
\setbox3=\vbox{\hsize=\wdbiv\scriptsize#4}%
\cellht=\ht0\relax%
\ifdim\cellht<\ht1\relax\cellht=\ht1\relax\fi%
\ifdim\cellht<\ht2\relax\cellht=\ht2\relax\fi%
\ifdim\cellht<\ht3\relax\cellht=\ht3\relax\fi%
\setbox0=\vbox to \cellht{\hsize=\wdbi\scriptsize#1\vfill}%
\setbox1=\vbox to \cellht{\hsize=\wdbii\scriptsize#2\vfill}%
\setbox2=\vbox to \cellht{\hsize=\wdbiii\scriptsize#3\vfill}%
\setbox3=\vbox to \cellht{\hsize=\wdbiv\scriptsize#4\vfill}%
\begin{tikzpicture}[every node/.style={inner xsep=.225\boxinnersep,draw=black!75,fill=#5,below right,text height=\cellht,text depth=2pt}]
\node[text width=\wdbi+.55\boxinnersep] (acron) at (0,0) {\color{red!50!black}\usebox0};
\node[text width=\wdbii+.55\boxinnersep] (desc) at ([xshift=-1pt]acron.north east) {\usebox1};
\node[text width=\wdbiii+.55\boxinnersep] (unit) at ([xshift=-1pt]desc.north east) {\usebox2};
\node[text width=\wdbiv+.55\boxinnersep] at ([xshift=-1pt]unit.north east) {\usebox3};
\end{tikzpicture}%
}%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% LIBRARIES
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\def\pgfPTlib#1#2{\begingroup\renewcommand{\hrulefill}{\leavevmode\leaders\hrule height 1pt\hfill\kern0pt}%
\renewcommand{\dotfill}{\leavevmode\cleaders\hbox to 1.0em{\hss --\hss }\hfill\kern0pt}%
\setbox0=\hbox{\ pgf-PeriodicTable Library \red{\hypertarget{lib:#1}{#1}}\ }%
\raisebox{.25\ht0}{\makebox[.1125\linewidth][s]{\color{cyan!50!black}\hrulefill}}%
\hspace{-.1125\linewidth}\raisebox{.25\ht0+1.75pt}{\makebox[.1125\linewidth][s]{\color{cyan!70!black}\hrulefill}}%
\usebox0%
\raisebox{.25\ht0}{\makebox[.8875\linewidth-\wd0][s]{\color{cyan!50!black}\hrulefill}}%
\hspace{-.8875\linewidth}\hspace{\wd0}\raisebox{.25\ht0+1.75pt}{\makebox[.8875\linewidth-\wd0][s]{\color{cyan!70!black}\hrulefill}}%
\\ [12pt]\makebox[8pt][s]{}\uselib{\bs{usepgfPTlibrary}\lb\red{#1}\rb}%
\\ [12pt]\makebox[\linewidth][s]{\color{cyan!50!black}\dotfill}%
\\ [6pt]\makebox[8pt][s]{}\begin{minipage}{\linewidth-16pt}#2\end{minipage}%
\\ [6pt]\makebox[\linewidth][s]{\color{cyan!70!black}\hrulefill}\hspace{-\linewidth}%
\raisebox{1.75pt}{\makebox[\linewidth][s]{\color{cyan!50!black}\hrulefill}}\endgroup%
}%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\def\pgfPTMlibsubsubsection#1{%
\tikz{\node[cyan!50!black,font=\large] (ding) at (0,0) {\ding{224} };%
\node[fill=cyan!5!white,text width={\linewidth-14.68799pt-1em},below right] (txt) at ([yshift=1pt]ding.north east) {#1};%
\draw[cyan!50!black] (txt.north west) -- (txt.north east);%
\draw[cyan!50!black] (txt.south west) -- (txt.south east);%
}}%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% \pgfPTMlibexample{codetxt}{code}
\def\pgfPTMlibexample#1#2{\ignorespaces%
\begin{tikzpicture}%
\node[below right,text width=\textwidth-.6666em,rounded corners=2pt,left color=black!10,right color=black!14] (a) at (0,0) {#1};%
\node[below right,text width=\textwidth-.6666em,text centered] (c) at (a.south west) {#2};%
\begin{pgfonlayer}{back}%
%\path[left color=black!5!cyan!12,right color=teal!12!white,draw=cyan!50!black,rounded corners=2pt] (a.north west) rectangle (c.south east);%
\path[left color=white,right color=cyan!4,draw=cyan!50!black,rounded corners=2pt] (a.north west) rectangle (c.south east);%
\end{pgfonlayer}%
\end{tikzpicture}%
}%
% \pgfPTMlibexampleBreakBot{codetxt}{code}
\def\pgfPTMlibexampleBreakBot#1#2{\ignorespaces%
\begin{tikzpicture}%
\node[below right,text width=\textwidth-.6666em,rounded corners=2pt,left color=black!10,right color=black!14] (a) at (0,0) {#1};%
\node[below right,text width=\textwidth-.6666em,text centered] (c) at (a.south west) {#2};%
\begin{pgfonlayer}{back}%
%\path[left color=black!5!cyan!12,right color=teal!12!white,draw=cyan!50!black,rounded corners=2pt] (a.north west) rectangle (c.south east);%
\clip (a.north west) rectangle ([yshift=2pt]c.south east);%
\path[left color=white,right color=cyan!4,draw=cyan!50!black,rounded corners=2pt] (a.north west) rectangle (c.south east);%
\end{pgfonlayer}%
\end{tikzpicture}%
}%
% \pgfPTMlibexampleBreakTop{code}
\def\pgfPTMlibexampleBreakTop#1{\ignorespaces%
\begin{tikzpicture}%
\node[below right,text width=\textwidth-.6666em,text centered] (a) at (0,0) {#1};%
\begin{pgfonlayer}{back}%
%\path[left color=black!5!cyan!12,right color=teal!12!white,draw=cyan!50!black,rounded corners=2pt] (a.north west) rectangle (c.south east);%
\clip ([yshift=-2pt]a.north west) rectangle (a.south east);%
\path[left color=white,right color=cyan!4,draw=cyan!50!black,rounded corners=2pt] (a.north west) rectangle (a.south east);%
\end{pgfonlayer}%
\end{tikzpicture}%
}%
\makeatother%
%
\endinput%
