% arara: pdflatex: { shell: on } % arara: pdflatex: { shell: on } % -------------------------------------------------------------------------- % the SUBSTANCES package % % A Chemical Database % % -------------------------------------------------------------------------- % Clemens Niederberger % Web: https://bitbucket.org/cgnieder/substances/ % 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 substances package consists of the files % - substances.sty, substances-default.def, substances-examples.sub, % substances_en.tex, substances_en.pdf, README % -------------------------------------------------------------------------- % If you have any ideas, questions, suggestions or bugs to report, please % feel free to contact me. % -------------------------------------------------------------------------- % % if you want to compile this documentation you'll need the document class % `cnpkgdoc' which you can get here: % https://bitbucket.org/cgnieder/cnpkgdoc/ % the class is licensed LPPL 1.3 or later % \documentclass[DIV10,toc=index,toc=bib]{cnpkgdoc} \docsetup{ pkg = {[index]substances} , code-box = { backgroundcolor = gray!7!white , skipbelow = .6\baselineskip plus .5ex minus .5ex , skipabove = .6\baselineskip plus .5ex minus .5ex , roundcorner = 3pt , } , gobble = 0 } \LoadSubstances{substances-examples} \addcmds{ @CAS, @EC, ac, AllSubstancesClist, AllSubstancesSequence, arraybackslash, bottomrule, CAS, celsius, ch, chem, chemfig, chemsetup, cmc, DeclareChemIUPAC, DeclareSubstance, DeclareSubstanceProperty, EC, endinput, ForAllSubstancesDo, GetSubstanceProperty, gram, IfSubstanceExistF, IfSubstanceExistT, IfSubstanceExistTF, IfSubstanceFieldF, IfSubstanceFieldT, IfSubstanceFieldTF, IfSubstancePropertyF, IfSubstancePropertyT, IfSubstancePropertyTF, iupac, Lewis, LoadSubstances, midrule, MolMass, NewDocumentCommand, newindex, normal, num, per, printindex, RetrieveSubstanceProperty, SI, sisetup, SubstanceIndexAltEntry, SubstanceIndexNameAltEntry, SubstanceIndexNameEntry, toprule } % Layout: \usepackage[osf]{libertine} \cnpkgcolors{ main => cnpkgred , key => yellow!40!brown , module => cnpkgblue , link => black!90 } \usepackage{booktabs} \renewcommand*\othersectionlevelsformat[3]{% \textcolor{main}{#3\autodot}\enskip} \renewcommand*\partformat{% \textcolor{main}{\partname~\thepart\autodot}} \usepackage{fnpct} \usepackage{embrac}[2012/06/29]% option biblatex, falls Bibliography dazu kommt \ChangeEmph{[}[,.02em]{]}[.055em,-.08em] \ChangeEmph{(}[-.01em,.04em]{)}[.04em,-.05em] \usepackage{acro} \DeclareAcronym{CAS}{CAS,}{Chemical Abstract Service,} \DeclareAcronym{EC}{EC}{European Commission Number} \DeclareAcronym{LD50}{LD50,}{Median Lethal Dose} \DeclareAcronym{IUPAC}{IUPAC,}{International Union of Pure and Applied Chemistry,} \DeclareAcronym{ghs}{GHS,}{Globally Harmonized System of Classification and Labelling of Chemicals,} % bibliography: % \usepackage[style=alphabetic,backend=biber]{biblatex} % index: \usepackage{imakeidx,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*} % \indexsetup{noclearpage} \makeindex[options=-sl \jobname.ist,intoc,title=Package Index] \makeindex[name=\jobname-chem,title=Index of Chemicals,intoc,columns=3] % abstract: \TitlePicture{\parbox{.7\linewidth}{% The \substances package allows you to create a database like file that contains data of various chemicals. These data can be retrieved in the document. An index creation of the chemicals used in the document is directly supported.}} \ExplSyntaxOn \NewDocumentCommand \Default {g} { \hfill\llap { \IfNoValueTF { #1 } {(initially~empty)} {Default:~\code{#1}} } \newline } \NewDocumentCommand \required {} { \hfill \llap { required } \newline } \NewDocumentCommand \optional {} { \hfill \llap { optional } \newline } \ExplSyntaxOff \begin{document} \section{Licence and Requirements} Permission is granted to copy, distribute and/or modify this software under the terms of the \LaTeX{} Project Public License, version 1.3 or later (\url{http://www.latex-project.org/lppl.txt}). The package has the status ``maintained.'' \substances loads and needs the following packages: \paket{expl3}, \paket{xparse}, \paket{xtemplate} and \paket{l3keys2e}. It also needs the chemistry package \paket{chemmacros}. \section{About} The \substances package allows you to create a database like file that contains data of various chemicals. These data can be retrieved in the document. An index creation of the chemicals used in the document is directly supported. \section{Options} \substances has only a few options: \begin{beschreibung} \Option{draft}{\default{true}|false}\Default{false} If set to true all warnings will be errors. \Option{final}{\default{true}|false}\Default{true} The opposite of \key{draft}. \Option{index}{\default{true}|false}\Default{false} Add index entries when \cmd{chem} is called, see section~\ref{sec:index}. \Option{style}{