diff options
author | Karl Berry <karl@freefriends.org> | 2016-03-08 22:33:02 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2016-03-08 22:33:02 +0000 |
commit | edc6f5528c756c35762db362bc713fd19d9285f9 (patch) | |
tree | 1f2032669313edec501d7ccda53a1f89553d5c06 /Master/texmf-dist | |
parent | 2198545a4a503b96c2d806d85c71439b6ac7fe3f (diff) |
chemmacros (8mar16)
git-svn-id: svn://tug.org/texlive/trunk@39973 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist')
24 files changed, 363 insertions, 100 deletions
diff --git a/Master/texmf-dist/doc/latex/chemmacros/README b/Master/texmf-dist/doc/latex/chemmacros/README index 176c767b95f..8538206e38c 100644 --- a/Master/texmf-dist/doc/latex/chemmacros/README +++ b/Master/texmf-dist/doc/latex/chemmacros/README @@ -1,5 +1,5 @@ -------------------------------------------------------------------------- -the CHEMMACROS package v5.4 2016/02/10 +the CHEMMACROS package v5.5 2016/03/08 comprehensive support for typesetting chemistry documents diff --git a/Master/texmf-dist/doc/latex/chemmacros/chemmacros_en.pdf b/Master/texmf-dist/doc/latex/chemmacros/chemmacros_en.pdf Binary files differindex a6796a8b15b..3865ed3c4fc 100644 --- a/Master/texmf-dist/doc/latex/chemmacros/chemmacros_en.pdf +++ b/Master/texmf-dist/doc/latex/chemmacros/chemmacros_en.pdf diff --git a/Master/texmf-dist/doc/latex/chemmacros/chemmacros_en.tex b/Master/texmf-dist/doc/latex/chemmacros/chemmacros_en.tex index aab0ed78b71..9fa2be7bd79 100644 --- a/Master/texmf-dist/doc/latex/chemmacros/chemmacros_en.tex +++ b/Master/texmf-dist/doc/latex/chemmacros/chemmacros_en.tex @@ -69,7 +69,7 @@ invacuo, isotope, iupac, Ka, Kb, Kw, laevus, Lfi, listofreactions, lqd, - mch, mega, meta, mhName, + makepolymerdelims, mch, mega, meta, mhName, NewChemArrow, NewChemBond, NewChemBondAlias, NewChemCharge, NewChemEqConstant, newchemgreekmapping, NewChemIUPAC, NewChemIUPACShorthand, NewChemLatin, NewChemMacroset, NewChemNMR, @@ -196,7 +196,7 @@ } \chemsetup{ - modules = all , + modules = {all,polymers} , greek = newtx , formula = chemformula , chemformula/format = \libertineLF @@ -325,6 +325,11 @@ \newname\hensel{Martin Hensel} \newname\pedersen{Bj\o rn Pedersen} +\newcommand*\iupaccs[3][]{% + \command{#2}[\quad\iupac{\csuse{#2}}] + #3\ifblank{#1}{}{\ifblank{#3}{}{ }An alias for this command is \cs{#1}.}% +} + % \undef\module % \undef\moduleidx \newidxcmd\chemmodule{\code{#1}}[ (module)] @@ -1135,16 +1140,11 @@ Attachments to hetero atoms and added hydrogen atoms are indicated by italic letters~\cite{iupac:greenbook}. \chemmacros\ defines a few macros for the most common ones. \begin{commands} - \command{hydrogen}[\quad\iupac{\hydrogen}] - The italic H for hydrogen. (An alias for this command is \cs{H}.) - \command{oxygen}[\quad\iupac{\oxygen}] - The italic O for oxygen. (An alias for this command is \cs{O}.) - \command{nitrogen}[\quad\iupac{\nitrogen}] - The italic N for nitrogen. (An alias for this command is \cs{N}.) - \command{sulfur}[\quad\iupac{\sulfur}] - The italic S for sulfur. (An alias for this command is \cs{Sf}.) - \command{phosphorus}[\quad\iupac{\phosphorus}] - The italic P for phosphorus. (An alias for this command is \cs{P}.) + \iupaccs[H]{hydrogen}{The italic H for hydrogen.} + \iupaccs[O]{oxygen}{The italic O for oxygen.} + \iupaccs[N]{nitrogen}{The italic N for nitrogen.} + \iupaccs[Sf]{sulfur}{The italic S for sulfur.} + \iupaccs[P]{phosphorus}{The italic P for phosphorus.} \end{commands} \begin{example}[side-by-side] \iupac{\nitrogen-methyl|benz|amide} @@ -1159,10 +1159,8 @@ most common ones. \command{cip}[\marg{conf}] Typeset Cahn-Ingol-Prelog descriptors, \eg: \cs{cip}\Marg{R,S} \cip{R,S}. \meta{conf} may be a csv list of entries. - \command{rectus}[\quad\iupac{\rectus}] - Typeset rectus descriptor. (An alias for this command is \cs{R}.) - \command{sinister}[\quad\iupac{\sinister}] - Typeset sinister descriptor. (An alias for this command is \cs{S}.) + \iupaccs[R]{rectus}{The rectus descriptor.} + \iupaccs[S]{sinister}{The sinister descriptor.} \end{commands} Both these commands and the entgegen/zusammen descriptors get a small @@ -1175,10 +1173,8 @@ be changed through the following option: \paragraph{Fischer} \begin{commands} - \command{dexter}[\quad\iupac{\dexter}] - Typeset dexter descriptor. (An alias for this command is \cs{D}.) - \command{laevus}[\quad\iupac{\laevus}] - Typeset laevus descriptor. (An alias for this command is \cs{L}.) + \iupaccs[D]{dexter}{The dexter descriptor.} + \iupaccs[L]{laevus}{The laevus descriptor.} \end{commands} \paragraph{cis/trans, zusammen/entgegen, syn/anti \& tert} @@ -1579,7 +1575,7 @@ modules. In the macro descriptions below \TF\ denotes that a \code{T}, an (\expandablesymbol) also the predicate variant is available. \begin{commands} \expandable\command*{chemmacros_if_loaded:nn}[\TF\ - \Marg{\meta{package}|\meta{class}} \marg{name} \marg{true} \marg{false}] + \Marg{package|class} \marg{name} \marg{true} \marg{false}] Checks if package (or class) \meta{name} has been loaded. Also works after begin document. \expandable\command*{chemmacros_if_package_loaded:n}[\TF\ \marg{name} @@ -1597,7 +1593,7 @@ modules. In the macro descriptions below \TF\ denotes that a \code{T}, an \command*{chemmacros_allow_break:} Inserts a penalty of \num{0}. \command*{chemmacros_skip_nobreak:N}[ \meta{skip/length variable}] - Insert a horizontal skip while linebreak is disallowed. + Insert a horizontal skip where a linebreak is disallowed. \expandable\command*{chemmacros_if_is_int:n}[\TF\ \marg{input} \marg{true} \marg{false}] Checks if \meta{input} is an integer or something else. @@ -1605,7 +1601,7 @@ modules. In the macro descriptions below \TF\ denotes that a \code{T}, an Checks if the current font weight is one of \chemboldchecks{or}. \command*{chemmacros_bold:n}[ \marg{text}] Checks if the current font weight is bold and if yes places \meta{text} in - \cs*{textbf} if in text mode or in \cs*{bm} if in math mode. If false + \cs*{textbf} if in text mode or in \cs*{bm} if in math mode. If no \meta{text} simply is placed in the input stream as is. \command*{chemmacros_text:n}[ \marg{text}] Ensures that \meta{text} is placed in text mode. @@ -1822,8 +1818,8 @@ in \chemmacros. A translation key is a key which is understood by the \pkg{translations} package and its commands like \cs*{GetTranslation}. For each key at least the English fallback translation is provided, for most also the German translation is provided. For a few keys also other translations -are provided. If you find that your translation is missing you can provide it -in the preamble: +are provided. If you find that a translation for your language is missing you +can provide it in the preamble: \begin{commands} \command*{DeclareTranslation}[\marg{language}\marg{key}\marg{translation}] Defines a translation of key \meta{key} for the language \meta{language}. @@ -2127,6 +2123,70 @@ changed. \vspace{1cm} \end{example} +\subsection{The \chemmodule*{polymers} Module}\label{sec:polymers-module} +The\sinceversion{5.5} \chemmodule{polymers} module loads the +\chemmodule{nomenclature} and the \chemmodule{tikz} modules. + +\subsubsection{Nomenclature} + +The \chemmodule{polymers} module defines a number of \ac{iupac} macros for +usage inside \cs{iupac} which are used in polymer chemistry. + +\paragraph{Copolymers} +\begin{commands} + \iupaccs[co]{copolymer}{unspecified copolymer.} + \iupaccs[stat]{statistical}{statistical copolymer.} + \iupaccs[ran]{random}{random copolymer.} + \iupaccs[alt]{alternating}{alternating copolymer.} + \iupaccs[per]{periodic}{periodic copolymer.} + \iupaccs{block}{block copolymer.} + \iupaccs{graft}{graft copolymer.} +\end{commands} + +\paragraph{Non-linear (Co) Polymers and Polymer Assemblies} +\begin{commands} + \iupaccs{blend}{The blend qualifier.} + \iupaccs{comb}{The comb qualifier.} + \iupaccs[compl]{complex}{The complex qualifier.} + \iupaccs[cyclo]{cyclic}{The cyclic qualifier.} + \iupaccs{branch}{The branch qualifier.} + \iupaccs[net]{network}{The network qualifier.} + \iupaccs[ipn]{ipnetwork}{The interpenetrating network qualifier.} + \iupaccs[sipn]{sipnetwork}{The semi-interpenetrating network qualifier.} + \iupaccs{star}{The star qualifier.} +\end{commands} + +\subsubsection{Polymer Denotations in \pkg*{chemfig}'s Molecules} +The \pkg{chemfig} manual proposes some code defining the macros +\cs*{setpolymerdelim} and \cs*{makebraces} which make it possible to add +delimiters to \pkg{chemfig} molecules. The \chemmodule{polymers} module +implements the following macro based on the same idea: +\begin{commands} + \command{makepolymerdelims}[\oarg{options}\marg{height}\oarg{depth}\marg{opening + node}\marg{closing node}] + The value of \meta{depth} is the same as \meta{height} unless it is + specified explicitly. \meta{opening node} and \meta{closing node} are the + names of \TikZ' nodes where the delimites are placed. +\end{commands} +\begin{options} + \keychoice{delimiters}{\Marg{\meta{left}\meta{right}}}\Module{polymers}\Default{[]} + This option demands two tokens as argument, the first being the opening + brace, the second the closing brace. A dot (\code{.}) denotes an empty + delimiter. + \keyval{subscript}{subscript}\Module{polymers}\Default{\$n\$} + Subscript to the right delimiter. + \keyval{superscript}{superscript}\Module{polymers} + Superscript to the right delimiter. +\end{options} + +\begin{example} + \setatomsep{2em} + \chemfig{-[@{op,.75}]CH_2-CH(-[6]Cl)-[@{cl,0.25}]} + \makepolymerdelims{5pt}[27pt]{op}{cl} + \chemfig{-[@{op,.75}]CH_2-CH(-[6]Cl)-[@{cl,0.25}]} + \makepolymerdelims[delimiters=()]{5pt}[27pt]{op}{cl} +\end{example} + \subsection{The \chemmodule*{reactions} Module}\label{sec:reactions-module} The \chemmodule{reactions} module loads the \chemmodule{chemformula} module and the \pkg{mathtools} package~\cite{pkg:mathtools}. @@ -3375,15 +3435,19 @@ manually maintained list of the modules that are loaded by it. If you decide to write your module \chemmodule*{foo} using expl3 and add options you want to be able to set using -\cs{chemsetup}\Oarg{foo}\marg{options} please make sure you define them the -following way: -\begin{sourcecode} - \keys_define:nn {chemmacros/foo} { - ... - } -\end{sourcecode} -Also (especially if you consider submitting the module, see -section~\vref{sec:submitting-module}) please follow the expl3 naming +\cs{chemsetup}\Oarg{foo}\marg{options} please make sure you define (and set) +them with the following macros: +\begin{commands} + \command*{chemmacros_define_keys:nn}[ \marg{module} \marg{key definitions}] + Define l3keys options for the module \meta{module}. This is a wrapper for + \cs*{keys_define:nn} \Marg{chemmacros/\meta{module}} \marg{key + definitions}. + \command*{chemmacros_set_keys:nn}[ \marg{module} \marg{input}] + Sets l3keys options for the module \meta{module}. This is a wrapper for + \cs*{keys_set:nn} \Marg{chemmacros/\meta{module}} \marg{input}. +\end{commands} +Also (\emph{especially if you consider submitting the module, see + section~\vref{sec:submitting-module}}) please follow the expl3 naming conventions for variables and functions, \ie, use \code{chemmacros} as expl3 module name: \begin{sourcecode} diff --git a/Master/texmf-dist/tex/latex/chemmacros/chemmacros.module.acid-base.code.tex b/Master/texmf-dist/tex/latex/chemmacros/chemmacros.module.acid-base.code.tex index 97e9e05750c..2bb4a557d6e 100644 --- a/Master/texmf-dist/tex/latex/chemmacros/chemmacros.module.acid-base.code.tex +++ b/Master/texmf-dist/tex/latex/chemmacros/chemmacros.module.acid-base.code.tex @@ -60,7 +60,7 @@ \cs_new_protected:Npn #1 {} \prop_put:Nnn \l__chemmacros_eq_constants_prop {#1} {#2} \tl_new:c {l__chemmacros_#2_tl} - \keys_define:nn {chemmacros/acid-base} + \chemmacros_define_keys:nn {acid-base} { #2 .tl_set:c = l__chemmacros_#2_tl } } \tl_set:cn @@ -90,11 +90,11 @@ \chemmacros_if_compatiblity:nnT {>=} {5.4} { - \keys_define:nn {chemmacros/acid-base} + \chemmacros_define_keys:nn {acid-base} { eq-constant .tl_set:N = \l__chemmacros_equilibrium_constant_tl } } -\keys_define:nn {chemmacros/acid-base} +\chemmacros_define_keys:nn {acid-base} { p-style .choice: , p-style / slanted .code:n = \cs_set_eq:NN \chemmacros_p_style:n \textsl , diff --git a/Master/texmf-dist/tex/latex/chemmacros/chemmacros.module.all.code.tex b/Master/texmf-dist/tex/latex/chemmacros/chemmacros.module.all.code.tex index b90b5ee39ae..89bec822113 100644 --- a/Master/texmf-dist/tex/latex/chemmacros/chemmacros.module.all.code.tex +++ b/Master/texmf-dist/tex/latex/chemmacros/chemmacros.module.all.code.tex @@ -25,15 +25,16 @@ % % The Current Maintainer of this work is Clemens Niederberger. % -------------------------------------------------------------------------- -\ChemModule{all}{2015/10/14 load all libraries} +\ChemModule{all}{2016/03/07 load all libraries} \msg_new:nnn {chemmacros} {all-modules} { You~ are~ loading~ *all*~ of~ chemmacros'~ module~ through~ the~ `all'~ module!~ This~ is~ fine~ but~ not~ really~ encouraged.~ Do~ really~ need~ all~ of~ `isotopes' ,~ `mechanisms' ,~ `newman' ,~ `nomenclature' ,~ - `orbital' ,~ `particles' ,~ `phases' ,~ `reactions' ,~ `redox' ,~ `scheme' - ,~ `spectroscopy' ,~ `symbols' ,~ `thermodynamics' ,~ `units' ...? + `orbital' ,~ `particles' ,~ `phases' ,~ `polymers' ,~ `reactions' ,~ + `redox' ,~ `scheme' ,~ `spectroscopy' ,~ `symbols' ,~ `thermodynamics' ,~ + `units' ...? } \chemmacros_load_modules:n @@ -53,6 +54,7 @@ orbital , particles , phases , + polymers , reactions , redox , scheme , @@ -70,3 +72,4 @@ 2015/10/14 - add info message discouraging the usage of this module - add `errorcheck' module +2016/03/07 - add `polymer' module diff --git a/Master/texmf-dist/tex/latex/chemmacros/chemmacros.module.base.code.tex b/Master/texmf-dist/tex/latex/chemmacros/chemmacros.module.base.code.tex index 1f20afb1e25..1cfdfaf7a30 100644 --- a/Master/texmf-dist/tex/latex/chemmacros/chemmacros.module.base.code.tex +++ b/Master/texmf-dist/tex/latex/chemmacros/chemmacros.module.base.code.tex @@ -151,6 +151,27 @@ } % -------------------------------------------------------------------------- +\cs_new_protected:Npn \chemmacros_define_keys:nn #1#2 + { \keys_define:nn {chemmacros/#1} {#2} } +\cs_generate_variant:Nn \chemmacros_define_keys:nn {x} + +\cs_new_protected:Npn \chemmacros_set_keys:nn #1#2 + { \keys_set:nn {chemmacros/#1} {#2} } +\cs_generate_variant:Nn \chemmacros_set_keys:nn {x,nx} + +\cs_new_protected:Npn \chemmacros_set_keys_groups:nnn #1#2#3 + { \keys_set_groups:nnn {chemmacros/#1} {#2} {#3} } + +\cs_new_protected:Npn \chemmacros_set_keys_filter:nnn #1#2#3 + { \keys_set_filter:nnn {chemmacros/#1} {#2} {#3} } + +\cs_new_protected:Npn \chemmacros_define_global_keys:n #1 + { \keys_define:nn {chemmacros} {#1} } + +\cs_new_protected:Npn \chemmacros_set_global_keys:n #1 + { \keys_set:nn {chemmacros} {#1} } + +% -------------------------------------------------------------------------- % basic tools: \cs_new:Npn \chemmacros_remove_backslash:N #1 { \exp_after:wN \use_none:n \token_to_str:N #1 } @@ -295,7 +316,7 @@ { \keys_set:nn {chemmacros/#1} {#2} } } -\keys_define:nn {chemmacros} +\chemmacros_define_global_keys:n { modules .code:n = \chemmacros_load_modules:n {#1} } % -------------------------------------------------------------------------- @@ -316,7 +337,7 @@ { \RequirePackage {#2} [#3] } { \RequirePackage [#1] {#2} [#3] } } - \keys_define:nn {chemmacros} + \chemmacros_define_global_keys:n { #2 .choice: , #2 / unknown .code:n = @@ -337,3 +358,4 @@ \chemmacros_if_document:TF 2015/10/14 - load `errorcheck' module 2016/02/09 - starred version of \NewChemMacroset +2016/03/07 - \chemmacros_define_keys:nn and friends diff --git a/Master/texmf-dist/tex/latex/chemmacros/chemmacros.module.charges.code.tex b/Master/texmf-dist/tex/latex/chemmacros/chemmacros.module.charges.code.tex index 0ba5fc00519..48bbf1d3a91 100644 --- a/Master/texmf-dist/tex/latex/chemmacros/chemmacros.module.charges.code.tex +++ b/Master/texmf-dist/tex/latex/chemmacros/chemmacros.module.charges.code.tex @@ -44,7 +44,7 @@ \bool_set_true:N \l__chemmacros_circled_chem_bool -\keys_define:nn { chemmacros / charges } +\chemmacros_define_keys:nn {charges} { circletype .choice: , circletype / math .code:n = @@ -137,7 +137,7 @@ \cs_new_protected:Npn \fsscrp { \ensuremath { \scriptscriptstyle \chemmacros_formal_plus: } } -\keys_define:nn {chemmacros/charges} +\chemmacros_define_keys:nn {charges} { partial-format .tl_set:N = \l__chemmacros_partial_charge_format_tl } diff --git a/Master/texmf-dist/tex/latex/chemmacros/chemmacros.module.chemformula.code.tex b/Master/texmf-dist/tex/latex/chemmacros/chemmacros.module.chemformula.code.tex index 20e8be12ba9..f9bddf7f04f 100644 --- a/Master/texmf-dist/tex/latex/chemmacros/chemmacros.module.chemformula.code.tex +++ b/Master/texmf-dist/tex/latex/chemmacros/chemmacros.module.chemformula.code.tex @@ -107,7 +107,7 @@ \EndChemCompatibility \ChemCompatibilityFrom{5.1} -\keys_define:nn {chemmacros} +\chemmacros_define_global_keys:n { formula .choices:nn = { chemformula , mhchem } diff --git a/Master/texmf-dist/tex/latex/chemmacros/chemmacros.module.errorcheck.code.tex b/Master/texmf-dist/tex/latex/chemmacros/chemmacros.module.errorcheck.code.tex index 500efe139b9..d6a89e4eb6d 100644 --- a/Master/texmf-dist/tex/latex/chemmacros/chemmacros.module.errorcheck.code.tex +++ b/Master/texmf-dist/tex/latex/chemmacros/chemmacros.module.errorcheck.code.tex @@ -25,7 +25,7 @@ % % The Current Maintainer of this work is Clemens Niederberger. % -------------------------------------------------------------------------- -\ChemModule{errorcheck}{2015/10/14 error checking for unloaded modules}[5.2] +\ChemModule{errorcheck}{2016/03/08 error checking for unloaded modules}[5.2] \msg_new:nnn {chemmacros} {undefined} { The~ #1~ `#2'~ is~ undefined.~ You~ need~ to~ load~ the~ `#3'~ module. } @@ -76,6 +76,9 @@ % orbital module \chemmacros_command_requires_module:Nn \orbital {orbital} +% polymers module +\chemmacros_command_requires_module:Nn \makepolymerdelims {polymers} + % reactions module \chemmacros_environment_requires_module:nn {reaction} {reactions} \chemmacros_environment_requires_module:nn {reaction*} {reactions} @@ -113,4 +116,5 @@ \tex_endinput:D 2015/10/14 - first version +2016/03/08 - add `polymers' module diff --git a/Master/texmf-dist/tex/latex/chemmacros/chemmacros.module.greek.code.tex b/Master/texmf-dist/tex/latex/chemmacros/chemmacros.module.greek.code.tex index 6111cd0119e..44143552ef9 100644 --- a/Master/texmf-dist/tex/latex/chemmacros/chemmacros.module.greek.code.tex +++ b/Master/texmf-dist/tex/latex/chemmacros/chemmacros.module.greek.code.tex @@ -54,7 +54,7 @@ } % an option for manual selection: -\keys_define:nn {chemmacros} +\chemmacros_define_global_keys:n { greek .code:n = \chemmacros_choose_chemgreek_mapping:n {#1} } diff --git a/Master/texmf-dist/tex/latex/chemmacros/chemmacros.module.isotopes.code.tex b/Master/texmf-dist/tex/latex/chemmacros/chemmacros.module.isotopes.code.tex index 4799dfe0c8f..fdb8a62b5ee 100644 --- a/Master/texmf-dist/tex/latex/chemmacros/chemmacros.module.isotopes.code.tex +++ b/Master/texmf-dist/tex/latex/chemmacros/chemmacros.module.isotopes.code.tex @@ -200,7 +200,7 @@ \bool_new:N \l__chemmacros_isotope_super_bool \tl_new:N \l__chemmacros_isotope_side_connect_tl -\keys_define:nn {chemmacros/isotopes} +\chemmacros_define_keys:nn {isotopes} { format .choice: , format / super .code:n = diff --git a/Master/texmf-dist/tex/latex/chemmacros/chemmacros.module.lang.code.tex b/Master/texmf-dist/tex/latex/chemmacros/chemmacros.module.lang.code.tex index 0c58394caa6..6872adaf469 100644 --- a/Master/texmf-dist/tex/latex/chemmacros/chemmacros.module.lang.code.tex +++ b/Master/texmf-dist/tex/latex/chemmacros/chemmacros.module.lang.code.tex @@ -58,7 +58,7 @@ \DeclareExpandableDocumentCommand \ChemTranslate {m} { \chemmacros_translate:n {#1} } -\keys_define:nn {chemmacros} +\chemmacros_define_global_keys:n { language .value_required:n = true , language .code:n = @@ -72,7 +72,7 @@ } \ChemCompatibilityTo{5.2} -\keys_define:nn {chemmacros} +\chemmacros_define_global_keys:n { german .meta:n = { language = german } , ngerman .meta:n = { language = ngerman } diff --git a/Master/texmf-dist/tex/latex/chemmacros/chemmacros.module.mechanisms.code.tex b/Master/texmf-dist/tex/latex/chemmacros/chemmacros.module.mechanisms.code.tex index db28e0cf05e..83460feb761 100644 --- a/Master/texmf-dist/tex/latex/chemmacros/chemmacros.module.mechanisms.code.tex +++ b/Master/texmf-dist/tex/latex/chemmacros/chemmacros.module.mechanisms.code.tex @@ -45,7 +45,7 @@ \tl_set:Nn \l__chemmacros_mechanisms_ar_tl { #3 } } -\keys_define:nn {chemmacros/mechanisms} +\chemmacros_define_keys:nn {mechanisms} { type .choice: , type / .code:n = @@ -145,8 +145,8 @@ \cs_new_protected:Npn \chemmacros_mechanisms:n #1 { \tl_if_blank:nTF {#1} - { \keys_set:nn {chemmacros/mechanisms} { type } } - { \keys_set:nn {chemmacros/mechanisms} { type = #1 } } + { \chemmacros_set_keys:nn {mechanisms} { type } } + { \chemmacros_set_keys:nn {mechanisms} { type = #1 } } \mbox { \tl_use:N \l__chemmacros_mechanisms_ar_tl diff --git a/Master/texmf-dist/tex/latex/chemmacros/chemmacros.module.newman.code.tex b/Master/texmf-dist/tex/latex/chemmacros/chemmacros.module.newman.code.tex index 3821f966192..7fbf68463f0 100644 --- a/Master/texmf-dist/tex/latex/chemmacros/chemmacros.module.newman.code.tex +++ b/Master/texmf-dist/tex/latex/chemmacros/chemmacros.module.newman.code.tex @@ -46,7 +46,7 @@ \bool_new:N \l__chemmacros_newman_tikz_back_bool -\keys_define:nn { chemmacros / newman } +\chemmacros_define_keys:nn {newman} { ring .tl_set:N = \l__chemmacros_newman_tikz_ring_tl , atoms .tl_set:N = \l__chemmacros_newman_tikz_front_tl , @@ -65,7 +65,7 @@ \NewDocumentCommand \newman { o d() > { \SplitArgument { 5 } { , } } m } { \group_begin: - \IfNoValueF { #1 } { \keys_set:nn { chemmacros / newman } { #1 } } + \IfNoValueF { #1 } { \chemmacros_set_keys:nn {newman} { #1 } } \IfNoValueTF { #2 } { \chemmacros_newman_atoms:nnnnnnn { } #3 } { \chemmacros_newman_atoms:nnnnnnn { #2 } #3 } diff --git a/Master/texmf-dist/tex/latex/chemmacros/chemmacros.module.nomenclature.code.tex b/Master/texmf-dist/tex/latex/chemmacros/chemmacros.module.nomenclature.code.tex index dd10e64107f..431129e7482 100644 --- a/Master/texmf-dist/tex/latex/chemmacros/chemmacros.module.nomenclature.code.tex +++ b/Master/texmf-dist/tex/latex/chemmacros/chemmacros.module.nomenclature.code.tex @@ -220,7 +220,7 @@ \NewDocumentCommand \LetChemIUPAC { mm } { \chemmacros_let_iupac:NN #1 #2 } -\keys_define:nn {chemmacros/nomenclature} +\chemmacros_define_keys:nn {nomenclature} { iupac .choice: , iupac / restricted .code:n = @@ -239,7 +239,7 @@ \dim_new:N \l__chemmacros_cip_kern_dim \dim_set:Nn \l__chemmacros_cip_kern_dim { .075em } -\keys_define:nn {chemmacros/nomenclature} +\chemmacros_define_keys:nn {nomenclature} { cip-kern .dim_set:N = \l__chemmacros_cip_kern_dim } \ChemCompatibilityTo{5.1} @@ -304,7 +304,7 @@ % coordination chemistry \bool_new:N \l__chemmacros_bridge_super_bool -\keys_define:nn { chemmacros / nomenclature } +\chemmacros_define_keys:nn {nomenclature} { bridge-number .choice: , bridge-number / sub .code:n = @@ -388,7 +388,7 @@ \dim_new:N \l__chemmacros_iupac_break_dim \dim_set:Nn \l__chemmacros_iupac_break_dim { .03em } -\keys_define:nn { chemmacros / nomenclature } +\chemmacros_define_keys:nn {nomenclature} { hyphen-pre-space .dim_set:N = \l__chemmacros_iupac_hyphen_pre_dim , hyphen-post-space .dim_set:N = \l__chemmacros_iupac_hyphen_post_dim , @@ -666,7 +666,7 @@ \tl_new:N \l__chemmacros_latin_format_tl \tl_set:Nn \l__chemmacros_latin_format_tl { \itshape } -\keys_define:nn { chemmacros / nomenclature } +\chemmacros_define_keys:nn {nomenclature} { latin-format .tl_set:N = \l__chemmacros_latin_format_tl , latin-format .initial:n = \textit diff --git a/Master/texmf-dist/tex/latex/chemmacros/chemmacros.module.orbital.code.tex b/Master/texmf-dist/tex/latex/chemmacros/chemmacros.module.orbital.code.tex index 29aa6242541..72622f37f07 100644 --- a/Master/texmf-dist/tex/latex/chemmacros/chemmacros.module.orbital.code.tex +++ b/Master/texmf-dist/tex/latex/chemmacros/chemmacros.module.orbital.code.tex @@ -114,7 +114,7 @@ \bool_set_false:N \l__chemmacros_orbital_type_spthree_bool } -\keys_define:nn { chemmacros / orbital / s } +\chemmacros_define_keys:nn {orbital/s} { phase .choice: , phase / + .code:n = @@ -127,7 +127,7 @@ \cs_new_protected:Npn \__chemmacros_orbital_s_draw:n #1 { - \keys_set:nn { chemmacros / orbital / s } { #1 } + \chemmacros_set_keys:nn {orbital/s} {#1} \bool_if:NTF \l__chemmacros_orbital_s_phase_bool { \tl_if_in:NnTF \l__chemmacros_orbital_s_color_tl { ! } @@ -163,7 +163,7 @@ \bool_set_false:N \l__chemmacros_orbital_type_spthree_bool } -\keys_define:nn { chemmacros / orbital / p } +\chemmacros_define_keys:nn {orbital/p} { phase .choice: , phase / + .code:n = @@ -179,7 +179,7 @@ \cs_new_protected:Npn \__chemmacros_orbital_p_draw:n #1 { - \keys_set:nn { chemmacros / orbital / p } { #1 } + \chemmacros_set_keys:nn {orbital/p} {#1} \bool_if:NTF \l__chemmacros_orbital_p_phase_bool { \tl_if_in:NnTF \l__chemmacros_orbital_p_color_tl { ! } @@ -259,7 +259,7 @@ \bool_set_false:N \l__chemmacros_orbital_type_spthree_bool } -\keys_define:nn { chemmacros / orbital / sp } +\chemmacros_define_keys:nn {orbital/sp} { phase .choice: , phase / + .code:n = @@ -273,7 +273,7 @@ \cs_new_protected:Npn \__chemmacros_orbital_sp_draw:n #1 { - \keys_set:nn { chemmacros / orbital / sp } { #1 } + \chemmacros_set_keys:nn {orbital/sp} {#1} \bool_if:NTF \l__chemmacros_orbital_sp_phase_bool { \tl_if_in:NnTF \l__chemmacros_orbital_sp_color_tl { ! } @@ -350,7 +350,7 @@ \bool_set_false:N \l__chemmacros_orbital_type_spthree_bool } -\keys_define:nn { chemmacros / orbital / sp2 } +\chemmacros_define_keys:nn {orbital/sp2} { phase .choice: , phase / + .code:n = @@ -364,7 +364,7 @@ \cs_new_protected:Npn \__chemmacros_orbital_sptwo_draw:n #1 { - \keys_set:nn { chemmacros / orbital / sp2 } { #1 } + \chemmacros_set_keys:nn {orbital/sp2} {#1} \bool_if:NTF \l__chemmacros_orbital_sptwo_phase_bool { \tl_if_in:NnTF \l__chemmacros_orbital_sptwo_color_tl { ! } @@ -441,7 +441,7 @@ \bool_set_true:N \l__chemmacros_orbital_type_spthree_bool } -\keys_define:nn { chemmacros / orbital / sp3 } +\chemmacros_define_keys:nn {orbital/sp3} { phase .choice: , phase / + .code:n = @@ -455,7 +455,7 @@ \cs_new_protected:Npn \__chemmacros_orbital_spthree_draw:n #1 { - \keys_set:nn { chemmacros / orbital / sp3 } { #1 } + \chemmacros_set_keys:nn {orbital/sp3} {#1} \bool_if:NTF \l__chemmacros_orbital_spthree_phase_bool { \tl_if_in:NnTF \l__chemmacros_orbital_spthree_color_tl { ! } @@ -523,7 +523,7 @@ % -------------------------------------------------------------------------- % main command -\keys_define:nn { chemmacros / orbital } +\chemmacros_define_keys:nn {orbital} { overlay .bool_set:N = \l__chemmacros_orbital_overlay_bool , overlay .default:n = true , @@ -536,7 +536,7 @@ } } -\keys_define:nn { chemmacros / orbital / type } +\chemmacros_define_keys:nn {orbital/type} { s .code:n = { \__chemmacros_orbital_type_s: } , p .code:n = { \__chemmacros_orbital_type_p: } , @@ -559,12 +559,12 @@ { \__chemmacros_orbital_spthree_draw:n { #1 } } } -\NewDocumentCommand \orbital { o m } +\NewDocumentCommand \orbital {om} { \group_begin: - \keys_set:nn { chemmacros / orbital / type } { #2 } - \IfNoValueTF { #1 } - { \chemmacros_orbital:n { } } - { \chemmacros_orbital:n { #1 } } + \chemmacros_set_keys:nn {orbital/type} {#2} + \IfNoValueTF {#1} + { \chemmacros_orbital:n { } } + { \chemmacros_orbital:n {#1} } \group_end: } diff --git a/Master/texmf-dist/tex/latex/chemmacros/chemmacros.module.particles.code.tex b/Master/texmf-dist/tex/latex/chemmacros/chemmacros.module.particles.code.tex index a714cba19a0..a373a0f58d8 100644 --- a/Master/texmf-dist/tex/latex/chemmacros/chemmacros.module.particles.code.tex +++ b/Master/texmf-dist/tex/latex/chemmacros/chemmacros.module.particles.code.tex @@ -53,13 +53,13 @@ \dim_new:N \l__chemmacros_nucleophile_dim \dim_set:Nn \l__chemmacros_nucleophile_dim { .1em } -\keys_define:nn {chemmacros/particles} +\chemmacros_define_keys:nn {particles} { space .dim_set:N = \l__chemmacros_nucleophile_dim } \EndChemCompatibility -\keys_define:nn {chemmacros/particles} +\chemmacros_define_keys:nn {particles} { elpair .choice: , elpair / false .code:n = @@ -94,7 +94,7 @@ { \group_begin: \IfNoValueF {##1} - { \keys_set:nn {chemmacros/particles} {##1} } + { \chemmacros_set_keys:nn {particles} {##1} } \use:c {__chemmacros_ \chemmacros_remove_backslash:N #1:} \group_end: } diff --git a/Master/texmf-dist/tex/latex/chemmacros/chemmacros.module.phases.code.tex b/Master/texmf-dist/tex/latex/chemmacros/chemmacros.module.phases.code.tex index f97b6491350..f2f9e6f0406 100644 --- a/Master/texmf-dist/tex/latex/chemmacros/chemmacros.module.phases.code.tex +++ b/Master/texmf-dist/tex/latex/chemmacros/chemmacros.module.phases.code.tex @@ -33,7 +33,7 @@ \dim_new:N \l__chemmacros_phases_space_dim \dim_set:Nn \l__chemmacros_phases_space_dim { .1333 em } -\keys_define:nn {chemmacros/phases} +\chemmacros_define_keys:nn {phases} { pos .choice: , pos / sub .code:n = \bool_set_true:N \l__chemmacros_phases_sub_bool , diff --git a/Master/texmf-dist/tex/latex/chemmacros/chemmacros.module.polymers.code.tex b/Master/texmf-dist/tex/latex/chemmacros/chemmacros.module.polymers.code.tex new file mode 100644 index 00000000000..dc304d4ba55 --- /dev/null +++ b/Master/texmf-dist/tex/latex/chemmacros/chemmacros.module.polymers.code.tex @@ -0,0 +1,166 @@ +% -------------------------------------------------------------------------- +% +% the CHEMMACROS package -- module: `polymers' +% +% -------------------------------------------------------------------------- +% Clemens Niederberger +% -------------------------------------------------------------------------- +% https://github.org/cgnieder/chemmacros/ +% contact@mychemistry.eu +% -------------------------------------------------------------------------- +% If you have any ideas, questions, suggestions or bugs to report, please +% feel free to contact me. +% -------------------------------------------------------------------------- +% Copyright 2011-2016 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. +% -------------------------------------------------------------------------- +\ChemModule{polymers}{2016/03/07 polymers} + +\chemmacros_load_modules:n {nomenclature,tikz} + +% -------------------------------------------------------------------------- +% copolymers +\NewChemIUPAC \copolymer { \textit {co} } +\LetChemIUPAC \co \copolymer + +\NewChemIUPAC \statistical { \textit {stat} } +\LetChemIUPAC \stat \statistical + +\NewChemIUPAC \random { \textit {ran} } +\LetChemIUPAC \ran \random + +\NewChemIUPAC \alternating { \textit {alt} } +\LetChemIUPAC \alt \alternating + +\NewChemIUPAC \periodic { \textit {per} } +\LetChemIUPAC \per \periodic + +\NewChemIUPAC \block { \textit {block} } +\NewChemIUPAC \graft { \textit {graft} } + +% -------------------------------------------------------------------------- +% non-linear (co)polymers +\NewChemIUPAC \blend { \textit {blend} } +\NewChemIUPAC \comb { \textit {comb} } + +\NewChemIUPAC \complex { \textit {compl} } +\LetChemIUPAC \compl \complex + +\NewChemIUPAC \cyclic { \textit {cyclo} } +\LetChemIUPAC \cyclo \cyclic + +\NewChemIUPAC \branch { \textit {branch} } +\NewChemIUPAC \network { \textit {net} } +\LetChemIUPAC \net \network + +\NewChemIUPAC \ipnetwork { \textit {ipn} } +\LetChemIUPAC \ipn \ipnetwork + +\NewChemIUPAC \sipnetwork { \textit {sipn} } +\LetChemIUPAC \sipn \sipnetwork + +\NewChemIUPAC \star { \textit {star} } + +% -------------------------------------------------------------------------- + +\tl_new:N \l__chemmacros_polymer_delimiter_left_tl +\tl_new:N \l__chemmacros_polymer_delimiter_right_tl + +\tl_new:N \l__chemmacros_polymer_subscript_tl +\tl_new:N \l__chemmacros_polymer_superscript_tl + +\dim_new:N \l__chemmacros_polymer_delimiter_height_dim +\dim_new:N \l__chemmacros_polymer_delimiter_depth_dim + +\cs_new_protected:Npn \__chemmacros_set_polymer_delimiters:NN #1#2 + { + \tl_set:Nn \l__chemmacros_polymer_delimiter_left_tl {#1} + \tl_set:Nn \l__chemmacros_polymer_delimiter_right_tl {#2} + } + +% #1: height +% #2: depth +% #3: opening node +% #4: closing node +% #5: subscript +% #6: superscript +\cs_new_protected:Npn \chemmacros_make_polymer_braces:nnnnnn #1#2#3#4#5#6 + { + \dim_set:Nn \l__chemmacros_polymer_delimiter_height_dim { (#1+#2)/2 } + \dim_set:Nn \l__chemmacros_polymer_delimiter_depth_dim { (#1-#2)/2 } + \chemmacros_tikz_picture:nn {remember~ picture, overlay } + { + \chemmacros_tikz_node:n + { at = (#3) , yshift = \l__chemmacros_polymer_delimiter_depth_dim } + { + \c_math_toggle_token + \tex_left:D \l__chemmacros_polymer_delimiter_left_tl + \tex_vrule:D + height \l__chemmacros_polymer_delimiter_height_dim + depth \l__chemmacros_polymer_delimiter_height_dim + width \c_zero_dim + \tex_right:D . + \c_math_toggle_token + } ; + \chemmacros_tikz_node:n + { at = (#4) , yshift = \l__chemmacros_polymer_delimiter_depth_dim } + { + \c_math_toggle_token + \tex_left:D . + \tex_vrule:D + height \l__chemmacros_polymer_delimiter_height_dim + depth \l__chemmacros_polymer_delimiter_height_dim + width \c_zero_dim + \tex_right:D \l__chemmacros_polymer_delimiter_right_tl + \c_math_subscript_token { \hbox_overlap_right:n {#5} } + \c_math_superscript_token { \hbox_overlap_right:n {#6} } + \c_math_toggle_token + } ; + } + } +\cs_generate_variant:Nn \chemmacros_make_polymer_braces:nnnnnn {nnnnVV} + +\chemmacros_define_keys:nn {polymers} + { + delimiters .code:n = \__chemmacros_set_polymer_delimiters:NN #1 , + delimiters .initial:n = [] , + superscript .tl_set:N = \l__chemmacros_polymer_superscript_tl , + subscript .tl_set:N = \l__chemmacros_polymer_subscript_tl , + subscript .initial:n = $n$ + } + +\NewDocumentCommand \makepolymerdelims {O{}momm} + { + \group_begin: + \chemmacros_set_keys:nn {polymers} {#1} + \IfNoValueTF {#3} + { + \chemmacros_make_polymer_braces:nnnnVV {#2} {#2} {#4} {#5} + \l__chemmacros_polymer_subscript_tl + \l__chemmacros_polymer_superscript_tl + } + { + \chemmacros_make_polymer_braces:nnnnVV {#2} {#3} {#4} {#5} + \l__chemmacros_polymer_subscript_tl + \l__chemmacros_polymer_superscript_tl + } + \group_end: + } + +% -------------------------------------------------------------------------- +\tex_endinput:D + +2016/03/07 - first version +2016/03/08 - \makepolymerdelims + diff --git a/Master/texmf-dist/tex/latex/chemmacros/chemmacros.module.reactions.code.tex b/Master/texmf-dist/tex/latex/chemmacros/chemmacros.module.reactions.code.tex index 3be548df8ed..8f8a98f8d95 100644 --- a/Master/texmf-dist/tex/latex/chemmacros/chemmacros.module.reactions.code.tex +++ b/Master/texmf-dist/tex/latex/chemmacros/chemmacros.module.reactions.code.tex @@ -94,13 +94,13 @@ \tl_set:Nn \l__chemmacros_reaction_lorname_tl { \chemmacros_translate:n {reaction} } \tl_set:Nn \reactionlistname { \chemmacros_translate:n {list-of-reactions} } -\keys_define:nn {chemmacros/reactions} +\chemmacros_define_keys:nn {reactions} { list-name .tl_set:N = \reactionlistname , list-entry .tl_set:N = \l__chemmacros_reaction_lorname_tl , } \ChemCompatibilityFrom{5.2} -\keys_define:nn {chemmacros/reactions} +\chemmacros_define_keys:nn {reactions} { list-heading-cmd .code:n = \cs_set_protected:Npn \__chemmacros_reaction_heading:n ##1 {#1} @@ -109,11 +109,11 @@ \cs_if_exist:NTF \chapter { - \keys_set:nn {chemmacros/reactions} + \chemmacros_set_keys:nn {reactions} { list-heading-cmd = \chapter* {#1} } } { - \keys_set:nn {chemmacros/reactions} + \chemmacros_set_keys:nn {reactions} { list-heading-cmd = \section* {#1} } } diff --git a/Master/texmf-dist/tex/latex/chemmacros/chemmacros.module.redox.code.tex b/Master/texmf-dist/tex/latex/chemmacros/chemmacros.module.redox.code.tex index cb2cc5db0ef..7d89d2e4ff9 100644 --- a/Master/texmf-dist/tex/latex/chemmacros/chemmacros.module.redox.code.tex +++ b/Master/texmf-dist/tex/latex/chemmacros/chemmacros.module.redox.code.tex @@ -246,7 +246,7 @@ \bool_set_true:N \l__chemmacros_ox_side_bool } -\keys_define:nn {chemmacros/redox} +\chemmacros_define_keys:nn {redox} { pos .choice: , pos / top .code:n = \__chemmacros_ox_pos_top: , @@ -284,7 +284,7 @@ } \ChemCompatibilityFrom{5.4} -\keys_define:nn {chemmacros/redox} +\chemmacros_define_keys:nn {redox} { explicit-zero-sign .bool_set:N = \l__chemmacros_ox_explicit_zero_sign_bool , explicit-zero-sign .default:n = true @@ -296,7 +296,7 @@ \cs_new_protected:Npn \chemmacros_ox:nnnn #1#2#3#4 { \group_begin: - \keys_set:nn {chemmacros/redox} {#2} + \chemmacros_set_keys:nn {redox} {#2} \tl_if_blank:nF {#1} { \__chemmacros_ox_pos_top: } \__chemmacros_ox_write:nn {#3} {#4} \group_end: @@ -425,7 +425,7 @@ } % redox-keys -\keys_define:nn {chemmacros/redox} +\chemmacros_define_keys:nn {redox} { dist .dim_set:N = \l__chemmacros_redox_dist_dim , dist .initial:n = {.6em} , diff --git a/Master/texmf-dist/tex/latex/chemmacros/chemmacros.module.spectroscopy.code.tex b/Master/texmf-dist/tex/latex/chemmacros/chemmacros.module.spectroscopy.code.tex index 7dac76c2625..c0a91dea8b0 100644 --- a/Master/texmf-dist/tex/latex/chemmacros/chemmacros.module.spectroscopy.code.tex +++ b/Master/texmf-dist/tex/latex/chemmacros/chemmacros.module.spectroscopy.code.tex @@ -153,7 +153,7 @@ \cs_new_eq:NN \__chemmacros_nmr_number:n \use:n \cs_new_eq:NN \__chemmacros_nmr_position:n \use:n -\keys_define:nn { chemmacros / spectroscopy } +\chemmacros_define_keys:nn {spectroscopy} { unit .tl_set:N = \l__chemmacros_nmr_unit_tl , unit .default:n = \mega\hertz , @@ -353,7 +353,7 @@ \NewDocumentEnvironment {experimental} {o} { \group_begin: - \IfNoValueF {#1} { \keys_set:nn {chemmacros/spectroscopy} {#1} } + \IfNoValueF {#1} { \chemmacros_set_keys:nn {spectroscopy} {#1} } \bool_set_true:N \l__chemmacros_nmr_inner_bool \cs_set_eq:NN \# \chemmacros_nmr_number:n \cs_set_eq:NN \pos \chemmacros_nmr_position:n diff --git a/Master/texmf-dist/tex/latex/chemmacros/chemmacros.module.thermodynamics.code.tex b/Master/texmf-dist/tex/latex/chemmacros/chemmacros.module.thermodynamics.code.tex index 3905aaf5987..0838397b169 100644 --- a/Master/texmf-dist/tex/latex/chemmacros/chemmacros.module.thermodynamics.code.tex +++ b/Master/texmf-dist/tex/latex/chemmacros/chemmacros.module.thermodynamics.code.tex @@ -43,7 +43,7 @@ \tl_set:Nn \l__chemmacros_state_sp_right_tl { \standardstate } \tl_set:Nn \l__chemmacros_state_sb_pos_tl {left} -\keys_define:nn {chemmacros/thermodynamics} +\chemmacros_define_keys:nn {thermodynamics} { pre .tl_set:N = \l__chemmacros_state_pre_tl , post .tl_set:N = \l__chemmacros_state_post_tl , @@ -66,7 +66,7 @@ % subscript-left % subscript-right \group_begin: - \keys_set:nn {chemmacros/thermodynamics} {#1} + \chemmacros_set_keys:nn {thermodynamics} {#1} \ensuremath { \chemmacros_text:V \l__chemmacros_state_pre_tl @@ -90,7 +90,8 @@ \cs_new_protected:Npn \chemmacros_declare_state:Nn #1#2 { - \keys_define:xn {chemmacros/thermodynamics/\chemmacros_remove_backslash:N #1} + \chemmacros_define_keys:xn + {thermodynamics/\chemmacros_remove_backslash:N #1} { pre .meta:nn = {chemmacros/thermodynamics} { pre = ##1 } , post .meta:nn = {chemmacros/thermodynamics} { post = ##1 } , @@ -109,16 +110,18 @@ \DeclareDocumentCommand #1 { sO{}D(){}m } { \group_begin: - \keys_set:xn {chemmacros/thermodynamics/\chemmacros_remove_backslash:N #1} {#2} + \chemmacros_set_keys:xn + {thermodynamics/\chemmacros_remove_backslash:N #1} + {#2} \tl_if_blank:nF {##3} { - \keys_set:nx {chemmacros/thermodynamics} + \chemmacros_set_keys:nx {thermodynamics} { subscript-\l__chemmacros_state_sb_pos_tl = \exp_not:n {##3} } } \ensuremath { \chemmacros_state:nV {##2} \l__chemmacros_state_symbol_tl - \keys_set_groups:nnn {chemmacros/thermodynamics} {variables} {##2} + \chemmacros_set_keys_groups:nnn {thermodynamics} {variables} {##2} \IfBooleanF {##1} { = \SI {##4} { \l__chemmacros_state_unit_tl } } } \group_end: diff --git a/Master/texmf-dist/tex/latex/chemmacros/chemmacros.sty b/Master/texmf-dist/tex/latex/chemmacros/chemmacros.sty index 5ffd6a34089..31e6f679976 100644 --- a/Master/texmf-dist/tex/latex/chemmacros/chemmacros.sty +++ b/Master/texmf-dist/tex/latex/chemmacros/chemmacros.sty @@ -31,9 +31,9 @@ % -------------------------------------------------------------------------- % package information: -\tl_const:Nn \c_chemmacros_date_tl {2016/02/10} +\tl_const:Nn \c_chemmacros_date_tl {2016/03/08} \tl_const:Nn \c_chemmacros_version_major_number_tl {5} -\tl_const:Nn \c_chemmacros_version_minor_number_tl {4} +\tl_const:Nn \c_chemmacros_version_minor_number_tl {5} \tl_const:Nn \c_chemmacros_version_subrelease_tl {} \tl_const:Nx \c_chemmacros_version_number_tl {\c_chemmacros_version_major_number_tl.\c_chemmacros_version_minor_number_tl} @@ -505,3 +505,4 @@ Version history - fixed erroneous definition of \NewChemMacroset (base) - new option `explicit-zero-sign' (redox) +2016/03/08 - version 5.5 - new module `polymers' |