Debian Codegraph @

texmf-dist/doc/latex/pgf-periodictable/manualfiles/pgfPTmanual.macros.tex

raw
1 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2 % Definitions for pgf-PeriodicTable Manual
3 % Hugo Gomes @ 06/05/2026 v2.1.6a
4 % Hugo Gomes @ 03/05/2026 v2.1.6
5 % Hugo Gomes @ 10/02/2025 v2.1.5
6 % Hugo Gomes @ 08/09/2024 v2.1.4
7 % Hugo Gomes @ 07/08/2024 v2.1.3
8 % Hugo Gomes @ 01/08/2024 v2.1.2
9 % Hugo Gomes @ 07/07/2024 v2.1.1
10 % Hugo Gomes @ 03/04/2024 v2.1.0a
11 % Hugo Gomes @ 14/02/2024 v2.1.0
12 % Hugo Gomes @ 29/05/2023 v2.0.1
13 % Hugo Gomes @ 20/02/2023 v2.0.0
14 % Hugo Gomes @ 08/11/2022 v1.0.1
15 % Hugo Gomes @ 10/10/2022 v1.0.0
16 \def\pgfPTversion{2.1.6a}%
17 \def\pgfPTnewinversion#1{new in v#1}%
18 \def\pgfPTchangedinversion#1{changed in v#1}%
19 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
20 \usepackage[ansinew]{inputenc}
21 \usepackage{verdana}
22 %
23 \addtolength{\textwidth}{3.5cm}
24 \addtolength{\textheight}{2.5cm}
25 \addtolength{\topmargin}{-1.25cm}
26 \setlength{\parindent}{0pt}
27 \setlength{\oddsidemargin}{0pt}
28 \setcounter{secnumdepth}{1}%
29 \setcounter{tocdepth}{4}
30 %
31 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
32 \pgfdeclarelayer{back}%
33 \pgfsetlayers{back,main}%
34 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
35 \usetikzlibrary{shadows}%
36 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
37 \usepackage{makeidx}
38 \makeindex%
39 % ------------------------------------------------------------------------------------------------------------------------------------
40 % BUILD SEQUENCE:
41 % 1) pdflatex.exe "pgf-PeriodicTableManual.tex"
42 % 2) makeindex.exe -s "pgf-PeriodicTableManual.ist" "pgf-PeriodicTableManual.idx"
43 % 3) pdflatex.exe "pgf-PeriodicTableManual.tex"
44 % ------------------------------------------------------------------------------------------------------------------------------------
45 \usepackage[skins]{tcolorbox}
46 \tcbuselibrary{breakable}
47 \usepackage[english]{babel}
48 \usepackage{pifont}
49 %\usepackage[pdfstartview={ },colorlinks=true, linkcolor=black!50!green, citecolor=gray, urlcolor=teal, hyperindex, plainpages=false,bookmarksopenlevel=1,bookmarksopen=true]{hyperref}%
50 \hypersetup{%Start options on pdf
51 pdfstartview={ },colorlinks=true, linkcolor=black!50!green, citecolor=gray, urlcolor=teal, hyperindex, plainpages=false,bookmarksopenlevel=1,bookmarksopen=true,
52 pdftitle = {Manual for pgf-PeriodicTable (v\pgfPTversion)},%
53 pdfsubject = {Periodic Table of Elements},%
54 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},%
55 pdfauthor = {\textcopyright Hugo Gomes},%
56 pdfproducer = {pdfeTeX-1.\the\pdftexversion\pdftexrevision},
57 }%End options on pdf
58 \usepackage{fancyhdr}
59 \usepackage{lastpage}
60 \mylastpage{-1}%
61 \renewcommand{\headrulewidth}{0.4pt}%
62 \renewcommand{\footrulewidth}{0.4pt}%
63 \addtolength{\headheight}{25pt}%
64 \fancypagestyle{pgfPTManual}{%
65 \fancyhf{} % clear all header and footer fields
66 \fancyhead[R]{\usefont{T1}{vna}{m}{n}\nouppercase{\leftmark}}%
67 \fancyhead[L]{\color{blue!70!black}pgf-PeriodicTable \pgfPTversion}%
68 \fancyfoot[R]{\usefont{T1}{vna}{m}{n}\textbf{\thepage\ of \pageref{LastPage}}}%
69 \fancyfoot[L]{\ }}%
70 \fancypagestyle{plain}{%
71 \addtolength{\textwidth}{3.5cm}%
72 \fancyhf{} % clear all header and footer fields
73 \fancyhead[R]{\usefont{T1}{vna}{m}{n}\nouppercase{\leftmark}}%
74 \fancyhead[L]{\color{blue!70!black}pgf-PeriodicTable \pgfPTversion}%
75 \fancyfoot[R]{\usefont{T1}{vna}{m}{n}\textbf{\thepage\ of \pageref{LastPage}}}%
76 \fancyfoot[L]{\ }}%
77 \usepackage{amsfonts}
78 \usepackage{amssymb}
79 \usepackage{amsmath}
80 \usepackage{tabularx}
81 \usepackage{calc}
82 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
83 \makeatletter%
84 \renewenvironment{theindex}%
85 {\if@twocolumn%
86 \@restonecolfalse%
87 \else%
88 \@restonecoltrue%
89 \fi%
90 % \twocolumn[\section*{\indexname}]%
91 \twocolumn[\section{\indexname}]%
92 \@mkboth{\MakeUppercase\indexname}%
93 {\MakeUppercase\indexname}%
94 \thispagestyle{plain}\parindent\z@%
95 \parskip\z@ \@plus .3\p@\relax%
96 \columnseprule \z@%
97 \columnsep 35\p@%
98 \let\item\@idxitem}%
99 {\if@restonecol\onecolumn\else\clearpage\fi}%
100 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
101 \def\pack{\large\texttt{\color{blue!70!black}pgf-PeriodicTable}\normalsize}%
102 \def\txttt#1{\large\texttt{#1}\normalsize}%
103 \def\txttikz{{\fontfamily{cmr}\selectfont Ti\emph{k}Z}}%
104 \def\ie{\textit{i.e.\/}}%
105 \def\eg{\textit{e.g.\/}}%
106 \def\myldots{\tikz{\fill (0,0) circle(.6pt);\fill (2.4pt,0) circle(.6pt);\fill (4.8pt,0) circle(.6pt);}}%
107 \def\cyan#1{\textcolor{cyan!50!black}{#1}}%
108 \def\dcyan#1{\textcolor{cyan!30!black}{#1}}%
109 \def\gray#1{\textcolor{black!50}{#1}}%
110 \def\blue#1{\textcolor{blue!50!black}{#1}}%
111 \def\lblue#1{\textcolor{blue!70!black}{#1}}%
112 \def\green#1{\textcolor{green!50!black}{#1}}%
113 \def\red#1{\textcolor{red!50!black}{#1}}%
114 \def\orange#1{\textcolor{orange!80!black}{#1}}%
115 \def\bs#1{\textcolor{blue!50!black}{\textbackslash#1}}%
116 \def\lb{\textcolor{blue!50!black}{\{}}%
117 \def\rb{\textcolor{blue!50!black}{\}}}%
118 \def\lp{\textcolor{blue!50!black}{[}}%
119 \def\rp{\textcolor{blue!50!black}{]}}%
120 \def\fnt#1#2{\begingroup\fontfamily{#1}\selectfont#1\ -- #2\endgroup}%
121 \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);}}
122 \def\sq#1{\pgfPTM@quote\makebox[.875pt][s]{}\textcolor{green!50!black}{#1}\makebox[.875pt][s]{}\pgfPTM@quote}%
123 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
124 \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};}}}%
125 \def\pgfPTMselectfont{\string\selectfont}%
126 \def\pgfPTMtiny{\string\tiny}%
127 \def\pgfPTMscriptsize{\string\scriptsize}%
128 \def\pgfPTMfootnotesize{\string\footnotesize}%
129 \def\pgfPTMsmall{\string\small}%
130 \def\pgfPTMlarge{\string\large}%
131 \def\pgfPTMLarge{\string\Large}%
132 \def\pgfPTMLARGE{\string\LARGE}%
133 \def\pgfPTMhuge{\string\huge}%
134 \def\pgfPTMHuge{\string\Huge}%
135 \def\pgfPTMitshape{\string\itshape}%
136 \def\pgfPTMbfseries{\string\bfseries}%
137 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
138 \def\pgfPTMzerodepth#1{{\setbox0=\hbox{#1}\dp0=0pt\box0\relax}}%
139 \def\pgfPTMparbox#1{{\setbox0=\vbox{\parshape=2 0pt \linewidth 10pt \the\dimexpr \linewidth-10pt\relax{#1}}\usebox0\relax}}%
140 \def\pgfPTMline{\tikz{\fill[black!10,rounded corners=2pt] (0,0) rectangle (\linewidth,-4pt);}}%
141 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
142 \newdimen\pgfPTMspace\pgfPTMspace=0pt%
143 % \pgfPTmacro{macro name}[options list]
144 \def\pgfPTMmacro#1[#2]{\ignorespaces%
145 \edef\pgfPTM@optionslist{#2}%
146 \ifx\pgfPTM@optionslist\@empty\relax\textcolor{blue!50!black}{\textbackslash #1}%
147 \else%
148 \textcolor{blue!50!black}{\textbackslash #1[}\textcolor{red!50!black}{\detokenize\expandafter{\pgfPTM@optionslist}}\textcolor{blue!50!black}{]}%
149 \fi%
150 }%
151 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
152 % \pgfPTmacrobox[alignment]{macro name}[options list]
153 \def\pgfPTMmacrobox{\@ifnextchar[\pgfPTM@macrobox{\pgfPTM@macrobox[c]}}%
154 \def\pgfPTM@macrobox[#1]#2[#3]{\ignorespaces%
155 \edef\pgfPTM@optionslist{#3}%
156 \edef\pgfPTM@align{#1}\edef\pgfPTM@align@c{c}%
157 \ifx\pgfPTM@align\pgfPTM@align@c\relax\def\pgfPTM@alignment{flush center}\else\def\pgfPTM@alignment{left}\fi%
158 \ifx\pgfPTM@optionslist\@empty\relax%
159 \tikz{\node[text width=\linewidth-8pt,inner xsep=4pt,align=\pgfPTM@alignment,fill=black!10,rounded corners=2pt] %
160 {\textcolor{blue!50!black}{\textbackslash #2}};}%
161 \else%
162 \tikz{\node[text width=\linewidth-8pt,inner xsep=4pt,align=\pgfPTM@alignment,fill=black!10,rounded corners=2pt] %
163 {\textcolor{blue!50!black}{\textbackslash #2[}\textcolor{red!50!black}{\detokenize\expandafter{\pgfPTM@optionslist}}\textcolor{blue!50!black}{]}};}%
164 \fi%
165 }%
166 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
167 \definecolor{cItemList}{rgb}{0.55,0.78,0.25}
168 \newenvironment{itemlist}{%
169 \begin{list}{\hfill$\boldsymbol{\checkmark}$}{\setlength{\parsep}{0pt}\setlength{\topsep}{4pt}\setlength{\leftmargin}{6mm}\setlength{\labelwidth}{1em}\setlength{\labelsep}{1pt}}}{\end{list}}
170 \tcolorboxenvironment{itemlist}{breakable,blanker,before skip=2pt,after skip=4pt,
171 borderline west={2.8pt}{.75pt}{cItemList!75!black},
172 borderline west={2.8pt}{3.55pt}{cItemList!75!black!50!white},
173 borderline west={2.8pt}{6.35pt}{cItemList!25!white}}%
174 \newenvironment{itembar}{\footnotesize%
175 \begin{list}{\hfill$\boldsymbol{\checkmark}$}{\setlength{\parsep}{0pt}\setlength{\topsep}{4pt}\setlength{\leftmargin}{6mm}\setlength{\labelwidth}{1em}\setlength{\labelsep}{1pt}}}{\end{list}}
176 \tcolorboxenvironment{itembar}{breakable,blanker,before skip=6pt,after skip=6pt,
177 borderline west={2.8pt}{.75pt}{blue!75!black},
178 borderline west={2.8pt}{3.55pt}{blue!75!black!50!white},
179 borderline west={2.8pt}{6.35pt}{blue!25!white}}%
180 \newtcbox{\use}{enhanced,nobeforeafter,tcbox raise base,boxrule=0.4pt,top=0mm,bottom=0mm,%
181 right=0mm,left=15mm,arc=1pt,boxsep=2pt,%
182 colframe=cyan!50!black,coltext=cyan!25!black,colback=cyan!10!white,fontupper=\scriptsize,%
183 overlay={\begin{tcbclipinterior}\fill[cyan!50!white] (frame.south west)%
184 rectangle node[text=white,font=\scriptsize\bfseries,anchor=mid] {USAGE:} ([xshift=15mm]frame.north west);\end{tcbclipinterior}}}
185 \newtcbox{\uselib}{enhanced,nobeforeafter,tcbox raise base,boxrule=0.4pt,top=0mm,bottom=0mm,%
186 right=0mm,left=15mm,arc=1pt,boxsep=2pt,%
187 colframe=cyan!50!black,coltext=cyan!25!black,colback=cyan!10!white,fontupper=\small,%
188 overlay={\begin{tcbclipinterior}\fill[cyan!50!white] (frame.south west)%
189 rectangle node[text=white,font=\small\bfseries,anchor=mid] {USAGE: } ([xshift=15mm]frame.north west);\end{tcbclipinterior}}}%
190 \newcommand\mymfbox[2][gray]{\begin{tcolorbox}
191 [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]
192 #2\end{tcolorbox}}
193 \def\mysmile{\tikz[scale=1.2]{\path[fill=yellow] (0,0) circle (.15cm);
194 \fill[black!90] (45:.9mm) circle (.175mm);
195 \fill[black!90] (135:.9mm) circle (.175mm);
196 \draw[line width=.15mm,black!90] (215:.9mm) arc (215:325:.9mm);}}
197 \newcommand\tcexemplo[2][EXEMPLO:]{\begin{tcolorbox}[breakable,enhanced,fonttitle=\bfseries,
198 colback=green!5!white,colframe=white!50!green,title=#1,after title={\hfill\mysmile},
199 ]
200 #2
201 \end{tcolorbox}}
202 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
203 % \pgfPTMbuildcell(lines,columns)[entries]
204 \def\pgfPTMbuildcell(#1,#2)[#3]{\ignorespaces%
205 \tikz{\node[text width=\linewidth-8pt,inner xsep=4pt,align=left,fill=black!10,rounded corners=2pt] %
206 {\textcolor{blue!50!black}{\textbackslash pgfPTbuildcell(}\textcolor{red!50!black}{#1,#2}\textcolor{blue!50!black}{)}%
207 \textcolor{black!50}{\% #1\ rows by #2 columns}\\ \textcolor{blue!50!black}{[}%
208 \textcolor{red!50!black}{\detokenize\expandafter{#3}}\textcolor{blue!50!black}{]}};}%
209 }%
210 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
211 % \pgfPTMbtn{txt}
212 \definecolor{btnBack}{RGB}{237,237,237}%
213 \definecolor{btnBorder}{RGB}{127,116,112}%
214 \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}};}}%
215 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
216 % \pgfPTMbuildcellstyle{name}(lines,columns)[entries]
217 \def\pgfPTMbuildcellstyle#1(#2,#3)[#4]{\ignorespaces%
218 \tikz{\node[text width=\linewidth-8pt,inner xsep=4pt,align=left,fill=black!10,rounded corners=2pt] %
219 {\textcolor{blue!50!black}{\textbackslash pgfPTbuildcellstyle\{}\textcolor{red!50!black}{#1}\textcolor{blue!50!black}{\}}%
220 \textcolor{blue!50!black}{(}\textcolor{red!50!black}{#2,#3}\textcolor{blue!50!black}{)}%
221 \textcolor{black!50}{\% #2\ rows by #3 columns}\\ \textcolor{blue!50!black}{[}%
222 \textcolor{red!50!black}{\detokenize\expandafter{#4}}\textcolor{blue!50!black}{]}};}%
223 }%
224 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
225 % \pgfPTMpreviewcellstyle[scale factor]{name}
226 \def\pgfPTMpreviewcellstyle[#1]#2{\ignorespaces%
227 \edef\pgfPTM@optionslist{#1}%
228 \ifx\pgfPTM@optionslist\@empty\relax%
229 \tikz{\node[text width=\linewidth-8pt,inner xsep=4pt,align=center,fill=black!10,rounded corners=2pt] %
230 {\textcolor{blue!50!black}{\textbackslash pgfPTpreviewcellstyle\{}\textcolor{red!50!black}{#2}\textcolor{blue!50!black}{\}}};}%
231 \else%
232 \tikz{\node[text width=\linewidth-8pt,inner xsep=4pt,align=center,fill=black!10,rounded corners=2pt] %
233 {\textcolor{blue!50!black}{\textbackslash pgfPTpreviewcellstyle[}\textcolor{red!50!black}{#1}\textcolor{blue!50!black}{]\{}%
234 \textcolor{red!50!black}{#2}\textcolor{blue!50!black}{\}}};}%
235 \fi%
236 }%
237 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
238 % \pgfPTMpreviewcellstyle(line;column;what)(line_i to line_f)(column_i to column_f)
239 \def\pgfPTMcelldesign(#1;#2;#3)(#4 to #5)(#6 to #7){%
240 \makebox[\linewidth][c]{\begin{tikzpicture}
241 \draw[line width=1pt,fill=black!10] (0,0) rectangle ++(3,-4);
242 \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};
243 \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};
244 \draw[line width=1pt,double distance=1pt,-stealth] (3.5,-2) -- ++(3,0) node[midway,above] {\green{(#1;#2;#3)}};
245 \draw[line width=1pt,fill=black!10] (7,0) rectangle ++(3,-4);
246 \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};
247 \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};
248 \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}};
249 \end{tikzpicture}}}
250 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
251 % \pgfPTMnewColorScheme[<trailing color (default=1/1/1 e.g. white)>]{name}{list}
252 \def\pgfPTMnewColorScheme[#1]#2#3{\ignorespaces%
253 \edef\pgfPTM@optionslist{#1}%
254 \ifx\pgfPTM@optionslist\@empty\relax%
255 \tikz{\node[text width=\linewidth-8pt,inner xsep=4pt,align=center,fill=black!10,rounded corners=2pt] %
256 {\textcolor{blue!50!black}{\textbackslash pgfPTnewColorScheme\{}\textcolor{red!50!black}{#2}\textcolor{blue!50!black}{\}\{}%
257 \textcolor{red!50!black}{#3}\textcolor{blue!50!black}{\}}};}%
258 \else%
259 \tikz{\node[text width=\linewidth-8pt,inner xsep=4pt,align=center,fill=black!10,rounded corners=2pt] %
260 {\textcolor{blue!50!black}{\textbackslash pgfPTnewColorScheme[}\textcolor{red!50!black}{#1}\textcolor{blue!50!black}{]\{}%
261 \textcolor{red!50!black}{#2}\textcolor{blue!50!black}{\}\{}%
262 \textcolor{red!50!black}{#3}\textcolor{blue!50!black}{\}}};}%
263 \fi%
264 }%
265 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
266 % \pgfPTMnewZlist{name}{list}
267 \def\pgfPTMnewZlist#1#2{\ignorespaces%
268 \tikz{\node[text width=\linewidth-8pt,inner xsep=4pt,align=center,fill=black!10,rounded corners=2pt] %
269 {\textcolor{blue!50!black}{\textbackslash pgfPTnewZlist\{}\textcolor{red!50!black}{#1}\textcolor{blue!50!black}{\}\{}%
270 \textcolor{red!50!black}{#2}\textcolor{blue!50!black}{\}}};}%
271 }%
272 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
273 % \pgfPTMsetLanguage{language flag}
274 \def\pgfPTMsetLanguage#1{\ignorespaces%
275 \tikz{\node[text width=\linewidth-8pt,inner xsep=4pt,align=center,fill=black!10,rounded corners=2pt] %
276 {\textcolor{blue!50!black}{\textbackslash pgfPTsetLanguage\{}\textcolor{red!50!black}{#1}\textcolor{blue!50!black}{\}}};}%
277 }%
278 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
279 % \pgfPTMoption[version]{level}{option}{default}{description} level=3-> subsubsection; level=4-> paragraph
280 \def\pgfPTMoption{\@ifnextchar[\pgfPTM@option{\pgfPTM@option[]}}%
281 \def\pgfPTM@option[#1]#2#3#4#5{\index{OPTIONS@\textbf{OPTIONS}!#3}\ignorespaces%
282 \ifnum#2=3\relax\vskip-4.75ex\vskip-18pt\ \subsubsection*{}\addcontentsline{toc}{subsubsection}{\texorpdfstring{$\rightsquigarrow$ #3}{#3}}%
283 \else\ifnum#2=4\relax\vskip-4.75ex\vskip-20pt\ \paragraph*{}\addcontentsline{toc}{paragraph}{\texorpdfstring{$\rightsquigarrow$ #3}{#3}}\ \\ [8pt]%
284 \fi\fi%
285 \edef\pgfPTM@version{#1}%
286 \begin{tikzpicture}%
287 \node[below right,font=\small\bfseries] (a) at (0,0) {\hypertarget{option:#3}{#3}};%
288 \node[below left,font=\small] (b) at (\textwidth-.3333em,0) {default: \itshape#4};%
289 \node[below right,text=black!80,font=\small,text width=\textwidth-.6666em] (c) at (a.south west) %
290 {#5\ifx\pgfPTM@version\@empty\relax\else\hfill\textit{\textcolor{blue}{(\pgfPTM@version)}}\fi};%
291 \begin{pgfonlayer}{back}%
292 \path[left color=orange!20,right color=black!20!orange!30,rounded corners=2pt] (a.north west) rectangle (c.south east);%
293 \end{pgfonlayer}%
294 \end{tikzpicture}%
295 }%
296 \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);}}%
297 % \pgfPTMoptiontxt{description}
298 \def\pgfPTMoptiontxt#1{%
299 \begin{tikzpicture}%
300 \node[below right,text=black!80,font=\small,text width=\textwidth-.6666em] (a) at (0,0) {#1};%
301 \begin{pgfonlayer}{back}%
302 \path[draw=orange,left color=orange!10,right color=black!5!orange!15,rounded corners=2pt] (a.north west) rectangle (a.south east);%
303 \end{pgfonlayer}%
304 \end{tikzpicture}%
305 }%
306 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
307 % \pgfPTMstyle[version]{level}{style}{default}{description} level=3-> subsubsection; level=4-> paragraph
308 \def\pgfPTMstyle{\@ifnextchar[\pgfPTM@style{\pgfPTM@style[]}}%
309 \def\pgfPTM@style[#1]#2#3#4#5{\index{STYLES@\textbf{STYLES}!#3}\ignorespaces%
310 \ifnum#2=3\relax\vskip-4.75ex\vskip-18pt\ \subsubsection*{}\addcontentsline{toc}{subsubsection}{\texorpdfstring{\hspace{0.73003pt}\ding{252}\ #3}{#3}}%
311 \else\ifnum#2=4\relax\vskip-4.75ex\vskip-20pt\ \paragraph*{}\addcontentsline{toc}{paragraph}{\texorpdfstring{\hspace{0.73003pt}\ding{252}\ #3}{#3}}\ \\ [8pt]%
312 \fi\fi%
313 \edef\pgfPTM@version{#1}%
314 \begin{tikzpicture}%
315 \node[below right,font=\small\bfseries] (a) at (0,0) {\hypertarget{style:#3}{#3}};%
316 \node[below left,font=\small] (b) at (\textwidth-.3333em,0) {default: \itshape#4};%
317 \node[below right,text=black!80,font=\small,text width=\textwidth-.6666em] (c) at (a.south west) %
318 {#5\ifx\pgfPTM@version\@empty\relax\else\hfill\textit{\textcolor{blue}{(\pgfPTM@version)}}\fi};%
319 \begin{pgfonlayer}{back}%
320 \path[left color=cyan!20,right color=black!20!cyan!30,rounded corners=2pt] (a.north west) rectangle (c.south east);%
321 \end{pgfonlayer}%
322 \end{tikzpicture}%
323 }%
324 % \pgfPTMstyletxt[version]{level}{style}{txt}{description} level=3-> subsubsection; level=4-> paragraph
325 \def\pgfPTMstyletxt{\@ifnextchar[\pgfPTM@styletxt{\pgfPTM@styletxt[]}}%
326 \def\pgfPTM@styletxt[#1]#2#3#4#5{\index{STYLES@\textbf{STYLES}!#3}\ignorespaces%
327 \ifnum#2=3\relax\vskip-4.75ex\vskip-18pt\ \subsubsection*{}\addcontentsline{toc}{subsubsection}{\texorpdfstring{\hspace{0.73003pt}\ding{252}\ #3}{#3}}%
328 \else\ifnum#2=4\relax\vskip-4.75ex\vskip-20pt\ \paragraph*{}\addcontentsline{toc}{paragraph}{\texorpdfstring{\hspace{0.73003pt}\ding{252}\ #3}{#3}}\ \\ [8pt]%
329 \fi\fi%
330 \edef\pgfPTM@version{#1}%
331 \begin{tikzpicture}%
332 \node[below right,font=\small\bfseries] (a) at (0,0) {\hypertarget{option:#3}{#3}};%
333 \node[below left,font=\small] (b) at (\textwidth-.3333em,0) {\itshape#4};%
334 \node[below right,text=black!80,font=\small,text width=\textwidth-.6666em] (c) at (a.south west) %
335 {#5\ifx\pgfPTM@version\@empty\relax\else\hfill\textit{\textcolor{blue}{(\pgfPTM@version)}}\fi};%
336 \begin{pgfonlayer}{back}%
337 \path[left color=cyan!20,right color=black!20!cyan!30,rounded corners=2pt] (a.north west) rectangle (c.south east);%
338 \end{pgfonlayer}%
339 \end{tikzpicture}%
340 }%
341 \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);}}%
342 % \pgfPTMoptiontxt{description}
343 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
344 % for data table
345 \newdimen\cellht%
346 \newdimen\wdbi\newdimen\wdbii\newdimen\wdbiii\newdimen\wdbiv%
347 \newdimen\boxinnersep\boxinnersep=16pt\relax%
348 %
349 \def\header{%
350 \wdbi=.125\linewidth\wdbii=.2\linewidth\wdbiii=.2\linewidth\wdbiv=.475\linewidth%
351 \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}]
352 \node[text width=\wdbi] (acron) at (0,0) {\ acronym};% 1
353 \node[text width=\wdbii] (desc) at ([xshift=-1pt]acron.north east) {\ description};% 2
354 \node[text width=\wdbiii] (unit) at ([xshift=-1pt]desc.north east) {\ unit};% 3
355 \node[text width=\wdbiv] at ([xshift=-1pt]unit.north east) {\ remarks (compiled from @date)};% 4
356 \end{tikzpicture}%
357 }%
358 \def\linhaimpar#1#2#3#4{%
359 \@linha{#1}{#2}{#3}{#4}[black!5]
360 }%
361 \def\linhapar#1#2#3#4{%
362 \@linha{#1}{#2}{#3}{#4}[black!10]
363 }%
364 \def\@linha#1#2#3#4[#5]{%
365 \wdbi=.125\linewidth\wdbii=.2\linewidth\wdbiii=.2\linewidth\wdbiv=.475\linewidth%
366 \advance\wdbi by-\boxinnersep\relax%
367 \advance\wdbii by-\boxinnersep\relax%
368 \advance\wdbiii by-\boxinnersep\relax%
369 \advance\wdbiv by-\boxinnersep\relax%
370 \setbox0=\vbox{\hsize=\wdbi\scriptsize#1}%
371 \setbox1=\vbox{\hsize=\wdbii\scriptsize#2}%
372 \setbox2=\vbox{\hsize=\wdbiii\scriptsize#3}%
373 \setbox3=\vbox{\hsize=\wdbiv\scriptsize#4}%
374 \cellht=\ht0\relax%
375 \ifdim\cellht<\ht1\relax\cellht=\ht1\relax\fi%
376 \ifdim\cellht<\ht2\relax\cellht=\ht2\relax\fi%
377 \ifdim\cellht<\ht3\relax\cellht=\ht3\relax\fi%
378 \setbox0=\vbox to \cellht{\hsize=\wdbi\scriptsize#1\vfill}%
379 \setbox1=\vbox to \cellht{\hsize=\wdbii\scriptsize#2\vfill}%
380 \setbox2=\vbox to \cellht{\hsize=\wdbiii\scriptsize#3\vfill}%
381 \setbox3=\vbox to \cellht{\hsize=\wdbiv\scriptsize#4\vfill}%
382 \begin{tikzpicture}[every node/.style={inner xsep=.225\boxinnersep,draw=black!75,fill=#5,below right,text height=\cellht,text depth=2pt}]
383 \node[text width=\wdbi+.55\boxinnersep] (acron) at (0,0) {\color{red!50!black}\usebox0};
384 \node[text width=\wdbii+.55\boxinnersep] (desc) at ([xshift=-1pt]acron.north east) {\usebox1};
385 \node[text width=\wdbiii+.55\boxinnersep] (unit) at ([xshift=-1pt]desc.north east) {\usebox2};
386 \node[text width=\wdbiv+.55\boxinnersep] at ([xshift=-1pt]unit.north east) {\usebox3};
387 \end{tikzpicture}%
388 }%
389 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
390 % LIBRARIES
391 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
392 \def\pgfPTlib#1#2{\begingroup\renewcommand{\hrulefill}{\leavevmode\leaders\hrule height 1pt\hfill\kern0pt}%
393 \renewcommand{\dotfill}{\leavevmode\cleaders\hbox to 1.0em{\hss --\hss }\hfill\kern0pt}%
394 \setbox0=\hbox{\ pgf-PeriodicTable Library \red{\hypertarget{lib:#1}{#1}}\ }%
395 \raisebox{.25\ht0}{\makebox[.1125\linewidth][s]{\color{cyan!50!black}\hrulefill}}%
396 \hspace{-.1125\linewidth}\raisebox{.25\ht0+1.75pt}{\makebox[.1125\linewidth][s]{\color{cyan!70!black}\hrulefill}}%
397 \usebox0%
398 \raisebox{.25\ht0}{\makebox[.8875\linewidth-\wd0][s]{\color{cyan!50!black}\hrulefill}}%
399 \hspace{-.8875\linewidth}\hspace{\wd0}\raisebox{.25\ht0+1.75pt}{\makebox[.8875\linewidth-\wd0][s]{\color{cyan!70!black}\hrulefill}}%
400 \\ [12pt]\makebox[8pt][s]{}\uselib{\bs{usepgfPTlibrary}\lb\red{#1}\rb}%
401 \\ [12pt]\makebox[\linewidth][s]{\color{cyan!50!black}\dotfill}%
402 \\ [6pt]\makebox[8pt][s]{}\begin{minipage}{\linewidth-16pt}#2\end{minipage}%
403 \\ [6pt]\makebox[\linewidth][s]{\color{cyan!70!black}\hrulefill}\hspace{-\linewidth}%
404 \raisebox{1.75pt}{\makebox[\linewidth][s]{\color{cyan!50!black}\hrulefill}}\endgroup%
405 }%
406 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
407 \def\pgfPTMlibsubsubsection#1{%
408 \tikz{\node[cyan!50!black,font=\large] (ding) at (0,0) {\ding{224} };%
409 \node[fill=cyan!5!white,text width={\linewidth-14.68799pt-1em},below right] (txt) at ([yshift=1pt]ding.north east) {#1};%
410 \draw[cyan!50!black] (txt.north west) -- (txt.north east);%
411 \draw[cyan!50!black] (txt.south west) -- (txt.south east);%
412 }}%
413 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
414 % \pgfPTMlibexample{codetxt}{code}
415 \def\pgfPTMlibexample#1#2{\ignorespaces%
416 \begin{tikzpicture}%
417 \node[below right,text width=\textwidth-.6666em,rounded corners=2pt,left color=black!10,right color=black!14] (a) at (0,0) {#1};%
418 \node[below right,text width=\textwidth-.6666em,text centered] (c) at (a.south west) {#2};%
419 \begin{pgfonlayer}{back}%
420 %\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);%
421 \path[left color=white,right color=cyan!4,draw=cyan!50!black,rounded corners=2pt] (a.north west) rectangle (c.south east);%
422 \end{pgfonlayer}%
423 \end{tikzpicture}%
424 }%
425 % \pgfPTMlibexampleBreakBot{codetxt}{code}
426 \def\pgfPTMlibexampleBreakBot#1#2{\ignorespaces%
427 \begin{tikzpicture}%
428 \node[below right,text width=\textwidth-.6666em,rounded corners=2pt,left color=black!10,right color=black!14] (a) at (0,0) {#1};%
429 \node[below right,text width=\textwidth-.6666em,text centered] (c) at (a.south west) {#2};%
430 \begin{pgfonlayer}{back}%
431 %\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);%
432 \clip (a.north west) rectangle ([yshift=2pt]c.south east);%
433 \path[left color=white,right color=cyan!4,draw=cyan!50!black,rounded corners=2pt] (a.north west) rectangle (c.south east);%
434 \end{pgfonlayer}%
435 \end{tikzpicture}%
436 }%
437 % \pgfPTMlibexampleBreakTop{code}
438 \def\pgfPTMlibexampleBreakTop#1{\ignorespaces%
439 \begin{tikzpicture}%
440 \node[below right,text width=\textwidth-.6666em,text centered] (a) at (0,0) {#1};%
441 \begin{pgfonlayer}{back}%
442 %\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);%
443 \clip ([yshift=-2pt]a.north west) rectangle (a.south east);%
444 \path[left color=white,right color=cyan!4,draw=cyan!50!black,rounded corners=2pt] (a.north west) rectangle (a.south east);%
445 \end{pgfonlayer}%
446 \end{tikzpicture}%
447 }%
448 \makeatother%
449 %
450 \endinput%