summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/bohr
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2019-09-02 13:46:59 +0900
committerNorbert Preining <norbert@preining.info>2019-09-02 13:46:59 +0900
commite0c6872cf40896c7be36b11dcc744620f10adf1d (patch)
tree60335e10d2f4354b0674ec22d7b53f0f8abee672 /macros/latex/contrib/bohr
Initial commit
Diffstat (limited to 'macros/latex/contrib/bohr')
-rw-r--r--macros/latex/contrib/bohr/README33
-rw-r--r--macros/latex/contrib/bohr/bohr.sty410
-rw-r--r--macros/latex/contrib/bohr/bohr_en.pdfbin0 -> 421323 bytes
-rw-r--r--macros/latex/contrib/bohr/bohr_en.tex223
4 files changed, 666 insertions, 0 deletions
diff --git a/macros/latex/contrib/bohr/README b/macros/latex/contrib/bohr/README
new file mode 100644
index 0000000000..f3390cadd3
--- /dev/null
+++ b/macros/latex/contrib/bohr/README
@@ -0,0 +1,33 @@
+--------------------------------------------------------------------------
+the BOHR package v1.0
+
+ simple atom representation according to the Bohr model
+
+2015/06/24
+--------------------------------------------------------------------------
+Clemens Niederberger
+Web: https://bitbucket.org/cgnieder/bohr/
+E-Mail: contact@mychemistry.eu
+--------------------------------------------------------------------------
+Copyright 2012-2015 Clemens Niederberger
+
+This work may be distributed and/or modified under the
+conditions of the LaTeX Project Public License, either version 1.3
+of this license or (at your option) any later version.
+The latest version of this license is in
+ http://www.latex-project.org/lppl.txt
+and version 1.3 or later is part of all distributions of LaTeX
+version 2005/12/01 or later.
+
+This work has the LPPL maintenance status `maintained'.
+
+The Current Maintainer of this work is Clemens Niederberger.
+--------------------------------------------------------------------------
+The bohr package consists of the files
+ - bohr.sty
+ - bohr_en.tex, bohr_en.pdf
+ - README
+--------------------------------------------------------------------------
+If you have any ideas, questions, suggestions or bugs to report, please
+feel free to contact me.
+--------------------------------------------------------------------------
diff --git a/macros/latex/contrib/bohr/bohr.sty b/macros/latex/contrib/bohr/bohr.sty
new file mode 100644
index 0000000000..a0ddc2565a
--- /dev/null
+++ b/macros/latex/contrib/bohr/bohr.sty
@@ -0,0 +1,410 @@
+% --------------------------------------------------------------------------
+% the BOHR package
+%
+% simple atom representation according to the Bohr model
+%
+% --------------------------------------------------------------------------
+% Clemens Niederberger
+% Web: https://bitbucket.org/cgnieder/bohr/
+% E-Mail: contact@mychemistry.eu
+% --------------------------------------------------------------------------
+% Copyright 2012-2015 Clemens Niederberger
+%
+% This work may be distributed and/or modified under the
+% conditions of the LaTeX Project Public License, either version 1.3
+% of this license or (at your option) any later version.
+% The latest version of this license is in
+% http://www.latex-project.org/lppl.txt
+% and version 1.3 or later is part of all distributions of LaTeX
+% version 2005/12/01 or later.
+%
+% This work has the LPPL maintenance status `maintained'.
+%
+% The Current Maintainer of this work is Clemens Niederberger.
+% --------------------------------------------------------------------------
+% If you have any ideas, questions, suggestions or bugs to report, please
+% feel free to contact me.
+% --------------------------------------------------------------------------
+\newcommand*\@bohr@date{2015/06/24}
+\newcommand*\@bohr@version{v1.0}
+\newcommand*\@bohr@description{simple atom representation according to the Bohr model}
+
+\ProvidesPackage{bohr}[\@bohr@date\space \@bohr@version\space \@bohr@description]
+\RequirePackage{tikz,pgfopts,elements}
+
+% --------------------------------------------------------------------------
+% message handling
+\newcommand*\@bohr@error@message{%
+ For details have a look at the `bohr' manual.%
+}
+
+\newrobustcmd*\@bohr@error[1]{\PackageError{bohr}{#1}{#1 \@bohr@error@message}}
+\newrobustcmd*\@bohr@warning[1]{\PackageWarning{bohr}{#1}}
+\newrobustcmd*\@bohr@warningnoline[1]{\PackageWarningNoLine{bohr}{#1}}
+\newrobustcmd*\@bohr@info[1]{\PackageInfo{bohr}{#1}}
+
+\newrobustcmd*\@bohr@expand@arg[2]{%
+ \edef\@bohr@tmpa{{#2}}%
+ \expandafter#1\@bohr@tmpa
+}
+
+\newrobustcmd*\@bohr@expand@second@arg[3]{%
+ \edef\@bohr@tmpa{{#3}}%
+ \def\@bohr@tmpb{{#2}}%
+ \expandafter\expandafter\expandafter#1\expandafter\@bohr@tmpb\@bohr@tmpa
+}
+
+% --------------------------------------------------------------------------
+% options
+\newcommand*\@bohr@name@options{}
+\newcommand*\@bohr@write@atom[1]{#1}
+\newcommand*\@bohr@nucleus@radius{1em}
+\newcommand*\@bohr@electron@options{blue!50!black!50}
+\newcommand*\@bohr@electron@radius{1.5pt}
+\newcommand*\@bohr@shell@dist{1em}
+\newcommand*\@bohr@nucleus@options{draw=black!80,fill=black!10,opacity=.25}
+\newcommand*\@bohr@shell@options{draw=blue!75,thin}
+
+\newbool{bohr@insert@symbol}
+\newbool{bohr@insert@number}
+
+\newcommand*\@bohr@insert@symbol[2]{%
+ \ifbool{bohr@insert@symbol}
+ {%
+ \ifblank{#2}
+ {\@elements@get@atom@symbol{#1}}
+ {\@bohr@write@atom{#2}}%
+ }
+ {\@bohr@write@atom{#2}}%
+}
+
+\newcommand\@bohr@add@options@to[2]{%
+ \edef#1{\expandonce#1,\unexpanded{#2}}%
+}
+
+\newcommand*\@bohr@option@deprecated[2]{%
+ \@bohr@warning{option `#1' has deprecated, use `#2' instead}%
+}
+
+\pgfkeys{
+ bohr/.cd,
+ insert-symbol/.is if = bohr@insert@symbol ,
+ insert-number/.is if = bohr@insert@number ,
+ insert-missing/.is choice,
+ insert-missing/true/.code =
+ \booltrue{bohr@insert@symbol}\booltrue{bohr@insert@number} ,
+ insert-missing/false/.code =
+ \boolfalse{bohr@insert@symbol}\boolfalse{bohr@insert@number} ,
+ insert-missing/.default = true ,
+ atom-style/.code = \def\@bohr@write@atom{#1} ,
+ name-options-set/.code = \def\@bohr@name@options{#1} ,
+ name-options-add/.code =
+ \@bohr@add@options@to\@bohr@name@options{#1} ,
+ nucleus-radius/.code = \def\@bohr@nucleus@radius{#1} ,
+ nucleus-options-set/.code = \def\@bohr@nucleus@options{#1} ,
+ nucleus-options-add/.code =
+ \@bohr@add@options@to\@bohr@nucleus@options{#1} ,
+ electron-radius/.code = \def\@bohr@electron@radius{#1} ,
+ electron-options-set/.code = \def\@bohr@electron@options{#1} ,
+ electron-options-add/.code =
+ \@bohr@add@options@to\@bohr@electron@options{#1} ,
+ shell-dist/.code = \def\@bohr@shell@dist{#1} ,
+ shell-options-set/.code = \def\@bohr@shell@options{#1} ,
+ shell-options-add/.code =
+ \@bohr@add@options@to\@bohr@shell@options{#1} ,
+ german/.code = \def\@bohr@language{german} ,
+ ngerman/.code = \def\@bohr@language{german} ,
+ french/.code = \def\@bohr@language{french} ,
+ frenchb/.code = \def\@bohr@language{french} ,
+ language/.code = \def\@bohr@language{#1} ,
+ distribution-method/.is choice ,
+ distribution-method/periodic/.code =
+ \def\@bohr@draw@electrons{\@bohr@draw@electrons@periodic}
+ \def\@bohr@get@shell@num{\@bohr@get@shell@num@periodic} ,
+ distribution-method/quantum/.code =
+ \def\@bohr@draw@electrons{\@bohr@draw@electrons@quantum}
+ \def\@bohr@get@shell@num{\@bohr@get@shell@num@quantum}
+}
+
+\newrobustcmd\setbohr[1]{\pgfqkeys{/bohr}{#1}}
+
+\setbohr{distribution-method=quantum}
+
+\ProcessPgfOptions*
+
+% --------------------------------------------------------------------------
+% the \bohr command
+% optional #1: number of shells
+% #2: number of electrons
+% #3: atom name
+\newrobustcmd*\bohr[3][]{\@bohr{#1}{#2}{#3}}
+
+\newcommand*\@bohr[3]{%
+ \ifblank{#2}% electron number given ?
+ {% no
+ \ifboolexpr{ bool {bohr@insert@number} and test {\ifblank{#3}} }
+ {%
+ \@bohr@error{I can't insert the electron number. You haven't
+ specified the element.}%
+ }{%
+ \ifboolexpr
+ {
+ bool {bohr@insert@number} and not
+ test {\lowercase{\ifcsvoid{@elements@atom@number@#3}}}
+ }
+ {%
+ \lowercase{%
+ \def\@bohr@electron@current@number{\csuse{@elements@atom@number@#3}}}%
+ }{%
+ \@bohr@error{You must specify an electron number, possibly 0.}%
+ }%
+ }%
+ }{% yes
+ \ifnum#2<0\relax
+ \@bohr@error{The electron number cannot be negative!}%
+ \else
+ \ifnum#2>112\relax
+ \@bohr@warning{I only know atoms up to 112 (Copernicium). You
+ gave me #2 so I am using 112 instead.}
+ \def\@bohr@electron@current@number{112}%
+ \else
+ \def\@bohr@electron@current@number{#2}%
+ \fi
+ \fi
+ }%
+ \ifblank{#1}
+ {\@bohr@get@shell@num{\@bohr@electron@current@number}}
+ {
+ \@bohr@get@shell@num{\@bohr@electron@current@number}%
+ \ifnum#1<\@bohr@shell@num
+ \@bohr@warning{The shell number you provided (#1) is too small for the
+ electron number you provided (\@bohr@electron@current@number)! I'll
+ use \@bohr@shell@num\space shells.}%
+ \else
+ \ifnum#1>7\relax
+ \@bohr@warning{I know only of 7 electron shells. You gave me #1 so I'll
+ be using 7 instead.}
+ \def\@bohr@shell@num{7}%
+ \else
+ \def\@bohr@shell@num{#1}%
+ \fi
+ \fi
+ }%
+ \tikzpicture[baseline=(nucleus.base)]
+ \expandafter\node\expandafter[\@bohr@name@options]
+ (nucleus) at (0,0) {\@bohr@insert@symbol{\@bohr@electron@current@number}{#3}} ;
+ \expandafter\draw\expandafter[\@bohr@nucleus@options]
+ (nucleus) circle (\@bohr@nucleus@radius) ;
+ \foreach\@bohr@current@shell@num in {1,...,\@bohr@shell@num}
+ {
+ \expandafter\draw\expandafter[\@bohr@shell@options]
+ (nucleus) circle (\@bohr@nucleus@radius+\@bohr@current@shell@num*\@bohr@shell@dist) ;
+ }
+ \@bohr@draw@electrons{\@bohr@electron@current@number}
+ \endtikzpicture
+}
+
+\newcommand*\@bohr@get@shell@num@periodic[1]{%
+ \ifnum#1<3\relax
+ \def\@bohr@shell@num{1}%
+ \else
+ \ifnum#1<11\relax
+ \def\@bohr@shell@num{2}%
+ \else
+ \ifnum#1<19\relax
+ \def\@bohr@shell@num{3}%
+ \else
+ \ifnum#1<37\relax
+ \def\@bohr@shell@num{4}%
+ \else
+ \ifnum#1<55\relax
+ \def\@bohr@shell@num{5}%
+ \else
+ \ifnum#1<87\relax
+ \def\@bohr@shell@num{6}%
+ \else
+ \def\@bohr@shell@num{7}%
+ \fi
+ \fi
+ \fi
+ \fi
+ \fi
+ \fi
+}
+
+\newrobustcmd*\@bohr@distribute@electrons[4]{%
+ \pgfmathparse{int(#2)}%
+ \let\@bohr@last@electron\pgfmathresult
+ \ifnum\@bohr@last@electron=0\relax
+ \else
+ \foreach\@bohr@electron@number in {#1,...,\@bohr@last@electron}
+ {
+ \expandafter\fill\expandafter[\@bohr@electron@options] (nucleus)
+ ++(#3*\@bohr@electron@number-#3:\@bohr@nucleus@radius+#4*\@bohr@shell@dist)
+ circle (\@bohr@electron@radius) ;
+ }
+ \fi
+}
+
+% the simple model according to periods:
+\newcommand*\@bohr@draw@electrons@periodic[1]{%
+ \ifnum#1<1\relax\else
+ \ifnum#1<3\relax
+ \@bohr@distribute@electrons{1}{#1}{180}{1}%
+ \else
+ \ifnum#1<11\relax
+ \@bohr@distribute@electrons{1}{2}{180}{1}%
+ \@bohr@distribute@electrons{1}{#1-2}{45}{2}%
+ \else
+ \ifnum#1<19\relax
+ \@bohr@distribute@electrons{1}{2}{180}{1}%
+ \@bohr@distribute@electrons{1}{8}{45}{2}%
+ \@bohr@distribute@electrons{1}{#1-10}{45}{3}%
+ \else
+ \ifnum#1<37\relax
+ \@bohr@distribute@electrons{1}{2}{180}{1}%
+ \@bohr@distribute@electrons{1}{8}{45}{2}%
+ \@bohr@distribute@electrons{1}{8}{45}{3}%
+ \@bohr@distribute@electrons{1}{#1-18}{20}{4}%
+ \else
+ \ifnum#1<55\relax
+ \@bohr@distribute@electrons{1}{2}{180}{1}%
+ \@bohr@distribute@electrons{1}{8}{45}{2}%
+ \@bohr@distribute@electrons{1}{8}{45}{3}%
+ \@bohr@distribute@electrons{1}{18}{20}{4}%
+ \@bohr@distribute@electrons{1}{#1-36}{20}{5}%
+ \else
+ \ifnum#1<87\relax
+ \@bohr@distribute@electrons{1}{2}{180}{1}%
+ \@bohr@distribute@electrons{1}{8}{45}{2}%
+ \@bohr@distribute@electrons{1}{8}{45}{3}%
+ \@bohr@distribute@electrons{1}{18}{20}{4}%
+ \@bohr@distribute@electrons{1}{18}{20}{5}%
+ \@bohr@distribute@electrons{1}{#1-54}{11.25}{6}%
+ \else
+ \@bohr@distribute@electrons{1}{2}{180}{1}%
+ \@bohr@distribute@electrons{1}{8}{45}{2}%
+ \@bohr@distribute@electrons{1}{8}{45}{3}%
+ \@bohr@distribute@electrons{1}{18}{20}{4}%
+ \@bohr@distribute@electrons{1}{18}{20}{5}%
+ \@bohr@distribute@electrons{1}{32}{11.25}{6}%
+ \ifnum#1<113\relax
+ \@bohr@distribute@electrons{1}{#1-86}{11.25}{7}%
+ \else
+ \@bohr@distribute@electrons{1}{26}{11.25}{7}%
+ \@bohr@warning{%
+ I only know atoms up to 112 (Copernicium). You gave me
+ #1 so I am using 112 instead.%
+ }%
+ \fi
+ \fi
+ \fi
+ \fi
+ \fi
+ \fi
+ \fi
+ \fi
+}
+
+% --------------------------------------------------------------------------
+% electron distribution per electron number
+\newcounter{@bohr@shell@number}
+
+\newrobustcmd*\@bohr@get@shell@num@quantum[1]{%
+ \setcounter{@bohr@shell@number}{0}%
+ \@bohr@expand@second@arg\forcsvlist
+ {\stepcounter{@bohr@shell@number}\@gobble}
+ {\csuse{@elements@electron@distribution@\romannumeral#1}}%
+ \edef\@bohr@shell@num{\arabic{@bohr@shell@number}}%
+}
+
+\newrobustcmd*\@bohr@draw@electrons@quantum[1]{%
+ \@bohr@expand@arg\@bohr@get@shell@electrons
+ {\csuse{@elements@electron@distribution@\romannumeral#1}}%
+}
+
+\newrobustcmd*\@bohr@get@shell@electrons[1]{%
+ \setcounter{@bohr@shell@number}{0}%
+ \forcsvlist{\@bohr@draw@shell@electrons}{#1}%
+}
+
+\newrobustcmd*\@bohr@draw@shell@electrons[1]{%
+ \stepcounter{@bohr@shell@number}%
+ \ifnum\value{@bohr@shell@number}=1\relax % n=1
+ \@bohr@distribute@electrons{1}{#1}{180}{1}%
+ \fi
+ \ifnum\value{@bohr@shell@number}=2\relax % n=2
+ \@bohr@distribute@electrons{1}{#1}{45}{2}%
+ \fi
+ \ifnum\value{@bohr@shell@number}=3\relax % n=3
+ \ifnum\numexpr#1\relax<9\relax
+ \@bohr@distribute@electrons{1}{#1}{45}{3}%
+ \else
+ \@bohr@distribute@electrons{1}{#1}{20}{3}%
+ \fi
+ \fi
+ \ifnum\value{@bohr@shell@number}=4\relax % n=4
+ \ifnum\numexpr#1\relax<9\relax
+ \@bohr@distribute@electrons{1}{#1}{45}{4}%
+ \else
+ \ifnum\numexpr#1\relax<18\relax
+ \@bohr@distribute@electrons{1}{#1}{20}{4}%
+ \else
+ \@bohr@distribute@electrons{1}{#1}{11.25}{4}%
+ \fi
+ \fi
+ \fi
+ \ifnum\value{@bohr@shell@number}=5\relax % n=5
+ \ifnum\numexpr#1\relax<9\relax
+ \@bohr@distribute@electrons{1}{#1}{45}{5}%
+ \else
+ \ifnum\numexpr#1\relax<18\relax
+ \@bohr@distribute@electrons{1}{#1}{20}{5}%
+ \else
+ \@bohr@distribute@electrons{1}{#1}{11.25}{5}%
+ \fi
+ \fi
+ \fi
+ \ifnum\value{@bohr@shell@number}=6\relax % n=6
+ \ifnum\numexpr#1\relax<9\relax
+ \@bohr@distribute@electrons{1}{#1}{45}{6}%
+ \else
+ \ifnum\numexpr#1\relax<18\relax
+ \@bohr@distribute@electrons{1}{#1}{20}{6}%
+ \else
+ \@bohr@distribute@electrons{1}{#1}{11.25}{6}%
+ \fi
+ \fi
+ \fi
+ \ifnum\value{@bohr@shell@number}=7\relax % n=7
+ \@bohr@distribute@electrons{1}{#1}{180}{7}%
+ \fi
+}
+
+% --------------------------------------------------------------------------
+
+\endinput
+
+% HISTORY
+2012/09/21 v0.1a - first version on bitbucket
+2012/09/22 v0.2 - added compatibility up to atomic number 112
+ - added the commands \elementname and \elementsymbol with
+ language support German and English
+ - improved error checking
+2012/12/30 v0.2c - bug fixes in error checking
+2013/07/25 v0.2d - bug fix in warning message
+ - added missing \@bohr@write@atom to \@bohr@insert@symbol
+ - extended language support, added french element names
+ - corrected name of Praseodynium
+2013/11/05 v0.3 - draw shell electrons according to main quantum number
+ - French language file
+2013/11/10 v0.4 - allow `0' as value in electron distribution => this enables
+ to draw excited states
+ - new commands \setatomname, \setatomsymbol,
+ \setelectrondistribution
+ - new commands \elconf and \writeelconf
+ - \elementsymbol prints symbols according to option
+ `atom-style'
+2014/09/29 v0.4a - alias options for `language=german' and `language=french'
+2014/11/06 v0.4b - corrected wrong element symbol for Rhenium
+2015/06/14 v1.0 -
diff --git a/macros/latex/contrib/bohr/bohr_en.pdf b/macros/latex/contrib/bohr/bohr_en.pdf
new file mode 100644
index 0000000000..d74b57c82c
--- /dev/null
+++ b/macros/latex/contrib/bohr/bohr_en.pdf
Binary files differ
diff --git a/macros/latex/contrib/bohr/bohr_en.tex b/macros/latex/contrib/bohr/bohr_en.tex
new file mode 100644
index 0000000000..fc17c1cd0a
--- /dev/null
+++ b/macros/latex/contrib/bohr/bohr_en.tex
@@ -0,0 +1,223 @@
+% arara: pdflatex
+% arara: pdflatex
+% --------------------------------------------------------------------------
+% the BOHR package
+%
+% simple atom representation according to the Bohr model
+%
+% --------------------------------------------------------------------------
+% Clemens Niederberger
+% Web: https://bitbucket.org/cgnieder/bohr/
+% E-Mail: contact@mychemistry.eu
+% --------------------------------------------------------------------------
+% Copyright 2012-2015 Clemens Niederberger
+%
+% This work may be distributed and/or modified under the
+% conditions of the LaTeX Project Public License, either version 1.3
+% of this license or (at your option) any later version.
+% The latest version of this license is in
+% http://www.latex-project.org/lppl.txt
+% and version 1.3 or later is part of all distributions of LaTeX
+% version 2005/12/01 or later.
+%
+% This work has the LPPL maintenance status `maintained'.
+%
+% The Current Maintainer of this work is Clemens Niederberger.
+% --------------------------------------------------------------------------
+% If you have any ideas, questions, suggestions or bugs to report, please
+% feel free to contact me.
+% --------------------------------------------------------------------------
+\documentclass[load-preamble+]{cnltx-doc}
+\usepackage[utf8]{inputenc}
+\usepackage{bohr}
+
+\setcnltx{
+ package = bohr ,
+ authors = Clemens Niederberger ,
+ email = contact@mychemistry.eu ,
+ url = http://www.mychemistry.eu/forums/forum/bohr/ ,
+ add-cmds = {
+ atomicnumber,
+ bohr,
+ DeclareAtomName,
+ DeclareAtomSymbol,
+ DeclareElectronDistribution,
+ elconf,
+ elementname,
+ elementsymbol,
+ setatomname,setatomsymbol,
+ setelectrondistribution,
+ setbohr,
+ writeelconf,
+ Z
+ } ,
+ add-silent-cmds = ch ,
+ abstract = {%
+ This package provides means for the creation of simple
+ Bohr models of atoms up to the atomic number 112. Additionally commands
+ are provided to convert atomic numbers to element symbols or element names
+ and vice versa.\par
+ The package is inspired by a question on
+ \url{http://tex.stackexchange.com/}:
+ \href{http://tex.stackexchange.com/questions/73410/draw-bohr-atomic-model-with-electron-shells-in-tex}%
+ {Draw Bohr atomic model with electron shells in \TeX?}%
+ } ,
+ index-setup = {
+ othercode = \footnotesize ,
+ level = \addsec ,
+ noclearpage
+ } ,
+ makeindex-setup = {
+ columns = 3 ,
+ columnsep = 1em
+ }
+}
+
+% \microtypesetup{tracking=scshape}
+
+\defbibheading{bibliography}{\addsec{References}}
+
+\newpackagename\BOHR{bohr}
+
+\usepackage{chemmacros}
+
+\begin{document}
+
+\section{Licence and Requirements}
+\license
+
+The \BOHR\ package loads and needs the packages
+\needpackage[graphics]{pgf}~\cite{pkg:pgf},
+\needpackage{pgfopts}~\cite{pkg:pgfopts},
+\needpackage{elements}~\cite{pkg:elements} and
+\pkg{cnltx-base}\footnote{\CTANurl{cnltx}}~\cite{bnd:cnltx}.
+
+\section{News}
+With version~1.0 all the parts not directly used for drawing the Bohr models
+such as defining element names (\cs*{setatomname}) or element symbols
+(\cs*{setatomsymbol}) or writing the electron configuration (\cs*{elconf})
+have been extracted into a new package called \pkg{elements}. This package
+provides all the commands besides \cs{bohr} and \cs{setbohr} that you know
+from earlier versions of \BOHR. As a consequence the option
+\option*{language} has been dropped. Obviously said package is now needed by
+\BOHR.
+
+\section{Options}
+Every option described in the manual can also be used as package option
+although this is not really advertised. The preferred version is to set
+options via the setup command \cs{setbohr}. Future versions of \cs{bohr} may
+drop the possible package options completely. Options are indicated as
+\option*{option} and are all key/value like options. Some options can be set
+without value, too. Then the \code{\default{underlined}} value is used.
+
+\section{Usage}
+\BOHR\ is used like any other \LaTeXe\ package:
+\begin{sourcecode}
+ \usepackage{bohr}
+\end{sourcecode}
+
+The main command, \cs{bohr}, creates the models:
+\begin{commands}
+ \command{bohr}[\oarg{num of shells}\marg{num of electrons}\marg{atom name}]
+ The main command. The mandatory arguments take the number of electrons to
+ be printed and the atom symbol that is printed in the center.
+\end{commands}
+
+This is described best by an example:
+\begin{example}[side-by-side]
+ \bohr{3}{Li}
+\end{example}
+There is not much more to it. Another example using the optional argument:
+\begin{example}[side-by-side]
+ \bohr[2]{2}{$\mathrm{Li^+}$}
+\end{example}
+
+\section{Customization}
+\BOHR\ provides a handful of options to customize the appearance:
+\begin{commands}
+ \command{setbohr}[\marg{options}]
+ Options are set in a key/value syntax using this command.
+\end{commands}
+\begin{options}
+ \keybool{insert-symbol}\Default{false}
+ If set to \code{true} \BOHR\ will insert the atomic symbol suiting to the
+ given electron number if \emph{no} third argument is given.
+ \keybool{insert-number}\Default{false}
+ If set to \code{true} \BOHR\ will use the appropriate number of electrons
+ for the given element symbol in the third argument if \emph{no} second
+ argument is given. This of course only works if the third argument is one
+ of the 112 element symbols.
+ \keybool{insert-missing}\Default{false}
+ Sets both \option{insert-symbol} and \option{insert-number}.
+ \keyval{atom-style}{code}\Default
+ This code will be placed immediatly before the third argument of
+ \cs{bohr}. The last macro in it may need one argument.
+ \keyval{name-options-set}{tikz option}\Default
+ This value is passed to the options of the \cs*{node} the third argument
+ of \cs{bohr} is placed in.
+ \keyval{name-options-add}{tikz options}\Default
+ This value will be added to options set with \option{name-options-set}.
+ \keyval{nucleus-options-set}{tikz options}{}
+ \Default{draw=black!80,fill=black!10,opacity=.25}
+ This value is passed to the options of the \cs*{draw} command that draws
+ the circle around the name-node.
+ \keyval{nucleus-options-add}{tikz options}\Default
+ This value will be added to options set with \option{nucleus-options-set}.
+ \keyval{nucleus-radius}{dimension}\Default{1em}
+ The radius of the circle around the name-node.
+ \keyval{electron-options-set}{tikz options}\Default{blue!50!black!50}
+ This value is passed to the options of the \cs*{fill} command that draws
+ the electrons.
+ \keyval{electron-options-add}{tikz options}\Default
+ This value will be added to options set with \option{electron-options-set}.
+ \keyval{electron-radius}{dimension}\Default{1.5pt}
+ The radius of the circles that represent the electrons.
+ \keyval{shell-options-set}{tikz options}\Default{draw=blue!75,thin}
+ This value is passed to the options of the \cs*{draw} command that draws
+ the circles that represent the shells.
+ \keyval{shell-options-add}{tikz options}\Default
+ This value will be added to options set with \option{shell-options-set}.
+ \keyval{shell-dist}{dimension}\Default{1em}
+ The distance between the nucleus and the first shell and between subsequent
+ shells.
+ \keychoice{distribution-method}{periodic,quantum}\Default{quantum}
+ \sinceversion{0.3}Determines how the electrons are distributed on the
+ shells. \code{periodic} distributes the electrons 2-8-8-18-18-32-32, \ie,
+ according to the place of the corresponding atom in the periodic table of
+ elements. \code{quantum} distributes the electrons according to the
+ electron configuration of the corresponding atom where each shell
+ represents the main quantum number. \ch{Pd} for example has the
+ configuration $1s^22s^22p^63s^23p^63d^{10}4s^24p^64d^{10}$ and would get
+ two electrons on the first shell, 8~electrons on the second, and
+ 18~electrons each on the third and fourth.
+\end{options}
+
+\begin{example}
+ \setbohr{name-options-set={font=\footnotesize\sffamily}}
+ \bohr{2}{He} \bohr{7}{N}
+\end{example}
+
+\begin{example}
+ % uses package `chemmacros'
+ \setbohr{atom-style={\footnotesize\sffamily\ch}}
+ \bohr{0}{H+} \bohr{10}{F-}
+\end{example}
+
+\begin{example}[side-by-side]
+ \setbohr{
+ shell-options-add = dashed,
+ shell-dist = .5em,
+ insert-missing
+ }
+ \bohr{6}{} \bohr{}{K}
+\end{example}
+
+\begin{example}
+ \setbohr{distribution-method=quantum,insert-missing}
+ \elconf{Fe} \\ % provided by `elements'
+ \bohr{}{Fe}
+ \setbohr{distribution-method=periodic}
+ \bohr{}{Fe}
+\end{example}
+
+\end{document}