diff options
author | Karl Berry <karl@freefriends.org> | 2014-01-25 22:33:11 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2014-01-25 22:33:11 +0000 |
commit | 00162491a0a38dd40e88a84e63192f10868f0df4 (patch) | |
tree | e42dd812872b36f33a7d245b206e65d0d79f4b5a /Master/texmf-dist/doc | |
parent | ca3052a995aa72637d7cc9132e4ba1d2f6f3b8a5 (diff) |
chemmacros (25jan14)
git-svn-id: svn://tug.org/texlive/trunk@32786 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/doc')
-rw-r--r-- | Master/texmf-dist/doc/latex/chemmacros/README | 7 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/chemmacros/chemformula_en.pdf | bin | 935935 -> 941017 bytes | |||
-rw-r--r-- | Master/texmf-dist/doc/latex/chemmacros/chemformula_en.tex | 122 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/chemmacros/chemgreek_en.pdf | bin | 528917 -> 538802 bytes | |||
-rw-r--r-- | Master/texmf-dist/doc/latex/chemmacros/chemgreek_en.tex | 144 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/chemmacros/chemmacros_en.pdf | bin | 897435 -> 903376 bytes | |||
-rw-r--r-- | Master/texmf-dist/doc/latex/chemmacros/chemmacros_en.tex | 546 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/chemmacros/ghsystem_en.pdf | bin | 788320 -> 788318 bytes |
8 files changed, 491 insertions, 328 deletions
diff --git a/Master/texmf-dist/doc/latex/chemmacros/README b/Master/texmf-dist/doc/latex/chemmacros/README index 239ccb17fc5..2987f1262a7 100644 --- a/Master/texmf-dist/doc/latex/chemmacros/README +++ b/Master/texmf-dist/doc/latex/chemmacros/README @@ -1,10 +1,10 @@ -------------------------------------------------------------------------- the CHEMMACROS bundle 2014/01/09 - - chemmacros package v4.2e -> macros and commands for chemists - - chemformula package v4.2a -> typeset chemical compounds and reactions + - chemmacros package v4.3 -> macros and commands for chemists + - chemformula package v4.3 -> typeset chemical compounds and reactions - ghsystem package v4.2e -> typeset H & P statements and pictograms from the globally harmonised system (GHS) - - chemgreek package v0.2a -> handle mapping of upright greek letters to + - chemgreek package v0.3 -> handle mapping of upright greek letters to the \chemalpha ... commands -------------------------------------------------------------------------- This bundle succeeds the chemmacros package which is now part of the @@ -34,7 +34,6 @@ package files: - chemformula.sty, - ghsystem.sty, - chemgreek.sty, - - chemmacros-version1.cfg image files: - eps-, png-, pdf- and jpg-files for the GHS pictograms (4x31 pictures) language-definition files: diff --git a/Master/texmf-dist/doc/latex/chemmacros/chemformula_en.pdf b/Master/texmf-dist/doc/latex/chemmacros/chemformula_en.pdf Binary files differindex f747027f451..dd6454d7889 100644 --- a/Master/texmf-dist/doc/latex/chemmacros/chemformula_en.pdf +++ b/Master/texmf-dist/doc/latex/chemmacros/chemformula_en.pdf diff --git a/Master/texmf-dist/doc/latex/chemmacros/chemformula_en.tex b/Master/texmf-dist/doc/latex/chemmacros/chemformula_en.tex index 69254ccb2a1..1266b358f6c 100644 --- a/Master/texmf-dist/doc/latex/chemmacros/chemformula_en.tex +++ b/Master/texmf-dist/doc/latex/chemmacros/chemformula_en.tex @@ -50,32 +50,37 @@ \par } , add-cmds = { - abinitio, AddRxnDesc, anti, aq, aqi, + abinitio, activatechemgreekmapping, AddRxnDesc, anti, aq, aqi, ba, bond, bridge, - cd, ch, charrow, chcpd, chemabove, Chemalpha, Chembeta, Chemgamma, - Chemdelta, ChemDelta, chemformula@bondlength, Chemomega, chemsetup, - chlewis, chname , cip, cis, ch, CNMR, + cd, ce, ch, changechemgreeksymbol, charrow, chcpd, chemabove, chemalpha, + chembeta, chemgamma, chemdelta, chemDelta, chemformula@bondlength, + chemomega, chemphi, chemPhi, chemsetup, chlewis, chname , cip, cis, ch, + CNMR, data, DeclareChemArrow, DeclareChemBond, DeclareChemBondAlias, - DeclareChemIUPAC, DeclareChemLatin, DeclareChemNMR, DeclareChemParticle, - DeclareChemPhase, DeclareChemReaction, DeclareChemState, - delm, delp, Delta, Dfi, + declarechemgreekmapping, DeclareChemIUPAC, DeclareChemLatin, + DeclareChemNMR, DeclareChemParticle, DeclareChemPhase, + DeclareChemReaction, DeclareChemState, delm, delp, Delta, Dfi, el, ElPot, endo, Enthalpy, enthalpy, Entropy, fmch, fpch, fscrm, fscrp, gas, ghs, ghslistall, ghspic, Gibbs, gram, - hapto, HNMR, Helmholtz, + hapto, HNMR, Helmholtz, hydrogen, insitu, invacuo, iupac, Ka, Kb, Kw, - Lfi, listofreactions, lqd, ltn, + Lfi, listofreactions, lqd, mch, mega, meta, mhName, - newman, NMR, Nu, Nuc, - orbital, ortho, ox, OX, - para, pch, per, pH, phase, photon, pKa, pKb, pOH, pos, positron, - Pot, prt, - Rad, redox, RenewChemArrow, RenewChemBond, RenewChemIUPAC, - RenewChemLatin, RenewChemNMR, RenewChemParticle, RenewChemPhase, - RenewChemState, - Sf, scrm, scrp, second, setchemformula, ShowChemArrow, ShowChemBond, - sld, Sod, State, + NewChemArrow, NewChemBond, NewChemBondAlias, + newchemgreekmapping, NewChemIUPAC, NewChemLatin, + NewChemNMR, NewChemParticle, NewChemPhase, + NewChemReaction, NewChemState, + newman, nitrogen, NMR, Nu, Nuc, + orbital, ortho, ox, OX, oxygen, + para, pch, per, pH, phase, phosphorus, photon, pKa, pKb, pOH, pos, + positron, Pot, prt, + Rad, redox, RenewChemArrow, RenewChemBond, renewchemgreekmapping, + RenewChemIUPAC, RenewChemLatin, RenewChemNMR, RenewChemParticle, + RenewChemPhase, RenewChemState, + Sf, scrm, scrp, second, selectchemgreekmapping, setchemformula, + ShowChemArrow, ShowChemBond, sld, Sod, State, sulfur, trans, val } , @@ -92,7 +97,7 @@ includegraphics, intertext, IUPAC, joule, kilo, - latin, lewis, Lewis, + latin, lewis, Lewis, liquid, ltn, metre, midrule, milli, mmHg, mole, nano, nicefrac, num, numrange, ominus, oplus, @@ -103,7 +108,8 @@ textcolor, textendash, textsuperscript, tiny, toprule, upbeta, upeta, upgamma, usetikzlibrary, volt, vphantom, vspave, - xspace + xspace, + z@, z@skip } } @@ -294,6 +300,17 @@ then \chemmacros\ will not be loaded. The \chemmacros\ package, however, atom, see section~\ref{sec:lewis-formulae}. \end{itemize} +\subsection{Version 4.3} +\begin{itemize} + \item New option \option{stoich-print}. + \item New command \cs{chstoich}. + \item The commands \cs*{DeclareChem\meta{...}} now don't give an error any + more if the command already exists. This is more consistent with \LaTeX's + \cs*{DeclareRobustCommand}. For all those commands a version + \cs*{NewChem\meta{...}} is introduced that \emph{does} give an error if + the new command is already defined. +\end{itemize} + \section{Licence and Requirements} \license @@ -449,6 +466,12 @@ There are a few possibilities to customize the output. \keybool{stoich-paren-parse}\Default{false} If set to true stoichiometric factors enclosed by parentheses also are parsed. + \keyval{stoich-print}{cs}\Default{\cs{chstoich}} + This option allows to redefine the macro that prints the stoichiometric + factors. \meta{cs} should be a macro that takes one mandatory argument. + \emph{Please note that using this option will disable \chemformula's + stoichiometric parsing as that is done by the default command + \cs{chstoich}.} \end{options} \begin{example} @@ -672,10 +695,19 @@ The predefined bond types are shown in table~\vref{tab:bond_types}. \paragraph{Own Bonds} \chemformula\ offers commands to define own bond types: \begin{commands} + \command{NewChemBond}[\marg{name}\marg{code}] + \sinceversion{4.3}Define the new bond type \meta{name}. Issue an error if + a bond \meta{name} already exists. \command{DeclareChemBond}[\marg{name}\marg{code}] - Define the new bond type \meta{name}. + Define the new bond type \meta{name} or overwrite it if it already + exists. \command{RenewChemBond}[\marg{name}\marg{code}] - Redefine the existing bond type \meta{name}. + Redefine the existing bond type \meta{name}. Issue an error if a bond + \meta{name} doesn't exist. + \command{NewChemBondAlias}[\marg{new name}\marg{old name}] + \sinceversion{4.3}Declare the bond type \meta{new name} to be an alias of + \meta{old name}. Issue an error if a bond \meta{new name} already + exists. \command{DeclareChemBondAlias}[\marg{new name}\marg{old name}] Declare the bond type \meta{new name} to be an alias of \meta{old name}. \command{ShowChemBond}[\marg{name}] @@ -684,14 +716,14 @@ The predefined bond types are shown in table~\vref{tab:bond_types}. The usage is best described with an example. So let's see how the \code{single} bond and the \code{co>} bond are defined: \begin{sourcecode} - \DeclareChemBond{single} + \NewChemBond{single} { \draw[chembond] (chemformula-bond-start) -- (chemformula-bond-end) ; } - \DeclareChemBond{coordright} + \NewChemBond{coordright} { \draw[chembond,butt cap->] (chemformula-bond-start) -- (chemformula-bond-end) ; } - \DeclareChemBondAlias{co>}{coordright} + \NewChemBondAlias{co>}{coordright} \end{sourcecode} Two points are important: the names of the starting and the ending coordinates, \code{chemformula-bond-start} and \code{chemformula-bond-end}, @@ -702,7 +734,7 @@ this: \begin{example} \usetikzlibrary{decorations.pathreplacing} \makeatletter - \DeclareChemBond{dashed} + \NewChemBond{dashed} { \draw[ chembond, @@ -1016,10 +1048,11 @@ brackets as seperated input types. The arrow reads its arguments \emph{afterwards}. As you can see the arrows \enquote{grow} with the length of the labels. What stays constant is the part that protrudes the labels. As you also can see in the last example square brackets inside the arrow -arguments should be produced using \cs*{[} and \cs*{]}. They keep their usual -meaning outside \cs{ch}. These commands are necessary since the usual -grouping (\ie, hiding the brackets inside curly brackets) doesn't work due to -the way \cs{ch} reads its argument. +arguments can be produced using \cs*{[} and \cs*{]}. They keep their usual +meaning outside \cs{ch}. These commands were necessary since the usual +grouping (\ie, hiding the brackets inside curly brackets) didn't work due to +the way \cs{ch} read its argument. This is no longer true but meanwhile +\cs*{[} and \cs*{]} are kept for backwards compatibility. \begin{example} \ch{A ->[a] B} \par \ch{A ->[ab] B} \par @@ -1072,15 +1105,24 @@ arrow: \end{example} \subsection{Modify Arrow Types}\label{sec:arrows_modify} -The arrows are defined with the command +The arrows are defined with the commands \begin{commands} + \command{NewChemArrow}[\marg{type}\marg{\TikZ}] + Define the new arrow type \meta{type}. Issue an error if an arrow type + \meta{type} already exists. \command{DeclareChemArrow}[\marg{type}\marg{\TikZ}] - Define a new arrow type \meta{type}. + Define the new arrow type \meta{type} or overwrite it if it already + exists. + \command{RenewChemArrow}[\marg{type}\marg{\TikZ}] + Redefine the arrow type \meta{type}. Issue an error if an arrow type + \meta{type} doesn't exist. + \command{ShowChemArrow}[\marg{type}] + Print out the current definition of the arrow type \meta{type}. \end{commands} \meta{type} is the sequence of tokens that is replaced with the actual arrow code. For example the basic arrow is defined via \begin{sourcecode} - \DeclareChemArrow{->}{ + \NewChemArrow{->}{ \draw[chemarrow,-cf] (cf_arrow_start) -- (cf_arrow_end) ; } \end{sourcecode} @@ -1115,10 +1157,10 @@ completeness' sake the arrow tips and the \TikZ-style are also listed: \option{arrow-style} \end{codedesc} \begin{example} - \DeclareChemArrow{.>}{ + \NewChemArrow{.>}{ \draw[chemarrow,-cf,dotted,red] (cf_arrow_start) -- (cf_arrow_end); } - \DeclareChemArrow{n>}{ + \NewChemArrow{n>}{ \draw[chemarrow,-cf] (cf_arrow_start) .. controls ([yshift=3ex]cf_arrow_mid) .. @@ -1126,15 +1168,7 @@ completeness' sake the arrow tips and the \TikZ-style are also listed: } \ch{A .> B} \ch{A .>[a][b] B} \ch{A n> B} \end{example} -If you want to redefine an existing arrow there are two commands you can use: -\begin{commands} - \command{RenewChemArrow}[\marg{type}\marg{\TikZ}] - Redefine the arrow type \meta{type}. - \command{ShowChemArrow}[\marg{type}] - Print out the current definition of the arrow type \meta{type}. -\end{commands} -The second one gives the current definition, the first one redefines an existing -arrow. + \begin{example} \texttt{\ShowChemArrow{->}} \par \RenewChemArrow{->}{\draw[chemarrow,->,red] (cf_arrow_start) -- (cf_arrow_end) ;} diff --git a/Master/texmf-dist/doc/latex/chemmacros/chemgreek_en.pdf b/Master/texmf-dist/doc/latex/chemmacros/chemgreek_en.pdf Binary files differindex a3e19f1abe2..44bbb921461 100644 --- a/Master/texmf-dist/doc/latex/chemmacros/chemgreek_en.pdf +++ b/Master/texmf-dist/doc/latex/chemmacros/chemgreek_en.pdf diff --git a/Master/texmf-dist/doc/latex/chemmacros/chemgreek_en.tex b/Master/texmf-dist/doc/latex/chemmacros/chemgreek_en.tex index d7a12d09514..6cc4e45adb1 100644 --- a/Master/texmf-dist/doc/latex/chemmacros/chemgreek_en.tex +++ b/Master/texmf-dist/doc/latex/chemmacros/chemgreek_en.tex @@ -1,5 +1,5 @@ -% arara: pdflatex -% !arara: biber +% !arara: pdflatex +% arara: biber % !arara: pdflatex % arara: pdflatex % -------------------------------------------------------------------------- @@ -52,9 +52,9 @@ add-cmds = { abinitio, activatechemgreekmapping, AddRxnDesc, anti, aq, aqi, ba, bond, bridge, - cd, ch, changechemgreeksymbol, charrow, chcpd, chemabove, Chemalpha, - Chembeta, Chemgamma, Chemdelta, ChemDelta, chemformula@bondlength, - Chemomega, Chemphi, ChemPhi, chemsetup, chlewis, chname , cip, cis, ch, + cd, ch, changechemgreeksymbol, charrow, chcpd, chemabove, chemalpha, + chembeta, chemgamma, chemdelta, chemDelta, chemformula@bondlength, + chemomega, chemphi, chemPhi, chemsetup, chlewis, chname , cip, cis, ch, CNMR, data, DeclareChemArrow, DeclareChemBond, DeclareChemBondAlias, declarechemgreekmapping, DeclareChemIUPAC, DeclareChemLatin, @@ -63,21 +63,24 @@ el, ElPot, endo, Enthalpy, enthalpy, Entropy, fmch, fpch, fscrm, fscrp, gas, ghs, ghslistall, ghspic, Gibbs, gram, - hapto, HNMR, Helmholtz, + hapto, HNMR, Helmholtz, hydrogen, insitu, invacuo, iupac, Ka, Kb, Kw, - Lfi, listofreactions, lqd, ltn, + Lfi, listofreactions, lqd, mch, mega, meta, mhName, - newchemgreekmapping, - newman, NMR, Nu, Nuc, - orbital, ortho, ox, OX, - para, pch, per, pH, phase, photon, pKa, pKb, pOH, pos, positron, - Pot, prt, + NewChemArrow, NewChemBond, NewChemBondAlias, + newchemgreekmapping, NewChemIUPAC, NewChemLatin, + NewChemNMR, NewChemParticle, NewChemPhase, + NewChemReaction, NewChemState, + newman, nitrogen, NMR, Nu, Nuc, + orbital, ortho, ox, OX, oxygen, + para, pch, per, pH, phase, phosphorus, photon, pKa, pKb, pOH, pos, + positron, Pot, prt, Rad, redox, RenewChemArrow, RenewChemBond, renewchemgreekmapping, RenewChemIUPAC, RenewChemLatin, RenewChemNMR, RenewChemParticle, RenewChemPhase, RenewChemState, Sf, scrm, scrp, second, selectchemgreekmapping, setchemformula, - ShowChemArrow, ShowChemBond, sld, Sod, State, + ShowChemArrow, ShowChemBond, sld, Sod, State, sulfur, trans, val } , @@ -94,7 +97,7 @@ includegraphics, intertext, IUPAC, joule, kilo, - latin, lewis, Lewis, + latin, lewis, Lewis, liquid, ltn, metre, midrule, milli, mmHg, mole, nano, nicefrac, num, numrange, ominus, oplus, @@ -103,9 +106,10 @@ sample, scriptscriptstyle, setatomsep, setbondoffset, sfrac, shorthandoff, si, SI, sisetup, square, subsection, textcolor, textendash, textsuperscript, tiny, toprule, - upbeta, upeta, upgamma, usetikzlibrary, + upbeta, upeta, upgamma, upPhi, upphi, usetikzlibrary, volt, vphantom, vspave, - xspace + xspace, + z@, z@skip } } @@ -283,18 +287,53 @@ used by \chemmacros\ and its \acs{iupac} naming commands. \pkg{expl3}\footnote{\CTANurl{l3kernel}}~\cite{bnd:l3kernel} and \pkg{xparse}\footnote{\CTANurl{l3packages}}~\cite{bnd:l3packages}. +\section{News} +\subsection{Version~0.2} +\begin{itemize} + \item The mapping ``mathdesign'' has been added. In order to use it you + need the \pkg{mathdesign} package~\cite{pkg:mathdesign} loaded. + \item The mapping ``fourier'' has been added. In order to use it you + need the \pkg{fourier} package~\cite{pkg:fourier} loaded. +\end{itemize} + +\subsection{Version~0.3} +\begin{itemize} + \item The provided macros have been renamed from \cs*{Chem\meta{\ldots}} + into \cs*{chem\meta{\ldots}}. The uppercase version still are provided + for backwards compatibility but issue a warning message and will be + removed some time in the future. + \item The commands for defining mappings have gotten an optional argument + which allows to specify the name of the package a mapping needs. The + command \cs{selectchemgreekmapping} now checks for this package and gives + a warning if it doesn't find it loaded. + \item The mapping ``textalpha'' has been added. In order to use it you + need the \pkg{textalpha} package (part of + \bnd{greek-fontenc}~\cite{bnd:greek-fontenc}) loaded. + \item If the package \pkg{hyperref}~\cite{pkg:hyperref} is loaded with the + \code{unicode} option \emph{and} the \pkg{textalpha} package has been + loaded at begin document all the \cs*{chem\meta{\ldots}} commands are let + to \pkg{textalpha}'s \cs*{text\meta{\ldots}} commands for the \acs{pdf} + bookmarks. This allows Greek letters in the bookmarks without worrying + about \cs*{texorpdfstring}. +\end{itemize} + \section{Define Mappings} \selectchemgreekmapping{default} \chemgreek's main commands are: \begin{commands} - \command{newchemgreekmapping}[\marg{name}\marg{mapping list}] - Add a new mapping to \chemgreek. Issue an error if it already exists. - \command{renewchemgreekmapping}[\marg{name}\marg{mapping list}] - Renew a \chemgreek\ mapping. Issue an error if it doesn't exist yet. - \command{declarechemgreekmapping}[\marg{name}\marg{mapping list}] - Declare a new mapping to \chemgreek. If the mapping already exists it - will be overwritten. + \command{newchemgreekmapping}[\oarg{package}\marg{name}\marg{mapping list}] + \changedversion{0.3}Add a new mapping to \chemgreek. Issue an error if it + already exists. With the optional argument the package that is needed for + this mapping can (and should) be specified. + \command{renewchemgreekmapping}[\oarg{package}\marg{name}\marg{mapping list}] + \changedversion{0.3}Renew a \chemgreek\ mapping. Issue an error if it + doesn't exist yet. With the optional argument the package that is needed + for this mapping can (and should) be specified. + \command{declarechemgreekmapping}[\oarg{package}\marg{name}\marg{mapping list}] + \changedversion{0.3}Declare a new mapping to \chemgreek. If the mapping + already exists it will be overwritten. With the optional argument the + package that is needed for this mapping can (and should) be specified. \end{commands} The command \cs{newchemgreekmapping} needs to get a comma separated list of @@ -335,9 +374,9 @@ mapping is defined: There \emph{must} be 24 pairs of entries, \ie, a complete mapping! Those entries are the ones that will be used by the interface macros. For each -letter a pair \cs{Chemalpha}/\cs{ChemAlpha} is defined that uses the entries +letter a pair \cs{chemalpha}/\cs{chemAlpha} is defined that uses the entries of the currently active mapping. That means there are 48 (robust) macros -defined each beginning with \cs*{Chem...} followed by the lowercase or +defined each beginning with \cs*{chem...} followed by the lowercase or uppercase name of the Greek letter. The default mapping is -- as you can probably see -- \emph{not an upright @@ -347,7 +386,7 @@ package for example provides a package option that selects one of the available mappings. \begin{example} - Default mapping: \Chemphi\ and \ChemPhi, $\phi$ and $\Phi$ + Default mapping: \chemphi\ and \chemPhi, $\phi$ and $\Phi$ \end{example} \section{Predefined Mappings and Selection of a Mapping} @@ -355,7 +394,7 @@ available mappings. packages to be loaded. The mapping names and the required packages are listed in table~\ref{tab:mappings}. -\begin{table}[hbp] +\begin{table} \centering \begin{tabular}{>{\ttfamily}ll} \toprule @@ -365,10 +404,11 @@ in table~\ref{tab:mappings}. var-default & --- \\ textgreek & \pkg{textgreek} \cite{pkg:textgreek} \\ upgreek & \pkg{upgreek} \cite{pkg:upgreek} \\ - newtx & \pkg{newtxmath} \cite{pkg:newtx} \\ + newtx & \pkg*{newtxmath} \cite{pkg:newtx} \\ kpfonts & \pkg{kpfonts} \cite{pkg:kpfonts} \\ mathdesign & \pkg{mathdesign} \cite{pkg:mathdesign} \\ fourier & \pkg{fourier} \cite{pkg:fourier} \\ + textalpha & \pkg{textalpha} \cite{bnd:greek-fontenc} \\ \bottomrule \end{tabular} \caption{Predefined mappings.} @@ -377,27 +417,28 @@ in table~\ref{tab:mappings}. A mapping is selected and activated with one of the following commands: \begin{commands} - \command{activatechemgreekmapping}[\sarg\oarg{options}\marg{name}] - This commands selects and activates the mapping \meta{name}. If the star - variant is used also the package \meta{name} is loaded with options - \meta{options}. This obviously only makes sense if the package name is the - same as the mapping name. The command can only be used in the document - preamble. + \command{activatechemgreekmapping}[\sarg\marg{name}] + \changedversion{0.3}This commands selects and activates the mapping + \meta{name}. If the star variant is used also the package of mapping + \meta{name} (as defined with \cs{newchemgreekmapping} is loaded. The + command can only be used in the document preamble. \command{selectchemgreekmapping}[\marg{name}] - This commands selects and activates the mapping \meta{name}. A required - package has to be loaded additionally the usual way via \cs*{usepackage} - or \cs*{RequirePackage}. The command can be used throughout the document. + \changedversion{0.3}This commands selects and activates the mapping + \meta{name}. A required package has to be loaded additionally the usual + way via \cs*{usepackage} or \cs*{RequirePackage}. If the package hasn't + been loaded a warning will be written to the log. The command can be used + throughout the document. \end{commands} \begin{example} % requires the `newtxmath' package to be loaded: - \Chemphi\ and \ChemPhi, $\phi$ and $\Phi$\par + \chemphi\ and \chemPhi, $\phi$ and $\Phi$\par \selectchemgreekmapping{newtx} - \Chemphi\ and \ChemPhi, $\upphi$ and $\upPhi$ + \chemphi\ and \chemPhi, $\upphi$ and $\upPhi$ \end{example} \section{Changing a Specific Symbol in an Existing Mapping} -If you should want to change a specifig entry of a specific mapping it would +If you should want to change a specific entry of a specific mapping it would be rather tedious to redefine the whole mapping. That is why \chemgreek\ provides a command for that purpose: \begin{commands} @@ -410,25 +451,32 @@ provides a command for that purpose: In order to activate the change you need the (re-) activate the affected mapping afterwards: \begin{example} - \changechemgreeksymbol{default}{lower}{alpha}{xxx} + \chemalpha + \changechemgreeksymbol{default}{lower}{alpha}{xxx}% \selectchemgreekmapping{default} - \Chemalpha + \chemalpha \end{example} \section{Inspecting a Mapping} If you want to check if a mapping has been correctly set you can use the -following command: +following commands: \begin{commands} + \command{printchemgreekmapping}[\marg{mapping}] + \sinceversion{0.3}This will typeset a table (using a simple \code{tabular} + environment) with all~48 characters like the one shown in + table~\ref{tab:showmapping}. \command{showchemgreekmapping}[\marg{mapping}] - This will typeset a table (using a simple \code{tabular} environment) with - all 48 characters like the one shown in table~\ref{tab:showmapping}. + \changedversion{0.3}This command will write information about the + definition of all 48~macros for a mapping to the log file. \end{commands} -\begin{table}[htbp] +\begin{table} \centering - \showchemgreekmapping{newtx} - \caption{A demonstration of the \cs*{showchemgreekmapping} command.} + \printchemgreekmapping{newtx} + \caption{A demonstration of the \cs*{printchemgreekmapping} command.} \label{tab:showmapping} \end{table} +\clearpage + \end{document} 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 08ff636b1d7..db6381cf1ba 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 68720c0a1ec..33552b27838 100644 --- a/Master/texmf-dist/doc/latex/chemmacros/chemmacros_en.tex +++ b/Master/texmf-dist/doc/latex/chemmacros/chemmacros_en.tex @@ -52,9 +52,9 @@ add-cmds = { abinitio, activatechemgreekmapping, AddRxnDesc, anti, aq, aqi, ba, bond, bridge, - cd, ch, changechemgreeksymbol, charrow, chcpd, chemabove, Chemalpha, - Chembeta, Chemgamma, Chemdelta, ChemDelta, chemformula@bondlength, - Chemomega, Chemphi, ChemPhi, chemsetup, chlewis, chname , cip, cis, ch, + cd, ch, changechemgreeksymbol, charrow, chcpd, chemabove, chemalpha, + chembeta, chemgamma, chemdelta, chemDelta, chemformula@bondlength, + chemomega, chemphi, chemPhi, chemsetup, chlewis, chname , cip, cis, ch, CNMR, data, DeclareChemArrow, DeclareChemBond, DeclareChemBondAlias, declarechemgreekmapping, DeclareChemIUPAC, DeclareChemLatin, @@ -63,21 +63,24 @@ el, ElPot, endo, Enthalpy, enthalpy, Entropy, fmch, fpch, fscrm, fscrp, gas, ghs, ghslistall, ghspic, Gibbs, gram, - hapto, HNMR, Helmholtz, + hapto, HNMR, Helmholtz, hydrogen, insitu, invacuo, iupac, Ka, Kb, Kw, Lfi, listofreactions, lqd, mch, mega, meta, mhName, - newchemgreekmapping, - newman, NMR, Nu, Nuc, - orbital, ortho, ox, OX, - para, pch, per, pH, phase, photon, pKa, pKb, pOH, pos, positron, - Pot, prt, + NewChemArrow, NewChemBond, NewChemBondAlias, + newchemgreekmapping, NewChemIUPAC, NewChemLatin, + NewChemNMR, NewChemParticle, NewChemPhase, + NewChemReaction, NewChemState, + newman, nitrogen, NMR, Nu, Nuc, + orbital, ortho, ox, OX, oxygen, + para, pch, per, pH, phase, phosphorus, photon, pKa, pKb, pOH, pos, + positron, Pot, prt, Rad, redox, RenewChemArrow, RenewChemBond, renewchemgreekmapping, RenewChemIUPAC, RenewChemLatin, RenewChemNMR, RenewChemParticle, RenewChemPhase, RenewChemState, Sf, scrm, scrp, second, selectchemgreekmapping, setchemformula, - ShowChemArrow, ShowChemBond, sld, Sod, State, + ShowChemArrow, ShowChemBond, sld, Sod, State, sulfur, trans, val } , @@ -111,7 +114,6 @@ } \usepackage{chemfig,booktabs,cancel,varioref,csquotes} -\usepackage[version=3]{mhchem} \expandafter\def\csname libertine@figurestyle\endcsname{LF} \usepackage[libertine]{newtxmath} @@ -274,9 +276,9 @@ \newcommand*\tablehead[1]{\textrm{\bfseries#1}} -\DeclareChemPhase{\aqi}{aq,$\infty$}% aqueous solution at infinite dilution -\DeclareChemPhase{\cd}{cd}% condensed phase -\DeclareChemPhase{\lc}{lc}% liquid crystal +\NewChemPhase{\aqi}{aq,$\infty$}% aqueous solution at infinite dilution +\NewChemPhase{\cd}{cd}% condensed phase +\NewChemPhase{\lc}{lc}% liquid crystal \newname\hensel{Martin}{Hensel} \newname\pedersen{Bjørn}{Pedersen} @@ -392,6 +394,31 @@ With version~4.0 some changes have been made: \cs{RenewChemState}. The old syntax is still supported but discouraged. \end{itemize} +\subsection{Version 4.3} +\begin{itemize} + \item All one-letter \acs{iupac} macros have been exchanged in favour of + more meaningful macro names. The one-letter commands still exist for + backward compatibility (and to some users no doubt also for convenience). + They are no longer recommended though. One-letter commands seldomly have + meaningful names and often they've also been defined by other packages. + This means they make collaboration more difficult than it needs to be and + are a source for package conflicts. \chemmacros\ used to solved the + latter problem by only providing them inside the argument of + \cs{iupac}\label{desc:one-letter-commands}. The one exception + \chemmacros\ makes is the command \cs{p} (for things like \pH) which is + and will remain an official command. + \item The environment \env{experimental} has got a number of new options, + see section~\ref{sec:experimental-customization}. + \item The commands \cs*{DeclareChem\meta{...}} now don't give an error any + more if the command already exists. This is more consistent with \LaTeX's + \cs*{DeclareRobustCommand}. For all those commands a version + \cs*{NewChem\meta{...}} is introduced that \emph{does} give an error if + the new command is already defined. + \item The package option \option{strict} has been deprecated. + \item The package option \option{cmversion} has been deprecated. + \item The command \cs{mhName} has been dropped. +\end{itemize} + \section{Package Options}\label{sec:options} \chemmacros\ has several package options. They all are used as key/value pairs like @@ -416,30 +443,26 @@ then only be set using the setup command. \keychoice{circletype}{\default{chem},math}\Module{option}\Default{chem} This option switches between two kinds of circled charge symbols: \cs{fplus} \fplus\ and \verbcode+$\oplus$+ $\oplus$. - % cmversion - \keychoice{cmversion}{1,2,3,4,newest}\Module{option}\Default{newest} - This option restores the old definitions of some commands and tries to - ensure backwards compatibility as much as possible (default = \code{4}). - Actually \code{2} and \code{3} are aliases, as are -- for now -- \code{4} - and \code{newest}. \emph{This option can only be chosen in the preamble}. % ghsystem \keybool{ghsystem}\Module{option}\Default{true} \keyis{ghsystem}{false} disables the automatic loading of the \ghsystem\ package. % greek - \keychoice{greek}{\default{auto},kpfonts,math,newtx,textgreek,upgreek}% - \Module{option}\Default{auto} - This option determines how the letters \cs{Chemalpha} and friends are - typeset. See page~\pageref{desc:upgreek} for more information. Please - note that this option \emph{does not load either \pkg{upgreek}, - \pkg{kpfonts}, \pkg{newtxmath} nor \pkg{textgreek}!} It only + \keychoice{greek}{\default{auto},upgreek,textgreek,mathdesign,kpfonts,newtx,% + fourier,textalpha}\Module{option}{}% empty group pushes default value to + % next line + \Default{auto} + This option determines how the letters \cs{chemalpha} and friends are + typeset. See pages~\pageref{desc:greek} and~\pageref{par:greek_letters} + for more information. Please note that this option \emph{does not load + either \pkg{upgreek}, \pkg{kpfonts} or any other package!} It only determines which one to choose if available. The option \code{auto} will - detect if either (in order of priority) \pkg{upgreek}, \pkg{textgreek}, - \pkg{kpfonts} or \pkg{newtxmath} have been loaded and use them if - available. If you explicitly choose \code{upgreek}, \code{textgreek}, - \pkg{kpfonts} or \pkg{newtxmath} you also have to load the - corresponding package. \emph{This option can only be chosen in the - preamble}. + detect if any of the packages needed for one of the options has been + loaded and use it if available. If more than one of the packages has been + loaded the option will choose the one listed first in the above choice + list. If you explicitly choose an option other than \code{auto} or + \code{math} you also have to load the corresponding package. \emph{This + option can only be chosen in the preamble}. % iupac \keychoice{iupac}{auto,restricted,strict}\Module{option}\Default{auto} Take care of how \ac{iupac} naming commands are defined, see @@ -454,10 +477,6 @@ then only be set using the setup command. The package \pkg{mathspec} also defines a macro \cs{Nu}. This option chooses which definition holds, see page~\pageref{Nu}. \emph{This option can only be chosen in the preamble}. - % strict - \keybool{strict}\Module{option}\Default{false} - Setting \key{strict}{true} will turn all warning messages into erros - messages. % synchronize \keybool{synchronize}\Module{option}\Default{false} The setting \code{true} will tell \chemmacros\ to adapt the font settings @@ -593,7 +612,7 @@ If you choose \code{german/ngerman} the phase commands \cs{sld} and \cs{lqd} and the command \cs{pKa} are translated. \subsubsection{Italian} -\DeclareChemIUPAC{\ter}{\textit{ter}}\DeclareChemIUPAC{\sin}{\textit{sin}}% +\NewChemIUPAC{\ter}{\textit{ter}}\NewChemIUPAC{\sin}{\textit{sin}}% Choosing the language \code{italian} defines two additional \ac{iupac} commands: \begin{commands} \command{ter} \iupac{\ter} @@ -636,7 +655,7 @@ in \chemformula's \cs{ch}. A math operator symbol for denoting the change in an extensive thermodynamic quantity for a process such as \State{H}. This symbol is used in the definitions presented in section~\ref{sec:stand-state-therm}. - \command{Chemalpha}[ \Chemalpha, \cs{ChemAlpha} \ChemAlpha] + \command{chemalpha}[ \chemalpha, \cs{chemAlpha} \chemAlpha] For each of the 24 greek letters a lowercase and uppercase \cs*{Chem...} command is defined that maps to the upright greek letter as set with the option \option{greek}. More details on this can be found in the manual of @@ -656,15 +675,37 @@ the option \ba\ \Nu \end{example} -\label{desc:upgreek}The greek letters aren't newly defined symbols but are +\label{desc:greek}The greek letters aren't newly defined symbols but are defined differently depending on the packages you've loaded. The default definition is the corresponding math letter. If you have loaded the \pkg{textgreek} package the letters are taken from there, and if you have loaded the package \pkg{upgreek} the macros of that package are used. This is also described in the description of the package option \option{greek}, other -details can be found in the documentation of the \chemgreek\ package. This -documentation uses \pkg{newtxmath} and the setting \keyis{greek}{newtx} for -instance. +details can be found in the documentation of the \chemgreek\ package. Which +package you have to load for a specific choice for the package option +\option{greek} is listed in table~\ref{tab:option:greek}. This documentation +uses \pkg{newtxmath} and the setting \keyis{greek}{newtx} for instance. + +\begin{table} + \centering + \caption{Packages needed for the \option*{greek} package option..} + \label{tab:option:greek} + \begin{tabular}{>{\ttfamily}ll} + \toprule + \tablehead{option} & \tablehead{needed package} \\ + \midrule + auto & --- \\ + math & --- \\ + textgreek & \pkg{textgreek} \cite{pkg:textgreek} \\ + upgreek & \pkg{upgreek} \cite{pkg:upgreek} \\ + newtx & \pkg{newtxmath} \cite{pkg:newtx} \\ + kpfonts & \pkg{kpfonts} \cite{pkg:kpfonts} \\ + mathdesign & \pkg{mathdesign} \cite{pkg:mathdesign} \\ + fourier & \pkg{fourier} \cite{pkg:fourier} \\ + textalpha & \pkg{textalpha} \cite{bnd:greek-fontenc} \\ + \bottomrule + \end{tabular} +\end{table} The reason why \chemmacros\ uses these macros in the first place is \ac{iupac} compliance. \ac{iupac} recommends to use upright greek letters in @@ -684,8 +725,11 @@ page~\pageref{par:greek_letters}. Surely sometimes it can be handy to have other particle macros defined such as \cs*{positron} or \cs*{photon}. This can easily be done with this command: \begin{commands} + \command{NewChemParticle}[\marg{cs}\marg{definition}] + \sinceversion{4.3}Define a new particle command. Gives an error if + \meta{cs} already exists. \command{DeclareChemParticle}[\marg{cs}\marg{definition}] - Define a new particle command. + \changedversion{4.3}Define a new particle command. \command{RenewChemParticle}[\marg{cs}\marg{definition}] Renew the definition of a particle command. \end{commands} @@ -694,16 +738,11 @@ the particle which means that the \meta{definition} should be a vaild \chemformula\ compound. Please have a look at the \chemformula\ manual for details. The particle will obey the \option{circled} option. \begin{example} - \DeclareChemParticle\positron{\Chembeta+} - \DeclareChemParticle\photon{\Chemgamma} - \RenewChemParticle\el{\Chembeta-} + \NewChemParticle\positron{\chembeta+} + \NewChemParticle\photon{\chemgamma} + \RenewChemParticle\el{\chembeta-} \positron\ \photon\ \el \end{example} -\cs{DeclareChemParticle} only defines a particle if \meta{cs} is not already -used by any other command. If it \emph{is} already used \chemmacros\ will -either give a warning or an error, depending on the option \option{strict}. -\cs{RenewChemParticle} \emph{only} defines a particle if \meta{cs} \emph{is} -already used and issues a warning/error otherwise. \section{Nomenclature, Stereo Descriptors, Latin Phrases}\label{sec:stereo} \subsection{\acs{iupac} Names} @@ -754,15 +793,16 @@ The spaces inserted by these commands can be customized. \end{options} The command \cs{iupac} serves another purpose, too, however. Regardless of -the setting of the \option{iupac} option all the commands presented in -this section are always defined \emph{inside} \cs{iupac}. Quite a number of -the naming commands have very general names: \cs{meta}, \cs{D}, \cs{E}, -\cs{L}, \cs{R}, \cs{S}, \cs{trans} and so forth. This means they either -are predefined already (\cs{L} \L) or are easily defined by another package -or class (the \pkg{cool} package defines both \cs{D} and \cs{E}, for -example). In order to give you control which commands are defined in which -way, there is the package option \option{iupac}\label{desc:iupac}. It -has three modes: +the setting of the \option{iupac} option all the commands presented in this +section are always defined \emph{inside} \cs{iupac}. Quite a number of the +naming commands have very general names: \cs{meta}, \cs{D}, \cs{E}, \cs{L}, +\cs{R}, \cs{S}, \cs{trans} and so forth\footnote{Please read + page~\pageref{desc:one-letter-commands} before you consider using the + one-letter commands}. This means they either are predefined already (\cs{L} +\L) or are easily defined by another package or class (the \pkg{cool} package +defines both \cs{D} and \cs{E}, for example). In order to give you control +which commands are defined in which way, there is the package option +\option{iupac}\label{desc:iupac}. It has three modes: \begin{itemize} \item \keyis{iupac}{auto}: if the commands are \emph{not} defined by any package or class you're using they are available generally, otherwise only @@ -777,8 +817,9 @@ has three modes: \end{itemize} Table~\ref{tab:iupac_modes} demonstrates the different modes. -\begin{table}[ht] +\begin{table} \centering + \caption{Demonstration of \option*{iupac}'s modes.}\label{tab:iupac_modes} \begin{tabular}{lccc} \toprule & auto & restricted & strict \\ @@ -789,7 +830,6 @@ Table~\ref{tab:iupac_modes} demonstrates the different modes. \cs{iupac}\Marg{\cs{D}} & \iupac{\D} & \iupac{\D} & \iupac{\D} \\ \bottomrule \end{tabular} - \caption{Demonstration of \option*{iupac}'s modes.}\label{tab:iupac_modes} \end{table} \subsubsection{Predefined Commands} @@ -799,57 +839,103 @@ names more convenient. \paragraph{Greek Letters}\label{par:greek_letters} -Greek letters in compound names are typeset upright. For this there are for -example the packages \pkg{upgreek} and \pkg{textgreek}. If you have -loaded one of them\footnote{There are other options, see the description of - the \option{greek} option.} the following commands typeset upright Greek -letters: -\begin{itemize} - \item[] - \cs{a} \iupac{\a} \quad - \cs{b} \iupac{\b} \quad - \cs{g} \iupac{\g} \quad - \cs{d} \iupac{\d} \quad - \cs{k} \iupac{\k} \quad - \cs{m} \iupac{\m} \quad - \cs{n} \iupac{\n} \quad - \cs{w} \iupac{\w} -\end{itemize} +Greek\changedversion{4.3} letters in compound names are typeset upright. For +this there are for example the packages \pkg{upgreek} and \pkg{textgreek}. If +you have loaded one of them\footnote{There are other options, see the + description of the \option{greek} option.} the following commands typeset +upright Greek letters: +\begin{commands} + \command{chemalpha}[\quad\chemalpha] + Upright lowercase alpha + \command{chembeta}[\quad\chembeta] + Upright lowercase alpha + \command{chemgamma}[\quad\chemgamma] + Upright lowercase alpha + \command{chemdelta}[\quad\chemdelta] + Upright lowercase alpha +\end{commands} +The exist two commands for each of the twenty-four Greek letters: a lowercase +and an uppercase version (\cs{chemalpha} and \cs{chemAlpha}). Those commands +are actually provided by the \chemgreek\ package. For more details refer to +its documentation. + +There are a number of one-letter commands that some people may find convenient +to use which use above mentioned commands to pint Greek letters inside +\cs{iupac}. They're listed in table~\ref{tab:iupac-greek-shortcuts}. But +please read page~\pageref{desc:one-letter-commands} first before you use them. + +\begin{table} + \centering + \caption{\acs*{iupac} shortcuts for Greek letters.} + \label{tab:iupac-greek-shortcuts} + \begin{tabular}{*9l} + \toprule + macro & + \cs{a} & \cs{b} & \cs{g} & \cs{d} & + \cs{k} & \cs{m} & \cs{n} & \cs{w} \\ + \midrule + letter & + \iupac{\a} & \iupac{\b} & \iupac{\g} & \iupac{\d} & + \iupac{\k} & \iupac{\m} & \iupac{\n} & \iupac{\w} \\ + \bottomrule + \end{tabular} +\end{table} + + \begin{example} - \iupac{5\a\-androstan\-3\b\-ol} \par - \iupac{\a\-(tri\|chloro\|methyl)\-\w\-chloro\|poly(1,4\-phenylene\|methylene)} + \iupac{5\chemalpha\-androstan\-3\chembeta\-ol} \par + \iupac{\chemalpha\-(tri\|chloro\|methyl)\-\chemomega + \-chloro\|poly(1,4\-phenylene\|methylene)} \end{example} \paragraph{Hetero Atoms and added Hydrogen} -Attachments to hetero atoms and added hydrogen atoms are indicated by italic -letters~\cite{iupac:greenbook}. \chemmacros\ defines a few shortcuts for the -most common ones. -\begin{itemize} - \item[] - \cs{H} \iupac{\H} \quad - \cs{O} \iupac{\O} \quad - \cs{N} \iupac{\N} \quad - \cs{Sf} \iupac{\Sf} \quad - \cs{P} \iupac{\P} -\end{itemize} +Attachments to hetero atoms\changedversion{4.3} 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}. But + please read page~\pageref{desc:one-letter-commands} first before you use + it.) + \command{oxygen}[\quad\iupac{\oxygen}] + The italic O for oxygen. (An alias for this command is \cs{O}. But + please read page~\pageref{desc:one-letter-commands} first before you use + it.) + \command{nitrogen}[\quad\iupac{\nitrogen}] + The italic N for nitrogen. (An alias for this command is \cs{N}. But + please read page~\pageref{desc:one-letter-commands} first before you use + it.) + \command{sulfur}[\quad\iupac{\sulfur}] + The italic S for sulfur. (An alias for this command is \cs{Sf}. But + please read page~\pageref{desc:one-letter-commands} first before you use + it.) + \command{phosphorus}[\quad\iupac{\phosphorus}] + The italic P for phosphorus. (An alias for this command is \cs{P}. But + please read page~\pageref{desc:one-letter-commands} first before you use + it.) +\end{commands} \begin{example}[side-by-side] - \iupac{\N\-methyl\|benz\|amide} \par - \iupac{3\H\-pyrrole} \par - \iupac{\O\-ethyl hexanethioate} + \iupac{\nitrogen\-methyl\|benz\|amide} + + \iupac{3\hydrogen\-pyrrole} + + \iupac{\oxygen\-ethyl hexanethioate} \end{example} \paragraph{Cahn-Ingold-Prelog}\label{par:cip} \begin{commands} \command{cip}[\marg{conf}] Typeset Cahn-Ingol-Prelog descriptors, \eg: \cs{cip}\Marg{R,S} \cip{R,S} - \command{R}[ \iupac{\R}] - Typeset recto descriptor. - \command{S}[ \iupac{\S}] - Typeset sinister descriptor. + \command{rectus}[\quad\iupac{\rectus}] + Typeset rectus descriptor. (An alias for this command is \cs{R}. But + please read page~\pageref{desc:one-letter-commands} first before you use + it.) + \command{sinister}[\quad\iupac{\sinister}] + Typeset sinister descriptor. (An alias for this command is \cs{S}. But + please read page~\pageref{desc:one-letter-commands} first before you use + it.) \end{commands} -Since the command \cs{S} has another meaning already (\S) it is only -available inside \cs{iupac} in the default setting. Both these commands and the entgegen/zusammen descriptors get a small additional amount of kerning after the closing parenthesis. This amount can @@ -860,13 +946,16 @@ be changed through the following option: \end{options} \paragraph{Fischer} -\begin{itemize} - \item[] - \cs{D} \iupac{\D} \quad - \cs{L} \iupac{\L} -\end{itemize} -Since the command \cs{L} has another meaning already (\L) it is only -available inside \cs{iupac} in the default setting. +\begin{commands} + \command{dexter}[\quad\iupac{\dexter}] + Typeset dexter descriptor. (An alias for this command is \cs{D}. But + please read page~\pageref{desc:one-letter-commands} first before you use + it.) + \command{laevus}[\quad\iupac{\laevus}] + Typeset laevus descriptor. (An alias for this command is \cs{L}. But + please read page~\pageref{desc:one-letter-commands} first before you use + it.) +\end{commands} \paragraph{cis/trans, zusammen/entgegen, syn/anti \& tert} \begin{itemize} @@ -875,15 +964,15 @@ available inside \cs{iupac} in the default setting. \cs{trans} \iupac{\trans} \quad \cs{fac} \iupac{\fac} \quad \cs{mer} \iupac{\mer} \quad - \cs{Z} \iupac{\Z} \quad - \cs{E} \iupac{\E} \quad + \cs{zusammen} \iupac{\zusammen} \quad + \cs{entgegen} \iupac{\entgegen} \quad \cs{syn} \iupac{\syn} \quad \cs{anti} \iupac{\anti} \quad \cs{tert} \iupac{\tert} \end{itemize} -The package \pkg{cool} defines the commands \cs{E} and \cs{D}, too. If you -load it, the \chemmacros\ version will only be available inside \cs{iupac} in -the default setting. +An alias for \cs{entgegen} is \cs{E} and an alias for \cs{zusammen} is +\cs{Z}. But please read page~\pageref{desc:one-letter-commands} first before +you use them. \paragraph{ortho/meta/para} \begin{itemize} @@ -898,8 +987,8 @@ Although these commands are provided I like to cite~\cite{iupac:bluebook}: \begin{cnltxquote}[{\acs{iupac} Blue Book {\cite[][p.\,90]{iupac:bluebook}}}] The letters \iupac{\ortho}, \iupac{\meta}, and \iupac{\para} have been used in place of \textit{ortho}, \textit{meta}, and \textit{para}, respectively, - to designate the 1,2- 1,3-, and 1,4- isomers of disubstituted benzene. This - usage is strongly discouraged and is not used in preferred \acs{iupac} + to designate the 1,2-, 1,3-, and 1,4- isomers of disubstituted benzene. + This usage is strongly discouraged and is not used in preferred \acs{iupac} names. \end{cnltxquote} @@ -911,14 +1000,14 @@ Although these commands are provided I like to cite~\cite{iupac:bluebook}: \cs{Sconf}: \Sconf \quad \cs{Sconf}\oarg{}: \Sconf[] \end{commands} -Examples: +Examples:\nopagebreak \begin{example} - \iupac{\D\-Wein\|s\"aure} = + \iupac{\dexter\-Wein\|s\"aure} = \iupac{\cip{2S,3S}\-Wein\|s\"aure} \par - \iupac{\D\-($-$)\-Threose} = + \iupac{\dexter\-($-$)\-Threose} = \iupac{\cip{2S,3R}\-($-$)\-2,3,4\-Tri\|hydroxy\|butanal} \par \iupac{\cis\-2\-Butene} = - \iupac{\Z\-2\-Butene}, \par + \iupac{\zusammen\-2\-Butene}, \par \iupac{\cip{2E,4Z}\-Hexa\|diene} \par \iupac{\meta\-Xylol} = \iupac{1,3\-Di\|methyl\|benzene} @@ -926,12 +1015,15 @@ Examples: \paragraph{Coordination Chemistry} -\chemmacros\ provides two commands useful with coordination chemistry: -\begin{itemize} - \item[] - \cs{bridge}\marg{num} \bridge{3} \quad - \cs{hapto}\marg{num} \hapto{5} -\end{itemize} +\chemmacros\ provides a few commands useful with coordination chemistry: +\begin{commands} + \command{bridge}[\marg{num}\quad\bridge{3}] + Denote bridging ligand connection. + \command{hapto}[\marg{num}\quad\hapto{5}] + Denote hapticity. + \command{dento}[\marg{num}\quad\dento{2}] + \sinceversion{4.3}Denote denticity. +\end{commands} \begin{example} Ferrocene = \iupac{bis(\hapto{5}cyclo\|penta\|dienyl)iron} \par \iupac{tetra\-\bridge{3}iodido\-tetrakis[tri\|methyl\|platinum(IV)]} @@ -943,28 +1035,33 @@ Two options allow customization: Appends the number as a subscript or superscript. \ac{iupac} recommendation is the subscript~\cite{iupac:redbook}. \keybool{coord-use-hyphen}\Module{iupac}\Default{true} - Append a hyphen to \cs{hapto} and \cs{bridge} or don't. + Append a hyphen to \cs{hapto}, \cs{dent} and \cs{bridge} or don't. \end{options} \subsubsection{Own Naming Commands} If you find any commands missing you can define them using \begin{commands} - \command{DeclareChemIUPAC}[\marg{cs}\marg{declaration}] - Define a new \ac{iupac} command that is in any case defined inside of - \cs{iupac} regardless if \meta{cs} is defined elsewhere already. + \command{NewChemIUPAC}[\marg{cs}\marg{declaration}] + \sinceversion{4.3}Define a new \ac{iupac} command that is in any case + defined inside of \cs{iupac} regardless if \meta{cs} is defined elsewhere + already. \command{RenewChemIUPAC}[\marg{cs}\marg{declaration}] Redefine an existing \ac{iupac} command that is in any case defined inside of \cs{iupac} regardless if \meta{cs} is defined elsewhere already. + \command{DeclareChemIUPAC}[\marg{cs}\marg{declaration}] + \changedversion{4.3}Define a new \ac{iupac} command that is in any case + defined inside of \cs{iupac} regardless if \meta{cs} is defined elsewhere + already. This silently overwrites an existing \ac{iupac} definition. \end{commands} A command defined in this way will obey the setting of the option \option{iupac}. This means any existing command is only overwritten with -\keyis{iupac}{strict}. However, \cs{DeclareChemIUPAC} will \emph{not} change -the definition of an existing \ac{iupac} naming command but issue a warning/an -error (depending on the package option \option{strict}) if the \ac{iupac} -naming command already exists. +\keyis{iupac}{strict}. However, \cs{NewChemIUPAC} will \emph{not} change the +definition of an existing \ac{iupac} naming command but issue an error if the +\ac{iupac} naming command already exists. \cs{DeclareChemIUPAC} \emph{will} +overwrite an existing \ac{iupac} command. \begin{example} - \DeclareChemIUPAC\endo{\textit{endo}} + \NewChemIUPAC\endo{\textit{endo}} \RenewChemIUPAC\anti{\textit{anti}} \iupac{(2\-\endo,7\-\anti)\-2\-bromo\-7\-fluoro\|bicyclo[2.2.1]heptane} \end{example} @@ -996,13 +1093,16 @@ depends on \pkg{chemstyle}'s option \code{abbremph}. The commands are defined through \begin{commands} + \command{NewChemLatin}[\marg{cs}\marg{phrase}] + \sinceversion{4.3}Define a new latin phrase. Gives an error if \meta{cs} + already exists. \command{DeclareChemLatin}[\marg{cs}\marg{phrase}] - Define a new latin phrase. + \changedversion{4.3}Define a new latin phrase. \command{RenewChemLatin}[\marg{cs}\marg{phrase}] Redefine an existing latin phrase. \end{commands} \begin{example}[side-by-side] - \DeclareChemLatin\ltn{latin text}\ltn + \NewChemLatin\ltn{latin text}\ltn \end{example} If you have \emph{not} loaded \pkg{chemstyle} you can change the appearance with this option: @@ -1066,11 +1166,11 @@ There is one option which changes the style the \p{} is typeset: \begin{options} \keychoice{p-style}{italics,slanted,upright}\Module{acid-base}\Default{upright} Set the style of the \p{} operator. - \keyval{K-acid}{text}\Module{acid-base} + \keyval{K-acid}{text}\Module{acid-base}\Default{A} The subscript to \cs{Ka} and \cs{pKa}. - \keyval{K-base}{text}\Module{acid-base} + \keyval{K-base}{text}\Module{acid-base}\Default{B} The subscript to \cs{Kb} and \cs{pKb}. - \keyval{K-water}{text}\Module{acid-base} + \keyval{K-water}{text}\Module{acid-base}\Default{W} The subscript to \cs{Kw}. \end{options} \begin{example} @@ -1348,7 +1448,7 @@ The default length of the vertical lines can be customized with the option \OX{a,Na} $\rightarrow$ \OX{b,Na}\pch\redox(a,b)[->,red]{ox} \end{example} -Examples:% TODO: watch pagebreaks! +Examples:\nopagebreak% TODO: watch pagebreaks! \begin{example} \vspace{7mm} \ch{ @@ -1454,14 +1554,15 @@ its settings: \subsubsection{Create New Variables or Redefine Existing Ones}\label{sec:create-new-variables} \begin{commands} - \command{DeclareChemState}[\marg{name}\oarg{options}\marg{symbol}\marg{unit}] - Define new corresponding commands. \meta{name} may either be a control - sequence token or a control sequence name without leading backslash. - \changedversion{4.2}This means that \cs{DeclareChemState}\Marg{name} and + \command{NewChemState}[\marg{name}\oarg{options}\marg{symbol}\marg{unit}] + \sinceversion{4.3}Define new corresponding commands. \meta{name} may + either be a control sequence token or a control sequence name without + leading backslash. This means that \cs{DeclareChemState}\Marg{name} and \cs{DeclareChemState}\Marg{\cs*{name}} are equivalent. The reason for this rather strange definition is a syntax change in \cs{DeclareChemState} while retaining backwards compaitibility. The latter version is recommended though and the former version may deprecate in the future. + Gives an error if \meta{name} already exists \command{RenewChemState}[\marg{name}\oarg{options}\marg{symbol}\marg{unit}] Redefine existing state commands. \meta{name} may either be a control sequence token or a control sequence name without leading backslash. @@ -1470,11 +1571,14 @@ its settings: this rather strange definition is a syntax change in \cs{RenewChemState} while retaining backwards compaitibility. The latter version is recommended though and the former version may deprecate in the future. + \command{DeclareChemState}[\marg{name}\oarg{options}\marg{symbol}\marg{unit}] + \changedversion{4.3}Like \cs{NewChemState} but gives now error if + \meta{name} already exists. \end{commands} \begin{example} - \DeclareChemState\Helmholtz{A}{\kilo\joule\per\mole} - \DeclareChemState\ElPot[subscript-left=false,exponent=]{E}{\volt} + \NewChemState\Helmholtz{A}{\kilo\joule\per\mole} + \NewChemState\ElPot[subscript-left=false,exponent=]{E}{\volt} \Helmholtz{123.4} \par \ElPot{-1.1} \par \ElPot[exponent=0]($\ch{Sn}|\ch{Sn^2+}||\ch{Pb^2+}|\ch{Pb}$){0.01} @@ -1501,16 +1605,16 @@ can be set. The existing commands have been defined like this: \begin{sourcecode} - \DeclareChemState\Enthalpy{H}{\kilo\joule\per\mole} - \DeclareChemState\Entropy[delta=false,subscript-left=false]{S} + \NewChemState\Enthalpy{H}{\kilo\joule\per\mole} + \NewChemState\Entropy[delta=false,subscript-left=false]{S} {\joule\per\kelvin\per\mole} - \DeclareChemState\Gibbs{G}{\kilo\joule\per\mole} + \NewChemState\Gibbs{G}{\kilo\joule\per\mole} \end{sourcecode} So -- for following thermodynamic conventions -- one could define a molar and an absolute variable: \begin{example} - \DeclareChemState\enthalpy[exponent=]{h}{\kilo\joule\per\mole}% molar + \NewChemState\enthalpy[exponent=]{h}{\kilo\joule\per\mole}% molar \RenewChemState\Enthalpy[exponent=]{H}{\kilo\joule}% absolute \enthalpy{-12.3} \Enthalpy{-12.3} \end{example} @@ -1596,9 +1700,13 @@ The third argument specifies the solvent: It is possible to define short cut commands for specific nuclei. \begin{commands} + \command{NewChemNMR}[\marg{cs}\Marg{\meta{num},\meta{atom}}] + \sinceversion{4.3}Define a new shortcut macro for typesetting a certain + type of magnetic resonence data. Gives an error if \meta{cs} already + exists. \command{DeclareChemNMR}[\marg{cs}\Marg{\meta{num},\meta{atom}}] - Define a new shortcut macro for typesetting a certain type of magnetic - resonence data. + \changedversion{4.3}Define a new shortcut macro for typesetting a certain + type of magnetic resonence data. \command{RenewChemNMR}[\marg{cs}\Marg{\meta{num},\meta{atom}}] Redefine an existing shortcut macro for typesetting a certain type of magnetic resonence data. @@ -1607,8 +1715,8 @@ It is possible to define short cut commands for specific nuclei. This defines a command with the same arguments as \cs{NMR} \emph{except} for \Marg{\meta{num},\meta{atom}}: \begin{example}[side-by-side] - \DeclareChemNMR\HNMR{1,H}% - \DeclareChemNMR\CNMR{13,C}% + \NewChemNMR\HNMR{1,H}% + \NewChemNMR\CNMR{13,C}% \CNMR*(100) \par \HNMR*(400) \end{example} @@ -1634,8 +1742,8 @@ This defines a command with the same arguments as \cs{NMR} \emph{except} for \cs{NMR}\Marg{13,C[\textasciicircum 1H]} \NMR{13,C[^1H]} \command{J}[\Darg{\meta{bonds};\meta{nuclei}}\oarg{unit}\marg{list of nums}] Coupling constant, values are input separated by \code{;} (NMR). The - argument \Darg{\meta{bonds};\meta{nuclei}} is optional and enables further - specifications of the coupling. + argument \Darg{\meta{bonds};\meta{nuclei}} and \oarg{unit} are optional + and enable further specifications of the coupling. \command{\#}[\marg{num}] Number of nuclei (NMR). \command{pos}[\marg{num}] @@ -1654,7 +1762,7 @@ This defines a command with the same arguments as \cs{NMR} \emph{except} for \end{experimental} \end{example} -\subsection{Customization} +\subsection{Customization}\label{sec:experimental-customization} The output of the environment and of the NMR commands can be customized be a number of options. For historical reasons they all belong to the module @@ -1666,10 +1774,26 @@ number of options. For historical reasons they all belong to the module The used default nucleus. \keyval{format}{commands}\Module{nmr}\Default For example \cs*{bfseries}. - \keychoice{pos-number}{side,sub}\Module{nmr}\Default{side} - Position of the number next to the atom. + \keychoice{pos-number}{side,sub,super}\Module{nmr}\Default{side} + \changedversion{4.3}Position of the number next to the atom. + \keyval{coupling-symbol}{code}\Module{nmr}\Default{J} + \sinceversion{4.3}The symbol used for the coupling constant. \keyval{coupling-unit}{unit}\Module{nmr}\Default{\cs*{hertz}} A \pkg{siunitx} unit. + \keychoice{coupling-pos}{side,sub}\Module{nmr}\Default{side} + \sinceversion{4.3}Placement of the coupling nuclei next to the symbol + $J$ (or rather the symbol specified with option + \option{coupling-symbol}). + \keyval{coupling-nuclei-pre}{code}\Module{nmr}\Default{(} + \sinceversion{4.3}Code inserted before the coupling nuclei when + \keyis{coupling-pos}{side}. + \keyval{coupling-nuclei-post}{code}\Module{nmr}\Default{)} + \sinceversion{4.3}Code inserted after the coupling nuclei when + \keyis{coupling-pos}{side}. + \keyval{coupling-bonds-pre}{code}\Module{nmr}\Default + \sinceversion{4.3}Code inserted before the coupling bonds. + \keyval{coupling-bonds-post}{code}\Module{nmr}\Default{\cs*{!}} + \sinceversion{4.3}Code inserted after the coupling bonds. \keybool{parse}\Module{nmr}\Default{true} Treat the solvent as \chemformula\ formula or not. \keyval{delta}{tokens}\Module{nmr}\Default @@ -1697,7 +1821,7 @@ The default setup of the list: \end{experimental} \end{example} -The command \cs{NMR} and all commands defined through \cs{DeclareChemNMR} +The command \cs{NMR} and all commands defined through \cs{NewChemNMR} can be used like \cs{data} for the NMR data. \begin{example} @@ -1907,61 +2031,6 @@ Output for these options: \data*{quantum yield} $\Phi = \val{0.74+-0.1}$\,. \end{experimental} -\section{Commands for \pkg*{mhchem}}\label{sec:mhchem} - -\pkg{mhchem} is not officially supported by \chemmacros\ as it used -\chemformula\ instead. However, for historical reasons the following command -is still provided. - -\begin{commands} - \command{mhName}[\oarg{options}\marg{formula}\marg{text}] - Writes \meta{text} below \meta{formula} -\end{commands} - -For example: -\begin{example} - \ce{ - 4 C2H5Cl + Pb{/}Na - -> - \mhName{Pb(C2H5)4}{former antiknock additive} + NaCl - } -\end{example} - -There are several keys to customize \cs{mhName}. -\begin{options} - \keyval{align}{alignment command}\Module{mhName}\Default{\cs*{centering}} - The alignment of the text in the box it is placed in. - \keyval{format}{anything}\Module{mhName}\Default - The format of the text. - \keyval{fontsize}{font size command}\Module{mhName}\Default{\cs*{tiny}} - The fontsize of the text. - \keychoice{width}{\meta{dim},auto}\Module{mhName}\Default{auto} - The width of the box the text is placed in. -\end{options} - -Since version~3.13 of \pkg{mhchem} you need to hide the command in braces if -you want to use the optional argument, - -\begin{example} - \ce{ - 4 C2H5Cl + Pb / Na - -> - {\mhName[fontsize=\footnotesize]{Pb(C2H5)4}{former antiknock additive}} - + NaCl - }\par - \chemsetup[mhName]{ - align=\raggedright, - fontsize=\small, - format=\bfseries\color{red}, - width=3cm - } - \ce{ - 4 C2H5Cl + Pb / Na - -> - \mhName{Pb(C2H5)4}{former antiknock additive} + NaCl - } -\end{example} - \section{Reaction Environments}\label{sec:reactions} \subsection{Defined by \chemmacros} @@ -2049,9 +2118,15 @@ function properly: \subsection{Own Reactions} You can create new types of reactions with the command: \begin{commands} + \command{NewChemReaction}[\oarg{options}\marg{name}\marg{math name}] + \sinceversion{4.3}\meta{name} will be the name of the new environment. + \meta{math name} is the underlying math environment. Gives an error if + \meta{name} already exists. \command{DeclareChemReaction}[\oarg{options}\marg{name}\marg{math name}] - \meta{name} will be the name of the new environment. \meta{math name} - is the underlying math environment. + \changedversion{4.3}\meta{name} will be the name of the new environment. + \meta{math name} is the underlying math environment. + \command{RenewChemReaction}[\oarg{options}\marg{name}\marg{math name}] + \sinceversion{4.3}Renew an existing definition. \end{commands} The command has two options. @@ -2071,20 +2146,20 @@ has a mandatory argument. The predefined environments are defined via \begin{sourcecode} - \DeclareChemReaction[star]{reaction}{equation} - \DeclareChemReaction[star]{reactions}{align}. + \NewChemReaction[star]{reaction}{equation} + \NewChemReaction[star]{reactions}{align}. \end{sourcecode} Let's suppose, you'd like to have the alignment behaviour of the \env{alignat} environment for \chemformula\ reactions. You could do the following: \begin{sourcecode} - \DeclareChemReaction[star,arg]{reactionsat}{alignat} + \NewChemReaction[star,arg]{reactionsat}{alignat} \end{sourcecode} With this the \env{reactionsat} environment is defined. \begin{example} - \DeclareChemReaction[star,arg]{reactionsat}{alignat} + \NewChemReaction[star,arg]{reactionsat}{alignat} \begin{reactionsat}{3} A &-> B &&-> C &&-> D \\ aaaaa &-> bbbbb &&-> ccccc &&-> ddddd @@ -2195,6 +2270,12 @@ There are two options to customize the output: Depending on the subject of your document you might need to indicate other states of aggregation. You can easily define them. \begin{commands} + \command{NewChemPhase}[\marg{cs}\oarg{german}\marg{english}] + \sinceversion{4.3}Define a new phase command. Actually the optional + argument is an artefact of an earlier implementation of the command. It + has no effect at all. See section~\ref{sec:lang-depend} for a way to + define language dependent settings. Gives an error if \meta{cs} already + exists. \command{DeclareChemPhase}[\marg{cs}\oarg{german}\marg{english}] Define a new phase command. Actually the optional argument is an artefact of an earlier implementation of the command. It has no effect at all. @@ -2209,19 +2290,20 @@ states of aggregation. You can easily define them. If you need a phase indicator just once or twice. \end{commands} -\cs{DeclareChemPhase} only defines a phase if \meta{cs} is not already used by -any other command. If it \emph{is} already used \chemmacros\ will either give -a warning or an error, depending on the option \option{strict}. -\cs{RenewChemPhase} \emph{only} defines a phase if \meta{cs} \emph{is} already -used and issues a warning/error otherwise. Unlike the other declaration -commands of \chemmacros\ \cs{DeclareChemPhase} and \cs{RenewChemPhase} -\emph{can only be used in the preamble.} +\cs{NewChemPhase} only defines a phase if \meta{cs} is not already used by any +other command. If it \emph{is} already used \chemmacros\ will either give an +error \cs{RenewChemPhase} \emph{only} defines a phase if \meta{cs} \emph{is} +already used and issues an error otherwise. \cs{DeclareChemPhase} does not +check if the phase command already exists but simply defines it with the new +meaning. Unlike the other declaration commands of \chemmacros\ +\cs{NewChemPhase}, \cs{RenewChemPhase} and \cs{DeclareChemPhase} \emph{can + only be used in the preamble.} \begin{example} % preamble: - % \DeclareChemPhase{\aqi}{aq,$\infty$}% aqueous solution at infinite dilution - % \DeclareChemPhase{\cd}{cd}% condensed phase - % \DeclareChemPhase{\lc}{lc}% liquid crystal + % \NewChemPhase{\aqi}{aq,$\infty$}% aqueous solution at infinite dilution + % \NewChemPhase{\cd}{cd}% condensed phase + % \NewChemPhase{\lc}{lc}% liquid crystal NaOH\aqi\ \ch{H2O\cd} U\phase{cr} A\lc \par \chemsetup[phases]{pos=sub} NaOH\aqi\ \ch{H2O\cd} U\phase{cr} A\lc @@ -2229,11 +2311,11 @@ commands of \chemmacros\ \cs{DeclareChemPhase} and \cs{RenewChemPhase} \subsection{Language Dependencies}\label{sec:lang-depend} For each pahse command a translation into the custom language can be defined. -If a phase is declared with \cs{DeclareChemPhase} no translation exists and +If a phase is declared with \cs{NewChemPhase} no translation exists and for every \pkg{babel} languuage the literal string is used that was provided as a definition. Let's say you define the phase \begin{sourcecode} - \DeclareChemPhase\liquid{l} + \NewChemPhase\liquid{l} \end{sourcecode} and want to add the German translation ``f{}l''. Then you could do \begin{sourcecode} diff --git a/Master/texmf-dist/doc/latex/chemmacros/ghsystem_en.pdf b/Master/texmf-dist/doc/latex/chemmacros/ghsystem_en.pdf Binary files differindex 45ec00a0839..c0a3ea31a47 100644 --- a/Master/texmf-dist/doc/latex/chemmacros/ghsystem_en.pdf +++ b/Master/texmf-dist/doc/latex/chemmacros/ghsystem_en.pdf |