summaryrefslogtreecommitdiff
path: root/Master/texmf-dist
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2011-11-04 23:16:57 +0000
committerKarl Berry <karl@freefriends.org>2011-11-04 23:16:57 +0000
commitcb33be94e6d58477c394350360dc7b482612c18c (patch)
tree825fb385c3e4d804c52a2ed48936fae62b48f1fa /Master/texmf-dist
parentfd9207757778f50d33798ab934b0c2da5d1849a1 (diff)
chemmacros (4nov11)
git-svn-id: svn://tug.org/texlive/trunk@24494 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist')
-rw-r--r--Master/texmf-dist/doc/latex/chemmacros/README4
-rw-r--r--Master/texmf-dist/doc/latex/chemmacros/chemmacros_doc_de.pdfbin505945 -> 501651 bytes
-rw-r--r--Master/texmf-dist/doc/latex/chemmacros/chemmacros_doc_de.tex34
-rw-r--r--Master/texmf-dist/doc/latex/chemmacros/chemmacros_doc_en.pdfbin486138 -> 482334 bytes
-rw-r--r--Master/texmf-dist/doc/latex/chemmacros/chemmacros_doc_en.tex35
-rw-r--r--Master/texmf-dist/tex/latex/chemmacros/chemmacros-version1.cfg2
-rw-r--r--Master/texmf-dist/tex/latex/chemmacros/chemmacros.sty261
7 files changed, 232 insertions, 104 deletions
diff --git a/Master/texmf-dist/doc/latex/chemmacros/README b/Master/texmf-dist/doc/latex/chemmacros/README
index b017ced447a..e5c7c318a1f 100644
--- a/Master/texmf-dist/doc/latex/chemmacros/README
+++ b/Master/texmf-dist/doc/latex/chemmacros/README
@@ -1,8 +1,8 @@
--------------------------------------------------------------------------
-the chemmacros package v2.0
+the chemmacros package v2.0a
a collection of macros to make typesetting chemistry documents more
convenient
-2011/10/28
+2011/11/03
--------------------------------------------------------------------------
Clemens Niederberger
Web: http://www.mychemistry.eu/
diff --git a/Master/texmf-dist/doc/latex/chemmacros/chemmacros_doc_de.pdf b/Master/texmf-dist/doc/latex/chemmacros/chemmacros_doc_de.pdf
index 4478c854c43..aa1e87d770e 100644
--- a/Master/texmf-dist/doc/latex/chemmacros/chemmacros_doc_de.pdf
+++ b/Master/texmf-dist/doc/latex/chemmacros/chemmacros_doc_de.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/chemmacros/chemmacros_doc_de.tex b/Master/texmf-dist/doc/latex/chemmacros/chemmacros_doc_de.tex
index dac3f33b06e..95ab2f78ad7 100644
--- a/Master/texmf-dist/doc/latex/chemmacros/chemmacros_doc_de.tex
+++ b/Master/texmf-dist/doc/latex/chemmacros/chemmacros_doc_de.tex
@@ -4,7 +4,7 @@
% - macros and commands for chemists - %
% --------------------------------------------------------------------------- %
% - Clemens Niederberger - %
-% - 2011/10/28 - %
+% - 2011/11/03 - %
% --------------------------------------------------------------------------- %
% - http://www.mychemistry.eu/ - %
% - contact@mychemistry.eu - %
@@ -34,7 +34,7 @@
\newcommand*\CMname{\textsf{chemmacros}\xspace}
\newcommand*\CMversion{2.0\xspace}
-\newcommand*\CMdate{2011/10/28\xspace}
+\newcommand*\CMdate{2011/11/03\xspace}
% changing some tufte-handout settings
\titleformat{\section}[hang]{\normalfont\Large\bfseries}{\thesection}{1em}{}[]
@@ -176,7 +176,7 @@
\begin{titlepage}
\begin{fullwidth}
\centering
- \Huge chemmacros v\CMversion
+ \Huge chemmacros v\CMversion{}a
\vskip.5cm
\Large\CMdate
\vskip.5cm
@@ -255,6 +255,7 @@ Eine Reihe einfacher Makros, um häufig gebrauchte Teilchen sowie ein Symbol dar
\item\cmd{ntr} \ntr (Neutron)
\item\cmd{Nu} \Nu (Nucleophil)
\item\cmd{El} \El (Elektrophil)
+ \item\cmd{ba} \ba (Base)
\item\cmd{fplus} \fplus
\item\cmd{fminus} \fminus
\item\cmd{transitionstatesymbol} \transitionstatesymbol\ Über\-gangs\-zu\-stands\-symbol (verwendet \TikZ)
@@ -267,6 +268,22 @@ Daneben gibt es noch einen weiteren Befehl, mit dem Radikale mit Ladungen und In
\begin{LTXexample}
\R[+]{tert} \R[-]{sek} \R{prim}
\end{LTXexample}
+Die beiden Teilchen \cmd{Nu} und \cmd{ba} können modifiziert werden. Dafür gibt es den Schlüssel \code{elpair}\Key[false][particle]{elpair}{false/\uline{dots}/dash}. Dieser Schlüssel hat nur Auswirkungen, wenn das Paket \paket{chemfig} geladen wurde, da er dessen Befehl \cmd{Lewis} verwendet.
+\begin{LTXexample}
+ \documentclass{article}
+ \usepackage{chemmacros,chemfig}
+ \begin{document}
+ \ba[elpair] \Nu[elpair=dash]
+ \end{document}
+\end{LTXexample}
+\begin{LTXexample}
+ \documentclass{article}
+ \usepackage{chemmacros,chemfig}
+ \begin{document}
+ \chemsetup[particle]{elpair}
+ \ba \Nu
+ \end{document}
+\end{LTXexample}
\section{Stereo-Deskriptoren, Nomenklatur, lateinische Aus\-drücke}\label{sec:stereo}
\subsection{Stereo-Deskriptoren und Nomenklatur}
@@ -412,7 +429,6 @@ Setzen von Oxidationszahlen:\changed{ox}
\ox{+1,Na}, \ox{2,Ca}, \ox{-2,S}, \ox{-1,F}
\end{LTXexample}
-\newpage
Es gibt eine Reihe von Schlüssel/Wert-Paaren, die eingesetzt werden können, um den \cmd{ox}-Befehl zu modifizieren.\Key[true][ox]{parse}{\uline{true}/false}\Key[true][ox]{roman}{\uline{true}/false}\Key[top][ox]{pos}{top/super/side}\Key[false][ox]{explicit-sign}{\uline{true}/false}\Key[point][ox]{decimal-marker}{comma/point}
\begin{itemize}
\item\code{parse = \uline{true}/false} ermöglicht bei \code{false} eine beliebige Eingabe für \code{<number>}.
@@ -468,7 +484,9 @@ Auch die folgenden Makros sind \va beim Einsatz mit \paket{chemfig} nützlich.
\cmd{scrp} \scrp (\textbf{scr}iptstyle + \textbf{p}lus) \\
\cmd{scrm} \scrm (\textbf{scr}iptstyle + \textbf{m}inus) \\
\cmd{fscrp} \fscrp \\
- \cmd{fscrm} \fscrm
+ \cmd{fscrm} \fscrm \\
+ \cmd{fsscrp} \fsscrp (im \cmd{scriptscriptstyle})\\
+ \cmd{fsscrm} \fsscrm
\end{framed}
\begin{LTXexample}[pos=b,rframe=]
\setatomsep{1.8em}\chemfig{CH_3-\chemabove{C}{\scrp}(-[6]C|H_3)-\vphantom{H_3}CH_3}
@@ -476,7 +494,6 @@ Auch die folgenden Makros sind \va beim Einsatz mit \paket{chemfig} nützlich.
\chemfig{\fmch{}|O-\chemabove{N}{\fscrp}(-[1]O|\fmch)-[7]O|\fmch}
\end{LTXexample}
-\newpage
\section{Reaktionsmechanismen}\label{sec:mechanismen}
Der Befehl\marginnote{Dieser Befehl ist auch in Mathematikumgebungen und im \cmd{ce}-Befehl von \paket{mhchem} einsetzbar.}
\begin{framed}
@@ -876,7 +893,6 @@ Mit einigen Schlüsseln kann \cmd{mhName} angepasst werden.\Key[\cmd{centering}]
In v1.1 gab es noch den Befehl \cmd{setmhName\ma{<textattr>}}\formercmd{setmhName\ma{<textattr>}}. Mit Laden der Paketoption \code{version=1} wird er bereitgestellt.
-\newpage
\section{Newman-Projektionen}\label{sec:newman}
\CMname stellt das Makro\changed{newman}
\begin{framed}
@@ -888,6 +904,7 @@ zur Verfügung, mit dem sich Newman-Projektionen erstellen lassen (verwendet `\T
\newman{1,2,3,4,5,6} \newman{1,2,3} \newman{,,,4,5,6}
\end{LTXexample}
+\newpage
Mehrere Schlüssel erlauben das Anpassen des Layouts:\Key[0][newman]{angle}{<angle>}\Key[1][newman]{scale}{<factor>}\Key[][newman]{ring}{<tikz>}\Key[][newman]{atoms}{<tikz>}\Key[][newman]{back-atoms}{<tikz>}
\begin{itemize}
\item\code{angle = <angle>} Einstellen des Default-Drehwinkels
@@ -912,6 +929,7 @@ Mehrere Schlüssel erlauben das Anpassen des Layouts:\Key[0][newman]{angle}{<ang
\newman{1,2,3,4,5,6} \newman(170){1,2,3,4,5,6}
\end{LTXexample}
+\newpage
\section{s-, p- und Hybrid-Orbitale}\label{sec:orbitale}
In v1.1 gab es noch die Befehle \cmd{porb\oa{<options>}}\formercmd{porb\oa{<options>}}, \cmd{phorb\oa{<options>}}\formercmd{phorb\oa{<options>}}, \cmd{pxorb}\formercmd{pxorb}, \cmd{pyorb}\formercmd{pyorb} und \cmd{pzorb}\formercmd{pzorb}. Mit Laden der Paketoption \code{version=1} werden sie bereitgestellt.
@@ -997,6 +1015,8 @@ Manche Schlüssel können auch ohne Wert eingesetzt werden. Sie entsprechen dann
german & option & \uline{true}/false & false & Seite \pageref{key:option_german} \\
version & option & 1/2 & 2 & Seite \pageref{key:option_version} \\
xspace & option & \uline{true}/false & true & Seite \pageref{key:option_xspace} \\
+ \multicolumn{5}{l}{\cmd{ba}, \cmd{Nu}:} \\
+ elpair & base & \uline{dots}/dash/false & false & Seite \pageref{key:particle_elpair} \\
\multicolumn{5}{l}{\cmd{pch}, \cmd{mch}, \cmd{fpch}, \cmd{fmch}:} \\
append & charges & \uline{true}/false & false & Seite \pageref{key:charges_append} \\
\multicolumn{5}{l}{\cmd{ox}:} \\
diff --git a/Master/texmf-dist/doc/latex/chemmacros/chemmacros_doc_en.pdf b/Master/texmf-dist/doc/latex/chemmacros/chemmacros_doc_en.pdf
index 70762cd2e28..2b26a42485a 100644
--- a/Master/texmf-dist/doc/latex/chemmacros/chemmacros_doc_en.pdf
+++ b/Master/texmf-dist/doc/latex/chemmacros/chemmacros_doc_en.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/chemmacros/chemmacros_doc_en.tex b/Master/texmf-dist/doc/latex/chemmacros/chemmacros_doc_en.tex
index 1d719c2f66a..8fc970a5562 100644
--- a/Master/texmf-dist/doc/latex/chemmacros/chemmacros_doc_en.tex
+++ b/Master/texmf-dist/doc/latex/chemmacros/chemmacros_doc_en.tex
@@ -4,7 +4,7 @@
% - macros and commands for chemists - %
% --------------------------------------------------------------------------- %
% - Clemens Niederberger - %
-% - 2011/10/28 - %
+% - 2011/11/03 - %
% --------------------------------------------------------------------------- %
% - http://www.mychemistry.eu/ - %
% - contact@mychemistry.eu - %
@@ -34,7 +34,7 @@
\newcommand*\CMname{\textsf{chemmacros}\xspace}
\newcommand*\CMversion{2.0\xspace}
-\newcommand*\CMdate{2011/10/28\xspace}
+\newcommand*\CMdate{2011/11/03\xspace}
% changing some tufte-handout settings
\titleformat{\section}[hang]{\normalfont\Large\bfseries}{\thesection}{1em}{}[]
@@ -117,6 +117,7 @@
\group_end:
}
+% Key[<default>][<module>](<label prefix>){<key>}{<val>}
\NewDocumentCommand \Key { o o d() m m }
{
\IfNoValueTF { #3 }
@@ -173,7 +174,7 @@
\begin{titlepage}
\begin{fullwidth}
\centering
- \Huge chemmacros v\CMversion
+ \Huge chemmacros v\CMversion{}a
\vskip.5cm
\Large\CMdate
\vskip.5cm
@@ -250,6 +251,7 @@ Some simple macros for displaying often needed particles and a symbol. Please no
\item\cmd{ntr} \ntr (neutron)
\item\cmd{Nu} \Nu (nucleophile)
\item\cmd{El} \El (electrophile)
+ \item\cmd{ba} \ba (base)
\item\cmd{fplus} \fplus
\item\cmd{fminus} \fminus
\item\cmd{transitionstatesymbol} \transitionstatesymbol\ (uses \TikZ)
@@ -262,6 +264,22 @@ There is another command which allows to typeset radicals with charges and subsc
\begin{LTXexample}
\R[+]{tert} \R[-]{sek} \R{prim}
\end{LTXexample}
+The two particles \cmd{Nu} and \cmd{ba} can be modified. To do that you use the key \code{elpair}\Key[false][particle]{elpair}{false/\uline{dots}/dash}. It only has any effect, if the package \paket{chemfig} is loaded, since it uses it's command \cmd{Lewis}.
+\begin{LTXexample}
+ \documentclass{article}
+ \usepackage{chemmacros,chemfig}
+ \begin{document}
+ \ba[elpair] \Nu[elpair=dash]
+ \end{document}
+\end{LTXexample}
+\begin{LTXexample}
+ \documentclass{article}
+ \usepackage{chemmacros,chemfig}
+ \begin{document}
+ \chemsetup[particle]{elpair}
+ \ba \Nu
+ \end{document}
+\end{LTXexample}
\section{Stereo Descriptors, Nomenclature, Latin Phrases}\label{sec:stereo}
\subsection{Stereo Descriptors and Nomenclature}
@@ -298,6 +316,7 @@ absolute configuration (uses \TikZ):
\cmd{Sconf\oa{<letter>}} \cmd{Sconf}: \Sconf \quad\cmd{Sconf\oa{}}: \Sconf[]
\end{framed}
+\newpage
Examples:\marginnote{Of course the appearance depends on the font you chose:\par\cip{2S,3R} \E \Z \Dfi \Lfi\par\fontfamily{ptm}\selectfont\cip{2S,3R} \E \Z \Dfi \Lfi\par\fontfamily{ppl}\selectfont\cip{2S,3R} \E \Z \Dfi \Lfi}
\begin{LTXexample}[pos=b]
\Dfi-Weins\"aure = \cip{2S,3S}-Weins\"aure \\
@@ -308,7 +327,6 @@ Examples:\marginnote{Of course the appearance depends on the font you chose:\par
\IUPAC{\Dfi\-Wein\|s\"aure} = \IUPAC{\cip{2S,3S}\-Wein\|s\"aure}, \IUPAC{\Dfi\-($-$)\-Threose} = \IUPAC{\cip{2S,3R}\-($-$)\-2,3,4\-Tri\|hydroxy\|butanal}
\end{LTXexample}
-\newpage
\subsection{Latin Phrases}
At last there are two commands for common latin phrases.
\begin{framed}
@@ -464,7 +482,9 @@ The following macros are useful together with \paket{chemfig}, too.
\cmd{scrp} \scrp (\textbf{scr}iptstyle + \textbf{p}lus) \\
\cmd{scrm} \scrm (\textbf{scr}iptstyle + \textbf{m}inus) \\
\cmd{fscrp} \fscrp \\
- \cmd{fscrm} \fscrm
+ \cmd{fscrm} \fscrm \\
+ \cmd{fsscrp} \fsscrp (using \cmd{scriptscriptstyle})\\
+ \cmd{fsscrm} \fsscrm
\end{framed}
\begin{LTXexample}[pos=b,rframe=]
\setatomsep{1.8em}\chemfig{CH_3-\chemabove{C}{\scrp}(-[6]C|H_3)-\vphantom{H_3}CH_3}
@@ -550,7 +570,6 @@ Examples:
In v1.1 there was the command \cmd{setredoxdist\ma{<dim>}}\formercmd{setredoxdist\ma{<dim>}}. By using the package option \code{version=1} it is provided again.
-\newpage
\section{(Standard) State, Thermodynamics}\label{sec:standardstate}
\subsection{Thermodynamic Variables}\label{ssec:siunitx}
The following commands use \paket{siunitx}:\changed{Enthalpy}\changed{Entropy}\changed{Gibbs}
@@ -844,6 +863,7 @@ One can think of other uses, too:
C\sld[graphite]
\end{LTXexample}
+\newpage
\subsection{Text Under Compounds}\label{ssec:mhchem_beschriftung}
\CMname provides a command, with which you can place text below of compounds.\changed{mhName}\Key[\cmd{centering}][mhName]{align}{<alignment>}\Key[][mhName]{fontattr}{<commands>}\Key[\cmd{tiny}][mhName]{fontsize}{<fontsize>}\Key[][mhName]{width}{<dim>}
\begin{framed}
@@ -923,6 +943,7 @@ There are the following types available for \code{<type>}:
\orbital{s} \orbital{p} \orbital{sp} \orbital{sp2} \orbital{sp3}
\end{LTXexample}
+\newpage
Depending on the type you have different keys to modify the orbitals:\Key[+][orbital/<type>](orbital){phase}{\uline{+}/-}\Key[1][orbital/<type>](orbital){scale}{<factor>}\Key[black][orbital/<type>](orbital){color}{<color>}\Key[90][orbital/<type>](orbital){angle}{<angle>}\Key[false][orbital/<type>](orbital){half}{\uline{true}/false}
\begin{itemize}
\item\code{phase = \uline{+}/-} changes the phase of the orbital (all types)
@@ -988,6 +1009,8 @@ Some keys can be set without value. Then the \uline{underlined} value is used.
german & option & \uline{true}/false & false & page \pageref{key:option_german} \\
version & option & 1/2 & 2 & page \pageref{key:option_version} \\
xspace & option & \uline{true}/false & true & page \pageref{key:option_xspace} \\
+ \multicolumn{5}{l}{\cmd{ba}, \cmd{Nu}:} \\
+ elpair & base & \uline{dots}/dash/false & false & page \pageref{key:particle_elpair} \\
\multicolumn{5}{l}{\cmd{pch}, \cmd{mch}, \cmd{fpch}, \cmd{fmch}:} \\
append & charges & \uline{true}/false & false & Seite \pageref{key:charges_append} \\
\multicolumn{5}{l}{\cmd{ox}:} \\
diff --git a/Master/texmf-dist/tex/latex/chemmacros/chemmacros-version1.cfg b/Master/texmf-dist/tex/latex/chemmacros/chemmacros-version1.cfg
index 7aa9dbcfb5b..a7dd522d55f 100644
--- a/Master/texmf-dist/tex/latex/chemmacros/chemmacros-version1.cfg
+++ b/Master/texmf-dist/tex/latex/chemmacros/chemmacros-version1.cfg
@@ -4,7 +4,7 @@
% - macros and commands for chemists - %
% --------------------------------------------------------------------------- %
% - Clemens Niederberger - %
-% - 2011/10/28 - %
+% - 2011/11/03 - %
% --------------------------------------------------------------------------- %
% - http://www.mychemistry.eu/ - %
% - contact@mychemistry.eu - %
diff --git a/Master/texmf-dist/tex/latex/chemmacros/chemmacros.sty b/Master/texmf-dist/tex/latex/chemmacros/chemmacros.sty
index 659757ef0cd..0aeffae3755 100644
--- a/Master/texmf-dist/tex/latex/chemmacros/chemmacros.sty
+++ b/Master/texmf-dist/tex/latex/chemmacros/chemmacros.sty
@@ -4,7 +4,7 @@
% - macros and commands for chemists - %
% --------------------------------------------------------------------------- %
% - Clemens Niederberger - %
-% - 2011/10/28 - %
+% - 2011/11/03 - %
% --------------------------------------------------------------------------- %
% - http://www.mychemistry.eu/ - %
% - contact@mychemistry.eu - %
@@ -36,7 +36,7 @@
{
\@ifpackageloaded{mhchem}{} { \RequirePackage[ version=3 ]{ mhchem } }
}
-\ProvidesExplPackage {chemmacros} {2011/10/27} {2.0} {macros and commands for chemists}
+\ProvidesExplPackage {chemmacros} {2011/11/03} {2.0a} {macros and commands for chemists}
\bool_new:N \l_chemmacros_version_one_bool
\bool_set_false:N \l_chemmacros_version_one_bool
@@ -65,6 +65,7 @@
\bool_new:N \l_chemmacros_chemstyle_bool
\bool_new:N \l_chemmacros_hyperref_bool
\bool_new:N \l_chemmacros_varioref_bool
+\bool_new:N \l_chemmacros_chemfig_bool
\AtBeginDocument
{
@@ -77,6 +78,9 @@
\@ifpackageloaded { hyperref }
{ \bool_set_true:N \l_chemmacros_hyperref_bool }
{ \bool_set_false:N \l_chemmacros_hyperref_bool }
+ \@ifpackageloaded { chemfig }
+ { \bool_set_true:N \l_chemmacros_chemfig_bool }
+ { \bool_set_false:N \l_chemmacros_chemfig_bool }
}
% --------------------------------------------------------------------------- %
@@ -160,12 +164,6 @@
See~the~documentation~for~more~information.
}
-\msg_set:nnn { chemmacros } { circled=chemfig }
- {
- You~used~the~option~"circled~=~chemfig"~but~did~not~load~the~package~
- chemfig.~Option~"circled~=~formal"~will~be~used~instead.
- }
-
\msg_set:nnn { chemmacros } { ox }
{
\token_to_str:N \ox \c_space_tl : ~ #1 ~ \msg_line_context: .
@@ -181,29 +179,25 @@
\token_to_str:N \redox \c_space_tl : ~ #1 ~ \msg_line_context: .
}
-\msg_set:nnn { chemmacros } { already-defined }
+\msg_set:nnn { chemmacros } { chemfig }
{
- The~command/environment ~ #1 ~ \msg_line_context: \c_space_tl
- is~already~defined.
- }
-
-\msg_set:nnnn { chemmacros } { outside-MOdiagram }
- { You~can't~use~#1~outside~the~MOdiagram~environment. }
- {
- The~command~#1~can~only~be~used~inside~the~MOdiagram~
- environment~\msg_line_context: .
+ You~need~to~load~the~chemfig~package~in~order~to~make~
+ \exp_after:wN \token_to_str:N \cs:w #1 \cs_end: \c_space_tl
+ work~properly~\msg_line_context: .
}
\msg_set:nnn { chemmacros } { setnewstate }
{
- The~state~\tl_to_str:n { \ #1 } \c_space_tl already~exists.~You~need~to~
- use~\token_to_str:N \renewstate \c_space_tl to~alter~it.
+ The~state~ \exp_after:wN \token_to_str:N \cs:w #1 \cs_end:
+ \c_space_tl already~exists.~You~need~to~use~
+ \token_to_str:N \renewstate \c_space_tl to~alter~it.
}
\msg_set:nnn { chemmacros } { renewstate }
{
- The~state~\tl_to_str:n { \ #1 } \c_space_tl isn't~set~up~yet.~You~need~to~
- use~\token_to_str:N \setnewstate \c_space_tl to~create~it.
+ The~state~\exp_after:wN \token_to_str:N \cs:w #1 \cs_end:
+ \c_space_tl isn't~set~up~yet.~You~need~to~use~
+ \token_to_str:N \setnewstate \c_space_tl to~create~it.
}
% --------------------------------------------------------------------------- %
@@ -234,26 +228,65 @@
% --------------------------------------------------------------------------- %
% circled charge signs
-\cs_new_nopar:Npn \chemmacros_fplus_aux:
- {
- \raise.1ex\hbox{\scalebox{.65}{\textcircled{\lower.1ex\hbox{$+$}}}}
- }
+% Definition inspired by chemstyle's definition of \standarsstate
+% \cs_new_nopar:Npn \chemmacros_fplus_aux:
+% {
+% \raise.1ex\hbox{\scalebox{.65}{\textcircled{\lower.1ex\hbox{$+$}}}}
+% }
+% \cs_new_nopar:Npn \chemmacros_fplus:
+% {
+% \mode_if_math:TF
+% { \text { \chemmacros_fplus_aux: } }
+% { \chemmacros_fplus_aux: }
+% }
+
\cs_new_nopar:Npn \chemmacros_fplus:
- {
- \mode_if_math:TF
- { \text { \chemmacros_fplus_aux: } }
- { \chemmacros_fplus_aux: }
+ { \ensuremath { \chemmacros_fplus_aux_i: } }
+\cs_new_nopar:Npn \chemmacros_fplus_aux_i:
+ { \mathpalette \chemmacros_fplus_aux_ii: \bigcirc }
+\cs_new_nopar:Npn \chemmacros_fplus_aux_ii: #1#2
+ {
+ \ooalign
+ {
+ \tex_hfil:D
+ $#1+$
+ \tex_hfil:D
+ \tex_cr:D
+ \tex_hfil:D
+ $#1#2$
+ \tex_hfil:D
+ \tex_cr:D
+ }
}
-\cs_new_nopar:Npn \chemmacros_fminus_aux:
- {
- \raise.1ex\hbox{\scalebox{.65}{\textcircled{\lower.1ex\hbox{$-$}}}}
- }
+% \cs_new_nopar:Npn \chemmacros_fminus_aux:
+% {
+% \raise.1ex\hbox{\scalebox{.65}{\textcircled{\lower.1ex\hbox{$-$}}}}
+% }
+% \cs_new_nopar:Npn \chemmacros_fminus:
+% {
+% \mode_if_math:TF
+% { \text { \chemmacros_fminus_aux: } }
+% { \chemmacros_fminus_aux: }
+% }
+
\cs_new_nopar:Npn \chemmacros_fminus:
- {
- \mode_if_math:TF
- { \text { \chemmacros_fminus_aux: } }
- { \chemmacros_fminus_aux: }
+ { \ensuremath { \chemmacros_fminus_aux_i: } }
+\cs_new_nopar:Npn \chemmacros_fminus_aux_i:
+ { \mathpalette \chemmacros_fminus_aux_aux_ii: \bigcirc }
+\cs_new_nopar:Npn \chemmacros_fminus_aux_aux_ii: #1#2
+ {
+ \ooalign
+ {
+ \tex_hfil:D
+ $#1-$
+ \tex_hfil:D
+ \tex_cr:D
+ \tex_hfil:D
+ $#1#2$
+ \tex_hfil:D
+ \tex_cr:D
+ }
}
% use directly:
@@ -419,6 +452,10 @@
{ \ensuremath { \scriptstyle \chemmacros_formal_minus: } }
\cs_new_nopar:Npn \fscrp
{ \ensuremath { \scriptstyle \chemmacros_formal_plus: } }
+\cs_new_nopar:Npn \fsscrm
+ { \ensuremath { \scriptscriptstyle \chemmacros_formal_minus: } }
+\cs_new_nopar:Npn \fsscrp
+ { \ensuremath { \scriptscriptstyle \chemmacros_formal_plus: } }
% --------------------------------------------------------------------------- %
% ions, molecules
@@ -431,11 +468,63 @@
{ \chemmacros_atom:n { H3O } \pch \chemmacros_xspace: }
\cs_new_nopar:Npn \water
{ \chemmacros_atom:n { H2O } \chemmacros_xspace: }
-\cs_new_nopar:Npn \Nu
- { \chemmacros_atom:n { Nu } \mch \chemmacros_xspace: }
+
+\NewDocumentCommand \Nu { o }
+ {
+ \IfNoValueF { #1 } { \keys_set:nn { chemmacros / particle } { #1 } }
+ \bool_if:NTF \l_chemmacros_particle_elpair_bool
+ { \chemmacros_elpair:n { Nu } }
+ { \chemmacros_atom:n { Nu } }
+ \mch \chemmacros_xspace:
+ }
+
\cs_new_nopar:Npn \El
{ \chemmacros_atom:n { E } \pch \chemmacros_xspace: }
+\NewDocumentCommand \ba { o }
+ {
+ \IfNoValueF { #1 } { \keys_set:nn { chemmacros / particle } { #1 } }
+ \bool_if:NTF \l_chemmacros_particle_elpair_bool
+ { \chemmacros_elpair:n { ba } }
+ { \chemmacros_atom:n { ba } }
+ \mch \chemmacros_xspace:
+ }
+
+\cs_new_nopar:Npn \chemmacros_elpair:n #1
+ {
+ \bool_if:NTF \l_chemmacros_chemfig_bool
+ {
+ \bool_if:NTF \l_chemmacros_elpair_dots_bool
+ { \Lewis { 0: , #1 } }
+ { \Lewis { 0 , #1 } }
+ }
+ {
+ \msg_warning:nnx { chemmacros } { chemfig } { #1 }
+ \chemmacros_atom:n { #1 }
+ }
+ }
+
+\bool_new:N \l_chemmacros_particle_elpair_bool
+\bool_new:N \l_chemmacros_elpair_dots_bool
+
+\keys_define:nn { chemmacros / particle }
+ {
+ elpair .choice: ,
+ elpair / false .code:n =
+ { \bool_set_false:N \l_chemmacros_particle_elpair_bool } ,
+ elpair / dots .code:n =
+ {
+ \bool_set_true:N \l_chemmacros_particle_elpair_bool
+ \bool_set_true:N \l_chemmacros_elpair_dots_bool
+ } ,
+ elpair / dash .code:n =
+ {
+ \bool_set_true:N \l_chemmacros_particle_elpair_bool
+ \bool_set_false:N \l_chemmacros_elpair_dots_bool
+ } ,
+ elpair .default:n = dots
+ }
+
% --------------------------------------------------------------------------- %
% stereo descriptors and sim.
% Cahn-Ingold-Prelog
@@ -1373,34 +1462,27 @@
% --------------------------------------------------------------------------- %
% thermodynamics et.al.
% \standardstate as defined by the chemstyle package. Thanks to Joseph Wright
-% \AtBeginDocument
-% {
- \cs_if_exist:NF \standardstate
+\cs_if_exist:NF \standardstate
+ {
+ \cs_new_nopar:Npn \standardstate
+ { \ensuremath { \chemmacros_standardstate: } }
+ \cs_new_nopar:Npn \chemmacros_standardstate:
+ { \mathpalette \chemmacros_standardstate_aux: \circ }
+ \cs_new_nopar:Npn \chemmacros_standardstate_aux: #1#2
{
- \cs_new_nopar:Npn \standardstate
+ \ooalign
{
- \ensuremath { \chemmacros_standardstate: }
- }
- \cs_new_nopar:Npn \chemmacros_standardstate:
- {
- \mathpalette \chemmacros_standardstate_aux: \circ
- }
- \cs_new_nopar:Npn \chemmacros_standardstate_aux: #1#2
- {
- \ooalign
- {
- \tex_hfil:D
- $#1-$
- \tex_hfil:D
- \tex_cr:D
- \tex_hfil:D
- $#1#2$
- \tex_hfil:D
- \tex_cr:D
- }
+ \tex_hfil:D
+ $#1-$
+ \tex_hfil:D
+ \tex_cr:D
+ \tex_hfil:D
+ $#1#2$
+ \tex_hfil:D
+ \tex_cr:D
}
}
-% }
+ }
% --------------------------------------------------------------------------- %
% \State
@@ -2324,28 +2406,31 @@
% --------------------------------------------------------------------------- %
Version history
-2011/05/15 version 1.0 - CTAN release
-2011/06/22 version 1.1 - "LaTeXified" whole package for safer usage
- - less user work required (like loading package after
- another)
- - more particle macros
- - latin phrases
- - extra units
- - acid/base commands
- - \mech
- - \NMR
- - \mhName, \setmhName, \newreaction, phases
- - \renewstate, \setstatesubscript
- - improved orbitals
- - simpler package options, option german, bpchem
- - bug fixes
-2011/10/28 version 2.0 - rewritten in expl3
- - customization via \chemsetup
- - new commands \p, \fplus, \fminus, \fpch, \fmch, \fscrp,
- \fsrcm, \fdelp, \fdelm, \orbital, \chemsetup
- - various commands have a new syntax
- - removed: \setmhName, \setredoxdist, \setstatesubscript,
- \porb, \phorb, \pxorb, \pyorb, \pzorb, \setorbheight,
- \solid, \liquid
- - reaction environments work with hyperref and varioref
+2011/05/15 version 1.0 - CTAN release
+2011/06/22 version 1.1 - "LaTeXified" whole package for safer usage
+ - less user work required (like loading package after
+ another)
+ - more particle macros
+ - latin phrases
+ - extra units
+ - acid/base commands
+ - \mech
+ - \NMR
+ - \mhName, \setmhName, \newreaction, phases
+ - \renewstate, \setstatesubscript
+ - improved orbitals
+ - simpler package options, option german, bpchem
+ - bug fixes
+2011/10/28 version 2.0 - rewritten in expl3
+ - customization via \chemsetup
+ - new commands \p, \fplus, \fminus, \fpch, \fmch, \fscrp,
+ \fsrcm, \fdelp, \fdelm, \orbital, \chemsetup
+ - various commands have a new syntax
+ - removed: \setmhName, \setredoxdist, \setstatesubscript,
+ \porb, \phorb, \pxorb, \pyorb, \pzorb, \setorbheight,
+ \solid, \liquid
+ - reaction environments work with hyperref and varioref
+2011/11/03 version 2.0a - minor bug fixes
+ - new feature for \Nu
+ - new command \ba
% --------------------------------------------------------------------------- % \ No newline at end of file