From 2c72983b90fc317904db5f60260e79185b33cba3 Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Sat, 22 Sep 2012 23:33:01 +0000 Subject: bohr (22sep12) git-svn-id: svn://tug.org/texlive/trunk@27778 c570f23f-e606-0410-a88d-b1316a301751 --- Master/texmf-dist/doc/latex/bohr/README | 34 ++ Master/texmf-dist/doc/latex/bohr/bohr_en.pdf | Bin 0 -> 102155 bytes Master/texmf-dist/doc/latex/bohr/bohr_en.tex | 209 ++++++++++ Master/texmf-dist/tex/latex/bohr/bohr.sty | 456 +++++++++++++++++++++ .../tex/latex/bohr/bohr_elements_english.def | 114 ++++++ .../tex/latex/bohr/bohr_elements_german.def | 114 ++++++ Master/tlpkg/bin/tlpkg-ctan-check | 2 +- Master/tlpkg/tlpsrc/bohr.tlpsrc | 0 Master/tlpkg/tlpsrc/collection-science.tlpsrc | 1 + 9 files changed, 929 insertions(+), 1 deletion(-) create mode 100644 Master/texmf-dist/doc/latex/bohr/README create mode 100644 Master/texmf-dist/doc/latex/bohr/bohr_en.pdf create mode 100644 Master/texmf-dist/doc/latex/bohr/bohr_en.tex create mode 100644 Master/texmf-dist/tex/latex/bohr/bohr.sty create mode 100644 Master/texmf-dist/tex/latex/bohr/bohr_elements_english.def create mode 100644 Master/texmf-dist/tex/latex/bohr/bohr_elements_german.def create mode 100644 Master/tlpkg/tlpsrc/bohr.tlpsrc (limited to 'Master') diff --git a/Master/texmf-dist/doc/latex/bohr/README b/Master/texmf-dist/doc/latex/bohr/README new file mode 100644 index 00000000000..8a60ebdac1d --- /dev/null +++ b/Master/texmf-dist/doc/latex/bohr/README @@ -0,0 +1,34 @@ +-------------------------------------------------------------------------- +the BOHR package v0.2 + + simple atom representation according to the Bohr model + +2012/09/22 +-------------------------------------------------------------------------- +Clemens Niederberger +Web: https://bitbucket.org/cgnieder/bohr/ +E-Mail: contact@mychemistry.eu +-------------------------------------------------------------------------- +Copyright 2012 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 + - bohr_elements_english.def, bohr_elements_german.def + - README +-------------------------------------------------------------------------- +If you have any ideas, questions, suggestions or bugs to report, please +feel free to contact me. +-------------------------------------------------------------------------- \ No newline at end of file diff --git a/Master/texmf-dist/doc/latex/bohr/bohr_en.pdf b/Master/texmf-dist/doc/latex/bohr/bohr_en.pdf new file mode 100644 index 00000000000..3dd6f0cab73 Binary files /dev/null and b/Master/texmf-dist/doc/latex/bohr/bohr_en.pdf differ diff --git a/Master/texmf-dist/doc/latex/bohr/bohr_en.tex b/Master/texmf-dist/doc/latex/bohr/bohr_en.tex new file mode 100644 index 00000000000..1584010163c --- /dev/null +++ b/Master/texmf-dist/doc/latex/bohr/bohr_en.tex @@ -0,0 +1,209 @@ +% arara: xelatex: { shell: on } +% arara: xelatex +\documentclass[toc=index]{cnpkgdoc} +\docsetup{ + pkg = bohr , + cmd = \BOHR , + code-box = { + skipbelow = .5\baselineskip plus .5ex minus .5ex , + skipabove = .5\baselineskip plus .5ex minus .5ex , + roundcorner = 3pt , + innerleftmargin = 1.5em , + innerrightmargin = 1.5em + } , + gobble = 1 +} +\addcmds{bohr,ch,elementname,elementsymbol,setbohr} +\usepackage{chemmacros} + +\usepackage{fontspec} +\defaultfontfeatures{Numbers={OldStyle,Proportional}} +\usepackage[supstfm=libertinesups]{superiors} +\usepackage{fnpct} + +\usepackage{embrac}[2012/06/29] +\ChangeEmph{[}[,.02em]{]}[.055em,-.08em] +\ChangeEmph{(}[-.01em,.04em]{)}[.04em,-.05em] + +\renewcommand*\othersectionlevelsformat[3]{\textcolor{main}{#3\autodot}\enskip} +\renewcommand*\partformat{\textcolor{main}{\partname~\thepart\autodot}} + +\usepackage{filecontents} +\begin{filecontents}{\jobname.ist} + heading_prefix "{\\bfseries " + heading_suffix "\\hfil}\\nopagebreak\n" + headings_flag 1 + delim_0 "\\dotfill " + delim_1 "\\dotfill " + delim_2 "\\dotfill " + delim_r "\\textendash" + suffix_2p "\\nohyperpage{\\,f.}" + suffix_3p "\\nohyperpage{\\,ff.}" +\end{filecontents} + +\usepackage{imakeidx} +% \indexsetup{noclearpage} +\makeindex[columns=2,intoc,options={-sl \jobname.ist}] + +\TitlePicture{% + \parbox{.7\linewidth}{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?}}% +} + +\newcommand*\Default[1]{% + \hfill\llap + {% + \ifblank{#1}% + {(initially~empty)}% + {Default:~\code{#1}}% + }% + \newline +} +\newcommand*\required{\hfill\llap{required}\newline} +\newcommand*\optional{\hfill\llap{optional}\newline} + +\begin{document} + +\section{Licence and Requirements}\secidx{License} +\BOHR is placed under the terms of the LaTeX Project Public License, +version 1.3 or later (\url{http://www.latex-project.org/lppl.txt}). +It has the status ``maintained.'' + +\BOHR loads and needs the packages \paket[pgf]{tikz}, \paket{pgfopts} and +\paket{etoolbox}. +\secidx*{License} + +\section{Options}\secidx{Options} +Every option described in the manual can also be used as package option. Options +are indicated as \key{option} and are all key/value like options. Some options can +be set without value, too. Then the \default{underlined} value is used. +\secidx*{Options} + +\section{Usage}\secidx{Usage} +\BOHR is used like any other \LaTeXe\ package: +\begin{beispiel}[code only] + \usepackage{bohr} +\end{beispiel} + +The main command, \cmd{bohr}, creates the models: +\begin{beschreibung} + \Befehl{bohr}\oa{}\ma{}\ma{} +\end{beschreibung} +This is described best by an example: +\begin{beispiel} + \bohr{3}{Li} +\end{beispiel} +There is not much more to it. Another example using the optional argument: +\begin{beispiel} + \bohr[2]{2}{$\mathrm{Li^+}$} +\end{beispiel} +\secidx*{Usage} + +\section{Customization}\secidx{Customization} +\BOHR provides a handful of options to customize the appearance: +\begin{beschreibung} + \Befehl{setbohr}{}\newline + Options are set in a key/value syntax using this command. + \Option{insert-symbol}{\default{true}|false}\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. + \Option{insert-number}{\default{true}|false}\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. + \Option{insert-missing}{\default{true}|false}\Default{false} + Sets both \key{insert-symbol} and \key{insert-number}. + \Option{atom-style}{}\Default{} + This code will be placed immediatly before the third argument of \cmd{bohr}. + The last macro in it may need one argument. + \Option{name-options-set}{}\Default{} + This value is passed to the options of the \cmd*{node} the third argument of + \cmd{bohr} is placed in. + \Option{name-options-add}{}\Default{} + This value will be added to options set with \key{name-options-set}. + \Option{nucleus-option-set}{}\Default{draw=black!80,fill=black!10,opacity=.25} + This value is passed to the options of the \cmd*{draw} command that draws the + circle around the name-node. + \Option{nucleus-options-add}{}\Default{} + This value will be added to options set with \key{nucleus-options-set}. + \Option{nucleus-radius}{}\Default{1em} + The radius of the circle around the name-node. + \Option{electron-options-set}{}\Default{blue!50!black!50} + This value is passed to the options of the \cmd*{fill} command that draws the + electrons. + \Option{electron-options-add}{}\Default{} + This value will be added to options set with \key{electron-options-set}. + \Option{electron-radius}{}\Default{1.5pt} + The radius of the circles that represent the electrons. + \Option{shell-options-set}{}\Default{draw=blue!75,thin} + This value is passed to the options of the \cmd*{draw} command that draws the + circles that represent the shells. + \Option{shell-options-add}{}\Default{} + This value will be added to options set with \key{shell-options-set}. + \Option{shell-dist}{}\Default{1em} + The distance between the nucleus and the first shell and between subsequent + shells. + \Option{german}{\default{true}|false}\Default{false} + If set to \code{true} the German names are defined (see section~\ref{sec:additional} + to understand what I mean). They are also defined if you use \paket{babel} and + select language \code{german} or \code{ngerman} in the preamble. The same holds + for \paket{polyglossia}. +\end{beschreibung} + +\begin{beispiel} + \setbohr{name-options-set={font=\footnotesize\sffamily}} + \bohr{2}{He} \bohr{7}{N} +\end{beispiel} + +\begin{beispiel} + % uses package `chemmacros' + \setbohr{atom-style={\footnotesize\sffamily\ch}} + \bohr{0}{H+} \bohr{10}{F-} +\end{beispiel} + +\begin{beispiel} + \setbohr{ + shell-options-add = dashed, + shell-dist = .5em, + insert-missing + } + \bohr{6}{} \bohr{}{K} +\end{beispiel} +\secidx*{Customization} + +\section{Additional Commands}\label{sec:additional} +\BOHR provides some additional commands that return the element symbol or the +element name to a given atomic number and vice versa. +\begin{beschreibung} + \Befehl{elementsymbol}{|}\newline + Returns the element symbol for a given atomic number or element name. + \cmd{elementsymbol}{80}: \elementsymbol{80}; \cmd{elementsymbol}{rhenium}: + \elementsymbol{rhenium}. + \Befehl{elementname}{|}\newline + Returns the element name for a given atomic number or element symbol. + \cmd{elementname}{80}: \elementname{80}; \cmd{elementname}{Rh}: \elementname{Rh}. + \Befehl{atomicnumber}{|}\newline + Returns the atomic number for a given element name or element symbol. + \cmd{atomicnumber}{Hg}: \atomicnumber{Hg}; \cmd{atomicnumber}{rhenium} + \atomicnumber{rhenium}. + \Befehl{Z}\newline + If this command isn't defined by some other package it is available as an + alias of \cmd{atomicnumber}. +\end{beschreibung} + +\begin{beispiel} + The elements \elementname{F}, \elementname{Cl}, \elementname{Br}, + \elementname{I} and \elementname{At} are called \emph{halogens}. +\end{beispiel} + +\section{Implementation} +\implementation + +\printindex +\end{document} \ No newline at end of file diff --git a/Master/texmf-dist/tex/latex/bohr/bohr.sty b/Master/texmf-dist/tex/latex/bohr/bohr.sty new file mode 100644 index 00000000000..663ec4bd93c --- /dev/null +++ b/Master/texmf-dist/tex/latex/bohr/bohr.sty @@ -0,0 +1,456 @@ +% -------------------------------------------------------------------------- +% 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 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 +% - bohr_elements_english.def, bohr_elements_german.def +% - README +% -------------------------------------------------------------------------- +% If you have any ideas, questions, suggestions or bugs to report, please +% feel free to contact me. +% -------------------------------------------------------------------------- +\def\@bohr@date{2012/09/22} +\def\@bohr@version{v0.2} +\def\@bohr@description{simple atom representation according to the Bohr model} + +\ProvidesPackage{bohr}[\@bohr@date\space \@bohr@version\space \@bohr@description] +\RequirePackage{tikz,etoolbox,pgfopts} + +% -------------------------------------------------------------------------- +% message handling +\def\@bohr@create@message#1{% + \ifstrequal{#1}{Error} + {% + \lowercase{\csdef{@bohr@#1}}##1##2{% + \csuse{Package#1}{bohr}{##1}{##2}}% + }{% + \lowercase{\csdef{@bohr@#1}}##1{% + \csuse{Package#1}{bohr}{##1}}% + }} +\@bohr@create@message{Error} +\@bohr@create@message{Warning} +\@bohr@create@message{WarningNoLine} +\@bohr@create@message{Info} + +% -------------------------------------------------------------------------- +% the \bohr command +% optional #1: number of shells +% #2: number of electrons +% #3: atom name +\newrobustcmd*\bohr[3][]{\@bohr{#1}{#2}{#3}} + +\def\@bohr#1#2#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.} + {I can't insert the electron number. You haven't specified the + element.}% + }{% + \ifboolexpr + { + bool {bohr@insert@number} and not + test {\lowercase{\ifcsvoid{@bohr@atom@number@#3}}} + } + {% + \lowercase{% + \def\@bohr@electron@current@number{\csuse{@bohr@atom@number@#3}}}% + }{% + \@bohr@error{You must specify an electron number, possibly 0.} + {You must specify an electron number, possibly 0.}% + }% + }% + }{% yes + \ifnum#2<0\relax + \@bohr@error{The electron number cannot be negative!} + {The electron number cannot be negative!}% + \else + \def\@bohr@electron@current@number{#2}% + \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 +} + +\def\@bohr@get@shell@num#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 + \ifnum#1<110\relax + \def\@bohr@shell@num{7}% + \else + \def\@bohr@shell@num{112}% + \@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 +} + +\def\@bohr@distribute@electrons#1#2#3#4{% + \pgfmathparse{#2}% + \let\@bohr@last@electron\pgfmathresult + \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) ; + } +} + +\def\@bohr@draw@electrons#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 + \ifnum#1<113\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}{32}{11.25}{6}% + \@bohr@distribute@electrons{1}{#1-86}{11.25}{7}% + \fi + \fi + \fi + \fi + \fi + \fi + \fi + \fi +} + +% -------------------------------------------------------------------------- +% atomic numbers and element symbols and names +\def\@bohr@define@atom@symbol#1#2{% + \csdef{@bohr@atom@symbol@num@\romannumeral#1}{#2}% + \lowercase{\csdef{@bohr@atom@number@#2}}{#1}} +\def\@bohr@define@atom@name#1#2{% + \csdef{@bohr@atom@name@\romannumeral#1}{#2}% + \lowercase{\csdef{@bohr@atom@name@num@#2}}{#1}} + +\newrobustcmd*\DeclareAtomName[2]{% + \@bohr@define@atom@name{#1}{#2}} +\newrobustcmd*\DeclareAtomSymbol[2]{% + \@bohr@define@atom@symbol{#1}{#2}} + +\def\@bohr@get@atom@symbol#1{% + \csuse{@bohr@atom@symbol@num@\romannumeral#1}} +\def\@bohr@get@atom@number#1{% + \lowercase{\csuse{@bohr@atom@number@#1}}} +\def\@bohr@get@atom@name#1{% + \csuse{@bohr@atom@name@\romannumeral#1}} + +\def\@bohr@element@symbol#1{% + \lowercase{\ifcsdef{@bohr@atom@name@num@#1}} + {\lowercase{\@bohr@get@atom@symbol{\csuse{@bohr@atom@name@num@#1}}}} + {\@bohr@get@atom@symbol{#1}}} + +\def\@bohr@atomic@number#1{% + \lowercase{\ifcsdef{@bohr@atom@number@#1}} + {\@bohr@get@atom@number{#1}} + {\lowercase{\csuse{@bohr@atom@name@num@#1}}}} + +\def\@bohr@elemt@symbol#1{% + \if!\ifnum9<1#1!\@bohr@get@atom@name{#1}\fi + \else + \lowercase{\@bohr@get@atom@name{\csuse{@bohr@atom@number@#1}}}% + \fi} + +\newrobustcmd*\elementsymbol[1]{\@bohr@element@symbol{#1}} +\newrobustcmd*\atomicnumber[1]{\@bohr@atomic@number{#1}} +\newrobustcmd*\elementname[1]{\@bohr@elemt@symbol{#1}} +\ifdef\Z{}{\let\Z\atomicnumber} + +\DeclareAtomSymbol{1}{H} +\DeclareAtomSymbol{2}{He} +\DeclareAtomSymbol{3}{Li} +\DeclareAtomSymbol{4}{Be} +\DeclareAtomSymbol{5}{B} +\DeclareAtomSymbol{6}{C} +\DeclareAtomSymbol{7}{N} +\DeclareAtomSymbol{8}{O} +\DeclareAtomSymbol{9}{F} +\DeclareAtomSymbol{10}{Ne} +\DeclareAtomSymbol{11}{Na} +\DeclareAtomSymbol{12}{Mg} +\DeclareAtomSymbol{13}{Al} +\DeclareAtomSymbol{14}{Si} +\DeclareAtomSymbol{15}{P} +\DeclareAtomSymbol{16}{S} +\DeclareAtomSymbol{17}{Cl} +\DeclareAtomSymbol{18}{Ar} +\DeclareAtomSymbol{19}{K} +\DeclareAtomSymbol{20}{Ca} +\DeclareAtomSymbol{21}{Sc} +\DeclareAtomSymbol{22}{Ti} +\DeclareAtomSymbol{23}{V} +\DeclareAtomSymbol{24}{Cr} +\DeclareAtomSymbol{25}{Mn} +\DeclareAtomSymbol{26}{Fe} +\DeclareAtomSymbol{27}{Co} +\DeclareAtomSymbol{28}{Ni} +\DeclareAtomSymbol{29}{Cu} +\DeclareAtomSymbol{30}{Zn} +\DeclareAtomSymbol{31}{Ga} +\DeclareAtomSymbol{32}{Ge} +\DeclareAtomSymbol{33}{As} +\DeclareAtomSymbol{34}{Se} +\DeclareAtomSymbol{35}{Br} +\DeclareAtomSymbol{36}{Kr} +\DeclareAtomSymbol{37}{Rb} +\DeclareAtomSymbol{38}{Sr} +\DeclareAtomSymbol{39}{Y} +\DeclareAtomSymbol{40}{Zr} +\DeclareAtomSymbol{41}{Nb} +\DeclareAtomSymbol{42}{Mo} +\DeclareAtomSymbol{43}{Tc} +\DeclareAtomSymbol{44}{Ru} +\DeclareAtomSymbol{45}{Rh} +\DeclareAtomSymbol{46}{Pd} +\DeclareAtomSymbol{47}{Ag} +\DeclareAtomSymbol{48}{Cd} +\DeclareAtomSymbol{49}{In} +\DeclareAtomSymbol{50}{Sn} +\DeclareAtomSymbol{51}{Sb} +\DeclareAtomSymbol{52}{Te} +\DeclareAtomSymbol{53}{I} +\DeclareAtomSymbol{54}{Xe} +\DeclareAtomSymbol{55}{Cs} +\DeclareAtomSymbol{56}{Ba} +\DeclareAtomSymbol{57}{La} +\DeclareAtomSymbol{58}{Ce} +\DeclareAtomSymbol{59}{Pr} +\DeclareAtomSymbol{60}{Nd} +\DeclareAtomSymbol{61}{Pm} +\DeclareAtomSymbol{62}{Sm} +\DeclareAtomSymbol{63}{Eu} +\DeclareAtomSymbol{64}{Gd} +\DeclareAtomSymbol{65}{Tb} +\DeclareAtomSymbol{66}{Dy} +\DeclareAtomSymbol{67}{Ho} +\DeclareAtomSymbol{68}{Er} +\DeclareAtomSymbol{69}{Tm} +\DeclareAtomSymbol{70}{Yb} +\DeclareAtomSymbol{71}{Lu} +\DeclareAtomSymbol{72}{Hf} +\DeclareAtomSymbol{73}{Ta} +\DeclareAtomSymbol{74}{W} +\DeclareAtomSymbol{75}{Rh} +\DeclareAtomSymbol{76}{Os} +\DeclareAtomSymbol{77}{Ir} +\DeclareAtomSymbol{78}{Pt} +\DeclareAtomSymbol{79}{Au} +\DeclareAtomSymbol{80}{Hg} +\DeclareAtomSymbol{81}{Tl} +\DeclareAtomSymbol{82}{Pb} +\DeclareAtomSymbol{83}{Bi} +\DeclareAtomSymbol{84}{Po} +\DeclareAtomSymbol{85}{At} +\DeclareAtomSymbol{86}{Rn} +\DeclareAtomSymbol{87}{Fr} +\DeclareAtomSymbol{88}{Ra} +\DeclareAtomSymbol{89}{Ac} +\DeclareAtomSymbol{90}{Th} +\DeclareAtomSymbol{91}{Pa} +\DeclareAtomSymbol{92}{U} +\DeclareAtomSymbol{93}{Np} +\DeclareAtomSymbol{94}{Pu} +\DeclareAtomSymbol{95}{Am} +\DeclareAtomSymbol{96}{Cm} +\DeclareAtomSymbol{97}{Bk} +\DeclareAtomSymbol{98}{Cf} +\DeclareAtomSymbol{99}{Es} +\DeclareAtomSymbol{100}{Fm} +\DeclareAtomSymbol{101}{Md} +\DeclareAtomSymbol{102}{No} +\DeclareAtomSymbol{103}{Lr} +\DeclareAtomSymbol{104}{Rf} +\DeclareAtomSymbol{105}{Db} +\DeclareAtomSymbol{106}{Sg} +\DeclareAtomSymbol{107}{Bh} +\DeclareAtomSymbol{108}{Hs} +\DeclareAtomSymbol{109}{Mt} +\DeclareAtomSymbol{110}{Ds} +\DeclareAtomSymbol{111}{Rg} +\DeclareAtomSymbol{112}{Cn} + +% element names are defined in bohr_elements_english.def or +% bohr_elements_german.def, respectively. Now we need to decide +% which ones we want +\AfterEndPreamble{ +\ifdef\bbl@afterfi{}{\long\def\bbl@afterfi#1{\fi#1}} +\ifboolexpr + { + test {\iflanguage{german}} or + test {\iflanguage{ngerman}} + } + {\booltrue{bohr@german}}{} +\ifbool{bohr@german} + {\input{bohr_elements_german.def}} + {\input{bohr_elements_english.def}} +} + + +% -------------------------------------------------------------------------- +% options +\def\@bohr@name@options{} +\def\@bohr@write@atom#1{#1} +\def\@bohr@nucleus@radius{1em} +\def\@bohr@electron@options{blue!50!black!50} +\def\@bohr@electron@radius{1.5pt} +\def\@bohr@shell@dist{1em} +\def\@bohr@nucleus@options{draw=black!80,fill=black!10,opacity=.25} +\def\@bohr@shell@options{draw=blue!75,thin} + +\newbool{bohr@insert@symbol} +\newbool{bohr@insert@number} +\newbool{bohr@german} + +\def\@bohr@insert@symbol#1#2{% + \ifbool{bohr@insert@symbol} + {\ifblank{#2}{\@bohr@get@atom@symbol{#1}}{\@bohr@write@atom{#2}}} + {\@bohr@write@atom{#2}}} + +\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 = + \expandafter\def\expandafter\@bohr@name@options\expandafter{\@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 = + \expandafter\def\expandafter\@bohr@nucleus@options\expandafter{\@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 = + \expandafter\def\expandafter\@bohr@electron@options\expandafter{\@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 = + \expandafter\def\expandafter\@bohr@shell@options\expandafter{\@bohr@shell@options,#1} , + german/.is if = bohr@german , + ngerman/.is if = bohr@german +} + +\newrobustcmd\setbohr[1]{\pgfqkeys{/bohr}{#1}} + +\ProcessPgfOptions* +\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 \ No newline at end of file diff --git a/Master/texmf-dist/tex/latex/bohr/bohr_elements_english.def b/Master/texmf-dist/tex/latex/bohr/bohr_elements_english.def new file mode 100644 index 00000000000..6ac2f88f988 --- /dev/null +++ b/Master/texmf-dist/tex/latex/bohr/bohr_elements_english.def @@ -0,0 +1,114 @@ +\DeclareAtomName{1}{Hydrogen} +\DeclareAtomName{2}{Helium} +\DeclareAtomName{3}{Lithium} +\DeclareAtomName{4}{Beryllium} +\DeclareAtomName{5}{Boron} +\DeclareAtomName{6}{Carbon} +\DeclareAtomName{7}{Nitrogen} +\DeclareAtomName{8}{Oxygen} +\DeclareAtomName{9}{Fluorine} +\DeclareAtomName{10}{Neon} +\DeclareAtomName{11}{Sodium} +\DeclareAtomName{12}{Magnesium} +\DeclareAtomName{13}{Aluminium} +\DeclareAtomName{14}{Silicon} +\DeclareAtomName{15}{Phosphorus} +\DeclareAtomName{16}{Sulfur} +\DeclareAtomName{17}{Chlorine} +\DeclareAtomName{18}{Argon} +\DeclareAtomName{19}{Potassium} +\DeclareAtomName{20}{Calcium} +\DeclareAtomName{21}{Scandium} +\DeclareAtomName{22}{Titanium} +\DeclareAtomName{23}{Vanadium} +\DeclareAtomName{24}{Chromium} +\DeclareAtomName{25}{Manganese} +\DeclareAtomName{26}{Iron} +\DeclareAtomName{27}{Cobalt} +\DeclareAtomName{28}{Nickel} +\DeclareAtomName{29}{Copper} +\DeclareAtomName{30}{Zinc} +\DeclareAtomName{31}{Gallium} +\DeclareAtomName{32}{Germanium} +\DeclareAtomName{33}{Arsenic} +\DeclareAtomName{34}{Selenium} +\DeclareAtomName{35}{Bromine} +\DeclareAtomName{36}{Krypton} +\DeclareAtomName{37}{Rubidium} +\DeclareAtomName{38}{Strontium} +\DeclareAtomName{39}{Yttrium} +\DeclareAtomName{40}{Zirconium} +\DeclareAtomName{41}{Niobium} +\DeclareAtomName{42}{Molybdenum} +\DeclareAtomName{43}{Technetium} +\DeclareAtomName{44}{Ruthenium} +\DeclareAtomName{45}{Rhodium} +\DeclareAtomName{46}{Palladium} +\DeclareAtomName{47}{Silver} +\DeclareAtomName{48}{Cadmium} +\DeclareAtomName{49}{Indium} +\DeclareAtomName{50}{Tin} +\DeclareAtomName{51}{Antimony} +\DeclareAtomName{52}{Tellurium} +\DeclareAtomName{53}{Iodine} +\DeclareAtomName{54}{Xenon} +\DeclareAtomName{55}{Caesium} +\DeclareAtomName{56}{Barium} +\DeclareAtomName{57}{Lanthanum} +\DeclareAtomName{58}{Cerium} +\DeclareAtomName{59}{Praesodymium} +\DeclareAtomName{60}{Neodymium} +\DeclareAtomName{61}{Promethium} +\DeclareAtomName{62}{Samarium} +\DeclareAtomName{63}{Europium} +\DeclareAtomName{64}{Gadolinium} +\DeclareAtomName{65}{Terbium} +\DeclareAtomName{66}{Dysprosium} +\DeclareAtomName{67}{Holmium} +\DeclareAtomName{68}{Erbium} +\DeclareAtomName{69}{Thulium} +\DeclareAtomName{70}{Ytterbium} +\DeclareAtomName{71}{Lutetium} +\DeclareAtomName{72}{Hafnium} +\DeclareAtomName{73}{Tantalium} +\DeclareAtomName{74}{Tungsten} +\DeclareAtomName{75}{Rhenium} +\DeclareAtomName{76}{Osmium} +\DeclareAtomName{77}{Iridium} +\DeclareAtomName{78}{Platinum} +\DeclareAtomName{79}{Gold} +\DeclareAtomName{80}{Mercury} +\DeclareAtomName{81}{Thallium} +\DeclareAtomName{82}{Lead} +\DeclareAtomName{83}{Bismuth} +\DeclareAtomName{84}{Polonium} +\DeclareAtomName{85}{Astatine} +\DeclareAtomName{86}{Radon} +\DeclareAtomName{87}{Francium} +\DeclareAtomName{88}{Radium} +\DeclareAtomName{89}{Actinium} +\DeclareAtomName{90}{Thorium} +\DeclareAtomName{91}{Protactinium} +\DeclareAtomName{92}{Uranium} +\DeclareAtomName{93}{Neptunium} +\DeclareAtomName{94}{Plutonium} +\DeclareAtomName{95}{Americium} +\DeclareAtomName{96}{Curium} +\DeclareAtomName{97}{Berkelium} +\DeclareAtomName{98}{Californium} +\DeclareAtomName{99}{Einsteinium} +\DeclareAtomName{100}{Fermium} +\DeclareAtomName{101}{Mendelevium} +\DeclareAtomName{102}{Nobelium} +\DeclareAtomName{103}{Lawrencium} +\DeclareAtomName{104}{Rutherfordium} +\DeclareAtomName{105}{Dubnium} +\DeclareAtomName{106}{Seaborgium} +\DeclareAtomName{107}{Bohrium} +\DeclareAtomName{108}{Hassium} +\DeclareAtomName{109}{Meitnerium} +\DeclareAtomName{110}{Darmstadtium} +\DeclareAtomName{111}{Roentgenium} +\DeclareAtomName{112}{Copernicium} + +\endinput \ No newline at end of file diff --git a/Master/texmf-dist/tex/latex/bohr/bohr_elements_german.def b/Master/texmf-dist/tex/latex/bohr/bohr_elements_german.def new file mode 100644 index 00000000000..3e3a73d4066 --- /dev/null +++ b/Master/texmf-dist/tex/latex/bohr/bohr_elements_german.def @@ -0,0 +1,114 @@ +\DeclareAtomName{1}{Wasserstoff} +\DeclareAtomName{2}{Helium} +\DeclareAtomName{3}{Lithium} +\DeclareAtomName{4}{Beryllium} +\DeclareAtomName{5}{Bor} +\DeclareAtomName{6}{Kohlenstoff} +\DeclareAtomName{7}{Stickstoff} +\DeclareAtomName{8}{Souerstoff} +\DeclareAtomName{9}{Fluor} +\DeclareAtomName{10}{Neon} +\DeclareAtomName{11}{Natrium} +\DeclareAtomName{12}{Magnesium} +\DeclareAtomName{13}{Aluminium} +\DeclareAtomName{14}{Silicium} +\DeclareAtomName{15}{Phosphor} +\DeclareAtomName{16}{Schwefel} +\DeclareAtomName{17}{Chlor} +\DeclareAtomName{18}{Argon} +\DeclareAtomName{19}{Kalium} +\DeclareAtomName{20}{Calcium} +\DeclareAtomName{21}{Scandium} +\DeclareAtomName{22}{Titan} +\DeclareAtomName{23}{Vanadium} +\DeclareAtomName{24}{Chrom} +\DeclareAtomName{25}{Mangan} +\DeclareAtomName{26}{Eisen} +\DeclareAtomName{27}{Cobalt} +\DeclareAtomName{28}{Nickel} +\DeclareAtomName{29}{Kupfer} +\DeclareAtomName{30}{Zink} +\DeclareAtomName{31}{Gallium} +\DeclareAtomName{32}{Germanium} +\DeclareAtomName{33}{Arsen} +\DeclareAtomName{34}{Selen} +\DeclareAtomName{35}{Brom} +\DeclareAtomName{36}{Krypton} +\DeclareAtomName{37}{Rubidium} +\DeclareAtomName{38}{Strontium} +\DeclareAtomName{39}{Yttrium} +\DeclareAtomName{40}{Zirconium} +\DeclareAtomName{41}{Niobium} +\DeclareAtomName{42}{Molybd\"{a}n} +\DeclareAtomName{43}{Technetium} +\DeclareAtomName{44}{Ruthenium} +\DeclareAtomName{45}{Rhodium} +\DeclareAtomName{46}{Palladium} +\DeclareAtomName{47}{Silber} +\DeclareAtomName{48}{Cadmium} +\DeclareAtomName{49}{Indium} +\DeclareAtomName{50}{Zinn} +\DeclareAtomName{51}{Antimon} +\DeclareAtomName{52}{Tellur} +\DeclareAtomName{53}{Iod} +\DeclareAtomName{54}{Xenon} +\DeclareAtomName{55}{C\"{a}sium} +\DeclareAtomName{56}{Barium} +\DeclareAtomName{57}{Lanthan} +\DeclareAtomName{58}{Cer} +\DeclareAtomName{59}{Praesodym} +\DeclareAtomName{60}{Neodym} +\DeclareAtomName{61}{Promethium} +\DeclareAtomName{62}{Samarium} +\DeclareAtomName{63}{Europium} +\DeclareAtomName{64}{Gadolinium} +\DeclareAtomName{65}{Terbium} +\DeclareAtomName{66}{Dysprosium} +\DeclareAtomName{67}{Holmium} +\DeclareAtomName{68}{Erbium} +\DeclareAtomName{69}{Thulium} +\DeclareAtomName{70}{Ytterbium} +\DeclareAtomName{71}{Lutetium} +\DeclareAtomName{72}{Hafnium} +\DeclareAtomName{73}{Tantal} +\DeclareAtomName{74}{Wolfram} +\DeclareAtomName{75}{Rhenium} +\DeclareAtomName{76}{Osmium} +\DeclareAtomName{77}{Iridium} +\DeclareAtomName{78}{Platin} +\DeclareAtomName{79}{Gold} +\DeclareAtomName{80}{Quecksilber} +\DeclareAtomName{81}{Thallium} +\DeclareAtomName{82}{Blei} +\DeclareAtomName{83}{Bismut} +\DeclareAtomName{84}{Polonium} +\DeclareAtomName{85}{Astat} +\DeclareAtomName{86}{Radon} +\DeclareAtomName{87}{Francium} +\DeclareAtomName{88}{Radium} +\DeclareAtomName{89}{Actinium} +\DeclareAtomName{90}{Thorium} +\DeclareAtomName{91}{Protactinium} +\DeclareAtomName{92}{Uran} +\DeclareAtomName{93}{Neptunium} +\DeclareAtomName{94}{Plutonium} +\DeclareAtomName{95}{Americium} +\DeclareAtomName{96}{Curium} +\DeclareAtomName{97}{Berkelium} +\DeclareAtomName{98}{Californium} +\DeclareAtomName{99}{Einsteinium} +\DeclareAtomName{100}{Fermium} +\DeclareAtomName{101}{Mendelevium} +\DeclareAtomName{102}{Nobelium} +\DeclareAtomName{103}{Lawrencium} +\DeclareAtomName{104}{Rutherfordium} +\DeclareAtomName{105}{Dubnium} +\DeclareAtomName{106}{Seaborgium} +\DeclareAtomName{107}{Bohrium} +\DeclareAtomName{108}{Hassium} +\DeclareAtomName{109}{Meitnerium} +\DeclareAtomName{110}{Darmstadtium} +\DeclareAtomName{111}{Roentgenium} +\DeclareAtomName{112}{Copernicium} + +\endinput \ No newline at end of file diff --git a/Master/tlpkg/bin/tlpkg-ctan-check b/Master/tlpkg/bin/tlpkg-ctan-check index a69482c75cd..a614ac88a41 100755 --- a/Master/tlpkg/bin/tlpkg-ctan-check +++ b/Master/tlpkg/bin/tlpkg-ctan-check @@ -69,7 +69,7 @@ my @TLP_working = qw( bibtopicprefix bibexport bibunits bidi bigfoot bigints binomexp biocon biolinum-type1 bitelist bizcard blacklettert1 blindtext blkarray block blockdraw_mp bloques blowup - bodegraph boisik bold-extra + bodegraph bohr boisik bold-extra boites boldtensors bondgraph bookest bookhands booklet booktabs booktabs-de booktabs-fr boolexpr boondox bophook borceux bosisio diff --git a/Master/tlpkg/tlpsrc/bohr.tlpsrc b/Master/tlpkg/tlpsrc/bohr.tlpsrc new file mode 100644 index 00000000000..e69de29bb2d diff --git a/Master/tlpkg/tlpsrc/collection-science.tlpsrc b/Master/tlpkg/tlpsrc/collection-science.tlpsrc index e4aed82711d..411ead240d8 100644 --- a/Master/tlpkg/tlpsrc/collection-science.tlpsrc +++ b/Master/tlpkg/tlpsrc/collection-science.tlpsrc @@ -8,6 +8,7 @@ depend algorithm2e depend algorithmicx depend algorithms depend biocon +depend bohr depend bpchem depend bytefield depend chemarrow -- cgit v1.2.3