From ca8b37e0e9b1a89ad33804cfb8404f919c01b1f0 Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Wed, 21 Oct 2015 21:08:04 +0000 Subject: substances (21oct15) git-svn-id: svn://tug.org/texlive/trunk@38684 c570f23f-e606-0410-a88d-b1316a301751 --- Master/texmf-dist/doc/latex/substances/README | 6 +- .../doc/latex/substances/substances-examples.sub | 27 +- .../doc/latex/substances/substances_en.pdf | Bin 791771 -> 576775 bytes .../doc/latex/substances/substances_en.tex | 1030 ++++++++++---------- 4 files changed, 550 insertions(+), 513 deletions(-) (limited to 'Master/texmf-dist/doc/latex/substances') diff --git a/Master/texmf-dist/doc/latex/substances/README b/Master/texmf-dist/doc/latex/substances/README index e0936ece139..a7dbfee3982 100644 --- a/Master/texmf-dist/doc/latex/substances/README +++ b/Master/texmf-dist/doc/latex/substances/README @@ -3,13 +3,13 @@ the SUBSTANCES package A Chemical Database -2012/07/22 v0.1 +2015/10/21 v0.2 -------------------------------------------------------------------------- Clemens Niederberger Web: https://bitbucket.org/cgnieder/substances/ E-Mail: contact@mychemistry.eu -------------------------------------------------------------------------- -Copyright 2012 Clemens Niederberger +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 @@ -29,4 +29,4 @@ The substances package consists of the files -------------------------------------------------------------------------- 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 index e7aa9a9fe7d..79a8f6b5434 100644 --- a/Master/texmf-dist/doc/latex/substances/substances-examples.sub +++ b/Master/texmf-dist/doc/latex/substances/substances-examples.sub @@ -8,7 +8,7 @@ % Web: https://bitbucket.org/cgnieder/substances/ % E-Mail: contact@mychemistry.eu % -------------------------------------------------------------------------- -% Copyright 2012 Clemens Niederberger +% 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 @@ -32,9 +32,11 @@ % % example database to the package `substances' % -\DeclareChemIUPAC\normal{\textit{n}} +\SubstancesDatabase{substances-example} + +\ProvideChemIUPAC\normal{\textit{n}} \DeclareSubstance{NaCl}{ - name = Sodium\|chloride , + name = Sodium|chloride , sort = Sodiumchloride , formula = NaCl , CAS = 7647-14-5, @@ -46,7 +48,8 @@ } \DeclareSubstance{HCl}{ - name = Hydro\|chloric Acid , + name = Hydro|chloric Acid , + sort = Hydrochloric Acid , formula = HCl , CAS = 7647-01-0 , pictograms = {acid,exclam} , @@ -147,7 +150,7 @@ \DeclareSubstance{butane}{ name = Butane , sort = Butane , - alt = \normal\-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 , @@ -166,7 +169,7 @@ \DeclareSubstance{pentane}{ name = Pentane , sort = Pentane , - alt = \normal\-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 , @@ -186,7 +189,7 @@ \DeclareSubstance{hexane}{ name = Hexane , sort = Hexane , - alt = \normal\-Hexane , + alt = \normal-Hexane , altsort = n-Hexane , formula = C6H14 , structure = -[:30]-[:-30]-[:30]-[:-30]-[:30] , @@ -205,7 +208,7 @@ \DeclareSubstance{heptane}{ name = Heptane , sort = Heptane , - alt = \normal\-Heptane , + alt = \normal-Heptane , altsort = n-Heptane , formula = C7H16 , structure = -[:30]-[:-30]-[:30]-[:-30]-[:30]-[:-30] , @@ -224,7 +227,7 @@ \DeclareSubstance{octane}{ name = Octane , sort = Octane , - alt = \normal\-Octane , + alt = \normal-Octane , altsort = n-Octane , formula = C8H18 , structure = -[:30]-[:-30]-[:30]-[:-30]-[:30]-[:-30]-[:30] , @@ -243,7 +246,7 @@ \DeclareSubstance{nonane}{ name = Nonane , sort = Nonane , - alt = \normal\-Nonane , + alt = \normal-Nonane , altsort = n-Nonane , formula = C9H20 , structure = -[:30]-[:-30]-[:30]-[:-30]-[:30]-[:-30]-[:30]-[:-30] , @@ -262,7 +265,7 @@ \DeclareSubstance{decane}{ name = Decane , sort = Decane , - alt = \normal\-Decane , + alt = \normal-Decane , altsort = n-Decane , formula = C10H22 , structure = -[:30]-[:-30]-[:30]-[:-30]-[:30]-[:-30]-[:30]-[:-30]-[:30] , @@ -298,4 +301,4 @@ LD50 = 5800 } -\endinput \ No newline at end of file +\endinput diff --git a/Master/texmf-dist/doc/latex/substances/substances_en.pdf b/Master/texmf-dist/doc/latex/substances/substances_en.pdf index da9d3aa1764..bfd21bd18de 100644 Binary files a/Master/texmf-dist/doc/latex/substances/substances_en.pdf 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 index 2484e6c1527..b54c70a3303 100644 --- a/Master/texmf-dist/doc/latex/substances/substances_en.tex +++ b/Master/texmf-dist/doc/latex/substances/substances_en.tex @@ -10,7 +10,7 @@ % Web: https://bitbucket.org/cgnieder/substances/ % E-Mail: contact@mychemistry.eu % -------------------------------------------------------------------------- -% Copyright 2012 Clemens Niederberger +% 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 @@ -37,569 +37,603 @@ % 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 -} +\documentclass[load-preamble+]{cnltx-doc} +\usepackage[utf8]{inputenc} +\usepackage[index]{substances} + \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{imakeidx} +\makeindex[name=\jobname-chem,title=Chemicals] + +\setcnltx{ + package = {substances}, + url = http://www.mychemistry.eu/forums/forum/substances/ , + authors = Clemens Niederberger , + email = contact@mychemistry.eu , + abstract = {% + 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. + } , + quote-format = \small\biolinumLF , + add-cmds = { + @CAS, @EC, + ac, AllSubstancesClist, AllSubstancesSequence, arraybackslash, + bottomrule, + CAS, celsius, centi, ch, chem, chemfig, chemsetup, cmc, cubic, + DeclareSubstance, DeclareSubstanceProperty, + EC, endinput, + ForAllSubstancesDo, + GetSubstanceProperty, ghs, ghspic, ghspictograms, ghsstatements, gram, + IfSubstanceExistF, IfSubstanceExistT, IfSubstanceExistTF, + IfSubstanceFieldF, IfSubstanceFieldT, IfSubstanceFieldTF, + IfSubstancePropertyF, IfSubstancePropertyT, IfSubstancePropertyTF, + iupac, + kilo, + Lewis, LoadSubstances, + metre, midrule, milli, MolMass, + NewDocumentCommand, newindex, normal, num, + ProvideChemIUPAC, + per, printindex, + RetrieveSubstanceProperty, + SI, sisetup, SubstanceIndexAltEntry, SubstanceIndexNameAltEntry, + SubstanceIndexNameEntry, SubstancesDatabase, SubstancesStyle, + toprule + } , + index-setup = { level = \section , othercode = \small } } + +\defbibheading{bibliography}{\section{References}} + \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 + +\expandafter\def\csname libertine@figurestyle\endcsname{LF} +\usepackage[libertine]{newtxmath} +\expandafter\def\csname libertine@figurestyle\endcsname{OsF} + +\usepackage[biblatex]{embrac} \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.}} +\acsetup{short-format=\scshape} +\DeclareAcronym{CAS}{ + short = cas , + long = Chemical Abstract Service +} +\DeclareAcronym{EC}{ + short = ec , + long = European Commission Number +} +\DeclareAcronym{LD50}{ + short = ld50 , + long = Median Lethal Dose +} +\DeclareAcronym{IUPAC}{ + short = iupac , + long = International Union of Pure and Applied Chemistry +} +\DeclareAcronym{ghs}{ + short = ghs , + long = Globally Harmonized System of Classification and Labelling of + Chemicals +} \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 } +\DeclareExpandableDocumentCommand \substancesdatabase {m} + { \__substances_database:n {#1} } +\DeclareExpandableDocumentCommand \substancesstyle {m} + { \__substances_style:n {#1} } \ExplSyntaxOff + +\newidxcmd\substyle{\texttt{#1}}[ (\substances\ style)] + \begin{document} +\part{Preliminaries} + \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.'' +\license -\substances loads and needs the following packages: \paket{expl3}, -\paket{xparse}, \paket{xtemplate} and \paket{l3keys2e}. It also needs the -chemistry package \paket{chemmacros}. +\substances\ loads and needs the following packages: +\pkg{expl3}~\cite{bnd:l3kernel}, \pkg{xparse}, \pkg{xtemplate} and +\pkg{l3keys2e}~\cite{bnd:l3packages}. It also needs the chemistry packages +\pkg{chemmacros}~\cite{pkg:chemmacros}, \pkg{chemfig}~\cite{pkg:chemfig} and +\pkg{ghsystem}~\cite{pkg:ghsystem}. \section{About} -The \substances package allows you to create a database like file that contains +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}{