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/latex/chemmacros/chemformula_en.tex | |
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/latex/chemmacros/chemformula_en.tex')
-rw-r--r-- | Master/texmf-dist/doc/latex/chemmacros/chemformula_en.tex | 122 |
1 files changed, 78 insertions, 44 deletions
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) ;} |