| 1 |
\vfill% |
| 2 |
\subsection{Control overall width of table} |
| 3 |
\tikz{\node[text width=\linewidth-6mm,draw=green!70,rounded corners=2pt,fill=black!10!green!10,inner sep=3mm] {% |
| 4 |
Is there a simple way to set the periodic table to text width, column width, etc.? |
| 5 |
};}% |
| 6 |
\\ [6pt]Yes, there is. It can be done using the \textsf{\large\textbackslash resizebox} command provided by the graphicx package (and also by the graphics package). For example: |
| 7 |
\\ [2pt]\tikz{\node[text width=\linewidth-8pt,inner xsep=4pt,align=left,fill=black!10,rounded corners=2pt] % |
| 8 |
{\begin{minipage}{\linewidth}% |
| 9 |
\begin{verbatim} |
| 10 |
\resizebox{\linewidth}{!}{\pgfPT} |
| 11 |
\end{verbatim} |
| 12 |
\end{minipage}};}% |
| 13 |
\\ or |
| 14 |
\\ [2pt]\tikz{\node[text width=\linewidth-8pt,inner xsep=4pt,align=left,fill=black!10,rounded corners=2pt] % |
| 15 |
{\begin{minipage}{\linewidth}% |
| 16 |
\begin{verbatim} |
| 17 |
\resizebox{\linewidth}{!}{\pgfPT[show title=false]} |
| 18 |
\end{verbatim} |
| 19 |
\end{minipage}};}% |
| 20 |
\\ [2pt]will produce a Periodic Table with the width of the current \textsf{\large\textbackslash linewidth}, whatever is its value (the text width, the column width, the width of a minipage,\ldots), and with the proper scaling of its height. |
| 21 |
\\ There is no need of loading the graphicx package since pgf-PeriodicTable loads the tikz package, which in turn loads the graphicx package. |
| 22 |
\\ [2pt]\tikz{\path[draw=green!70,rounded corners=2pt,fill=black!10!green!10,rounded corners=2pt] (0,0) rectangle ++(\textwidth,-4.5pt);}% |
| 23 |
\subsection{Compact Periodic Table} |
| 24 |
\tikz{\node[text width=\linewidth-6mm,draw=green!70,rounded corners=2pt,fill=black!10!green!10,inner sep=3mm] {% |
| 25 |
Is there a way to put groups 1 and 2 really next to group 13 to 18? That would make the whole thing more compact. I sometimes need just the representative elements for teaching purposes. |
| 26 |
};}% |
| 27 |
\\ [6pt]Although it is not common usage, it can be done: |
| 28 |
\\ [2pt]\tikz{\node[text width=\linewidth-8pt,inner xsep=4pt,align=left,fill=black!10,rounded corners=2pt] % |
| 29 |
{\begin{minipage}{\linewidth}% |
| 30 |
\begin{verbatim} |
| 31 |
\documentclass[border=10pt]{standalone} |
| 32 |
\usepackage{pgf-PeriodicTable} |
| 33 |
\usepgfPTlibrary{colorschemes} |
| 34 |
\pgfPTGroupColors{example}{G1=blue!50!white,G2=green!90!white} |
| 35 |
\pgfPTsetLanguage{de} |
| 36 |
\begin{document} |
| 37 |
% \pgfPTstyle[show title=false, back color scheme=example,show legend=false] |
| 38 |
% \pgfPT[Z list = G1]\foreach \n in {2,13,14,15,16,17,18} {% |
| 39 |
% \pgfPT[show period numbers=false,Z list = G\n]% |
| 40 |
% }% make sure there are no spaces between \pgfPT |
| 41 |
% or |
| 42 |
% \pgfPTstyle[show title=false,show period numbers=false,back color scheme=example, |
| 43 |
% show legend=false] |
| 44 |
% \pgfPT[show period numbers,Z list = G1]\pgfPT[Z list = G2]\pgfPT[Z list = p]% make |
| 45 |
% sure there are no spaces between \pgfPT |
| 46 |
% or |
| 47 |
\pgfPTstyle[show title=false,show period numbers=false,back color scheme=example, |
| 48 |
show legend=false] |
| 49 |
\pgfPT[show period numbers,Z list = s]\pgfPT[Z list = p] |
| 50 |
\end{document} |
| 51 |
\end{verbatim} |
| 52 |
\end{minipage}};}% |
| 53 |
\newpage% |
| 54 |
\begin{center} |
| 55 |
\scalebox{.6}{\includegraphics{manualfiles/pgfPT_user_compactPT.pdf}} |
| 56 |
\end{center} |
| 57 |
\tikz{\path[draw=green!70,rounded corners=2pt,fill=black!10!green!10,rounded corners=2pt] (0,0) rectangle ++(\textwidth,-4.5pt);}% |
| 58 |
\endinput |