From 5c7e88f6bc0ed19c94fd9c49311ee63a90ebab7c Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Thu, 26 Jul 2012 22:44:44 +0000 Subject: substances (22jul12) git-svn-id: svn://tug.org/texlive/trunk@27182 c570f23f-e606-0410-a88d-b1316a301751 --- Master/texmf-dist/doc/latex/substances/README | 32 ++ .../doc/latex/substances/substances-examples.sub | 301 ++++++++++ .../doc/latex/substances/substances_en.pdf | Bin 0 -> 791771 bytes .../doc/latex/substances/substances_en.tex | 605 +++++++++++++++++++++ .../tex/latex/substances/substances-default.def | 80 +++ .../texmf-dist/tex/latex/substances/substances.sty | 442 +++++++++++++++ Master/tlpkg/bin/tlpkg-ctan-check | 6 +- Master/tlpkg/tlpsrc/collection-science.tlpsrc | 1 + Master/tlpkg/tlpsrc/substances.tlpsrc | 0 9 files changed, 1464 insertions(+), 3 deletions(-) create mode 100644 Master/texmf-dist/doc/latex/substances/README create mode 100644 Master/texmf-dist/doc/latex/substances/substances-examples.sub create mode 100644 Master/texmf-dist/doc/latex/substances/substances_en.pdf create mode 100644 Master/texmf-dist/doc/latex/substances/substances_en.tex create mode 100644 Master/texmf-dist/tex/latex/substances/substances-default.def create mode 100644 Master/texmf-dist/tex/latex/substances/substances.sty create mode 100644 Master/tlpkg/tlpsrc/substances.tlpsrc (limited to 'Master') diff --git a/Master/texmf-dist/doc/latex/substances/README b/Master/texmf-dist/doc/latex/substances/README new file mode 100644 index 00000000000..e0936ece139 --- /dev/null +++ b/Master/texmf-dist/doc/latex/substances/README @@ -0,0 +1,32 @@ +-------------------------------------------------------------------------- +the SUBSTANCES package + + A Chemical Database + +2012/07/22 v0.1 +-------------------------------------------------------------------------- +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. +-------------------------------------------------------------------------- \ No newline at end of file diff --git a/Master/texmf-dist/doc/latex/substances/substances-examples.sub b/Master/texmf-dist/doc/latex/substances/substances-examples.sub new file mode 100644 index 00000000000..e7aa9a9fe7d --- /dev/null +++ b/Master/texmf-dist/doc/latex/substances/substances-examples.sub @@ -0,0 +1,301 @@ +% -------------------------------------------------------------------------- +% 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. +% -------------------------------------------------------------------------- +% +% example database to the package `substances' +% +\DeclareChemIUPAC\normal{\textit{n}} +\DeclareSubstance{NaCl}{ + name = Sodium\|chloride , + sort = Sodiumchloride , + formula = NaCl , + CAS = 7647-14-5, + mass = 58.44 , + mp = 801 , + bp = 1465 , + phase = solid , + density = 2.17 +} + +\DeclareSubstance{HCl}{ + name = Hydro\|chloric Acid , + formula = HCl , + CAS = 7647-01-0 , + pictograms = {acid,exclam} , + H = {314,335} , + P = {260,301+330+331,303+361+353,305+351+338,405,501} , + mass = 36.46 , + density = 1.19 , + mp = -30 +} + +\DeclareSubstance{HNO3}{ + name = Nitric Acid , + sort = Nitric Acid , + formula = HNO3 , + CAS = 7697-37-2 , + PubChem = 944 , + mass = 63.01 , + density = 1.51 , + mp = -42 , + bp = 86 , + pKa = -1.37 , + pictograms = {flame-O,acid} , + H = {272,314} , + P = {220,280,305+351+338,310} +} + +\DeclareSubstance{H2SO4}{ + name = Sulfuric Acid , + sort = Sulfuric Acid , + formula = H2SO4 , + structure = {H-[:30]\Lewis{26,O}-S(=[2]\Lewis{13,O})(=[6]\Lewis{57,O})-\Lewis{26,O}-[:-30]H} , + CAS = 7664-93-9 , + PubChem = 1118 , + mass = 98.08 , + density = 1.8356 , + mp = 10.38 , + bp = 279.6 , + phase = liquid , + pKa = -3.0 , + pKa1 = -3.0 , + pKa2 = 1.9 , + pictograms = acid , + H = 314 , + P = {280,301+330+331,309,310,305+351+338} , + LD50 = 510 +} + +\DeclareSubstance{methane}{ + name = Methane , + sort = Methane , + formula = CH4 , + structure = H-C(-[2]H)(-[6]H)-H , + CAS = 74-82-8 , + PubChem = 297 , + pictograms = {flame,bottle} , + H = 220 , + P = {210,377,381,410+403} , + mass = 16.04 , + density = 0.72e-3 , + mp = -182 , + bp = -162 , + phase = gaseous +} + +\DeclareSubstance{ethane}{ + name = Ethane , + sort = Ethane , + formula = C2H6 , + structure = H-C(-[2]H)(-[6]H)-C(-[2]H)(-[6]H)-H , + CAS = 74-84-0 , + PubChem = 6324 , + pictograms = {flame,bottle} , + H = 220 , + P = {210,377,381,403} , + mass = 30.07 , + density = 0.72e-3 , + mp = -183 , + bp = -89 , + phase = gaseous +} + +\DeclareSubstance{propane}{ + name = Propane , + sort = Propane , + formula = C3H8 , + structure = H-C(-[2]H)(-[6]H)-C(-[2]H)(-[6]H)-C(-[2]H)(-[6]H)-H , + CAS = 74-98-6 , + pictograms = {flame,bottle} , + H = 220 , + P = {201,377,381,403} , + mass = 44.10 , + density = 2.01e-3 , + mp = -188 , + bp = -42 , + phase = gaseous +} + +\DeclareSubstance{butane}{ + name = Butane , + sort = Butane , + alt = \normal\-Butane , + altsort = n-Butane , + formula = C4H10 , + structure = H-C(-[2]H)(-[6]H)-C(-[2]H)(-[6]H)-C(-[2]H)(-[6]H)-C(-[2]H)(-[6]H)-H , + CAS = 106-97-8 , + PubChem = 7843 , + pictograms = {flame,bottle} , + H = {220,280} , + P = {201,377,381,403} , + mass = 58.12 , + density = 2.71e-3 , + mp = -138.3 , + bp = -0.5 , + phase = gaseous +} + +\DeclareSubstance{pentane}{ + name = Pentane , + sort = Pentane , + alt = \normal\-Pentane , + altsort = n-Pentane , + formula = C5H12 , + structure = H-C(-[2]H)(-[6]H)-C(-[2]H)(-[6]H)-C(-[2]H)(-[6]H)-C(-[2]H)(-[6]H)-C(-[2]H)(-[6]H)-H , + CAS = 109-66-0 , + PubChem = 8003 , + pictograms = {flame,health,exclam,aqpol} , + H = {225,304,336,411} , + EUH = 066 , + P = {273,301+310,331,403+235} , + mass = 72.15 , + density = 0.63 , + mp = -130 , + bp = 36 , + phase = liquid +} + +\DeclareSubstance{hexane}{ + name = Hexane , + sort = Hexane , + alt = \normal\-Hexane , + altsort = n-Hexane , + formula = C6H14 , + structure = -[:30]-[:-30]-[:30]-[:-30]-[:30] , + CAS = 110-54-3 , + PubChem = 8058 , + pictograms = {flame,health,exclam,aqpol} , + H = {225,361f,304,373,315,336,411} , + P = {210,240,273,301+310,331,302+352,403+235} , + mass = 86.18 , + density = 0.66 , + mp = -95 , + bp = 69 , + phase = liquid +} + +\DeclareSubstance{heptane}{ + name = Heptane , + sort = Heptane , + alt = \normal\-Heptane , + altsort = n-Heptane , + formula = C7H16 , + structure = -[:30]-[:-30]-[:30]-[:-30]-[:30]-[:-30] , + CAS = 142-82-5 , + PubChem = 8900 , + pictograms = {flame,health,exclam,aqpol} , + H = {225,304,315,336,410} , + P = {210,273,301+310,331,302+352,403+235} , + mass = 100.21 , + density = 0.68 , + mp = -91 , + bp = 98 , + phase = liquid +} + +\DeclareSubstance{octane}{ + name = Octane , + sort = Octane , + alt = \normal\-Octane , + altsort = n-Octane , + formula = C8H18 , + structure = -[:30]-[:-30]-[:30]-[:-30]-[:30]-[:-30]-[:30] , + CAS = 111-65-9 , + PubChem = 356 , + pictograms = {flame,health,exclam,aqpol} , + H = {225,304,315,336,410} , + P = {210,273,301+330+331,302+352} , + mass = 114.23 , + density = 0.70 , + mp = -56.8 , + bp = 126 , + phase = liquid +} + +\DeclareSubstance{nonane}{ + name = Nonane , + sort = Nonane , + alt = \normal\-Nonane , + altsort = n-Nonane , + formula = C9H20 , + structure = -[:30]-[:-30]-[:30]-[:-30]-[:30]-[:-30]-[:30]-[:-30] , + CAS = 111-84-2 , + PubChem = 8141 , + pictograms = {flame,exclam,health} , + H = {226,304,315,319,332,336,413} , + P = {261,301+310,305+351+338,331} , + mass = 128.26 , + density = 0.72 , + mp = -54 , + bp = 151 , + phase = liquid +} + +\DeclareSubstance{decane}{ + name = Decane , + sort = Decane , + alt = \normal\-Decane , + altsort = n-Decane , + formula = C10H22 , + structure = -[:30]-[:-30]-[:30]-[:-30]-[:30]-[:-30]-[:30]-[:-30]-[:30] , + CAS = 124-18-5 , + PubChem = 15600 , + pictograms = {flame,health} , + H = {226,304} , + P = {210,260,262,301+310,331} , + mass = 142.29 , + density = 0.73 , + mp = -29.7 , + bp = 174 , + phase = liquid +} + +\DeclareSubstance{acetone}{ + name = Propanone , + sort = Propanone , + alt = Acetone , + altsort = Acetone , + formula = C3H6O , + structure = {-[:30](=[2]\Lewis{13,O})-[:-30]} , + CAS = 67-64-1 , + PubChem = 180 , + mass = 58.08 , + density = 0.79 , + mp = -95 , + bp = 56 , + pictograms = {flame,exclam} , + H = {225,319,336} , + EUH = {066} , + P = {210,233,305+351+338} , + LD50 = 5800 +} + +\endinput \ No newline at end of file diff --git a/Master/texmf-dist/doc/latex/substances/substances_en.pdf b/Master/texmf-dist/doc/latex/substances/substances_en.pdf new file mode 100644 index 00000000000..da9d3aa1764 Binary files /dev/null and b/Master/texmf-dist/doc/latex/substances/substances_en.pdf differ diff --git a/Master/texmf-dist/doc/latex/substances/substances_en.tex b/Master/texmf-dist/doc/latex/substances/substances_en.tex new file mode 100644 index 00000000000..2484e6c1527 --- /dev/null +++ b/Master/texmf-dist/doc/latex/substances/substances_en.tex @@ -0,0 +1,605 @@ +% 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}{