Debian Codegraph @

texmf-dist/doc/latex/bohr/bohr_en.tex

raw
1 % arara: pdflatex
2 % arara: pdflatex
3 % --------------------------------------------------------------------------
4 % the BOHR package
5 %
6 % simple atom representation according to the Bohr model
7 %
8 % --------------------------------------------------------------------------
9 % Clemens Niederberger
10 % Web: https://bitbucket.org/cgnieder/bohr/
11 % E-Mail: [email protected]
12 % --------------------------------------------------------------------------
13 % Copyright 2012-2015 Clemens Niederberger
14 %
15 % This work may be distributed and/or modified under the
16 % conditions of the LaTeX Project Public License, either version 1.3
17 % of this license or (at your option) any later version.
18 % The latest version of this license is in
19 % http://www.latex-project.org/lppl.txt
20 % and version 1.3 or later is part of all distributions of LaTeX
21 % version 2005/12/01 or later.
22 %
23 % This work has the LPPL maintenance status `maintained'.
24 %
25 % The Current Maintainer of this work is Clemens Niederberger.
26 % --------------------------------------------------------------------------
27 % If you have any ideas, questions, suggestions or bugs to report, please
28 % feel free to contact me.
29 % --------------------------------------------------------------------------
30 \documentclass[load-preamble+]{cnltx-doc}
31 \usepackage[utf8]{inputenc}
32 \usepackage{bohr}
33
34 \setcnltx{
35 package = bohr ,
36 authors = Clemens Niederberger ,
37 email = [email protected] ,
38 url = http://www.mychemistry.eu/forums/forum/bohr/ ,
39 add-cmds = {
40 atomicnumber,
41 bohr,
42 DeclareAtomName,
43 DeclareAtomSymbol,
44 DeclareElectronDistribution,
45 elconf,
46 elementname,
47 elementsymbol,
48 setatomname,setatomsymbol,
49 setelectrondistribution,
50 setbohr,
51 writeelconf,
52 Z
53 } ,
54 add-silent-cmds = ch ,
55 abstract = {%
56 This package provides means for the creation of simple
57 Bohr models of atoms up to the atomic number 112. Additionally commands
58 are provided to convert atomic numbers to element symbols or element names
59 and vice versa.\par
60 The package is inspired by a question on
61 \url{http://tex.stackexchange.com/}:
62 \href{http://tex.stackexchange.com/questions/73410/draw-bohr-atomic-model-with-electron-shells-in-tex}%
63 {Draw Bohr atomic model with electron shells in \TeX?}%
64 } ,
65 index-setup = {
66 othercode = \footnotesize ,
67 level = \addsec ,
68 noclearpage
69 } ,
70 makeindex-setup = {
71 columns = 3 ,
72 columnsep = 1em
73 }
74 }
75
76 % \microtypesetup{tracking=scshape}
77
78 \defbibheading{bibliography}{\addsec{References}}
79
80 \newpackagename\BOHR{bohr}
81
82 \usepackage{chemmacros}
83
84 \begin{document}
85
86 \section{Licence and Requirements}
87 \license
88
89 The \BOHR\ package loads and needs the packages
90 \needpackage[graphics]{pgf}~\cite{pkg:pgf},
91 \needpackage{pgfopts}~\cite{pkg:pgfopts},
92 \needpackage{elements}~\cite{pkg:elements} and
93 \pkg{cnltx-base}\footnote{\CTANurl{cnltx}}~\cite{bnd:cnltx}.
94
95 \section{News}
96 With version~1.0 all the parts not directly used for drawing the Bohr models
97 such as defining element names (\cs*{setatomname}) or element symbols
98 (\cs*{setatomsymbol}) or writing the electron configuration (\cs*{elconf})
99 have been extracted into a new package called \pkg{elements}. This package
100 provides all the commands besides \cs{bohr} and \cs{setbohr} that you know
101 from earlier versions of \BOHR. As a consequence the option
102 \option*{language} has been dropped. Obviously said package is now needed by
103 \BOHR.
104
105 \section{Options}
106 Every option described in the manual can also be used as package option
107 although this is not really advertised. The preferred version is to set
108 options via the setup command \cs{setbohr}. Future versions of \cs{bohr} may
109 drop the possible package options completely. Options are indicated as
110 \option*{option} and are all key/value like options. Some options can be set
111 without value, too. Then the \code{\default{underlined}} value is used.
112
113 \section{Usage}
114 \BOHR\ is used like any other \LaTeXe\ package:
115 \begin{sourcecode}
116 \usepackage{bohr}
117 \end{sourcecode}
118
119 The main command, \cs{bohr}, creates the models:
120 \begin{commands}
121 \command{bohr}[\oarg{num of shells}\marg{num of electrons}\marg{atom name}]
122 The main command. The mandatory arguments take the number of electrons to
123 be printed and the atom symbol that is printed in the center.
124 \end{commands}
125
126 This is described best by an example:
127 \begin{example}[side-by-side]
128 \bohr{3}{Li}
129 \end{example}
130 There is not much more to it. Another example using the optional argument:
131 \begin{example}[side-by-side]
132 \bohr[2]{2}{$\mathrm{Li^+}$}
133 \end{example}
134
135 \section{Customization}
136 \BOHR\ provides a handful of options to customize the appearance:
137 \begin{commands}
138 \command{setbohr}[\marg{options}]
139 Options are set in a key/value syntax using this command.
140 \end{commands}
141 \begin{options}
142 \keybool{insert-symbol}\Default{false}
143 If set to \code{true} \BOHR\ will insert the atomic symbol suiting to the
144 given electron number if \emph{no} third argument is given.
145 \keybool{insert-number}\Default{false}
146 If set to \code{true} \BOHR\ will use the appropriate number of electrons
147 for the given element symbol in the third argument if \emph{no} second
148 argument is given. This of course only works if the third argument is one
149 of the 112 element symbols.
150 \keybool{insert-missing}\Default{false}
151 Sets both \option{insert-symbol} and \option{insert-number}.
152 \keyval{atom-style}{code}\Default
153 This code will be placed immediatly before the third argument of
154 \cs{bohr}. The last macro in it may need one argument.
155 \keyval{name-options-set}{tikz option}\Default
156 This value is passed to the options of the \cs*{node} the third argument
157 of \cs{bohr} is placed in.
158 \keyval{name-options-add}{tikz options}\Default
159 This value will be added to options set with \option{name-options-set}.
160 \keyval{nucleus-options-set}{tikz options}{}
161 \Default{draw=black!80,fill=black!10,opacity=.25}
162 This value is passed to the options of the \cs*{draw} command that draws
163 the circle around the name-node.
164 \keyval{nucleus-options-add}{tikz options}\Default
165 This value will be added to options set with \option{nucleus-options-set}.
166 \keyval{nucleus-radius}{dimension}\Default{1em}
167 The radius of the circle around the name-node.
168 \keyval{electron-options-set}{tikz options}\Default{blue!50!black!50}
169 This value is passed to the options of the \cs*{fill} command that draws
170 the electrons.
171 \keyval{electron-options-add}{tikz options}\Default
172 This value will be added to options set with \option{electron-options-set}.
173 \keyval{electron-radius}{dimension}\Default{1.5pt}
174 The radius of the circles that represent the electrons.
175 \keyval{shell-options-set}{tikz options}\Default{draw=blue!75,thin}
176 This value is passed to the options of the \cs*{draw} command that draws
177 the circles that represent the shells.
178 \keyval{shell-options-add}{tikz options}\Default
179 This value will be added to options set with \option{shell-options-set}.
180 \keyval{shell-dist}{dimension}\Default{1em}
181 The distance between the nucleus and the first shell and between subsequent
182 shells.
183 \keychoice{distribution-method}{periodic,quantum}\Default{quantum}
184 \sinceversion{0.3}Determines how the electrons are distributed on the
185 shells. \code{periodic} distributes the electrons 2-8-8-18-18-32-32, \ie,
186 according to the place of the corresponding atom in the periodic table of
187 elements. \code{quantum} distributes the electrons according to the
188 electron configuration of the corresponding atom where each shell
189 represents the main quantum number. \ch{Pd} for example has the
190 configuration $1s^22s^22p^63s^23p^63d^{10}4s^24p^64d^{10}$ and would get
191 two electrons on the first shell, 8~electrons on the second, and
192 18~electrons each on the third and fourth.
193 \end{options}
194
195 \begin{example}
196 \setbohr{name-options-set={font=\footnotesize\sffamily}}
197 \bohr{2}{He} \bohr{7}{N}
198 \end{example}
199
200 \begin{example}
201 % uses package `chemmacros'
202 \setbohr{atom-style={\footnotesize\sffamily\ch}}
203 \bohr{0}{H+} \bohr{10}{F-}
204 \end{example}
205
206 \begin{example}[side-by-side]
207 \setbohr{
208 shell-options-add = dashed,
209 shell-dist = .5em,
210 insert-missing
211 }
212 \bohr{6}{} \bohr{}{K}
213 \end{example}
214
215 \begin{example}
216 \setbohr{distribution-method=quantum,insert-missing}
217 \elconf{Fe} \\ % provided by `elements'
218 \bohr{}{Fe}
219 \setbohr{distribution-method=periodic}
220 \bohr{}{Fe}
221 \end{example}
222
223 \end{document}