summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/latex/mychemistry/mychemistry_en.tex
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/doc/latex/mychemistry/mychemistry_en.tex')
-rw-r--r--Master/texmf-dist/doc/latex/mychemistry/mychemistry_en.tex1593
1 files changed, 486 insertions, 1107 deletions
diff --git a/Master/texmf-dist/doc/latex/mychemistry/mychemistry_en.tex b/Master/texmf-dist/doc/latex/mychemistry/mychemistry_en.tex
index 1036d203924..70243a291ca 100644
--- a/Master/texmf-dist/doc/latex/mychemistry/mychemistry_en.tex
+++ b/Master/texmf-dist/doc/latex/mychemistry/mychemistry_en.tex
@@ -4,7 +4,7 @@
% - Creating reaction schemes with LaTeX and ChemFig ---------------------------------- %
% ------------------------------------------------------------------------------------- %
% - Clemens Niederberger -------------------------------------------------------------- %
-% - 2011/04/15 ------------------------------------------------------------------------ %
+% - 2011/04/23 ------------------------------------------------------------------------ %
% ------------------------------------------------------------------------------------- %
% - http://www.niederberger-berlin.net/2011/02/latex-mychemistry/ --------------------- %
% - kontakt@niederberger-berlin.net --------------------------------------------------- %
@@ -43,9 +43,12 @@
\usepackage[makeindex]{splitidx} % Index; Kompilieren: makeindex -sl index.ist *.idx
\usepackage[english]{babel} % Sprache
\usepackage{xspace,paralist} % xspace und Listen
-\usepackage{siunitx}
+\usepackage{siunitx,booktabs}
\DeclareSIUnit{\emlength}{em}
\DeclareSIUnit{\pt}{pt}
+ \sisetup{separate-uncertainty = true,
+ exponent-product = \cdot,
+ per-mode = symbol}
\usepackage{listings,fancyvrb} % wortwörtliche Anzeige
\newcommand{\vitem}[1][]{\SaveVerb[aftersave={\item[\textnormal{\UseVerb[#1]{vsave}}]}]{vsave}}
\usepackage[perpage,multiple]{footmisc} % Fußnoten
@@ -53,6 +56,7 @@
\labelformat{section}{section #1}
\labelformat{subsection}{section #1}
\labelformat{subsubsection}{section #1}
+ \labelformat{table}{table #1}
\usepackage[dvipsnames]{xcolor} % Farbe
\colorlet{code}{RawSienna}
\xdefinecolor{MyDarkRed}{rgb}{0.4392,0.0627,0.0627}
@@ -83,7 +87,7 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\usepackage{hyperref}
\hypersetup{colorlinks=true, % Setup der Hyperlinks und des pdf
- linkcolor=green!50!black,
+ linkcolor=MyDarkRed!20!red,
urlcolor=blue!70,
plainpages=false,
bookmarksopen=true,
@@ -92,7 +96,7 @@
pdfstartview=FitH,
pdfauthor={Clemens Niederberger},
pdftitle={myChemistry - english documentation},
- pdfsubject={Creating reactionschemes with LaTeX},
+ pdfsubject={Create reaction schemes with LaTeX and ChemFig},
pdfkeywords={myChemistry},
pdfcreator={LaTeX}
}
@@ -123,7 +127,7 @@
keywordstyle=[20]\color{blue},
morekeywords=[20]{rxn,rxnfloat,rxnscheme,tikzpicture},
texcsstyle=[30]\color{code},
- moretexcs=[30]{anywhere,arrow,branch,chemabove,chemand,chembelow,chemfig,chemmove,chemname,chemrel,chemsign,ce,color,compound,declarecompound,draw,dummy,elmove,floatplacement,floatstyle,Hpl,Hyd,lewis,listof,makeinvisible,makevisible,marrow,mCsetup,merge,mesomeric,node,nu,om,op,ox,pgfpositionnodelater,reactant,restylefloat,setarrowlength,setarrowline,setatomsep,setatomsize,setbondlength,setbondshape,setbondwidth,setcrambond,setmergelength,setrcndist,setrxnalign,setschemealign,setschemename,si,SI,textcolor,transition},
+ moretexcs=[30]{anywhere,arrow,branch,chemabove,chemand,chembelow,chemfig,chemmove,chemname,chemrel,chemsign,ce,color,compound,declarecompound,draw,dummy,elmove,floatplacement,floatstyle,Hpl,Hyd,lewis,listof,makeinvisible,makevisible,marrow,mCsetup,merge,mesomeric,node,nu,om,op,ox,pgfpositionnodelater,reactant,restylefloat,setarrowlabel,setarrowlength,setarrowline,setatomsep,setatomsize,setbondlength,setbondshape,setbondwidth,setcrambond,setmergelength,setrcndist,setrxnalign,setschemealign,setschemename,si,SI,textcolor,transition,vflipnext},
fancyvrb=true
}
@@ -135,6 +139,7 @@
\setheadwidth{textwithmarginpar}
\automark{section}
\ihead{\mC v\mCversion}
+\ohead{Manual}
\ifoot{\small\color{gray}-~page~\thepage~-}
\cfoot{}
\ofoot{}
@@ -238,7 +243,7 @@
\makeatother
% - weitere Makros -------------------------------------------------------------------- %
-\newcommand{\mC}{{\color{MyDarkRed}\sffamily my\-Chemis\-try}\xspace} % Paketname
+\newcommand{\mC}{{\color{MyDarkRed}\ECFJD my\-Che\-mis\-try}\xspace} % Paketname
\newcommand{\CF}{{\ECFAugie ChemFig}\xspace} % ChemFig in der originalen Schrift
\newcommand{\eg}{\mbox{e.\,g.}\xspace}
\newcommand{\TikZ}{\mbox{Ti{\bfseries\itshape k}Z}\xspace}
@@ -263,31 +268,27 @@
\chemfig{C(-[4]*6(=-=-=-))(-[2]*6(=-=-=-))(-[6,,,2]HO)-C(-[2]CH_3)
(-[6]OH)-CH_3}
}
- \branch[above right=of a]{
- \arrow[above right,,.7]{}{}
- \reactant[above right]{
- \chemfig{C(-[4]*6(=-=-=-))(-[2]*6(=-=-=-))(-[@{e1}6,,,2]H_2@{e2}
- \chembelow{O}{\oplus})-C(-[2]CH_3)(-[6]OH)-CH_3}\elmove{e1}
- {10:4mm}{e2}{-10:4mm}
- }
- \arrow{$-\ce{H2O}$}{}
- \reactant{
- \chemfig{\chembelow{C}{\oplus}(-[4]*6(=-=-=-))(-[2]*6(=-=-=-))-C
- (-[2]CH_3)(-[6]OH)-CH_3}
- }
+ \arrow[a.20]{}{}
+ \reactant[20]{
+ \chemfig{C(-[4]*6(=-=-=-))(-[2]*6(=-=-=-))(-[@{e1}6,,,2]H_2@{e2}
+ \chembelow{O}{\oplus})-C(-[2]CH_3)(-[6]OH)-CH_3}\elmove{e1}
+ {10:4mm}{e2}{-10:4mm}
}
- \branch[below right=of a]{
- \arrow[below right,-|>,.7]{}{}
- \reactant[below right]{
- \chemfig{C(-[4]*6(=-=-=-))(-[2]*6(=-=-=-))(-[6,,,2]HO)-C(-[2]CH_3)
- (-[@{e3}6]@{e4}\chembelow{O}{\oplus}H_2)-CH_3}\elmove{e3}
- {170:4mm}{e4}{-170:4mm}
- }
- \arrow{$-\ce{H2O}$}{}
- \reactant{
- \chemfig{C(-[4]*6(=-=-=-))(-[2]*6(=-=-=-))(-[6,,,2]HO)-
- \chembelow{C}{\oplus}(-[2]CH_3)-CH_3}
- }
+ \arrow[,,1.42]{$-\ce{H2O}$}{}
+ \reactant{
+ \chemfig{\chembelow{C}{\oplus}(-[4]*6(=-=-=-))(-[2]
+ *6(=-=-=-))-C(-[2]CH_3)(-[6]OH)-CH_3}
+ }
+ \arrow[a.-20,-|>]{}{}
+ \reactant[-20]{
+ \chemfig{C(-[4]*6(=-=-=-))(-[2]*6(=-=-=-))(-[6,,,2]HO)-C(-[2]CH_3)
+ (-[@{e3}6]@{e4}\chembelow{O}{\oplus}H_2)-CH_3}\elmove{e3}
+ {170:4mm}{e4}{-170:4mm}
+ }
+ \arrow[,,1.42]{$-\ce{H2O}$}{}
+ \reactant{
+ \chemfig{C(-[4]*6(=-=-=-))(-[2]*6(=-=-=-))(-[6,,,2]HO)-
+ \chembelow{C}{\oplus}(-[2]CH_3)-CH_3}
}
\end{rxn}
\end{verbatim}%
@@ -301,22 +302,18 @@
\color{white}\huge Creating reaction schemes with \LaTeX\ and \CF%
\end{center}
\vskip3cm
- \begin{rxn}[,.7]
- \setatomsep{1.5em}\footnotesize
- \reactant[,a]{ \chemfig{C(-[4]*6(=-=-=-))(-[2]*6(=-=-=-))(-[6,,,2]HO)-C(-[2]CH_3)(-[6]OH)-CH_3} }
- \branch[above right=of a]{
- \arrow[above right,,.7]{}{}
- \reactant[above right]{ \chemfig{C(-[4]*6(=-=-=-))(-[2]*6(=-=-=-))(-[@{e1}6,,,2]H_2@{e2}\chembelow{O}{\oplus})-C(-[2]CH_3)(-[6]OH)-CH_3}\elmove{e1}{10:4mm}{e2}{-10:4mm} }
- \arrow{$-\ce{H2O}$}{}
- \reactant{ \chemfig{\chembelow{C}{\oplus}(-[4]*6(=-=-=-))(-[2]*6(=-=-=-))-C(-[2]CH_3)(-[6]OH)-CH_3} }{}
- }
- \branch[below right=of a]{
- \arrow[below right,-|>,.7]{}{}
- \reactant[below right]{ \chemfig{C(-[4]*6(=-=-=-))(-[2]*6(=-=-=-))(-[6,,,2]HO)-C(-[2]CH_3)(-[@{e3}6]@{e4}\chembelow{O}{\oplus}H_2)-CH_3}\elmove{e3}{170:4mm}{e4}{-170:4mm} }
- \arrow{$-\ce{H2O}$}{}
- \reactant{ \chemfig{C(-[4]*6(=-=-=-))(-[2]*6(=-=-=-))(-[6,,,2]HO)-\chembelow{C}{\oplus}(-[2]CH_3)-CH_3} }
- }
- \end{rxn}
+\begin{rxn}[,.7]
+ \setatomsep{1.5em}\footnotesize
+ \reactant[,a]{ \chemfig{C(-[4]*6(=-=-=-))(-[2]*6(=-=-=-))(-[6,,,2]HO)-C(-[2]CH_3)(-[6]OH)-CH_3} }
+ \arrow[a.20]{}{}
+ \reactant[20]{ \chemfig{C(-[4]*6(=-=-=-))(-[2]*6(=-=-=-))(-[@{e1}6,,,2]H_2@{e2}\chembelow{O}{\oplus})-C(-[2]CH_3)(-[6]OH)-CH_3}\elmove{e1}{10:4mm}{e2}{-10:4mm} }
+ \arrow[,,1.42]{$-\ce{H2O}$}{}
+ \reactant{ \chemfig{\chembelow{C}{\oplus}(-[4]*6(=-=-=-))(-[2]*6(=-=-=-))-C(-[2]CH_3)(-[6]OH)-CH_3} }{}
+ \arrow[a.-20,-|>]{}{}
+ \reactant[-20]{ \chemfig{C(-[4]*6(=-=-=-))(-[2]*6(=-=-=-))(-[6,,,2]HO)-C(-[2]CH_3)(-[@{e3}6]@{e4}\chembelow{O}{\oplus}H_2)-CH_3}\elmove{e3}{170:4mm}{e4}{-170:4mm} }
+ \arrow[,,1.42]{$-\ce{H2O}$}{}
+ \reactant{ \chemfig{C(-[4]*6(=-=-=-))(-[2]*6(=-=-=-))(-[6,,,2]HO)-\chembelow{C}{\oplus}(-[2]CH_3)-CH_3} }
+\end{rxn}
\end{titlepage}
\tableofcontents
@@ -337,7 +334,7 @@ Last but not least since v1.2 \mC underlies LPPL version 1.3 or later.
\subsubsection{Version 1.3}
The commands \lstinline+\branch+, \lstinline+\mesomeric+, \lstinline+\reactant+ and \lstinline+\transition+ now cannot only accept alignment as optional argument but \TikZ keys as well. Also the second mandatory Argument \lstinline+<anchor>+ now is an optional one. So the first argument still is alignment, the second is the anchor name and in the third you can use arbitrary \TikZ keys.
\begin{lstlisting}
- \command[<alignment>,<anchor>,<tikz>]{}
+ \command[<pos>,<anchor>,<tikz>]{}
\end{lstlisting}
Version 1.2 explicitly needed a given alignment, if one wanted to use \TikZ keys, even with default alignment. Since v\mCversion\ this isn't required any more.
\begin{lstlisting}
@@ -354,18 +351,27 @@ If you're using \CF v0.4 or v0.4a, \mC inputs the file \lstinline+bondwith.tex+
And you might find this one nice: every \mC command in a listing in this do\-cu\-mentation is a hyperlink referring to the corresponding entry in the command reference.
-\subsubsection{Version \mCversion}
-\NEU%
+\subsubsection{Version 1.4}
The command \lstinline+\merge+ has been rewritten. Now the arrow can be labeled.
The main purpose of the command \lstinline+\dummy+ now is obsolete. The command still exists, though.
Both environments \lstinline+rxn+ and \lstinline+rxnscheme+ have changed regarding the usage of their options, see \ref{sssec:rxn_optionen} and \ref{sssec:rxnscheme_optionen}.
-The keys of the \lstinline+\arrow+ command now are options, so the syntax of the command now is consistent with the syntax of the other commands. Then there is a new arrow type, see \ref{ssec:arrow}. Also new is the appearance of the arrows and the possibility of customizing the line thickness of the arrows, see \ref{ssec:setarrowline}.
+The keys of the \lstinline+\arrow+ command now are options, so the syntax of the command now is consistent with the syntax of the other commands. Then there are three new arrow types, see \ref{ssec:arrow}. Also new is the appearance of the arrows and the possibility of customizing the line thickness of the arrows, see \ref{ssec:setarrowline}.
There is another new command \lstinline+\anywhere+ (\ref{ssec:anywhere}), with which text or formul\ae\ can be placed off the chain.
+\subsubsection{Version \mCversion}
+\NEU%
+Much happened in the background. This also provides some new features in the foreground. Most importantly is a new handling of the positioning of objects. All objects (reactants, arrows, branches \ldots) now cannot only be positioned with key words like \lstinline+right below+ but by using an actual angle.
+
+There are the new arrow types \lstinline+<=>>+ and \lstinline+<<=>+ which indicate an imbalanced equilibrium.
+
+The default placement identifier of \lstinline+rxnscheme+ has been changed from \lstinline+H+ to \lstinline+htp+.
+
+The example section has been moved from this manual to the file \texttt{examples.tex} or \texttt{examples.pdf}, resp.
+
\subsection{Licence}
\mC v\mCversion\ underlies the The \LaTeX\ project public license\\(\url{http://www.latex-project.org/lppl.txt}).
@@ -447,7 +453,14 @@ In some of the examples in this documentation the nodes are boxed with a coloure
\subsection{How does it work?}
\subsubsection{Basic Commands}
-Let's take a look at an example first:
+There are three basic commands:\index{reactant}\index{rxn}\index{arrow}
+\begin{lstlisting}
+ \begin{rxn}[<alignment>,<scale factor>]
+ \reactant[<pos>,<name>,<tikz>]{<formula>}
+ \arrow[<pos>,<type>,<length factor>,<name>,both,<tikz>]{<above>}{<below>}
+ \end{rxn}
+\end{lstlisting}
+Schemes are created within the \lstinline+rxn+ environment. There you place reactants and arrows.
\begin{SideBySideExample}
\begin{rxn}
\reactant{ \chemfig{-[::30]-[::-60]OH} }
@@ -455,90 +468,199 @@ Let's take a look at an example first:
\reactant{ \chemfig{-[::30]=_[::-60]O} }
\end{rxn}
\end{SideBySideExample}
-In this example you see the most important commands of \mC:\index{rxn}
-\begin{lstlisting}
- \begin{rxn}[<align>,<scalefactor>]
-\end{lstlisting}
-The first of two environments. It creates a centered reaction scheme between two paragraphs (see \ref{ssec:rxn}).\index{reactant}
-\begin{lstlisting}
- \reactant[<alignment>,<anchor>,<tikz>]{<formula>}
-\end{lstlisting}
-places a \lstinline+node+ on the \lstinline+chain+, in which the chemical formul\ae\ are written. The default alignment is to the \lstinline=right= (see \ref{ssec:reactant}).\index{arrow}
+When you don't use options reactants and arrows always are put to the right of the last object. With the option \lstinline+<pos>+ you can change this behaviour.
+\begin{SideBySideExample}
+ % positioning using key words
+ \begin{rxn}
+ \reactant{ \chemfig{-[::30]-[::-60]OH} }
+ \arrow[below]{Ox.}{}
+ \reactant[below]{ \chemfig{-[::30]=_[::-60]O} }
+ \end{rxn}
+ % positioning using an angle
+ \begin{rxn}
+ \reactant{ \chemfig{-[::30]-[::-60]OH} }
+ \arrow[180]{}{Ox.}
+ \reactant[180]{ \chemfig{-[::30]=_[::-60]O} }
+ \end{rxn}
+\end{SideBySideExample}
+\begin{table}
+ \centering
+ \begin{tabular}{>{\tt}lSS}
+ \toprule
+ {\normalfont key word} & {pos. angle} & {neg. angle} \\
+ \midrule
+ right & 0 & \pm 360 \\
+ right above & 45 & -315 \\
+ above & 90 & -270 \\
+ above left & 135 & -225 \\
+ left & 180 & -180 \\
+ below left & 225 & -135 \\
+ below & 270 & -90 \\
+ below right & 315 & -45 \\
+ \bottomrule
+ \end{tabular}
+ \caption{key words for positioning}\label{tab:keywords}
+\end{table}
+You can see in the last example, that positioning can be realized through key words (see \ref{tab:keywords}) like \lstinline+below+ or by using the angle relative to the horizontal line. Every angle from the interval $[\ang{-360};\ang{360}]$. \ang{0} corresponds to \lstinline+right+, which is the default value. \emph{Positive angles} mean a turn \emph{counter clockwise}, negative ones a turn clockwise, like you're used to in mathematics.
+\begin{SideBySideExample}
+ \begin{rxn}
+ \reactant{ \chemfig{-[::30]-[::-60]OH} }
+ \arrow[20]{Ox.}{}
+ \reactant[20]{ \chemfig{-[::30]=_[::-60]O} }
+ \end{rxn}
+ \begin{rxn}
+ \reactant{ \chemfig{-[::30]-[::-60]OH} }
+ \arrow[-20]{Ox.}{}
+ \reactant[-20]{ \chemfig{-[::30]=_[::-60]O} }
+ \end{rxn}
+\end{SideBySideExample}
+
+\subsubsection{Positioning}
+Reactants and arrows cannot only be positioned through key words and angles. They can refer to another reactant or arrow.
+\begin{Example}
+ \begin{rxn}
+ \reactant[,start]{ \chemfig{R-[::30](-[::60]R|^1) (-[::-120]R|^2)-[::-60]OH} }
+ \arrow[40]{\tiny$\text{R}^1=\text{H}$} {\tiny$\text{R}^2=\text{H}$}
+ \reactant[40]{ \chemfig{R-[::30]=_[::-60]O} }
+ \arrow[start.0]{\tiny$\text{R}^1=\text{alkyl}$} {\tiny$\text{R}^2=\text{H}$}
+ \reactant{ \chemfig{R-[::30](-[::60]R)=_[::-60]O} }
+ \arrow[start.-40,-|>]{\tiny$\text{R}^1=\text{alkyl}$} {\tiny$\text{R}^2=\text{Alkyl}$}
+ \end{rxn}
+\end{Example}
+In the last example the first reactant got the \lstinline+<name>+ \lstinline+start+. The arrows in lines 5 and 7 now could refer to it. A \emph{previously given name} can act as an anchor for later reactants or arrows, if the positioning is written like
\begin{lstlisting}
- \arrow[<direction>,<type>,<length factor>,<anchor>,both]{<above>}{<below>}
+ <anchor>.<angle>
\end{lstlisting}
-creates an arrow, which by default has a length of \SI{5}{\emlength} pointing to the right (see \ref{ssec:arrow}).
+Arrows can be given names, too. The anchor point of an arrow always is in the middle of the arrow line and has \emph{no} size.
\begin{SideBySideExample}
\begin{rxn}
- \reactant{ \chemfig{-[::30]=_[::-60]O} }
- \arrow[below]{}{Ox.}
- \reactant[below]{ \chemfig{-[::30](-[::60]OH)=_[::-60]O} }
+ \reactant{\chemfig{[:60]-(-[::60])=[::-60](-[::-60])-}}
+ \arrow[,,,arrow]{}{}
+ \reactant[arrow.90]{\ce{H2O}}
\end{rxn}
\end{SideBySideExample}
-As you can see one can align the reaction scheme vertical as well. By giving \lstinline=\reactant= the option \lstinline=below=, the carbonic acid is placed below the arrow. With \lstinline+below+ the arrow points down instead to the right.
+Using this kind of positioning does \emph{not} break the chain.
+\begin{lstlisting}
+ \begin{rxn}
+ \reactant[,a]{A}
+ \arrow{}{}
+ \reactant{B}
+ \arrow[a.-90]{}{}
+ \reactant[-90]{C}
+ \arrow[a.180]{}{}
+ \reactant[180]{D}
+ \end{rxn}
+\end{lstlisting}
+All seven objects of this example are logically speaking part of the same chain. The next obect is placed to the right of the last one, if no positioning is used.
+\begin{rxn}
+ \tikzset{nummer/.style={circle,fill=gray!30,draw=gray,minimum size=3.5mm}}
+ \reactant[,a]{A}\arrow[,,,pa]{}{}\reactant[,b]{B}
+ \arrow[a.-90,,,pb]{}{}\reactant[-90,c]{C}
+ \arrow[a.180,,,pc]{}{}\reactant[180,d]{D}
+ \anywhere{a.45,,nummer}{1}
+ \anywhere{pa.90,,nummer}{2}
+ \anywhere{b.45,,nummer}{3}
+ \anywhere{pb.0,,nummer}{4}
+ \anywhere{c.45,,nummer}{5}
+ \anywhere{pc.90,,nummer}{6}
+ \anywhere{d.45,,nummer}{7}
+\end{rxn}
\subsubsection{Branches}
-With what we saw until now it is not yet clear, why one would use \mC. the horizontal reaction schemes can be realized with \CF and `mhchem' just as well. And why would anyone need a vertical reaction scheme? But what could make \mC interesting is the possibility of branched reaction schemes.\index{branch}
+To break a chain you use the command\index{branch}
+\begin{lstlisting}
+ \branch[<pos>,<name>,<tikz>]{<formulae>}
+\end{lstlisting}
+The positioning of a branch is slightly different from earlier objects, although the syntax is similar. A branch has two additional ways of positioning. Every positioning that refers to an anchor cause that the branch is not a part of the chain but is a real branch.
+\begin{lstlisting}
+ <angle> % on the chain
+ <key> % on the chain
+ <anchor>.<angle> % not on the chain
+ on chain=going <key> % on the chain
+ <key>=of <anchor> % not on the chain
+\end{lstlisting}
+As \lstinline+<key>+ you again use the values from \ref{tab:keywords}.
\begin{Example}
\begin{rxn}
\reactant{ \chemfig{-[::30]-[::-60]OH} }
\arrow{}{}
\reactant[,carbonyl]{ \chemfig{-[::30]=_[::-60]O} }
- \arrow[below]{}{}
- \reactant[below]{ \chemfig{-[::30](-[::60]OH)=_[::-60]O} }
- \branch[right=of carbonyl]{
- \arrow[,<=>]{\ce{NH2R}}{}
- \reactant{ \chemfig{-[::30]=_[::-60]N(-[6]H)-[::60]R} }
+ \branch[carbonyl.-90]{
+ \arrow[-90,<=>]{\ce{NH2R}}{}
+ \reactant[-90]{ \chemfig{-[::30]=_[::-60]N(-[6]H)-[::60]R} }
}
+ \arrow{}{}
+ \reactant{ \chemfig{-[::30](-[::60]OH)=_[::-60]O} }
\end{rxn}
\end{Example}
-In the last example you've got to know another important command (see \ref{ssec:branch})\index{branch}:
+Please note that in the last example the arrow and the reactant placed after branch continue the original chain.
\begin{lstlisting}
- \branch[<alignment>,<anchor>,<tikz>]{<branch commands>}
+ \begin{rxn}
+ \reactant[,a]{A}
+ \arrow{}{}
+ \reactant{B}
+ \branch[a.-90]{
+ \arrow[-90]{}{}
+ \reactant[-90]{C}
+ }
+ \arrow[a.180]{}{}
+ \reactant[180]{D}
+ \end{rxn}
\end{lstlisting}
-The branch was placed right of the first reactant with the anchor \lstinline=carbonyl= by using the option \lstinline+right=of carbonyl+. Inside the branch we used an arrow with the key \lstinline+type={<=>}+ so we would get an equilibrium arrow. Other types would for example be \lstinline=->= (default), \lstinline=<-= or \lstinline=<->=.
-
-Extensive reaction schemes can be realized through multiple usage of \lstinline=\branch=\index{branch}:
+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}}
+ \reactant[,a]{A}\arrow[,,,pa]{}{}\reactant[,b]{B}
+ \branch[a.-90]{
+ \arrow[-90,,,pb]{}{}\reactant[-90,c]{C}
+ \anywhere{pb.0,,nummer}{a}
+ \anywhere{c.45,,nummer}{b}
+ }
+ \arrow[a.180,,,pc]{}{}\reactant[180,d]{D}
+ \anywhere{a.45,,nummer}{1}
+ \anywhere{pa.90,,nummer}{2}
+ \anywhere{b.45,,nummer}{3}
+ \anywhere{pc.90,,nummer}{4}
+ \anywhere{d.45,,nummer}{5}
+\end{rxn}
+Using \lstinline+\branch+ allows to create schemes with several branches:
\begin{Example}
\begin{rxn}
\reactant{ \chemfig{-[::30]-[::-60]OH} }
\arrow{}{}
\reactant[,carbonyl]{ \chemfig{-[::30]=_[::-60]O} }
- \arrow[below]{}{}
- \reactant[below]{ \chemfig{-[::30](-[::60]OH)=_[::-60]O} }
- \branch[right=of carbonyl,imin]{
+ \arrow[-90]{}{}
+ \reactant[-90]{ \chemfig{-[::30](-[::60]OH)=_[::-60]O} }
+ \branch[right=of carbonyl]{
\arrow[,<=>,1.12]{\ce{NH2R}}{}
\reactant{ \chemfig{-[::30]=_[::-60]N(-[6]H)-[::60]R} }
}
- \branch[below right=of carbonyl,halbacetal,yshift=-2pt,xshift=3pt]{
- \arrow[below right,<=>,1.12]{ \chemfig{[,.75]-[::30]-[::-60]OH} }{}
- \reactant[below right]{ \chemfig{-[::30](-[::60]O-[::-60]-[::-60])-[::-60]OH} }
- }
- \branch[above=of carbonyl,aldol,xshift=5.2em]{
- \arrow[above]{ \chemfig{[,.75]-[::30]=_[::-60]O}/\Hpl }{}
- \reactant[above]{ \chemfig{-[::30](-[::60]OH)-[::-60]-[::60]=[::60]O} }
- \arrow{$-\ce{H2O}$}{}
- \reactant{ \chemfig{-[::30]=[::-60]-[::60]=[::60]O} }
+ \branch[below right=of carbonyl]{
+ \arrow[-45,<=>,1.12]{ \chemfig{[,.75]-[::30]-[::-60]OH} }{}
+ \reactant[-45]{ \chemfig{-[::30](-[::60]O-[::-60]-[::-60])-[::-60]OH} }
}
+ \arrow[carbonyl.90]{ \chemfig{[,.75]-[::30]=_[::-60]O}/\Hpl }{}
+ \reactant[90]{ \chemfig{-[::30](-[::60]OH)-[::-60]-[::60]=[::60]O} }
+ \arrow{$-\ce{H2O}$}{}
+ \reactant{ \chemfig{-[::30]=[::-60]-[::60]=[::60]O} }
\end{rxn}
\end{Example}
\subsubsection{Numbered Schemes}
-The second environment provided by \mC works just as the first one. This time the scheme is placed within a numbered floating environment and is given a caption.\index{rxnscheme}
+There is another environment to create schemes.\index{rxnscheme}
+\begin{lstlisting}
+ \begin{rxnscheme}[<label>,<placement>,<alignment>,<skale factor>,<title>]{<caption>}
+ ...
+ \end{rxnscheme}
+\end{lstlisting}
+This is a floating environment for schemes, which can be given a \lstinline+<caption>+, a \lstinline+<label>+ and the common placement identifiers like \lstinline+htp+ (default).
\begin{Example}
- \begin{rxnscheme}{Keto-enol tautomerization}
+ \begin{rxnscheme}[,H]{Keto-Enol-tautomerism}
\reactant{ \chemfig{=[::30]-[::-60]OH} }
\arrow[,<=>]{}{}
\reactant{ \chemfig{-[::30]=[::-60]O} }
\end{rxnscheme}
\end{Example}
-Here we use the environment
-\begin{lstlisting}
- \begin{rxnscheme}[<label>,<placement>,<align>,<scalefactor>,<name>]{<caption>}
- ...
- \end{rxnscheme}
-\end{lstlisting}
-In the command reference (\ref{ssec:rxnscheme}) you can read how to customize the scheme.
\subsection{Predefined Values}\index{default values|(}
There are some predefined values, that are basically due to my personal taste. But of course you can change them according to your requirements. For \CF-formul\ae\ \emph{inside of \mC environments} some values are predefined as follows:
@@ -563,29 +685,35 @@ With these commands, the parameters are changed \emph{for all following} \mC env
\begin{Example}
\setbondlength{2.1em}\setbondshape{5pt}{1pt}{2pt}\setatomsize{\Large}
\begin{rxn}
- \reactant{\chemfig{-[::30](<[::60])-[::-60](<:[::-60])-[::60]}}
+ \reactant{\chemfig{-[::30](<[::60])-[::-60](<:[::-60])-[::60]A}}
\end{rxn}
\setbondlength{}\setbondshape{}{}{}\setatomsize{}
\begin{rxn}
- \reactant{\chemfig{-[::30](<[::60])-[::-60](<:[::-60])-[::60]}}
+ \reactant{\chemfig{-[::30](<[::60])-[::-60](<:[::-60])-[::60]A}}
\end{rxn}
\end{Example}
If you only want to change the parameters of a single environment you can use \CF's commands and \LaTeX's fontsize commands \emph{inside the environment}.
\begin{Example}
\begin{rxn}
\setatomsep{2.1em}\setcrambond{5pt}{1pt}{2pt}\Large
- \reactant{\chemfig{-[::30](<[::60])-[::-60](<:[::-60])-[::60]}}
+ \reactant{\chemfig{-[::30](<[::60])-[::-60](<:[::-60])-[::60]A}}
\end{rxn}
\begin{rxn}
- \reactant{\chemfig{-[::30](<[::60])-[::-60](<:[::-60])-[::60]}}
+ \reactant{\chemfig{-[::30](<[::60])-[::-60](<:[::-60])-[::60]A}}
\end{rxn}
\end{Example}
-The default length of an arrow is \SI{5}{\emlength} or $5\sqrt2\,\si{\emlength}$ if it's a diagonal one. You can change that by using the following command:\index{setarrowlength}
+The default length of reaction arrows is \SI{4}{\emlength}, the default line width is \lstinline+semithick+ and the default label distance is \SI{0.2}{\emlength}. You can change these default values with the commands\index{setarrowlength}\index{setarrowline}\index{setarrowlabel}
\begin{lstlisting}
\setarrowlength{<length>}
+ \setarrowline{<line width>}
+ \setarrowlabel{<label distance>}
+\end{lstlisting}
+or with\index{mCsetup}
+\begin{lstlisting}
+ \mCsetup{arrowlength=<length>,
+ arrowline=<line width>,
+ arrowlabel=<label distance>}
\end{lstlisting}
-\SaveVerb{arrowlength}=<length>=%
-Then the values are \UseVerb{arrowlength} or $\text{\UseVerb{arrowlength}}\cdot\sqrt{2}$ respectively.
\index{default values|)}
\subsection{Package options}\label{ssec:paketoptionen}\index{options|(}
@@ -701,35 +829,77 @@ You could, just for fun?, change the looks of a molecule with \TikZ.
\end{rxn}
\chemfig[->,green!45!blue!55]{*6(---(-)---)}
\end{SideBySideExample}
-The last example is not very good, of course, since you can achieve the same result using \CF's own possibilities. But other cases are imaginable:
+The last example is not very good, of course, since you can achieve the same result using \CF's own possibilities. But other cases are imaginable: for example one could define a style with which reactants are shown:
\begin{Example}
- \newcommand{\emptyreactant}{\reactant[,minimum width=5em]{ \rule[-1em]{1em}{.5pt}\;\rule[-1em]{3em}{.5pt} }{}}
- \newcommand{\stoich}{\rule[-3pt]{1em}{.5pt}}
+ \colorlet{mCgreen}{green!50!gray}
+ \colorlet{mCblue}{cyan!50!gray}
+ \colorlet{mCred}{magenta!50!gray}
+ \colorlet{mCyellow}{yellow!50!gray}
\begin{rxn}
- \reactant{\bf\Large Ionic compounds (I)}
- \reactant[below,a,yshift=1em]{Fill in the missing parts}
- \branch[below=of a,b]{ \reactant[,,minimum width=5em]{ \stoich\ Na }\chemand \emptyreactant \arrow{}{} \emptyreactant \chemand \emptyreactant }
- \branch[below=of b,,draw,inner sep=3pt]{\reactant[,,minimum width=5em]{}\chemand\reactant[,,minimum width=5em]{}\arrow{}{}\reactant[,,minimum width=5em]{Sodium chloride $+$ Hydrogen}}
+ \tikzset{reactant/.style={draw=#1,fill=#1!10,inner sep=1em,minimum height=10em,minimum width=12em,rounded corners}}
+ \reactant[,cytosine,reactant=mCred]{\chemfig{H-[:30]N*6(-(=O)-N=(-NH_2)-=-)}}
+ \anywhere{cytosine.-90,,yshift=-2mm}{Cytosine}
+ \reactant[,thymine,reactant=mCyellow]{\chemfig{H-[:30]N*6(-(=O)-N(-H)-(=O)-(-CH_3)=-)}}
+ \anywhere{thymine.-90,,yshift=-2mm}{Thymine}
+ \reactant[cytosine.-90,adenine,yshift=-2em,reactant=mCblue]{\chemfig{[:-36]*5(-N(-H)-*6(-N=-N=(-NH_2)--)--N=)}}
+ \anywhere{adenine.-90,Guanin,yshift=-2mm}{Adenine}
+ \reactant[,guanine,reactant=mCgreen]{\chemfig{[:-36]*5(-N(-H)-*6(-N=(-NH_2)-N(-H)-(=O)--)--N=)}}
+ \anywhere{guanine.-90,,yshift=-2mm}{Guanine}
\end{rxn}
\end{Example}
+This way certain parts of a scheme could be emphasized:
+\begin{Example}
+ \begin{rxn}
+ \setatomsep{1.5em}
+ \colorlet{mCgreen}{green!50!gray}
+ \tikzset{emph/.style={draw=mCgreen,fill=mCgreen!10,inner sep=1em}}
+ \reactant[,lineOne]{\chemfig{R^1-[:30](=[@{b1}2]O)-[:-30]O-H}}
+ \arrow[,<=>]{\chemfig{@{Hpl1}\Hpl}}{}
+ \branch[,,emph]{
+ \reactant{\chemfig{R^1-[:30]@{C1}(-[2]O-[:30]H)(-[6,.5,,,draw=none]\oplus)-[:-30]O-H}}
+ \arrow[,<=>,2]{\chemfig{[:30]H-@{O1}O-[::-60]-R^2}}{}
+ \reactant{\chemfig{R^1-[:30](-[2]O-[:30]H)(-[6]@{O2}O-[:-150]H)-[:-30]@{O3}\chemabove{O}{\oplus}(-[@{b2}6]H)-[:30]-[:-30]R^2}}
+ }
+ \anywhere{lineOne.-90,lineTwo,xshift=-3em,yshift=-7em}{}
+ \arrow[lineTwo.0,<=>]{$-$\Hpl/\chemfig{@{Hpl2}\Hpl}}{}
+ \reactant{\chemfig{R^1-[:30](-[@{b3}2]O-[@{b4}:30]H)(-[@{b5}6]@{O4}\chembelow{O}{\oplus}(-[:-30]H)-[:-150]H)-[:-30]O-[:30]-[:-30]R^2}}
+ \arrow[,<=>,2]{\ce{- \Hpl - H2O}}{}
+ \reactant{\chemfig{R^1-[:30](=[2]O)-[:-30]O-[:30]-[:-30]R^2}}
+ \anywhere{lineTwo.-90}{
+ \elmove{b1}{10:5mm}{Hpl1}{135:1cm}
+ \elmove{O1}{135:1.5cm}{C1}{30:5mm}
+ \elmove{O2}{-90:3cm}{Hpl2}{90:2cm}
+ \elmove{b2}{0:5mm}{O3}{-10:5mm}
+ \elmove{b4}{-40:5mm}{b3}{0:5mm}
+ \elmove{b5}{-30:5mm}{O4}{-10:5mm}
+ }
+ \end{rxn}
+\end{Example}
+\newpage
\section{Alphabetical Command Reference}
In the following section every command is explained.
-\subsection{anywhere}\label{ssec:anywhere}\index{anywhere|(}\index{Befehle!anywhere}
+\subsection{anywhere}\label{ssec:anywhere}\index{anywhere|(}\index{commands!anywhere}
\NEU%
-Sometimes it is useful to be able to place a reactant outside of the chain, \eg see \ref{rs:hydratisation}.
+Sometimes it might be useful to be able to place a reactant or anything else off the chain.
+\begin{lstlisting}
+ \anywhere{<pos>,<name>,<tikz>}{<something>}
+\end{lstlisting}
+For this case there's \lstinline+\anywhere+. It is positioned with \lstinline+<pos>+ similar to \lstinline+\branch+.
\begin{lstlisting}
- \anywhere[<anchor>]{<tikz>}{<formula>}
+ <anchor>.<angle> % not on the chain
+ on chain=going <key> % on the chain
+ <key>=of <anchor> % not on the chain
\end{lstlisting}
-The command \lstinline+\anywhere+ makes that possible. It is placed through \lstinline+<tikz>+ in a similar way as \lstinline+\branch+.
+\textbf{Please be aware that \lstinline+<pos>+ cannot be left empty.}
\begin{SideBySideExample}
\begin{rxn}
\reactant[,carbonyl_A]{\chemfig{R_2C=O}}
\anywhere{above=of carbonyl_A}{\chemfig{H-[:-30]O-[:30]H}};
\end{rxn}
\end{SideBySideExample}
-This command can be used for naming reaction partners.
+You can use this command \eg for placing labels naxt to reactants.
\begin{Example}
\begin{rxn}
\reactant[,ketone]{\chemfig{H-\chemabove{C}{\hspace*{5mm}\scriptstyle\alpha}(-[2]H)(-[6,,,2]{}|{\textcolor{blue}H})-C(=[:60]\lewis{02,O})-[:-60]C|H_3}}
@@ -745,113 +915,145 @@ This command can be used for naming reaction partners.
\anywhere{below=of mesomer}{$+$\color{blue}\ce{H2O}}
\end{rxn}
\end{Example}
+You can find many further examples for the usage of \lstinline+\anywhere+ in \texttt{examples.tex} or \texttt{examples.pdf}, resp.
\index{anywhere|)}
\subsection{arrow}\label{ssec:arrow}\index{arrow|(}\index{commands!arrow}
Reaction arrows are created with \lstinline=\arrow=.
\begin{lstlisting}
- \arrow[<direction>,<type>,<length factor>,<anchor>,both]{<above>}{<below>}
+ \arrow[<pos>,<type>,<length factor>,<name>,both,<tikz>]{<above>}{<below>}
\end{lstlisting}
-
\subsubsection{Options}\index{arrow!options|(}
-There are five options to customize the arrows. You've got to use them in the right order, separated by commas.
+There are a number of options to customize the arrows. The options must be used in the right order, seperated with commas.
\begin{enumerate}
-\item\lstinline+<direction>+\index{arrow!options!direction} -- possible values are:
+\item\lstinline+<pos>+\index{arrow!options!pos} -- possible values:
\begin{rxn}
\setarrowlength{2.5em}
\dummy[a]
- \arrow{}{}\reactant{right}
- \branch[above right=of a]{\arrow[above right]{}{}\reactant[above right]{above right}}
- \branch[above=of a]{\arrow[above]{}{}\reactant[above]{above}}
- \branch[above left=of a]{\arrow[above left]{}{}\reactant[above left]{above left}}
- \branch[left=of a]{\arrow[left]{}{}\reactant[left]{left}}
- \branch[below left=of a]{\arrow[below left]{}{}\reactant[below left]{below left}}
- \branch[below=of a]{\arrow[below]{}{}\reactant[below]{below}}
- \branch[below right=of a]{\arrow[below right]{}{}\reactant[below right]{below right}}
- \end{rxn}
-\item\lstinline+<type>+\index{arrow!options!type} -- possible values are:
+ \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}}}
+ \end{rxn}
+ \NEU%
+ Additionally you can use every angle from the interval $[\ang{-360};\ang{360}]$.
+
+ You can also use an angle with respect to an object that's been named with \lstinline+<name>+: \lstinline+<name>.<angle>+. This means the arrow is placed in an angle of \lstinline+<angle>+ next to \lstinline+<name>+. You can find lots of examples in \texttt{examples.tex} or\texttt{examples.pdf}, resp.
+\item\lstinline+<type>+\index{arrow!options!type} -- possible values:
\begin{rxn}
\dummy[a]
- \branch[below=of a,b,yshift=1em]{\arrow{}{}\reactant{\ttfamily -\textgreater}}
- \branch[below=of b,c,yshift=1em]{\arrow[,<-]{}{}\reactant{\ttfamily \textless-}}
- \branch[below=of c,d,xshift=.25em,yshift=1em]{\arrow[,<->]{}{}\reactant{\ttfamily \textless-\textgreater}}
- \branch[below=of d,e,yshift=1em]{\arrow[,<=>]{}{}\reactant{\ttfamily \textless=\textgreater}}
- \branch[below=of e,f,yshift=1em]{\arrow[,-|>]{}{}\reactant{\ttfamily -\textbar\textgreater}}
- \branch[below=of f,,yshift=1em]{\arrow[,-+>]{}{}\reactant{\ttfamily -+\textgreater}}
- \end{rxn}
-\item\lstinline+<length factor>+\index{arrow!options!length} -- the length (\SI{5.0}{\emlength}, factor = $1.0$, default) is multiplied with this factor.
-\item\lstinline+<anchor>+\index{arrow!options!anchor} -- this anchor can be used to refer to the arrow, \eg with a branch.
-\item\lstinline+both+\index{arrow!options!both}-- this gives both arrow argument nodes the same width and height.
+ \branch[below=of a,b,yshift=.5em]{\arrow{}{}\reactant{\ttfamily -\textgreater}}
+ \branch[below=of b,c,yshift=.5em]{\arrow[,<-]{}{}\reactant{\ttfamily \textless-}}
+ \branch[below=of c,d,xshift=.25em,yshift=.5em]{\arrow[,<->]{}{}\reactant{\ttfamily \textless-\textgreater}}
+ \branch[below=of d,e,yshift=.5em]{\arrow[,<=>]{}{}\reactant{\ttfamily \textless=\textgreater}}
+ \branch[below=of e,f,xshift=.25em,yshift=.5em]{\arrow[,<=>>]{}{}\reactant{\ttfamily \textless=\textgreater{}\textgreater}}
+ \branch[below=of f,g,yshift=.5em]{\arrow[,<<=>]{}{}\reactant{\ttfamily \textless{}\textless=\textgreater}}
+ \branch[below=of g,h,xshift=-.25em,yshift=.5em]{\arrow[,-|>]{}{}\reactant{\ttfamily -\textbar\textgreater}}
+ \branch[below=of h,,yshift=.5em]{\arrow[,-+>]{ }{ }\reactant{\ttfamily -+\textgreater}}
+ \end{rxn}
+\item\lstinline+<length factor>+\index{arrow!options!length} -- this factor multiplies with the arrow length (\SI{4}{\emlength} with factor = $1.0$, default) \item\lstinline+<name>+\index{arrow!options!name} -- can be used to give the arrow an anchor, to which another object can refer.
+\item\lstinline+both+\index{arrow!options!both}-- this gives both nodes within which the labels are written the same size.
+\item\lstinline+<tikz>+\index{arrow!options!tikz} -- you can modify the arrow with \TikZ keys. Not every \TikZ keys have an effect, though. You can't shift arrows with \lstinline+shift=<coord>+, for example.
\end{enumerate}
+\begin{Example}
+ \begin{rxn}
+ \arrow[,,.25]{M}{}\arrow[,,.5]{MM}{}\arrow[,,.75]{MMM}{}\arrow{MMMM}{}\arrow[,,1.125]{MMMMM}{}\arrow[,,1.25]{MMMMM}{}
+ \end{rxn}
+\end{Example}
+Please note, that the labels \lstinline+<above>+ and \lstinline+<below>+ are rotated with the arrow. At an angle of \ang{180} \lstinline+<above>+ actually is \emph{below} the arrow.
\begin{SideBySideExample}
\begin{rxn}
- \arrow[,,.6]{\ce{Br2}}{$h\nu$} \arrow{\chemfig{-[::30]-[::-60]OH}}{}
+ \setarrowlength{2.5em}
+ \dummy[a]
+ \arrow{a}{b}
+ \arrow[a.45]{a}{b}
+ \arrow[a.90]{a}{b}
+ \arrow[a.135]{a}{b}
+ \arrow[a.180]{a}{b}
+ \arrow[a.225]{a}{b}
+ \arrow[a.270]{a}{b}
+ \arrow[a.315]{a}{b}
\end{rxn}
+\end{SideBySideExample}
+\NEU%
+You need to be aware of one or two points, when using the arrow type \lstinline"-+>": if you leave the labels empty, the arrow is the same as \lstinline"->".
+The first label is the one added to the reaction, the second the one subtracted. If you use only one of the labels only the corresponding arrow part is drawn.\index{arrow!options!type}
+\begin{SideBySideExample}
+ corresponds \verb"->":
+ \begin{rxn}
+ \arrow[,-+>]{}{}
+ \end{rxn}
+ add:
\begin{rxn}
- \arrow[above,,.6]{\ce{Br2}}{$h\nu$}
+ \arrow[,-+>]{a}{}
\end{rxn}
+ subtract:
\begin{rxn}
- \arrow[above]{\chemfig{-[::30]-[::-60]OH}}{}
+ \arrow[,-+>]{}{b}
\end{rxn}
+ both add and subtract:
\begin{rxn}
- \arrow[above right,,.5]{\ce{Br2}}{$h\nu$}
+ \arrow[,-+>]{a}{b}
\end{rxn}
+ Blanks are \emph{not} an empty label:
\begin{rxn}
- \arrow[above right]{\chemfig{-[::30]-[::-60]OH}}{}
+ \arrow[,-+>]{ }{ }
\end{rxn}
\end{SideBySideExample}
-Most keys in action:
-\begin{SideBySideExample}
+\NEU%
+You can change the appearance of an arrow with \TikZ keys:\index{arrow!options!tikz}
+\begin{Example}
\begin{rxn}
+ \mCsetup{arrowlabel=.7em,arrowlength=6em}
\reactant{A}
- \arrow[,,,arrow_a]{B}{}
- \branch[above=of arrow_a,,yshift=1em]{
- \arrow[above,<-,.7]{}{}
- \reactant[above]{D}
- }
- \reactant{C}
- \end{rxn}
-\end{SideBySideExample}
+ \arrow[20,,,,,decorate,decoration=snake,blue]{a}{b}
+ \reactant[20]{A$^*$}
+ \end{rxn}
+\end{Example}
\index{arrow!options|)}
\subsubsection{Alignment}\index{arrow!alignment|(}
-If an arrow is placed inside a branch (see \ref{ssec:branch}) the alignment of the branch possibly is determined by the width and height of the arrow arguments. If these arguments have different sizes, the alignment can go wrong.
+If an arrow is placed inside a branch, the alignment of the branch may be determined by the size of the label nodes. If the two labels have a different size, alignment can go wrong.
\begin{SideBySideExample}
\makevisible
\begin{rxn}
\reactant[,a]{A}
\arrow{}{}
\branch[below=of a]{
- \arrow[below]{\chemfig{-[::30]-[::-60]OH}}{}
+ \arrow[-90]{\chemfig{-[::30]-[::-60]OH}}{}
}
\end{rxn}
\makeinvisible
\end{SideBySideExample}
-By using the key \lstinline=both=\index{arrow!both}, both argument nodes have the same size, which can correct the alignment.
+By using the option \lstinline=both=\index{arrow!options!both} both nodes get the same size. This can correct the alignment.
\begin{SideBySideExample}
\makevisible
\begin{rxn}
\reactant[,a]{A}
\arrow{}{}
\branch[below=of a]{
- \arrow[below,,,,both]{\chemfig{-[::30]-[::-60]OH}}{}
+ \arrow[-90,,,,both]{\chemfig{-[::30]-[::-60]OH}}{}
}
\end{rxn}
\makeinvisible
\end{SideBySideExample}
-There is more about the alignment problem in \ref{sssec:branch_ausrichtung}.
+There's more to the question of alignment in \ref{sssec:branch_ausrichtung}.
\index{arrow!alignment|)}
\subsubsection{Appearance}\index{arrow!appearance}
-With the commands \lstinline+\setarrowlength+ (\ref{ssec:setarrowlength}) and \lstinline+\setarrowline+ (\ref{ssec:setarrowline}) the general appearance of the arrows can be changed.
+You can change the general appearance of arrows with \lstinline+\setarrowlength+ (\ref{ssec:setarrowlength}) and \lstinline+\setarrowline+ (\ref{ssec:setarrowline}).
\index{arrow|)}
\subsection{branch}\label{ssec:branch}\index{branch|(}\index{commands!branch}
-\lstinline=\branch= is used to, well, create a branch to a reaction. \textbf{If you used earlier versions of \mC please be aware, that the command syntax has changed with v1.3.}
+\lstinline=\branch= is used to, well, create a branch to a reaction.
\begin{lstlisting}
- \branch[<alignment>,<anchor>,<tikz>]{<branch code>}
+ \branch[<pos>,<anchor>,<tikz>]{<branch code>}
\end{lstlisting}
-For \lstinline=\branch= alignment an anchor is important. Let's take a look at an example:
+For \lstinline=\branch= positioning an anchor is important. Let's take a look at an example:
\begin{Example}
\begin{rxn}
\reactant[,start]{\chemfig{-[::30]=_[::-60](-[::-60])-[::60]}}
@@ -860,8 +1062,8 @@ For \lstinline=\branch= alignment an anchor is important. Let's take a look at a
\chemand
\reactant{\chemfig{-[::30](-[::60]Cl)-[::-60](-[::-60])-[::60]}}
\branch[below right=of start]{
- \arrow[below right,,.75]{\ce{H2O}}{}
- \reactant[below right]{\chemfig{-[::30]-[::-60](-[::120]OH)(-[::-60])-[::60]}}
+ \arrow[-45,,.75]{\ce{H2O}}{}
+ \reactant[-45]{\chemfig{-[::30]-[::-60](-[::120]OH)(-[::-60])-[::60]}}
\chemand
\reactant{\chemfig{-[::30](-[::60]OH)-[::-60](-[::-60])-[::60]}}
}
@@ -883,12 +1085,53 @@ If you don't use the alignment reference to an anchor, you automatically refer t
\branch{ \reactant{ \chemfig{CH_3-CH=O} } }
\end{rxn}
\end{SideBySideExample}
-You have several options for alignment: you can either put the \lstinline+\branch+ on a \lstinline+chain+ or place it relative to a object.
-\begin{description}
- \vitem+chain+ In this case you use: \lstinline+on chain=going <value>+.
- \item[relative] In this case you use: \lstinline+<value>=of <anchor>+.
-\end{description}
-As possible \lstinline+<value>+ you have the same choices as for \lstinline+\reactant+, see \ref{ssec:reactant}. Default is \lstinline+on chain=going right+.
+
+\subsubsection{Positioning}\label{sssec:branch_positionierung}\index{branch!positioning|(}
+There are several ways to position a branch. It can either be part of the chain or be a real branch.
+\begin{lstlisting}
+ <angle> % on the chain
+ <key> % on the chain
+ <anchor>.<angle> % not on the chain
+ on chain=going <key> % on the chain
+ <key>=of <anchor> % not on the chain
+\end{lstlisting}
+Default behaviour is equal to \lstinline+\branch[0]{}+. In different situations different ways can be favoured. For example if you want to use \lstinline+\branch+ to shift an arrow, it can still be part of the chain.
+\begin{SideBySideExample}
+ \begin{rxn}
+ \reactant{A}
+ \branch[,,yshift=1em]{\arrow{}{}}
+ \reactant[,,yshift=-1em]{B}
+ \end{rxn}
+\end{SideBySideExample}
+If you like to start a real branch, it \emph{does} matter, which way you use.
+\begin{SideBySideExample}
+ \makevisible
+ \begin{rxn}
+ \reactant[,a]{\chemfig{[:30]--[::-60]-OH}}
+ \arrow{}{}
+ \branch[a.-45]{\arrow[-45]{}{}}
+ \end{rxn}
+ \begin{rxn}
+ \reactant[,a]{\chemfig{[:30]--[::-60]-OH}}
+ \arrow{}{}
+ \branch[below right=of a]{\arrow[-45]{}{}}
+ \end{rxn}
+\end{SideBySideExample}
+If a reactant isn't squared or circled \ang{-45} does not mean the same as "below right".
+\begin{SideBySideExample}
+ \makevisible
+ \begin{rxn}
+ \reactant[,a,circle]{\chemfig{[:30]--[::-60]-OH}}
+ \arrow{}{}
+ \branch[a.-45]{\arrow[-45]{}{}}
+ \end{rxn}
+ \begin{rxn}
+ \reactant[,a,circle]{\chemfig{[:30]--[::-60]-OH}}
+ \arrow{}{}
+ \branch[below right=of a]{\arrow[-45]{}{}}
+ \end{rxn}
+\end{SideBySideExample}
+\index{branch!positioning|)}
\subsubsection{Alignment problems}\label{sssec:branch_ausrichtung}\index{branch!alignment|(}
If an arrow has two arguments with different sizes and is placed inside a branch, the alignment of the branch can go wrong. In this case the \lstinline=\arrow= key \lstinline=both= isn't a solution, since the smaller argument then is not placed next to the arrow but is centered in its node.
@@ -944,7 +1187,7 @@ The optional arguments for \lstinline+\chemand+ and \lstinline+\reactant+ are th
\dummy\arrow{}{}
\end{rxn}
\end{lstlisting}
-\emph{This is \textbf{not} necessary any more}. In some (alignment) cases, an empty node still might be useful, so the command still exists.
+\textbf{This is \emph{not} necessary any more}. In some (alignment) cases, an empty node still might be useful, so the command still exists.
\index{dummy|)}
\subsection{elmove}\label{ssec:elmove}\index{elmove|(}\index{commands!elmove}
@@ -964,6 +1207,7 @@ using \lstinline?[->,red,shorten <=3pt,shorten >=1pt]? as default for \lstinline
\elmove{e1}{60:4mm}{e2}{0:4mm}
\end{center}
\end{Example}
+You should use \lstinline+\elmove+ \emph{only inside} of \lstinline+\anywhere+, \lstinline+\reactant+ or \lstinline+\transition+. Otherwise, you might get alignment errors.
\index{elmove|)}
\subsection{makeinvisible}\label{ssec:makeinvisible}\index{makeinvisible|(}\index{commands!makeinvisible}
@@ -973,19 +1217,24 @@ using \lstinline?[->,red,shorten <=3pt,shorten >=1pt]? as default for \lstinline
\subsection{makevisible}\label{ssec:makevisible}\index{makevisible|(}\index{commands!makevisible}
With \lstinline=\makevisible= you can visualize the nodes within which reactants, arrows and branches are set. This is useful when you're aligning branches, for example. You can see an example for \lstinline=\makevisible= in \ref{ssec:arrow}. Every kind of nodes is emphasized with a different colour:
-\tikz[baseline=(X.base)]\node[draw=red!60](X){\texttt{\textbackslash reactant\{\}}};, \tikz[baseline=(X.base)]\node[draw=green!60](X){\texttt{\textbackslash arrow\{above\}\{\}}};, \tikz[baseline=(X.base)]\node[draw=blue!60](X){\texttt{\textbackslash arrow\{\}\{below\}}}; und \tikz[baseline=(X.base)]\node[draw=purple, dotted](X){\texttt{\textbackslash branch\{\}}};. Also see \ref{ssec:makeinvisible}.
+\tikz[baseline=(X.base)]\node[draw=red!60](X){\texttt{\textbackslash reactant\{\}}};, \tikz[baseline=(X.base)]\node[draw=green!60](X){\texttt{\textbackslash arrow\{above\}\{\}}};, \tikz[baseline=(X.base)]\node[draw=blue!60](X){\texttt{\textbackslash arrow\{\}\{below\}}}; und \tikz[baseline=(X.base)]\node[draw=cyan](X){\texttt{\textbackslash branch\{\}}};. Also see \ref{ssec:makeinvisible}.
- \lstinline=\makevisible= only changes the looks of nodes following after it.
+ \lstinline=\makevisible= only changes the looks of nodes following after it ond only effects the group whithin which it is used.
\begin{SideBySideExample}
- \makevisible
\begin{rxn}
+ \makevisible
\reactant[,a]{A}
\arrow{a}{b}
\branch[below=of a]{
- \arrow[below,,,,both]{a}{b}
+ \arrow[-90,,,,both]{a}{b}
}
\end{rxn}
- \makeinvisible
+ \begin{rxn}
+ {\makevisible
+ \reactant{\chemfig{[:30]--[::-60]-OH}}
+ }
+ \reactant{\chemfig{[:30]--[::-60]-OH}}
+ \end{rxn}
\end{SideBySideExample}
\index{makevisible|)}
@@ -1006,6 +1255,7 @@ you can fully customize \mC. For each of \mC's commands going like \lstinline+\s
\begin{Example}
\mCsetup{
align=left,
+ arrowlabel=.7em,
arrowlength=3em,
arrowline=thick,
atomsize=\large,
@@ -1017,13 +1267,14 @@ you can fully customize \mC. For each of \mC's commands going like \lstinline+\s
}
\setbondshape{4pt}{2pt}{1pt}
\begin{rxn}
- \reactant{A}\arrow{}{}\reactant{\chemfig{A-(<[2])(<:[6])-B}}
+ \reactant{A}\arrow{a}{b}\reactant{\chemfig{A-(<[2])(<:[6])-B}}
\end{rxn}
\mCsetup{reset}
\begin{rxn}
- \reactant{A}\arrow{}{}\reactant{\chemfig{A-(<[2])(<:[6])-B}}
+ \reactant{A}\arrow{a}{b}\reactant{\chemfig{A-(<[2])(<:[6])-B}}
\end{rxn}
\end{Example}
+\lstinline+\mCsetup+ \textbf{as well as for every other setup command only effects the group whithin which it is used.}
\index{mCsetup|)}
\subsection{merge}\label{ssec:merge}\index{merge|(}\index{commands!merge}
@@ -1118,9 +1369,9 @@ The usage of \lstinline=\merge= may require some playing with branches, \lstinli
\index{merge|)}
\subsection{mesomeric}\label{ssec:mesomeric}\index{mesomeric|(}\index{commands!mesomeric}
-The \lstinline=\mesomeric= command works just like \lstinline=\branch= (see \ref{ssec:branch}) but places the formul\ae\ into square brackets. \textbf{If you used earlier versions of \mC please be aware, that the command syntax has changed with v1.3.}
+The \lstinline=\mesomeric= command works just like \lstinline=\branch= (see \ref{ssec:branch}) but places the formul\ae\ into square brackets.
\begin{lstlisting}
- \mesomeric[<alignment>,<anchor>,<tikz>]{<formula>}
+ \mesomeric[<pos>,<anchor>,<tikz>]{<formula>}
\end{lstlisting}
The resonance formul\ae\ are written into \lstinline=<formula>=. With \lstinline=\marrow= (see \ref{ssec:marrow}) you create the resonance arrows. If needed you can give an anchor (\lstinline=<anchor>=) to \lstinline=\mesomeric= (also see \ref{ssec:branch}). Alignment is used the same way as with \lstinline=\reactant=.
\begin{Example}
@@ -1165,50 +1416,51 @@ Or maybe a coordination complex?
\index{mesomeric|)}
\subsection{reactant}\label{ssec:reactant}\index{reactant|(}\index{commands!reactant}
-\NEU%
-The command \lstinline=\reactant=\footnote{In older versions this command was called \texttt{\textbackslash reactand}, which is still available.} is somehow the basic command of \mC. \textbf{If you used earlier versions of \mC please be aware, that the command syntax has changed with v1.3.}
+\lstinline=\reactant=\footnote{In earlier versions it was called \texttt{\textbackslash reactand}. You can still use it.} is something like the basic command.
\begin{lstlisting}
- \reactant[<alignment>,<anchor>,<tikz>]{<formula>}
+ \reactant[<pos>,<name>,<tikz>]{<formula>}
\end{lstlisting}
-In this command the actual formul\ae\ are written (\lstinline=<formula>=). If needed, they can be given an anchor (\lstinline=<anchor>=). The optional argument \lstinline=<alignment>= can have 8 different values:
+Formul\ae\ (\lstinline=<formula>=) are written inside this command and can be named (\lstinline=<name>=) for other objects to refer to. \lstinline+<pos>+ can either be one of these key words
\begin{alphlist}
- \item \lstinline=right=,
- \item \lstinline=above right=,
- \item \lstinline=above=,
- \item \lstinline=above left=,
- \item \lstinline=left=,
- \item \lstinline=below left=,
- \item \lstinline=below=,
- \item \lstinline=below right=
+ \item \lstinline+right+,
+ \item \lstinline+above right+,
+ \item \lstinline+above+,
+ \item \lstinline+above left+,
+ \item \lstinline+left+,
+ \item \lstinline+below left+,
+ \item \lstinline+below+,
+ \item \lstinline+below right+
\end{alphlist}
-Default is \lstinline=right=. You use this argument to place the reactant relatively to the reactant or arrow right before.
+\NEU%
+or be an angle from the intervall $[\ang{-360};\ang{360}]$. You also can position it relativ to another object via \lstinline+<anchor>.<angle>+. The default equals \lstinline+\reactant[0]{}+.
\begin{SideBySideExample}
-%horizontal:
+ below:
\begin{rxn}
\reactant{\ce{Br2}}
- \reactant[below]{\ce{Cl2}}
+ \reactant[-90]{\ce{Cl2}}
\end{rxn}
-%more than one reactant:
+ more than one reactant:
\begin{rxn}
\reactant{\ce{Br2}}
- \reactant[below]{\ce{I2}}
+ \reactant[-90]{\ce{I2}}
\reactant{\ce{Cl2}}
\end{rxn}
-%vertical reaction:
+ going down:
\begin{rxn}
\reactant{\ce{Br-Br}}
- \arrow[below,,.5]{$h\nu$}{}
- \reactant[below]{\ce{2 ~\lewis{0.,Br}}}
+ \arrow[-90,,.5]{$h\nu$}{}
+ \reactant[-90]{\ce{2 ~\lewis{0.,Br}}}
\end{rxn}
\end{SideBySideExample}
+You can find many more examples in the file \texttt{examples.tex} or \texttt{examples.pdf}, resp.
\index{reactant|)}
\subsection{rxn (environment)}\label{ssec:rxn}\index{rxn|(}\index{commands!rxn|see{rxn}}\index{environment!rxn|see{rxn}}
\lstinline=rxn= is a non-floating not numbered environment for reaction schemes. Per default all schemes are centered.
\begin{lstlisting}
- \begin{rxn}[<align>,<scalefactor>]
+ \begin{rxn}[<alignment>,<scalefactor>]
...
\end{rxn}
\end{lstlisting}
@@ -1269,7 +1521,7 @@ Alignment examples:
\end{rxnscheme}
\end{lstlisting}
you can refer to it by using \lstinline=\ref{rs:schema}= as usual.
- \item\lstinline+<placement>+\index{rxnscheme!options!placement} With this option you can change the placement of the float, \eg with \lstinline+htp+. The default value is \lstinline+H+ (exactly here). An example for this option is \ref{rs:synthese} in \ref{ssec:tikzsynthese}.
+ \item\lstinline+<placement>+\index{rxnscheme!options!placement} With this option you can change the placement of the float, \eg with \lstinline+htp+. The default value is \lstinline+htp+.
\item\lstinline+<alignment>+\index{rxnscheme!options!alignment}This option changes the alignment of the scheme. You can choose between \lstinline=left=, \lstinline=center= and \lstinline=right=.
\item\lstinline+<scalefactor>+\index{rxnscheme!options!scale} \lstinline+rxnscheme+ has another key with which the scheme can be scaled. Please keep in mind that it doesn't affect the font size and the size of \CF formul\ae. You can have strange effects on \CF formul\ae\ if you use this key, though. See \ref{sssec:rxn_optionen} for more information.
\item\lstinline+<name>+\index{rxnscheme!options!name} This option changes the name of the actual scheme from "Reaktionschema" or "Reaction scheme" into \lstinline+<name>+.
@@ -1280,25 +1532,25 @@ Alignment examples:
\end{lstlisting}
\end{enumerate}
\begin{Example}
- \begin{rxnscheme}[,,,2]{Big scheme}
+ \begin{rxnscheme}[,H,,2]{Big scheme}
\large\setatomsep{3.5em}
\reactant{ \chemfig{=[::30]-[::-60]OH} }
\arrow[,<=>]{}{}
\reactant{ \chemfig{-[::30]=[::-60]O} }
\end{rxnscheme}
- \begin{rxnscheme}[,,,.5]{Small scheme}
+ \begin{rxnscheme}[,H,,.5]{Small scheme}
\tiny\setatomsep{1em}
\reactant{ \chemfig{=[::30]-[::-60]OH} }
\arrow[,<=>]{}{}
\reactant{ \chemfig{-[::30]=[::-60]O} }
\end{rxnscheme}
- \begin{rxnscheme}{center}
+ \begin{rxnscheme}[,H]{center}
\reactant{center}\arrow{}{}\reactant{centered}
\end{rxnscheme}
- \begin{rxnscheme}[,,right]{right}
+ \begin{rxnscheme}[,H,right]{right}
\reactant{right}\arrow{}{}\reactant{raggedleft}
\end{rxnscheme}
- \begin{rxnscheme}[,,left]{left}
+ \begin{rxnscheme}[,H,left]{left}
\reactant{left}\arrow{}{}\reactant{raggedright}
\end{rxnscheme}
\end{Example}
@@ -1319,17 +1571,17 @@ There are different possible styles, privided by the `float' package:
\vitem=ruled= the caption is placed above the object framed by to rules, one above and one below, another rule frames the object below; default for \lstinline+rxnscheme+
\end{description}
\begin{Example}
- \begin{rxnscheme}{ruled}
+ \begin{rxnscheme}[,H]{ruled}
\reactant{default style}
\end{rxnscheme}
\floatstyle{boxed}
\restylefloat{rxnfloat}
- \begin{rxnscheme}{boxed}
+ \begin{rxnscheme}[,H]{boxed}
\reactant{framed object}
\end{rxnscheme}
\floatstyle{plain}
\restylefloat{rxnfloat}
- \begin{rxnscheme}{plain}
+ \begin{rxnscheme}[,H]{plain}
\reactant{without any special formatting}
\end{rxnscheme}
\end{Example}
@@ -1377,14 +1629,28 @@ you can create a list of all schemes created with \lstinline+rxnscheme+.
\end{SideBySideExample}
\index{rxnscheme!customize|)}\index{rxnscheme|)}
+\subsection{setarrowlabel}\label{ssec:setarrowlabel}\index{setarrowlabel|(}\index{commands!setarrowlabel}
+\NEU%
+The distance of arrow labels to the arrow has a default value of \SI{0.2}{\emlength}. You can change this with
+\begin{lstlisting}
+ \setarrowlabel{<distance>}
+\end{lstlisting}
+into \lstinline+<distance>+.
+\begin{SideBySideExample}
+ \begin{rxn}
+ \arrow{a}{b}
+ \setarrowlabel{.5em}
+ \arrow{a}{b}
+ \end{rxn}
+\end{SideBySideExample}
+\index{setarrowlabel|)}
+
\subsection{setarrowlength}\label{ssec:setarrowlength}\index{setarrowlength|(}\index{commands!setarrowlength}
-The default length of an reaction arrow is \SI{5.0}{\emlength} or $5.0\cdot\sqrt{2}\,\si{\emlength}$ for the diagonal ones. You can change these values using
+The default length of an reaction arrow is \SI{4}{\emlength}. You can change this value with
\begin{lstlisting}
\setarrowlength{<length>}
\end{lstlisting}
-into \UseVerb{arrowlength} or $\text{\UseVerb{arrowlength}}\cdot\sqrt{2}$, respectively. Mind the fact that you have to use a length unit. If you leave the argument empty, the length is reset to default.
-
-{\bfseries This command replaces \lstinline=\arrowlength= from earlier versions.}
+into \lstinline+<length>+. Mind the fact that you have to use a length unit. If you leave the argument empty, the length is reset to default.
\index{setarrowlength|)}
\subsection{setatomsize}\label{ssec:setatomsize}\index{setatomsize|(}\index{commands!setatomsize}
@@ -1393,8 +1659,6 @@ With
\setatomsize{<font size>}
\end{lstlisting}
you can change the font size of the atom groups. Default value is \lstinline=\small=. If you leave the argument empty, the size is reset to default.
-
-{\bfseries This command replaces \lstinline=\atomsize= from earlier versions.}
\index{setatomsize|)}
\subsection{setbondlength}\label{ssec:setbondlength}\index{setbondlength|(}\index{commands!setbondlength}
@@ -1402,10 +1666,7 @@ With
\begin{lstlisting}
\setbondlength{<length>}
\end{lstlisting}
-you can change \lstinline=\setatomsep{<length>}= for all \CF formul\ae\ \emph{inside} of the\\
-\mC environments. Default value is \SI{1.8}{\emlength}. If you leave the argument empty, the length is reset to default.
-
-{\bfseries This command replaces \lstinline=\bondlength= from earlier versions.}
+you can change \lstinline=\setatomsep{<length>}= for all \CF formul\ae\ \emph{inside} of the \mC environments. Default value is \SI{1.8}{\emlength}. If you leave the argument empty, the length is reset to default.
\index{setbondlength|)}
\subsection{setarrowline}\label{ssec:setarrowline}\index{setarrowline|(}\index{Befehle!setarrowline}
@@ -1437,8 +1698,6 @@ With
\setbondshape{<base length>}{<dash thickness>}{<dash spacing>}
\end{lstlisting}
you can change \lstinline=\setcrambond{<base length>}{<dash thickness>}{<dash spacing>}= for all \CF formul\ae\ \emph{inside} of the \mC environments. Default values are (in this order) \SI{3}{\pt}, \SI{.5}{\pt} and \SI{1}{\pt}. If you leave an argument empty, the value is reset to default.
-
-{\bfseries This command replaces \lstinline=\bondshape= from earlier versions.}
\index{setbondshape|)}
\subsection{setmergelength}\label{ssec:setmergelength}\index{setmergelength|(}\index{commands!setmergelength}
@@ -1494,9 +1753,9 @@ See \ref{par:rxnscheme_name}.
\index{setschemename|)}
\subsection{transition}\label{ssec:transition}\index{transition|(}\index{commands!transition}
-\lstinline=\transition= works exactly like \lstinline=\reactant= (see \ref{ssec:reactant}). \textbf{If you used earlier versions of \mC please be aware, that the command syntax has changed with v1.3.}
+\lstinline=\transition= works exactly like \lstinline=\reactant= (see \ref{ssec:reactant}).
\begin{lstlisting}
- \transition[<alignment>,<anchor>,<tikz>]{<formula>}
+ \transition[<pos>,<anchor>,<tikz>]{<formula>}
\end{lstlisting}
\begin{SideBySideExample}
\begin{rxn}
@@ -1509,886 +1768,6 @@ See \ref{par:rxnscheme_name}.
\end{SideBySideExample}
\index{transition|)}
-\section{Examples}
-\subsection{Addition Reaction}\label{ssec:addition}
-A simple reaction scheme with two different products.
-\begin{rxnscheme}{addition reaction}
- \reactant{ \chemfig{=_[::-30]-[::60](=[::60]O)-[::-60]} }
- \arrow{ $+ \Hpl$ }{}
- \mesomeric[,rf]{
- \reactant{ \chemfig{=_[:-30]-[::60](-[::60]OH)(-[::-120,.3,,,white]\oplus)-[::-60]} }
- \marrow[below]
- \reactant[below]{ \chemfig{\oplus-[6,.3,,,white]-[:-30]=_[::60](-[::60]OH)-[::-60]} }
- }
- \branch[right=of rf,,yshift=3em]{
- \arrow{}{}
- \reactant{ \chemname{\chemfig{=_[:-30]-[::60](-[::60]OH)(-[::-120]R)-[::-60]}}{1,2-adduct} }
- }
- \branch[right=of rf,,yshift=-5em]{
- \arrow{}{}
- \reactant{ \chemname{\chemfig{R-[6]-[:-30]=_[::60](-[::60]OH)-[::-60]}}{1,4-adduct} }
- }
-\end{rxnscheme}
-Let's take a closer look, step after step. At first we write the first reactant and the reaction arrow.
-\begin{lstlisting}
- \reactant{ \chemfig{=_[::-30]-[::60](=[::60]O)-[::-60]} }
- \arrow{ $+ \Hpl$ }{}
-\end{lstlisting}
-\begin{rxn}
- \reactant{ \chemfig{=_[::-30]-[::60](=[::60]O)-[::-60]} }
- \arrow{ $+ \Hpl$ }{}
-\end{rxn}
-Then we write the resonance formul\ae. The \lstinline=\mesomeric=\index{mesomeric}\index{marrow} gets the anchor \lstinline=rf= (line 7).
-\begin{lstlisting}[firstnumber=3]
- \mesomeric[,rf]{
- \reactant{ \chemfig{=_[:-30]-[::60](-[::60]OH)(-[::-120,.3,,,white]\oplus)-[::-60]} }
- \marrow[below]
- \reactant[below]{ \chemfig{\oplus-[6,.3,,,white]-[:-30]=_[::60](-[::60]OH)-[::-60]} }
- }
-\end{lstlisting}
-\begin{rxn}
- \reactant{ \chemfig{=_[::-30]-[::60](=[::60]O)-[::-60]} }
- \arrow{ $+ \Hpl$ }{}
- \mesomeric[,rf]{
- \reactant{ \chemfig{=_[:-30]-[::60](-[::60]OH)(-[::-120,.3,,,white]\oplus)-[::-60]} }
- \marrow[below]
- \reactant[below]{ \chemfig{\oplus-[6,.3,,,white]-[:-30]=_[::60](-[::60]OH)-[::-60]} }
- }
-\end{rxn}
-Now comes the 1,2-adduct, placed in a branch\index{branch} referring \lstinline+rf+, shifted above with \lstinline+yshift+\index{yshift}:
-\begin{lstlisting}[firstnumber=8]
- \branch[right=of rf,,yshift=3em]{
- \arrow{}{}
- \reactant{ \chemname{\chemfig{=_[:-30]-[::60](-[::60]OH)(-[::-120]R)-[::-60]}}{1,2-adduct} }
- }
-\end{lstlisting}
-\begin{rxn}
- \reactant{ \chemfig{=_[::-30]-[::60](=[::60]O)-[::-60]} }
- \arrow{ $+ \Hpl$ }{}
- \mesomeric[,rf]{
- \reactant{ \chemfig{=_[:-30]-[::60](-[::60]OH)(-[::-120,.3,,,white]\oplus)-[::-60]} }
- \marrow[below]
- \reactant[below]{ \chemfig{\oplus-[6,.3,,,white]-[:-30]=_[::60](-[::60]OH)-[::-60]} }
- }
- \branch[right=of rf,,yshift=3em]{
- \arrow{}{}
- \reactant{ \chemname{\chemfig{=_[:-30]-[::60](-[::60]OH)(-[::-120]R)-[::-60]}}{1,2-adduct} }
- }
-\end{rxn}
-At last we write the branch\index{branch} containing the 1,4-adduct, also referencing \lstinline+rf+, shifted below with \lstinline+yshift+\index{yshift}:
-\begin{lstlisting}[firstnumber=12]
- \branch[right=of rf,,yshift=-5em]{
- \arrow{}{}
- \reactant{ \chemname{\chemfig{R-[6]-[:-30]=_[::60](-[::60]OH)-[::-60]}}{1,4-adduct} }
- }
-\end{lstlisting}
-\begin{rxn}
- \reactant{ \chemfig{=_[::-30]-[::60](=[::60]O)-[::-60]} }
- \arrow{ $+ \Hpl$ }{}
- \mesomeric[,rf]{
- \reactant{ \chemfig{=_[:-30]-[::60](-[::60]OH)(-[::-120,.3,,,white]\oplus)-[::-60]} }
- \marrow[below]
- \reactant[below]{ \chemfig{\oplus-[6,.3,,,white]-[:-30]=_[::60](-[::60]OH)-[::-60]} }
- }
- \branch[right=of rf,,yshift=3em]{
- \arrow{}{}
- \reactant{ \chemname{\chemfig{=_[:-30]-[::60](-[::60]OH)(-[::-120]R)-[::-60]}}{1,2-adduct} }
- }
- \branch[right=of rf,,yshift=-5em]{
- \arrow{}{}
- \reactant{ \chemname{\chemfig{R-[6]-[:-30]=_[::60](-[::60]OH)-[::-60]}}{1,4-adduct} }
- }
-\end{rxn}
-The complete code looks like this:
-\begin{lstlisting}
- \begin{rxnscheme}{addition reaction}
- \reactant{ \chemfig{=_[::-30]-[::60](=[::60]O)-[::-60]} }
- \arrow{ $+ \Hpl$ }{}
- \mesomeric[,rf]{
- \reactant{ \chemfig{=_[:-30]-[::60](-[::60]OH)(-[::-120,.3,,,white]\oplus)-[::-60]} }
- \marrow[below]
- \reactant[below]{ \chemfig{\oplus-[6,.3,,,white]-[:-30]=_[::60](-[::60]OH)-[::-60]} }
- }
- \branch[right=of rf,,yshift=3em]{
- \arrow{}{}
- \reactant{ \chemname{\chemfig{=_[:-30]-[::60](-[::60]OH)(-[::-120]R)-[::-60]}}{1,2-adduct} }
- }
- \branch[right=of rf,,yshift=-5em]{
- \arrow{}{}
- \reactant{ \chemname{\chemfig{R-[6]-[:-30]=_[::60](-[::60]OH)-[::-60]}}{1,4-adduct} }
- }
- \end{rxnscheme}}
-\end{lstlisting}
-
-\subsection{Mesomerism}
-We want to display the following reaction scheme:
-\begin{rxnscheme}[,,,.8]{electrophilic substitution}
- \setatomsep{1.6em}
- \reactant[,start]{ \chemname{\chemfig{*6(-=-=(-[,,,,white]\phantom{Br})-=)}}{benzene \compound{benzene}} }
- \branch[below=of start]{
- \arrow[below,,,pfeil_a,both]{\ce{Br2 / AlBr3}}{$-\ce{AlBr4\om}$}
- }
- \branch[below=of pfeil_a,mesomerism,xshift=8.5em]{
- \mesomeric{
- \reactant{
- \chemfig{*6(=[@{e1}]-=-(-[:120]Br)(-[:60]H)-(-[:-30,.4,,,white]\oplus)-[@{e2}])}
- \elmove{e1}{60:4mm}{e2}{0:4mm}
- }
- \marrow
- \reactant{
- \chemfig{*6(-(-[:90,.4,,,white]\oplus)-[@{e4}]=[@{e3}]-(-[:120]Br)(-[:60]H)-=)}
- \elmove{e3}{180:4mm}{e4}{150:4mm}
- }
- \marrow
- \reactant{
- \chemfig{*6(-=-(-[:-150,.4,,,white]\oplus)-(-[:120]Br)(-[:60]H)-=)}
- }
- }
- }
- \branch[above=of mesomerism,,xshift=7.25em]{
- \arrow[above]{$-\Hpl$}{}
- }
- \arrow[,,2.6]{}{}
- \reactant{ \chemname{\chemfig{*6(-=-=(-Br)-=)}}{bromobenzene \compound{bromobenzene}} }
-\end{rxnscheme}
-First we write the main reaction. To do so, we use the commands \lstinline=\reactant=\index{reactant}, \lstinline=\arrow=\index{arrow} and the environment \lstinline=\begin{rxnscheme} ... \end{rxnscheme}=\index{rxnscheme}.
-\begin{lstlisting}
- \begin{rxnscheme}{electrophilic substitution}
- \reactant{
- \chemname{\chemfig{*6(-=-=-=)}}{benzene \compound{benzene}}
- }
- \arrow{}{}
- \reactant{
- \chemname{\chemfig{*6(-=-=(-Br)-=)}}{bromobenzene \compound{bromobenzene}}
- }
- \end{rxnscheme}
-\end{lstlisting}
- \begin{rxn}
- \reactant{
- \chemname{\chemfig{*6(-=-=-=)}}{benzene \compound{benzene}}
- }
- \arrow{}{}
- \reactant{
- \chemname{\chemfig{*6(-=-=(-Br)-=)}}{bromobenzene \compound{bromobenzene}}
- }
- \end{rxn}
-Now we make it a little bit smaller:
-\begin{lstlisting}
- \begin{rxnscheme}[,,,!!.8!!]{electrophilic substitution}
- !!\setatomsep{1.6em}!!
- \reactant{
- \chemname{\chemfig{*6(-=-=-=)}}{benzene \compound{benzene}}
- }
- \arrow{}{}
- \reactant{
- \chemname{\chemfig{*6(-=-=(-Br)-=)}}{bromobenzene \compound{bromobenzene}}
- }
- \end{rxnscheme}
-\end{lstlisting}
- \begin{rxn}[,.8]
- \setatomsep{1.6em}
- \reactant{
- \chemname{\chemfig{*6(-=-=-=)}}{benzene \compound{benzene}}
- }
- \arrow{}{}
- \reactant{
- \chemname{\chemfig{*6(-=-=(-Br)-=)}}{bromobenzene \compound{bromobenzene}}
- }
- \end{rxn}
-We have two possibilities to align both benzene rings at the same height. Either we shift the second one up using \TikZ\index{tikz@\TikZ} code:
-\begin{lstlisting}[firstnumber=7]
- \reactant[,,!!yshift=1em!!]{
- \chemname{\chemfig{*6(-=-=(-Br)-=)}}{bromobenzene \compound{bromobenzene}}
- }
-\end{lstlisting}
-This is not the best solution, because the arrow\index{arrow} isn't centered with respect to the rings.
- \begin{rxn}
- \reactant{
- \chemname{\chemfig{*6(-=-=-=)}}{benzene \compound{benzene}}
- }
- \arrow{}{}
- \reactant[,,yshift=1em]{
- \chemname{\chemfig{*6(-=-=(-Br)-=)}}{bromobenzene \compound{bromobenzene}}
- }
- \end{rxn}
-The second possibility would be to shift the first ring down. We can't achieve that by using \TikZ\index{tikz@\TikZ} code, because the following arrow\index{arrow} and reactant\index{reactant} align themselves with respect to the reactant or arrow directly before. But we can write an invisible bromine to the first benzene to do the trick:
-\begin{lstlisting}[firstnumber=3]
- \reactant{
- \chemname{\chemfig{*6(-=-=!!(-[,,,,white]\phantom{Br})!!-=)}}{benzene \compound{benzene}}
- }
-\end{lstlisting}
- \begin{rxn}
- \reactant{
- \chemname{\chemfig{*6(-=-=(-[,,,,white]\phantom{Br})-=)}}{benzene \compound{benzene}}
- }
- \arrow{}{}
- \reactant{
- \chemname{\chemfig{*6(-=-=(-Br)-=)}}{bromobenzene \compound{bromobenzene}}
- }
- \end{rxn}
-We need to give the first reactant an anchor in order to refer to it with the branch\index{branch}.
- \begin{lstlisting}
- \begin{rxnscheme}[,,,.8]{electrophilic substitution}
- \setatomsep{1.6em}
- \reactant[,!!start!!]{
- \chemname{\chemfig{*6(-=-=(-[,,,,white]\phantom{Br})-=)}}{benzene \compound{benzene}}
- }
- \branch[!!below=of start!!]{
- \arrow[!!below!!,,,,both]{ \ce{Br2 / AlBr3} }{ $-\ce{AlBr4\om}$ }
- }
- \arrow{}{}
- \reactant{
- \chemname{\chemfig{*6(-=-=(-Br)-=)}}{bromobenzene \compound{bromobenzene}}
- }
- \end{rxnscheme}
-\end{lstlisting}
-So the first reactant gets the anchor \lstinline=start= and the branch\index{branch} refers to it with \lstinline+below=of start+. For the reaction arrow to point below, we need to use the option \lstinline+below+. Now we get:
- \begin{rxn}[,.8]
- \setatomsep{1.6em}
- \reactant[,start]{
- \chemname{\chemfig{*6(-=-=(-[,,,,white]\phantom{Br})-=)}}{benzene \compound{benzene}}
- }
- \branch[below=of start]{
- \arrow[below,,,,both]{\ce{Br2 / AlBr3}}{$-\ce{AlBr4\om}$}
- }
- \arrow{}{}
- \reactant{
- \chemname{\chemfig{*6(-=-=(-Br)-=)}}{bromobenzene \compound{bromobenzene}}
- }
- \end{rxn}
-Next we write the resonance formul\ae\ of the Wheland intermediate. To do that we use three further commands: \lstinline=\mesomeric=\index{mesomeric}, \lstinline=\marrow=\index{marrow} and \lstinline=\elmove=\index{elmove}.
-\begin{lstlisting}
- !!\mesomeric{!!
- \reactant{
- \chemfig{*6(=[@{e1}]-=-(-[:120]Br)(-[:60]H)-(-[:-30,.4,,,white]\oplus)-[@{e2}])}
- !!\elmove{e1}{60:4mm}{e2}{0:4mm}!!
- }
- !!\marrow!!
- \reactant{
- \chemfig{*6(-(-[:90,.4,,,white]\oplus)-[@{e4}]=[@{e3}]-(-[:120]Br)(-[:60]H)-=)}
- \elmove{e3}{180:4mm}{e4}{150:4mm}
- }
- \marrow
- \reactant{
- \chemfig{*6(-=-(-[:-150,.4,,,white]\oplus)-(-[:120]Br)(-[:60]H)-=)}
- }
- !!}!!
-\end{lstlisting}
-\begin{rxn}[,.8]
- \setatomsep{1.6em}
- \mesomeric{
- \reactant{
- \chemfig{*6(=[@{e1}]-=-(-[:120]Br)(-[:60]H)-(-[:-30,.4,,,white]\oplus)-[@{e2}])}
- \elmove{e1}{60:4mm}{e2}{0:4mm}
- }
- \marrow
- \reactant{
- \chemfig{*6(-(-[:90,.4,,,white]\oplus)-[@{e4}]=[@{e3}]-(-[:120]Br)(-[:60]H)-=)}
- \elmove{e3}{180:4mm}{e4}{150:4mm}
- }
- \marrow
- \reactant{
- \chemfig{*6(-=-(-[:-150,.4,,,white]\oplus)-(-[:120]Br)(-[:60]H)-=)}
- }
- }
-\end{rxn}
-When we write the code \emph{inside} of the branch\index{branch}, directly after the arrow, we get the following:
-\begin{rxn}[,.8]
- \setatomsep{1.6em}
- \reactant[,start]{
- \chemname{\chemfig{*6(-=-=(-[,,,,white]\phantom{Br})-=)}}{benzene \compound{benzene}}
- }
- \branch[below=of start]{
- \arrow[below,,,,both]{\ce{Br2 / AlBr3}}{$-\ce{AlBr4\om}$}
- \mesomeric{
- \reactant{
- \chemfig{*6(=[@{e1}]-=-(-[:120]Br)(-[:60]H)-(-[:-30,.4,,,white]\oplus)-[@{e2}])}
- \elmove{e1}{60:4mm}{e2}{0:4mm}
- }
- \marrow
- \reactant{
- \chemfig{*6(-(-[:90,.4,,,white]\oplus)-[@{e4}]=[@{e3}]-(-[:120]Br)(-[:60]H)-=)}
- \elmove{e3}{180:4mm}{e4}{150:4mm}
- }
- \marrow
- \reactant{
- \chemfig{*6(-=-(-[:-150,.4,,,white]\oplus)-(-[:120]Br)(-[:60]H)-=)}
- }
- }
- }
- \arrow{}{}
- \reactant{
- \chemname{\chemfig{*6(-=-=(-Br)-=)}}{bromobenzene \compound{bromobenzene}}
- }
- \end{rxn}
-This obviously messes everything up. We can try this, though:
-\begin{lstlisting}
- \begin{rxn}[,.8]
- \setatomsep{1.6em}
- \reactant[,start]{
- \chemname{\chemfig{*6(-=-=(-[,,,,white]\phantom{Br})-=)}}{benzene \compound{benzene}}
- }
- \branch[below=of start]{
- \arrow[below,,,,both]{\ce{Br2 / AlBr3}}{$-\ce{AlBr4\om}$}
- \mesomeric!![below]!!{
- \reactant{
- \chemfig{*6(=[@{e1}]-=-(-[:120]Br)(-[:60]H)-(-[:-30,.4,,,white]\oplus)-[@{e2}])}
- \elmove{e1}{60:4mm}{e2}{0:4mm}
- }
- \marrow
- \reactant{
- \chemfig{*6(-(-[:90,.4,,,white]\oplus)-[@{e4}]=[@{e3}]-(-[:120]Br)(-[:60]H)-=)}
- \elmove{e3}{180:4mm}{e4}{150:4mm}
- }
- \marrow
- \reactant{
- \chemfig{*6(-=-(-[:-150,.4,,,white]\oplus)-(-[:120]Br)(-[:60]H)-=)}
- }
- }
- }
- \arrow{}{}
- \reactant{
- \chemname{\chemfig{*6(-=-=(-Br)-=)}}{bromobenzene \compound{bromobenzene}}
- }
- \end{rxn}
-\end{lstlisting}
-The result is better:
- \begin{rxn}[,.8]
- \setatomsep{1.6em}
- \reactant[,start]{
- \chemname{\chemfig{*6(-=-=(-[,,,,white]\phantom{Br})-=)}}{benzene \compound{benzene}}
- }
- \branch[below=of start]{
- \arrow[below,,,,both]{\ce{Br2 / AlBr3}}{$-\ce{AlBr4\om}$}
- \mesomeric[below]{
- \reactant{
- \chemfig{*6(=[@{e1}]-=-(-[:120]Br)(-[:60]H)-(-[:-30,.4,,,white]\oplus)-[@{e2}])}
- \elmove{e1}{60:4mm}{e2}{0:4mm}
- }
- \marrow
- \reactant{
- \chemfig{*6(-(-[:90,.4,,,white]\oplus)-[@{e4}]=[@{e3}]-(-[:120]Br)(-[:60]H)-=)}
- \elmove{e3}{180:4mm}{e4}{150:4mm}
- }
- \marrow
- \reactant{
- \chemfig{*6(-=-(-[:-150,.4,,,white]\oplus)-(-[:120]Br)(-[:60]H)-=)}
- }
- }
- }
- \arrow{}{}
- \reactant{
- \chemname{\chemfig{*6(-=-=(-Br)-=)}}{bromobenzene \compound{bromobenzene}}
- }
- \end{rxn}
-It isn't really what we want, though, because the intermediate is centered below the arrow. In order to be able to shift the whole thing, we place it into a branch\index{branch} of its own.
-\begin{lstlisting}[firstnumber=4]
- ...
- \branch[below=of start]{
- \arrow[below,,,!!arrow_a!!,both]{\ce{Br2 / AlBr3}}{$-\ce{AlBr4\om}$}
- }
- !!\branch[below=of arrow_a]{!!
- \mesomeric{
- \reactant{
- \chemfig{*6(=[@{e1}]-=-(-[:120]Br)(-[:60]H)-(-[:-30,.4,,,white]\oplus)-[@{e2}])}
- \elmove{e1}{60:4mm}{e2}{0:4mm}
- }
- \marrow
- \reactant{
- \chemfig{*6(-(-[:90,.4,,,white]\oplus)-[@{e4}]=[@{e3}]-(-[:120]Br)(-[:60]H)-=)}
- \elmove{e3}{180:4mm}{e4}{150:4mm}
- }
- \marrow
- \reactant{
- \chemfig{*6(-=-(-[:-150,.4,,,white]\oplus)-(-[:120]Br)(-[:60]H)-=)}
- }
- }
- !!}!!
- ...
-\end{lstlisting}
-\begin{rxn}[,.8]
- \setatomsep{1.6em}
- \reactant[,start]{\chemname{\chemfig{*6(-=-=(-[,,,,white]\phantom{Br})-=)}}{benzene \compound{benzene}} }
- \branch[below=of start]{
- \arrow[below,,,arrow_a,both]{\ce{Br2 / AlBr3}}{$-\ce{AlBr4\om}$}
- }
- \branch[below=of arrow_a]{
- \mesomeric[,mesomerism]{
- \reactant{
- \chemfig{*6(=[@{e1}]-=-(-[:120]Br)(-[:60]H)-(-[:-30,.4,,,white]\oplus)-[@{e2}])}
- \elmove{e1}{60:4mm}{e2}{0:4mm}
- }
- \marrow
- \reactant{
- \chemfig{*6(-(-[:90,.4,,,white]\oplus)-[@{e4}]=[@{e3}]-(-[:120]Br)(-[:60]H)-=)}
- \elmove{e3}{180:4mm}{e4}{150:4mm}
- }
- \marrow
- \reactant{
- \chemfig{*6(-=-(-[:-150,.4,,,white]\oplus)-(-[:120]Br)(-[:60]H)-=)}
- }
- }
- }
- \arrow{}{}
- \reactant{ \chemname{\chemfig{*6(-=-=(-Br)-=)}}{bromobenzene \compound{bromobenzene}} }
-\end{rxn}
-In first sight this isn't better. But by shifting the branch with \lstinline+xshift+\index{xshift}, we get what we want:
-\begin{lstlisting}[firstnumber=4]
- ...
- \branch[below=of start]{
- \arrow[below,,,arrow_a,both]{\ce{Br2 / AlBr3}}{$-\ce{AlBr4\om}$}
- }
- \branch[below=of arrow_a,,!!xshift=8.5em!!]{
- \mesomeric{
- \reactant{
- \chemfig{*6(=[@{e1}]-=-(-[:120]Br)(-[:60]H)-(-[:-30,.4,,,white]\oplus)-[@{e2}])}
- \elmove{e1}{60:4mm}{e2}{0:4mm}
- }
- \marrow
- \reactant{
- \chemfig{*6(-(-[:90,.4,,,white]\oplus)-[@{e4}]=[@{e3}]-(-[:120]Br)(-[:60]H)-=)}
- \elmove{e3}{180:4mm}{e4}{150:4mm}
- }
- \marrow
- \reactant{
- \chemfig{*6(-=-(-[:-150,.4,,,white]\oplus)-(-[:120]Br)(-[:60]H)-=)}
- }
- }
- }
- ...
-\end{lstlisting}
-\begin{rxn}[,.8]
- \setatomsep{1.6em}
- \reactant[,start]{\chemname{\chemfig{*6(-=-=(-[,,,,white]\phantom{Br})-=)}}{benzene \compound{benzene}} }
- \branch[below=of start]{
- \arrow[below,,,arrow_a,both]{\ce{Br2 / AlBr3}}{$-\ce{AlBr4\om}$}
- }
- \branch[below=of arrow_a,mesomerism,xshift=8.5em]{
- \mesomeric{
- \reactant{
- \chemfig{*6(=[@{e1}]-=-(-[:120]Br)(-[:60]H)-(-[:-30,.4,,,white]\oplus)-[@{e2}])}
- \elmove{e1}{60:4mm}{e2}{0:4mm}
- }
- \marrow
- \reactant{
- \chemfig{*6(-(-[:90,.4,,,white]\oplus)-[@{e4}]=[@{e3}]-(-[:120]Br)(-[:60]H)-=)}
- \elmove{e3}{180:4mm}{e4}{150:4mm}
- }
- \marrow
- \reactant{
- \chemfig{*6(-=-(-[:-150,.4,,,white]\oplus)-(-[:120]Br)(-[:60]H)-=)}
- }
- }
- }
- \arrow{}{}
- \reactant{ \chemname{\chemfig{*6(-=-=(-Br)-=)}}{bromobenzene \compound{bromobenzene}} }
-\end{rxn}
-The last arrow is also placed in its own branch, so we can shift it where we want.
-\begin{lstlisting}[firstnumber=4]
- ...
- \branch[below=of start]{
- \arrow[below,,,!!arrow_a!!,both]{\ce{Br2 / AlBr3}}{$-\ce{AlBr4\om}$}
- }
- \branch[below=of arrow_a,!!mesomerism!!,xshift=8.5em]{
- \mesomeric{
- \reactant{
- \chemfig{*6(=[@{e1}]-=-(-[:120]Br)(-[:60]H)-(-[:-30,.4,,,white]\oplus)-[@{e2}])}
- \elmove{e1}{60:4mm}{e2}{0:4mm}
- }
- \marrow
- \reactant{
- \chemfig{*6(-(-[:90,.4,,,white]\oplus)-[@{e4}]=[@{e3}]-(-[:120]Br)(-[:60]H)-=)}
- \elmove{e3}{180:4mm}{e4}{150:4mm}
- }
- \marrow
- \reactant{
- \chemfig{*6(-=-(-[:-150,.4,,,white]\oplus)-(-[:120]Br)(-[:60]H)-=)}
- }
- }
- }
- \branch[!!above=of mesomerism,,xshift=7.25em!!]{
- \arrow[above]{$-\Hpl$}{}
- }
- ...
-\end{lstlisting}
-\begin{rxn}[,.8]
- \setatomsep{1.6em}
- \reactant[,start]{\chemname{\chemfig{*6(-=-=(-[,,,,white]\phantom{Br})-=)}}{benzene \compound{benzene}} }
- \branch[below=of start]{
- \arrow[below,,,arrow_a,both]{\ce{Br2 / AlBr3}}{$-\ce{AlBr4\om}$}
- }
- \branch[below=of arrow_a,mesomerism,xshift=8.5em]{
- \mesomeric{
- \reactant{
- \chemfig{*6(=[@{e1}]-=-(-[:120]Br)(-[:60]H)-(-[:-30,.4,,,white]\oplus)-[@{e2}])}
- \elmove{e1}{60:4mm}{e2}{0:4mm}
- }
- \marrow
- \reactant{
- \chemfig{*6(-(-[:90,.4,,,white]\oplus)-[@{e4}]=[@{e3}]-(-[:120]Br)(-[:60]H)-=)}
- \elmove{e3}{180:4mm}{e4}{150:4mm}
- }
- \marrow
- \reactant{
- \chemfig{*6(-=-(-[:-150,.4,,,white]\oplus)-(-[:120]Br)(-[:60]H)-=)}
- }
- }
- }
- \branch[above=of mesomerism,,xshift=7.25em]{
- \arrow[above]{$-\Hpl$}{}
- }
- \arrow{}{}
- \reactant{ \chemname{\chemfig{*6(-=-=(-Br)-=)}}{bromobenzene \compound{bromobenzene}} }
-\end{rxn}
-Now we're almost there: the arrow of the main reaction still is too short. The complete code:
-\begin{lstlisting}
- \begin{rxnscheme}[,,,.8]{electrophilic substitution}
- \setatomsep{1.6em}
- \reactant[,start]{\chemname{\chemfig{*6(-=-=(-[,,,,white]\phantom{Br})-=)}}{benzene \compound{benzene}} }
-
- \branch[below=of start]{
- \arrow[below,,,arrow_a,both]{\ce{Br2 / AlBr3}}{$-\ce{AlBr4\om}$}
- }
- \branch[below=of arrow_a,mesomerism,xshift=8.5em]{
- \mesomeric{
- \reactant{
- \chemfig{*6(=[@{e1}]-=-(-[:120]Br)(-[:60]H)-(-[:-30,.4,,,white]\oplus)-[@{e2}])}
- \elmove{e1}{60:4mm}{e2}{0:4mm}
- }
- \marrow
- \reactant{
- \chemfig{*6(-(-[:90,.4,,,white]\oplus)-[@{e4}]=[@{e3}]-(-[:120]Br)(-[:60]H)-=)}
- \elmove{e3}{180:4mm}{e4}{150:4mm}
- }
- \marrow
- \reactant{
- \chemfig{*6(-=-(-[:-150,.4,,,white]\oplus)-(-[:120]Br)(-[:60]H)-=)}
- }
- }
- }
- \branch[above=of mesomerism,,xshift=7.25em]{
- \arrow[above]{$-\Hpl$}{}
- }
-
- \arrow[,,!!2.6!!]{}{}
- \reactant{ \chemname{\chemfig{*6(-=-=(-Br)-=)}}{bromobenzene \compound{bromobenzene}} }
- \end{rxnscheme}
-\end{lstlisting}
-
-\newpage
-\subsection{Hydratisation}\label{ssec:hydratisation}
-\pgfdeclaredecoration{ddbond}{initial}{%
- \state{initial}[width=2pt]{%
- \pgfpathlineto{\pgfpoint{2pt}{0pt}}%
- \pgfpathmoveto{\pgfpoint{1.5pt}{2pt}}%
- \pgfpathlineto{\pgfpoint{2pt}{2pt}}%
- \pgfpathmoveto{\pgfpoint{2pt}{0pt}}%
- }%
- \state{final}{%
- \pgfpathlineto{\pgfpointdecoratedpathlast}%
- }%
-}%
-\tikzset{lddbond/.style={decorate,decoration=ddbond}}%
-\tikzset{rddbond/.style={decorate,decoration={ddbond,mirror}}}%
-\newcommand*\delm{\ensuremath{\text{\tiny$\delta\ominus$}}}%
-\newcommand*\delp{\ensuremath{\text{\tiny$\delta\oplus$}}}%
-A scheme with transition\index{transition} states.
-
-\begin{rxnscheme}[rs:hydratisation,htp]{Hydratisation}
- \reactant[,carbonyl_A]{\chemfig{R_2C=O}}
- \anywhere{above=of carbonyl_A}{\chemfig{H-[:-30]O-[:30]H}}
- \arrow[,<=>]{\tiny slow}{}
- \transition[,transition_A]{\chemfig{R_2C(-[2,,2,,densely dotted]\chemabove{O}{\delp}(-[:150]H)-[:30]H)-[:-30,1.15,,,lddbond]O-[6,,,,densely dotted]H-[,,,,densely dotted]\chemabove{A}{\delm}}}
- \anywhere{below=of transition_A,text width=3cm}{(general transition state, acid cat.)}
- \arrow[,<=>,.5]{}{}
- \reactant{\chemfig{R_2C(-[:60]\chemabove{O}{\scriptstyle\oplus}H_2)-[:-60]OH}}
- \arrow[below right,<=>,.5]{$-\Hpl$}{}
- \reactant[below right]{\chemfig{R_2C(-[:60]OH)-[:-60]OH}}
- \arrow[below left,<=>,.5]{\ce{H2O}}{}
- \reactant[below left,zw]{\chemfig{R_2C(-[:60]OH)-[:-60]O|\om}}
- \arrow[left,<=>,.5]{}{}
- \transition[left,transition_B]{\chemfig{R_2C(-[2,,2,,densely dotted]O(-[:150]H-[4,,,,densely dotted]\chemabove{B}{\delp})-[:30]H)-[:-30,1.15,,,lddbond]\chemabove{O}{\delm}-[6,,,,draw=none]\phantom{H}}}
- \anywhere{below=of transition_B,text width=3cm}{(general transition state, base cat.)}
- \arrow[left,<=>]{\tiny slow}{}
- \reactant[left,carbonyl_B]{\chemfig{R_2C=O}}
- \anywhere{above=of carbonyl_B}{\chemfig{H-[:-30]O-[:30]H}}
-\end{rxnscheme}
-
-For this example we first declare a style for the delocalized double bonds:\index{tikz@\TikZ}
-\begin{lstlisting}
- \pgfdeclaredecoration{ddbond}{initial}{%
- \state{initial}[width=2pt]{%
- \pgfpathlineto{\pgfpoint{2pt}{0pt}}%
- \pgfpathmoveto{\pgfpoint{1.5pt}{2pt}}%
- \pgfpathlineto{\pgfpoint{2pt}{2pt}}%
- \pgfpathmoveto{\pgfpoint{2pt}{0pt}}%
- }%
- \state{final}{%
- \pgfpathlineto{\pgfpointdecoratedpathlast}%
- }%
- }%
- \tikzset{lddbond/.style={decorate,decoration=ddbond}}%
- \tikzset{rddbond/.style={decorate,decoration={ddbond,mirror}}}%
-\end{lstlisting}
-Now the delocalized double bond can be used via \CF's fifth option (see the \CF manual):
-\begin{SideBySideExample}
- \chemfig{-[,,,,lddbond]-[,,,,rddbond]}
-\end{SideBySideExample}
-Further we define the two commands
-\begin{lstlisting}
- \newcommand*\delm{\ensuremath{\text{\tiny$\delta\ominus$}}}%
- \newcommand*\delp{\ensuremath{\text{\tiny$\delta\oplus$}}}%
-\end{lstlisting}
-to use the partial charges without effort.
-
-Then the whole code looks like follows:\index{anywhere}
-\begin{lstlisting}
- \begin{rxnscheme}[rs:hydratisation,htp]{Hydratisation}
- \reactant[,carbonyl_A]{\chemfig{R_2C=O}}
- \anywhere{above=of carbonyl_A}{\chemfig{H-[:-30]O-[:30]H}}
- \arrow[,<=>]{\tiny slow}{}
- \transition[,transition_A]{\chemfig{R_2C(-[2,,2,,densely dotted]\chemabove{O}{\delp}(-[:150]H)-[:30]H)-[:-30,1.15,,,lddbond]O-[6,,,,densely dotted]H-[,,,,densely dotted]\chemabove{A}{\delm}}}
- \anywhere{below=of transition_A,text width=3cm}{(general transition state, acid cat.)}
- \arrow[,<=>,.5]{}{}
- \reactant{\chemfig{R_2C(-[:60]\chemabove{O}{\scriptstyle\oplus}H_2)-[:-60]OH}}
- \arrow[below right,<=>,.5]{$-\Hpl$}{}
- \reactant[below right]{\chemfig{R_2C(-[:60]OH)-[:-60]OH}}
- \arrow[below left,<=>,.5]{\ce{H2O}}{}
- \reactant[below left,zw]{\chemfig{R_2C(-[:60]OH)-[:-60]O|\om}}
- \arrow[left,<=>,.5]{}{}
- \transition[left,transition_B]{\chemfig{R_2C(-[2,,2,,densely dotted]O(-[:150]H-[4,,,,densely dotted]\chemabove{B}{\delp})-[:30]H)-[:-30,1.15,,,lddbond]\chemabove{O}{\delm}-[6,,,,draw=none]\phantom{H}}}
- \anywhere{below=of transition_B,text width=3cm}{(general transition state, base cat.)}
- \arrow[left,<=>]{\tiny langsam}{}
- \reactant[left,carbonyl_B]{\chemfig{R_2C=O}}
- \anywhere{above=of carbonyl_B}{\chemfig{H-[:-30]O-[:30]H}}
- \end{rxnscheme}
-\end{lstlisting}
-
-\subsection{Esterification}\label{ssec:veresterung}
-\begin{rxn}
- \reactant{\chemfig{H-C(=[:60]O)-[:-60]O-H}}
- \arrow[,-+>,1.2,protolysis]{\ce{H2SO4}}{\ce{HSO4\om}}
- \anywhere{below=of protolysis,yshift=1em}{\tiny protolysis}
- \mesomeric{
- \reactant{\chemfig{H-@{a2}C(-[:60]O-H)(-[:30,.5,,,draw=none]{\scriptstyle\oplus})-[:-60]O-H}}
- \marrow
- \reactant{\chemfig{H-C(=[:60]\chemabove{O}{\scriptstyle\oplus}-H)-[:-60]O-H}}
- }
- \branch[on chain=going below,,xshift=-5em]{
- \arrow[below,<=>]{\tiny addition}{\chemfig{H-[:120]@{a1}O-[:60]CH_3}}
- \reactant[below]{\chemfig{H-C(-[2]O-[:30]H)(-\chemabove{O}{\scriptstyle\oplus}(-[:60]CH_3)-[:-60]H)-[6]O-[:-30]H}}
- }
- \elmove{a1}{90:1.5cm}{a2}{0:3cm}
- \branch[on chain=going left,,yshift=-3.5em]{
- \arrow[left,<=>]{}{\tiny protolysis}
- }
- \reactant[left]{\chemfig{H-C(-[2]O-[:30]H)(-O-CH_3)-[@{b1}6]@{a3}\chemabove{O}{\hspace*{-4mm}\scriptstyle\oplus}(-[:-150]H)-[:-30]H}}
- \elmove{b1}{0:5mm}{a3}{20:5mm}
- \arrow[below,<=>]{\ce{- H2O}}{\tiny elimination}
- \mesomeric[below,,xshift=6em]{
- \reactant{\chemfig{H-C(-[:60]O-H)(-[,.5,,,draw=none]{\scriptstyle\oplus})-[:-60]O-CH_3}}
- \marrow
- \reactant{\chemfig{H-C(=[:60]\chemabove{O}{\scriptstyle\oplus}-H)-[:-60]O-CH_3}}
- }
- \arrow[,-+>,1.2]{\ce{HSO4\om}}{\ce{H2SO4}}
- \reactant{\chemfig{H-C(=[:60]O)-[:-60]O-CH_3}}
-\end{rxn}
-\begin{lstlisting}
- \begin{rxn}
- \reactant{\chemfig{H-C(=[:60]O)-[:-60]O-H}}
- \arrow[,-+>,1.2,protolysis]{\ce{H2SO4}}{\ce{HSO4\om}}
- \anywhere{below=of protolysis,yshift=1em}{\tiny protolysis}
- \mesomeric{
- \reactant{\chemfig{H-@{a2}C(-[:60]O-H)(-[:30,.5,,,draw=none]{\scriptstyle\oplus})-[:-60]O-H}}
- \marrow
- \reactant{\chemfig{H-C(=[:60]\chemabove{O}{\scriptstyle\oplus}-H)-[:-60]O-H}}
- }
- \branch[on chain=going below,,xshift=-5em]{
- \arrow[below,<=>]{\tiny addition}{\chemfig{H-[:120]@{a1}O-[:60]CH_3}}
- \reactant[below]{\chemfig{H-C(-[2]O-[:30]H)(-\chemabove{O}{\scriptstyle\oplus}(-[:60]CH_3)-[:-60]H)-[6]O-[:-30]H}}
- }
- \elmove{a1}{90:1.5cm}{a2}{0:3cm}
- \branch[on chain=going left,,yshift=-3.5em]{
- \arrow[left,<=>]{}{\tiny protolysis}
- }
- \reactant[left]{\chemfig{H-C(-[2]O-[:30]H)(-O-CH_3)-[@{b1}6]@{a3}\chemabove{O}{\hspace*{-4mm}\scriptstyle\oplus}(-[:-150]H)-[:-30]H}}
- \elmove{b1}{0:5mm}{a3}{20:5mm}
- \arrow[below,<=>]{\ce{- H2O}}{\tiny elimination}
- \mesomeric[below,,xshift=6em]{
- \reactant{\chemfig{H-C(-[:60]O-H)(-[,.5,,,draw=none]{\scriptstyle\oplus})-[:-60]O-CH_3}}
- \marrow
- \reactant{\chemfig{H-C(=[:60]\chemabove{O}{\scriptstyle\oplus}-H)-[:-60]O-CH_3}}
- }
- \arrow[,-+>,1.2]{\ce{HSO4\om}}{\ce{H2SO4}}
- \reactant{\chemfig{H-C(=[:60]O)-[:-60]O-CH_3}}
- \end{rxn}
-\end{lstlisting}
-
-\subsection[Extensive Synthesis]{Creating an extensive synthesis using \mC and \CF}\label{ssec:tikzsynthese}
-As last example we can create extensive syntheses, using the \lstinline=\merge=\index{merge} command.
-\begin{rxnscheme}[rs:synthese,htp,,.8]{synthesis of chrysanthemum acid}
- \setatomsep{1.5em}
- \branch[,start_left]{
- \reactant{\chemfig{=_[::30]-[::-60]-[::60](-[::-60])(-[::120])-[::0]OH}}
- \arrow[below]{\ce{HBr}}{}
- \reactant[below]{\chemfig{Br-[::30]-[::-60]=_[::60](-[::-60])-[::60]}}
- }
- \branch[right=of start_left,start_center,yshift=1em]{
- \reactant{\chemname{\chemfig[][scale=.8]{**6(--(-SO_2Cl)---(-)-)}}{tosyle chloride}}
- \arrow[below]{\ce{NaOH}}{\ce{Zn}}
- \reactant[below]{\chemfig[][scale=.8]{**6(--(-SO_2Na)---(-)-)}}
- }
- \branch[right=of start_center,start_right,xshift=3em,yshift=-10em]{
- \reactant{\chemname{\chemfig{-[::30](-[::60])=_[::-60]-[::60]COOH}}{3-methyl-2-butenoic acid}}
- \arrow[below]{\ce{CH3OH}}{}
- \reactant[below]{\chemfig{-[::30](-[::60])=_[::-60]-[::60]CO_2CH_3}}
- }
- \branch[below=of start_left,target_one,xshift=5em,yshift=-5em]{
- \reactant{\chemfig[][scale=.8]{**6(--(-SO_2-[:30]-[::-60]=_[::60](-[::60])-[::-60])---(-)-)}}
- }
- \branch[below=of target_one,target_two,xshift=6em,yshift=-6em]{
- \mesomeric{\chemfig[][scale=.8]{-[::30](-[::60])=^[::-60]-[::60](-[::60]S(=[::90]O)(=[::-90]O)-[::0]**6(---(-)---))-[::-60](-[::0])(-[::-120])-[::60](-[::60,.5,,,white]\ominus)-[::-60]CO_2CH_3}}
- \arrow[below,,.5]{}{}
- \arrow[below,,.5]{\ce{KOH}}{}
- \reactant[below]{\chemname{\chemfig{-[::-30](-[::-60])=^[::60]>[::-60](-[::90,1.2])-[::30,1.2](-[::120,1.2](-[::-60])-[::0])<:[::-30]COOH}}{\emph{trans}-chrysanthemum acid}}
- }
- \merge{target_one}{start_left}{start_center}
- \merge[\ce{NaOCH3}]{target_two}{target_one}{start_right}
-\end{rxnscheme}
-\begin{lstlisting}
- \begin{rxnscheme}[,htp,,.8]{synthesis of chrysanthemum acid}
- \setatomsep{1.5em}
- \branch[,start_left]{
- \reactant{\chemfig{=_[::30]-[::-60]-[::60](-[::-60])(-[::120])-[::0]OH}}
- \arrow[below]{\ce{HBr}}{}
- \reactant[below]{\chemfig{Br-[::30]-[::-60]=_[::60](-[::-60])-[::60]}}
- }
- \branch[right=of start_left,start_center,yshift=1em]{
- \reactant{\chemname{\chemfig[][scale=.8]{**6(--(-SO_2Cl)---(-)-)}}{tosyle chloride}}
- \arrow[below]{\ce{NaOH}}{\ce{Zn}}
- \reactant[below]{\chemfig[][scale=.8]{**6(--(-SO_2Na)---(-)-)}}
- }
- \branch[right=of start_center,start_right,xshift=3em,yshift=-10em]{
- \reactant{\chemname{\chemfig{-[::30](-[::60])=_[::-60]-[::60]COOH}}{3-methyl-2-butenoic acid}}
- \arrow[below]{\ce{CH3OH}}{}
- \reactant[below]{\chemfig{-[::30](-[::60])=_[::-60]-[::60]CO_2CH_3}}
- }
- \branch[below=of start_left,target_one,xshift=5em,yshift=-5em]{
- \reactant{\chemfig[][scale=.8]{**6(--(-SO_2-[:30]-[::-60]=_[::60](-[::60])-[::-60])---(-)-)}}
- }
- \branch[below=of target_one,target_two,xshift=6em,yshift=-6em]{
- \mesomeric{\chemfig[][scale=.8]{-[::30](-[::60])=^[::-60]-[::60](-[::60]S(=[::90]O)(=[::-90]O)-[::0]**6(---(-)---))-[::-60](-[::0])(-[::-120])-[::60](-[::60,.5,,,white]\ominus)-[::-60]CO_2CH_3}}
- \arrow[below,,.5]{}{}
- \arrow[below,,.5]{\ce{KOH}}{}
- \reactant[below]{\chemname{\chemfig{-[::-30](-[::-60])=^[::60]>[::-60](-[::90,1.2])-[::30,1.2](-[::120,1.2](-[::-60])-[::0])<:[::-30]COOH}}{\emph{trans}-chrysanthemum acid}}
- }
- \merge{target_one}{start_left}{start_center}
- \merge[\ce{NaOCH3}]{target_two}{target_one}{start_right}
- \end{rxnscheme}
-\end{lstlisting}
-Let's go through the code, piece by piece.
-\begin{lstlisting}
- \begin{rxnscheme}[,htp,,.8]{synthesis of chrysanthemum acid}
- \setatomsep{1.5em}
- \branch[,start_left]{
- \reactant{\chemfig{=_[::30]-[::-60]-[::60](-[::-60])(-[::120])-[::0]OH}}
- \arrow[below]{\ce{HBr}}{}
- \reactant[below]{\chemfig{Br-[::30]-[::-60]=_[::60](-[::-60])-[::60]}}
- }
-\end{lstlisting}
-In lines 1 and 2 we begin the environment and make sure, that the formul\ae\ don't become to big. In lines 3 -- 7 the first two reactants are written (lines 4 and 6) and connected with an arrow (line 5).
-\begin{rxn}[,.8]
- \setatomsep{1.5em}
- \branch[,start_left]{
- \reactant{\chemfig{=_[::30]-[::-60]-[::60](-[::-60])(-[::120])-[::0]OH}}
- \arrow[below]{\ce{HBr}}{}
- \reactant[below]{\chemfig{Br-[::30]-[::-60]=_[::60](-[::-60])-[::60]}}
- }
-\end{rxn}
-\begin{lstlisting}[firstnumber=8]
- \branch[right=of start_left,start_center,yshift=1em]{
- \reactant{\chemname{\chemfig[][scale=.8]{**6(--(-SO_2Cl)---(-)-)}}{tosyle chloride}}
- \arrow[below]{\ce{NaOH}}{\ce{Zn}}
- \reactant[below]{\chemfig[][scale=.8]{**6(--(-SO_2Na)---(-)-)}}
- }
-\end{lstlisting}
-In the following lines 8 -- 12, we create the second branch of the synthesis.
-\begin{rxn}[,.8]
- \setatomsep{1.5em}
- \branch[,start_left]{
- \reactant{\chemfig{=_[::30]-[::-60]-[::60](-[::-60])(-[::120])-[::0]OH}}
- \arrow[below]{\ce{HBr}}{}
- \reactant[below]{\chemfig{Br-[::30]-[::-60]=_[::60](-[::-60])-[::60]}}
- }
- \branch[right=of start_left,start_center,yshift=1em]{
- \reactant{\chemname{\chemfig[][scale=.8]{**6(--(-SO_2Cl)---(-)-)}}{tosyle chloride}}
- \arrow[below]{\ce{NaOH}}{\ce{Zn}}
- \reactant[below]{\chemfig[][scale=.8]{**6(--(-SO_2Na)---(-)-)}}
- }
-\end{rxn}
-\begin{lstlisting}[firstnumber=13]
- \branch[right=of start_center,start_right,xshift=3em,yshift=-10em]{
- \reactant{\chemname{\chemfig{-[::30](-[::60])=_[::-60]-[::60]COOH}}{3-methyl-2-butenoic acid}}
- \arrow[below]{\ce{CH3OH}}{}
- \reactant[below]{\chemfig{-[::30](-[::60])=_[::-60]-[::60]CO_2CH_3}}
- }
- \branch[below=of start_left,target_one,xshift=5em,yshift=-5em]{
- \reactant{\chemfig[][scale=.8]{**6(--(-SO_2-[:30]-[::-60]=_[::60](-[::60])-[::-60])---(-)-)}}
- }
-\end{lstlisting}
-In lines 13 -- 20 we create the third branch and the product of the first two branches.
-\begin{rxn}[,.8]
- \setatomsep{1.5em}
- \branch[,start_left]{
- \reactant{\chemfig{=_[::30]-[::-60]-[::60](-[::-60])(-[::120])-[::0]OH}}
- \arrow[below]{\ce{HBr}}{}
- \reactant[below]{\chemfig{Br-[::30]-[::-60]=_[::60](-[::-60])-[::60]}}
- }
- \branch[right=of start_left,start_center,yshift=1em]{
- \reactant{\chemname{\chemfig[][scale=.8]{**6(--(-SO_2Cl)---(-)-)}}{tosyle chloride}}
- \arrow[below]{\ce{NaOH}}{\ce{Zn}}
- \reactant[below]{\chemfig[][scale=.8]{**6(--(-SO_2Na)---(-)-)}}
- }
- \branch[right=of start_center,start_right,xshift=3em,yshift=-10em]{
- \reactant{\chemname{\chemfig{-[::30](-[::60])=_[::-60]-[::60]COOH}}{3-methyl-2-butenoic acid}}
- \arrow[below]{\ce{CH3OH}}{}
- \reactant[below]{\chemfig{-[::30](-[::60])=_[::-60]-[::60]CO_2CH_3}}
- }
- \branch[below=of start_left,target_one,xshift=5em,yshift=-5em]{
- \reactant{\chemfig[][scale=.8]{**6(--(-SO_2-[:30]-[::-60]=_[::60](-[::60])-[::-60])---(-)-)}}
- }
-\end{rxn}
-\begin{lstlisting}[firstnumber=21]
- \branch[below=of target_one,target_two,xshift=6em,yshift=-6em]{
- \mesomeric{\chemfig[][scale=.8]{-[::30](-[::60])=^[::-60]-[::60](-[::60]S(=[::90]O)(=[::-90]O)-[::0]**6(---(-)---))-[::-60](-[::0])(-[::-120])-[::60](-[::60,.5,,,white]\ominus)-[::-60]CO_2CH_3}}
- \arrow[below,,.5]{}{}
- \arrow[below,,.5]{\ce{KOH}}{}
- \reactant[below]{\chemname{\chemfig{-[::-30](-[::-60])=^[::60]>[::-60](-[::90,1.2])-[::30,1.2](-[::120,1.2](-[::-60])-[::0])<:[::-30]COOH}}{\emph{trans}-chrysanthemum acid}}
- }
-\end{lstlisting}
-In lines 21 -- 26 we create the last branch.
-\begin{rxn}[,.8]
- \dummy[start_left]
- \branch[right=of start_left,start_right,xshift=13em,yshift=-4em]{
- \reactant[below]{\chemfig{-[::30](-[::60])=_[::-60]-[::60]CO_2CH_3}}
- }
- \branch[below=of start_left,target_one,xshift=5em]{
- \reactant{\chemfig[][scale=.8]{**6(--(-SO_2-[:30]-[::-60]=_[::60](-[::60])-[::-60])---(-)-)}}
- }
- \branch[below=of target_one,target_two,xshift=6em,yshift=-6em]{
- \mesomeric{\chemfig[][scale=.8]{-[::30](-[::60])=^[::-60]-[::60](-[::60]S(=[::90]O)(=[::-90]O)-[::0]**6(---(-)---))-[::-60](-[::0])(-[::-120])-[::60](-[::60,.5,,,white]\ominus)-[::-60]CO_2CH_3}}
- \arrow[below,,.5]{}{}
- \arrow[below,,.5]{\ce{KOH}}{}
- \reactant[below]{\chemname{\chemfig{-[::-30](-[::-60])=^[::60]>[::-60](-[::90,1.2])-[::30,1.2](-[::120,1.2](-[::-60])-[::0])<:[::-30]COOH}}{\emph{trans}-chrysanthemum acid}}
- }
-\end{rxn}
-Finally, the different branches are merged\index{merge}, the second merging arrow gets a label and the environment is ended.
-\begin{lstlisting}[firstnumber=27]
- \merge{target_one}{start_left}{start_center}
- \merge[\ce{NaOCH3}]{target_two}{target_one}{start_right}
- \end{rxnscheme}
-\end{lstlisting}
-
\section{Epilogue}
\mC is still very new. This means there are probably a number of bugs I haven't discovered yet. There also might be missing one or two features, that would be useful. Since I only can test and work on \mC in my spare time, I'd be very glad about \emph{every} kind of feedback. If you like \mC, why don't you help me improve it by telling me your experiences?