%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% pgf-spectraManual documentation definitions
% the code is not optimized, made by «chunks»
% to carry out the development of the package
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\setcounter{secnumdepth}{1}%
\setcounter{tocdepth}{4}%
%
\usepackage{makeidx}
\makeindex%
\usepackage{listings}
\lstdefinestyle{numbers}
    {numbers=left, stepnumber=1, numberstyle=\tiny\color{black!70}, numbersep=10pt}
\lstset{%
    keywordstyle=\fontfamily{Roboto-LF}\selectfont\footnotesize\color{blue!50!black},%
    basicstyle=\fontfamily{Roboto-LF}\selectfont\footnotesize,%
    style=numbers,%
    breaklines=true,%
    breakindent=10pt,%
    commentstyle=\fontfamily{Roboto-LF}\selectfont\itshape\footnotesize\color{green!50!black},%
    stringstyle=\fontfamily{Roboto-LF}\selectfont\footnotesize,%
    showstringspaces=false,%
    language=[LaTeX]TeX,%
    defaultdialect=[LaTeX]TeX,%
    deletekeywords={gamma,Gamma},%
    classoffset=0,%
    texcsstyle=*[0]{\fontfamily{Roboto-LF}\selectfont\footnotesize\color{blue!50!black}},
    morekeywords={PackageError,RequirePackage,DeclareOption,ExecuteOptions,ProcessOptions,%
                              @Roman,@for,ProvidesPackage,setlength},%
    keywordstyle=\fontfamily{Roboto-LF}\selectfont\footnotesize\color{blue!50!black},%
    classoffset=1,%
    texcsstyle=*[1]{\fontfamily{Roboto-LF}\selectfont\footnotesize\color{orange!50!black}},%
    morekeywords={PreviewEnvironment,definecolor,colorlet,pgfkeys,tikz,%
                              foreach,pgfmathparse,pgfmathresult,pgfmathprintnumberto,pgfdeclarehorizontalshading,draw,node,%
                              pgfdeclareradialshading,pgfdeclareverticalshading,clip},%
    keywordstyle=\fontfamily{Roboto-LF}\selectfont\footnotesize\color{orange!50!black},%
    classoffset=2,%
    texcsstyle=*[2]{\fontfamily{Roboto-LF}\selectfont\footnotesize\color{red!55!black}},%
    morekeywords={wlcolor,tempercolor,pgfspectra,pgfspectraStyle,pgfspectraStyleReset,pgfspectrashade,%
                               pgfspectraplotshade,pgfspectraplotmap,pgfspectrarainbow},%
    keywordstyle=\fontfamily{Roboto-LF}\selectfont\footnotesize\color{red!55!black},%
    classoffset=0%
}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\makeatletter%
\renewenvironment{theindex}%
               {\if@twocolumn%
                  \@restonecolfalse%
                \else%
                  \@restonecoltrue%
                \fi%
%             \twocolumn[\section*{\indexname}]%
                \twocolumn[\section{\indexname}]%
                \@mkboth{\MakeUppercase\indexname}%
                        {\MakeUppercase\indexname}%
                \thispagestyle{pgfSpectraManual}\parindent\z@%
                \parskip\z@ \@plus .3\p@\relax%
                \columnseprule \z@%
                \columnsep 35\p@%
                \let\item\@idxitem}%
               {\if@restonecol\onecolumn\else\clearpage\fi}%
\makeatother%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\def\pgfspectraMnewinversion#1{\textit{\textcolor{blue}{(new in v#1)}}}%
\def\pgfspectraMchangedinversion#1{changed in v#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\pl{\textcolor{blue!50!black}{(}}%
\def\pr{\textcolor{blue!50!black}{)}}%
\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\txttikz{\textsf{Ti\textit{k}Z}}%
\def\txtPGFPLOTS{\textsf{\small PGFPLOTS}}%
\def\txtspec{\textcolor{blue!50!black}{\textbackslash pgfspectra}}%
\def\txtspecopt[#1]{\textcolor{blue!50!black}{\textbackslash pgfspectra[}\textcolor{red!50!black}{#1}\textcolor{blue!50!black}{]}}%
\def\txtwlcolor#1{\textcolor{blue!50!black}{\textbackslash wlcolor\{}\textcolor{red!50!black}{#1}\textcolor{blue!50!black}{\}}}%
\def\txtwlcolorname{\textcolor{blue!50!black}{\textbackslash wlcolor}}%
\def\txttempercolor#1{\textcolor{blue!50!black}{\textbackslash tempercolor\{}\textcolor{red!50!black}{#1}\textcolor{blue!50!black}{\}}}
\def\txtshadename{\textcolor{blue!50!black}{\textbackslash pgfspectrashade}}%
\def\txtshade{\textcolor{blue!50!black}{\textbackslash pgfspectrashade[}\textcolor{red!50!black}{<h|v>\textcolor{blue!50!black}{](}\textcolor{red!50!black}{start,end}\textcolor{blue!50!black}{)\{}\textcolor{red!50!black}{name}\textcolor{blue!50!black}{\}}}}%
\def\txtshadecom(#1,#2)#3{\textcolor{blue!50!black}{\textbackslash pgfspectrashade(}\textcolor{red!50!black}{#1,#2}\textcolor{blue!50!black}{)\{}\textcolor{red!50!black}{#3}\textcolor{blue!50!black}{\}}}%
\def\txtshadecomoption[#1](#2,#3)#4{\textcolor{blue!50!black}{\textbackslash pgfspectrashade[}\textcolor{red!50!black}{#1}\textcolor{blue!50!black}{](}\textcolor{red!50!black}{#2,#3}\textcolor{blue!50!black}{)\{}\textcolor{red!50!black}{#4}\textcolor{blue!50!black}{\}}}%
\def\txtshadelogname{\textcolor{blue!50!black}{\textbackslash pgfspectralogshade}}%
\def\txtshadetikz#1#2#3{\texttt{\textbackslash tikz\{\textbackslash\string f{i}ll[#1] (#2) rectangle (#3);\}}}%
\def\txtnewline{\textbackslash\textbackslash\ }%
\def\txtplotshadename{\textcolor{blue!50!black}{\textbackslash pgfspectraplotshade}}%
\def\txtcomname#1{\textcolor{blue!50!black}{\textbackslash#1}}%
\def\txtplotshade{\textcolor{blue!50!black}{\textbackslash pgfspectraplotshade[}\textcolor{red!50!black}{options}\textcolor{blue!50!black}{]\{}\textcolor{red!50!black}{name}\textcolor{blue!50!black}{\}}}%
\def\txtplotshadecom#1{\textcolor{blue!50!black}{\textbackslash pgfspectraplotshade\{}\textcolor{red!50!black}{#1}\textcolor{blue!50!black}{\}}}%
\def\txtplotshadecomoption[#1]#2{\textcolor{blue!50!black}{\textbackslash pgfspectraplotshade[}\textcolor{red!50!black}{#1}\textcolor{blue!50!black}{]\{}\textcolor{red!50!black}{#2}\textcolor{blue!50!black}{\}}}%
\def\txtplotmapname{\textcolor{blue!50!black}{\textbackslash pgfspectraplotmap}}%
\def\txtplotmap{\textcolor{blue!50!black}{\textbackslash pgfspectraplotmap[}\textcolor{red!50!black}{<l|h>}\textcolor{blue!50!black}{]\{}\textcolor{red!50!black}{name}\textcolor{blue!50!black}{\}}}%
\def\txtplotmapcom#1{\textcolor{blue!50!black}{\textbackslash pgfspectraplotmap\{}\textcolor{red!50!black}{#1}\textcolor{blue!50!black}{\}}}%
\def\txtplotmapcomoption[#1]#2{\textcolor{blue!50!black}{\textbackslash pgfspectraplotmap[}\textcolor{red!50!black}{#1}\textcolor{blue!50!black}{]\{}\textcolor{red!50!black}{#2}\textcolor{blue!50!black}{\}}}%
\def\txtrainbow{\textcolor{blue!50!black}{\textbackslash pgfspectrarainbow}\textcolor{red!50!black}{\lp tikz options\rp\pl rainbow options\pr}\textcolor{blue!50!black}{\{}\textcolor{red!50!black}{radius}\textcolor{blue!50!black}{\}}}%
\def\txtrainbowtitle{\textcolor{blue!50!black}{\textbackslash pgfspectrarainbow}\textcolor{red!50!black}{\lp tikz options\rp\pl rainbow\\ [2pt]\makebox[1.1em][s]{}options\pr}\textcolor{blue!50!black}{\{}\textcolor{red!50!black}{radius}\textcolor{blue!50!black}{\}}}%
\def\txtrainbowname{\textcolor{blue!50!black}{\textbackslash pgfspectrarainbow}}%2em
\def\txtrainbowcom#1{\textcolor{blue!50!black}{\textbackslash pgfspectrarainbow}\textcolor{blue!50!black}{\{}\textcolor{red!50!black}{#1}\textcolor{blue!50!black}{\}}}%
\def\txtrainbowcomoptions[#1](#2)#3{\textcolor{blue!50!black}{\textbackslash pgfspectrarainbow}\textcolor{red!50!black}{[#1](#2)}\textcolor{blue!50!black}{\{}\textcolor{red!50!black}{#3}\textcolor{blue!50!black}{\}}}%
\def\txtrainbowcomoptiontikz[#1]#2{\textcolor{blue!50!black}{\textbackslash pgfspectrarainbow}\textcolor{red!50!black}{[#1]}\textcolor{blue!50!black}{\{}\textcolor{red!50!black}{#2}\textcolor{blue!50!black}{\}}}%
\def\txtrainbowcomoptionrainbow(#1)#2{\textcolor{blue!50!black}{\textbackslash pgfspectrarainbow}\textcolor{red!50!black}{(#1)}\textcolor{blue!50!black}{\{}\textcolor{red!50!black}{#2}\textcolor{blue!50!black}{\}}}%
\def\pack{\large\texttt{pgf-spectra}\normalsize}%
\def\txtspecsty{\textcolor{blue!50!black}{\textbackslash pgfspectraStyle}}%
\def\txtspecstyle[#1]{\textcolor{blue!50!black}{\textbackslash pgfspectraStyle[}\textcolor{red!50!black}{#1}\textcolor{blue!50!black}{]}}%
\def\txtspecstylereset{\textcolor{blue!50!black}{\textbackslash pgfspectraStyleReset}}%
\def\sectioncom#1#2#3{% #3 -> space before the spectra
\makebox[\textwidth][c]{\tikz{\node[fill=black!20,draw=black!20,rounded corners=1pt,right,text width=\textwidth-.6666em] at (0,0) {#1};}}%
\\ [1pt]\makebox[#3][s]{}#2\relax%
\\ [-6pt]\makebox[\textwidth][c]{\tikz{\draw[fill=black!20,draw=black!20,rounded corners=1pt] (0,0) rectangle ++(\textwidth,-3pt);}}%
\smallskip}%
%
\def\bigsectioncom#1#2#3#4{% #4 -> space before the spectra
\makebox[\textwidth][c]{\tikz{\node[fill=black!20,draw=black!20,rounded corners=1pt,right,text width=\textwidth-.6666em] at (0,0) {#1};}}%
\newpage%
\makebox[\textwidth][c]{\tikz{\node[fill=black!20,draw=black!20,rounded corners=1pt,right,text width=\textwidth-.6666em] at (0,0) {#2};}}%
\\ [1pt]\makebox[#4][s]{}#3\relax%
\\ [-6pt]\makebox[\textwidth][c]{\tikz{\draw[fill=black!20,draw=black!20,rounded corners=1pt] (0,0) rectangle ++(\textwidth,-3pt);}}%
\smallskip}%
%
\makeatletter%
\def\com{\@ifnextchar[\@com{\@com[0pt]}}%
\def\@com[#1]#2#3{%
\makebox[\textwidth][c]{\tikz{\node[fill=black!20,draw=black!20,rounded corners=1pt,right,text width=\textwidth-.6666em-5mm] at (0,0) {#2};}}%
\\ [1pt]\makebox[\textwidth][c]{#3\relax}%
\pgfmathparse{-6pt+#1}\edef\myparskip{\pgfmathresult pt}%
\\ [\myparskip]\makebox[\textwidth][c]{\tikz{\draw[fill=black!20,draw=black!20,rounded corners=1pt] (0,0) rectangle ++(\textwidth-5mm,-3pt);}}%
\smallskip}%
\makeatother%
\def\comnewpage#1#2{%
\makebox[\textwidth][c]{\tikz{\node[fill=black!20,draw=black!20,rounded corners=1pt,right,text width=\textwidth-.6666em-5mm] at (0,0) {#1};}}%
\newpage\makebox[\textwidth][c]{#2\relax}%
\\ [-6pt]\makebox[\textwidth][c]{\tikz{\draw[fill=black!20,draw=black!20,rounded corners=1pt] (0,0) rectangle ++(\textwidth-5mm,-3pt);}}%
\smallskip}%
\def\bigexample#1#2{%
\makebox[\textwidth][c]{\tikz{\node[fill=black!20,draw=black!20,rounded corners=1pt,right,text width=\textwidth-.6666em-5mm] at (0,0) {#1};}}%
\\ [1pt]\makebox[.025\textwidth][s]{}\begin{minipage}{.9\linewidth}
#2\relax\end{minipage}%
\\ \makebox[\textwidth][c]{\tikz{\draw[fill=black!20,draw=black!20,rounded corners=1pt] (0,0) rectangle ++(\textwidth-5mm,-3pt);}}%
\smallskip}%
%%%%%%%%%%%%%%%%
\pgfdeclarelayer{back}
\pgfsetlayers{back,main}
\def\option#1#2#3{\index{OPTIONS@\textbf{OPTIONS}\addtoind!#1}% option,default,description
% before skip in class 3.25ex plus -1ex minus -0.2ex after skip in class1.5ex plus 0.2ex ->
\vskip-4.75ex\vskip-18pt\ \subsection*{}\addcontentsline{toc}{subsection}{\texorpdfstring{$\rightsquigarrow$ #1}{#1}}%
\begin{tikzpicture}%
\node[below right,font=\small\bfseries] (a) at (0,0) {\hypertarget{option:#1}{#1}};%
\node[below left,font=\small] (b) at (\textwidth-.3333em,0) {default: \itshape#2};
\node[below right,text=black!80,font=\small,text width=\textwidth-.6666em] (c) at (a.south west) {#3};
\begin{pgfonlayer}{back}
\path[left color=orange!20,right color=black!30!orange!50,rounded corners=2pt] (a.north west) rectangle (c.south east);
\end{pgfonlayer}
\end{tikzpicture}%
}%
\def\liboption#1#2#3{\index{OPTIONS@\textbf{OPTIONS}\addtoind!#1}% option,default,description
% before skip in class 3.25ex plus -1ex minus -0.2ex after skip in class1.5ex plus 0.2ex ->
\vskip-4.75ex\paragraph*{}\hspace{-1em}\addcontentsline{toc}{paragraph}{\texorpdfstring{$\rightsquigarrow$ #1}{#1}}%
\begin{tikzpicture}%
\node[below right,font=\small\bfseries] (a) at (0,0) {\hypertarget{optionlib:#1}{#1}};%
\node[below left,font=\small] (b) at (\textwidth-.3333em,0) {default: \itshape#2};
\node[below right,text=black!80,font=\small,text width=\textwidth-.6666em] (c) at (a.south west) {#3};
\begin{pgfonlayer}{back}
\path[left color=orange!20,right color=black!30!orange!50,rounded corners=2pt] (a.north west) rectangle (c.south east);
\end{pgfonlayer}
\end{tikzpicture}%
}%
\def\liboptionmultiline#1#2#3{\index{OPTIONS@\textbf{OPTIONS}\addtoind!#1}% option,default,description
% before skip in class 3.25ex plus -1ex minus -0.2ex after skip in class1.5ex plus 0.2ex ->
\vskip-4.75ex\paragraph*{}\hspace{-1em}\addcontentsline{toc}{paragraph}{\texorpdfstring{$\rightsquigarrow$ #1}{#1}}%
\begin{tikzpicture}%
\node[below right,font=\small\bfseries] (a) at (0,0) {\hypertarget{optionlib:#1}{#1}};%
\node[below left,font=\small] (b) at (.45\textwidth-.3333em,0) {default:\ };
\node[below right,font=\small,align=center,text width=.55\linewidth-.6666em] (c) at (.45\textwidth,0) {\itshape#2};
\node[below right,text=black!80,font=\small,text width=\textwidth-.9999em] (d) at ([xshift=-.45\textwidth+.3333em]c.south west) {#3};
\begin{pgfonlayer}{back}
\path[left color=orange!20,right color=black!30!orange!50,rounded corners=2pt] (a.north west) rectangle (d.south east);
\end{pgfonlayer}
\end{tikzpicture}%
}%
\def\newoption#1#2#3{\index{OPTIONS@\textbf{OPTIONS}\addtoind!#1}% option,default,description
\vskip-4.75ex\vskip-18pt\ \subsection*{}\addcontentsline{toc}{subsection}{\texorpdfstring{$\rightsquigarrow$ #1}{#1}}%
\begin{tikzpicture}%
\node[below right,font=\small\bfseries] (a) at (0,0) {\hypertarget{option:#1}{#1}};%
\node[below left,font=\small] (b) at (\textwidth-.3333em,0) {default: \itshape#2};
\node[below right,text=black!80,font=\small,text width=\textwidth-.6666em] (c) at (a.south west) {#3\hfill\textit{\textcolor{blue}{(new in v2.0.0)}}};
\begin{pgfonlayer}{back}
\path[left color=orange!20,right color=black!30!orange!50,rounded corners=2pt] (a.north west) rectangle (c.south east);
\end{pgfonlayer}
\end{tikzpicture}%
}%
\def\newminoroption#1#2#3{\index{OPTIONS@\textbf{OPTIONS}\addtoind!#1}% option,default,description
\vskip-4.75ex\vskip-18pt\ \subsection*{}\addcontentsline{toc}{subsection}{\texorpdfstring{$\rightsquigarrow$ #1}{#1}}%
\begin{tikzpicture}%
\node[below right,font=\small\bfseries] (a) at (0,0) {\hypertarget{option:#1}{#1}};%
\node[below left,font=\small] (b) at (\textwidth-.3333em,0) {default: \itshape#2};
\node[below right,text=black!80,font=\small,text width=\textwidth-.6666em] (c) at (a.south west) {#3\hfill\textit{\textcolor{blue}{(new in v\inversion{2.1.0})}}};
\begin{pgfonlayer}{back}
\path[left color=orange!20,right color=black!30!orange!50,rounded corners=2pt] (a.north west) rectangle (c.south east);
\end{pgfonlayer}
\end{tikzpicture}%
}%
\def\libnewminoroption#1#2#3{\noindent\index{OPTIONS@\textbf{OPTIONS}\addtoind!#1}% option,default,description
\vskip-4.75ex\paragraph*{}\hspace{-1em}\addcontentsline{toc}{paragraph}{\texorpdfstring{$\rightsquigarrow$ #1}{#1}}%
\begin{tikzpicture}%
\node[below right,font=\small\bfseries] (a) at (0,0) {\hypertarget{option:#1}{#1}};%
\node[below left,font=\small] (b) at (\textwidth-.3333em,0) {default: \itshape#2};
\node[below right,text=black!80,font=\small,text width=\textwidth-.6666em] (c) at (a.south west) {#3\hfill\textit{\textcolor{blue}{(new in v\inversion{2.1.0})}}};
\begin{pgfonlayer}{back}
\path[left color=orange!20,right color=black!30!orange!50,rounded corners=2pt] (a.north west) rectangle (c.south east);
\end{pgfonlayer}
\end{tikzpicture}%
}%
\def\newminorrevoption#1#2#3{\index{OPTIONS@\textbf{OPTIONS}\addtoind!#1}% option,default,description
\vskip-4.75ex\vskip-18pt\ \subsection*{}\addcontentsline{toc}{subsection}{\texorpdfstring{$\rightsquigarrow$ #1}{#1}}%
\begin{tikzpicture}%
\node[below right,font=\small\bfseries] (a) at (0,0) {\hypertarget{option:#1}{#1}};%
\node[below left,font=\small] (b) at (\textwidth-.3333em,0) {default: \itshape#2};
\node[below right,text=black!80,font=\small,text width=\textwidth-.6666em] (c) at (a.south west) {#3\hfill\mbox{\textit{\textcolor{blue}{(new in v\inversion{2.1.1})}}}};
\begin{pgfonlayer}{back}
\path[left color=orange!20,right color=black!30!orange!50,rounded corners=2pt] (a.north west) rectangle (c.south east);
\end{pgfonlayer}
\end{tikzpicture}%
}%
\def\libnewminorrevoption#1#2#3{\index{OPTIONS@\textbf{OPTIONS}\addtoind!#1}% option,default,description
\vskip-4.75ex\paragraph*{}\hspace{-1em}\addcontentsline{toc}{paragraph}{\texorpdfstring{$\rightsquigarrow$ #1}{#1}}%
\begin{tikzpicture}%
\node[below right,font=\small\bfseries] (a) at (0,0) {\hypertarget{option:#1}{#1}};%
\node[below left,font=\small] (b) at (\textwidth-.3333em,0) {default: \itshape#2};
\node[below right,text=black!80,font=\small,text width=\textwidth-.6666em] (c) at (a.south west) {#3\hfill\mbox{\textit{\textcolor{blue}{(new in v\inversion{2.1.1})}}}};
\begin{pgfonlayer}{back}
\path[left color=orange!20,right color=black!30!orange!50,rounded corners=2pt] (a.north west) rectangle (c.south east);
\end{pgfonlayer}
\end{tikzpicture}%
}%
\def\endoption{\\ [-9pt]\tikz{\path[left color=orange!20,right color=black!30!orange!50,rounded corners=2pt] (0,0) rectangle ++(\textwidth,-4.5pt);}}
% for options table
%
\newdimen\cellht%
\newdimen\wdbi\newdimen\wdbii\newdimen\wdbiii\newdimen\wdbiv\newdimen\wdbv%\newdimen\wdbvi%
\newdimen\boxinnersep\boxinnersep=8pt\relax%
%
\def\header{%
\wdbi=.16\linewidth\wdbii=.42\linewidth\wdbiii=.09\linewidth\wdbiv=.15\linewidth\wdbv=.18\linewidth%\wdbvi=.08\linewidth%
\begin{tikzpicture}[every node/.style={inner sep=0pt,font=\scriptsize\bfseries,draw=black!75,fill=black!20,below right,text height=10pt,text depth=4pt}]
\node[text width=\wdbi] (key) at (0,0) {\ key};% 1
\node[text width=\wdbii] (desc) at ([xshift=-1pt]key.north east) {\ description};% 2
\node[text width=\wdbiii] (type) at ([xshift=-1pt]desc.north east) {\ type};% 3
\node[text width=\wdbiv] (default) at ([xshift=-1pt]type.north east) {\ default};% 4
\node[text width=\wdbv] (values) at ([xshift=-1pt]default.north east) {\ value(s)};% 5
\end{tikzpicture}%
}%
\def\linhaimpar#1#2#3#4#5{%
\wdbi=.16\linewidth\wdbii=.42\linewidth\wdbiii=.09\linewidth\wdbiv=.15\linewidth\wdbv=.18\linewidth%\wdbvi=.08\linewidth%
\advance\wdbi  by-\boxinnersep\relax%
\advance\wdbii  by-\boxinnersep\relax%
\advance\wdbiii  by-\boxinnersep\relax%
\advance\wdbiv  by-\boxinnersep\relax%
\advance\wdbv  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}%
\setbox4=\vbox{\hsize=\wdbv\scriptsize#5}%
\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%
\ifdim\cellht<\ht4\relax\cellht=\ht4\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}%
\setbox4=\vbox to \cellht{\hsize=\wdbv\scriptsize#5\vfill}%
\begin{tikzpicture}[every node/.style={inner xsep=.225\boxinnersep,draw=black!75,fill=black!5,below right,text height=\cellht,text depth=2pt}]
\node[text width=\wdbi+.55\boxinnersep] (key) at (0,0) {\color{red!50!black}\usebox0};
\node[text width=\wdbii+.55\boxinnersep] (desc) at ([xshift=-1pt]key.north east) {\usebox1};
\node[text width=\wdbiii+.55\boxinnersep] (type) at ([xshift=-1pt]desc.north east) {\usebox2};
\node[text width=\wdbiv+.55\boxinnersep] (default) at ([xshift=-1pt]type.north east) {\usebox3};
\node[text width=\wdbv+.55\boxinnersep] (values) at ([xshift=-1pt]default.north east) {\usebox4};
%\node[text width=\wdbvi+.55\boxinnersep] at ([xshift=-1pt]values.north east) {\usebox5};
\end{tikzpicture}%
}%
\def\linhapar#1#2#3#4#5{%
\wdbi=.16\linewidth\wdbii=.42\linewidth\wdbiii=.09\linewidth\wdbiv=.15\linewidth\wdbv=.18\linewidth%\wdbvi=.08\linewidth%
\advance\wdbi  by-\boxinnersep\relax%
\advance\wdbii  by-\boxinnersep\relax%
\advance\wdbiii  by-\boxinnersep\relax%
\advance\wdbiv  by-\boxinnersep\relax%
\advance\wdbv  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}%
\setbox4=\vbox{\hsize=\wdbv\scriptsize#5}%
\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%
\ifdim\cellht<\ht4\relax\cellht=\ht4\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}%
\setbox4=\vbox to \cellht{\hsize=\wdbv\scriptsize#5\vfill}%
\begin{tikzpicture}[every node/.style={inner xsep=.225\boxinnersep,draw=black!75,fill=black!10,below right,text height=\cellht,text depth=2pt}]
\node[text width=\wdbi+.55\boxinnersep] (key) at (0,0) {\color{red!50!black}\usebox0};
\node[text width=\wdbii+.55\boxinnersep] (desc) at ([xshift=-1pt]key.north east) {\usebox1};
\node[text width=\wdbiii+.55\boxinnersep] (type) at ([xshift=-1pt]desc.north east) {\usebox2};
\node[text width=\wdbiv+.55\boxinnersep] (default) at ([xshift=-1pt]type.north east) {\usebox3};
\node[text width=\wdbv+.55\boxinnersep] (values) at ([xshift=-1pt]default.north east) {\usebox4};
\end{tikzpicture}%
}%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% LIBRARIES
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%\pgfdeclarelayer{back}%
%\pgfsetlayers{back,main}%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\makeatletter%
\def\manualData{\pgfspectra@last@dataset}%
\makeatother%
\def\uselib#1{%
\begin{tikzpicture}
\node[rounded corners=2pt,font=\small\bfseries,text=white,fill=cyan!50!white,draw=cyan!50!black,inner sep=0pt,minimum height=14pt,text depth=0pt] (usage) at (0,0) { \raisebox{4.25pt}{\ USAGE:\ }\tikz{\node[fill=cyan!10!white,font=\fontseries{n}\small] {\ #1\mbox{\ }}}};
\end{tikzpicture}
}%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\def\pgfspectralib#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-spectra 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{usepgfspectralibrary}\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\pgfspectralibsubsubsection#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] ([xshift={-14.68799pt-.3333em}]txt.north west) -- (txt.north east);%
\draw[cyan!50!black] ([xshift={-14.68799pt-.3333em}]txt.south west) -- (txt.south east);%
}}%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\makeatletter%
\newread\tmpFILE%
\newcount\tmpNlines%
\newcount\thechar%
\def\pgfspectraMloadfile{\@ifnextchar[{\pgfspectraM@loadfile}{\pgfspectraM@loadfile[]}}%
\def\pgfspectraM@loadfile[#1]#2.#3\relax{%
\tmpNlines=0%
\edef\tmpFILEcontents{}%
\edef\tmpTestRS{#1}\ifx\tmpTestRS\tmpFILEcontents\relax\edef\MAXLines{4}\else\edef\MAXLines{5}\fi%
\immediate\openin\tmpFILE=#2.#3 %
\@whilesw\unless\ifeof\tmpFILE\fi{%
  \advance\tmpNlines by1\relax%
  \begingroup\endlinechar=-1%
  \global\readline\tmpFILE to\tmpFILEline%
  \endgroup%
  \ifnum\tmpNlines>\MAXLines\relax\thechar=0\edef\tmpa{}\edef\tmpb{\tmpFILEline}\ifx\tmpa\tmpb\relax\else%
  \edef\thelinedata@tmp{}\edef\MAXLINECHARS{125}\expandafter\pgfspectra@formatline\tmpFILEline\relax\edef\tmpFILEline{\thelinedata@tmp}%
  \fi\fi%
  \edef\tmpb{\tmpFILEline}\ifx\tmpa\tmpb\relax\else%
  \edef\tmpFILEcontents{\tmpFILEcontents\vskip0pt\vbox{\hsize=.9\textwidth\tmpFILEline}}\fi%
}%
\immediate\closeout\tmpFILE%
\begin{tikzpicture}%
\node[text width=\textwidth-2pt-.6666em,draw=black!10,fill=black!10,line width=2pt,rounded corners=2pt,inner ysep=4pt] (a) at (0,0) {The contents of \textbf{#2.#3}};%
\node[below right,text width=\textwidth-2pt-.6666em,draw=black!10,line width=2pt,font=\scriptsize,rounded corners=2pt] at ([yshift=4pt]a.south west) %
{\textsf{\tmpFILEcontents}};%
\end{tikzpicture}%
}%
\def\pgfspectra@formatline#1#2\relax{%
\edef\testa{}\edef\testb{#2}\edef\testc{#1}\edef\testd{+}\edef\testf{o}%
\global\advance\thechar by1\relax%
\ifx\testa\testb\relax\edef\thelinedata@tmp{\thelinedata@tmp#1}%
\else%
\ifx\testc\testd\relax\edef\MAXLINECHARS{126}\relax\fi%
\if\testc\testf\relax\edef\spc{ }\else\edef\spc{}\relax\fi%
\ifnum\thechar<\MAXLINECHARS\relax\edef\thelinedata@tmp{\thelinedata@tmp#1\spc}\else%
\edef\thelinedata@tmp{\thelinedata@tmp\vskip0pt\hskip1.5em#1}\global\thechar=0\relax\fi%ifnum
\expandafter\pgfspectra@formatline#2\relax%
\fi%\ifx
}%
\makeatother%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\endinput%
