summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2012-12-21 23:34:01 +0000
committerKarl Berry <karl@freefriends.org>2012-12-21 23:34:01 +0000
commit51ccd597259654371bdaf49b4d745f4dac31dd0a (patch)
treef0109542027f44ec5c698f0a74ad222c9a8a5344
parente09950f439263dd3649fc0d9bf357b0f124d247c (diff)
mychemistry (21dec12)
git-svn-id: svn://tug.org/texlive/trunk@28611 c570f23f-e606-0410-a88d-b1316a301751
-rw-r--r--Master/texmf-dist/doc/latex/mychemistry/README2
-rw-r--r--Master/texmf-dist/doc/latex/mychemistry/mychemistry_en.pdfbin1192946 -> 764132 bytes
-rw-r--r--Master/texmf-dist/doc/latex/mychemistry/mychemistry_en.tex33
-rw-r--r--Master/texmf-dist/tex/latex/mychemistry/mychemistry.sty327
4 files changed, 192 insertions, 170 deletions
diff --git a/Master/texmf-dist/doc/latex/mychemistry/README b/Master/texmf-dist/doc/latex/mychemistry/README
index 22a9229dcce..2fe11d7b08e 100644
--- a/Master/texmf-dist/doc/latex/mychemistry/README
+++ b/Master/texmf-dist/doc/latex/mychemistry/README
@@ -1,5 +1,5 @@
--------------------------------------------------------------------------
-the MYCHEMISTRY package v1.99a 2012/09/20
+the MYCHEMISTRY package v1.99b 2012/12/19
create reaction schemes with LaTeX and chemfig
diff --git a/Master/texmf-dist/doc/latex/mychemistry/mychemistry_en.pdf b/Master/texmf-dist/doc/latex/mychemistry/mychemistry_en.pdf
index a4c7efedbcb..daffa005e0e 100644
--- a/Master/texmf-dist/doc/latex/mychemistry/mychemistry_en.pdf
+++ b/Master/texmf-dist/doc/latex/mychemistry/mychemistry_en.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/mychemistry/mychemistry_en.tex b/Master/texmf-dist/doc/latex/mychemistry/mychemistry_en.tex
index bc8c52207a7..269b8fecbfd 100644
--- a/Master/texmf-dist/doc/latex/mychemistry/mychemistry_en.tex
+++ b/Master/texmf-dist/doc/latex/mychemistry/mychemistry_en.tex
@@ -51,6 +51,8 @@
\usepackage{booktabs}
\usepackage{siunitx}
+\chemsetup[chemformula]{format=\libertineLF}
+
\addcmds{
@addtoreset,
anywhere,
@@ -142,12 +144,12 @@ TikZ-libraries \code{arrows}, \code{positioning}, \code{decorations.pathmorphing
\code{shapes}, \code{calc}, \code{matrix}, \code{chains}, \code{scopes} and
\code{intersections}.
-If the package is available \mychemistry also loads \paket*{translator}\footnote{%
-Part of the \paket*{beamer} bundle}.
+\mychemistry also loads \paket*{translations}\footnote{Part of the
+\paket*{exsheets} package} for proper language support.
\section{Changes}
With v1.99 (=v2.0beta) package dependencies have changed so that \mychemistry
-loads noticably less packages than before. Most important for you: it does not
+loads noticably less packages than before. Most important for you: it does \emph{not}
load \paket{mhchem} any more. This documentation uses \paket{chemmacros} instead
which is loaded by \mychemistry.
@@ -169,10 +171,11 @@ which then rapidly grew and until now has its users.
The background has changed in August 2011, though. Then \paket{chemfig} v1.0 was
published and now provides simple but powerful macros to create reactions schemes.
-They seem to to be used very often but I am advertising as much as I can. Anyway,
-since then \mychemistry can be considered obsolete and is not actively developed
-any more. The current release 1.99 (= 2.0beta) was due to an incompatibilty with
-\paket{pdfpages} and a complete robustification of various parts of the code.
+They don't seem to to be used very often but I am advertising as much as I can.
+Anyway, since then \mychemistry can be considered obsolete and is not actively
+developed any more. The current release 1.99 (= 2.0beta) was due to an
+incompatibilty with \paket{pdfpages} and a complete robustification of various
+parts of the code.
\emph{Other than bug fixes this package will very likely \emph{not} be updated
any more}!
@@ -419,7 +422,7 @@ branch continue the original chain.
The chain is broken by the branch which starts a new chain itself.
\begin{rxn}
- \tikzset{nummer/.style={circle,fill=gray!30,draw=gray,minimum size=3.5mm}}
+ \tikzset{nummer/.style={circle,fill=gray!30,draw=gray,minimum size=3.5mm,overlay}}
\reactant[,a]{A}\arrow[,,,pa]{}{}\reactant[,b]{B}
\branch[a.-90]{
\arrow[-90,,,pb]{}{}\reactant[-90,c]{C}
@@ -762,13 +765,13 @@ in the right order, separated with commas.
\setarrowlength{2.5em}
\dummy[a]
\arrow{}{}\reactant{right = \ang{0}}
- \branch[above right=of a]{\arrow[above right]{}{}\reactant[above right]{above right = \ang{45}}}
- \branch[above=of a]{\arrow[above]{}{}\reactant[above]{above = \ang{90}}}
- \branch[above left=of a]{\arrow[above left]{}{}\reactant[above left]{above left = \ang{135}}}
- \branch[left=of a]{\arrow[left]{}{}\reactant[left]{left = \ang{180} = \ang{-180}}}
- \branch[below left=of a]{\arrow[below left]{}{}\reactant[below left]{below left = \ang{225} = \ang{-135}}}
- \branch[below=of a]{\arrow[below]{}{}\reactant[below]{below = \ang{270} = \ang{-90}}}
- \branch[below right=of a]{\arrow[below right]{}{}\reactant[below right]{below right = \ang{315} = \ang{-45}}}
+ \branch[above right=of a]{\arrow[above right]{}{}\reactant[above right,,overlay]{above right = \ang{45}}}
+ \branch[above=of a]{\arrow[above]{}{}\reactant[above,,overlay]{above = \ang{90}}}
+ \branch[above left=of a]{\arrow[above left]{}{}\reactant[above left,,overlay]{above left = \ang{135}}}
+ \branch[left=of a]{\arrow[left]{}{}\reactant[left,,overlay]{left = \ang{180} = \ang{-180}}}
+ \branch[below left=of a]{\arrow[below left]{}{}\reactant[below left,,overlay,xshift=-2em]{below left = \ang{225} = \ang{-135}}}
+ \branch[below=of a]{\arrow[below]{}{}\reactant[below,,overlay]{below = \ang{270} = \ang{-90}}}
+ \branch[below right=of a]{\arrow[below right]{}{}\reactant[below right,,overlay,xshift=2em]{below right = \ang{315} = \ang{-45}}}
\end{rxn}
Additionally you can use every angle from the interval $[\ang{-360};\ang{360}]$.
diff --git a/Master/texmf-dist/tex/latex/mychemistry/mychemistry.sty b/Master/texmf-dist/tex/latex/mychemistry/mychemistry.sty
index 6d595e3df45..089ac37b854 100644
--- a/Master/texmf-dist/tex/latex/mychemistry/mychemistry.sty
+++ b/Master/texmf-dist/tex/latex/mychemistry/mychemistry.sty
@@ -28,7 +28,7 @@
% This work consists of the files mychemistrysty, mychemistry_en.tex,
% README and the derived file mychemistry_en.pdf.
% --------------------------------------------------------------------------
-\ProvidesPackage{mychemistry}[2012/09/20 v1.99a create reaction schemes with LaTeX and chemfig]
+\ProvidesPackage{mychemistry}[2012/12/19 v1.99b create reaction schemes with LaTeX and chemfig]
\RequirePackage{etoolbox,float,xkeyval,chemfig,chemmacros}
\usetikzlibrary{
arrows,
@@ -159,26 +159,14 @@
\mCh@new@variable\rs@name
\mCh@set@variable\rs@name{Reaction scheme}
-\IfFileExists{translator.sty}{%
- \RequirePackage{translator}
- \usedictionary{translator-basic-dictionary}
- \languagealias{ngerman}{German}
- \languagealias{german}{German}
- \languagealias{austrian}{German}
- \languagealias{naustrian}{German}
- \languagealias{french}{French}
- \languagealias{canadien}{French}
- \languagealias{italian}{Italian}
- \languagealias{spanish}{Spanish}
- \providetranslation[to=English]{reaction-scheme-(caption-title)}{Reaction scheme}
- \providetranslation[to=BritishEnglish]{reaction-scheme-(caption-title)}{Reaction scheme}
- \providetranslation[to=AmericanEnglish]{reaction-scheme-(caption-title)}{Reaction scheme}
- \providetranslation[to=French]{reaction-scheme-(caption-title)}{Sch\'{e}ma r\'{e}actionnel}
- \providetranslation[to=German]{reaction-scheme-(caption-title)}{Reaktionsschema}
- \providetranslation[to=Italian]{reaction-scheme-(caption-title)}{Reazione Scheme}
- \providetranslation[to=Spanish]{reaction-scheme-(caption-title)}{Esquema de Reacci\'{o}n}
- \mCh@set@variable\rs@name{\translate{reaction-scheme-(caption-title)}}
-}{}
+\RequirePackage{translations}
+\NewTranslation{English} {reaction-scheme-(caption-title)} {Reaction scheme}
+\NewTranslation{French} {reaction-scheme-(caption-title)} {Sch\'{e}ma r\'{e}actionnel}
+\NewTranslation{German} {reaction-scheme-(caption-title)} {Reaktionsschema}
+\NewTranslation{Italian} {reaction-scheme-(caption-title)} {Reazione Scheme}
+\NewTranslation{Spanish} {reaction-scheme-(caption-title)} {Esquema de Reacci\'{o}n}
+\mCh@set@variable\rs@name{\GetTranslation{reaction-scheme-(caption-title)}}
+
% --------------------------------------------------------------------------
% Direction Analysis
@@ -1077,77 +1065,89 @@
% REAKTANDEN
% Standardreaktand
% \reactant[<pos>,<name>,<tikz>]{<something>}
-\newrobustcmd\mCh@reactant[2][]{%
- \ifblank{#1}
- {\mCh@reactant@i}{\mCh@reactant@ii[#1]}
- {#2}}
+\def\mCh@argument@safe{\@makeother\#}
+
+\newrobustcmd\mCh@reactant[1][]{%
+ \begingroup
+ \mCh@argument@safe
+ \ifblank{#1}
+ {\mCh@reactant@i}
+ {\mCh@reactant@ii[#1]}%
+}
\mCh@def\mCh@reactant@i#1{%
- \expandafter\node\expandafter[%
- \mCh@reactant@visible,
- on chain=going {at=(\tikzchainprevious.0)},
- anchor=180,
- shift=(0:\mCh@rxn@node@distance)]{\scantokens{\relax#1}};
+ \expandafter\node\expandafter[%
+ \mCh@reactant@visible,
+ on chain=going {at=(\tikzchainprevious.0)},
+ anchor=180,
+ shift=(0:\mCh@rxn@node@distance)]{#1};
+ \endgroup
}
\mCh@def\mCh@reactant@ii[#1]#2{%
- \let\mCh@remainargs\@empty\mCh@splitarg{#1}%
- \mCh@ifempty@variable\firstarg{% erste Option: <pos>, zweite Option: <name>, dritte Option: <tikz>
- \mCh@set@variable\angle{0}%
- \mCh@set@variable\anchor{180}%
- \mCh@empty@variable\referred@node
- }{%
- \expandafter\mCh@analyze@angle\expandafter{\mCh@firstarg}%
- \mCh@set@variable\anchor{180+\mCh@angle}%
- }%
- \mCh@ifempty@variable\referred@node
- {\mCh@set@variable\referred@node{\tikzchainprevious}}{}%
- \expandafter\expandafter\expandafter\node\expandafter\expandafter\expandafter[%
- \expandafter\mCh@thirdarg\expandafter,%
- \mCh@reactant@visible,
- on chain=going {at=(\mCh@referred@node.\mCh@angle)},
- anchor=\mCh@anchor,shift=(\mCh@angle:\mCh@rxn@node@distance)]
- (\mCh@secondarg){\scantokens{\relax#2}};
+ \let\mCh@remainargs\@empty\mCh@splitarg{#1}%
+ \mCh@ifempty@variable\firstarg{% erste Option: <pos>, zweite Option: <name>, dritte Option: <tikz>
+ \mCh@set@variable\angle{0}%
+ \mCh@set@variable\anchor{180}%
+ \mCh@empty@variable\referred@node
+ }{%
+ \expandafter\mCh@analyze@angle\expandafter{\mCh@firstarg}%
+ \mCh@set@variable\anchor{180+\mCh@angle}%
+ }%
+ \mCh@ifempty@variable\referred@node
+ {\mCh@set@variable\referred@node{\tikzchainprevious}}{}%
+ \expandafter\expandafter\expandafter\node\expandafter\expandafter\expandafter[%
+ \expandafter\mCh@thirdarg\expandafter,%
+ \mCh@reactant@visible,
+ on chain=going {at=(\mCh@referred@node.\mCh@angle)},
+ anchor=\mCh@anchor,shift=(\mCh@angle:\mCh@rxn@node@distance)]
+ (\mCh@secondarg){#2};
+ \endgroup
}
% Mesomerie
% \mesomeric[<pos>,<name>,<tikz>]{<something>}
-\newrobustcmd\mCh@mesomeric[2][]{%
- \ifblank{#1}
- {\mCh@mesomeric@i}{\mCh@mesomeric@ii[#1]}
- {#2}}
+\newrobustcmd\mCh@mesomeric[1][]{%
+ \begingroup
+ \mCh@argument@safe
+ \ifblank{#1}
+ {\mCh@mesomeric@i}
+ {\mCh@mesomeric@ii[#1]}%
+}
\mCh@def\mCh@mesomeric@i#1{%
- \node[on chain=going {at=(\tikzchainprevious.0),
- shift=($(0:\mCh@rxn@node@distance)$)},
- anchor=180,shift=(0:\mCh@rxn@node@distance),
- inner sep=1pt,
- left delimiter={[},
- right delimiter={]}]
- {\tikzpicture[start branch]\scantokens{\relax#1}\endtikzpicture};
+ \node[on chain=going {at=(\tikzchainprevious.0),
+ shift=($(0:\mCh@rxn@node@distance)$)},
+ anchor=180,shift=(0:\mCh@rxn@node@distance),
+ inner sep=1pt,
+ left delimiter={[},
+ right delimiter={]}]
+ {\tikzpicture[start branch]#1\endtikzpicture};
+ \endgroup
}
\mCh@def\mCh@mesomeric@ii[#1]#2{%
- \let\mCh@remainargs\@empty
- \mCh@splitarg{#1}%
- \mCh@ifempty@variable\firstarg{% erste Option: <pos>, zweite Option: <name>, dritte Option: <tikz>
- \mCh@set@variable\angle{0}%
- \mCh@set@variable\anchor{180}%
- \mCh@empty@variable\referred@node
- }{%
- \expandafter\mCh@analyze@angle\expandafter{\mCh@firstarg}%
- \mCh@set@variable\anchor{180+\mCh@angle}%
- }%
- \mCh@ifempty@variable\referred@node
- {\mCh@set@variable\referred@node{\tikzchainprevious}}{}%
- \expandafter\node\expandafter[\mCh@thirdarg,
- on chain=going {at=(\mCh@referred@node.\mCh@angle)},
- anchor=\mCh@anchor,
- shift=(\mCh@angle:\mCh@rxn@node@distance),
- inner sep=1pt,
- left delimiter={[},
- right delimiter={]}]
- (\mCh@secondarg){\tikzpicture[start branch]\scantokens{\relax#2}\endtikzpicture};
+ \let\mCh@remainargs\@empty
+ \mCh@splitarg{#1}%
+ \mCh@ifempty@variable\firstarg{% erste Option: <pos>, zweite Option: <name>, dritte Option: <tikz>
+ \mCh@set@variable\angle{0}%
+ \mCh@set@variable\anchor{180}%
+ \mCh@empty@variable\referred@node
+ }{%
+ \expandafter\mCh@analyze@angle\expandafter{\mCh@firstarg}%
+ \mCh@set@variable\anchor{180+\mCh@angle}%
+ }%
+ \mCh@ifempty@variable\referred@node
+ {\mCh@set@variable\referred@node{\tikzchainprevious}}{}%
+ \expandafter\node\expandafter[\mCh@thirdarg,
+ on chain=going {at=(\mCh@referred@node.\mCh@angle)},
+ anchor=\mCh@anchor,
+ shift=(\mCh@angle:\mCh@rxn@node@distance),
+ inner sep=1pt,
+ left delimiter={[},
+ right delimiter={]}]
+ (\mCh@secondarg){\tikzpicture[start branch]#2\endtikzpicture};
+ \endgroup
}
% Mesomerie-Pfeil
@@ -1158,29 +1158,36 @@
% \anywhere{<pos>,<name>,<tikz>}{<something>}
\mCh@new@variable\anywhere@positioning
-\newrobustcmd\mCh@anywhere[2]{%
- \let\mCh@remainargs\@empty
- \mCh@splitarg{#1}% erste Option: <pos>, zweite Option: <name>, dritte Option: <tikz>
- \mCh@ifempty@variable\firstarg{%
- \mCh@error{\string\anywhere: positioning missing}{}%
- }{%
- \expandafter\mCh@if@instr\expandafter{\mCh@firstarg}{=}{%
- \mCh@xset@variable\anywhere@positioning{\mCh@firstarg}%
+\newrobustcmd\mCh@anywhere[1]{%
+ \begingroup
+ \mCh@argument@safe
+ \let\mCh@remainargs\@empty
+ \mCh@splitarg{#1}% erste Option: <pos>, zweite Option: <name>, dritte Option: <tikz>
+ \mCh@ifempty@variable\firstarg{%
+ \mCh@error{\string\anywhere: positioning missing}{}%
}{%
- \expandafter\mCh@analyze@angle\expandafter{\mCh@firstarg}%
- \mCh@set@variable\anchor{180+\mCh@angle}%
- \mCh@ifempty@variable\referred@node{%
- \mCh@error{You can't use `angle' to position \string\anywhere.
- You need to use `name.angle'}%
+ \expandafter\mCh@if@instr\expandafter{\mCh@firstarg}{=}{%
+ \mCh@xset@variable\anywhere@positioning{\mCh@firstarg}%
}{%
- \mCh@set@variable\anywhere@positioning{%
- at=(\mCh@referred@node.\mCh@angle),anchor=\mCh@anchor}%
+ \expandafter\mCh@analyze@angle\expandafter{\mCh@firstarg}%
+ \mCh@set@variable\anchor{180+\mCh@angle}%
+ \mCh@ifempty@variable\referred@node{%
+ \mCh@error{You can't use `angle' to position \string\anywhere.
+ You need to use `name.angle'}%
+ }{%
+ \mCh@set@variable\anywhere@positioning{%
+ at=(\mCh@referred@node.\mCh@angle),anchor=\mCh@anchor}%
+ }%
}%
}%
- }%
- \expandafter\expandafter\expandafter\node\expandafter\expandafter\expandafter[%
- \expandafter\mCh@thirdarg\expandafter,%
- \mCh@anywhere@positioning](\mCh@secondarg){#2};
+ \mCh@anywhere@i
+}
+
+\mCh@def\mCh@anywhere@i#1{%
+ \expandafter\expandafter\expandafter\node\expandafter\expandafter\expandafter[%
+ \expandafter\mCh@thirdarg\expandafter,%
+ \mCh@anywhere@positioning](\mCh@secondarg){#1};
+ \endgroup
}
% Dummy
@@ -1194,51 +1201,58 @@
% \transition[<pos>,<name>,<tikz>]{<something>}
\mCh@new@variable\transition@name
-\newrobustcmd\mCh@transition[2][]{%
- \ifblank{#1}
- {\mCh@transition@i}{\mCh@transition@ii[#1]}
- {#2}}
+\newrobustcmd\mCh@transition[1][]{%
+ \begingroup
+ \mCh@argument@safe
+ \ifblank{#1}
+ {\mCh@transition@i}
+ {\mCh@transition@ii[#1]}%
+}
\mCh@def\mCh@transition@i#1{%
- \expandafter\node\expandafter[\mCh@reactant@visible,
- on chain=going {at=(\tikzchainprevious.0)},
- anchor=180,
- shift=(0:\mCh@rxn@node@distance),
- anchor=180,
- inner sep=3pt,
- left delimiter={[},
- right delimiter={]}]
- (mCh@transition@name){\scantokens{\relax#1}};
- \node at ($(mCh@transition@name.north east)+(.7em,0)$) {$\transitionstatesymbol$};
+ \expandafter\node\expandafter[\mCh@reactant@visible,
+ on chain=going {at=(\tikzchainprevious.0)},
+ anchor=180,
+ shift=(0:\mCh@rxn@node@distance),
+ anchor=180,
+ inner sep=3pt,
+ left delimiter={[},
+ right delimiter={]}]
+ (mCh@transition@name){#1};
+ \node at ($(mCh@transition@name.north east)+(.7em,0)$)
+ {$\transitionstatesymbol$};
+ \endgroup
}
\mCh@def\mCh@transition@ii[#1]#2{%
- \let\mCh@remainargs\@empty
- \mCh@splitarg{#1}%
- \mCh@ifempty@variable\firstarg{% erste Option: <pos>
- \mCh@set@variable\angle{0}%
- \mCh@set@variable\anchor{180}%
- \mCh@empty@variable\referred@node
- }{%
- \expandafter\mCh@analyze@angle\expandafter{\mCh@firstarg}%
- \mCh@set@variable\anchor{180+\mCh@angle}%
- }%
- \mCh@ifempty@variable\secondarg% zweite Option: <name>, dritte Option: <tikz>
- {\mCh@set@variable\transition@name{mCh@transition@name}}
- {\mCh@let@variable\transition@name\secondarg}%
- \mCh@ifempty@variable\referred@node
- {\mCh@set@variable\referred@node{\tikzchainprevious}}{}%
- \expandafter\expandafter\expandafter\node\expandafter\expandafter\expandafter[%
- \mCh@reactant@visible\expandafter,%
- \mCh@thirdarg,
- on chain=going {at=(\mCh@referred@node.\mCh@angle)},
- anchor=\mCh@anchor,
- shift=(\mCh@angle:\mCh@rxn@node@distance),
- inner sep=3pt,
- left delimiter={[},
- right delimiter={]}]
- (\mCh@transition@name){\scantokens{\relax#2}};
- \node at ($(\mCh@transition@name.north east)+(.7em,0)$) {$\transitionstatesymbol$};
+ \let\mCh@remainargs\@empty
+ \mCh@splitarg{#1}%
+ \mCh@ifempty@variable\firstarg{% erste Option: <pos>
+ \mCh@set@variable\angle{0}%
+ \mCh@set@variable\anchor{180}%
+ \mCh@empty@variable\referred@node
+ }{%
+ \expandafter\mCh@analyze@angle\expandafter{\mCh@firstarg}%
+ \mCh@set@variable\anchor{180+\mCh@angle}%
+ }%
+ \mCh@ifempty@variable\secondarg% zweite Option: <name>, dritte Option: <tikz>
+ {\mCh@set@variable\transition@name{mCh@transition@name}}
+ {\mCh@let@variable\transition@name\secondarg}%
+ \mCh@ifempty@variable\referred@node
+ {\mCh@set@variable\referred@node{\tikzchainprevious}}{}%
+ \expandafter\expandafter\expandafter\node\expandafter\expandafter\expandafter[%
+ \mCh@reactant@visible\expandafter,%
+ \mCh@thirdarg,
+ on chain=going {at=(\mCh@referred@node.\mCh@angle)},
+ anchor=\mCh@anchor,
+ shift=(\mCh@angle:\mCh@rxn@node@distance),
+ inner sep=3pt,
+ left delimiter={[},
+ right delimiter={]}]
+ (\mCh@transition@name){#2};
+ \node at ($(\mCh@transition@name.north east)+(.7em,0)$)
+ {$\transitionstatesymbol$};
+ \endgroup
}
% Abzweigung
@@ -1250,21 +1264,24 @@
% <name>.<angle> (sitzt nicht auf der Kette)
\mCh@new@variable\branch@positioning
-\newrobustcmd\mCh@branch[2][]{%
- \ifblank{#1}
- {\mCh@branch@i}{\mCh@branch@ii[#1]}
- {#2}}
+\newrobustcmd\mCh@branch[1][]{%
+ \begingroup
+ \mCh@argument@safe
+ \ifblank{#1}
+ {\mCh@branch@i}
+ {\mCh@branch@ii[#1]}%
+}
-\mCh@def\mCh@branch@i#1{%
+\mCh@def\mCh@branch@i{%
\expandafter\mCh@set@variable\expandafter\branch@positioning\expandafter{\mCh@branch@visible,
on chain=going {at=(\tikzchainprevious.0)},
anchor=180,
shift=(0:\mCh@rxn@node@distance)}%
\mCh@empty@variable\secondarg
\mCh@empty@variable\thirdarg
- \mCh@branch@iii{#1}}
+ \mCh@branch@iii}
-\mCh@def\mCh@branch@ii[#1]#2{%
+\mCh@def\mCh@branch@ii[#1]{%
\let\mCh@remainargs\@empty
\mCh@splitarg{#1}% erste Option: <pos>, zweite Option: <name>, dritte Option: <tikz>
\mCh@ifempty@variable\firstarg{%
@@ -1291,15 +1308,16 @@
}%
}%
}%
- \mCh@branch@iii{#2}}
+ \mCh@branch@iii}
\mCh@def\mCh@branch@iii#1{%
- \expandafter\expandafter\expandafter\node\expandafter\expandafter\expandafter[%
- \expandafter\mCh@branch@positioning\expandafter,%
- \mCh@thirdarg]
- (\mCh@secondarg){\tikzpicture[start branch]\scantokens{\relax#1}\endtikzpicture};}%
- % scantokens nötig, da sonst eine Dreifachbindung ~ vor () mit falschem
- % catcode interpretiert wird
+ \expandafter\expandafter\expandafter\node\expandafter\expandafter\expandafter[%
+ \expandafter\mCh@branch@positioning\expandafter,%
+ \mCh@thirdarg]
+ (\mCh@secondarg){\tikzpicture[start branch]#1\endtikzpicture};
+ \endgroup
+}%
+
% --------------------------------------------------------------------------
% Sonstiges
@@ -1507,7 +1525,7 @@ HISTORY:
- synonym to \reactand=\reactant added
- rxn & rxnscheme rewritten
- commands \reactant, \mesomeric, \branch & \transition
- modified: argument is set with \scantokens{\relax#1},
+ modified: argument is set with \mCh@argument@safe{#1},
so the chemfig catcode regime is working properly
before () (else possible problem with triple bond ~)
- syntax of \arrow changed so it fits to the syntax of
@@ -1533,6 +1551,7 @@ HISTORY:
packages; \merge is also only defined inside the scheme
environments
2012/09/20 version 1.99a - small adjustments to \elmove
+2012/12/19 version 1.99b - changed catcode regime (# is read with catcode 12)
+ so that chemfig's bond offset works
-% ----------------------------------------------------------------------------
-% TODO \ No newline at end of file
+% ---------------------------------------------------------------------------- \ No newline at end of file