| 1 |
% arara: pdflatex: { action: nonstopmode } |
| 2 |
% arara: biber |
| 3 |
% arara: pdflatex: { action: nonstopmode } |
| 4 |
% arara: pdflatex: { action: nonstopmode } |
| 5 |
% -------------------------------------------------------------------------- |
| 6 |
% the ELEMENTS package |
| 7 |
% |
| 8 |
% retrieve different properties of chemical elements |
| 9 |
% |
| 10 |
% -------------------------------------------------------------------------- |
| 11 |
% Clemens Niederberger |
| 12 |
% Web: https://github.com/cgnieder/elemens |
| 13 |
% E-Mail: [email protected] |
| 14 |
% -------------------------------------------------------------------------- |
| 15 |
% Copyright 2011--2022 Clemens Niederberger |
| 16 |
% |
| 17 |
% This work may be distributed and/or modified under the |
| 18 |
% conditions of the LaTeX Project Public License, either version 1.3c |
| 19 |
% of this license or (at your option) any later version. |
| 20 |
% The latest version of this license is in |
| 21 |
% http://www.latex-project.org/lppl.txt |
| 22 |
% and version 1.3c or later is part of all distributions of LaTeX |
| 23 |
% version 2008/05/04 or later. |
| 24 |
% |
| 25 |
% This work has the LPPL maintenance status `maintained'. |
| 26 |
% |
| 27 |
% The Current Maintainer of this work is Clemens Niederberger. |
| 28 |
% -------------------------------------------------------------------------- |
| 29 |
% If you have any ideas, questions, suggestions or bugs to report, please |
| 30 |
% feel free to contact me. |
| 31 |
% -------------------------------------------------------------------------- |
| 32 |
\documentclass[load-preamble+]{cnltx-doc} |
| 33 |
\usepackage{elements} |
| 34 |
|
| 35 |
\setcnltx{ |
| 36 |
package = elements , |
| 37 |
authors = Clemens Niederberger , |
| 38 |
email = [email protected] , |
| 39 |
url = https://github.com/cgnieder/elements , |
| 40 |
add-cmds = { |
| 41 |
atomicnumber, |
| 42 |
DeclareAtomIsotopes, |
| 43 |
DeclareAtomName, |
| 44 |
DeclareAtomSymbol, |
| 45 |
DeclareElectronDistribution, |
| 46 |
elconf, |
| 47 |
elementname, |
| 48 |
elementsymbol, |
| 49 |
mainelementisotope, |
| 50 |
printangularmomentum, |
| 51 |
saveatomicnumber, |
| 52 |
saveelementisotopes, |
| 53 |
saveelementname, |
| 54 |
saveelementsymbol, |
| 55 |
savemainelementisotope, |
| 56 |
setangularmomentum, |
| 57 |
setatomisotopes, |
| 58 |
setatomname, |
| 59 |
setatomsymbol, |
| 60 |
setelectrondistribution, |
| 61 |
writeelconf, |
| 62 |
Z |
| 63 |
} , |
| 64 |
add-silent-cmds = { |
| 65 |
endhead, foo, ifnumless, LTleft, LTright, midrule, theelement, toprule, |
| 66 |
whileboolexpr |
| 67 |
} , |
| 68 |
add-silent-envs = { longtable, landscape } , |
| 69 |
abstract = {% |
| 70 |
This package provides means for retrieving properties of chemical elements |
| 71 |
like atomic number, element symbol, element name, electron distribution or |
| 72 |
isotope number. Properties are defined for the elements up to the atomic |
| 73 |
number~118. |
| 74 |
|
| 75 |
This package is a spin-off of the package \pkg{bohr}~\cite{pkg:bohr} by |
| 76 |
the same author. |
| 77 |
} , |
| 78 |
index-setup = { |
| 79 |
othercode = \footnotesize , |
| 80 |
level = \addsec , |
| 81 |
noclearpage |
| 82 |
} , |
| 83 |
makeindex-setup = { |
| 84 |
columns = 3 , |
| 85 |
columnsep = 1em |
| 86 |
} |
| 87 |
} |
| 88 |
|
| 89 |
\makeatletter |
| 90 |
\def\libertine@figurestyle{LF} |
| 91 |
\RequirePackage{amsmath} |
| 92 |
\undef\lvert \undef\lVert |
| 93 |
\undef\rvert \undef\rVert |
| 94 |
\RequirePackage[libertine]{newtxmath} |
| 95 |
\def\libertine@figurestyle{OsF} |
| 96 |
\makeatother |
| 97 |
|
| 98 |
\usepackage{array,booktabs,longtable} |
| 99 |
\usepackage{lscape} |
| 100 |
|
| 101 |
\defbibheading{bibliography}{\addsec{References}} |
| 102 |
|
| 103 |
\begin{document} |
| 104 |
|
| 105 |
\section{Licence and Requirements} |
| 106 |
\license |
| 107 |
|
| 108 |
\elements\ loads the packages \pkg{etoolbox}~\cite{pkg:etoolbox} and |
| 109 |
\pkg{translations}~\cite{pkg:translations}. |
| 110 |
|
| 111 |
\section{Element Names} |
| 112 |
|
| 113 |
\begin{commands} |
| 114 |
\command{elementname}[\Marg{\meta{atomic number}|\meta{element symbol}}] |
| 115 |
Prints the element name of a given element as defined with \cs{setatomname}. |
| 116 |
\command{setatomname}[\oarg{alt.\@ name}\marg{atomic number}\marg{element |
| 117 |
name}] |
| 118 |
Define or redefine the name of an element. If \meta{element name} |
| 119 |
contains non-ascii symbols the optional argument \meta{alt.\@ name} must |
| 120 |
be given. In this case \meta{alt.\@ name} must be used in \elements' |
| 121 |
other macros where an element's name can be given as argument. |
| 122 |
\command{DeclareAtomName}[\oarg{alt.\@ name}\marg{atomic |
| 123 |
number}\marg{element name}] |
| 124 |
This is the same as \cs{setatomname} but used before begin document or in |
| 125 |
packages/classes. |
| 126 |
\command{saveelementname}[\marg{cs}\Marg{\meta{atomic number}|\meta{element |
| 127 |
symbol}|\meta{element name}}] |
| 128 |
Saves the name of the given element as replacement text for the macro |
| 129 |
\meta{cs}. |
| 130 |
\end{commands} |
| 131 |
|
| 132 |
\begin{example}[side-by-side] |
| 133 |
\elementname{Cu} \par |
| 134 |
\elementname{11} \par |
| 135 |
\saveelementname\foo{28} |
| 136 |
\ttfamily\meaning\foo |
| 137 |
\end{example} |
| 138 |
|
| 139 |
\section{Element Symbols} |
| 140 |
|
| 141 |
\begin{commands} |
| 142 |
\command{elementsymbol}[\Marg{\meta{atomic number}|\meta{element name}}] |
| 143 |
Prints the element symbol of a given element as defined with \cs{setatomsymbol}. |
| 144 |
\command{setatomsymbol}[\marg{atomic number}\marg{element symbol}] |
| 145 |
Define or redefine the symbol of an element. |
| 146 |
\command{DeclareAtomSymbol}[\marg{atomic number}\marg{element symbol}] |
| 147 |
This is the same as \cs{setatomsymbol} but used before begin document or in |
| 148 |
packages/classes. |
| 149 |
\command{saveelementsymbol}[\marg{cs}\Marg{\meta{atomic number}|\meta{element |
| 150 |
symbol}|\meta{element name}}] |
| 151 |
Saves the symbol of the given element as replacement text for the macro |
| 152 |
\meta{cs}. |
| 153 |
\end{commands} |
| 154 |
|
| 155 |
\begin{example}[side-by-side] |
| 156 |
\elementsymbol{13} \par |
| 157 |
\elementsymbol{Sulfur} \par |
| 158 |
\saveelementsymbol\foo{83} |
| 159 |
\ttfamily\meaning\foo |
| 160 |
\end{example} |
| 161 |
|
| 162 |
\section{Atomic Numbers} |
| 163 |
|
| 164 |
\begin{commands} |
| 165 |
\command{atomicnumber}[\Marg{\meta{element symbol}|\meta{element name}}] |
| 166 |
Prints the atomic number of a given element. |
| 167 |
\command{Z}[\Marg{\meta{element symbol}|\meta{element name}}] |
| 168 |
An alias of \cs{atomicnumber} but only defined at begin document and only |
| 169 |
if it isn't defined already. |
| 170 |
\command{saveatomicnumber}[\marg{cs}\Marg{\meta{atomic number}|\meta{element |
| 171 |
symbol}|\meta{element name}}] |
| 172 |
Saves the atomic number of the given element as replacement text for the |
| 173 |
macro \meta{cs}. |
| 174 |
\end{commands} |
| 175 |
|
| 176 |
\begin{example}[side-by-side] |
| 177 |
\atomicnumber{U} \par |
| 178 |
\atomicnumber{Chlorine} \par |
| 179 |
\saveatomicnumber\foo{Kr} |
| 180 |
\ttfamily\meaning\foo |
| 181 |
\end{example} |
| 182 |
|
| 183 |
\section{Electron Configuration} |
| 184 |
|
| 185 |
\begin{commands} |
| 186 |
\command{elconf}[\Marg{\meta{atomic number}|\meta{element |
| 187 |
symbol}|\meta{element name}}] |
| 188 |
Typesets the electron configuration of the given element. |
| 189 |
\command{writeelconf}[\marg{electron distribution}] |
| 190 |
Typesets the electron distribution \meta{electron distribution}. The |
| 191 |
input is the same as described below for \cs{setelectrondistribution}. |
| 192 |
\command{setelectrondistribution}[\marg{atomic number}\marg{electron distribution}] |
| 193 |
This set the electron distribution associated with the atom number |
| 194 |
\meta{atomic number}. \meta{electron distribution} is a comma-separated |
| 195 |
list of the number of electrons placed on each shell from inner to outer |
| 196 |
shell. For example \verbcode+\setelectrondistribution{3}{2,0,1}+ would |
| 197 |
be an excited \elementname{3}. The number of electrons with the same |
| 198 |
principal quantum number but a different angular quantum number are |
| 199 |
separated with a \code{+} ordered by the angular quantum number, \ie, |
| 200 |
first \emph{s}, then \emph{p}, then \emph{d}, and then \emph{f} . |
| 201 |
\elementname{29}’s distribution would be declared like this: \\ |
| 202 |
\verbcode!\setelectrondistribution{29}{2,2+6,2+6+10,1}!. \\ |
| 203 |
A declaration with \verbcode!\setelectrondistribution{29}{2,8,18,1}! |
| 204 |
would work but then \verbcode!\elconf{29}! would give the wrong results. |
| 205 |
\command{DeclareElectronDistribution} |
| 206 |
This is the same as \cs{setelectrondistribution} but used before begin |
| 207 |
document or in packages/classes. |
| 208 |
\command{printangularmomentum}[\marg{angular momentum}] |
| 209 |
\sinceversion{0.1e}This command is used be \cs{elconf} and |
| 210 |
\cs{writeelconf} for typesetting $\printangularmomentum{s}$, |
| 211 |
$\printangularmomentum{p}$, $\printangularmomentum{d}$, \ldots{} You can |
| 212 |
redefine it if you want to change how those functions are typeset (keeping |
| 213 |
in mind that it will be used in \emph{math mode}). The initial definition |
| 214 |
is:\par |
| 215 |
\verbcode+\newcommand*\printangularmomentum[1]{\mathrm{#1}}+ |
| 216 |
\end{commands} |
| 217 |
|
| 218 |
\begin{example}[side-by-side] |
| 219 |
\writeelconf{2,2+6,2+6+7} \par |
| 220 |
\elconf{Cl} |
| 221 |
\end{example} |
| 222 |
|
| 223 |
There is currently \emph{no way} to get the electron configuration in the |
| 224 |
shortened way (\eg: |
| 225 |
[Ar]$\printangularmomentum{d}^{10}4\printangularmomentum{s}^1$). |
| 226 |
|
| 227 |
\section{Isotope Lists} |
| 228 |
|
| 229 |
\begin{commands} |
| 230 |
\command{setatomisotopes}[\marg{atomic number}\marg{isotope list}] |
| 231 |
Defines or redefines the isotope list for a given element. \meta{isotope |
| 232 |
list} should be a comma seperated list of integers. One of the integers |
| 233 |
may be preceded with a \code{!} to mark the main isotope for the given |
| 234 |
element: \verbcode+\setatomisotopes{6}{10,11,!12,13,14,15,16}+ |
| 235 |
\command{DeclareAtomIsotopes}[\marg{atomic number}\marg{isotope list}] |
| 236 |
This is the same as \cs{setatomisotopes} but used before begin document or |
| 237 |
in packages/classes. |
| 238 |
\command{saveelementisotopes}[\marg{cs}\Marg{\meta{atomic number}|\meta{element |
| 239 |
symbol}|\meta{element name}}] |
| 240 |
Saves the isotope list of the given element as replacement text for the |
| 241 |
macro \meta{cs}. |
| 242 |
\command{savemainelementisotope}[\marg{cs}\Marg{\meta{atomic number}|\meta{element |
| 243 |
symbol}|\meta{element name}}] |
| 244 |
Saves the main isotope of the given element as replacement text for the |
| 245 |
macro \meta{cs}. If the isotope list of the element contains no main |
| 246 |
isotope \meta{cs} will be equivalent to \cs*{@empty}. |
| 247 |
\command{mainelementisotope}[\Marg{\meta{atomic number}|\meta{element |
| 248 |
symbol}|\meta{element name}}] |
| 249 |
Print\sinceversion{0.1d} the main isotope of the given element. If the |
| 250 |
isotope list of the element contains no main isotope nothing will be |
| 251 |
printed. |
| 252 |
\end{commands} |
| 253 |
|
| 254 |
\begin{example}[side-by-side] |
| 255 |
\ttfamily |
| 256 |
\saveelementisotopes\foo{C} |
| 257 |
\meaning\foo\par |
| 258 |
\savemainelementisotope\foo{C} |
| 259 |
\meaning\foo\par |
| 260 |
\normalfont |
| 261 |
\mainelementisotope{C} |
| 262 |
\end{example} |
| 263 |
|
| 264 |
\clearpage |
| 265 |
|
| 266 |
\section{Supported Languages} |
| 267 |
Currently the following languages are supported: |
| 268 |
\begin{itemize} |
| 269 |
\item English |
| 270 |
\item German |
| 271 |
\item French |
| 272 |
\item \sinceversion{0.2}Spanish |
| 273 |
\item \sinceversion{0.3}Portuguese and Brazilian Portuguese |
| 274 |
\end{itemize} |
| 275 |
|
| 276 |
\addsec{Element Properties} |
| 277 |
|
| 278 |
On the following pages a table containing the properties known to \elements\ |
| 279 |
is printed. For those interested: the code used to get the table is as follows |
| 280 |
(using the packages \pkg{lscape}~\cite{pkg:lscape}, |
| 281 |
\pkg{longtable}~\cite{pkg:longtable} and \pkg{booktabs}~\cite{pkg:booktabs}). |
| 282 |
|
| 283 |
\begin{sourcecode}[gobble=0] |
| 284 |
\setlength\LTleft\fill |
| 285 |
\setlength\LTright\fill |
| 286 |
\newcounter{element} |
| 287 |
\setcounter{element}{1} |
| 288 |
\begin{landscape} |
| 289 |
\begin{longtable}{lllll} |
| 290 |
\toprule |
| 291 |
Number & Symbol & Name & Main Isotope & Electron Configuration \\ |
| 292 |
\midrule |
| 293 |
\endhead |
| 294 |
\whileboolexpr{test{\ifnumless{\value{element}}{119}}} |
| 295 |
{ |
| 296 |
\theelement & |
| 297 |
\elementsymbol{\arabic{element}} & |
| 298 |
\elementname{\arabic{element}} & |
| 299 |
\mainelementisotope{\arabic{element}} & |
| 300 |
\elconf{\arabic{element}} |
| 301 |
\stepcounter{element} \\ |
| 302 |
} |
| 303 |
{} |
| 304 |
\end{longtable} |
| 305 |
\end{landscape} |
| 306 |
\end{sourcecode} |
| 307 |
|
| 308 |
\setlength\LTleft\fill |
| 309 |
\setlength\LTright\fill |
| 310 |
\newcounter{element} |
| 311 |
\setcounter{element}{1} |
| 312 |
\begin{landscape} |
| 313 |
\begin{longtable}{lllll} |
| 314 |
\toprule |
| 315 |
Number & Symbol & Name & Main Isotope & Electron Configuration \\ |
| 316 |
\midrule |
| 317 |
\endhead |
| 318 |
\whileboolexpr{test{\ifnumless{\value{element}}{119}}} |
| 319 |
{ |
| 320 |
\theelement & |
| 321 |
\elementsymbol{\arabic{element}} & |
| 322 |
\elementname{\arabic{element}} & |
| 323 |
\mainelementisotope{\arabic{element}} & |
| 324 |
\elconf{\arabic{element}} |
| 325 |
\stepcounter{element} \\ |
| 326 |
} |
| 327 |
{} |
| 328 |
\end{longtable} |
| 329 |
\end{landscape} |
| 330 |
|
| 331 |
\end{document} |