% ---------------------------------------------------------------------------------------
% subfile of pgf-PeriodicTable package -----------------------------------------------
% ---------------------------------------------------------------------------------------
\def\pgfPT@library@fittowidth@loaded{}%
\message{pgfPT fittowidth loaded!}%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% provide the macros
%
%       \pgfPTfittowidth[font size]
%       \pgfPTendfittowidth
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% NOTES:
%
% ### Absolute Point Sizes ###
%
% font              standard classes                    AMS classes, memoir                 slides
% size          (except slides), beamer
%                   [10pt] [11pt] [12pt]                [10pt] [11pt] [12pt]
%\tiny                5       6         6                       6        7         8                      13.82
%\scriptsize        7       8         8                       7        8         9                      16.59
%\footnotesize    8       9        10                      8        9        10                     16.59
%\small              9      10     10.95                    9      10      10.95                  16.59
%\normalsize     10   10.95    12                      10    10.95    12                     19.907
%\large             12     12      14.4                  10.95   12      14.4                    23.89
%\Large           14.4  14.4    17.28                  12     14.4    17.28                  28.66
%\LARGE        17.28  17.28  20.74                14.4   17.28   20.74                  34.4
%\huge           20.74 20.74  24.88               17.28   20.74  24.88                   41.28
%\Huge           24.88 24.88 24.88                20.74   24.88  24.88                   41.28
%
%
% ### Periodic Table Sizes ###
%
% default cell wd (pt) 34
% default cell ht (pt) 38.25
% default legend acronyms font size (pt) 10 (\f@size)
% default Z font (pt) 5 (\tiny)
% default name font,… (pt) 5 (\tiny)
% -------- a4paper or letter ----------------
% font size (pt)               10.0                    11.0                 12.0
% \textwidth (pt)            345.0                  360.0               390.0
% \pgfPTwd (pt)             624.65363           625.20963        625.73781
% -------- conversion factor ---------------
% \textwidth/\pgfPTwd   0.552306084       0.57580687      0.623264239
% -------- new sizes ------------------------
% new cell wd (pt)           18.8                   19.5                  21.1
% new cell ht (pt)            21                      22                     23.8
% new legend acronyms
%        font size (pt)         6                       9                       10
% new Z font (pt)            3                       3.1                     3.3
% new name font,… (pt)  3                       3.1                     3.3
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
%
\makeatletter%
% \pgfPTfittowidth[font size]
% ---------------------------------------------------------------------------------------
% macro to adjust the Periodic Table to the textwidth
% ---------------------------------------------------------------------------------------
% optional: font size <10pt|11pt|12pt>. If not provided \f@size is used.
\def\pgfPTfittowidth{\@ifnextchar[\pgfPT@fittowidth{\pgfPT@fittowidth[]}}%
\def\pgfPT@fittowidth[#1]{%
\def\pgfPT@fitwidthtrue{}%
\edef\pgfPT@fittowidth@enpty{#1}%
\ifx\pgfPT@fittowidth@enpty\pgfPT@relax\relax\edef\@pgfPT@thesize{\f@size pt}\else\edef\@pgfPT@thesize{#1}\ifdim\@pgfPT@thesize=11pt\relax\edef\@pgfPT@thesize{10.95pt}\fi\fi%
% backup...
\let\@pgfPTcellwd\pgfPTcellwd%
\let\@pgfPTcellht\pgfPTcellht%
\let\@pgfPTlabLaAcfont\pgfPTlabLaAcfont%
\let\@pgfPTtitlefont\pgfPTtitlefont%
\let\@pgfPTlegendacrofontsize\pgfPTlegendacrofontsize%
\let\@pgfPTlabfont\pgfPTlabfont%
\let\@pgfPTblocksfont\pgfPTblocksfont%
\let\@pgfPTfamiliesfont\pgfPTfamiliesfont%
\let\@pgfPTvarRfont\pgfPTvarRfont%
\let\@pgfPTvarEifont\pgfPTvarEifont%
\let\@pgfPTvareafffont\pgfPTvareafffont%
\let\@pgfPTZfont\pgfPTZfont%
\let\@pgfPTCSfont\pgfPTCSfont%
\let\@pgfPTnamefont\pgfPTnamefont%
\let\@pgfPTArfont\pgfPTArfont%
\let\@pgfPTOfont\pgfPTOfont%
\let\@pgfPTdfont\pgfPTdfont%
\let\@pgfPTlsfont\pgfPTlsfont%
\let\@pgfPTDiscYfont\pgfPTDiscYfont%
\let\@pgfPTeDistfont\pgfPTeDistfont%
\let\@pgfPTRfont\pgfPTRfont%
\let\@pgfPTRcovfont\pgfPTRcovfont%
\let\@pgfPTRionfont\pgfPTRionfont%
\let\@pgfPTEifont\pgfPTEifont%
\let\@pgfPTenegfont\pgfPTenegfont%
\let\@pgfPTeafffont\pgfPTeafffont%
\let\@pgfPTTmeltfont\pgfPTTmeltfont%
\let\@pgfPTTmeltCfont\pgfPTTmeltCfont%
\let\@pgfPTTboilfont\pgfPTTboilfont%
\let\@pgfPTTboilCfont\pgfPTTboilCfont%
\let\@pgfPTeConfignfont\pgfPTeConfignfont%
\let\@pgfPTeConfignlfont\pgfPTeConfignlfont%
\let\@pgfPTCpfont\pgfPTCpfont%
\let\@pgfPTkTfont\pgfPTkTfont%
\let\@pgfPTlsafont\pgfPTlsafont%
\let\@pgfPTlsbfont\pgfPTlsbfont%
\let\@pgfPTlscfont\pgfPTlscfont%
\let\@pgfPTlscafont\pgfPTlscafont%
\let\@pgfPTDiscCfont\pgfPTDiscCfont%
\let\@pgfPTspectrafont\pgfPTspectrafont%
%%%%%%
\ifdim\@pgfPT@thesize=10pt\relax%
% fit to 10pt
\pgfPTstyle[cell width=18.8pt,cell height=21pt,label LaAc font=\tiny\itshape,title font=\normalsize\bfseries,legend acronyms font size=6pt,%
label font=\scriptsize\bfseries,blocks font=\scriptsize\bfseries,families font=\scriptsize\bfseries,varR font=\tiny\bfseries,varEi font=\tiny\bfseries,%
vareaff font=\tiny\bfseries,Z font=\fontsize{3pt}{3pt}\selectfont\bfseries,CS font=\scriptsize\bfseries,%
name font=\fontsize{3pt}{3pt}\selectfont,%
Ar font=\fontsize{3pt}{3pt}\selectfont\bfseries,O font=\fontsize{3pt}{3pt}\selectfont\bfseries,d font=\fontsize{3pt}{3pt}\selectfont\bfseries,%
ls font=\fontsize{3pt}{3pt}\selectfont\bfseries,DiscY font=\fontsize{3pt}{3pt}\selectfont\bfseries,eDist font=\fontsize{3pt}{3pt}\selectfont\bfseries,%
R font=\fontsize{3pt}{3pt}\selectfont\bfseries,Rcov font=\fontsize{3pt}{3pt}\selectfont\bfseries,Rion font=\fontsize{3pt}{3pt}\selectfont\bfseries,%
Ei font=\fontsize{3pt}{3pt}\selectfont\bfseries,eneg font=\fontsize{3pt}{3pt}\selectfont\bfseries,eaff font=\fontsize{3pt}{3pt}\selectfont\bfseries,%
Tmelt font=\fontsize{3pt}{3pt}\selectfont\bfseries,TmeltC font=\fontsize{3pt}{3pt}\selectfont\bfseries,Tboil font=\fontsize{3pt}{3pt}\selectfont\bfseries,%
TboilC font=\fontsize{3pt}{3pt}\selectfont\bfseries,eConfign font=\fontsize{3pt}{3pt}\selectfont\bfseries,eConfignl font=\fontsize{3pt}{3pt}\selectfont\bfseries,%
Cp font=\fontsize{3pt}{3pt}\selectfont\bfseries,kT font=\fontsize{3pt}{3pt}\selectfont\bfseries,lsa font=\fontsize{3pt}{3pt}\selectfont\bfseries,%
lsb font=\fontsize{3pt}{3pt}\selectfont\bfseries,lsc font=\fontsize{3pt}{3pt}\selectfont\bfseries,lsca font=\fontsize{3pt}{3pt}\selectfont\bfseries,%
DiscC font=\fontsize{3pt}{3pt}\selectfont\bfseries,spectra font=\fontsize{3pt}{3pt}\selectfont\bfseries]%
\else\ifdim\@pgfPT@thesize=10.95pt\relax%
% fit to 11pt
\pgfPTstyle[cell width=19.5pt,cell height=22pt,label LaAc font=\tiny\itshape,title font=\normalsize\bfseries,legend acronyms font size=7pt,%
label font=\scriptsize\bfseries,blocks font=\scriptsize\bfseries,families font=\scriptsize\bfseries,varR font=\tiny\bfseries,varEi font=\tiny\bfseries,%
vareaff font=\tiny\bfseries,Z font=\fontsize{3.1pt}{3.1pt}\selectfont\bfseries,CS font=\scriptsize\bfseries,%
name font=\fontsize{3.1pt}{3.1pt}\selectfont,%
Ar font=\fontsize{3.1pt}{3.1pt}\selectfont\bfseries,O font=\fontsize{3.1pt}{3.1pt}\selectfont\bfseries,d font=\fontsize{3.1pt}{3.1pt}\selectfont\bfseries,%
ls font=\fontsize{3.1pt}{3.1pt}\selectfont\bfseries,DiscY font=\fontsize{3.1pt}{3.1pt}\selectfont\bfseries,eDist font=\fontsize{3.1pt}{3.1pt}\selectfont\bfseries,%
R font=\fontsize{3.1pt}{3.1pt}\selectfont\bfseries,Rcov font=\fontsize{3.1pt}{3.1pt}\selectfont\bfseries,Rion font=\fontsize{3.1pt}{3.1pt}\selectfont\bfseries,%
Ei font=\fontsize{3.1pt}{3.1pt}\selectfont\bfseries,eneg font=\fontsize{3.1pt}{3.1pt}\selectfont\bfseries,eaff font=\fontsize{3.1pt}{3.1pt}\selectfont\bfseries,%
Tmelt font=\fontsize{3.1pt}{3.1pt}\selectfont\bfseries,TmeltC font=\fontsize{3.1pt}{3.1pt}\selectfont\bfseries,Tboil font=\fontsize{3.1pt}{3.1pt}\selectfont\bfseries,%
TboilC font=\fontsize{3.1pt}{3.1pt}\selectfont\bfseries,eConfign font=\fontsize{3.1pt}{3.1pt}\selectfont\bfseries,eConfignl font=\fontsize{3.1pt}{3.1pt}\selectfont\bfseries,%
Cp font=\fontsize{3.1pt}{3.1pt}\selectfont\bfseries,kT font=\fontsize{3.1pt}{3.1pt}\selectfont\bfseries,lsa font=\fontsize{3.1pt}{3.1pt}\selectfont\bfseries,%
lsb font=\fontsize{3.1pt}{3.1pt}\selectfont\bfseries,lsc font=\fontsize{3.1pt}{3.1pt}\selectfont\bfseries,lsca font=\fontsize{3.1pt}{3.1pt}\selectfont\bfseries,%
DiscC font=\fontsize{3.1pt}{3.1pt}\selectfont\bfseries,spectra font=\fontsize{3.1pt}{3.1pt}\selectfont\bfseries]%
\else\ifdim\@pgfPT@thesize=12pt\relax%
% fit to 12pt
\pgfPTstyle[cell width=21.1pt,cell height=23.8pt,label LaAc font=\tiny\itshape,title font=\normalsize\bfseries,legend acronyms font size=8pt,%
label font=\scriptsize\bfseries,blocks font=\scriptsize\bfseries,families font=\scriptsize\bfseries,varR font=\tiny\bfseries,varEi font=\tiny\bfseries,%
vareaff font=\tiny\bfseries,Z font=\fontsize{3.3pt}{3.3pt}\selectfont\bfseries,CS font=\scriptsize\bfseries,%
name font=\fontsize{3.3pt}{3.3pt}\selectfont,%
Ar font=\fontsize{3.3pt}{3.3pt}\selectfont\bfseries,O font=\fontsize{3.3pt}{3.3pt}\selectfont\bfseries,d font=\fontsize{3.3pt}{3.3pt}\selectfont\bfseries,%
ls font=\fontsize{3.3pt}{3.3pt}\selectfont\bfseries,DiscY font=\fontsize{3.3pt}{3.3pt}\selectfont\bfseries,eDist font=\fontsize{3.3pt}{3.3pt}\selectfont\bfseries,%
R font=\fontsize{3.3pt}{3.3pt}\selectfont\bfseries,Rcov font=\fontsize{3.3pt}{3.3pt}\selectfont\bfseries,Rion font=\fontsize{3.3pt}{3.3pt}\selectfont\bfseries,%
Ei font=\fontsize{3.3pt}{3.3pt}\selectfont\bfseries,eneg font=\fontsize{3.3pt}{3.3pt}\selectfont\bfseries,eaff font=\fontsize{3.3pt}{3.3pt}\selectfont\bfseries,%
Tmelt font=\fontsize{3.3pt}{3.3pt}\selectfont\bfseries,TmeltC font=\fontsize{3.3pt}{3.3pt}\selectfont\bfseries,Tboil font=\fontsize{3.3pt}{3.3pt}\selectfont\bfseries,%
TboilC font=\fontsize{3.3pt}{3.3pt}\selectfont\bfseries,eConfign font=\fontsize{3.3pt}{3.3pt}\selectfont\bfseries,eConfignl font=\fontsize{3.3pt}{3.3pt}\selectfont\bfseries,%
Cp font=\fontsize{3.3pt}{3.3pt}\selectfont\bfseries,kT font=\fontsize{3.3pt}{3.3pt}\selectfont\bfseries,lsa font=\fontsize{3.3pt}{3.3pt}\selectfont\bfseries,%
lsb font=\fontsize{3.3pt}{3.3pt}\selectfont\bfseries,lsc font=\fontsize{3.3pt}{3.3pt}\selectfont\bfseries,lsca font=\fontsize{3.3pt}{3.3pt}\selectfont\bfseries,%
DiscC font=\fontsize{3.3pt}{3.3pt}\selectfont\bfseries,spectra font=\fontsize{3.3pt}{3.3pt}\selectfont\bfseries]%
\else\PackageWarning{pgfPT}{fittowidth: size '\@pgfPT@thesize' currently not supported. Nothing will be changed!}\relax\fi\fi\fi%
}% END \pgfPTfittowidth
%
%
% \pgfPTendfittowidth
% ---------------------------------------------------------------------------------------
% macro to restore the 'default' sizes in the Periodic Table
% ---------------------------------------------------------------------------------------
\def\pgfPTendfittowidth{\let\pgfPT@fitwidthtrue\undefined\relax%
% restore...
\let\pgfPTcellwd\@pgfPTcellwd%
\let\pgfPTcellht\@pgfPTcellht%
\let\pgfPTlabLaAcfont\@pgfPTlabLaAcfont%
\let\pgfPTtitlefont\@pgfPTtitlefont%
\let\pgfPTlegendacrofontsize\@pgfPTlegendacrofontsize%
\let\pgfPTlabfont\@pgfPTlabfont%
\let\pgfPTblocksfont\@pgfPTblocksfont%
\let\pgfPTfamiliesfont\@pgfPTfamiliesfont%
\let\pgfPTvarRfont\@pgfPTvarRfont%
\let\pgfPTvarEifont\@pgfPTvarEifont%
\let\pgfPTvareafffont\@pgfPTvareafffont%
\let\pgfPTZfont\@pgfPTZfont%
\let\pgfPTCSfont\@pgfPTCSfont%
\let\pgfPTnamefont\@pgfPTnamefont%
\let\pgfPTArfont\@pgfPTArfont%
\let\pgfPTOfont\@pgfPTOfont%
\let\pgfPTdfont\@pgfPTdfont%
\let\pgfPTlsfont\@pgfPTlsfont%
\let\pgfPTDiscYfont\@pgfPTDiscYfont%
\let\pgfPTeDistfont\@pgfPTeDistfont%
\let\pgfPTRfont\@pgfPTRfont%
\let\pgfPTRcovfont\@pgfPTRcovfont%
\let\pgfPTRionfont\@pgfPTRionfont%
\let\pgfPTEifont\@pgfPTEifont%
\let\pgfPTenegfont\@pgfPTenegfont%
\let\pgfPTeafffont\@pgfPTeafffont%
\let\pgfPTTmeltfont\@pgfPTTmeltfont%
\let\pgfPTTmeltCfont\@pgfPTTmeltCfont%
\let\pgfPTTboilfont\@pgfPTTboilfont%
\let\pgfPTTboilCfont\@pgfPTTboilCfont%
\let\pgfPTeConfignfont\@pgfPTeConfignfont%
\let\pgfPTeConfignlfont\@pgfPTeConfignlfont%
\let\pgfPTCpfont\@pgfPTCpfont%
\let\pgfPTkTfont\@pgfPTkTfont%
\let\pgfPTlsafont\@pgfPTlsafont%
\let\pgfPTlsbfont\@pgfPTlsbfont%
\let\pgfPTlscfont\@pgfPTlscfont%
\let\pgfPTlscafont\@pgfPTlscafont%
\let\pgfPTDiscCfont\@pgfPTDiscCfont%
\let\pgfPTspectrafont\@pgfPTspectrafont%
% «release memory»
\let\@pgfPTcellwd\undefined\relax%
\let\@pgfPTcellht\undefined\relax%
\let\@pgfPTlabLaAcfont\undefined\relax%
\let\@pgfPTtitlefont\undefined\relax%
\let\@pgfPTlegendacrofontsize\undefined\relax%
\let\@pgfPTlabfont\undefined\relax%
\let\@pgfPTblocksfont\undefined\relax%
\let\@pgfPTfamiliesfont\undefined\relax%
\let\@pgfPTvarRfont\undefined\relax%
\let\@pgfPTvarEifont\undefined\relax%
\let\@pgfPTvareafffont\undefined\relax%
\let\@pgfPTZfont\undefined\relax%
\let\@pgfPTCSfont\undefined\relax%
\let\@pgfPTnamefont\undefined\relax%
\let\@pgfPTArfont\undefined\relax%
\let\@pgfPTOfont\undefined\relax%
\let\@pgfPTdfont\undefined\relax%
\let\@pgfPTlsfont\undefined\relax%
\let\@pgfPTDiscYfont\undefined\relax%
\let\@pgfPTeDistfont\undefined\relax%
\let\@pgfPTRfont\undefined\relax%
\let\@pgfPTRcovfont\undefined\relax%
\let\@pgfPTRionfont\undefined\relax%
\let\@pgfPTEifont\undefined\relax%
\let\@pgfPTenegfont\undefined\relax%
\let\@pgfPTeafffont\undefined\relax%
\let\@pgfPTTmeltfont\undefined\relax%
\let\@pgfPTTmeltCfont\undefined\relax%
\let\@pgfPTTboilfont\undefined\relax%
\let\@pgfPTTboilCfont\undefined\relax%
\let\@pgfPTeConfignfont\undefined\relax%
\let\@pgfPTeConfignlfont\undefined\relax%
\let\@pgfPTCpfont\undefined\relax%
\let\@pgfPTkTfont\undefined\relax%
\let\@pgfPTlsafont\undefined\relax%
\let\@pgfPTlsbfont\undefined\relax%
\let\@pgfPTlscfont\undefined\relax%
\let\@pgfPTlscafont\undefined\relax%
\let\@pgfPTDiscCfont\undefined\relax%
\let\@pgfPTspectrafont\undefined\relax%
}% END \pgfPTendfittowidth
\makeatother%
\endinput
