summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2011-04-17 00:44:16 +0000
committerKarl Berry <karl@freefriends.org>2011-04-17 00:44:16 +0000
commit267a9b3c9510955de4cafd61675964c21b89c493 (patch)
tree3c48b6a7b8ec612730bb79a0c5ec34b5263738f3
parent7edde448c95089b13dddb78516c93cadcabd7b43 (diff)
mychemistry 1.4 (16apr11)
git-svn-id: svn://tug.org/texlive/trunk@22097 c570f23f-e606-0410-a88d-b1316a301751
-rw-r--r--Master/texmf-dist/doc/latex/mychemistry/README12
-rw-r--r--Master/texmf-dist/doc/latex/mychemistry/mychemistry_de.pdfbin909168 -> 985138 bytes
-rw-r--r--Master/texmf-dist/doc/latex/mychemistry/mychemistry_de.tex1998
-rw-r--r--Master/texmf-dist/doc/latex/mychemistry/mychemistry_en.pdfbin887184 -> 962500 bytes
-rw-r--r--Master/texmf-dist/doc/latex/mychemistry/mychemistry_en.tex2012
-rw-r--r--Master/texmf-dist/tex/latex/mychemistry/mychemistry.sty730
6 files changed, 2731 insertions, 2021 deletions
diff --git a/Master/texmf-dist/doc/latex/mychemistry/README b/Master/texmf-dist/doc/latex/mychemistry/README
index f94cf1e73a6..16d1d9effe0 100644
--- a/Master/texmf-dist/doc/latex/mychemistry/README
+++ b/Master/texmf-dist/doc/latex/mychemistry/README
@@ -1,7 +1,7 @@
--------------------------------------------------------------------------
-the myChemistry package v1.3
+the myChemistry package v1.4
Creating reaction schemes with LaTeX and ChemFig
-2011/04/04
+2011/04/15
--------------------------------------------------------------------------
Clemens Niederberger
Web: http://www.niederberger-berlin.net/2011/02/latex-mychemistry/
@@ -35,12 +35,12 @@ The command \arrow[both]{}{} needs at least pgf version from 09/08/2010.
It will work with older versions, if you don't use the arrow option
`both'.
The file bondwidth.tex provides the command \setbondwidth{<width>}
-for ChemFig and is inluded with \input{bondwidth} after
+for ChemFig and is included with \input{bondwidth} after
\usepackage{chemfig} or \usepackage{mychemistry}.
If you used earlier versions of myChemistry before, please be aware
-that that the usage of some commands, e.g. \reactand, has changed.
-Your documents might not compile properly anymore unless the code
-is adjusted.
+that that the usage of some commands, e.g. \reactant, rxn, \arrow ...
+has changed. Your documents will probably not compile properly anymore
+unless the code is adjusted.
--------------------------------------------------------------------------
If you have any ideas, questions, suggestions or bugs to report, please
feel free to contact me.
diff --git a/Master/texmf-dist/doc/latex/mychemistry/mychemistry_de.pdf b/Master/texmf-dist/doc/latex/mychemistry/mychemistry_de.pdf
index d17960b50fc..2f4df923e5f 100644
--- a/Master/texmf-dist/doc/latex/mychemistry/mychemistry_de.pdf
+++ b/Master/texmf-dist/doc/latex/mychemistry/mychemistry_de.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/mychemistry/mychemistry_de.tex b/Master/texmf-dist/doc/latex/mychemistry/mychemistry_de.tex
index 9cc45d178b7..74c130f8581 100644
--- a/Master/texmf-dist/doc/latex/mychemistry/mychemistry_de.tex
+++ b/Master/texmf-dist/doc/latex/mychemistry/mychemistry_de.tex
@@ -4,7 +4,7 @@
% - Creating reaction schemes with LaTeX and ChemFig ---------------------------------- %
% ------------------------------------------------------------------------------------- %
% - Clemens Niederberger -------------------------------------------------------------- %
-% - 2011/04/04 ------------------------------------------------------------------------ %
+% - 2011/04/15 ------------------------------------------------------------------------ %
% ------------------------------------------------------------------------------------- %
% - http://www.niederberger-berlin.net/2011/02/latex-mychemistry/ --------------------- %
% - kontakt@niederberger-berlin.net --------------------------------------------------- %
@@ -30,17 +30,18 @@
% - mychemistry_en.tex and bondwidth.tex - %
% ------------------------------------------------------------------------------------- %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\documentclass[DIV10,titlepage]{scrartcl}
+\documentclass[DIV10,titlepage,toc=index]{scrartcl}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% - Pakete ---------------------------------------------------------------------------- %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\usepackage{etoolbox}
\usepackage{scrhack} % verbessert KOMAs Zusammenspiel mit floats
-\usepackage[ngerman]{babel} % Sprache
\usepackage{emerald} % chemfig-Schrift
\usepackage[utf8x]{inputenc} % Zeichenkodierung: Eingabe
\usepackage[T1]{fontenc} % Text-Ausgabe-Codierung
\usepackage{textcomp,mathcomp}
+\usepackage[makeindex]{splitidx} % Index; Kompilieren: makeindex -sl index.ist *.idx
+\usepackage[ngerman]{babel} % Sprache
\usepackage{xspace,paralist} % xspace und Listen
\usepackage{siunitx}
\DeclareSIUnit{\emlength}{em}
@@ -61,7 +62,7 @@
\usepackage{titletoc}
\titlecontents{section} [6.5pc] % SECTION-ANZEIGE
{\renewcommand\familydefault{ppl}\addvspace{2pc}\bfseries
- \color{MyDarkRed}\titlerule[2pt]\filright\normalcolor\nobreak} % davor
+ \color{MyDarkRed}\titlerule[2pt]\filright\normalcolor\nobreak} % davor
{\contentslabel
[\textsc{Abschnitt}\
\thecontentslabel]{6.5pc}} % nummerierter Eintrag
@@ -95,9 +96,10 @@
pdfkeywords={myChemistry},
pdfcreator={LaTeX}
}
-\usepackage[color=dunkelrot]{mychemistry} % myChemistry
- \def\thebeispiel{\arabic{beispiel}} % chemexec angepasst
+\usepackage[color=MyDarkRed]{mychemistry} % myChemistry
+ \def\thebeispiel{\arabic{beispiel}} % chemexec angepasst
\labelformat{beispiel}{Bei\-spiel #1}
+ \labelformat{rxnfloat}{Sche\-ma #1}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% - Listings anpassen ----------------------------------------------------------------- %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -105,7 +107,7 @@
\lstset{literate={ä}{{\"a}}1 {ö}{{\"o}}1 {ü}{{\"u}}1 {Ä}{{\"A}}1 {Ö}{{\"O}}1 {Ü}{{\"U}}1 {ß}{{\ss}}1}
\lstset{
language=[LaTeX]TeX,
- basicstyle={\ttfamily}, % Grundstil
+ basicstyle={\ttfamily}, % Grundstil
extendedchars=true,
numbers=left, % Zeilennummern
numberstyle=\tiny, % Größe des Zeilennummern
@@ -121,7 +123,7 @@
keywordstyle=[20]\color{blue},
morekeywords=[20]{rxn,rxnfloat,rxnscheme,tikzpicture},
texcsstyle=[30]\color{code},
- moretexcs=[30]{arrow,branch,chemand,chemfig,chemmove,chemname,chemrel,chemsign,ce,compound,declarecompound,draw,dummy,elmove,floatplacement,floatstyle,Hpl,Hyd,lewis,listof,makeinvisible,makevisible,marrow,mCsetup,merge,mesomeric,node,nu,om,op,ox,reactand,restylefloat,setarrowlength,setatomsep,setatomsize,setbondlength,setbondshape,setcrambond,setrcndist,setrxnalign,setschemealign,setschemename,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,setarrowlength,setarrowline,setatomsep,setatomsize,setbondlength,setbondshape,setbondwidth,setcrambond,setmergelength,setrcndist,setrxnalign,setschemealign,setschemename,si,SI,textcolor,transition},
fancyvrb=true
}
@@ -132,7 +134,7 @@
\pagestyle{scrheadings}
\setheadwidth{textwithmarginpar}
\automark{section}
-\ihead{\mC \mCversion}
+\ihead{\mC v\mCversion}
\ifoot{\small\color{gray}-~Seite~\thepage~-}
\cfoot{}
\ofoot{}
@@ -240,8 +242,7 @@
\newcommand{\CF}{{\ECFAugie ChemFig}\xspace} % ChemFig in der originalen Schrift
\newcommand{\zB}{\mbox{z.\,B.}\xspace}
\newcommand{\TikZ}{\mbox{Ti{\bfseries\itshape k}Z}\xspace}
-\newcommand\Vii[1][0pt]{\leavevmode\llap{\footnotesize\ECFTeenSpirit seit v1.2\kern\dimexpr20pt+#1\relax}}
-\newcommand\NEU[1][0pt]{\leavevmode\llap{\footnotesize\ECFTeenSpirit\color{red}Neu in \mCversion\kern\dimexpr20pt+#1\relax}}
+\newcommand\NEU[1][0pt]{\leavevmode\llap{\footnotesize\ECFTeenSpirit\color{red}Neu\kern\dimexpr20pt+#1\relax}}
\newlength{\tmplength}
% - für Beispiele --------------------------------------------------------------------- %
\newcommand{\oben}{\tikz\node[draw,minimum width=3em,minimum height=1.5em,blue]{\footnotesize oben};}
@@ -252,38 +253,38 @@
\begin{titlepage}
% inspired by the titlepage of chemfig's documentation
\begin{tikzpicture}[remember picture,overlay]
- \shade[color=dunkelrot,right color=white](current page.south west) rectangle ([yshift=3cm,xshift=-3cm]current page.center);
- \shade[top color=black,bottom color=dunkelrot]([yshift=7cm]current page.east)rectangle([yshift=2.5cm]current page.west);
+ \shade[color=MyDarkRed,right color=white](current page.south west) rectangle ([yshift=3cm,xshift=-3cm]current page.center);
+ \shade[top color=black,bottom color=MyDarkRed]([yshift=7cm]current page.east)rectangle([yshift=2.5cm]current page.west);
\node[text width=\textwidth,opacity=.15,yshift=-5.3cm] at (current page.center) {%
\begin{verbatim}
- \begin{rxn}[scale=.7]
+ \begin{rxn}[,.7]
\setatomsep{1.5em}\footnotesize
- \reactand[,a]{
+ \reactant[,a]{
\chemfig{C(-[4]*6(=-=-=-))(-[2]*6(=-=-=-))(-[6,,,2]HO)-C(-[2]CH_3)
(-[6]OH)-CH_3}
}
- \branch[below right=of a]{
- \arrow[direction=above right,length=.7]{}{}
- \reactand[above right]{
+ \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}$}{}
- \reactand{
+ \reactant{
\chemfig{\chembelow{C}{\oplus}(-[4]*6(=-=-=-))(-[2]*6(=-=-=-))-C
(-[2]CH_3)(-[6]OH)-CH_3}
}
}
\branch[below right=of a]{
- \arrow[type={-|>},direction=below right,length=.7]{}{}
- \reactand[below right]{
+ \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}$}{}
- \reactand{
+ \reactant{
\chemfig{C(-[4]*6(=-=-=-))(-[2]*6(=-=-=-))(-[6,,,2]HO)-
\chembelow{C}{\oplus}(-[2]CH_3)-CH_3}
}
@@ -294,26 +295,26 @@
\end{tikzpicture}
\begin{center}
\scalebox{4}{\mC}\par
- \Large\mCversion\par\bigskip
+ \Large v\mCversion\par\bigskip
\footnotesize\mCdate{de}\par
\normalsize Clemens Niederberger\par\vskip1.5cm
\color{white}\huge Reaktionsschemata mit \LaTeX\ und \CF erstellen%
\end{center}
- \vskip4cm
- \begin{rxn}[scale=.7]
+ \vskip3cm
+ \begin{rxn}[,.7]
\setatomsep{1.5em}\footnotesize
- \reactand[,a]{ \chemfig{C(-[4]*6(=-=-=-))(-[2]*6(=-=-=-))(-[6,,,2]HO)-C(-[2]CH_3)(-[6]OH)-CH_3} }
+ \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[direction=above right,length=.7]{}{}
- \reactand[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[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}$}{}
- \reactand{ \chemfig{\chembelow{C}{\oplus}(-[4]*6(=-=-=-))(-[2]*6(=-=-=-))-C(-[2]CH_3)(-[6]OH)-CH_3} }
+ \reactant{ \chemfig{\chembelow{C}{\oplus}(-[4]*6(=-=-=-))(-[2]*6(=-=-=-))-C(-[2]CH_3)(-[6]OH)-CH_3} }
}
\branch[below right=of a]{
- \arrow[type={-|>},direction=below right,length=.7]{}{}
- \reactand[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[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}$}{}
- \reactand{ \chemfig{C(-[4]*6(=-=-=-))(-[2]*6(=-=-=-))(-[6,,,2]HO)-\chembelow{C}{\oplus}(-[2]CH_3)-CH_3} }
+ \reactant{ \chemfig{C(-[4]*6(=-=-=-))(-[2]*6(=-=-=-))(-[6,,,2]HO)-\chembelow{C}{\oplus}(-[2]CH_3)-CH_3} }
}
\end{rxn}
\end{titlepage}
@@ -322,81 +323,93 @@
\section{Über}
\subsection{Änderungen}
-Neue Befehle oder Veränderungen wurden mit {\ECFTeenSpirit seit v} gefolgt von der Versionsnummer markiert, \zB {\ECFTeenSpirit seit v1.2}. Die neuesten Änderungen sind mit {\ECFTeenSpirit\color{red}Neu in \mCversion} gekennzeichnet.
+Die neuesten Änderungen sind mit {\ECFTeenSpirit\color{red}Neu} gekennzeichnet.
\subsubsection{Version 1.2}
-\Vii%
-Neben einigen Bugfixes gibt es in Version \mCversion\ ein paar Neuerungen. Insbesondere wurde das fehlerhafte Verhalten bei der Ausrichtung von Branches sowie das seltsame Verhalten von Pfeilbeschriftungen, wenn man die Pfeillänge änderte, korrigiert. \textbf{Diese Veränderung hat zur Folge, das \mC nun \TikZ oder vielmehr pgf in der Version 2.10 benötigt} (siehe \ref{ssec:voraussetzungen}).
+Neben einigen Bugfixes gibt es in Version v1.2 ein paar Neuerungen. Insbesondere wurde das fehlerhafte Verhalten bei der Ausrichtung von Branches sowie das seltsame Verhalten von Pfeilbeschriftungen, wenn man die Pfeillänge änderte, korrigiert. \textbf{Diese Veränderung hat zur Folge, das \mC nun \TikZ oder vielmehr pgf in der Version 2.10 benötigt} (siehe \ref{ssec:voraussetzungen}).
Während sich diese Neuerungen im Hintergrund abspielen, gibt es auch ein paar Neuerungen für die Bedienung. Zum Beispiel gibt es nun einige Paketoptionen, um die automatisch eingebundenen Pakete besser zu handhaben (\ref{ssec:paketoptionen}). Außerdem haben die Pfeile zwei neue Keys bekommen (siehe \ref{ssec:arrow}).
-Auch die Umgebungen haben nun ein paar Möglichkeiten mehr, den persönlichen Vortellungen angepasst zu werden (siehe \ref{sssec:rxn_optionen}, \ref{sssec:rxnscheme_optionen} und \ref{ssec:setrcndist}).
+Auch die Umgebungen haben nun ein paar Möglichkeiten mehr, den persönlichen Vorstellungen angepasst zu werden (siehe \ref{sssec:rxn_optionen}, \ref{sssec:rxnscheme_optionen} und \ref{ssec:setrcndist}).
Nicht zuletzt steht \mC ab v1.2 nun unter der LPPL Version 1.3 oder später.
\subsubsection{Version 1.3}
-\NEU%
-Die Befehle \lstinline+\branch+, \lstinline+\mesomeric+, \lstinline+\reactand+ und \lstinline+\transition+ können als optionales Argument neben der Ausrichtung auch \TikZ-Keys erhalten. Das zweite Argument ist nun ebenfalls als Option einzusetzen. Damit ist das erste optionale Argument immer noch die Ausrichtung, das zweite der Anker und in das dritte können beliebige \TikZ-Keys eingesetzt werden.
-\begin{Verbatim}
+Die Befehle \lstinline+\branch+, \lstinline+\mesomeric+, \lstinline+\reactant+ und \lstinline+\transition+ können als optionales Argument neben der Ausrichtung auch \TikZ-Keys erhalten. Das zweite Argument ist nun ebenfalls als Option einzusetzen. Damit ist das erste optionale Argument immer noch die Ausrichtung, das zweite der Anker und in das dritte können beliebige \TikZ-Keys eingesetzt werden.
+\begin{lstlisting}
\befehl[<ausrichtung>,<anker>,<tikz>]{}
-\end{Verbatim}
-Bis Version 1.2 musste die Ausrichtung explizit angegeben werden, auch wenn die Default\-einstellung verwendet werden sollte, falls man \TikZ-Keys verwenden wollte. Das ist seit \mCversion\ nicht mehr nötig.
-\begin{Verbatim}
+\end{lstlisting}
+Bis Version 1.2 musste die Ausrichtung explizit angegeben werden, auch wenn die Default-Einstellung verwendet werden sollte, falls man \TikZ-Keys verwenden wollte. Das ist seit v1.3 nicht mehr nötig.
+\begin{lstlisting}
% bisher:
- \reactand{\ce{Br2}}{}\arrow{$h\nu$}{}\reactand!![right,draw,inner sep=5pt]!!{\ce{2 \lewis{0.,Br}}}{}
+ \reactant{\ce{Br2}}{}\arrow{$h\nu$}{}\reactant!![right,draw,inner sep=5pt]!!{\ce{2 \lewis{0.,Br}}}{}
% jetzt:
- \reactand{\ce{Br2}}\arrow{$h\nu$}{}\reactand!![,,draw,inner sep=5pt]!!{\ce{2 \lewis{0.,Br}}}
-\end{Verbatim}
+ \reactant{\ce{Br2}}\arrow{$h\nu$}{}\reactant!![,,draw,inner sep=5pt]!!{\ce{2 \lewis{0.,Br}}}
+\end{lstlisting}
Die Voreinstellungsbefehle wurden umbenannt und der Befehl \lstinline+\mCsetup+ hinzugefügt, mit dem die Voreinstellungen mit einer Schnittstelle gehandhabt werden können. Siehe \ref{ssec:setarrowlength}, \ref{ssec:setatomsize}, \ref{ssec:setbondlength}, \ref{ssec:setbondshape} und \ref{ssec:mCsetup}.
-Es gibt den neuen Befehl \lstinline+chemand+, der ein $+$ erzeugt, siehe \ref{ssec:chemand}.
+Es gibt den neuen Befehl \lstinline+\chemand+, der ein $+$ erzeugt, siehe \ref{ssec:chemand}.
+
+Wenn man \CF v0.4 oder v0.4a verwendet, wird die Datei \lstinline+bondwidth.tex+ eingebunden, die den Befehl \lstinline+\setbondwidth{<dicke>}+ bereitstellt. Damit kann die Liniendicke der Bindungen von \CF-Formeln verändert werden.
+
+Und auch das ist vielleicht ganz angenehm: alle \mC-Befehle in den Listings der Dokumentation sind nun anklickbare Hyperlinks, die auf ihre Beschreibung in der Befehlsreferenz verweisen.
-Wenn man \CF v0.4 verwendet, bindet \mC die Datei \lstinline+bondwidth.tex+ ein, die den Befehl \lstinline+\setbondwidth{<dicke>}+ bereitstellt. Damit kann die Liniendicke der Bindungen von \CF-Formeln verändert werden.
+\subsubsection{Version \mCversion}
+\NEU%
+Der Befehl \lstinline+\merge+ wurde neu geschrieben, so dass der Pfeil auch beschriftet werden kann.
+
+Der eigentliche Zweck des Befehls \lstinline+\dummy+ ist obsolet geworden. Der Befehl existiert aber weiterhin.
+
+Bei den beiden Umgebungen \lstinline+rxn+ und \lstinline+rxnscheme+ hat sich die Verwendung der Optionen geändert, siehe \ref{sssec:rxn_optionen} und \ref{sssec:rxnscheme_optionen}.
-Und auch das ist vielleicht ganz angenehm: alle \mC-Befehle in den Listings sind nun anklickbare Hyperlinks, die auf ihre Beschreibung in der Befehlsreferenz verweisen.
+Die Keys von \lstinline+\arrow+ sind in Optionen verändert worden, um die Syntax des Befehls mit den anderen anzugleichen. Zudem gibt es einen neuen Pfeiltypen, siehe \ref{ssec:arrow}. Neu ist außerdem das Aussehen der Pfeile und eine Möglichkeit, die Liniendicke der Pfeile anzupassen, siehe \ref{ssec:setarrowline}.
+
+Es gibt einen weiteren neuen Befehl: \lstinline+\anywhere+ (\ref{ssec:anywhere}), mit dem Text oder Formeln außerhalb der Chain gesetzt werden können.
\subsection{Lizenz}
-\mC \mCversion\ steht unter der LaTeX Project Public License Version 1.3 oder später.\newline(\url{http://www.latex-project.org/lppl.txt})
+\mC v\mCversion\ steht unter der \LaTeX\ Project Public License Version 1.3 oder später.\newline(\url{http://www.latex-project.org/lppl.txt})
-\subsection{Voraussetzungen}\label{ssec:voraussetzungen}
+\subsection{Voraussetzungen}\label{ssec:voraussetzungen}\index{Voraussetzungen|(}
Damit \mC funktionieren kann, müssen ein paar Pakete installiert sein:
\begin{description}
- \item[\CF] ohne das ergibt die ganze Sache gar keinen Sinn;
- \item[ifthen] für interne Abfragen;
- \item[calc] für interne Berechnungen;
- \item[xkeyval] Paketoptionen und Befehl-Keys werden damit erstellt;
- \item[float] damit wird die \lstinline=rxnscheme=-Umgebung definiert;
- \item[pgf/\TikZ] pgf ist nicht nur ein Paket sondern eine ganze Reihe von Paketen. Sie stellen die gesamte Basis für \TikZ da. Damit \mC funktionieren kann, muss mindestens die Version vom 08.09.2010\footnote{\url{http://sourceforge.net/projects/pgf/files/}} installiert sein.\\
+ \item[\CF]\index{Voraussetzungen!ChemFig@\CF} ohne das ergibt die ganze Sache gar keinen Sinn;
+ \item[ifthen]\index{Voraussetzungen!ifthen} für interne Abfragen;
+ \item[calc]\index{Voraussetzungen!calc} für interne Berechnungen;
+ \item[xkeyval]\index{Voraussetzungen!xkeyval} Paketoptionen und Befehl-Keys werden damit erstellt;
+ \item[float]\index{Voraussetzungen!float} damit wird die \lstinline=rxnscheme=-Umgebung definiert;
+ \item[pgf/\TikZ]\index{Voraussetzungen!pgf}\index{Voraussetzungen!TikZ@\TikZ} pgf ist nicht nur ein Paket sondern eine ganze Reihe von Paketen. Sie stellen die gesamte Basis für \TikZ da. Damit \mC funktionieren kann, muss mindestens die Version vom 08.09.2010\footnote{\url{http://sourceforge.net/projects/pgf/files/}} installiert sein.\\
Genauer: der Befehl \lstinline=\pgfpositionnodelater= muss verfügbar sein. Noch genauer benötigt der Key \lstinline+both+ des Befehls \lstinline+\arrow+ diese Version. Wenn Sie den Key nicht verwenden, sollte \mC auch mit pgf v2.00 problemlos funktionieren. Ältere Versionen wurden nicht getestet.
\end{description}
+\index{Voraussetzungen|)}
\subsection{Die Idee}
Seit August 2010 steht mit \CF eine wirklich flexible Lösung für organische Strukturformeln zur Verfügung. So kann man nun durch das Einbinden von \CF und `mhchem' mehr oder weniger alle Struktur- und Summenformeln, die man als Chemiker so benötigt, mit \LaTeX\ setzen. Was \CF gegenüber `ochem' noch benachteiligt, ist das Erstellen richtiger Reaktionsmechanismen. Hier soll \mC Abhilfe schaffen.
\mC bindet die Pakete
\begin{itemize}
- \item \CF\footnote{von Christian Tellechea, \url{http://www.ctan.org/tex-archive/macros/generic/chemfig/}},
- \item wenn vorhanden `mhchem'\footnote{von Martin Hensel, \url{http://www.ctan.org/tex-archive/macros/latex/contrib/mhchem/}} in der Version 3,
- \item wenn vorhanden `chemexec'\footnote{von mir, \url{http://www.ctan.org/tex-archive/macros/latex/contrib/chemexec/}} und
- \item wenn vorhanden `chemcompounds'\footnote{von Stephan Schenk, \url{http://www.ctan.org/tex-archive/macros/latex/contrib/chemcompounds/}} ein.
+ \item \CF\footnote{von Christian Tellechea, \url{http://www.ctan.org/tex-archive/macros/generic/chemfig/}}\index{ChemFig@\CF},
+ \item wenn vorhanden `mhchem'\footnote{von Martin Hensel, \url{http://www.ctan.org/tex-archive/macros/latex/contrib/mhchem/}}\index{mhchem} in der Version 3,
+ \item wenn vorhanden `chemexec'\footnote{von mir, \url{http://www.ctan.org/tex-archive/macros/latex/contrib/chemexec/}}\index{chemexec} und
+ \item wenn vorhanden `chemcompounds'\footnote{von Stephan Schenk, \url{http://www.ctan.org/tex-archive/macros/latex/contrib/chemcompounds/}}\index{chemcompounds} ein.
\end{itemize}
Zur Funktion der Befehle der oben genannten Pakete siehe deren Dokumentation. Wenn Sie die Pakete separat laden wollen, weil Sie ihnen Optionen mitgeben wollen, dann sollten Sie das machen, \emph{bevor} Sie \mC laden, um Konflikte zu vermeiden. \mC prüft intern einerseits darauf, ob die Pakete installiert sind und falls ja, ob sie bereits geladen sind. Wenn nicht, werden sie von \mC aufgerufen.
Befehle, die durch die eingebundenen Pakete zur Verfügung stehen, sind unter anderem
\begin{itemize}
- \item \lstinline=\ce{}= (mhchem)
- \item \lstinline=\ox{}{}=, \lstinline=\om[]=, \lstinline=\op[]=, \lstinline=\Hyd=, \lstinline=\Hpl= (chemexec)
- \item \lstinline=\chemfig[][]{}=, \lstinline=\chemrel[]{}=, \lstinline=\chemsign[]{}=, \lstinline=\lewis{}= (\CF)
- \item \lstinline=\declarecompound[]{}=, \lstinline=\compound{}= (chemcompounds).
+ \item \lstinline=\ce{}= (mhchem)\index{mhchem}
+ \item \lstinline=\ox{}{}=, \lstinline=\om[]=, \lstinline=\op[]=, \lstinline=\Hyd=, \lstinline=\Hpl= (chemexec)\index{chemexec}
+ \item \lstinline=\chemfig[][]{}=, \lstinline=\chemrel[]{}=, \lstinline=\chemsign[]{}=, \lstinline=\lewis{}= (\CF)\index{ChemFig@\CF}
+ \item \lstinline=\declarecompound[]{}=, \lstinline=\compound{}= (chemcompounds).\index{chemcompounds}
\end{itemize}
-In den Beispielen in diesem Manual wurden Befehle dieser Pakete verwendet \emph{ohne sie speziell als solche zu kennzeichnen}.\\
+In den Beispielen in diesem Manual wurden Befehle dieser Pakete verwendet \emph{ohne sie speziell als solche zu kennzeichnen}.
+
Vor allem stellt \mC Befehle zum Erstellen von Reaktionsschemata zur Verfügung.
\section{Verwendung}
\subsection{Hintergrund}
-\mC stellt zwei Umgebungen zur Verfügung, innerhalb derer die Reaktionsmechanismen erstellt werden. Beide Umgebungen sind letztlich eine `tikzpicture'-Umgebung. Die Frage, die sich aufdrängt, ist natürlich: wozu? \CF bringt doch schon einiges an Möglichkeiten mit. Und mit \TikZ hat man wirklich alle Möglichkeiten offen. Zugegeben. Allerdings bin ich faul, also habe einige häufig verwendete \TikZ-Befehle zu Makros zusammengefasst. Die sind immer mehr geworden und haben immer mehr Feinheiten erhalten, so dass dieses Paket dabei herausgekommen ist. Selbstverständlich bleibt man mit \TikZ flexibler, aber die Möglichkeit bleibt einem ja immer offen.
+\mC stellt zwei Umgebungen zur Verfügung, innerhalb derer die Reaktionsmechanismen erstellt werden. Beide Umgebungen sind letztlich eine \lstinline+tikzpicture+-Umgebung. Die Frage, die sich aufdrängt, ist natürlich: wozu? \CF bringt doch schon einiges an Möglichkeiten mit, Reaktionsgleichungen zu erstellen. Und mit \TikZ hat man wirklich alle Möglichkeiten offen. Zugegeben. Allerdings bin ich faul, also habe einige häufig verwendete \TikZ-Befehle zu Makros zusammengefasst. Die sind immer mehr geworden und haben immer mehr Feinheiten erhalten, so dass dieses Paket dabei herausgekommen ist.
\subsection{Das Grundprinzip}
-In dem `tikzpicture', das in den \mC-Umgebungen erstellt wird, werden Reaktanden und Reaktionspfeile mit einzelnen `nodes'\footnote{In einem tikzpicture kann man nahezu beliebig sogenannte `nodes' setzen, mit allen möglichen Formen und Inhalten. Das sind "`Knotenpunkte"' an bestimmten Koordinaten in einer `tikzpicture'-Umgebung.} auf einer `chain'\footnote{Dafür ist die tikzlibrary `chains' nötig.} angeordnet.
+In dem \lstinline+tikzpicture+, das in den \mC-Umgebungen erstellt wird, werden Reaktanden und Reaktionspfeile mit einzelnen `nodes'\footnote{In einem tikzpicture kann man nahezu beliebig sogenannte `nodes' setzen, mit allen möglichen Formen und Inhalten. Das sind "`Knotenpunkte"' an bestimmten Koordinaten in einer `tikzpicture'-Umgebung.} auf einer `chain'\footnote{Dafür ist die tikzlibrary `chains' nötig.} angeordnet.
\begin{SideBySideExample}
\begin{tikzpicture}[start chain]
\node [on chain] {A};
@@ -406,17 +419,17 @@ In dem `tikzpicture', das in den \mC-Umgebungen erstellt wird, werden Reaktanden
\end{SideBySideExample}
Dadurch ergeben sich einige Möglichkeiten, die `nodes' relativ zueinander zu platzieren.
\begin{SideBySideExample}
- \begin{tikzpicture}[start chain=going right,node distance=5mm]
+ \begin{tikzpicture}[start chain=going right, node distance=5mm]
\node [draw,on chain] {Hello};
\node [draw,on chain] {World};
- \node [draw,continue chain=going below,on chain] {,};
+ \node [draw,continue chain=going below, on chain] {,};
\node [draw,on chain] {this};
\node [draw,on chain] {is};
\end{tikzpicture}
\end{SideBySideExample}
\mC macht vor allem von der Möglichkeit Gebrauch, `branches' zu erstellen.
\begin{SideBySideExample}
- \begin{tikzpicture}[start chain=going right,node distance=5mm]
+ \begin{tikzpicture}[start chain=going right, node distance=5mm]
\node [draw,on chain] {A};
\node [draw,on chain] {B};
{ [start branch]
@@ -439,182 +452,191 @@ In manchen Beispielen der Dokumentation werden die Nodes farbig eingerahmt (sieh
Sehen wir uns zunächst ein Beispiel an:
\begin{SideBySideExample}
\begin{rxn}
- \reactand{ \chemfig{-[::30]-[::-60]OH} }
+ \reactant{ \chemfig{-[::30]-[::-60]OH} }
\arrow{Ox.}{}
- \reactand{ \chemfig{-[::30]=_[::-60]O} }
+ \reactant{ \chemfig{-[::30]=_[::-60]O} }
\end{rxn}
\end{SideBySideExample}
-Sie sehen hier die wichtigsten Befehle von \mC im Einsatz:
-\begin{description}
- \vitem=\begin{rxn}[<keys>]= Die erste von zwei Umgebungen. Sie stellt die Reaktionschemata zwischen den Text und zentriert sie (siehe \ref{ssec:rxn}).
- \vitem=\reactand[<ausrichtung>,<anker>,<tikz>]{<formeln>}= setzt eine \lstinline+node+ auf die\linebreak\lstinline+chain+, in die die chemischen Formeln geschrieben werden.
-
- Die Standard-Aus\-rich\-tung ist \lstinline=right= (siehe \ref{ssec:reactand}).
- \vitem=\arrow[<keys>]{<oben>}{<unten>}= schreibt in der Standardeinstellung einen \SI{5}{\emlength} langen einfachen Pfeil nach rechts (siehe \ref{ssec:arrow}).
-\end{description}
+Sie sehen hier die wichtigsten Befehle von \mC im Einsatz:\index{rxn}
+\begin{lstlisting}
+ \begin{rxn}[<align>,<scale>]
+\end{lstlisting}
+Die erste von zwei Umgebungen. Sie stellt die Reaktionschemata zwischen den Text und zentriert sie (siehe \ref{ssec:rxn}).\index{reactant}
+\begin{lstlisting}
+\reactant[<ausrichtung>,<anker>,<tikz>]{<formeln>}
+\end{lstlisting}
+setzt eine \lstinline+node+ auf die\linebreak\lstinline+chain+, in die die chemischen Formeln geschrieben werden. Die Standard-Aus\-rich\-tung ist \lstinline=right= (siehe \ref{ssec:reactant}).\index{arrow}
+\begin{lstlisting}
+ \arrow[<richtung>,<typ>,<längenfaktor>,<anker>,both]{<oben>}{<unten>}
+\end{lstlisting}
+schreibt in der Standardeinstellung einen \SI{5}{\emlength} langen einfachen Pfeil nach rechts (siehe \ref{ssec:arrow}).
\begin{SideBySideExample}
\begin{rxn}
- \reactand{ \chemfig{-[::30]=_[::-60]O} }
- \arrow[direction=below]{}{Ox.}
- \reactand[below]{ \chemfig{-[::30](-[::60]OH)=_[::-60]O} }
+ \reactant{ \chemfig{-[::30]=_[::-60]O} }
+ \arrow[below]{}{Ox.}
+ \reactant[below]{ \chemfig{-[::30](-[::60]OH)=_[::-60]O} }
\end{rxn}
\end{SideBySideExample}
-Wie Sie sehen, lässt sich das Reaktionschema durch optionale Argumente anders ausrichten. Durch die Angabe \lstinline=below= wird die Carbonsäure unter den Pfeil gesetzt und nicht rechts daneben. Durch die Key-Angabe \lstinline+direction=below+ zeigt der Pfeil nach unten anstatt nach rechts.
+Wie Sie sehen, lässt sich das Reaktionsschema durch optionale Argumente anders ausrichten. Durch die Angabe \lstinline=below= wird die Carbonsäure unter den Pfeil gesetzt und nicht rechts daneben. Durch die Angabe \lstinline+below+ zeigt der Pfeil nach unten anstatt nach rechts.
\subsubsection{Verzweigungen}
-Bislang ist noch nicht recht einsichtig, wieso man \mC einsetzen sollte. Die waagerechten Reaktionen sind mit `mhchem' und \CF selbst zu verwirklichen. Und weshalb sollte man eine senkrechte Reaktion benötigen? Was den Einsatz von \mC aber interessant machen könnte, ist die Möglichkeit, verzweigte Reaktionsschemata zu erstellen.
+Bislang ist noch nicht recht einsichtig, wieso man \mC einsetzen sollte. Die waagerechten Reaktionen sind mit `mhchem' und \CF selbst zu verwirklichen. Und weshalb sollte man eine senkrechte Reaktion benötigen? Was den Einsatz von \mC aber interessant machen könnte, ist die Möglichkeit, verzweigte Reaktionsschemata zu erstellen.\index{branch}
\begin{Example}
\begin{rxn}
- \reactand{ \chemfig{-[::30]-[::-60]OH} }
+ \reactant{ \chemfig{-[::30]-[::-60]OH} }
\arrow{}{}
- \reactand[,carbonyl]{ \chemfig{-[::30]=_[::-60]O} }
- \arrow[direction=below]{}{}
- \reactand[below]{ \chemfig{-[::30](-[::60]OH)=_[::-60]O} }
+ \reactant[,carbonyl]{ \chemfig{-[::30]=_[::-60]O} }
+ \arrow[below]{}{}
+ \reactant[below]{ \chemfig{-[::30](-[::60]OH)=_[::-60]O} }
\branch[right=of carbonyl]{
- \arrow[type={<=>}]{\ce{NH2R}}{}
- \reactand{ \chemfig{-[::30]=_[::-60]N(-[6]H)-[::60]R} }
+ \arrow[,<=>]{\ce{NH2R}}{}
+ \reactant{ \chemfig{-[::30]=_[::-60]N(-[6]H)-[::60]R} }
}
\end{rxn}
\end{Example}
-Im letzten Beispiel haben Sie einen weiteren wichtigen Befehl kennengelernt:
-\begin{description}
- \vitem=\branch[<ausrichtung>,<anker>,<tikz>]{<zweig>}= (siehe \ref{ssec:branch})
-\end{description}
+Im letzten Beispiel haben Sie einen weiteren wichtigen Befehl kennengelernt (siehe \ref{ssec:branch}):\index{branch}
+\begin{lstlisting}
+ \vitem=\branch[<ausrichtung>,<anker>,<tikz>]{<zweig>}
+\end{lstlisting}
Der Zweig wurde mit \lstinline+right=of carbonyl+ rechts neben den ersten Reaktanden mit dem Anker \lstinline=carbonyl= angesetzt. Innerhalb des Zweigs wurde beim Pfeil der Key \lstinline+type={<=>}+ verwendet, wodurch der Gleichgewichtspfeil dargestellt wurde. Andere \lstinline=type=-Mög\-lich\-kei\-ten wären \lstinline=->= (Voreinstellung), \lstinline=<-= oder \lstinline=<->=.
-Durch mehrfaches Verwenden von \lstinline=\branch= können so umfangreichere Reaktionschemata entstehen:
+Durch mehrfaches Verwenden von \lstinline=\branch=\index{branch} können so umfangreichere Reaktionschemata entstehen:
\begin{Example}
\begin{rxn}
- \reactand{ \chemfig{-[::30]-[::-60]OH} }
+ \reactant{ \chemfig{-[::30]-[::-60]OH} }
\arrow{}{}
- \reactand[,carbonyl]{ \chemfig{-[::30]=_[::-60]O} }
- \arrow[direction=below]{}{}
- \reactand[below]{ \chemfig{-[::30](-[::60]OH)=_[::-60]O} }
+ \reactant[,carbonyl]{ \chemfig{-[::30]=_[::-60]O} }
+ \arrow[below]{}{}
+ \reactant[below]{ \chemfig{-[::30](-[::60]OH)=_[::-60]O} }
\branch[right=of carbonyl,imin]{
- \arrow[type={<=>},length=1.12]{\ce{NH2R}}{}
- \reactand{ \chemfig{-[::30]=_[::-60]N(-[6]H)-[::60]R} }
+ \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[type={<=>},direction=below right,length=1.12,aboveshift=3pt]{ \chemfig{[,.75]-[::30]-[::-60]OH} }{}
- \reactand[below right]{ \chemfig{-[::30](-[::60]O-[::-60]-[::-60])-[::-60]OH} }
+ \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[direction=above]{ \chemfig{[,.75]-[::30]=_[::-60]O}/\Hpl }{}
- \reactand[above]{ \chemfig{-[::30](-[::60]OH)-[::-60]-[::60]=[::60]O} }
+ \arrow[above]{ \chemfig{[,.75]-[::30]=_[::-60]O}/\Hpl }{}
+ \reactant[above]{ \chemfig{-[::30](-[::60]OH)-[::-60]-[::60]=[::60]O} }
\arrow{$-\ce{H2O}$}{}
- \reactand{ \chemfig{-[::30]=[::-60]-[::60]=[::60]O} }
+ \reactant{ \chemfig{-[::30]=[::-60]-[::60]=[::60]O} }
}
\end{rxn}
\end{Example}
\subsubsection{Nummerierte Schemata}
-Die zweite Umgebung von \mC funktioniert genau wie die erste, setzt das Reaktionsschema allerdings in eine nummerierte Gleitumgebung mit Überschrift.
+Die zweite Umgebung von \mC funktioniert genau wie die erste, setzt das Reaktionsschema allerdings in eine nummerierte Gleitumgebung mit Überschrift.\index{rxnscheme}
\begin{Example}
\begin{rxnscheme}{Keto-Enol-Tautomerie}
- \reactand{ \chemfig{=[::30]-[::-60]OH} }
- \arrow[type={<=>}]{}{}
- \reactand{ \chemfig{-[::30]=[::-60]O} }
+ \reactant{ \chemfig{=[::30]-[::-60]OH} }
+ \arrow[,<=>]{}{}
+ \reactant{ \chemfig{-[::30]=[::-60]O} }
\end{rxnscheme}
\end{Example}
Hier kommt die Umgebung
-\begin{Verbatim}
- \begin{rxnscheme}[<keys>]{<caption>}
+\begin{lstlisting}
+ \begin{rxnscheme}[<label>,<placement>,<align>,<scale>,<name>]{<caption>}
...
\end{rxnscheme}
-\end{Verbatim}
+\end{lstlisting}
zum Einsatz. Wie Sie die Ihren Vorstellungen gemäß anpassen können, lesen Sie in der Befehlsreferenz (\ref{ssec:rxnscheme}).
-\subsection{Voreinstellungen}
+\subsection{Voreinstellungen}\index{Voreinstellungen|(}
Es gibt einige Voreinstellungen, die zum Teil meinem persönlichen Geschmack geschuldet sind, die Sie aber nach Bedarf ändern können. So gelten für die \CF-Formeln \emph{innerhalb der \mC-Umgebungen} folgende Voreinstellungen:
-\begin{Verbatim}
+\begin{lstlisting}
\setatomsep{1.8em}
\setcrambond{3pt}{0.5pt}{1pt}
-\end{Verbatim}
+\end{lstlisting}
Außerhalb der Umgebungen gelten weiterhin die Voreinstellungen von \CF.
\begin{SideBySideExample}
\begin{rxn}
- \reactand{\chemfig{**6(------)}}
+ \reactant{\chemfig{**6(------)}}
\end{rxn}
\chemfig{**6(------)}
\end{SideBySideExample}
-Sie können die Voreinstellungen von \mC über folgende Befehle ändern:
-\begin{Verbatim}
+Sie können die Voreinstellungen von \mC über folgende Befehle ändern:\index{setbondlength}\index{setbondshape}\index{setatomsize}
+\begin{lstlisting}
\setbondlength{<länge>}
\setbondshape{<basislänge>}{<strichdicke>}{<strichabstand>}
\setatomsize{<schriftgröße>}
-\end{Verbatim}
+\end{lstlisting}
Damit werden die Einstellungen nachfolgend \emph{für alle weiteren} \mC-Umgebungen geändert. Lassen Sie die Argumente leer, werden die Voreinstellungen wiederhergestellt. \lstinline=\setatomsize= hat die Voreinstellung \lstinline=\small=.
\begin{Example}
\setbondlength{2.1em}\setbondshape{5pt}{1pt}{2pt}\setatomsize{\Large}
\begin{rxn}
- \reactand{\chemfig{-[::30](<[::60])-[::-60](<:[::-60])-[::60]}}
+ \reactant{\chemfig{-[::30](<[::60])-[::-60](<:[::-60])-[::60]}}
\end{rxn}
\setbondlength{}\setbondshape{}{}{}\setatomsize{}
\begin{rxn}
- \reactand{\chemfig{-[::30](<[::60])-[::-60](<:[::-60])-[::60]}}
+ \reactant{\chemfig{-[::30](<[::60])-[::-60](<:[::-60])-[::60]}}
\end{rxn}
\end{Example}
Wollen Sie nur die Parameter einer Umgebung ändern, verwenden Sie \emph{innerhalb der Umgebung} die Befehle von \CF und die \LaTeX-Befehle für die Schriftgröße.
\begin{Example}
\begin{rxn}
\setatomsep{2.1em}\setcrambond{5pt}{1pt}{2pt}\Large
- \reactand{\chemfig{-[::30](<[::60])-[::-60](<:[::-60])-[::60]}}
+ \reactant{\chemfig{-[::30](<[::60])-[::-60](<:[::-60])-[::60]}}
\end{rxn}
\begin{rxn}
- \reactand{\chemfig{-[::30](<[::60])-[::-60](<:[::-60])-[::60]}}
+ \reactant{\chemfig{-[::30](<[::60])-[::-60](<:[::-60])-[::60]}}
\end{rxn}
\end{Example}
-Reaktionspfeile haben als Standardwert die Länge \SI{5}{\emlength} oder $5\sqrt{2}\si{\emlength}$ im Fall der schrägen Pfeile. Die Voreinstellung lässt sich mit
-\begin{Verbatim}
+Reaktionspfeile haben als Standardwert die Länge \SI{5}{\emlength} oder $5\sqrt{2}\si{\emlength}$ im Fall der schrägen Pfeile. Die Voreinstellung lässt sich mit\index{setarrowlength}
+\begin{lstlisting}
\setarrowlength{<länge>}
-\end{Verbatim}
+\end{lstlisting}
\SaveVerb{arrowlength}=<länge>=%
auf \UseVerb{arrowlength} bzw. $\text{\UseVerb{arrowlength}}\cdot\sqrt{2}$ ändern.
+\index{Voreinstellungen|)}
-\subsection{Paket-Optionen}\label{ssec:paketoptionen}
+\subsection{Paket-Optionen}\label{ssec:paketoptionen}\index{Optionen|(}
\mC verfügt über einige Paket-Optionen.
\begin{description}
- \vitem+chemstyle+\settowidth{\tmplength}{\tt chemstyle}\Vii[\tmplength]Mit dieser Option kann `chemstyle' automatisch geladen werden, ohne dass Konflikte mit \mC enstehen.
- \vitem+color=<farbe>+ Mit dieser Option wird die entsprechende Farbe an `chemexec' weitergereicht und dessen Option \lstinline+shade=true+ aufgerufen.
- \vitem+english+ Wird diese Option aufgerufen, dann lädt \mC `chemexec' in der englischen Version, falls das Paket nicht vorher aufgerufen wurde. Außerdem wird der Name der \lstinline=rxnscheme=-Umgebung (siehe \ref{ssec:rxnscheme}) in "`Reaction scheme"' geändert.
- \vitem+nochemexec+ Durch diese Option können Sie verhindern, dass \mC `chemexec' lädt.
- \vitem+nocolor+ Mit dieser Option wird `chemexec' ohne Farbe und mit der Option \lstinline+shade=false+ geladen (Default-Verhalten von \mC).
- \vitem+nocompounds+\settowidth{\tmplength}{\tt nocompounds}\Vii[\tmplength]Durch diese Option können Sie verhindern, dass \mC `chemcompounds' lädt.
- \vitem+nomhchem+\settowidth{\tmplength}{\tt nomhchem}\Vii[\tmplength]Durch diese Option können Sie verhindern, dass \mC `mhchem' lädt, vorausgesetzt, dass `chemexec' auch nicht geladen wird.
- \vitem+nopackages+\settowidth{\tmplength}{\tt nopackages}\Vii[\tmplength]Durch diese Option werden (außer \CF) gar keine Pakete geladen\footnote{Außer denen, die \mC benötigt, um zu funktionieren (\TikZ etc.).}.
- \vitem+placement=<position>+ Durch den Aufruf dieser Option kann das Standard-Platzie\-rungs\-ver\-hal\-ten der \lstinline=rxnscheme=-Umgebung (siehe \ref{ssec:rxnscheme}) in \lstinline=<position>= geändert werden.
- \vitem+shade+ Mit dieser Option wird `chemexec' mit der Option \lstinline+shade=true+ geladen.
+ \vitem+chemstyle+\index{Optionen!chemstyle}Mit dieser Option kann `chemstyle' automatisch geladen werden, ohne dass Konflikte mit \mC enstehen.
+ \vitem+color=<farbe>+\index{Optionen!color} Mit dieser Option wird die entsprechende Farbe an `chemexec' weitergereicht und dessen Option \lstinline+shade=true+ aufgerufen.
+ \vitem+english+\index{Optionen!english} Wird diese Option aufgerufen, dann lädt \mC `chemexec' in der englischen Version, falls das Paket nicht vorher aufgerufen wurde. Außerdem wird der Name der \lstinline=rxnscheme=-Umgebung (siehe \ref{ssec:rxnscheme}) in "`Reaction scheme"' geändert.
+ \vitem+nochemexec+\index{Optionen!nochemexec} Durch diese Option können Sie verhindern, dass \mC `chemexec' lädt.
+ \vitem+nocolor+\index{Optionen!nocolor} Mit dieser Option wird `chemexec' ohne Farbe und mit der Option \lstinline+shade=false+ geladen (Default-Verhalten von \mC).
+ \vitem+nocompounds+\index{Optionen!nocompounds}Durch diese Option können Sie verhindern, dass \mC `chemcompounds' lädt.
+ \vitem+nomhchem+\index{Optionen!nomhchem}Durch diese Option können Sie verhindern, dass \mC `mhchem' lädt, vorausgesetzt, dass `chemexec' auch nicht geladen wird.
+ \vitem+nopackages+\index{Optionen!nopackages}Durch diese Option werden (außer \CF) gar keine Pakete geladen\footnote{Außer denen, die \mC benötigt, um zu funktionieren (\TikZ etc.).}.
+ \vitem+placement=<position>+\index{Optionen!placement} Durch den Aufruf dieser Option kann das Standard-Platzie\-rungs\-ver\-hal\-ten der \lstinline=rxnscheme=-Umgebung (siehe \ref{ssec:rxnscheme}) in \lstinline=<position>= geändert werden.
+ \vitem+shade+\index{Optionen!shade} Mit dieser Option wird `chemexec' mit der Option \lstinline+shade=true+ geladen.
\end{description}
+\index{Optionen|)}
\section{Fortgeschrittene Anwendung, Verwendung von \TikZ}
-Die meisten der Befehle ermöglichen nach der Ausrichtungsangabe die Angabe weiteren \TikZ-Codes. Dadurch lassen sich viele Feinjustierungen vornehmen. Wenn Sie Sich mit \TikZ einigermaßen auskennen, können Sie sowieso noch weitaus mehr realisieren, als durch \CF und \mC vorgegeben (siehe \ref{ssec:tikzsynthese}).
+Das größte Problem bei der Verwendung von \mC ist in der Regel die korrekte Positionierung der einzelnen Reaktanden und Pfeile. Der \ref{ssec:ausrichtungsfrage} geht etwas näher darauf ein.
+
+Einige der Befehle ermöglichen als drittes optionales Argument die Angabe weiteren \TikZ-Codes. Genauer gesagt können Sie dort im wesentlichen diejenigen \TikZ-Keys einsetzen, die Sie in einem \lstinline+tikzpicture+ bei einer \lstinline+\node+ einsetzen können. Wenn die Syntax einer Node also \lstinline+\node[<tikz>](<platzierung>){<irgendwas>};+ ist, dann entspricht \lstinline+<tikz>+ dem entsprechenden Argument von \zB \lstinline+\reactant[,,<tikz>]{}+\index{reactant!tikz}. Dadurch lassen sich viele Feinjustierungen vornehmen. Wenn Sie Sich mit \TikZ einigermaßen auskennen, können Sie sowieso noch weitaus mehr realisieren, als durch \CF und \mC vorgegeben.
-\subsection{Die Ausrichtungsfrage}
+\subsection{Die Ausrichtungsfrage}\label{ssec:ausrichtungsfrage}\index{Ausrichtung|(}
Da Reaktanden, Pfeile und Zweige mittig zu dem Objekt, auf das sie sich beziehen, ausgerichtet werden, erzeugt die Default-Ausrichtung nicht immer schöne Ergebnisse.
\begin{Example}
\makevisible
\begin{rxn}
- \reactand{ \chemname{\chemfig{*6(-=-=-=)}}{Benzol \compound{benzol}} }
+ \reactant{ \chemname{\chemfig{*6(-=-=-=)}}{Benzol \compound{benzol}} }
\arrow{}{}
- \reactand{ \chemname{\chemfig{*6(-=-=(-Br)-=)}}{Brombenzol \compound{brombenzol}} }
+ \reactant{ \chemname{\chemfig{*6(-=-=(-Br)-=)}}{Brombenzol \compound{brombenzol}} }
\end{rxn}
\end{Example}
-Wie Sie sehen können, sind die beiden Reaktanden aus Sicht der Benzolringe nicht gleich zu dem Pfeil ausgerichtet. Der erste Reaktand scheint nach oben geschoben zu sein. Der Versuch, das mit \TikZ-Code zu korrigieren, versagt.
+Wie Sie sehen können, sind die beiden Reaktanden aus Sicht der Benzolringe nicht gleich zu dem Pfeil ausgerichtet. Der erste Reaktand scheint nach oben geschoben zu sein. Der Versuch, das mit \TikZ-Code wie \lstinline+xshift+\index{xshift} und \lstinline+yshift+\index{yshift} zu korrigieren, versagt.
\begin{Example}
\makevisible
\begin{rxn}
- \reactand[,,yshift=-1em]{ \chemname{\chemfig{*6(-=-=-=)}}{Benzol \compound{benzol}} }
+ \reactant[,,yshift=-1em]{ \chemname{\chemfig{*6(-=-=-=)}}{Benzol \compound{benzol}} }
\arrow{}{}
- \reactand{ \chemname{\chemfig{*6(-=-=(-Br)-=)}}{Brombenzol \compound{brombenzol}} }
+ \reactant{ \chemname{\chemfig{*6(-=-=(-Br)-=)}}{Brombenzol \compound{brombenzol}} }
\end{rxn}
\end{Example}
Das kommt daher, da der erste Reaktand relativ zu dem Objekt verschoben wird, auf das er sich bezieht. Da er das erste Objekt auf der Chain ist, wird er gar nicht verschoben. Der nachfolgende Pfeil richtet sich in Bezug auf den ersten Reaktanden aus.
\begin{SideBySideExample}
\makevisible
\begin{rxn}
- \reactand{A}
+ \reactant{A}
\chemand
- \reactand[,,yshift=1em]{B}
+ \reactant[,,yshift=1em]{B}
\arrow{}{}
\end{rxn}
\end{SideBySideExample}
@@ -622,196 +644,245 @@ Da es (noch) keine Möglichkeit gibt, die Ausrichtung des Pfeils selbst zu ände
\begin{Example}
\makevisible
\begin{rxn}
- \reactand{A}
+ \reactant{A}
\chemand
- \reactand[,,yshift=1em]{B}
+ \reactant[,,yshift=1em]{B}
\branch[,,yshift=-1em]{\arrow{}{}}
\end{rxn}
\begin{rxn}
- \reactand{ \chemname{\chemfig{*6(-=-=-=)}}{Benzol \compound{benzol}} }
+ \reactant{ \chemname{\chemfig{*6(-=-=-=)}}{Benzol \compound{benzol}} }
\branch[,,yshift=1em]{\arrow{}{}}
- \reactand{ \chemname{\chemfig{*6(-=-=(-Br)-=)}}{Brombenzol \compound{brombenzol}} }
+ \reactant{ \chemname{\chemfig{*6(-=-=(-Br)-=)}}{Brombenzol \compound{brombenzol}} }
\end{rxn}
\end{Example}
Das ist für das letzte Beispiel aber nicht die beste Lösung, da die exakte Ausrichtung auf diese Weise immer eine ganze Reihe von Versuchen benötigt, bis man das gewünschte Ergebnis erzielt. Es gibt eine andere Lösung: ein unsichtbares Brom am ersten Benzol.
\begin{Example}
\makevisible
\begin{rxn}
- \reactand{ \chemname{\chemfig{*6(-=-=(-[,,,,draw=none]\phantom{Br})-=)}}{Benzol \compound{benzol}} }
+ \reactant{ \chemname{\chemfig{*6(-=-=(-[,,,,draw=none]\phantom{Br})-=)}}{Benzol \compound{benzol}} }
\arrow{}{}
- \reactand{ \chemname{\chemfig{*6(-=-=(-Br)-=)}}{Brombenzol \compound{brombenzol}} }
+ \reactant{ \chemname{\chemfig{*6(-=-=(-Br)-=)}}{Brombenzol \compound{brombenzol}} }
\end{rxn}
\end{Example}
-In anderen Fällen ist der \TikZ-Code aber die beste Lösung:
+Auch in anderen Fällen ist der unsichtbare Substituent die bessere und einfachere Lösung gegenüber \TikZ-Code:
\begin{Example}
\makevisible
default:
\begin{rxn}
- \reactand{\chemfig{-[:-30]-[:30](=[2]O)-[:-30]OH}}
+ \reactant{\chemfig{-[:-30]-[:30](=[2]O)-[:-30]OH}}
\chemand
- \reactand{\chemfig{HO-[:30]-[:-30]-[:30]}}
+ \reactant{\chemfig{HO-[:30]-[:-30]-[:30]}}
\arrow{[\Hpl]}{\SI{200}{\celsius}}
- \reactand{\chemfig{-[:-30]-[:30](=[2]O)-[:-30]O-[:30]-[:-30]-[:30]}}
+ \reactant{\chemfig{-[:-30]-[:30](=[2]O)-[:-30]O-[:30]-[:-30]-[:30]}}
\end{rxn}
- Hydroxy-Gruppen auf gleicher H\"ohe:
+ Hydroxy-Gruppen auf gleicher H\"ohe mit Tikz:
\begin{rxn}
- \reactand{\chemfig{-[:-30]-[:30](=[2]O)-[:-30]OH}}
+ \reactant{\chemfig{-[:-30]-[:30](=[2]O)-[:-30]OH}}
\chemand[,,yshift=-1.2em]
- \reactand[,,yshift=.12em]{\chemfig{HO-[:30]-[:-30]-[:30]}}
- \branch[,,yshift=1em]{\arrow{[\Hpl]}{\SI{200}{\celsius}}}
- \reactand{\chemfig{-[:-30]-[:30](=[2]O)-[:-30]O-[:30]-[:-30]-[:30]}}
+ \reactant[,,yshift=.12em]{\chemfig{HO-[:30]-[:-30]-[:30]}}
+ \branch[,,yshift=1.08em]{\arrow{[\Hpl]}{\SI{200}{\celsius}}}
+ \reactant{\chemfig{-[:-30]-[:30](=[2]O)-[:-30]O-[:30]-[:-30]-[:30]}}
+ \end{rxn}
+ Hydroxy-Gruppen auf gleicher H\"ohe durch unsichtbaren Substituenten:
+ \begin{rxn}
+ \reactant{\chemfig{-[:-30]-[:30](=[2]O)-[:-30]OH}}
+ \chemand
+ \reactant{\chemfig{HO-[:30](=[2,,,,draw=none]\phantom{O})-[:-30]-[:30]}}
+ \arrow{[\Hpl]}{\SI{200}{\celsius}}
+ \reactant{\chemfig{-[:-30]-[:30](=[2]O)-[:-30]O-[:30]-[:-30]-[:30]}}
\end{rxn}
\end{Example}
-Ich fürchte, in vielen Fällen müssen Sie mit \lstinline+xshift+ und \lstinline+yshift+ spielen, bis das Schema aussieht, wie Sie Sich das vorstellen. Vielleicht wird eine zukünftige Version von \mC eine benutzerfreundlichere Ausrichtungsmöglichkeit bieten.
+Ich fürchte aber, in vielen Fällen müssen Sie mit \lstinline+xshift+\index{xshift} und \lstinline+yshift+\index{yshift} spielen, bis das Schema aussieht, wie Sie Sich das vorstellen. Vielleicht wird eine zukünftige Version von \mC eine benutzerfreundlichere Ausrichtungsmöglichkeit bieten.
+\index{Ausrichtung|)}
\subsection{Mit \TikZ andere Ziele erreichen}
-%TODO: Einleitungstext; checken, ob die Salzbildung jetzt richtig aussieht
Man könnte natürlich, nur zum Spaß?, das Aussehen von Molekülen mit \TikZ ändern.
\begin{SideBySideExample}
\begin{rxn}
- \reactand[,,->,green!45!blue!55]{ \chemfig{*6(---(-)---)} }
+ \reactant[,,->,green!45!blue!55]{ \chemfig{*6(---(-)---)} }
\end{rxn}
\chemfig[->,green!45!blue!55]{*6(---(-)---)}
\end{SideBySideExample}
Das Beispiel ist natürlich kein gutes, da mit \CF dasselbe Ergebnis erzielt werden kann. Vielfache andere Anwendungen sind aber denkbar:
\begin{Example}
- \newcommand{\leer}{\reactand[,minimum width=5em]{ \rule[-1em]{1em}{.5pt}\;\rule[-1em]{3em}{.5pt} }{}}
+ \newcommand{\leer}{\reactant[,minimum width=5em]{ \rule[-1em]{1em}{.5pt}\;\rule[-1em]{3em}{.5pt} }{}}
\newcommand{\stoich}{\rule[-3pt]{1em}{.5pt}}
\begin{rxn}
- \reactand{\bf\Large Salzbildung (I)}
- \reactand[below,a,yshift=1em]{F\"ulle die L\"ucken}
- \branch[below=of a,b]{ \reactand[,,minimum width=5em]{ \stoich\ Na }\chemand \leer \arrow{}{} \leer \chemand \leer }
- \branch[below=of b,,draw,inner sep=3pt]{\reactand[,,minimum width=5em]{}\chemand\reactand[,,minimum width=5em]{}\arrow{}{}\reactand[,,minimum width=5em]{Natriumchlorid $+$ Wasserstoff}}
+ \reactant{\bf\Large Salzbildung (I)}
+ \reactant[below,a,yshift=1em]{F\"ulle die L\"ucken}
+ \branch[below=of a,b]{ \reactant[,,minimum width=5em]{ \stoich\ Na }\chemand \leer \arrow{}{} \leer \chemand \leer }
+ \branch[below=of b,,draw,inner sep=3pt]{\reactant[,,minimum width=5em]{}\chemand\reactant[,,minimum width=5em]{}\arrow{}{}\reactant[,,minimum width=5em]{Natriumchlorid $+$ Wasserstoff}}
\end{rxn}
\end{Example}
\section{Alphabetische Befehlsreferenz}
Im folgenden Abschnitt werden alle Befehle von \mC in alphabetischer Reihenfolge vorgestellt.
-\subsection{arrow}\label{ssec:arrow}
+\subsection{anywhere}\label{ssec:anywhere}\index{anywhere|(}\index{Befehle!anywhere}
+\NEU%
+Manchmal ist es nützlich, wenn man einen Reaktanden außerhalb der Chain platzieren kann, siehe \zB \ref{rs:hydratisierung}.
+\begin{lstlisting}
+ \anywhere[<anker>]{<tikz>}{<formel>}
+\end{lstlisting}
+Für diesen Fall gibt es den Befehl \lstinline+\anywhere+. Er wird über \lstinline+<tikz>+ auf ähnliche Weise wie \lstinline+\branch+ platziert.
+\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}
+Der Befehl kann gut zum Beschriften von Reaktionspartnern eingesetzt werden.
+\begin{Example}
+ \begin{rxn}
+ \reactant[,keton]{\chemfig{H-\chemabove{C}{\hspace*{5mm}\scriptstyle\alpha}(-[2]H)(-[6,,,2]{}|{\textcolor{blue}H})-C(=[:60]\lewis{02,O})-[:-60]C|H_3}}
+ \anywhere{below=of keton}{$+$\color{blue}\Hyd}
+ \arrow[,<=>]{\tiny langsam}{}
+ \mesomeric[,mesomer]{
+ \reactant[,carbanion]{\chemfig{H_2|\chemabove[3pt]{\lewis{2,C}}{\scriptstyle\ominus}-C(=[:60]\lewis{02,O})-[:-60]C|H_3}}
+ \marrow
+ \reactant[,enolat]{\chemfig{H_2C=C(-[:60]\chemabove{\lewis{024,O}}{\hspace*{5mm}\scriptstyle\ominus})-[:-60]C|H_3}}
+ }
+ \anywhere{above=of enolat}{\tiny Enolat-Ion}
+ \anywhere{above=of carbanion}{\tiny Carbanion}
+ \anywhere{below=of mesomer}{$+$\color{blue}\ce{H2O}}
+ \end{rxn}
+\end{Example}
+\index{anywhere|)}
+
+\subsection{arrow}\label{ssec:arrow}\index{arrow|(}\index{Befehle!arrow}
Reaktionspfeile werden mit \lstinline=\arrow= erstellt.
-\begin{Verbatim}
- \arrow[<keys>]{<oben>}{<unten>}
-\end{Verbatim}
-Mit mehreren Keys können die Reaktionspfeile angepasst werden. Sie werden nach dem Muster \lstinline+key=wert+ angegeben.
-\begin{description}
-\vitem+direction=<richtung>+ -- mögliche Einstellungen sind:
+\begin{lstlisting}
+ \arrow[<richtung>,<typ>,<längenfaktor>,<anker>,both]{<oben>}{<unten>}
+\end{lstlisting}
+\subsubsection{Optionen}\index{arrow!Optionen|(}
+\NEU%
+Mit mehreren Optionen können die Reaktionspfeile angepasst werden. Die Optionen müssen an entsprechender Stelle, durch Kommas separiert, angegeben werden.
+\begin{enumerate}
+\item\lstinline+<richtung>+\index{arrow!Optionen!direction} -- mögliche Einstellungen sind:
\begin{rxn}
\setarrowlength{2.5em}
\dummy[a]
- \arrow{}{}\reactand{right}
- \branch[above right=of a]{\arrow[direction=above right]{}{}\reactand[above right]{above right}}
- \branch[above=of a]{\arrow[direction=above]{}{}\reactand[above]{above}}
- \branch[above left=of a]{\arrow[direction=above left]{}{}\reactand[above left]{above left}}
- \branch[left=of a]{\arrow[direction=left]{}{}\reactand[left]{left}}
- \branch[below left=of a]{\arrow[direction=below left]{}{}\reactand[below left]{below left}}
- \branch[below=of a]{\arrow[direction=below]{}{}\reactand[below]{below}}
- \branch[below right=of a]{\arrow[direction=below right]{}{}\reactand[below right]{below right}}
- \end{rxn}
-\vitem+type=<typ>+ -- mögliche Einstellungen sind:
+ \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+<typ>+\index{arrow!Optionen!type} -- mögliche Einstellungen sind:
\begin{rxn}
\dummy[a]
- \branch[below=of a,b,yshift=1em]{\arrow{}{}\reactand{\ttfamily type=\{-\textgreater\}}}
- \branch[below=of b,c,yshift=1em]{\arrow[type={<-}]{}{}\reactand{\ttfamily type=\{\textless-\}}}
- \branch[below=of c,d,xshift=.5em,yshift=1em]{\arrow[type={<->}]{}{}\reactand{\ttfamily type=\{\textless-\textgreater\}}}
- \branch[below=of d,e,yshift=1em]{\arrow[type={<=>}]{}{}\reactand{\ttfamily type=\{\textless=\textgreater\}}}
- \branch[below=of e,,yshift=1em]{\arrow[type={-|>}]{}{}\reactand{\ttfamily type=\{-\textbar\textgreater\}}}
- \end{rxn}
-\vitem+length=<faktor>+ -- mit dem Faktoren, den Sie hier angeben, wird die Pfeillänge (\SI{5.0}{\emlength} bei Faktor = $1.0$, Standard) multipliziert.
-\vitem+name=<anker>+ -- hier können Sie dem Pfeil einen Anker geben, auf den \zB mit einem Branch referenziert werden kann.
-\vitem+both+\settowidth{\tmplength}{\tt both}\Vii[\tmplength]-- durch diesen Key haben die beiden Nodes, in die die Beschriftungen geschrieben werden, die gleichen Maße.
-\end{description}
+ \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+<längenfaktor>+\index{arrow!Optionen!length} -- mit dem Faktoren, den Sie hier angeben, wird die Pfeillänge (\SI{5.0}{\emlength} bei Faktor = $1.0$, Standard) multipliziert.
+\item\lstinline+<anker>+\index{arrow!Optionen!anker} -- hier können Sie dem Pfeil einen Anker geben, auf den \zB mit einem Branch referenziert werden kann.
+\item\lstinline+both+\index{arrow!Optionen!both}-- durch diese Option haben die beiden Nodes, in die die Beschriftungen geschrieben werden, die gleichen Maße.
+\end{enumerate}
\begin{SideBySideExample}
\begin{rxn}
- \dummy\arrow{\ce{Br2}}{$h\nu$} \arrow{\chemfig{-[::30]-[::-60]OH}}{}
+ \arrow[,,.6]{\ce{Br2}}{$h\nu$} \arrow{\chemfig{-[::30]-[::-60]OH}}{}
\end{rxn}
\begin{rxn}
- \dummy\arrow[direction=above]{\ce{Br2}}{$h\nu$}
+ \arrow[above,,.6]{\ce{Br2}}{$h\nu$}
\end{rxn}
\begin{rxn}
- \dummy\arrow[direction=above]{\chemfig{-[::30]-[::-60]OH}}{}
+ \arrow[above]{\chemfig{-[::30]-[::-60]OH}}{}
\end{rxn}
\begin{rxn}
- \dummy\arrow[direction=above right]{\ce{Br2}}{$h\nu$}
+ \arrow[above right,,.5]{\ce{Br2}}{$h\nu$}
\end{rxn}
\begin{rxn}
- \dummy\arrow[direction=above right]{\chemfig{-[::30]-[::-60]OH}}{}
+ \arrow[above right]{\chemfig{-[::30]-[::-60]OH}}{}
\end{rxn}
\end{SideBySideExample}
-Einmal die meisten Keys im Einsatz:
+Einmal die meisten Optionen im Einsatz:
\begin{SideBySideExample}
\begin{rxn}
- \reactand{A}
- \arrow[name=pfeil]{B}{}
- \branch[above=of pfeil,,yshift=-4em]{
- \arrow[type=<-,direction=above,length=.7]{}{}
- \reactand[above]{D}
+ \reactant{A}
+ \arrow[,,,pfeil]{B}{}
+ \branch[above=of pfeil,,yshift=1em]{
+ \arrow[above,<-,.7]{}{}
+ \reactant[above]{D}
}
- \reactand{C}
+ \reactant{C}
\end{rxn}
\end{SideBySideExample}
+\index{arrow!Optionen|)}
+
+\subsubsection{Ausrichtung}\index{arrow!Ausrichtung|(}
Liegt der Pfeil in einem Branch (siehe \ref{ssec:branch}), dann wird die Ausrichtung des Branch bestimmt durch die Größe der Nodes, mit denen die Pfeilbeschriftung platziert wird. Hat der Pfeil nun nur eine oder zwei unterschiedlich große Beschriftungen, dann ist die Ausrichtung falsch.
\begin{SideBySideExample}
\makevisible
\begin{rxn}
- \reactand[,a]{A}
+ \reactant[,a]{A}
\arrow{}{}
\branch[below=of a]{
- \arrow[direction=below]{\chemfig{-[::30]-[::-60]OH}}{}
+ \arrow[below]{\chemfig{-[::30]-[::-60]OH}}{}
}
\end{rxn}
\makeinvisible
\end{SideBySideExample}
-Durch die Verwendung des Keys \lstinline=both= bekommen die Nodes beider Pfeilbeschriftungen die gleichen Maße, wodurch die Ausrichtung korrigiert werden kann.
+Durch die Verwendung der Option \lstinline=both=\index{arrow!Optionen!both} bekommen die Nodes beider Pfeilbeschriftungen die gleichen Maße, wodurch die Ausrichtung korrigiert werden kann.
\begin{SideBySideExample}
\makevisible
\begin{rxn}
- \reactand[,a]{A}
+ \reactant[,a]{A}s Keys
\arrow{}{}
\branch[below=of a]{
- \arrow[direction=below,both]{\chemfig{-[::30]-[::-60]OH}}{}
+ \arrow[below,,,,both]{\chemfig{-[::30]-[::-60]OH}}{}
}
\end{rxn}
\makeinvisible
\end{SideBySideExample}
Mehr zu dem Problem der Ausrichtung lesen Sie in \ref{sssec:branch_ausrichtung}.
+\index{arrow!Ausrichtung|)}
-\subsection{branch}\label{ssec:branch}
-\NEU%
-Der Befehl \lstinline=\branch= wird verwendet, um eine Verzweigung der Reaktion zu realisieren. \textbf{Wenn Sie ältere Versionen von \mC eingesetzt haben, beachten Sie, dass sich die Befehl-Syntax verändert hat.}
-\begin{Verbatim}
+\subsubsection{Aussehen}\index{arrow!Aussehen}
+Mit den Befehlen \lstinline+\setarrowlength+ (\ref{ssec:setarrowlength}) und \lstinline+\setarrowline+ (\ref{ssec:setarrowline}) lässt sich das prinzipielle Erscheinungsbild der Pfeile verändern.
+\index{arrow|)}
+
+\subsection{branch}\label{ssec:branch}\index{branch|(}\index{Befehle!branch}
+Der Befehl \lstinline=\branch= wird verwendet, um eine Verzweigung der Reaktion zu realisieren. \textbf{Wenn Sie ältere Versionen von \mC eingesetzt haben, beachten Sie, dass sich die Befehl-Syntax mit v1.3 verändert hat.}
+\begin{lstlisting}
\branch[<ausrichtung>,<anker>,<tikz>]{<formel(n)>}
-\end{Verbatim}
+\end{lstlisting}
Für den \lstinline+\branch+ wird die Ausrichtung und der Anker wichtig. Sehen wir uns ein Beispiel an.
\begin{Example}
\begin{rxn}
- \reactand[,start]{\chemfig{-[::30]=_[::-60](-[::-60])-[::60]}}
- \arrow[length=.75]{\ce{HCl}}{}
- \reactand{\chemfig{-[::30]-[::-60](-[::120]Cl)(-[::-60])-[::60]}}
+ \reactant[,start]{\chemfig{-[::30]=_[::-60](-[::-60])-[::60]}}
+ \arrow[,,.75]{\ce{HCl}}{}
+ \reactant{\chemfig{-[::30]-[::-60](-[::120]Cl)(-[::-60])-[::60]}}
\chemand
- \reactand{\chemfig{-[::30](-[::60]Cl)-[::-60](-[::-60])-[::60]}}
+ \reactant{\chemfig{-[::30](-[::60]Cl)-[::-60](-[::-60])-[::60]}}
\branch[below right=of start]{
- \arrow[direction=below right,length=.75]{\ce{H2O}}{}
- \reactand[below right]{\chemfig{-[::30]-[::-60](-[::120]OH)(-[::-60])-[::60]}}
+ \arrow[below right,,.75]{\ce{H2O}}{}
+ \reactant[below right]{\chemfig{-[::30]-[::-60](-[::120]OH)(-[::-60])-[::60]}}
\chemand
- \reactand{\chemfig{-[::30](-[::60]OH)-[::-60](-[::-60])-[::60]}}
+ \reactant{\chemfig{-[::30](-[::60]OH)-[::-60](-[::-60])-[::60]}}
}
\end{rxn}
\end{Example}
-In diesem Beispiel hat der erste Reaktand den Anker \lstinline+start+ bekommen (Zeile 2, siehe auch \ref{ssec:reactand}).
-\begin{Verbatim}[firstnumber=2]
- \reactand[,!!start!!]{ ... }
-\end{Verbatim}
+In diesem Beispiel hat der erste Reaktand den Anker \lstinline+start+ bekommen (Zeile 2, siehe auch \ref{ssec:reactant}).
+\begin{lstlisting}[firstnumber=2]
+ \reactant[,!!start!!]{ ... }
+\end{lstlisting}
\lstinline+\branch+ bezieht sich nun in seiner Ausrichtung darauf (Zeile 7):
-\begin{Verbatim}[firstnumber=7]
+\begin{lstlisting}[firstnumber=7]
\branch[below right!!=of start!!]{ ... }
-\end{Verbatim}
-Gibt man die Ausrichtung nicht in Bezug auf einen Anker an, bezieht sie sich immer auf den letzten \lstinline+reactand+ oder \lstinline+\arrow+. Lässt man das optionale Argument leer, dann platziert sich der Branch automatisch rechts.
+\end{lstlisting}
+Gibt man die Ausrichtung nicht in Bezug auf einen Anker an, bezieht sie sich immer auf den letzten \lstinline+reactant+ oder \lstinline+\arrow+. Lässt man das optionale Argument leer, dann platziert sich der Branch automatisch rechts.
\begin{SideBySideExample}
\begin{rxn}
- \reactand{ \chemfig{CH_2=CH-OH} }
- \arrow[type={<=>},length=.5]{}{}
- \branch{ \reactand{ \chemfig{CH_3-CH=O} } }
+ \reactant{ \chemfig{CH_2=CH-OH} }
+ \arrow[,<=>,.5]{}{}
+ \branch{ \reactant{ \chemfig{CH_3-CH=O} } }
\end{rxn}
\end{SideBySideExample}
Zur Ausrichtung haben Sie mehrere Möglichkeiten: Sie können den Branch entweder selbst auf die \lstinline+chain+ setzen oder ihn relativ zu einem Objekt platzieren.
@@ -819,75 +890,78 @@ Zur Ausrichtung haben Sie mehrere Möglichkeiten: Sie können den Branch entwede
\vitem+chain+ In diesem Fall geben Sie als Ausrichtung folgendes an: \lstinline+on chain=going <wert>+.
\item[relativ] In diesem Fall geben Sie folgendes an: \lstinline+<wert>=of <anker>+.
\end{description}
-Als \lstinline+<wert>+ können Sie die gleichen Werte einsetzen wie bei \lstinline+\reactand+, siehe \ref{ssec:reactand}. Die Voreinstellung ist \lstinline+on chain=going right+.
+Als \lstinline+<wert>+ können Sie die gleichen Werte einsetzen wie bei \lstinline+\reactant+, siehe \ref{ssec:reactant}. Die Voreinstellung ist \lstinline+on chain=going right+.
-\subsubsection{Ausrichtungsprobleme}\label{sssec:branch_ausrichtung}
+\subsubsection{Ausrichtungsprobleme}\label{sssec:branch_ausrichtung}\index{branch!Ausrichtung|(}
Wenn ein Pfeil zwei verschieden große Beschriftungen hat und in einem Branch liegt, wird der Branch nicht mehr richtig ausgerichtet. Der \lstinline=\arrow=-Key \lstinline=both= ist nicht wirklich eine Lösung, weil die kleinere Beschriftung dann nicht mehr am Pfeil liegt, sondern wegrutscht.
\begin{SideBySideExample}
\makevisible
\begin{rxn}
- \reactand[,a]{A}
+ \reactant[,a]{A}
\arrow{}{}
\branch[below=of a]{
- \arrow[direction=below,both]{\chemfig{-[::30]-[::-60]OH}}{\Hpl}
+ \arrow[below,,,,both]{\chemfig{-[::30]-[::-60]OH}}{\Hpl}
}
\end{rxn}
\makeinvisible
\end{SideBySideExample}
-In diesem Fall können Sie den Branch mit den \TikZ-Keys \lstinline=xshift= und \lstinline=yshift= verschieben.
+In diesem Fall können Sie den Branch mit den \TikZ-Keys \lstinline=xshift=\index{xshift} und \lstinline=yshift=\index{yshift} verschieben.
\begin{SideBySideExample}
\makevisible
\begin{rxn}
- \reactand[,a]{A}
+ \reactant[,a]{A}
\arrow{}{}
\branch[below=of a,,xshift=-1.35em]{
- \arrow[direction=below]{\chemfig{-[::30]-[::-60]OH}}{\Hpl}
+ \arrow[below]{\chemfig{-[::30]-[::-60]OH}}{\Hpl}
}
\end{rxn}
\makeinvisible
\end{SideBySideExample}
+\index{branch!Ausrichtung|)}\index{branch|)}
-\subsection{chemand}\label{ssec:chemand}
-\NEU%
+\subsection{chemand}\label{ssec:chemand}\index{chemand|(}\index{Befehle!chemand}
Der Befehl
-\begin{Verbatim}
+\begin{lstlisting}
\chemand[<ausrichtung>,<anker>,<tikz>]
-\end{Verbatim}
-erzeugt und platziert ein $+$ auf die gleiche Weise, wie \lstinline+\reactand+ beliebigen Text platziert.
+\end{lstlisting}
+erzeugt und platziert ein $+$ auf die gleiche Weise, wie \lstinline+\reactant+ beliebigen Text platziert.
\begin{Example}
\begin{rxn}
- \reactand{\chemfig{*6(------)}}
+ \reactant{\chemfig{*6(------)}}
\chemand
- \reactand{\ce{Br2}}
+ \reactant{\ce{Br2}}
\arrow{$h\nu$}{}
- \reactand{\chemfig{*6(--(-Br)----)}}
+ \reactant{\chemfig{*6(--(-Br)----)}}
\chemand
- \reactand{\ce{HBr}}
+ \reactant{\ce{HBr}}
\end{rxn}
\end{Example}
-Die optionalen Argumente von \lstinline+\chemand+ und \lstinline+\reactand+ sind die gleichen, siehe \ref{ssec:reactand}.
+Die optionalen Argumente von \lstinline+\chemand+ und \lstinline+\reactant+ sind die gleichen, siehe \ref{ssec:reactant} für eine Beschreibung.
+\index{chemand|)}
-\subsection{dummy}\label{ssec:dummy}
-Mit \lstinline=\dummy= zeichnet man eine leere Node. Die Pfeile, die mit \lstinline=\arrow= erzeugt werden, müssen einer Node nachfolgen. \lstinline=\arrow= ruft intern \lstinline=\tikzchainprevious= auf. Ist \emph{vor} einem Pfeil noch \emph{keine} Node auf die Chain geschrieben worden, erzeugt das eine Fehlermeldung. Duch setzen des \lstinline=\dummy= kann ein Schema dennoch mit einem Pfeil beginnen.
-\begin{SideBySideExample}
+\subsection{dummy}\label{ssec:dummy}\index{dummy|(}\index{Befehle!dummy}
+\NEU%
+Mit \lstinline=\dummy= zeichnet man eine leere Node. Bis Version 1.3 mussten die Pfeile, die mit \lstinline=\arrow= erzeugt werden, einer Node nachfolgen. \lstinline=\arrow= ruft intern \lstinline=\tikzchainprevious= auf. Ist \emph{vor} einem Pfeil noch \emph{keine} Node auf die Chain geschrieben worden, erzeugte das eine Fehlermeldung. Ähnliches galt für \lstinline+\branch+. Durch Setzen des \lstinline=\dummy= konnte ein Schema dennoch mit einem Pfeil beginnen.
+\begin{lstlisting}
\begin{rxn}
\dummy\arrow{}{}
\end{rxn}
-\end{SideBySideExample}
+\end{lstlisting}
+\textbf{Das ist nun \emph{nicht} mehr nötig.} Dennoch kann unter Umständen eine leere Node am Anfang als Anker zur Ausrichtung anderer Objekte ganz nützlich sein, weshalb der Befehl weiter zur Verfügung steht.
+\index{dummy|)}
-\subsection{elmove}\label{ssec:elmove}
+\subsection{elmove}\label{ssec:elmove}\index{elmove|(}\index{Befehle!elmove}
\lstinline=\elmove= ist lediglich ein Abkürzungsmakro für den \CF-Befehl \lstinline=\chemmove=.
-\begin{Verbatim}
+\begin{lstlisting}
\elmove[<tikz>]{<start>}{<startrichtung>}{<ende>}{<endrichtung>}
-\end{Verbatim}
+\end{lstlisting}
Das schreibt den Befehl
-\begin{Verbatim}
+\begin{lstlisting}
\chemmove{\draw[!!<tikz>!!](!!<start>!!).. controls +(!!<startrichtung>!!) and +(!!<endrichtung>!!)..(!!<ende>!!);}
-\end{Verbatim}
+\end{lstlisting}
mit \lstinline?[->,red,shorten <=3pt,shorten >=1pt]? als Voreinstellung für \lstinline=<tikz>=.
Wie \lstinline=\chemmove= funktioniert, können Sie im Manual zu \CF nachlesen.
-
\begin{Example}
\begin{center}
\setatomsep{1.8em}
@@ -895,151 +969,179 @@ Wie \lstinline=\chemmove= funktioniert, können Sie im Manual zu \CF nachlesen.
\elmove{e1}{60:4mm}{e2}{0:4mm}
\end{center}
\end{Example}
+\index{elmove|)}
-\subsection{makeinvisible}\label{ssec:makeinvisible}
-\Vii%
+\subsection{makeinvisible}\label{ssec:makeinvisible}\index{makeinvisible|(}\index{Befehle!makeinvisible}
Dieser Befehl hebt die Änderungen von \lstinline=\makevisible= (siehe \ref{ssec:makevisible}) auf und stellt das normale Verhalten von \mC wieder her. \lstinline=\makeinvisible= wirkt sich nur auf nachfolgende Reaktanden aus.
+\index{makeinvisible|)}
-\subsection{makevisible}\label{ssec:makevisible}
-\Vii%
+\subsection{makevisible}\label{ssec:makevisible}\index{makevisible|(}\index{Befehle!makevisible}
Mit \lstinline=\makevisible= können Sie die Nodes, innerhalb derer sich die Reaktanden befinden, farbig hervorheben. Das kann \zB bei der Positionierung und Feinjustierung von Branches ganz nützlich sein. Ein Beispiel dafür sehen Sie in \ref{ssec:arrow}. Je nach Art der Node ist die Markierung eine andere:
-\tikz[baseline=(X.base)]\node[draw=red!60](X){\texttt{\textbackslash reactand\{\}\{\}}};, \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\{\}\{\}}};. Siehe auch \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=purple, dotted](X){\texttt{\textbackslash branch\{\}}};. Siehe auch \ref{ssec:makeinvisible}.
\lstinline=\makevisible= wirkt sich nur auf nachfolgende Reaktanden aus.
\begin{SideBySideExample}
\makevisible
\begin{rxn}
- \reactand[,a]{A}
+ \reactant[,a]{A}
\arrow{a}{b}
\branch[below=of a]{
- \arrow[direction=below,both]{a}{b}
+ \arrow[below,,,,both]{a}{b}
}
\end{rxn}
\makeinvisible
\end{SideBySideExample}
+\index{makevisible|)}
-\subsection{marrow}\label{ssec:marrow}
+\subsection{marrow}\label{ssec:marrow}\index{marrow|(}\index{Befehle!marrow}
Der Befehl \lstinline=\marrow= zeichnet einen Mesomeriepfeil.
-\begin{Verbatim}
+\begin{lstlisting}
\marrow[<ausrichtung>]
-\end{Verbatim}
-Die Ausrichtung funktioniert analog zu \lstinline=\reactand= (\ref{ssec:reactand}), siehe auch \ref{ssec:mesomeric}.
+\end{lstlisting}
+Er ist eine Abkürzung für \lstinline+\arrow[<richtung>,<->,.5]{}{}+.
+\index{marrow|)}
-\subsection{mCsetup}\label{ssec:mCsetup}
-\NEU%
+\subsection{mCsetup}\label{ssec:mCsetup}\index{mCsetup|(}\index{Befehle!mCsetup}
Der Befehl
-\begin{Verbatim}
+\begin{lstlisting}
\mCsetup{<keys>}
-\end{Verbatim}
-kann verwendet werden, um alle Voreinstellungen zu verändern. Für jeden der \lstinline=\set<command>=-Befehle von \mC mit Ausnahme von \lstinline=\setbondshape= gibt es einen Key \lstinline+<command>=<value>+. Zusätzlich gibt es den Key \lstinline+align=<value>+, mit dem das Ausrichtungsverhalten von \lstinline=rxn= und \lstinline=rxnscheme= gleichzeitig geändert werden kann und den Key \lstinline=reset=, durch den alle Voreinstellungen wiederhergestellt werden.
+\end{lstlisting}
+kann verwendet werden, um alle Voreinstellungen zu verändern. Für jeden der \lstinline=\set<command>=-Befehle von \mC mit Ausnahme von \lstinline=\setbondshape= gibt es einen Key \lstinline+<command>=<value>+. Zusätzlich gibt es den Key \lstinline+align=<value>+, mit dem das Ausrichtungsverhalten von \lstinline=rxn= und \lstinline=rxnscheme= gleichzeitig geändert werden kann und den Key \lstinline=reset=, durch den alle Voreinstellungen wiederhergestellt werden.\index{mCsetup!align}\index{mCsetup!arrowlength}\index{mCsetup!atomsize}\index{mCsetup!bondlength}\index{mCsetup!mergelength}\index{mCsetup!rcndist}\index{mCsetup!rxnalign}\index{mCsetup!schemealign}\index{mCsetup!reset}
\begin{Example}
\mCsetup{
+ align=left,
arrowlength=3em,
- rcndist=2em,
+ arrowline=thick,
atomsize=\large,
bondlength=3em,
+ mergelength=4em,
+ rcndist=2em
%rxnalign=right,
%schemealign=left,
- align=left
}
\setbondshape{4pt}{2pt}{1pt}
\begin{rxn}
- \reactand{A}\arrow{}{}\reactand{\chemfig{A-(<[2])(<:[6])-B}}
+ \reactant{A}\arrow{}{}\reactant{\chemfig{A-(<[2])(<:[6])-B}}
\end{rxn}
\mCsetup{reset}
\begin{rxn}
- \reactand{A}\arrow{}{}\reactand{\chemfig{A-(<[2])(<:[6])-B}}
+ \reactant{A}\arrow{}{}\reactant{\chemfig{A-(<[2])(<:[6])-B}}
\end{rxn}
\end{Example}
+\index{mCsetup|)}
-\subsection{merge}\label{ssec:merge}
-Der \lstinline=merge=-Befehl sind nicht nur für den direkten Einsatz in den \mC-Um\-ge\-bun\-gen gedacht, sondern können flexibler in einem `tikzpicture' eingesetzt werden. Mit diesem Befehl können verschiedene Reaktionsstränge zu einem vereint werden. Dafür müssen die einzelnen zu vereinenden Reaktanden als `nodes' mit Namen gekennzeichnet sein.
-\begin{Verbatim}
- \merge[<key>]{<ziel>}{<start a>}{<start b>}
-\end{Verbatim}
-\begin{SideBySideExample}
- \begin{center}
- \begin{tikzpicture}
- \node(a) at (0,0) {A};
- \node(b) at (10em,0) {B};
- \node[draw,minimum size=3em](c) at (5em,-8em) {C};
- \merge{c}{a}{b}
- \node(d) at (0,-16em) {D};
- \node(e) at (10em,-16em) {E};
- \merge[direction=above]{c}{d}{e}
- \node(f) at (-3em,-4em) {F};
- \node(g) at (-3em,-12em) {G};
- \merge[direction=right]{c}{f}{g}
- \node(h) at (13em,-4em) {H};
- \node(i) at (13em,-12em) {I};
- \merge[direction=left]{c}{h}{i}
- \end{tikzpicture}
- \end{center}
-\end{SideBySideExample}
-Gibt man den Start- und dem Zielreaktanden Anker, funktioniert \lstinline=\merge= natürlich auch in den \mC-Umgebungen.
+\subsection{merge}\label{ssec:merge}\index{merge|(}\index{Befehle!merge}
+\NEU%
+Mit dem \lstinline+merge+-Befehl können verschiedene Reaktionsstränge zu einem vereint werden. Dafür müssen die einzelnen zu vereinenden Reaktanden mit einem Anker (\lstinline+\reactant[,<anker>]{}+, entsprechend bei Branches, siehe \ref{ssec:reactant} bzw. \ref{ssec:branch}) gekennzeichnet sein und \emph{vor} \lstinline+\merge+ gesetzt werden.
+\begin{lstlisting}
+ \merge[<beschriftung>,<richtung>,<länge>]{<ziel>}{<start a>}{<start b>}
+\end{lstlisting}
+\lstinline+\merge+ kann drei optionale Argumente bekommen und benötigt als Argumente die Anker-Namen der zu verbindenen Reaktanden.
+\begin{Example}
+ \begin{rxn}
+ \branch[,oben]{
+ \reactant[,start_a]{\chemfig{-[:30]-[:-30]OH}}
+ \reactant[,start_b,xshift=9em]{\chemfig{-[:30]=[:-30]O}}
+ }
+ \branch[below=of oben,ziel,yshift=-5em]{
+ \reactant{\chemfig{-[:30]-[:-30]O-[:30](-[2]OH)-[:-30]}}
+ }
+ \merge[\ce{[\Hyd]}]{ziel}{start_a}{start_b}
+ \end{rxn}
+\end{Example}
+Die Standard-\lstinline+<richtung>+ ist \lstinline+below+, andere mögliche Werte sind \lstinline+right+, \lstinline+left+ und \lstinline+above+. Mit \lstinline+<länge>+ kann die Länge des Pfeils \emph{ab der Zusammenführung} angegeben werden. Standard sind \SI{3}{\emlength}. Die Standardlänge kann über \lstinline+\setmergelength+\index{setmergelength} oder \lstinline+\mCsetup+\index{mCsetup} auch geändert werden.
+\begin{Example}
+ \begin{rxn}
+ \reactant[,start_a]{\chemfig{-[:30]-[:-30]OH}}
+ \branch[below=of start_a,start_b,yshift=-9em]{
+ \reactant{\chemfig{-[:30]=[:-30]O}}
+ }
+ \branch[right=of start_a,ziel,xshift=7em,yshift=-6em]{
+ \reactant{\chemfig{-[:30]-[:-30]O-[:30](-[2]OH)-[:-30]}}
+ }
+ \merge[\ce{[\Hyd]},right,5em]{ziel}{start_a}{start_b}
+ \end{rxn}
+\end{Example}
+Da man die Reaktanden vorher platzieren muss, ist es bestimmt hilfreich, die benötigten Abstände etwas im Auge zu behalten. Drei Werte bestimmen den benötigten Platz. Zum einen die {\color{green}Ausdehnung} der beteiligten Reaktanden, der Abstand der "`reaction-nodes"' {\color{red}rcndist} (siehe \ref{ssec:setrcndist}) voneinander und die Länge des \lstinline+\merge+-Pfeils {\color{blue}mergelength} (siehe auch \ref{ssec:setmergelength}).
+\begin{rxn}
+ \node[above](a) at (0,0){A};
+ \node[above](b) at (10em,0){B};
+ \node[below](c) at (5em,-6em){C};
+ \merge{c}{a}{b}
+ \draw (-8.5em,1em) -- (-8.5em,-9em);
+ \foreach \x in {-1,0,1,2,3,4,5,6,7,8,9}{
+ \draw (-8.5em,-\x em) -- (-8.7em,-\x em);
+ }
+ \draw[<->,red] (10em,0)--node[midway,right,xshift=.2em]{rcndist (default: 1em)}(10em,-1em);
+ \draw[<->,red] (0,0)--(0,-1em);
+ \draw[<->,red] (5em,-5em)--(5em,-6em);
+ \draw[<->,blue] (6em,-2em) --node[midway,right,xshift=.2em]{mergelength (default: 3em)} (6em,-5em);
+ \draw[<->,green] ($(a.base)+(-.5em,0)$)--node[midway,left,xshift=-.2em]{halber Reaktand}++(0,.5em);
+\end{rxn}
+Noch ein letztes Beispiel, bei dem zwei Stränge vereint werden.
\begin{Example}
\begin{rxn}
\setatomsep{1em}\tiny
% Strang 1
- \reactand[,oben]{ \chemfig{Cl-[:30,1.5]--[:-30,1.5]O-[:30,1.5]--[:-30,1.5]Cl}{} }
- \arrow[length=.5]{}{}
- \reactand[,start_oben]{ \chemfig{O(-[:-150]**6(-----(-OH)-))-[:90]-[:30]-[:-30]O-[:30]-[:-30]-[:-90]O-[:-30]**6(-(-HO)-----)} }
+ \reactant[,oben]{ \chemfig{Cl-[:30,1.5]--[:-30,1.5]O-[:30,1.5]--[:-30,1.5]Cl}{} }
+ \arrow[,,.5]{}{}
+ \reactant[,start_oben]{ \chemfig{O(-[:-150]**6(-----(-OH)-))-[:90]-[:30]-[:-30]O-[:30]-[:-30]-[:-90]O-[:-30]**6(-(-HO)-----)} }
% Strang 2
\branch[below=of oben,start_unten,xshift=8em,yshift=-4em]{
- \reactand{ \chemfig{**6((--[6,,,2]HO)-N-(--[6]OH)----)} }
- \arrow[length=.5]{}{}
- \reactand{ \chemfig{**6((--[6]Br)-N-(--[6]Br)----)} }
+ \reactant{ \chemfig{**6((--[6,,,2]HO)-N-(--[6]OH)----)} }
+ \arrow[,,.5]{}{}
+ \reactant{ \chemfig{**6((--[6]Br)-N-(--[6]Br)----)} }
}
% Ziel
\branch[right=of start_oben,ziel,xshift=5em,yshift=-4em]{
- \reactand[,c]{ \chemfig{O(-[:-150]**6(-----(-O?)-))-[:90]-[:30]**6(-N-(--[:-90]O-[:-30]**6(-(-O-[6]-[:-150]-[:150]O-[:-150]-[:150]?)-----))----)} }
+ \reactant[,c]{ \chemfig{O(-[:-150]**6(-----(-O?)-))-[:90]-[:30]**6(-N-(--[:-90]O-[:-30]**6(-(-O-[6]-[:-150]-[:150]O-[:-150]-[:150]?)-----))----)} }
}
% Zusammenfuehren:
- \merge[direction=right]{ziel}{start_oben}{start_unten}
+ \merge[,right]{ziel}{start_oben}{start_unten}
\end{rxn}
\end{Example}
-Beachten Sie, dass für die `nodes' in der Regel Branches verwendet werden sollten, wenn Sie \lstinline=\merge= in den \mC-Umgebungen verwenden. Die Verwendung von \lstinline=\merge= erfordert unter Umständen einige Spielerei mit Branches, xshift und yshift, bis man das gewünschte Ergebnis erhält.
+Die Verwendung von \lstinline=\merge= erfordert unter Umständen einige Spielerei mit Branches, \lstinline+xshift+\index{xshift} und \lstinline+yshift+\index{yshift}, bis man das gewünschte Ergebnis erhält.
\begin{Example}
\begin{rxn}
\setatomsep{1.5em}
- \reactand[,start_aa]{ \chemname{\chemfig{**6(---(-NH_2)---)}}{Anilin} }
- \reactand[below,start_ab,yshift=-3em]{ \chemname{\ce{HNO2}}{salpetrige S"aure} }
+ \reactant[,start_aa]{ \chemname{\chemfig{**6(---(-NH_2)---)}}{Anilin} }
+ \reactant[below,start_ab,yshift=-3em]{ \chemname{\ce{HNO2}}{salpetrige S"aure} }
\branch[right=of start_aa,ziel_a,xshift=6em,yshift=-5em]{
- \reactand{ \chemname{\chemfig{**6(---(-N|_2\op)---)}}{Diazoniumion} }
+ \reactant{ \chemname{\chemfig{**6(---(-N|_2\op)---)}}{Diazoniumion} }
}% = start_ba
\branch[below=of ziel_a,start_bb,yshift=-3em]{
- \reactand{ \chemname{\chemfig{**6(---(-NH_2)---)}}{Anilin} }
+ \reactant{ \chemname{\chemfig{**6(---(-NH_2)---)}}{Anilin} }
}
\branch[right=of ziel_a,ziel_b,xshift=6em,yshift=-5em]{
- \reactand{ \chemname{\chemfig{N(-[:-150]**6(------))=N-[:-30]**6(---(-NH_2)---)}}{p-Aminodiazobenzol} }
+ \reactant{ \chemname{\chemfig{N(-[:-150]**6(------))=N-[:-30]**6(---(-NH_2)---)}}{p-Aminodiazobenzol} }
}
- \merge[direction=right]{ziel_a}{start_aa}{start_ab}
- \merge[direction=right]{ziel_b}{ziel_a}{start_bb}
+ \merge[,right]{ziel_a}{start_aa}{start_ab}
+ \merge[,right]{ziel_b}{ziel_a}{start_bb}
\end{rxn}
\end{Example}
+\index{merge|)}
-\subsection{mesomeric}\label{ssec:mesomeric}
-\NEU%
-Der \lstinline=\mesomeric=-Befehl funktioniert wie ähnlich wie \lstinline=\branch= (\ref{ssec:branch}). Sein Zweck ist es, eckige Klammern zu setzen. \textbf{Wenn Sie ältere Versionen von \mC eingesetzt haben, beachten Sie, dass sich die Befehl-Syntax verändert hat.}
-\begin{Verbatim}
+\subsection{mesomeric}\label{ssec:mesomeric}\index{mesomeric|(}\index{Befehle!mesomeric}
+Der \lstinline=\mesomeric=-Befehl funktioniert wie ähnlich wie \lstinline=\branch= (\ref{ssec:branch}). Sein Zweck ist es, eckige Klammern zu setzen. \textbf{Wenn Sie ältere Versionen von \mC eingesetzt haben, beachten Sie, dass sich die Befehl-Syntax mit v1.3 verändert hat.}
+\begin{lstlisting}
\mesomeric[<ausrichtung>,<anker>,<tikz>]{<formel(n)>}
-\end{Verbatim}
-In \lstinline=<formel(n)>= werden die mesomeren Grenzstrukturen geschrieben. Mit \lstinline=\marrow=\linebreak (\ref{ssec:marrow}) werden die Mesomeriepfeile gesetzt. Man kann \lstinline=\mesomeric= falls nötig mit einem Anker (\lstinline=<anker>=) versehen (\ref{ssec:branch}). Die Ausrichtung funktioniert analog \lstinline=\reactand=.
+\end{lstlisting}
+In \lstinline=<formel(n)>= werden die mesomeren Grenzstrukturen geschrieben. Mit \lstinline=\marrow=\linebreak (\ref{ssec:marrow}) werden die Mesomeriepfeile gesetzt. Man kann \lstinline=\mesomeric= falls nötig mit einem Anker (\lstinline=<anker>=) versehen (\ref{ssec:branch}). Die Ausrichtung funktioniert analog \lstinline=\reactant=.
\begin{Example}
\begin{rxn}
\mesomeric{
- \reactand{
+ \reactant{
\chemfig{*6(=[@{e1}]-=-(-[:120]X)(-[:60]H)-(-[:-30,.4,,,white]\oplus)-[@{e2}])}
\elmove{e1}{60:4mm}{e2}{0:4mm}
}
\marrow
- \reactand{
+ \reactant{
\chemfig{*6(-(-[:90,.4,,,white]\oplus)-[@{e4}]=[@{e3}]-(-[:120]X)(-[:60]H)-=)}
\elmove{e3}{180:4mm}{e4}{150:4mm}
}
\marrow
- \reactand{
+ \reactant{
\chemfig{*6(-=-(-[:-150,.4,,,white]\oplus)-(-[:120]X)(-[:60]H)-=)}
}
}
@@ -1049,9 +1151,9 @@ Oder auch von oben nach unten:
\begin{SideBySideExample}
\begin{rxn}
\mesomeric{
- \reactand{ \chemfig{*6(=-=-=-)} }
+ \reactant{ \chemfig{*6(=-=-=-)} }
\marrow[below]
- \reactand[below]{ \chemfig{*6(-=-=-=)} }
+ \reactant[below]{ \chemfig{*6(-=-=-=)} }
}
\end{rxn}
\end{SideBySideExample}
@@ -1060,20 +1162,21 @@ Vielleicht auch einen Komplex?
\begin{rxn}
\setatomsep{3em}
\mesomeric[,a]{
- \reactand{ \chemfig{H_3\lewis{0,N}-[,1.35,,,dotted]{Cu}(-[2,,,,dotted]\lewis{6,N}H_3)(-[6,,,,dotted]\lewis{2,N}H_3)-[,1.2,,,dotted]\lewis{4,N}H_3} }
+ \reactant{ \chemfig{H_3\lewis{0,N}-[,1.35,,,dotted]{Cu}(-[2,,,,dotted]\lewis{6,N}H_3)(-[6,,,,dotted]\lewis{2,N}H_3)-[,1.2,,,dotted]\lewis{4,N}H_3} }
}
\node[above right=of a,yshift=-1em] {$2\oplus$};
\end{rxn}
\end{Example}
+\index{mesomeric|)}
-\subsection{reactand}\label{ssec:reactand}
+\subsection{reactant}\label{ssec:reactant}\index{reactant|(}\index{Befehle!reactant}
\NEU%
-Der Befehl \lstinline=\reactand= ist so etwas wie der Basisbefehl. \textbf{Wenn Sie ältere Versionen von \mC eingesetzt haben, beachten Sie, dass sich die Befehl-Syntax verändert hat.}
-\begin{Verbatim}
- \reactand[<ausrichtung>,<anker>,<tikz>]{<formel(n)>}
-\end{Verbatim}
+Der Befehl \lstinline=\reactant=\footnote{In älteren Versionen hieß der Befehl \texttt{\textbackslash reactand}. Dieser Befehl ist noch immer verfügbar.} ist so etwas wie der Basisbefehl. \textbf{Wenn Sie ältere Versionen von \mC eingesetzt haben, beachten Sie, dass sich die Befehl-Syntax mit v1.3 verändert hat.}
+\begin{lstlisting}
+ \reactant[<ausrichtung>,<anker>,<tikz>]{<formel(n)>}
+\end{lstlisting}
In diesen Befehl werden die Formeln (\lstinline=<formel>=) geschrieben und können, falls nötig, mit einem Anker (\lstinline=<anker>=) versehen werden. Die Ausrichtung kann die 8 Werte
-\begin{inparaenum}[(a)]
+\begin{alphlist}
\item \lstinline+right+,
\item \lstinline+above right+,
\item \lstinline+above+,
@@ -1082,111 +1185,137 @@ In diesen Befehl werden die Formeln (\lstinline=<formel>=) geschrieben und könn
\item \lstinline+below left+,
\item \lstinline+below+,
\item \lstinline+below right+
-\end{inparaenum}
+\end{alphlist}
annehmen, Voreinstellung ist (\lstinline+right+). Dieses Argument wird verwendet, wenn die Reaktionsgleichung nicht von links nach rechts, sondern \zB von oben nach unten verlaufen soll.
\begin{SideBySideExample}
%untereinander:
\begin{rxn}
- \reactand{\ce{Br2}}
- \reactand[below]{\ce{Cl2}}
+ \reactant{\ce{Br2}}
+ \reactant[below]{\ce{Cl2}}
\end{rxn}
%Beispiel mit mehreren Reaktanden:
\begin{rxn}
- \reactand{\ce{Br2}}
- \reactand[below]{\ce{I2}}
- \reactand{\ce{Cl2}}
+ \reactant{\ce{Br2}}
+ \reactant[below]{\ce{I2}}
+ \reactant{\ce{Cl2}}
\end{rxn}
%Reaktion von oben nach unten:
\begin{rxn}
- \reactand{\ce{Br-Br}}
- \arrow[length=.5,direction=below]{$h\nu$}{}
- \reactand[below]{\ce{2 ~\lewis{0.,Br}}}
+ \reactant{\ce{Br-Br}}
+ \arrow[below,,.5]{$h\nu$}{}
+ \reactant[below]{\ce{2 ~\lewis{0.,Br}}}
\end{rxn}
\end{SideBySideExample}
+\index{reactant|)}
-\subsection{rxn (Umgebung)}\label{ssec:rxn}
-Die Umgebung \lstinline=rxn= ist eine unnummerierte nicht gleitende Umgebung für Reaktionsschemata. Die Reaktionsschemata werden per Default zentriert. Die Voreinstellungen \lstinline=\setbondlength=, \lstinline=\setbondshape=, \lstinline=\setarrowlength= und \lstinline=\setatomsize= gelten hier ebenso wie bei\lstinline=rxnscheme=.
-\begin{Verbatim}
- \begin{rxn}[<keys>]
+\subsection{rxn (Umgebung)}\label{ssec:rxn}\index{rxn|(}\index{Befehle!rxn|see{rxn}}\index{Umgebung!rxn|see{rxn}}
+Die Umgebung \lstinline=rxn= ist eine unnummerierte nicht gleitende Umgebung für Reaktionsschemata. Die Reaktionsschemata werden per Default zentriert. Die Voreinstellungen \lstinline=\setbondlength=, \lstinline=\setbondshape=, \lstinline=\setarrowlength= und \lstinline=\setatomsize= gelten hier ebenso wie bei \lstinline=rxnscheme=.
+\begin{lstlisting}
+ \begin{rxn}[<align>,<scalefactor>]
...
\end{rxn}
-\end{Verbatim}
+\end{lstlisting}
-\subsubsection{Optionen}\label{sssec:rxn_optionen}
-\Vii\lstinline=rxn= hat zwei Keys:
-\begin{description}
- \vitem+align=<ausrichtung>+ das Ausrichtungsverhalten der \lstinline=rxn=-Umgebung, Default: center
- \vitem+scale=<factor>+ Skalierung der \lstinline=rxn=-Umgebung, Default: 1.0
-\end{description}
+\subsubsection{Optionen}\label{sssec:rxn_optionen}\index{rxn!Optionen|(}
+\NEU\lstinline=rxn= hat zwei Optionen, die in der angegebenen Reihenfolge, durch Komma separiert, einzusetzen sind:
+\begin{enumerate}
+ \item\lstinline+<align>+\index{rxn!Optionen!align} das Ausrichtungsverhalten der \lstinline=rxn=-Umgebung, Default: center
+ \item\lstinline+<scalefactor>+\index{rxn!Optionen!scale} Skalierung der \lstinline=rxn=-Umgebung, Default: 1.0
+\end{enumerate}
+Wenn Sie die \lstinline+<scalefactor>+-Option verwenden, können Sie auf seltsame Effekte bei \CF-Formeln stoßen.
+\begin{SideBySideExample}
+ \begin{rxn}[,.5]
+ \reactant{\chemfig{**6(------)}}
+ \end{rxn}
+\end{SideBySideExample}
+Die Skalierung hat keinen Einfluss auf die Größe der \CF-Formeln, skaliert aber den Aromatizitäts-Ring von Benzol und ähnlichen Molekülen. Die Ursache liegt in einem möglichen Bug von \CF.
+\begin{SideBySideExample}
+ \chemfig[scale=.5]{**6(------)}
+\end{SideBySideExample}
+Sie können das lösen, indem Sie entweder mit dem \emph{ersten} optionalen Argument von \lstinline+\chemfig+ den Ring wieder vergrößern, oder mit dem \emph{zweiten} Argument den Rest auch verkleinern.
+\begin{Example}
+ \begin{rxn}[,.5]
+ \reactant{\chemfig[scale=2]{**6(------)}}
+ \reactant{\chemfig[][scale=.5]{**6(------)}}
+ \end{rxn}
+ \chemfig[scale=.5][scale=.5]{**6(------)}
+\end{Example}
+Beispiele zur Ausrichtung:
\begin{Example}
- \begin{rxn}[align=center]
- \reactand{center}\arrow{}{}\reactand{zentriert}
+ \begin{rxn}[center]
+ \reactant{center}\arrow{}{}\reactant{zentriert}
\end{rxn}
- \begin{rxn}[align=right]
- \reactand{right}\arrow{}{}\reactand{rechts}
+ \begin{rxn}[right]
+ \reactant{right}\arrow{}{}\reactant{rechts}
\end{rxn}
- \begin{rxn}[align=left]
- \reactand{left}\arrow{}{}\reactand{links}
+ \begin{rxn}[left]
+ \reactant{left}\arrow{}{}\reactant{links}
\end{rxn}
\end{Example}
+\index{rxn!Optionen|)}\index{rxn|)}
-\subsection{rxnscheme (Umgebung)}\label{ssec:rxnscheme}
+\subsection{rxnscheme (Umgebung)}\label{ssec:rxnscheme}\index{rxnscheme|(}\index{Befehle!rxnscheme|see{rxnscheme}}\index{Umgebung!rxnscheme|see{rxnscheme}}
Die Umgebung \lstinline=rxnscheme= ist eine Gleitumgebung für Reaktionsschemata.
-\begin{Verbatim}
- \begin{rxnscheme}[<keys>]{<caption>}
+\begin{lstlisting}
+ \begin{rxnscheme}[<label>,<placement>,<align>,<scalefactor>,<name>]{<caption>}
...
\end{rxnscheme}
-\end{Verbatim}
-\subsubsection{Optionen}\label{sssec:rxnscheme_optionen}
-\begin{description}
- \vitem+label=<label>+ Wie jede Gleitumgebung kann auch \lstinline=rxnscheme= mit einem Label versehen werden. Setzen Sie \zB
- \begin{Verbatim}
- \begin{rxnscheme}[label={rs:schema}]{<caption>}
+\end{lstlisting}
+
+\subsubsection{Optionen}\label{sssec:rxnscheme_optionen}\index{rxnscheme!Optionen|(}
+\NEU\lstinline=rxnscheme= hat fünf Optionen, die in der angegebenen Reihenfolge, durch Komma separiert, einzusetzen sind:
+\begin{enumerate}
+ \item\lstinline+<label>+\index{rxnscheme!Optionen!label} Wie jede Gleitumgebung kann auch \lstinline=rxnscheme= mit einem Label versehen werden. Setzen Sie \zB
+ \begin{lstlisting}
+ \begin{rxnscheme}[rs:schema]{<caption>}
...
\end{rxnscheme}
- \end{Verbatim}
- ein, können Sie mit \lstinline=\ref{rs:schema}= wie gewohnt referenzieren.
- \vitem+scale=<scalefactor>+ Mit diesem Key kann das Reaktionsschema skaliert werden. Beachten Sie, dass er sich nicht auf die Schriftgröße und die Größe der \CF-Formeln auswirkt.
- \begin{Verbatim}
- \begin{rxnscheme}[scale=<scalefactor>]{<caption>}
+ \end{lstlisting}
+ ein, können Sie mit \lstinline=\ref{rs:schema}= wie gewohnt referenzieren.
+ \item\lstinline+<placement>+\index{rxnscheme!Optionen!placement} Hier können sie Platzierungsangaben wie \lstinline+htp+ angeben. Default ist \lstinline+H+ (genau hier). Ein Beispiel dafür ist \ref{rs:synthese} in \ref{ssec:tikzsynthese}.
+ \item\lstinline+<align>+\index{rxnscheme!Optionen!align}Mit dieser Option kann man auswählen, ob das Schema links, rechts oder mittig ausgerichtet wird.
+ \item\lstinline+<scalefactor>+\index{rxnscheme!Optionen!scale} Mit dieser Option kann das Reaktionsschema skaliert werden. Beachten Sie, dass sie sich nicht auf die Schriftgröße und die Größe der \CF-Formeln auswirkt. Sie können allerdings seltsame Auswirkungen auf \CF-Formeln beobachten, wenn Sie diese Option verwenden. Lesen Sie \ref{sssec:rxn_optionen} für weitere Informationen.
+ \begin{lstlisting}
+ \begin{rxnscheme}[,,,<scalefactor>]{<caption>}
...
\end{rxnscheme}
- \end{Verbatim}
- \vitem+align=<ausrichtung>+\settowidth{\tmplength}{\tt align=<ausrichtung>}\Vii[\tmplength]Mit diesem Key kann man auswählen, ob das Schema links, rechts oder mittig ausgerichtet wird.
-\end{description}
+ \end{lstlisting}
+ \item\lstinline+<name>+\index{rxnscheme!Optionen!name} Mit dieser Option lässt sich der Name des konkreten Schemas von "`Reaktionschema"' (oder "`Reaction scheme"') in \lstinline+<name>+ ändern.
+\end{enumerate}
\begin{Example}
- \begin{rxnscheme}[scale=2]{Gro\ss es Schema}
+ \begin{rxnscheme}[,,,2]{Gro\ss es Schema}
\large\setatomsep{3.5em}
- \reactand{ \chemfig{=[::30]-[::-60]OH} }
- \arrow[type={<=>}]{}{}
- \reactand{ \chemfig{-[::30]=[::-60]O} }
+ \reactant{ \chemfig{=[::30]-[::-60]OH} }
+ \arrow[,<=>]{}{}
+ \reactant{ \chemfig{-[::30]=[::-60]O} }
\end{rxnscheme}
- \begin{rxnscheme}[scale=.5]{Kleines Schema}
+ \begin{rxnscheme}[,,,.5]{Kleines Schema}
\tiny\setatomsep{1em}
- \reactand{ \chemfig{=[::30]-[::-60]OH} }
- \arrow[type={<=>}]{}{}
- \reactand{ \chemfig{-[::30]=[::-60]O} }
+ \reactant{ \chemfig{=[::30]-[::-60]OH} }
+ \arrow[,<=>]{}{}
+ \reactant{ \chemfig{-[::30]=[::-60]O} }
\end{rxnscheme}
\begin{rxnscheme}{center}
- \reactand{center}\arrow{}{}\reactand{zentriert}
+ \reactant{center}\arrow{}{}\reactant{zentriert}
\end{rxnscheme}
- \begin{rxnscheme}[align=right]{right}
- \reactand{right}\arrow{}{}\reactand{rechts}
+ \begin{rxnscheme}[,,right]{right}
+ \reactant{right}\arrow{}{}\reactant{rechts}
\end{rxnscheme}
- \begin{rxnscheme}[align=left]{left}
- \reactand{left}\arrow{}{}\reactand{links}
+ \begin{rxnscheme}[,,left]{left}
+ \reactant{left}\arrow{}{}\reactant{links}
\end{rxnscheme}
\end{Example}
+\index{rxnscheme!Optionen|)}
-\subsubsection{rxnscheme anpassen}\label{sssec:rxnscheme_anpassen}
-\paragraph{Stil}
+\subsubsection{rxnscheme anpassen}\label{sssec:rxnscheme_anpassen}\index{rxnscheme!anpassen|(}
+\paragraph{Stil}\index{rxnscheme!anpassen!Stil}
Wenn Ihnen der Stil nicht gefällt, können Sie diesen mit
-\begin{Verbatim}
+\begin{lstlisting}
\floatstyle{<neuer Stil>}
\restylefloat{rxnfloat}
-\end{Verbatim}
+\end{lstlisting}
ändern. Als Stile stehen durch das `float'-Paket
\begin{description}
\vitem=plain= Ohne spezielle Formatierungen, Legende erscheint unter dem Objekt
@@ -1197,968 +1326,1091 @@ Wenn Ihnen der Stil nicht gefällt, können Sie diesen mit
zur Verfügung.
\begin{Example}
\begin{rxnscheme}{ruled}
- \reactand{Standard-Stil}
+ \reactant{Standard-Stil}
\end{rxnscheme}
\floatstyle{boxed}
\restylefloat{rxnfloat}
\begin{rxnscheme}{boxed}
- \reactand{mit Rahmen}
+ \reactant{mit Rahmen}
\end{rxnscheme}
\floatstyle{plain}
\restylefloat{rxnfloat}
\begin{rxnscheme}{plain}
- \reactand{ohne Schnickschnack}
+ \reactant{ohne Schnickschnack}
\end{rxnscheme}
\end{Example}
\floatstyle{ruled}
\restylefloat{rxnfloat}
-\paragraph{Platzierung}
-Auch das Platzierungsverhalten, das in der Voreinstellung \lstinline=H= ist, können Sie entsprechend ändern.
-\begin{Verbatim}
+\paragraph{Platzierung}\index{rxnscheme!anpassen!Platzierung}
+Auch das Platzierungsverhalten, das in der Voreinstellung \lstinline=H= (genau hier) ist, können Sie entsprechend ändern.
+\begin{lstlisting}
\floatplacement{rxnfloat}{<position>}
-\end{Verbatim}
+\end{lstlisting}
Einfacher ist allerdings der Aufruf von \mC mit entsprechender Option.
-\begin{Verbatim}
+\begin{lstlisting}
\usepackage[placement=<position>]{mychemistry}
-\end{Verbatim}
-Sie können auch das Verhalten einer einzigen Umgebung durch Angabe eines Keys ändern.
-\begin{Verbatim}
- \begin{rxnscheme}[placement=<position>]{<caption>}
+\end{lstlisting}
+Sie können auch das Verhalten einer einzigen Umgebung durch Angabe der entsprechenden Option ändern.
+\begin{lstlisting}
+ \begin{rxnscheme}[,<placement>]{<caption>}
...
\end{rxnscheme}
-\end{Verbatim}
-\paragraph{Benennung}\label{par:rxnscheme_name}
+\end{lstlisting}
+\paragraph{Benennung}\label{par:rxnscheme_name}\index{rxnscheme!anpassen!Benennung}
Wollen Sie den Namen der Beschriftung ändern, können Sie das mit
-\begin{Verbatim}
+\begin{lstlisting}
\setschemename{<neuer name>}
-\end{Verbatim}
+\end{lstlisting}
machen. Voreinstellung ist "`Reaktionschema"' bzw "`Reaction scheme"' bei der Paketoption `english'.
-\paragraph{Zähler}
+\paragraph{Zähler}\index{rxnscheme!anpassen!Zaehler@Zähler}
Um den Zähler zu ändern, gehen Sie wie üblich vor. Durch
-\begin{Verbatim}
+\begin{lstlisting}
\makeatletter
\@addtoreset{rxnfloat}{section}
\makeatother
\renewcommand{\therxnfloat}{\arabic{section}.\arabic{rxnfloat}}
-\end{Verbatim}
+\end{lstlisting}
wird der Zähler der Schemata \zB mit jeder neuen \lstinline=section= zurückgesetzt und die Nummer nach den Muster \lstinline=section.rxnscheme= ausgegeben. Beachten Sie, dass Sie wegen des {@} den Aufruf mit \lstinline=\makeatletter= und\lstinline=\makeatother= begrenzen müssen.
-\paragraph{Verzeichnis}
+\paragraph{Verzeichnis}\index{rxnscheme!anpassen!Verzeichnis}
Mit
-\begin{Verbatim}
+\begin{lstlisting}
\listof{rxnfloat}{<titel>}
-\end{Verbatim}
+\end{lstlisting}
können Sie eine Liste aller Reaktionsschemata erzeugen:
\begin{SideBySideExample}
\listof{rxnfloat}{Reaktionsschemata}
\end{SideBySideExample}
+\index{rxnscheme!anpassen|)}\index{rxnscheme|)}
-\subsection{setarrowlength}\label{ssec:setarrowlength}
-\NEU%
+\subsection{setarrowlength}\label{ssec:setarrowlength}\index{setarrowlength|(}\index{Befehle!setarrowlength}
Reaktionspfeile haben als Standardwert die Länge \SI{5.0}{\emlength} oder $5.0\cdot\sqrt{2}\,\si{\emlength}$ im Fall der schrägen Pfeile. Die Voreinstellung lässt sich mit
-\begin{Verbatim}
+\begin{lstlisting}
\setarrowlength{<länge>}
-\end{Verbatim}
+\end{lstlisting}
auf \UseVerb{arrowlength} bzw. $\text{\UseVerb{arrowlength}}\cdot\sqrt{2}$ ändern. Beachten Sie, dass Sie eine Längeneinheit verwenden müssen. Lassen Sie das Argument leer, wird die Voreinstellung wiederhergestellt.
{\bfseries Dieser Befehl ersetzt \lstinline+\arrowlength+, der bis Version 1.2 noch verfügbar war.}
+\index{setarrowlength|)}
-\subsection{setatomsize}\label{ssec:setatomsize}
+\subsection{setarrowline}\label{ssec:setarrowline}\index{setarrowline|(}\index{Befehle!setarrowline}
+\NEU%
+Mit dem Befehl
+\begin{lstlisting}
+ \setarrowline{<value>}
+\end{lstlisting}
+lässt sich die Dicke der Pfeillinien einstellen. Mögliche Werte sind
+ \begin{flushleft}
+ \begin{tikzpicture}
+ \draw[ultra thin] (0,0)--(1,0)node[right]{\tt ultra thin};
+ \draw[very thin] (0,-.5)--(1,-.5)node[right]{\tt very thin};
+ \draw[thin] (0,-1)--(1,-1)node[right]{\tt thin};
+ \draw[semithick] (0,-1.5)--(1,-1.5)node[right]{{\tt semithick} (default)};
+ \draw[thick] (0,-2)--(1,-2)node[right]{\tt thick};
+ \draw[very thick] (0,-2.5)--(1,-2.5)node[right]{\tt very thick};
+ \draw[ultra thick] (0,-3)--(1,-3)node[right]{\tt ultra thick};
+ \end{tikzpicture}
+\end{flushleft}
+Die Werte \lstinline+very thick+ und \lstinline+ultra thick+ sind nicht zu empfehlen.
+
+Die Einstellung gilt auch für \lstinline+\merge+\index{merge}.
+\index{setarrowline|)}
+
+\subsection{setatomsize}\label{ssec:setatomsize}\index{setatomsize|(}\index{Befehle!setatomsize}
Mit
-\begin{Verbatim}
+\begin{lstlisting}
\setatomsize{<größe>}
-\end{Verbatim}
+\end{lstlisting}
lässt sich die Schriftgröße der Atomgruppen verändern. Standard ist \lstinline=\small=. Lassen Sie das Argument leer, wird die Voreinstellung wiederhergestellt.
{\bfseries Dieser Befehl ersetzt \lstinline+\atomsize+, der bis Version 1.2 noch verfügbar war.}
+\index{setatomsize|)}
-\subsection{setbondlength}\label{ssec:setbondlength}
+\subsection{setbondlength}\label{ssec:setbondlength}\index{setbondlength|(}\index{Befehle!setbondlength}
Mit
-\begin{Verbatim}
+\begin{lstlisting}
\setbondlength{<länge>}
-\end{Verbatim}
+\end{lstlisting}
lässt sich \lstinline=\setatomsep{<länge>}= für die \CF-Formeln \emph{innerhalb} der \mC-Umgebungen einstellen. Standard ist \SI{1.8}{\emlength}. Lassen Sie das Argument leer, wird die Voreinstellung wiederhergestellt.
{\bfseries Dieser Befehl ersetzt \lstinline+\bondlength+, der bis Version 1.2 noch verfügbar war.}
+\index{setbondlength|)}
-\subsection{setbondshape}\label{ssec:setbondshape}
+\subsection{setbondshape}\label{ssec:setbondshape}\index{setbondshape|(}\index{Befehle!setbondshape}
Mit
-\begin{Verbatim}
+\begin{lstlisting}
\setbondshape{<basislänge>}{<strichdicke>}{<strichabstand>}
-\end{Verbatim}
+\end{lstlisting}
lässt sich \lstinline=\setcrambond{<basislänge>}{<strichdicke>}{<strichabstand>}= für die \CF-Formeln \emph{innerhalb} der \mC-Umgebungen einstellen. Standard sind in dieser Reihenfolge \SI{3}{\pt}, \SI{.5}{\pt} und \SI{1}{\pt}. Lassen Sie die Argumente leer, wird die jeweilige Voreinstellung wiederhergestellt.
{\bfseries Dieser Befehl ersetzt \lstinline+\bondshape+, der bis Version 1.2 noch verfügbar war.}
+\index{setbondshape|)}
-\subsection{setrcndist}\label{ssec:setrcndist}
-\Vii%
+\subsection{setmergelength}\label{ssec:setmergelength}\index{setmergelength|(}\index{Befehle!setmergelength}
+\NEU%
+Mit
+\begin{lstlisting}
+ \setmergelength{<länge>}
+\end{lstlisting}
+kann die Länge des Pfeils beim \lstinline+\merge+-Befehl geändert werden. Genauer ist damit die Länge ab Zusammenführung bis zur Pfeilspitze gemeint (siehe \ref{ssec:merge}). Lässt man das Argument leer, wird die Voreinstellung (\SI{3}{\emlength}) wiederhergestellt.
+\index{setmergelength|)}
+
+\subsection{setrcndist}\label{ssec:setrcndist}\index{setrcndist|(}\index{Befehle!setrcndist}
Die einzelnen Nodes, in denen die Reaktanden und Pfeile geschrieben werden, haben in den \mC-Umgebungen einen bestimmten Abstand voneinander. Per Default ist das \SI{1}{\emlength}. Wenn Sie das ändern wollen, können Sie das mit
-\begin{Verbatim}
+\begin{lstlisting}
\setrcndist{<länge>}
-\end{Verbatim}
+\end{lstlisting}
machen. Lassen Sie das Argument leer, wird der Abstand wieder auf \SI{1}{\emlength} zurückgesetzt.
\begin{SideBySideExample}
\setrcndist{2em}
\begin{rxn}
- \reactand{A}\arrow{}{}
+ \reactant{A}\arrow{}{}
\end{rxn}
\setrcndist{}
\begin{rxn}
- \reactand{A}\arrow{}{}
+ \reactant{A}\arrow{}{}
\end{rxn}
\end{SideBySideExample}
+\index{setrcndist|)}
-\subsection{setrxnalign/setschemealign}\label{ssec:setrxnalign}\label{ssec:setschemealign}
-\Vii%
+\subsection{setrxnalign/setschemealign}\label{ssec:setrxnalign}\label{ssec:setschemealign}\index{setrxnalign|(}\index{Befehle!setrxnalign}\index{setschemealign|(}\index{Befehle!setschemealign}
Mit den Befehlen
-\begin{Verbatim}
+\begin{lstlisting}
\setrxnalign{<alignment>}
\setschemealign{<alignment>}
-\end{Verbatim}
+\end{lstlisting}
lässt sich das Default-Ausrichtungsverhalten (siehe \ref{sssec:rxn_optionen} \&\ \ref{sssec:rxnscheme_optionen}) der Umgebungen festlegen. Es gibt die Einstellungsmöglichkeiten \lstinline=left=, \lstinline=center= oder \lstinline=right=.
Lassen Sie das Argument leer, wird die Defaulteinstellung von \mC (\lstinline=center=) wiederhergestellt.
\begin{Example}
\setrxnalign{right}
\begin{rxn}
- \reactand{A}\arrow{}{}\reactand{B}
+ \reactant{A}\arrow{}{}\reactant{B}
\end{rxn}
\setrxnalign{}
\begin{rxn}
- \reactand{A}\arrow{}{}\reactand{B}
+ \reactant{A}\arrow{}{}\reactant{B}
\end{rxn}
\end{Example}
+\index{setrxnalign|)}\index{setschemealign|)}
-\subsection{setschemename}\label{ssec:setschemename}
+\subsection{setschemename}\label{ssec:setschemename}\index{setschemename|(}\index{Befehle!setschemename}
Siehe \ref{par:rxnscheme_name}.
+\index{setschemename|)}
-\subsection{transition}\label{ssec:transition}
-\NEU\lstinline=\transition= funktioniert genau wie \lstinline=\reactand= (siehe \ref{ssec:reactand}). \textbf{Wenn Sie ältere Versionen von \mC eingesetzt haben, beachten Sie, dass sich die Befehl-Syntax verändert hat.}
-\begin{Verbatim}
+\subsection{transition}\label{ssec:transition}\index{transition|(}\index{Befehle!transition}
+\lstinline=\transition= funktioniert genau wie \lstinline=\reactant= (siehe \ref{ssec:reactant}). \textbf{Wenn Sie ältere Versionen von \mC eingesetzt haben, beachten Sie, dass sich die Befehl-Syntax mit v1.3 verändert hat.}
+\begin{lstlisting}
\transition[<ausrichtung>,<anker>,<tikz>]{<formel>}
-\end{Verbatim}
+\end{lstlisting}
\begin{SideBySideExample}
\begin{rxn}
- \reactand{ \ce{H2 + I2} }
- \arrow[type={<=>},length=.5,direction=below]{}{}
+ \reactant{ \ce{H2 + I2} }
+ \arrow[below,<=>,.5]{}{}
\transition[below]{ \chemfig[dotted][]{H?-I-[2]I-[4]H?} }
- \arrow[type={<=>},length=.5,direction=below]{}{}
- \reactand[below]{ \ce{2 HI} }
+ \arrow[below,<=>,.5]{}{}
+ \reactant[below]{ \ce{2 HI} }
\end{rxn}
\end{SideBySideExample}
+\index{transition|)}
\section{Beispiele}
\subsection{Addition}\label{ssec:addition}
Ein einfaches Reaktionschema mit zwei unterschiedlichen Produkten.
\begin{rxnscheme}{Additionsreaktion}
- \reactand{ \chemfig{=_[::-30]-[::60](=[::60]O)-[::-60]} }
+ \reactant{ \chemfig{=_[::-30]-[::60](=[::60]O)-[::-60]} }
\arrow{ $+ \Hpl$ }{}
\mesomeric[,gf]{
- \reactand{ \chemfig{=_[:-30]-[::60](-[::60]OH)(-[::-120,.3,,,white]\oplus)-[::-60]} }
+ \reactant{ \chemfig{=_[:-30]-[::60](-[::60]OH)(-[::-120,.3,,,white]\oplus)-[::-60]} }
\marrow[below]
- \reactand[below]{ \chemfig{\oplus-[6,.3,,,white]-[:-30]=_[::60](-[::60]OH)-[::-60]} }
+ \reactant[below]{ \chemfig{\oplus-[6,.3,,,white]-[:-30]=_[::60](-[::60]OH)-[::-60]} }
}
\branch[right=of gf,,yshift=3em]{
\arrow{}{}
- \reactand{ \chemname{\chemfig{=_[:-30]-[::60](-[::60]OH)(-[::-120]R)-[::-60]}}{1,2-Addukt} }
+ \reactant{ \chemname{\chemfig{=_[:-30]-[::60](-[::60]OH)(-[::-120]R)-[::-60]}}{1,2-Addukt} }
}
\branch[right=of gf,,yshift=-5em]{
\arrow{}{}
- \reactand{ \chemname{\chemfig{R-[6]-[:-30]=_[::60](-[::60]OH)-[::-60]}}{1,4-Addukt} }
+ \reactant{ \chemname{\chemfig{R-[6]-[:-30]=_[::60](-[::60]OH)-[::-60]}}{1,4-Addukt} }
}
\end{rxnscheme}
-
Schritt für Schritt. Zunächst das Edukt und der erste Reaktionspfeil.
-\begin{Verbatim}
- \reactand{ \chemfig{=_[::-30]-[::60](=[::60]O)-[::-60]} }
+\begin{lstlisting}
+ \reactant{ \chemfig{=_[::-30]-[::60](=[::60]O)-[::-60]} }
\arrow{ $+ \Hpl$ }{}
-\end{Verbatim}
+\end{lstlisting}
\begin{rxn}
- \reactand{ \chemfig{=_[::-30]-[::60](=[::60]O)-[::-60]} }
+ \reactant{ \chemfig{=_[::-30]-[::60](=[::60]O)-[::-60]} }
\arrow{ $+ \Hpl$ }{}
\end{rxn}
-Anschließend die mesomeren Grenzformeln:
-\begin{Verbatim}[firstnumber=3]
+Anschließend die mesomeren Grenzformeln:\index{mesomeric}
+\begin{lstlisting}[firstnumber=3]
\mesomeric[,gf]{
- \reactand{ \chemfig{=_[:-30]-[::60](-[::60]OH)(-[::-120,.3,,,white]\oplus)-[::-60]} }
+ \reactant{ \chemfig{=_[:-30]-[::60](-[::60]OH)(-[::-120,.3,,,white]\oplus)-[::-60]} }
\marrow[below]
- \reactand[below]{ \chemfig{\oplus-[6,.3,,,white]-[:-30]=_[::60](-[::60]OH)-[::-60]} }
+ \reactant[below]{ \chemfig{\oplus-[6,.3,,,white]-[:-30]=_[::60](-[::60]OH)-[::-60]} }
}
-\end{Verbatim}
+\end{lstlisting}
\begin{rxn}
- \reactand{ \chemfig{=_[::-30]-[::60](=[::60]O)-[::-60]} }
+ \reactant{ \chemfig{=_[::-30]-[::60](=[::60]O)-[::-60]} }
\arrow{ $+ \Hpl$ }{}
\mesomeric[,gf]{
- \reactand{ \chemfig{=_[:-30]-[::60](-[::60]OH)(-[::-120,.3,,,white]\oplus)-[::-60]} }
+ \reactant{ \chemfig{=_[:-30]-[::60](-[::60]OH)(-[::-120,.3,,,white]\oplus)-[::-60]} }
\marrow[below]
- \reactand[below]{ \chemfig{\oplus-[6,.3,,,white]-[:-30]=_[::60](-[::60]OH)-[::-60]} }
+ \reactant[below]{ \chemfig{\oplus-[6,.3,,,white]-[:-30]=_[::60](-[::60]OH)-[::-60]} }
}
\end{rxn}
-Nun den Branch zum 1,2-Addukt, mit yshift nach oben verschoben:
-\begin{Verbatim}[firstnumber=8]
+Nun den Branch\index{branch} zum 1,2-Addukt, mit \lstinline+yshift+\index{yshift} nach oben verschoben:
+\begin{lstlisting}[firstnumber=8]
\branch[right=of gf,,yshift=3em]{
\arrow{}{}
- \reactand{ \chemname{\chemfig{=_[:-30]-[::60](-[::60]OH)(-[::-120]R)-[::-60]}}{1,2-Addukt} }
+ \reactant{ \chemname{\chemfig{=_[:-30]-[::60](-[::60]OH)(-[::-120]R)-[::-60]}}{1,2-Addukt} }
}
-\end{Verbatim}
+\end{lstlisting}
\begin{rxn}
- \reactand{ \chemfig{=_[::-30]-[::60](=[::60]O)-[::-60]} }
+ \reactant{ \chemfig{=_[::-30]-[::60](=[::60]O)-[::-60]} }
\arrow{ $+ \Hpl$ }{}
\mesomeric[,gf]{
- \reactand{ \chemfig{=_[:-30]-[::60](-[::60]OH)(-[::-120,.3,,,white]\oplus)-[::-60]} }
+ \reactant{ \chemfig{=_[:-30]-[::60](-[::60]OH)(-[::-120,.3,,,white]\oplus)-[::-60]} }
\marrow[below]
- \reactand[below]{ \chemfig{\oplus-[6,.3,,,white]-[:-30]=_[::60](-[::60]OH)-[::-60]} }
+ \reactant[below]{ \chemfig{\oplus-[6,.3,,,white]-[:-30]=_[::60](-[::60]OH)-[::-60]} }
}
\branch[right=of gf,,yshift=3em]{
\arrow{}{}
- \reactand{ \chemname{\chemfig{=_[:-30]-[::60](-[::60]OH)(-[::-120]R)-[::-60]}}{1,2-Addukt} }
+ \reactant{ \chemname{\chemfig{=_[:-30]-[::60](-[::60]OH)(-[::-120]R)-[::-60]}}{1,2-Addukt} }
}
\end{rxn}
-Zuletzt den Branch zum 1,4-Addukt, mit yshift nach unten verschoben:
-\begin{Verbatim}[firstnumber=12]
+Zuletzt den Branch\index{branch} zum 1,4-Addukt, mit \lstinline+yshift+\index{yshift} nach unten verschoben:
+\begin{lstlisting}[firstnumber=12]
\branch[right=of gf,,yshift=-5em]{
\arrow{}{}
- \reactand{ \chemname{\chemfig{R-[6]-[:-30]=_[::60](-[::60]OH)-[::-60]}}{1,4-Addukt} }
+ \reactant{ \chemname{\chemfig{R-[6]-[:-30]=_[::60](-[::60]OH)-[::-60]}}{1,4-Addukt} }
}
-\end{Verbatim}
+\end{lstlisting}
\begin{rxn}
- \reactand{ \chemfig{=_[::-30]-[::60](=[::60]O)-[::-60]} }
+ \reactant{ \chemfig{=_[::-30]-[::60](=[::60]O)-[::-60]} }
\arrow{ $+ \Hpl$ }{}
\mesomeric[,gf]{
- \reactand{ \chemfig{=_[:-30]-[::60](-[::60]OH)(-[::-120,.3,,,white]\oplus)-[::-60]} }
+ \reactant{ \chemfig{=_[:-30]-[::60](-[::60]OH)(-[::-120,.3,,,white]\oplus)-[::-60]} }
\marrow[below]
- \reactand[below]{ \chemfig{\oplus-[6,.3,,,white]-[:-30]=_[::60](-[::60]OH)-[::-60]} }
+ \reactant[below]{ \chemfig{\oplus-[6,.3,,,white]-[:-30]=_[::60](-[::60]OH)-[::-60]} }
}
\branch[right=of gf,,yshift=3em]{
\arrow{}{}
- \reactand{ \chemname{\chemfig{=_[:-30]-[::60](-[::60]OH)(-[::-120]R)-[::-60]}}{1,2-Addukt} }
+ \reactant{ \chemname{\chemfig{=_[:-30]-[::60](-[::60]OH)(-[::-120]R)-[::-60]}}{1,2-Addukt} }
}
\branch[right=of gf,,yshift=-5em]{
\arrow{}{}
- \reactand{ \chemname{\chemfig{R-[6]-[:-30]=_[::60](-[::60]OH)-[::-60]}}{1,4-Addukt} }
+ \reactant{ \chemname{\chemfig{R-[6]-[:-30]=_[::60](-[::60]OH)-[::-60]}}{1,4-Addukt} }
}
\end{rxn}
Der komplette Code ist also der folgende:
-\begin{Verbatim}
+\begin{lstlisting}
\begin{rxnscheme}{Additionsreaktion}
- \reactand{ \chemfig{=_[::-30]-[::60](=[::60]O)-[::-60]} }
+ \reactant{ \chemfig{=_[::-30]-[::60](=[::60]O)-[::-60]} }
\arrow{ $+ \Hpl$ }{}
\mesomeric[,gf]{
- \reactand{ \chemfig{=_[:-30]-[::60](-[::60]OH)(-[::-120,.3,,,white]\oplus)-[::-60]} }
+ \reactant{ \chemfig{=_[:-30]-[::60](-[::60]OH)(-[::-120,.3,,,white]\oplus)-[::-60]} }
\marrow[below]
- \reactand[below]{ \chemfig{\oplus-[6,.3,,,white]-[:-30]=_[::60](-[::60]OH)-[::-60]} }
+ \reactant[below]{ \chemfig{\oplus-[6,.3,,,white]-[:-30]=_[::60](-[::60]OH)-[::-60]} }
}
\branch[right=of gf,,yshift=3em]{
\arrow{}{}
- \reactand{ \chemname{\chemfig{=_[:-30]-[::60](-[::60]OH)(-[::-120]R)-[::-60]}}{1,2-Addukt} }
+ \reactant{ \chemname{\chemfig{=_[:-30]-[::60](-[::60]OH)(-[::-120]R)-[::-60]}}{1,2-Addukt} }
}
\branch[right=of gf,,yshift=-5em]{
\arrow{}{}
- \reactand{ \chemname{\chemfig{R-[6]-[:-30]=_[::60](-[::60]OH)-[::-60]}}{1,4-Addukt} }
+ \reactant{ \chemname{\chemfig{R-[6]-[:-30]=_[::60](-[::60]OH)-[::-60]}}{1,4-Addukt} }
}
\end{rxnscheme}
-\end{Verbatim}
+\end{lstlisting}
-\newpage
\subsection{Mesomerie}
Folgendes Reaktionsschema soll verwirklicht werden.
-\begin{rxnscheme}[scale=.8]{Elektrophile Substitution}
+\begin{rxnscheme}[,,,.8]{Elektrophile Substitution}
\setatomsep{1.6em}
- \reactand[,start]{ \chemname{\chemfig{*6(-=-=(-[,,,,white]\phantom{Br})-=)}}{Benzol \compound{benzol}} }
+ \reactant[,start]{ \chemname{\chemfig{*6(-=-=(-[,,,,white]\phantom{Br})-=)}}{Benzol \compound{benzol}} }
\branch[below=of start]{
- \arrow[direction=below,name=pfeil_a,both]{\ce{Br2 / AlBr3}}{$-\ce{AlBr4\om}$}
+ \arrow[below,,,pfeil_a,both]{\ce{Br2 / AlBr3}}{$-\ce{AlBr4\om}$}
}
\branch[below=of pfeil_a,mesomerie,xshift=8.5em]{
\mesomeric{
- \reactand{
+ \reactant{
\chemfig{*6(=[@{e1}]-=-(-[:120]Br)(-[:60]H)-(-[:-30,.4,,,white]\oplus)-[@{e2}])}
\elmove{e1}{60:4mm}{e2}{0:4mm}
}
\marrow
- \reactand{
+ \reactant{
\chemfig{*6(-(-[:90,.4,,,white]\oplus)-[@{e4}]=[@{e3}]-(-[:120]Br)(-[:60]H)-=)}
\elmove{e3}{180:4mm}{e4}{150:4mm}
}
\marrow
- \reactand{
+ \reactant{
\chemfig{*6(-=-(-[:-150,.4,,,white]\oplus)-(-[:120]Br)(-[:60]H)-=)}
}
}
}
\branch[above=of mesomerie,,xshift=7.25em]{
- \arrow[direction=above]{$-\Hpl$}{}
+ \arrow[above]{$-\Hpl$}{}
}
- \arrow[length=2.6]{}{}
- \reactand{ \chemname{\chemfig{*6(-=-=(-Br)-=)}}{Brombenzol \compound{brombenzol}} }
+ \arrow[,,2.6]{}{}
+ \reactant{ \chemname{\chemfig{*6(-=-=(-Br)-=)}}{Brombenzol \compound{brombenzol}} }
\end{rxnscheme}
-
-Zunächst erstellen wir die Hauptreaktion. Dafür setzen wir die Befehle \lstinline=\reactand=, \lstinline=\arrow= und die Umgebung \lstinline=\begin{rxn} ... \end{rxn}= ein.
-\begin{Verbatim}
- \begin{rxn}
- \reactand{
+Zunächst erstellen wir die Hauptreaktion. Dafür setzen wir die Befehle \lstinline=\reactant=\index{reactant}, \lstinline=\arrow=\index{arrow} und die Umgebung \lstinline=\begin{rxnscheme} ... \end{rxnscheme}=\index{rxnscheme} ein.
+\begin{lstlisting}
+ \begin{rxnscheme}{Elektrophile Substitution}
+ \reactant{
\chemname{\chemfig{*6(-=-=-=)}}{Benzol \compound{benzol}}
}
\arrow{}{}
- \reactand{
+ \reactant{
\chemname{\chemfig{*6(-=-=(-Br)-=)}}{Brombenzol \compound{brombenzol}}
}
- \end{rxn}
-\end{Verbatim}
+ \end{rxnscheme}
+\end{lstlisting}
\begin{rxn}
- \reactand{
+ \reactant{
\chemname{\chemfig{*6(-=-=-=)}}{Benzol \compound{benzol}}
}
\arrow{}{}
- \reactand{
+ \reactant{
\chemname{\chemfig{*6(-=-=(-Br)-=)}}{Brombenzol \compound{brombenzol}}
}
\end{rxn}
Nun wollen wir das ganze etwas verkleinern, damit wir nicht soviel Platz verbrauchen.
-\begin{Verbatim}
- \begin{rxn}!![scale=.8]
- \setatomsep{1.6em}!!
- \reactand{
+\begin{lstlisting}
+ \begin{rxnscheme}[,,,!!.8!!]{Elektrophile Substitution}
+ !!\setatomsep{1.6em}!!
+ \reactant{
\chemname{\chemfig{*6(-=-=-=)}}{Benzol \compound{benzol}}
}
\arrow{}{}
- \reactand{
+ \reactant{
\chemname{\chemfig{*6(-=-=(-Br)-=)}}{Brombenzol \compound{brombenzol}}
}
- \end{rxn}
-\end{Verbatim}
- \begin{rxn}[scale=.8]
+ \end{rxnscheme}
+\end{lstlisting}
+ \begin{rxn}[,.8]
\setatomsep{1.6em}
- \reactand{
+ \reactant{
\chemname{\chemfig{*6(-=-=-=)}}{Benzol \compound{benzol}}
}
\arrow{}{}
- \reactand{
+ \reactant{
\chemname{\chemfig{*6(-=-=(-Br)-=)}}{Brombenzol \compound{brombenzol}}
}
\end{rxn}
-Damit die beiden Benzol-Ringe auf gleicher Höhe erscheinen, haben wir zwei Möglichkeiten. Entweder, wir verschieben den zweiten mit \TikZ-Code nach oben:
-\begin{Verbatim}[firstnumber=7]
- \reactand[,,!!yshift=1em!!]{
+Damit die beiden Benzol-Ringe auf gleicher Höhe erscheinen, haben wir zwei Möglichkeiten. Entweder, wir verschieben den zweiten mit \TikZ-Code\index{tikz@\TikZ} nach oben:
+\begin{lstlisting}[firstnumber=7]
+ \reactant[,,!!yshift=1em!!]{
\chemname{\chemfig{*6(-=-=(-Br)-=)}}{Brombenzol \compound{brombenzol}}
}
-\end{Verbatim}
+\end{lstlisting}
Diese Lösung ist nicht optimal, da dann der Reaktionspfeil nicht mittig sondern etwas zu tief erscheint.
\begin{rxn}
- \reactand{
+ \reactant{
\chemname{\chemfig{*6(-=-=-=)}}{Benzol \compound{benzol}}
}
\arrow{}{}
- \reactand[,,yshift=1em]{
+ \reactant[,,yshift=1em]{
\chemname{\chemfig{*6(-=-=(-Br)-=)}}{Brombenzol \compound{brombenzol}}
}
\end{rxn}
-Die zweite Variante wäre, den ersten Ring nach unten zu verschieben. Das können wir nicht mit \TikZ-Code verwirklichen, da der Pfeil und der zweite Ring jeweils relativ zum vorhergehenden gesetzt werden. Durch ein unsichtbares Brom erreichen wir aber den gewünschten Effekt:
-\begin{Verbatim}[firstnumber=3]
- \reactand{
+Die zweite Variante wäre, den ersten Ring nach unten zu verschieben. Das können wir nicht mit \TikZ-Code\index{tikz@\TikZ} verwirklichen, da der Pfeil und der zweite Ring jeweils relativ zum vorhergehenden gesetzt werden. Durch ein unsichtbares Brom erreichen wir aber den gewünschten Effekt:
+\begin{lstlisting}[firstnumber=3]
+ \reactant{
\chemname{\chemfig{*6(-=-=!!(-[,,,,white]\phantom{Br})!!-=)}}{Benzol \compound{benzol}}
}
-\end{Verbatim}
+\end{lstlisting}
\begin{rxn}
- \reactand{
+ \reactant{
\chemname{\chemfig{*6(-=-=(-[,,,,white]\phantom{Br})-=)}}{Benzol \compound{benzol}}
}
\arrow{}{}
- \reactand{
+ \reactant{
\chemname{\chemfig{*6(-=-=(-Br)-=)}}{Brombenzol \compound{brombenzol}}
}
\end{rxn}
-Damit wir nun unterhalb dieser Reaktion einen Reaktionszweig erstellen können, benötigen wir den Befehl \lstinline=\branch= und wir müssen der ersten Formel einen Namen als Anker geben.
- \begin{Verbatim}
- \begin{rxn}[scale=.8]
+Damit wir nun unterhalb dieser Reaktion einen Reaktionszweig erstellen können, benötigen wir den Befehl \lstinline=\branch=\index{branch} und wir müssen der ersten Formel einen Namen als Anker geben.
+ \begin{lstlisting}
+ \begin{rxnscheme}[,,,.8]{Elektrophile Substitution}
\setatomsep{1.6em}
- \reactand[,!!start!!]{
+ \reactant[,!!start!!]{
\chemname{\chemfig{*6(-=-=(-[,,,,white]\phantom{Br})-=)}}{Benzol \compound{benzol}}
}
\branch[!!below=of start!!]{
- \arrow[!!direction=below!!,both]{ \ce{Br2 / AlBr3} }{ $-\ce{AlBr4\om}$ }
+ \arrow[!!below!!,,,,both]{ \ce{Br2 / AlBr3} }{ $-\ce{AlBr4\om}$ }
}
\arrow{}{}
- \reactand{
+ \reactant{
\chemname{\chemfig{*6(-=-=(-Br)-=)}}{Brombenzol \compound{brombenzol}}
}
- \end{rxn}
-\end{Verbatim}
-Wir nennen also die erste Substanz \lstinline=start= und sagen \lstinline=\branch= mit \lstinline+below=of start+, dass die Verzweigung unterhalb beginnen soll. Damit der anschließende Reaktionspfeil nach unten zeigt, bekommt \lstinline=\arrow= den Key \lstinline+direction=below+. Damit erhalten wir folgendes Bild:
- \begin{rxn}[scale=.8]
+ \end{rxnscheme}
+\end{lstlisting}
+Wir nennen also die erste Substanz \lstinline=start= und sagen \lstinline=\branch=\index{branch} mit \lstinline+below=of start+, dass die Verzweigung unterhalb beginnen soll. Damit der anschließende Reaktionspfeil nach unten zeigt, bekommt \lstinline=\arrow=\index{arrow} die Option \lstinline+below+. Damit erhalten wir folgendes Bild:
+ \begin{rxn}[,.8]
\setatomsep{1.6em}
- \reactand[,start]{
+ \reactant[,start]{
\chemname{\chemfig{*6(-=-=(-[,,,,white]\phantom{Br})-=)}}{Benzol \compound{benzol}}
}
\branch[below=of start]{
- \arrow[direction=below,both]{\ce{Br2 / AlBr3}}{$-\ce{AlBr4\om}$}
+ \arrow[below,,,,both]{\ce{Br2 / AlBr3}}{$-\ce{AlBr4\om}$}
}
\arrow{}{}
- \reactand{
+ \reactant{
\chemname{\chemfig{*6(-=-=(-Br)-=)}}{Brombenzol \compound{brombenzol}}
}
\end{rxn}
-Als nächstes erstellen wir die mesomeren Grenzformeln des Wheland-Komplexes. Hier setzen wir drei weitere Befehle ein: \lstinline=\mesomeric=, \lstinline=\marrow= und \lstinline=\elmove=.
-\begin{Verbatim}
+Als nächstes erstellen wir die mesomeren Grenzformeln des Wheland-Komplexes. Hier setzen wir drei weitere Befehle ein: \lstinline=\mesomeric=\index{mesomeric}, \lstinline=\marrow=\index{marrow} und \lstinline=\elmove=\index{elmove}.
+\begin{lstlisting}
!!\mesomeric{!!
- \reactand{
+ \reactant{
\chemfig{*6(=[@{e1}]-=-(-[:120]Br)(-[:60]H)-(-[:-30,.4,,,white]\oplus)-[@{e2}])}
!!\elmove{e1}{60:4mm}{e2}{0:4mm}!!
}
!!\marrow!!
- \reactand{
+ \reactant{
\chemfig{*6(-(-[:90,.4,,,white]\oplus)-[@{e4}]=[@{e3}]-(-[:120]Br)(-[:60]H)-=)}
\elmove{e3}{180:4mm}{e4}{150:4mm}
}
\marrow
- \reactand{
+ \reactant{
\chemfig{*6(-=-(-[:-150,.4,,,white]\oplus)-(-[:120]Br)(-[:60]H)-=)}
}
!!}!!
-\end{Verbatim}
-\begin{rxn}[scale=.8]
+\end{lstlisting}
+\begin{rxn}[,.8]
\setatomsep{1.6em}
\mesomeric{
- \reactand{
+ \reactant{
\chemfig{*6(=[@{e1}]-=-(-[:120]Br)(-[:60]H)-(-[:-30,.4,,,white]\oplus)-[@{e2}])}
\elmove{e1}{60:4mm}{e2}{0:4mm}
}
\marrow
- \reactand{
+ \reactant{
\chemfig{*6(-(-[:90,.4,,,white]\oplus)-[@{e4}]=[@{e3}]-(-[:120]Br)(-[:60]H)-=)}
\elmove{e3}{180:4mm}{e4}{150:4mm}
}
\marrow
- \reactand{
+ \reactant{
\chemfig{*6(-=-(-[:-150,.4,,,white]\oplus)-(-[:120]Br)(-[:60]H)-=)}
}
}
\end{rxn}
-Setzen wir den Code \emph{in den} \lstinline=\branch= nach dem Pfeil, ergibt sich folgendes Gesamtbild:
- \begin{rxn}[scale=.8]
+Setzen wir den Code \emph{in den} \lstinline=\branch=\index{branch} nach dem Pfeil, ergibt sich folgendes Gesamtbild:
+ \begin{rxn}[,.8]
\setatomsep{1.6em}
- \reactand[,start]{
+ \reactant[,start]{
\chemname{\chemfig{*6(-=-=(-[,,,,white]\phantom{Br})-=)}}{Benzol \compound{benzol}}
}
\branch[below=of start]{
- \arrow[direction=below,both]{\ce{Br2 / AlBr3}}{$-\ce{AlBr4\om}$}
+ \arrow[below,,,,both]{\ce{Br2 / AlBr3}}{$-\ce{AlBr4\om}$}
\mesomeric{
- \reactand{
+ \reactant{
\chemfig{*6(=[@{e1}]-=-(-[:120]Br)(-[:60]H)-(-[:-30,.4,,,white]\oplus)-[@{e2}])}
\elmove{e1}{60:4mm}{e2}{0:4mm}
}
\marrow
- \reactand{
+ \reactant{
\chemfig{*6(-(-[:90,.4,,,white]\oplus)-[@{e4}]=[@{e3}]-(-[:120]Br)(-[:60]H)-=)}
\elmove{e3}{180:4mm}{e4}{150:4mm}
}
\marrow
- \reactand{
+ \reactant{
\chemfig{*6(-=-(-[:-150,.4,,,white]\oplus)-(-[:120]Br)(-[:60]H)-=)}
}
}
}
\arrow{}{}
- \reactand{
+ \reactant{
\chemname{\chemfig{*6(-=-=(-Br)-=)}}{Brombenzol \compound{brombenzol}}
}
\end{rxn}
Die Ausrichtung der mesomeren Formeln stimmt offensichtlich nicht und der Pfeil ist nicht mehr, wo er sein soll. Wir könnten folgendes versuchen:
-\begin{Verbatim}
- \begin{rxn}[scale=.8]
+\begin{lstlisting}
+ \begin{rxnscheme}[,,,.8]{Elektrophile Substitution}
\setatomsep{1.6em}
- \reactand[,start]{
+ \reactant[,start]{
\chemname{\chemfig{*6(-=-=(-[,,,,white]\phantom{Br})-=)}}{Benzol \compound{benzol}}
}
\branch[below=of start]{
- \arrow[direction=below,both]{\ce{Br2 / AlBr3}}{$-\ce{AlBr4\om}$}
+ \arrow[below,,,,both]{\ce{Br2 / AlBr3}}{$-\ce{AlBr4\om}$}
\mesomeric!![below]!!{
- \reactand{
+ \reactant{
\chemfig{*6(=[@{e1}]-=-(-[:120]Br)(-[:60]H)-(-[:-30,.4,,,white]\oplus)-[@{e2}])}
\elmove{e1}{60:4mm}{e2}{0:4mm}
}
\marrow
- \reactand{
+ \reactant{
\chemfig{*6(-(-[:90,.4,,,white]\oplus)-[@{e4}]=[@{e3}]-(-[:120]Br)(-[:60]H)-=)}
\elmove{e3}{180:4mm}{e4}{150:4mm}
}
\marrow
- \reactand{
+ \reactant{
\chemfig{*6(-=-(-[:-150,.4,,,white]\oplus)-(-[:120]Br)(-[:60]H)-=)}
}
}
}
\arrow{}{}
- \reactand{
+ \reactant{
\chemname{\chemfig{*6(-=-=(-Br)-=)}}{Brombenzol \compound{brombenzol}}
}
- \end{rxn}
-\end{Verbatim}
+ \end{rxnscheme}
+\end{lstlisting}
Das Ergebnis ist schon besser:
- \begin{rxn}[scale=.8]
+ \begin{rxn}[,.8]
\setatomsep{1.6em}
- \reactand[,start]{
+ \reactant[,start]{
\chemname{\chemfig{*6(-=-=(-[,,,,white]\phantom{Br})-=)}}{Benzol \compound{benzol}}
}
\branch[below=of start]{
- \arrow[direction=below,both]{\ce{Br2 / AlBr3}}{$-\ce{AlBr4\om}$}
+ \arrow[below,,,,both]{\ce{Br2 / AlBr3}}{$-\ce{AlBr4\om}$}
\mesomeric[below]{
- \reactand{
+ \reactant{
\chemfig{*6(=[@{e1}]-=-(-[:120]Br)(-[:60]H)-(-[:-30,.4,,,white]\oplus)-[@{e2}])}
\elmove{e1}{60:4mm}{e2}{0:4mm}
}
\marrow
- \reactand{
+ \reactant{
\chemfig{*6(-(-[:90,.4,,,white]\oplus)-[@{e4}]=[@{e3}]-(-[:120]Br)(-[:60]H)-=)}
\elmove{e3}{180:4mm}{e4}{150:4mm}
}
\marrow
- \reactand{
+ \reactant{
\chemfig{*6(-=-(-[:-150,.4,,,white]\oplus)-(-[:120]Br)(-[:60]H)-=)}
}
}
}
\arrow{}{}
- \reactand{
+ \reactant{
\chemname{\chemfig{*6(-=-=(-Br)-=)}}{Brombenzol \compound{brombenzol}}
}
\end{rxn}
-Es ist allerdings für unser Beispiel unbefriedigend, dass die Platzierung zwar unterhalb, aber zentriert erscheint. Um das zu umgehen, werden wir dem Pfeil darüber einen Namen als Anker geben und die mesomeren Formeln als eigenen \lstinline=\branch= setzen.
-\begin{Verbatim}[firstnumber=6]
+Es ist allerdings für unser Beispiel unbefriedigend, dass die Platzierung zwar unterhalb, aber zentriert erscheint. Um das zu umgehen, werden wir dem Pfeil darüber einen Namen als Anker geben und die mesomeren Formeln als eigenen \lstinline=\branch=\index{branch} setzen.
+\begin{lstlisting}[firstnumber=6]
...
\branch[below=of start]{
- \arrow[direction=below,!!name=pfeil_a!!,both]{\ce{Br2 / AlBr3}}{$-\ce{AlBr4\om}$}
+ \arrow[below,,,!!pfeil_a!!,both]{\ce{Br2 / AlBr3}}{$-\ce{AlBr4\om}$}
}
!!\branch[below=of pfeil_a]{!!
\mesomeric{
- \reactand{
+ \reactant{
\chemfig{*6(=[@{e1}]-=-(-[:120]Br)(-[:60]H)-(-[:-30,.4,,,white]\oplus)-[@{e2}])}
\elmove{e1}{60:4mm}{e2}{0:4mm}
}
\marrow
- \reactand{
+ \reactant{
\chemfig{*6(-(-[:90,.4,,,white]\oplus)-[@{e4}]=[@{e3}]-(-[:120]Br)(-[:60]H)-=)}
\elmove{e3}{180:4mm}{e4}{150:4mm}
}
\marrow
- \reactand{
+ \reactant{
\chemfig{*6(-=-(-[:-150,.4,,,white]\oplus)-(-[:120]Br)(-[:60]H)-=)}
}
}
!!}!!
...
-\end{Verbatim}
-\begin{rxn}[scale=.8]
+\end{lstlisting}
+\begin{rxn}[,.8]
\setatomsep{1.6em}
- \reactand[,start]{\chemname{\chemfig{*6(-=-=(-[,,,,white]\phantom{Br})-=)}}{Benzol \compound{benzol}} }
+ \reactant[,start]{\chemname{\chemfig{*6(-=-=(-[,,,,white]\phantom{Br})-=)}}{Benzol \compound{benzol}} }
\branch[below=of start]{
- \arrow[direction=below,name=pfeil_a,both]{\ce{Br2 / AlBr3}}{$-\ce{AlBr4\om}$}
+ \arrow[below,,,pfeil_a,both]{\ce{Br2 / AlBr3}}{$-\ce{AlBr4\om}$}
}
\branch[below=of pfeil_a,mesomerie]{
\mesomeric{
- \reactand{
+ \reactant{
\chemfig{*6(=[@{e1}]-=-(-[:120]Br)(-[:60]H)-(-[:-30,.4,,,white]\oplus)-[@{e2}])}
\elmove{e1}{60:4mm}{e2}{0:4mm}
}
\marrow
- \reactand{
+ \reactant{
\chemfig{*6(-(-[:90,.4,,,white]\oplus)-[@{e4}]=[@{e3}]-(-[:120]Br)(-[:60]H)-=)}
\elmove{e3}{180:4mm}{e4}{150:4mm}
}
\marrow
- \reactand{
+ \reactant{
\chemfig{*6(-=-(-[:-150,.4,,,white]\oplus)-(-[:120]Br)(-[:60]H)-=)}
}
}
}
\arrow{}{}
- \reactand{ \chemname{\chemfig{*6(-=-=(-Br)-=)}}{Brombenzol \compound{brombenzol}} }
+ \reactant{ \chemname{\chemfig{*6(-=-=(-Br)-=)}}{Brombenzol \compound{brombenzol}} }
\end{rxn}
-Das scheint auf den ersten Blick keine Verbesserung zu sein. Allerdings können wir den \lstinline=\branch= mit den \TikZ-Keys \lstinline=xshift= und \lstinline=yshift= noch beliebig verschieben.
-\begin{Verbatim}[firstnumber=6]
+Das scheint auf den ersten Blick keine Verbesserung zu sein. Allerdings können wir den \lstinline=\branch=\index{branch} mit den \TikZ-Keys\index{tikz@\TikZ} \lstinline=xshift=\index{xshift} und \lstinline=yshift=\index{yshift} noch beliebig verschieben.
+\begin{lstlisting}[firstnumber=6]
...
\branch[below=of start]{
- \arrow[direction=below,name=pfeil_a,both]{\ce{Br2 / AlBr3}}{$-\ce{AlBr4\om}$}
+ \arrow[below,,,pfeil_a,both]{\ce{Br2 / AlBr3}}{$-\ce{AlBr4\om}$}
}
\branch[below=of pfeil_a,mesomerie,!!xshift=8.5em!!]{
\mesomeric{
- \reactand{
+ \reactant{
\chemfig{*6(=[@{e1}]-=-(-[:120]Br)(-[:60]H)-(-[:-30,.4,,,white]\oplus)-[@{e2}])}
\elmove{e1}{60:4mm}{e2}{0:4mm}
}
\marrow
- \reactand{
+ \reactant{
\chemfig{*6(-(-[:90,.4,,,white]\oplus)-[@{e4}]=[@{e3}]-(-[:120]Br)(-[:60]H)-=)}
\elmove{e3}{180:4mm}{e4}{150:4mm}
}
\marrow
- \reactand{
+ \reactant{
\chemfig{*6(-=-(-[:-150,.4,,,white]\oplus)-(-[:120]Br)(-[:60]H)-=)}
}
}
}
...
-\end{Verbatim}
-\begin{rxn}[scale=.8]
+\end{lstlisting}
+\begin{rxn}[,.8]
\setatomsep{1.6em}
- \reactand{\chemname{\chemfig{*6(-=-=(-[,,,,white]\phantom{Br})-=)}}{Benzol \compound{benzol}} }{start}
+ \reactant[,start]{\chemname{\chemfig{*6(-=-=(-[,,,,white]\phantom{Br})-=)}}{Benzol \compound{benzol}} }
\branch[below=of start]{
- \arrow[direction=below,name=pfeil_a,both]{\ce{Br2 / AlBr3}}{$-\ce{AlBr4\om}$}
+ \arrow[below,,,pfeil_a,both]{\ce{Br2 / AlBr3}}{$-\ce{AlBr4\om}$}
}
\branch[below=of pfeil_a,mesomerie,xshift=8.5em]{
\mesomeric{
- \reactand{
+ \reactant{
\chemfig{*6(=[@{e1}]-=-(-[:120]Br)(-[:60]H)-(-[:-30,.4,,,white]\oplus)-[@{e2}])}
\elmove{e1}{60:4mm}{e2}{0:4mm}
}
\marrow
- \reactand{
+ \reactant{
\chemfig{*6(-(-[:90,.4,,,white]\oplus)-[@{e4}]=[@{e3}]-(-[:120]Br)(-[:60]H)-=)}
\elmove{e3}{180:4mm}{e4}{150:4mm}
}
\marrow
- \reactand{
+ \reactant{
\chemfig{*6(-=-(-[:-150,.4,,,white]\oplus)-(-[:120]Br)(-[:60]H)-=)}
}
}
}
\arrow{}{}
- \reactand{ \chemname{\chemfig{*6(-=-=(-Br)-=)}}{Brombenzol \compound{brombenzol}} }
+ \reactant{ \chemname{\chemfig{*6(-=-=(-Br)-=)}}{Brombenzol \compound{brombenzol}} }
\end{rxn}
-Damit wir mit dem Pfeil zurück nicht wieder das Problem mit der Zentrierung haben, bekommt er ebenfalls seinen eigenen \lstinline=\branch=.
-\begin{Verbatim}[firstnumber=6]
+Damit wir mit dem Pfeil zurück nicht wieder das Problem mit der Zentrierung haben, bekommt er ebenfalls seinen eigenen \lstinline=\branch=\index{branch}.
+\begin{lstlisting}[firstnumber=6]
...
\branch[below=of start]{
- \arrow[direction=below,!!name=pfeil_a!!,both]{\ce{Br2 / AlBr3}}{$-\ce{AlBr4\om}$}
+ \arrow[below,,,!!pfeil_a!!,both]{\ce{Br2 / AlBr3}}{$-\ce{AlBr4\om}$}
}
\branch[below=of pfeil_a,!!mesomerie!!,xshift=8.5em]{
\mesomeric{
- \reactand{
+ \reactant{
\chemfig{*6(=[@{e1}]-=-(-[:120]Br)(-[:60]H)-(-[:-30,.4,,,white]\oplus)-[@{e2}])}
\elmove{e1}{60:4mm}{e2}{0:4mm}
}
\marrow
- \reactand{
+ \reactant{
\chemfig{*6(-(-[:90,.4,,,white]\oplus)-[@{e4}]=[@{e3}]-(-[:120]Br)(-[:60]H)-=)}
\elmove{e3}{180:4mm}{e4}{150:4mm}
}
\marrow
- \reactand{
+ \reactant{
\chemfig{*6(-=-(-[:-150,.4,,,white]\oplus)-(-[:120]Br)(-[:60]H)-=)}
}
}
}
\branch[!!above=of mesomerie,,xshift=7.25em!!]{
- \arrow[direction=above]{$-\Hpl$}{}
+ \arrow[above]{$-\Hpl$}{}
}
...
-\end{Verbatim}
-\begin{rxn}[scale=.8]
+\end{lstlisting}
+\begin{rxn}[,.8]
\setatomsep{1.6em}
- \reactand[,start]{\chemname{\chemfig{*6(-=-=(-[,,,,white]\phantom{Br})-=)}}{Benzol \compound{benzol}} }
+ \reactant[,start]{\chemname{\chemfig{*6(-=-=(-[,,,,white]\phantom{Br})-=)}}{Benzol \compound{benzol}} }
\branch[below=of start]{
- \arrow[direction=below,name=pfeil_a,both]{\ce{Br2 / AlBr3}}{$-\ce{AlBr4\om}$}
+ \arrow[below,,,pfeil_a,both]{\ce{Br2 / AlBr3}}{$-\ce{AlBr4\om}$}
}
\branch[below=of pfeil_a,mesomerie,xshift=8.5em]{
\mesomeric{
- \reactand{
+ \reactant{
\chemfig{*6(=[@{e1}]-=-(-[:120]Br)(-[:60]H)-(-[:-30,.4,,,white]\oplus)-[@{e2}])}
\elmove{e1}{60:4mm}{e2}{0:4mm}
}
\marrow
- \reactand{
+ \reactant{
\chemfig{*6(-(-[:90,.4,,,white]\oplus)-[@{e4}]=[@{e3}]-(-[:120]Br)(-[:60]H)-=)}
\elmove{e3}{180:4mm}{e4}{150:4mm}
}
\marrow
- \reactand{
+ \reactant{
\chemfig{*6(-=-(-[:-150,.4,,,white]\oplus)-(-[:120]Br)(-[:60]H)-=)}
}
}
}
\branch[above=of mesomerie,,xshift=7.25em]{
- \arrow[direction=above]{$-\Hpl$}{}
+ \arrow[above]{$-\Hpl$}{}
}
\arrow{}{}
- \reactand{ \chemname{\chemfig{*6(-=-=(-Br)-=)}}{Brombenzol \compound{brombenzol}} }
+ \reactant{ \chemname{\chemfig{*6(-=-=(-Br)-=)}}{Brombenzol \compound{brombenzol}} }
\end{rxn}
-Nun sind wir fast am Ziel. Der Hauptreaktion ist noch zu kurz.
-\begin{Verbatim}
- \begin{rxn}[scale=.8]
+Nun sind wir fast am Ziel. Der Hauptreaktion ist noch zu kurz. Der fertige Code:
+\begin{lstlisting}
+ \begin{rxnscheme}[,,,.8]{Elektrophile Substitution}
\setatomsep{1.6em}
- \reactand[,start]{\chemname{\chemfig{*6(-=-=(-[,,,,white]\phantom{Br})-=)}}{Benzol \compound{benzol}} }
+ \reactant[,start]{\chemname{\chemfig{*6(-=-=(-[,,,,white]\phantom{Br})-=)}}{Benzol \compound{benzol}} }
\branch[below=of start]{
- \arrow[direction=below,name=pfeil_a,both]{\ce{Br2 / AlBr3}}{$-\ce{AlBr4\om}$}
+ \arrow[below,,,pfeil_a,both]{\ce{Br2 / AlBr3}}{$-\ce{AlBr4\om}$}
}
\branch[below=of pfeil_a,mesomerie,xshift=8.5em]{
\mesomeric{
- \reactand{
+ \reactant{
\chemfig{*6(=[@{e1}]-=-(-[:120]Br)(-[:60]H)-(-[:-30,.4,,,white]\oplus)-[@{e2}])}
\elmove{e1}{60:4mm}{e2}{0:4mm}
}
\marrow
- \reactand{
+ \reactant{
\chemfig{*6(-(-[:90,.4,,,white]\oplus)-[@{e4}]=[@{e3}]-(-[:120]Br)(-[:60]H)-=)}
\elmove{e3}{180:4mm}{e4}{150:4mm}
}
\marrow
- \reactand{
+ \reactant{
\chemfig{*6(-=-(-[:-150,.4,,,white]\oplus)-(-[:120]Br)(-[:60]H)-=)}
}
}
}
\branch[above=of mesomerie,,xshift=7.25em]{
- \arrow[direction=above]{$-\Hpl$}{}
+ \arrow[above]{$-\Hpl$}{}
}
- \arrow[!!length=2.6!!]{}{}
- \reactand{ \chemname{\chemfig{*6(-=-=(-Br)-=)}}{Brombenzol \compound{brombenzol}} }
- \end{rxn}
-\end{Verbatim}
- \begin{rxn}[scale=.8]
- \setatomsep{1.6em}
- \reactand[,start]{\chemname{\chemfig{*6(-=-=(-[,,,,white]\phantom{Br})-=)}}{Benzol \compound{benzol}} }
+ \arrow[,,!!2.6!!]{}{}
+ \reactant{ \chemname{\chemfig{*6(-=-=(-Br)-=)}}{Brombenzol \compound{brombenzol}} }
+ \end{rxnscheme}
+\end{lstlisting}
+
+\subsection{Hydratisierung}
+\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$}}}%
+Ein Schema mit Übergangszuständen.
+\begin{rxnscheme}[rs:hydratisierung,htp]{Hydratisierung}
+ \reactant[,carbonyl_A]{\chemfig{R_2C=O}}
+ \anywhere{above=of carbonyl_A}{\chemfig{H-[:-30]O-[:30]H}}
+ \arrow[,<=>]{\tiny langsam}{}
+ \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}{(Übergangszustand allg. Säurekat.)}
+ \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}{(Übergangszustand allg. Basekat.)}
+ \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}
- \branch[below=of start]{
- \arrow[direction=below,name=pfeil_a,both]{\ce{Br2 / AlBr3}}{$-\ce{AlBr4\om}$}
+Für dieses Beispiel wurde zunächst ein Stil für die delokalisierten Doppelbindungen erstellt:
+\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}
+Damit kann nun die Doppelbindung über die \lstinline+<tikz>+-Option von \CF verwendet werden (Siehe auch die \CF-Dokumentation).
+\begin{SideBySideExample}
+ \chemfig{-[,,,,lddbond]-[,,,,rddbond]}
+\end{SideBySideExample}
+Anschließend wurden die beiden Befehle
+\begin{lstlisting}
+ \newcommand*\delm{\ensuremath{\text{\tiny$\delta\ominus$}}}%
+ \newcommand*\delp{\ensuremath{\text{\tiny$\delta\oplus$}}}%
+\end{lstlisting}
+definiert, um die Partialladungen ohne Aufwand einsetzen zu können.
+
+Dann sieht der Code folgendermaßen aus:\index{anywhere}
+\begin{lstlisting}
+ \begin{rxnscheme}[rs:hydratisierung,htp]{Hydratisierung}
+ \reactant[,carbonyl_A]{\chemfig{R_2C=O}}
+ \anywhere{above=of carbonyl_A}{\chemfig{H-[:-30]O-[:30]H}}
+ \arrow[,<=>]{\tiny langsam}{}
+ \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}{(\"Ubergangszustand allg. S\"aurekat.)}
+ \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}{(\"Ubergangszustand allg. Basekat.)}
+ \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}
+\newpage
+
+\subsection{Veresterung}\label{ssec:veresterung}
+\begin{rxn}
+ \reactant{\chemfig{H-C(=[:60]O)-[:-60]O-H}}
+ \arrow[,-+>,1.2,protolyse]{\ce{H2SO4}}{\ce{HSO4\om}}
+ \anywhere{below=of protolyse,yshift=1em}{\tiny Protolyse}
+ \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[below=of pfeil_a,mesomerie,xshift=8.5em]{
- \mesomeric{
- \reactand{
- \chemfig{*6(=[@{e1}]-=-(-[:120]Br)(-[:60]H)-(-[:-30,.4,,,white]\oplus)-[@{e2}])}
- \elmove{e1}{60:4mm}{e2}{0:4mm}
- }
- \marrow
- \reactand{
- \chemfig{*6(-(-[:90,.4,,,white]\oplus)-[@{e4}]=[@{e3}]-(-[:120]Br)(-[:60]H)-=)}
- \elmove{e3}{180:4mm}{e4}{150:4mm}
- }
- \marrow
- \reactand{
- \chemfig{*6(-=-(-[:-150,.4,,,white]\oplus)-(-[:120]Br)(-[:60]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}}
}
- \branch[above=of mesomerie,,xshift=7.25em]{
- \arrow[direction=above]{$-\Hpl$}{}
+ \elmove{a1}{90:1.5cm}{a2}{0:3cm}
+ \branch[on chain=going left,,yshift=-3.5em]{
+ \arrow[left,<=>]{}{\tiny Protolyse}
}
-
- \arrow[length=2.6]{}{}
- \reactand{ \chemname{\chemfig{*6(-=-=(-Br)-=)}}{Brombenzol \compound{brombenzol}} }
- \end{rxn}
-\newpage
-\subsection[Synthese mit \TikZ]{\TikZ, \mC und \CF für eine umfangreichere Synthese}\label{ssec:tikzsynthese}
-Da die \CF-Befehle innerhalb einer \lstinline=tikzpicture=-Umgebung problemlos funktionieren, lassen sich mit dem \lstinline=\merge=-Befehl von \mC auch größere Synthesen realisieren. Die anderen \mC-Befehle funktionieren nicht ohne weiteres, da sie alle auf einer \lstinline=chain= angeordnet werden. Solange Sie \mC eingebunden haben, müssen Sie allerdings kaum eine \lstinline=tikzlibrary= zusätzlich einbinden. Im Beispiel wurde direkt auf die Gleitumgebung \lstinline=rxnfloat= von \mC zugegriffen.
-\begin{Verbatim}
-
- \begin{rxnfloat}
- \setatomsep{1.8em}\setcrambond{3pt}{.5pt}{1pt}
- \centering
- \begin{tikzpicture}[scale=.8]
- \small
- \node(a) at (0,0) {\chemfig{=_[::30]-[::-60]-[::60](-[::-60])(-[::120])-[::0]OH}};
- \node(b) at (0,-4) {\chemfig{Br-[::30]-[::-60]=_[::60](-[::-60])-[::60]}};
- \draw[-stealth,thick] (a.south) -- node[left]{HBr} (b.north);
- \node(c) at (5,1) {\chemname{\chemfig{**6(--(-SO_2Cl)---(-)-)}}{Tosylchlorid}};
- \node(d) at (5,-4) {\chemfig{**6(--(-SO_2Na)---(-)-)}};
- \draw[-stealth,thick] (c.south) -- node[left]{NaOH} node[right]{Zn} (d.north);
- \node(e) at (2.5,-8.5) {\chemfig{**6(--(-SO_2-[:30]-[::-60]=_[::60](-[::60])-[::-60])---(-)-)}};
- \node(f) at (10,-4) {\chemname{\chemfig{-[::30](-[::60])=_[::-60]-[::60]COOH}}{3-Methyl-2-butensäure}};
- \node(g) at (10,-8.5) {\chemfig{-[::30](-[::60])=_[::-60]-[::60]CO_2CH_3}};
- \draw[-stealth,thick] (f.south) -- node[left]{\ce{CH3OH}} (g.north);
- \merge{e}{b}{d}
- \node[left delimiter={[},right delimiter={]}](h) at (6.25,-14.5) {\chemfig{-[::30](-[::60])=^[::-60]-[::60](-[::60]S(=[::90]O)(=[::-90]O)-[::0]**6(---(-)---))-[::-60](-[::0])(-[::-120])-[::60](-[::60,.5,,,white]\ominus)-[::-60]CO_2CH_3}};
- \node at (5.25,-11) {\ce{NaOCH3}};
- \merge{h}{e}{g}
- \node(i) at (6.25,-18.5) {};
- \node(j) at (6.25,-21.5) {\chemname{\chemfig{-[::-30](-[::-60])=^[::60]>[::-60](-[::90,1.2])-[::30,1.2](-[::120,1.2](-[::-60])-[::0])<:[::-30]COOH}}{\emph{trans}-Chrysanthemumsäure}};
- \draw[-stealth,thick] (h.south) -- (i.north);
- \draw[-stealth,thick] (i.south) -- node[left]{KOH} (j.north);
- \end{tikzpicture}
- \caption{Synthese von Chrysanthemumsäure}
- \end{rxnfloat}
-
-\end{Verbatim}
-
-\begin{rxnfloat}
-\setatomsep{1.8em}\setcrambond{3pt}{.5pt}{1pt}
-\centering
-\begin{tikzpicture}[scale=.8]
- \small
- \node(a) at (0,0) {\chemfig{=_[::30]-[::-60]-[::60](-[::-60])(-[::120])-[::0]OH}};
- \node(b) at (0,-4) {\chemfig{Br-[::30]-[::-60]=_[::60](-[::-60])-[::60]}};
- \draw[-stealth,thick] (a.south) -- node[left]{HBr} (b.north);
-
- \node(c) at (5,1) {\chemname{\chemfig{**6(--(-SO_2Cl)---(-)-)}}{Tosylchlorid}};
- \node(d) at (5,-4) {\chemfig{**6(--(-SO_2Na)---(-)-)}};
- \draw[-stealth,thick] (c.south) -- node[left]{NaOH} node[right]{Zn} (d.north);
-
- \node(e) at (2.5,-8.5) {\chemfig{**6(--(-SO_2-[:30]-[::-60]=_[::60](-[::60])-[::-60])---(-)-)}};
- \node(f) at (10,-4) {\chemname{\chemfig{-[::30](-[::60])=_[::-60]-[::60]COOH}}{3-Methyl-2-butensäure}};
- \node(g) at (10,-8.5) {\chemfig{-[::30](-[::60])=_[::-60]-[::60]CO_2CH_3}};
- \draw[-stealth,thick] (f.south) -- node[left]{\ce{CH3OH}} (g.north);
- \merge{e}{b}{d}
-
- \node[left delimiter={[},right delimiter={]}](h) at (6.25,-14.5) {\chemfig{-[::30](-[::60])=^[::-60]-[::60](-[::60]S(=[::90]O)(=[::-90]O)-[::0]**6(---(-)---))-[::-60](-[::0])(-[::-120])-[::60](-[::60,.3,,,white]\ominus)-[::-60]CO_2CH_3}};
- \node at (5.25,-11) {\ce{NaOCH3}};
- \merge{h}{e}{g}
-
- \node(i) at (6.25,-18.5) {};
- \node(j) at (6.25,-21.5) {\chemname{\chemfig{-[::-30](-[::-60])=^[::60]>[::-60](-[::90,1.2])-[::30,1.2](-[::120,1.2](-[::-60])-[::0])<:[::-30]COOH}}{\emph{trans}-Chrysanthemumsäure}};
- \draw[-stealth,thick] (h.south) -- (i.north);
- \draw[-stealth,thick] (i.south) -- node[left]{KOH} (j.north);
-\end{tikzpicture}
-\caption{Synthese von Chrysanthemumsäure}
-\end{rxnfloat}
-
-Gehen wir den Code Stück für Stück durch.
-\begin{Verbatim}
-
- \begin{rxnfloat}
- \setatomsep{1.8em}\setcrambond{3pt}{.5pt}{1pt}
- \centering
- \begin{tikzpicture}[scale=.8]
- \small
- \node(a) at (0,0) {\chemfig{=_[::30]-[::-60]-[::60](-[::-60])(-[::120])-[::0]OH}};
- \node(b) at (0,-4) {\chemfig{Br-[::30]-[::-60]=_[::60](-[::-60])-[::60]}};
- \draw[-stealth,thick] (a.south) -- node[left]{HBr} (b.north);
-\end{Verbatim}
-In den Zeilen 1 -- 6 wird die Umgebung begonnen und die Voreinstellungen vorgenommen, damit die Formeln nicht zu groß werden. In den Zeilen 7 -- 9 werden die beiden ersten Formeln erstellt (Zeilen 7 und 8) und mit Reaktionspfeil (Zeile 9) verbunden.
-\setatomsep{1.8em}
-\setcrambond{3pt}{.5pt}{1pt}
-\begin{center}
-\begin{tikzpicture}[scale=.8]
- \small
- \node(a) at (0,0) {\chemfig{=_[::30]-[::-60]-[::60](-[::-60])(-[::120])-[::0]OH}};
- \node(b) at (0,-4) {\chemfig{Br-[::30]-[::-60]=_[::60](-[::-60])-[::60]}};
- \draw[-stealth,thick] (a.south) -- node[left]{HBr} (b.north);
-\end{tikzpicture}
-\end{center}
-\begin{Verbatim}[firstnumber=10]
- \node(c) at (5,1) {\chemname{\chemfig{**6(--(-SO_2Cl)---(-)-)}}{Tosylchlorid}};
- \node(d) at (5,-4) {\chemfig{**6(--(-SO_2Na)---(-)-)}};
- \draw[-stealth,thick] (c.south) -- node[left]{NaOH} node[right]{Zn} (d.north);
-\end{Verbatim}
-In den drei folgenden Zeilen 10 -- 12 wird der zweite Syntheseast erstellt und mit Reaktionspfeil verbunden.
-\begin{center}
-\begin{tikzpicture}[scale=.8]
- \small
- \node(a) at (0,0) {\chemfig{=_[::30]-[::-60]-[::60](-[::-60])(-[::120])-[::0]OH}};
- \node(b) at (0,-4) {\chemfig{Br-[::30]-[::-60]=_[::60](-[::-60])-[::60]}};
- \draw[-stealth,thick] (a.south) -- node[left]{HBr} (b.north);
- \node(c) at (5,1) {\chemname{\chemfig{**6(--(-SO_2Cl)---(-)-)}}{Tosylchlorid}};
- \node(d) at (5,-4) {\chemfig{**6(--(-SO_2Na)---(-)-)}};
- \draw[-stealth,thick] (c.south) -- node[left]{NaOH} node[right]{Zn} (d.north);
-\end{tikzpicture}
-\end{center}
-\begin{Verbatim}[firstnumber=13]
- \node(e) at (2.5,-8.5) {\chemfig{**6(--(-SO_2-[:30]-[::-60]=_[::60](-[::60])-[::-60])---(-)-)}};
- \node(f) at (10,-4) {\chemname{\chemfig{-[::30](-[::60])=_[::-60]-[::60]COOH}}{3-Methyl-2-butensäure}};
- \node(g) at (10,-8.5) {\chemfig{-[::30](-[::60])=_[::-60]-[::60]CO_2CH_3}};
- \draw[-stealth,thick] (f.south) -- node[left]{\ce{CH3OH}} (g.north);
-\end{Verbatim}
-In den Zeilen 13 -- 16 wird der dritte Ast sowie das Ergebnis der ersten beiden Äste erstellt.
-\begin{center}
-\begin{tikzpicture}[scale=.8]
- \small
- \node(a) at (0,0) {\chemfig{=_[::30]-[::-60]-[::60](-[::-60])(-[::120])-[::0]OH}};
- \node(b) at (0,-4) {\chemfig{Br-[::30]-[::-60]=_[::60](-[::-60])-[::60]}};
- \draw[-stealth,thick] (a.south) -- node[left]{HBr} (b.north);
- \node(c) at (5,1) {\chemname{\chemfig{**6(--(-SO_2Cl)---(-)-)}}{Tosylchlorid}};
- \node(d) at (5,-4) {\chemfig{**6(--(-SO_2Na)---(-)-)}};
- \draw[-stealth,thick] (c.south) -- node[left]{NaOH} node[right]{Zn} (d.north);
- \node(e) at (2.5,-8.5) {\chemfig{**6(--(-SO_2-[:30]-[::-60]=_[::60](-[::60])-[::-60])---(-)-)}};
- \node(f) at (10,-4) {\chemname{\chemfig{-[::30](-[::60])=_[::-60]-[::60]COOH}}{3-Methyl-2-butensäure}};
- \node(g) at (10,-8.5) {\chemfig{-[::30](-[::60])=_[::-60]-[::60]CO_2CH_3}};
- \draw[-stealth,thick] (f.south) -- node[left]{\ce{CH3OH}} (g.north);
-\end{tikzpicture}
-\end{center}
-\begin{Verbatim}[firstnumber=17]
- \merge{e}{b}{d}
-\end{Verbatim}
-In Zeile 17 werden nun die beiden ersten Äste zusammengeführt.
-\begin{center}
-\begin{tikzpicture}[scale=.8]
- \small
- \node(a) at (0,0) {\chemfig{=_[::30]-[::-60]-[::60](-[::-60])(-[::120])-[::0]OH}};
- \node(b) at (0,-4) {\chemfig{Br-[::30]-[::-60]=_[::60](-[::-60])-[::60]}};
- \draw[-stealth,thick] (a.south) -- node[left]{HBr} (b.north);
- \node(c) at (5,1) {\chemname{\chemfig{**6(--(-SO_2Cl)---(-)-)}}{Tosylchlorid}};
- \node(d) at (5,-4) {\chemfig{**6(--(-SO_2Na)---(-)-)}};
- \draw[-stealth,thick] (c.south) -- node[left]{NaOH} node[right]{Zn} (d.north);
- \node(e) at (2.5,-8.5) {\chemfig{**6(--(-SO_2-[:30]-[::-60]=_[::60](-[::60])-[::-60])---(-)-)}};
- \node(f) at (10,-4) {\chemname{\chemfig{-[::30](-[::60])=_[::-60]-[::60]COOH}}{3-Methyl-2-butensäure}};
- \node(g) at (10,-8.5) {\chemfig{-[::30](-[::60])=_[::-60]-[::60]CO_2CH_3}};
- \draw[-stealth,thick] (f.south) -- node[left]{\ce{CH3OH}} (g.north);
- \merge{e}{b}{d}
-\end{tikzpicture}
-\end{center}
-\begin{Verbatim}[firstnumber=18]
- \node[left delimiter={[},right delimiter={]}](h) at (6.25,-14.5) {\chemfig{-[::30](-[::60])=^[::-60]-[::60](-[::60]S(=[::90]O)(=[::-90]O)-[::0]**6(---(-)---))-[::-60](-[::0])(-[::-120])-[::60](-[::60,.5,,,white]\ominus)-[::-60]CO_2CH_3}};
-\end{Verbatim}
-In Zeile 18 erstellen wir den Übergangszustand.
-\begin{center}
-\begin{tikzpicture}[scale=.8]
- \small
- \node(e) at (2.5,-8.5) {\chemfig{**6(--(-SO_2-[:30]-[::-60]=_[::60](-[::60])-[::-60])---(-)-)}};
- \node(g) at (10,-8.5) {\chemfig{-[::30](-[::60])=_[::-60]-[::60]CO_2CH_3}};
- \node[left delimiter={[},right delimiter={]}](h) at (6.25,-14.5) {\chemfig{-[::30](-[::60])=^[::-60]-[::60](-[::60]S(=[::90]O)(=[::-90]O)-[::0]**6(---(-)---))-[::-60](-[::0])(-[::-120])-[::60](-[::60,.5,,,white]\ominus)-[::-60]CO_2CH_3}};
-\end{tikzpicture}
-\end{center}
-\begin{Verbatim}[firstnumber=19]
- \node at (5.25,-11) {\ce{NaOCH3}};
- \merge{h}{e}{g}
-\end{Verbatim}
-In den Zeilen 19 und 20 werden de Äste zusammengeführt und der Pfeil beschriftet.
-\begin{center}
-\begin{tikzpicture}[scale=.8]
- \small
- \node(e) at (2.5,-8.5) {\chemfig{**6(--(-SO_2-[:30]-[::-60]=_[::60](-[::60])-[::-60])---(-)-)}};
- \node(g) at (10,-8.5) {\chemfig{-[::30](-[::60])=_[::-60]-[::60]CO_2CH_3}};
- \node[left delimiter={[},right delimiter={]}](h) at (6.25,-14.5) {\chemfig{-[::30](-[::60])=^[::-60]-[::60](-[::60]S(=[::90]O)(=[::-90]O)-[::0]**6(---(-)---))-[::-60](-[::0])(-[::-120])-[::60](-[::60,.5,,,white]\ominus)-[::-60]CO_2CH_3}};
- \node at (5.25,-11) {\ce{NaOCH3}};
- \merge{h}{e}{g}
-\end{tikzpicture}
-\end{center}
-\begin{Verbatim}[firstnumber=21]
- \node(i) at (6.25,-18.5) {};
- \node(j) at (6.25,-21.5) {\chemname{\chemfig{-[::-30](-[::-60])=^[::60]>[::-60](-[::90,1.2])-[::30,1.2](-[::120,1.2](-[::-60])-[::0])<:[::-30]COOH}}{\emph{trans}-Chrysanthemumsäure}};
- \draw[-stealth,thick] (h.south) -- (i.north);
- \draw[-stealth,thick] (i.south) -- node[left]{KOH} (j.north);
- \end{tikzpicture}
- \caption{Synthese von Chrysanthemumsäure}
- \end{rxnfloat}
-
-\end{Verbatim}
-In den abschließenden Zeilen 21 -- 28 wird zunächst eine leere node erstellt (Zeile 21), dann das Produkt (Zeile 22). In den Zeilen 23 und 24 werden die beiden letzten Reaktionspfeile erstellt, in den letzten vier Zeilen die Umgebung dann beendet.
-\begin{center}
-\begin{tikzpicture}[scale=.8]
- \small
- \node(i) at (6.25,-18.5) {};
- \node(j) at (6.25,-21.5) {\chemname{\chemfig{-[::-30](-[::-60])=^[::60]>[::-60](-[::90,1.2])-[::30,1.2](-[::120,1.2](-[::-60])-[::0])<:[::-30]COOH}}{\emph{trans}-Chrysanthemumsäure}};
- \draw[-stealth,thick] (h.south) -- (i.north);
- \draw[-stealth,thick] (i.south) -- node[left]{KOH} (j.north);
-\end{tikzpicture}
-\end{center}
+ \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 Eliminierung}
+ \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,protolyse]{\ce{H2SO4}}{\ce{HSO4\om}}
+ \anywhere{below=of protolyse,yshift=1em}{\tiny Protolyse}
+ \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,addukt]{\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 Protolyse}
+ }
+ \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 Eliminierung}
+ \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[Umfangreiche Synthese]{\mC und \CF für eine umfangreichere Synthese}\label{ssec:tikzsynthese}
+Als letztes Beispiel erstellen wir eine umfangreichere Synthese.\index{merge}
+\begin{rxnscheme}[rs:synthese,htp,,.8]{Synthese von Chrysanthemumsäure}
+ \setatomsep{1.5em}
+ \branch[,start_links]{
+ \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_links,start_mitte,yshift=1em]{
+ \reactant{\chemname{\chemfig[][scale=.8]{**6(--(-SO_2Cl)---(-)-)}}{Tosylchlorid}}
+ \arrow[below]{\ce{NaOH}}{\ce{Zn}}
+ \reactant[below]{\chemfig[][scale=.8]{**6(--(-SO_2Na)---(-)-)}}
+ }
+ \branch[right=of start_mitte,start_rechts,xshift=3em,yshift=-10em]{
+ \reactant{\chemname{\chemfig{-[::30](-[::60])=_[::-60]-[::60]COOH}}{3-Methyl-2-butensäure}}
+ \arrow[below]{\ce{CH3OH}}{}
+ \reactant[below]{\chemfig{-[::30](-[::60])=_[::-60]-[::60]CO_2CH_3}}
+ }
+ \branch[below=of start_links,ziel_eins,xshift=5em,yshift=-5em]{
+ \reactant{\chemfig[][scale=.8]{**6(--(-SO_2-[:30]-[::-60]=_[::60](-[::60])-[::-60])---(-)-)}}
+ }
+ \branch[below=of ziel_eins,ziel_zwei,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}-Chrysanthemumsäure}}
+ }
+ \merge{ziel_eins}{start_links}{start_mitte}
+ \merge[\ce{NaOCH3}]{ziel_zwei}{ziel_eins}{start_rechts}
+\end{rxnscheme}
+\begin{lstlisting}
+ \begin{rxnscheme}[,htp,,.8]{Synthese von Chrysanthemums\"aure}
+ \setatomsep{1.5em}
+ \branch[,start_links]{
+ \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_links,start_mitte,yshift=1em]{
+ \reactant{\chemname{\chemfig[][scale=.8]{**6(--(-SO_2Cl)---(-)-)}}{Tosylchlorid}}
+ \arrow[below]{\ce{NaOH}}{\ce{Zn}}
+ \reactant[below]{\chemfig[][scale=.8]{**6(--(-SO_2Na)---(-)-)}}
+ }
+ \branch[right=of start_mitte,start_right,xshift=3em,yshift=-10em]{
+ \reactant{\chemname{\chemfig{-[::30](-[::60])=_[::-60]-[::60]COOH}}{3-Methyl-2-butens\"aure}}
+ \arrow[below]{\ce{CH3OH}}{}
+ \reactant[below]{\chemfig{-[::30](-[::60])=_[::-60]-[::60]CO_2CH_3}}
+ }
+ \branch[below=of start_links,ziel_eins,xshift=5em,yshift=-5em]{
+ \reactant{\chemfig[][scale=.8]{**6(--(-SO_2-[:30]-[::-60]=_[::60](-[::60])-[::-60])---(-)-)}}
+ }
+ \branch[below=of ziel_eins,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}-Chrysanthemums\"aure}}
+ }
+ \merge{ziel_eins}{start_links}{start_mitte}
+ \merge[\ce{NaOCH3}]{target_two}{ziel_eins}{start_right}
+ \end{rxnscheme}
+\end{lstlisting}
+Gehen wir Schritt für Schritt durch den Code.
+\begin{lstlisting}
+ \begin{rxnscheme}[,htp,,.8]{Synthesis von Chrysanthemums\"aure}
+ \setatomsep{1.5em}
+ \branch[,start_links]{
+ \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 den Zeilen 1 und 2 beginnen wir die Umgebung und sorgen dafür, dass das Schema nicht zu groß wird. In den Zeilen 3 -- 7 schreiben wir den ersten Reaktionszweig.
+\begin{rxn}[,.8]
+ \setatomsep{1.5em}
+ \branch[,start_links]{
+ \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_links,start_mitte,yshift=1em]{
+ \reactant{\chemname{\chemfig[][scale=.8]{**6(--(-SO_2Cl)---(-)-)}}{Tosylchlorid}}
+ \arrow[below]{\ce{NaOH}}{\ce{Zn}}
+ \reactant[below]{\chemfig[][scale=.8]{**6(--(-SO_2Na)---(-)-)}}
+ }
+\end{lstlisting}
+In den Zeilen 8 -- 12 schreiben wir den zweiten Zweig der Synthese.
+\begin{rxn}[,.8]
+ \setatomsep{1.5em}
+ \branch[,start_links]{
+ \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_links,start_mitte,yshift=1em]{
+ \reactant{\chemname{\chemfig[][scale=.8]{**6(--(-SO_2Cl)---(-)-)}}{Tosylchlorid}}
+ \arrow[below]{\ce{NaOH}}{\ce{Zn}}
+ \reactant[below]{\chemfig[][scale=.8]{**6(--(-SO_2Na)---(-)-)}}
+ }
+\end{rxn}
+\begin{lstlisting}[firstnumber=13]
+ \branch[right=of start_mitte,start_right,xshift=3em,yshift=-10em]{
+ \reactant{\chemname{\chemfig{-[::30](-[::60])=_[::-60]-[::60]COOH}}{3-Methyl-2-butens\"aure}}
+ \arrow[below]{\ce{CH3OH}}{}
+ \reactant[below]{\chemfig{-[::30](-[::60])=_[::-60]-[::60]CO_2CH_3}}
+ }
+ \branch[below=of start_links,ziel_eins,xshift=5em,yshift=-5em]{
+ \reactant{\chemfig[][scale=.8]{**6(--(-SO_2-[:30]-[::-60]=_[::60](-[::60])-[::-60])---(-)-)}}
+ }
+\end{lstlisting}
+In den Zeilen 13 -- 20 schreiben wir nun den dritten Zweig und das Produkt der ersten beiden Zweige.
+\begin{rxn}[,.8]
+ \setatomsep{1.5em}
+ \branch[,start_links]{
+ \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_links,start_mitte,yshift=1em]{
+ \reactant{\chemname{\chemfig[][scale=.8]{**6(--(-SO_2Cl)---(-)-)}}{Tosylchlorid}}
+ \arrow[below]{\ce{NaOH}}{\ce{Zn}}
+ \reactant[below]{\chemfig[][scale=.8]{**6(--(-SO_2Na)---(-)-)}}
+ }
+ \branch[right=of start_mitte,start_rechts,xshift=3em,yshift=-10em]{
+ \reactant{\chemname{\chemfig{-[::30](-[::60])=_[::-60]-[::60]COOH}}{3-Methyl-2-butensäure}}
+ \arrow[below]{\ce{CH3OH}}{}
+ \reactant[below]{\chemfig{-[::30](-[::60])=_[::-60]-[::60]CO_2CH_3}}
+ }
+ \branch[below=of start_links,ziel_eins,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 ziel_eins,ziel_zwei,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}-Chrysanthemums\"aure}}
+ }
+\end{lstlisting}
+In den Zeilen 21 -- 26 schreiben wir den letzten Zweig, den Stamm sozusagen.
+\begin{rxn}[,.8]
+ \dummy[start_links]
+ \branch[right=of start_links,start_rechts,xshift=13em,yshift=-4em]{
+ \reactant[below]{\chemfig{-[::30](-[::60])=_[::-60]-[::60]CO_2CH_3}}
+ }
+ \branch[below=of start_links,ziel_eins,xshift=5em]{
+ \reactant{\chemfig[][scale=.8]{**6(--(-SO_2-[:30]-[::-60]=_[::60](-[::60])-[::-60])---(-)-)}}
+ }
+ \branch[below=of ziel_eins,ziel_zwei,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}-Chrysanthemumsäure}}
+ }
+\end{rxn}
+Schließlich werden die verschiedenen Zweige zusammengeführt\index{merge}, der zweite Merging-Pfeil erhält eine Beschriftung und die Umgebung wird beendet.
+\begin{lstlisting}[firstnumber=27]
+ \merge{ziel_eins}{start_links}{start_mitte}
+ \merge[\ce{NaOCH3}]{target_two}{ziel_eins}{start_right}
+ \end{rxnscheme}
+\end{lstlisting}
\section{Nachwort}
\mC steckt noch in den Kinderschuhen. Das bedeutet, dass vermutlich noch eine ganze Reihe von Bugs enthalten sind. Bestimmt fehlt auch noch das eine oder andere Feature, das nützlich wäre. Da ich das Paket nur in meiner Freizeit testen und verbessern kann, bin ich über \emph{jede} Art von Feedback sehr froh. Wenn Ihnen \mC gefällt, dann helfen Sie doch, es zu verbessern, indem Sie mir Ihre Erfahrungen mitteilen.
@@ -2168,4 +2420,12 @@ Auch wenn ich mich bemüht habe, sinnvolle chemische Reaktionen einzusetzen, hab
Viel Spaß mit \mC!
\par\vspace{.5cm}\hspace{.5cm}Clemens Niederberger, Berlin, \mCdate{de}
+
+\section{Dank}
+Ich schulde Dank für Bugreports und Vorschläge:
+
+F.\,Chervet, Ferghun, V.\,Garibal.
+
+\renewcommand{\indexname}{Stichwortverzeichnis}
+\printindex
\end{document} \ No newline at end of file
diff --git a/Master/texmf-dist/doc/latex/mychemistry/mychemistry_en.pdf b/Master/texmf-dist/doc/latex/mychemistry/mychemistry_en.pdf
index 0661d500a75..64a09efc74a 100644
--- a/Master/texmf-dist/doc/latex/mychemistry/mychemistry_en.pdf
+++ b/Master/texmf-dist/doc/latex/mychemistry/mychemistry_en.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/mychemistry/mychemistry_en.tex b/Master/texmf-dist/doc/latex/mychemistry/mychemistry_en.tex
index e9bdab2407d..1036d203924 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/04 ------------------------------------------------------------------------ %
+% - 2011/04/15 ------------------------------------------------------------------------ %
% ------------------------------------------------------------------------------------- %
% - http://www.niederberger-berlin.net/2011/02/latex-mychemistry/ --------------------- %
% - kontakt@niederberger-berlin.net --------------------------------------------------- %
@@ -30,17 +30,18 @@
% - mychemistry_en.tex and bondwidth.tex - %
% ------------------------------------------------------------------------------------- %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\documentclass[DIV10]{scrartcl}
+\documentclass[DIV10,titlepage,toc=index]{scrartcl}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% - Pakete ---------------------------------------------------------------------------- %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\usepackage{etoolbox}
\usepackage{scrhack} % verbessert KOMAs Zusammenspiel mit floats
-\usepackage[english]{babel} % Sprache
\usepackage{emerald} % chemfig-Schrift
\usepackage[utf8x]{inputenc} % Zeichenkodierung: Eingabe
\usepackage[T1]{fontenc} % Text-Ausgabe-Codierung
\usepackage{textcomp,mathcomp}
+\usepackage[makeindex]{splitidx} % Index; Kompilieren: makeindex -sl index.ist *.idx
+\usepackage[english]{babel} % Sprache
\usepackage{xspace,paralist} % xspace und Listen
\usepackage{siunitx}
\DeclareSIUnit{\emlength}{em}
@@ -54,14 +55,14 @@
\labelformat{subsubsection}{section #1}
\usepackage[dvipsnames]{xcolor} % Farbe
\colorlet{code}{RawSienna}
- \xdefinecolor{DarkRed}{rgb}{0.4392,0.0627,0.0627}
+ \xdefinecolor{MyDarkRed}{rgb}{0.4392,0.0627,0.0627}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% - Anzeige des Inhaltsverzeichnisses ------------------------------------------------- %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\usepackage{titletoc}
\titlecontents{section} [6.5pc] % SECTION-ANZEIGE
{\renewcommand\familydefault{ppl}\addvspace{2pc}\bfseries
- \color{DarkRed}\titlerule[2pt]\filright\normalcolor\nobreak} % davor
+ \color{MyDarkRed}\titlerule[2pt]\filright\normalcolor\nobreak} % davor
{\contentslabel
[\textsc{Section}\
\thecontentslabel]{6.5pc}} % nummerierter Eintrag
@@ -95,9 +96,10 @@
pdfkeywords={myChemistry},
pdfcreator={LaTeX}
}
-\usepackage[english,color=dunkelrot]{mychemistry} % myChemistry
+\usepackage[english,color=MyDarkRed]{mychemistry} % myChemistry
\renewcommand\thebeispiel{\arabic{beispiel}} % chemexec angepasst
\labelformat{beispiel}{example #1}
+ \labelformat{rxnfloat}{scheme #1}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% - Listings anpassen ----------------------------------------------------------------- %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -105,7 +107,7 @@
\lstset{literate={ä}{{\"a}}1 {ö}{{\"o}}1 {ü}{{\"u}}1 {Ä}{{\"A}}1 {Ö}{{\"O}}1 {Ü}{{\"U}}1 {ß}{{\ss}}1}
\lstset{
language=[LaTeX]TeX,
- basicstyle={\ttfamily}, % Grundstil
+ basicstyle={\ttfamily}, % Grundstil
extendedchars=true,
numbers=left, % Zeilennummern
numberstyle=\tiny, % Größe des Zeilennummern
@@ -121,7 +123,7 @@
keywordstyle=[20]\color{blue},
morekeywords=[20]{rxn,rxnfloat,rxnscheme,tikzpicture},
texcsstyle=[30]\color{code},
- moretexcs=[30]{arrow,branch,chemand,chemfig,chemmove,chemname,chemrel,chemsign,ce,compound,declarecompound,draw,dummy,elmove,floatplacement,floatstyle,Hpl,Hyd,lewis,listof,makeinvisible,makevisible,marrow,mCsetup,merge,mesomeric,node,nu,om,op,ox,reactand,restylefloat,setarrowlength,setatomsep,setatomsize,setbondlength,setbondshape,setcrambond,setrcndist,setrxnalign,setschemealign,setschemename,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,setarrowlength,setarrowline,setatomsep,setatomsize,setbondlength,setbondshape,setbondwidth,setcrambond,setmergelength,setrcndist,setrxnalign,setschemealign,setschemename,si,SI,textcolor,transition},
fancyvrb=true
}
@@ -132,7 +134,7 @@
\pagestyle{scrheadings}
\setheadwidth{textwithmarginpar}
\automark{section}
-\ihead{\mC \mCversion}
+\ihead{\mC v\mCversion}
\ifoot{\small\color{gray}-~page~\thepage~-}
\cfoot{}
\ofoot{}
@@ -236,12 +238,11 @@
\makeatother
% - weitere Makros -------------------------------------------------------------------- %
-\newcommand{\mC}{{\color{DarkRed}\sffamily my\-Chemis\-try}\xspace} % Paketname
+\newcommand{\mC}{{\color{MyDarkRed}\sffamily my\-Chemis\-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}
-\newcommand\Vii[1][0pt]{\leavevmode\llap{\footnotesize\ECFTeenSpirit v1.2\kern\dimexpr20pt+#1\relax}}
-\newcommand\NEU[1][0pt]{\leavevmode\llap{\footnotesize\ECFTeenSpirit\color{red}New in \mCversion\kern\dimexpr20pt+#1\relax}}
+\newcommand\NEU[1][0pt]{\leavevmode\llap{\footnotesize\ECFTeenSpirit\color{red}New\kern\dimexpr20pt+#1\relax}}
\newlength{\tmplength}
% - für Beispiele --------------------------------------------------------------------- %
\newcommand{\abovearrow}{\tikz\node[draw,minimum width=3em,minimum height=1.5em,blue]{\footnotesize above};}
@@ -252,38 +253,38 @@
\begin{titlepage}
% inspired by the titlepage of chemfig's documentation
\begin{tikzpicture}[remember picture,overlay]
- \shade [color=dunkelrot,right color=white](current page.south west) rectangle ([yshift=3cm,xshift=-3cm]current page.center);
- \shade[top color=black,bottom color=dunkelrot]([yshift=7cm]current page.east)rectangle([yshift=2.5cm]current page.west);
+ \shade [color=MyDarkRed,right color=white](current page.south west) rectangle ([yshift=3cm,xshift=-3cm]current page.center);
+ \shade[top color=black,bottom color=MyDarkRed]([yshift=7cm]current page.east)rectangle([yshift=2.5cm]current page.west);
\node[text width=\textwidth,opacity=.15,yshift=-5.3cm] at (current page.center) {%
\begin{verbatim}
- \begin{rxn}[scale=.7]
+ \begin{rxn}[,.7]
\setatomsep{1.5em}\footnotesize
- \reactand[,a]{
+ \reactant[,a]{
\chemfig{C(-[4]*6(=-=-=-))(-[2]*6(=-=-=-))(-[6,,,2]HO)-C(-[2]CH_3)
(-[6]OH)-CH_3}
}
- \branch[below right=of a]{
- \arrow[direction=above right,length=.7]{}{}
- \reactand[above right]{
+ \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}$}{}
- \reactand{
+ \reactant{
\chemfig{\chembelow{C}{\oplus}(-[4]*6(=-=-=-))(-[2]*6(=-=-=-))-C
(-[2]CH_3)(-[6]OH)-CH_3}
}
}
\branch[below right=of a]{
- \arrow[type={-|>},direction=below right,length=.7]{}{}
- \reactand[below right]{
+ \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}$}{}
- \reactand{
+ \reactant{
\chemfig{C(-[4]*6(=-=-=-))(-[2]*6(=-=-=-))(-[6,,,2]HO)-
\chembelow{C}{\oplus}(-[2]CH_3)-CH_3}
}
@@ -294,26 +295,26 @@
\end{tikzpicture}
\begin{center}
\scalebox{4}{\mC}\par
- \Large\mCversion\par\bigskip
+ \Large v\mCversion\par\bigskip
\footnotesize\mCdate{en}\par
\normalsize Clemens Niederberger\par\vskip1.5cm
\color{white}\huge Creating reaction schemes with \LaTeX\ and \CF%
\end{center}
- \vskip4cm
- \begin{rxn}[scale=.7]
+ \vskip3cm
+ \begin{rxn}[,.7]
\setatomsep{1.5em}\footnotesize
- \reactand[,a]{ \chemfig{C(-[4]*6(=-=-=-))(-[2]*6(=-=-=-))(-[6,,,2]HO)-C(-[2]CH_3)(-[6]OH)-CH_3} }
+ \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[direction=above right,length=.7]{}{}
- \reactand[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[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}$}{}
- \reactand{ \chemfig{\chembelow{C}{\oplus}(-[4]*6(=-=-=-))(-[2]*6(=-=-=-))-C(-[2]CH_3)(-[6]OH)-CH_3} }{}
+ \reactant{ \chemfig{\chembelow{C}{\oplus}(-[4]*6(=-=-=-))(-[2]*6(=-=-=-))-C(-[2]CH_3)(-[6]OH)-CH_3} }{}
}
\branch[below right=of a]{
- \arrow[type={-|>},direction=below right,length=.7]{}{}
- \reactand[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[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}$}{}
- \reactand{ \chemfig{C(-[4]*6(=-=-=-))(-[2]*6(=-=-=-))(-[6,,,2]HO)-\chembelow{C}{\oplus}(-[2]CH_3)-CH_3} }
+ \reactant{ \chemfig{C(-[4]*6(=-=-=-))(-[2]*6(=-=-=-))(-[6,,,2]HO)-\chembelow{C}{\oplus}(-[2]CH_3)-CH_3} }
}
\end{rxn}
\end{titlepage}
@@ -322,10 +323,9 @@
\section{About}
\subsection{Changes}
-The new features or changes of each version are marked with {\ECFTeenSpirit v} followed by the version number, \eg {\ECFTeenSpirit v1.2}. The most recent changes are marked with {\ECFTeenSpirit\color{red}New in \mCversion}.
+The most recent changes are marked with {\ECFTeenSpirit\color{red}New}.
\subsubsection{Version 1.2}
-\Vii%
Since v1.2 there are some new features. The main part plays behind the scenes: the wrong arrow- and branch-alignments have been corrected. \textbf{Due to these changes \mC now needs Version 2.10 of \TikZ (or pgf, actually}, see \ref{ssec:voraussetzungen}).
There are some new "frontend" features as well. For one thing there are some new package options (see \ref{ssec:paketoptionen}). Additionally the arrows have got two new keys (see \ref{ssec:arrow}).
@@ -335,56 +335,68 @@ The environments have gained a few features, with which they can be customized,
Last but not least since v1.2 \mC underlies LPPL version 1.3 or later.
\subsubsection{Version 1.3}
-\NEU%
-The commands \lstinline+\branch+, \lstinline+\mesomeric+, \lstinline+\reactand+ 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{Verbatim}
+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>]{}
-\end{Verbatim}
-Version 1.2 explicitly needed a given alignment, if one wanted to use \TikZ keys, even with default alignment. Since \mCversion\ this isn't required any more.
-\begin{Verbatim}
+\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}
% up to version 1.2:
- \reactand{\ce{Br2}}{}\arrow{$h\nu$}{}\reactand!![right,draw,inner sep=5pt]!!{\ce{2 \lewis{0.,Br}}}{}
+ \reactant{\ce{Br2}}{}\arrow{$h\nu$}{}\reactant!![right,draw,inner sep=5pt]!!{\ce{2 \lewis{0.,Br}}}{}
% since version 1.3:
- \reactand{\ce{Br2}}\arrow{$h\nu$}{}\reactand!![,,draw,inner sep=5pt]!!{\ce{2 \lewis{0.,Br}}}
-\end{Verbatim}
+ \reactant{\ce{Br2}}\arrow{$h\nu$}{}\reactant!![,,draw,inner sep=5pt]!!{\ce{2 \lewis{0.,Br}}}
+\end{lstlisting}
The commands to customize \mC have been renamed and the command\linebreak\lstinline+\mCsetup+ has been added. Now you can customize \mC using only one command. See \ref{ssec:setarrowlength}, \ref{ssec:setatomsize}, \ref{ssec:setbondlength}, \ref{ssec:setbondshape} and \ref{ssec:mCsetup}.
There is the new command \lstinline+\chemand+, which produces a $+$, see \ref{ssec:chemand}.
-If you're using \CF v0.4, \mC inputs the file \lstinline+bondwith.tex+ which provides the command \lstinline+\setbondwidth{<width>}+ with which you can change the line thickness of bonds.
+If you're using \CF v0.4 or v0.4a, \mC inputs the file \lstinline+bondwith.tex+ which provides the command \lstinline+\setbondwidth{<width>}+ with which you can change the line thickness of bonds.
+
+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%
+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}.
-And you might find this one nice: every \mC command in a listing is a hyperlink referring to the corresponding entry in the command reference.
+There is another new command \lstinline+\anywhere+ (\ref{ssec:anywhere}), with which text or formul\ae\ can be placed off the chain.
\subsection{Licence}
-\mC \mCversion\ underlies the The LaTeX project public license\\(\url{http://www.latex-project.org/lppl.txt}).
+\mC v\mCversion\ underlies the The \LaTeX\ project public license\\(\url{http://www.latex-project.org/lppl.txt}).
-\subsection{Requirements}\label{ssec:voraussetzungen}
+\subsection{Requirements}\label{ssec:voraussetzungen}\index{requirements|(}
In order to function properly \mC needs some packages to be available.
\begin{description}
- \item[\CF] without it why would you use \mC?
- \item[ifthen] for internal queries;
- \item[calc] for internal calculations;
- \item[xkeyval] package options and command keys are created with this package;
- \item[float] the \lstinline=rxnscheme= environment is defined with this package;
- \item[pgf/\TikZ] pgf actually isn't just one package but a whole bundle. They are the basis layer for \TikZ. \mC needs at least the version from 09/08/2010\footnote{\url{http://sourceforge.net/projects/pgf/files/}}. More precisely: the command \lstinline=\pgfpositionnodelater= must exist. Even more precisely: only the \lstinline+\arrow+ key \lstinline+both+ (see \ref{ssec:arrow}) needs \lstinline=\pgfpositionnodelater=. If you don't use this option, \mC should work nicely with pgf v2.00. Older versions have not been tested.
+ \item[\CF]\index{requirements!ChemFig@\CF} without it why would you use \mC?
+ \item[ifthen]\index{requirements!ifthen} for internal queries;
+ \item[calc]\index{requirements!calc} for internal calculations;
+ \item[xkeyval]\index{requirements!xkeyval} package options and command keys are created with this package;
+ \item[float]\index{requirements!float} the \lstinline=rxnscheme= environment is defined with this package;
+ \item[pgf/\TikZ]\index{requirements!pgf}\index{requirements!TikZ@\TikZ} pgf actually isn't just one package but a whole bundle. They are the basis layer for \TikZ. \mC needs at least the version from 09/08/2010\footnote{\url{http://sourceforge.net/projects/pgf/files/}}. More precisely: the command \lstinline=\pgfpositionnodelater= must exist. Even more precisely: only the \lstinline+\arrow+ key \lstinline+both+ (see \ref{ssec:arrow}) needs \lstinline=\pgfpositionnodelater=. If you don't use this option, \mC should work nicely with pgf v2.00. Older versions have not been tested.
\end{description}
+\index{requirements|)}
\subsection{The Idea}
Since \CF was published August 2010, there is a flexible solution for creating organic structures. With \CF and `mhchem' one is able to create nearly all structural and molecular formulars that a chemist needs. There is one thing, though, in which `ochem' still beats \CF: creating reaction mechanisms. This is where \mC comes in.
\mC loads the packages
\begin{itemize}
- \item \CF\footnote{by Christian Tellechea, \url{http://www.ctan.org/tex-archive/macros/generic/chemfig/}},
- \item `mhchem'\footnote{by Martin Hensel, \url{http://www.ctan.org/tex-archive/macros/latex/contrib/mhchem/}} in version 3, when ist exists,
- \item `chemexec'\footnote{by me, \url{http://www.ctan.org/tex-archive/macros/latex/contrib/chemexec/}}, when it exists, and
- \item `chemcompounds'\footnote{by Stephan Schenk, \url{http://www.ctan.org/tex-archive/macros/latex/contrib/chemcompounds/}}, when ist exists.
+ \item \CF\footnote{by Christian Tellechea, \url{http://www.ctan.org/tex-archive/macros/generic/chemfig/}}\index{ChemFig@\CF},
+ \item `mhchem'\footnote{by Martin Hensel, \url{http://www.ctan.org/tex-archive/macros/latex/contrib/mhchem/}}\index{mhchem} in version 3, when ist exists,
+ \item `chemexec'\footnote{by me, \url{http://www.ctan.org/tex-archive/macros/latex/contrib/chemexec/}}\index{chemexec}, when it exists, and
+ \item `chemcompounds'\footnote{by Stephan Schenk, \url{http://www.ctan.org/tex-archive/macros/latex/contrib/chemcompounds/}}\index{chemcompounds}, when ist exists.
\end{itemize}
How these packages work, you can read in their documentations. Commands provided by these packages are for example
\begin{itemize}
- \item \lstinline=\ce{}= (mhchem)
- \item \lstinline=\ox{}{}=, \lstinline=\om[]=, \lstinline=\op[]=, \lstinline=\Hyd=, \lstinline=\Hpl= (chemexec)
- \item \lstinline=\chemfig[][]{}=, \lstinline=\chemrel[]{}=, \lstinline=\chemsign[]{}=, \lstinline=\lewis{}= (\CF)
- \item \lstinline=\declarecompound[]{}=, \lstinline=\compound{}= (chemcompounds).
+ \item \lstinline=\ce{}= (mhchem)\index{mhchem}
+ \item \lstinline=\ox{}{}=, \lstinline=\om[]=, \lstinline=\op[]=, \lstinline=\Hyd=, \lstinline=\Hpl= (chemexec)\index{chemexec}
+ \item \lstinline=\chemfig[][]{}=, \lstinline=\chemrel[]{}=, \lstinline=\chemsign[]{}=, \lstinline=\lewis{}= (\CF)\index{ChemFig@\CF}
+ \item \lstinline=\declarecompound[]{}=, \lstinline=\compound{}= (chemcompounds)\index{chemcompounds}.
\end{itemize}
Some of these commands are used in the examples of this documentation \textit{without being mentioned explicitly}.
@@ -395,7 +407,7 @@ Above all, \mC provides commands for creating reaction mechanisms.
\mC provides two environments within which the mechanisms are created. Both environments basically are \lstinline+tikzpicture+ environments. One might ask oneself: why? You can do loads of stuff with \CF already. And \TikZ provides all the possibilities one could ask for. But since I'm a lazy guy I wrote several macros providing \TikZ commands, I often used. They got so many and got more and more possibilities to adjust, that I bundled them into this package. Of course you can still use \TikZ and stay more flexible with it, if you like.
\subsection{Basic Principle}
-Within the \lstinline+tikzpicture+ reactands and arrows are placed as nodes on a \lstinline+chain+\footnote{Provided by the tikzlibrary `chains'}.
+Within the \lstinline+tikzpicture+ reactants and arrows are placed as nodes on a \lstinline+chain+\footnote{Provided by the tikzlibrary `chains'}.
\begin{SideBySideExample}
\begin{tikzpicture}[start chain]
\node [on chain] {A};
@@ -438,180 +450,191 @@ In some of the examples in this documentation the nodes are boxed with a coloure
Let's take a look at an example first:
\begin{SideBySideExample}
\begin{rxn}
- \reactand{ \chemfig{-[::30]-[::-60]OH} }
+ \reactant{ \chemfig{-[::30]-[::-60]OH} }
\arrow{Ox.}{}
- \reactand{ \chemfig{-[::30]=_[::-60]O} }
+ \reactant{ \chemfig{-[::30]=_[::-60]O} }
\end{rxn}
\end{SideBySideExample}
-In this example you see the most important commands of \mC:
-\begin{description}
- \vitem=\begin{rxn}[<keys>]= The first of two environments. It creates a centered reaction scheme between two paragraphs (see \ref{ssec:rxn}).
- \vitem=\reactand[<alignment>,<anchor>,<tikz>]{<formula>}= 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:reactand}).
- \vitem=\arrow[<keys>]{<above>}{<below>}= creates an arrow, which by default has a length of \SI{5}{\emlength} pointing to the right (see \ref{ssec:arrow}).
-\end{description}
+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}
+\begin{lstlisting}
+ \arrow[<direction>,<type>,<length factor>,<anchor>,both]{<above>}{<below>}
+\end{lstlisting}
+creates an arrow, which by default has a length of \SI{5}{\emlength} pointing to the right (see \ref{ssec:arrow}).
\begin{SideBySideExample}
\begin{rxn}
- \reactand{ \chemfig{-[::30]=_[::-60]O} }
- \arrow[direction=below]{}{Ox.}
- \reactand[below]{ \chemfig{-[::30](-[::60]OH)=_[::-60]O} }
+ \reactant{ \chemfig{-[::30]=_[::-60]O} }
+ \arrow[below]{}{Ox.}
+ \reactant[below]{ \chemfig{-[::30](-[::60]OH)=_[::-60]O} }
\end{rxn}
\end{SideBySideExample}
-As you can see one can align the reaction scheme vertical as well. By giving \lstinline=\reactand= the option \lstinline=below=, the carbonic acid is placed below the arrow. With \lstinline+direction=below+ the arrow points down instead to the right.
+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.
\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.
+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}
\begin{Example}
\begin{rxn}
- \reactand{ \chemfig{-[::30]-[::-60]OH} }
+ \reactant{ \chemfig{-[::30]-[::-60]OH} }
\arrow{}{}
- \reactand[,carbonyl]{ \chemfig{-[::30]=_[::-60]O} }
- \arrow[direction=below]{}{}
- \reactand[below]{ \chemfig{-[::30](-[::60]OH)=_[::-60]O} }
+ \reactant[,carbonyl]{ \chemfig{-[::30]=_[::-60]O} }
+ \arrow[below]{}{}
+ \reactant[below]{ \chemfig{-[::30](-[::60]OH)=_[::-60]O} }
\branch[right=of carbonyl]{
- \arrow[type={<=>}]{\ce{NH2R}}{}
- \reactand{ \chemfig{-[::30]=_[::-60]N(-[6]H)-[::60]R} }
+ \arrow[,<=>]{\ce{NH2R}}{}
+ \reactant{ \chemfig{-[::30]=_[::-60]N(-[6]H)-[::60]R} }
}
\end{rxn}
\end{Example}
-In the last example you've got to know another important command:
-\begin{description}
- \vitem=\branch[<alignment>,<anchor>,<tikz>]{<branch commands>}= (see \ref{ssec:branch})
-\end{description}
-The branch was placed right of the first reactand 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=<->=.
+In the last example you've got to know another important command (see \ref{ssec:branch})\index{branch}:
+\begin{lstlisting}
+ \branch[<alignment>,<anchor>,<tikz>]{<branch commands>}
+\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=:
+Extensive reaction schemes can be realized through multiple usage of \lstinline=\branch=\index{branch}:
\begin{Example}
\begin{rxn}
- \reactand{ \chemfig{-[::30]-[::-60]OH} }
+ \reactant{ \chemfig{-[::30]-[::-60]OH} }
\arrow{}{}
- \reactand[,carbonyl]{ \chemfig{-[::30]=_[::-60]O} }
- \arrow[direction=below]{}{}
- \reactand[below]{ \chemfig{-[::30](-[::60]OH)=_[::-60]O} }
+ \reactant[,carbonyl]{ \chemfig{-[::30]=_[::-60]O} }
+ \arrow[below]{}{}
+ \reactant[below]{ \chemfig{-[::30](-[::60]OH)=_[::-60]O} }
\branch[right=of carbonyl,imin]{
- \arrow[type={<=>},length=1.12]{\ce{NH2R}}{}
- \reactand{ \chemfig{-[::30]=_[::-60]N(-[6]H)-[::60]R} }
+ \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[type={<=>},direction=below right,length=1.12,aboveshift=3pt]{ \chemfig{[,.75]-[::30]-[::-60]OH} }{}
- \reactand[below right]{ \chemfig{-[::30](-[::60]O-[::-60]-[::-60])-[::-60]OH} }
+ \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[direction=above]{ \chemfig{[,.75]-[::30]=_[::-60]O}/\Hpl }{}
- \reactand[above]{ \chemfig{-[::30](-[::60]OH)-[::-60]-[::60]=[::60]O} }
+ \arrow[above]{ \chemfig{[,.75]-[::30]=_[::-60]O}/\Hpl }{}
+ \reactant[above]{ \chemfig{-[::30](-[::60]OH)-[::-60]-[::60]=[::60]O} }
\arrow{$-\ce{H2O}$}{}
- \reactand{ \chemfig{-[::30]=[::-60]-[::60]=[::60]O} }
+ \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.
+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}
\begin{Example}
\begin{rxnscheme}{Keto-enol tautomerization}
- \reactand{ \chemfig{=[::30]-[::-60]OH} }
- \arrow[type={<=>}]{}{}
- \reactand{ \chemfig{-[::30]=[::-60]O} }
+ \reactant{ \chemfig{=[::30]-[::-60]OH} }
+ \arrow[,<=>]{}{}
+ \reactant{ \chemfig{-[::30]=[::-60]O} }
\end{rxnscheme}
\end{Example}
Here we use the environment
-\begin{Verbatim}
- \begin{rxnscheme}[<keys>]{<caption>}
+\begin{lstlisting}
+ \begin{rxnscheme}[<label>,<placement>,<align>,<scalefactor>,<name>]{<caption>}
...
\end{rxnscheme}
-\end{Verbatim}
+\end{lstlisting}
In the command reference (\ref{ssec:rxnscheme}) you can read how to customize the scheme.
-\subsection{Predefined Values}
+\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:
-\begin{Verbatim}
+\begin{lstlisting}
\setatomsep{1.8em}
\setcrambond{3pt}{0.5pt}{1pt}
-\end{Verbatim}
+\end{lstlisting}
Outside the \mC environments the defaults of \CF still are set.
\begin{SideBySideExample}
\begin{rxn}
- \reactand{\chemfig{**6(------)}}
+ \reactant{\chemfig{**6(------)}}
\end{rxn}
\chemfig{**6(------)}
\end{SideBySideExample}
-\mC's defaults can be changed with these commands:
-\begin{Verbatim}
+\mC's defaults can be changed with these commands:\index{setbondlength}\index{setbondshape}\index{setatomsize}
+\begin{lstlisting}
\setbondlength{<length>}
\setbondshape{<base length>}{<dash thickness>}{<dash spacing>}
\setatomsize{<font size>}
-\end{Verbatim}
+\end{lstlisting}
With these commands, the parameters are changed \emph{for all following} \mC environments. If you leave the arguments empty, default values are restored. Default for \lstinline=\setatomsize= is \lstinline=\small=.
\begin{Example}
\setbondlength{2.1em}\setbondshape{5pt}{1pt}{2pt}\setatomsize{\Large}
\begin{rxn}
- \reactand{\chemfig{-[::30](<[::60])-[::-60](<:[::-60])-[::60]}}
+ \reactant{\chemfig{-[::30](<[::60])-[::-60](<:[::-60])-[::60]}}
\end{rxn}
\setbondlength{}\setbondshape{}{}{}\setatomsize{}
\begin{rxn}
- \reactand{\chemfig{-[::30](<[::60])-[::-60](<:[::-60])-[::60]}}
+ \reactant{\chemfig{-[::30](<[::60])-[::-60](<:[::-60])-[::60]}}
\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
- \reactand{\chemfig{-[::30](<[::60])-[::-60](<:[::-60])-[::60]}}
+ \reactant{\chemfig{-[::30](<[::60])-[::-60](<:[::-60])-[::60]}}
\end{rxn}
\begin{rxn}
- \reactand{\chemfig{-[::30](<[::60])-[::-60](<:[::-60])-[::60]}}
+ \reactant{\chemfig{-[::30](<[::60])-[::-60](<:[::-60])-[::60]}}
\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:
-\begin{Verbatim}
+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}
+\begin{lstlisting}
\setarrowlength{<length>}
-\end{Verbatim}
+\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}
+\subsection{Package options}\label{ssec:paketoptionen}\index{options|(}
\mC has a number of package options.
\begin{description}
- \vitem+chemstyle+\settowidth{\tmplength}{\tt chemstyle}\Vii[\tmplength]load the `chemstyle' package, without conflicts with \mC.
- \vitem+color=<colour>+ This loads `chemexec' with the options \lstinline=color<colour>= \&\ \lstinline+shade=true+.
- \vitem+english+ With this option, \mC loads the english version of `chemexec', if the package isn't loaded separately before. The name of the \lstinline=rxnscheme= environment (see \ref{ssec:rxnscheme}) is changed into "Reaction scheme".
- \vitem+nochemexec+ prevent \mC from loading `chemexec'.
- \vitem+nocolor+ `chemexec' is loaded without colour and with the option \lstinline+shade=false+ (default behaviour of \mC).
- \vitem+nocompounds+\settowidth{\tmplength}{\tt nocompounds}\Vii[\tmplength]prevent \mC from loading `chemcompounds'.
- \vitem+nomhchem+\settowidth{\tmplength}{\tt nomhchem}\Vii[\tmplength]prevent \mC from loading `mhchem' lädt, if `chemexec' isn't loaded either.
- \vitem+nopackages+\settowidth{\tmplength}{\tt nopackages}\Vii[\tmplength]prevent \mC from loading \emph{any} package (except \CF)\footnote{apart from the ones \mC needs to function (like \TikZ etc.).}.
- \vitem+placement=<position>+ The default placement behaviour of the \lstinline=rxnscheme= environment is changed to \lstinline=<position>=.
- \vitem+shade+ loads `chemexec' with the \lstinline+shade=true+ option.
+ \vitem+chemstyle+\index{options!chemstyle}load the `chemstyle' package, without conflicts with \mC.
+ \vitem+color=<colour>+\index{options!color} This loads `chemexec' with the options \lstinline=color<colour>= \&\ \lstinline+shade=true+.
+ \vitem+english+\index{options!english} With this option, \mC loads the english version of `chemexec', if the package isn't loaded separately before. The name of the \lstinline=rxnscheme= environment (see \ref{ssec:rxnscheme}) is changed into "Reaction scheme".
+ \vitem+nochemexec+\index{options!nochemexec} prevent \mC from loading `chemexec'.
+ \vitem+nocolor+\index{options!nocolor} `chemexec' is loaded without colour and with the option \lstinline+shade=false+ (default behaviour of \mC).
+ \vitem+nocompounds+\index{options!nocompounds}prevent \mC from loading `chemcompounds'.
+ \vitem+nomhchem+\index{options!nomhchem}prevent \mC from loading `mhchem' lädt, if `chemexec' isn't loaded either.
+ \vitem+nopackages+\index{options!nopackages}prevent \mC from loading \emph{any} package (except \CF)\footnote{apart from the ones \mC needs to function (like \TikZ etc.).}.
+ \vitem+placement=<position>+\index{options!placement} The default placement behaviour of the \lstinline=rxnscheme= environment is changed to \lstinline=<position>=.
+ \vitem+shade+\index{options!shade} loads `chemexec' with the \lstinline+shade=true+ option.
\end{description}
+\index{options|)}
\section{Advanced Usage, Usage with \TikZ}
-Most of the commands allow alignment with \TikZ code. Using \TikZ code you have much more possibilities aligning reactands relatively to one another. If you are familiar with \TikZ you have even more flexibility, of course (see \ref{ssec:tikzsynthese}).
+The biggest problem with \mC usually is the correct positioning of reactants and arrows. \ref{ssec:ausrichtungsfrage} looks a little bit into this topic.
+
+Some of the commands can be given \TikZ code as third optional argument. More precisely you can use the same \TikZ keys there as you would with a \lstinline+\node+ inside a \lstinline+tikzpicture+. If a node is placed with \lstinline+\node[<tikz>](<placement>){<anything>};+, then \lstinline+<tikz>+ is about the same in \eg \lstinline+\reactant[,,<tikz>]{}+\index{reactant!tikz}. With this you can customize your scheme in many ways.
-\subsection{The Alignment Question}
-Since reactands, arrows and branches are aligned centered to the referred object, the default alignment not always produces nice results.
+\subsection{The Alignment Question}\label{ssec:ausrichtungsfrage}\index{alignment|(}
+Since reactants, arrows and branches are aligned centered to the referred object, the default alignment not always produces nice results.
\begin{Example}
\makevisible
\begin{rxn}
- \reactand{ \chemname{\chemfig{*6(-=-=-=)}}{benzene \compound{benzene}} }
+ \reactant{ \chemname{\chemfig{*6(-=-=-=)}}{benzene \compound{benzene}} }
\arrow{}{}
- \reactand{ \chemname{\chemfig{*6(-=-=(-Br)-=)}}{bromobenzene \compound{bromobenzene}} }
+ \reactant{ \chemname{\chemfig{*6(-=-=(-Br)-=)}}{bromobenzene \compound{bromobenzene}} }
\end{rxn}
\end{Example}
-As you can see, both reactands are not aligned equally to the arrow, as far as the benzene ring is concerned. The first reactand seems to be too shifted up. Trying to solve this with \TikZ code fails:
+As you can see, both reactants are not aligned equally to the arrow, as far as the benzene ring is concerned. The first reactant seems to be shifted up. Trying to solve this with \TikZ code fails:
\begin{Example}
\makevisible
\begin{rxn}
- \reactand[,,yshift=-1em]{ \chemname{\chemfig{*6(-=-=-=)}}{benzene \compound{benzene}} }
+ \reactant[,,yshift=-1em]{ \chemname{\chemfig{*6(-=-=-=)}}{benzene \compound{benzene}} }
\arrow{}{}
- \reactand{ \chemname{\chemfig{*6(-=-=(-Br)-=)}}{bromobenzene \compound{bromobenzene}} }
+ \reactant{ \chemname{\chemfig{*6(-=-=(-Br)-=)}}{bromobenzene \compound{bromobenzene}} }
\end{rxn}
\end{Example}
-This is, because the first reactand is shifted with the respect to the object it refers to. Since it is the first object on the chain itself, it isn't shifted at all. The following arrow always is centered to the object before.
+This is, because the first reactant is shifted with the respect to the object it refers to. Since it is the first object on the chain itself, it isn't shifted at all. The following arrow always is centered to the object before.
\begin{SideBySideExample}
\makevisible
\begin{rxn}
- \reactand{A}
+ \reactant{A}
\chemand
- \reactand[,,yshift=1em]{B}
+ \reactant[,,yshift=1em]{B}
\arrow{}{}
\end{rxn}
\end{SideBySideExample}
@@ -619,194 +642,245 @@ Since there is no possibility to change the alignment of the arrow itself (yet),
\begin{Example}
\makevisible
\begin{rxn}
- \reactand{A}
+ \reactant{A}
\chemand
- \reactand[,,yshift=1em]{B}
+ \reactant[,,yshift=1em]{B}
\branch[,,yshift=-1em]{\arrow{}{}}
\end{rxn}
\begin{rxn}
- \reactand{ \chemname{\chemfig{*6(-=-=-=)}}{benzene \compound{benzene}} }
+ \reactant{ \chemname{\chemfig{*6(-=-=-=)}}{benzene \compound{benzene}} }
\branch[,,yshift=1em]{\arrow{}{}}
- \reactand{ \chemname{\chemfig{*6(-=-=(-Br)-=)}}{bromobenzene \compound{bromobenzene}} }
+ \reactant{ \chemname{\chemfig{*6(-=-=(-Br)-=)}}{bromobenzene \compound{bromobenzene}} }
\end{rxn}
\end{Example}
For the last example this isn't the best solution, though, because exact alignment needs lots of tries until you get the required result. There is another solution: an invisible bromine to the first benzene.
\begin{Example}
\makevisible
\begin{rxn}
- \reactand{ \chemname{\chemfig{*6(-=-=(-[,,,,draw=none]\phantom{Br})-=)}}{benzene \compound{benzene}} }
+ \reactant{ \chemname{\chemfig{*6(-=-=(-[,,,,draw=none]\phantom{Br})-=)}}{benzene \compound{benzene}} }
\arrow{}{}
- \reactand{ \chemname{\chemfig{*6(-=-=(-Br)-=)}}{bromobenzene \compound{bromobenzene}} }
+ \reactant{ \chemname{\chemfig{*6(-=-=(-Br)-=)}}{bromobenzene \compound{bromobenzene}} }
\end{rxn}
\end{Example}
-In other cases, \TikZ code can successfully be used:
+In other cases, too, an invisible substituent should be preferred over \TikZ code, since it's easier and more precise:
\begin{Example}
\makevisible
default:
\begin{rxn}
- \reactand{\chemfig{-[:-30]-[:30](=[2]O)-[:-30]OH}}
+ \reactant{\chemfig{-[:-30]-[:30](=[2]O)-[:-30]OH}}
\chemand
- \reactand{\chemfig{HO-[:30]-[:-30]-[:30]}}
+ \reactant{\chemfig{HO-[:30]-[:-30]-[:30]}}
\arrow{[\Hpl]}{\SI{200}{\celsius}}
- \reactand{\chemfig{-[:-30]-[:30](=[2]O)-[:-30]O-[:30]-[:-30]-[:30]}}
+ \reactant{\chemfig{-[:-30]-[:30](=[2]O)-[:-30]O-[:30]-[:-30]-[:30]}}
\end{rxn}
- hydroxy groups at the same height:
+ hydroxy groups at the same height through TikZ:
\begin{rxn}
- \reactand{\chemfig{-[:-30]-[:30](=[2]O)-[:-30]OH}}
+ \reactant{\chemfig{-[:-30]-[:30](=[2]O)-[:-30]OH}}
\chemand[,,yshift=-1.2em]
- \reactand[,,yshift=.12em]{\chemfig{HO-[:30]-[:-30]-[:30]}}
- \branch[,,yshift=1em]{\arrow{[\Hpl]}{\SI{200}{\celsius}}}
- \reactand{\chemfig{-[:-30]-[:30](=[2]O)-[:-30]O-[:30]-[:-30]-[:30]}}
+ \reactant[,,yshift=.12em]{\chemfig{HO-[:30]-[:-30]-[:30]}}
+ \branch[,,yshift=1.08em]{\arrow{[\Hpl]}{\SI{200}{\celsius}}}
+ \reactant{\chemfig{-[:-30]-[:30](=[2]O)-[:-30]O-[:30]-[:-30]-[:30]}}
+ \end{rxn}
+ hydroxy groups at the same height through an invisible substituent:
+ \begin{rxn}
+ \reactant{\chemfig{-[:-30]-[:30](=[2]O)-[:-30]OH}}
+ \chemand
+ \reactant{\chemfig{HO-[:30](=[2,,,,draw=none]\phantom{O})-[:-30]-[:30]}}
+ \arrow{[\Hpl]}{\SI{200}{\celsius}}
+ \reactant{\chemfig{-[:-30]-[:30](=[2]O)-[:-30]O-[:30]-[:-30]-[:30]}}
\end{rxn}
\end{Example}
-I'm afraid that in many cases you'll have to play with \lstinline+xshift+ and \lstinline+yshift+, until the scheme looks like you want. Maybe further versions of \mC will provide a more user friendly alignment syntax.
+I'm afraid that in many other cases you'll have to play with \lstinline+xshift+\index{xshift} and \lstinline+yshift+\index{yshift}, though, until the scheme looks the way you want. Maybe further versions of \mC will provide a more user friendly alignment syntax.
+\index{alignment|)}
\subsection{Using \TikZ to Achieve Other Results}
You could, just for fun?, change the looks of a molecule with \TikZ.
\begin{SideBySideExample}
\begin{rxn}
- \reactand[,,->,green!45!blue!55]{ \chemfig{*6(---(-)---)} }
+ \reactant[,,->,green!45!blue!55]{ \chemfig{*6(---(-)---)} }
\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:
\begin{Example}
- \newcommand{\emptyreactand}{\reactand[,minimum width=5em]{ \rule[-1em]{1em}{.5pt}\;\rule[-1em]{3em}{.5pt} }{}}
+ \newcommand{\emptyreactant}{\reactant[,minimum width=5em]{ \rule[-1em]{1em}{.5pt}\;\rule[-1em]{3em}{.5pt} }{}}
\newcommand{\stoich}{\rule[-3pt]{1em}{.5pt}}
\begin{rxn}
- \reactand{\bf\Large Ionic compounds (I)}
- \reactand[below,a,yshift=1em]{Fill in the missing parts}
- \branch[below=of a,b]{ \reactand[,,minimum width=5em]{ \stoich\ Na }\chemand \emptyreactand \arrow{}{} \emptyreactand \chemand \emptyreactand }
- \branch[below=of b,,draw,inner sep=3pt]{\reactand[,,minimum width=5em]{}\chemand\reactand[,,minimum width=5em]{}\arrow{}{}\reactand[,,minimum width=5em]{Sodium chloride $+$ Hydrogen}}
+ \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}}
\end{rxn}
\end{Example}
\section{Alphabetical Command Reference}
In the following section every command is explained.
-\subsection{arrow}\label{ssec:arrow}
+\subsection{anywhere}\label{ssec:anywhere}\index{anywhere|(}\index{Befehle!anywhere}
+\NEU%
+Sometimes it is useful to be able to place a reactant outside of the chain, \eg see \ref{rs:hydratisation}.
+\begin{lstlisting}
+ \anywhere[<anchor>]{<tikz>}{<formula>}
+\end{lstlisting}
+The command \lstinline+\anywhere+ makes that possible. It is placed through \lstinline+<tikz>+ in a similar way as \lstinline+\branch+.
+\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.
+\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}}
+ \anywhere{below=of ketone}{$+$\color{blue}\Hyd}
+ \arrow[,<=>]{\tiny slow}{}
+ \mesomeric[,mesomer]{
+ \reactant[,carbanion]{\chemfig{H_2|\chemabove[3pt]{\lewis{2,C}}{\scriptstyle\ominus}-C(=[:60]\lewis{02,O})-[:-60]C|H_3}}
+ \marrow
+ \reactant[,enolate]{\chemfig{H_2C=C(-[:60]\chemabove{\lewis{024,O}}{\hspace*{5mm}\scriptstyle\ominus})-[:-60]C|H_3}}
+ }
+ \anywhere{above=of enolate}{\tiny enolate ion}
+ \anywhere{above=of carbanion}{\tiny carbanion}
+ \anywhere{below=of mesomer}{$+$\color{blue}\ce{H2O}}
+ \end{rxn}
+\end{Example}
+\index{anywhere|)}
+
+\subsection{arrow}\label{ssec:arrow}\index{arrow|(}\index{commands!arrow}
Reaction arrows are created with \lstinline=\arrow=.
-\begin{Verbatim}
- \arrow[<keys>]{<above>}{<below>}
-\end{Verbatim}
-There are several keys to customize the arrows. They are used like \lstinline+key=value+.
-\begin{description}
-\vitem+direction=<direction>+ -- possible values are:
+\begin{lstlisting}
+ \arrow[<direction>,<type>,<length factor>,<anchor>,both]{<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.
+\begin{enumerate}
+\item\lstinline+<direction>+\index{arrow!options!direction} -- possible values are:
\begin{rxn}
\setarrowlength{2.5em}
\dummy[a]
- \arrow{}{}\reactand{right}
- \branch[above right=of a]{\arrow[direction=above right]{}{}\reactand[above right]{above right}}
- \branch[above=of a]{\arrow[direction=above]{}{}\reactand[above]{above}}
- \branch[above left=of a]{\arrow[direction=above left]{}{}\reactand[above left]{above left}}
- \branch[left=of a]{\arrow[direction=left]{}{}\reactand[left]{left}}
- \branch[below left=of a]{\arrow[direction=below left]{}{}\reactand[below left]{below left}}
- \branch[below=of a]{\arrow[direction=below]{}{}\reactand[below]{below}}
- \branch[below right=of a]{\arrow[direction=below right]{}{}\reactand[below right]{below right}}
- \end{rxn}
-\vitem+type=<type>+ -- possible values are:
+ \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:
\begin{rxn}
\dummy[a]
- \branch[below=of a,b,yshift=1em]{\arrow{}{}\reactand{\ttfamily type=\{-\textgreater\}}}
- \branch[below=of b,c,yshift=1em]{\arrow[type={<-}]{}{}\reactand{\ttfamily type=\{\textless-\}}}
- \branch[below=of c,d,xshift=.5em,yshift=1em]{\arrow[type={<->}]{}{}\reactand{\ttfamily type=\{\textless-\textgreater\}}}
- \branch[below=of d,e,yshift=1em]{\arrow[type={<=>}]{}{}\reactand{\ttfamily type=\{\textless=\textgreater\}}}
- \branch[below=of e,,yshift=1em]{\arrow[type={-|>}]{}{}\reactand{\ttfamily type=\{-\textbar\textgreater\}}}
- \end{rxn}
-\vitem+length=<factor>+ -- the length (\SI{5.0}{\emlength}, factor = $1.0$, default) is multiplied with this factor.
-\vitem+name=<anchor>+ -- this anchor can be used to refer to the arrow, \eg with a branch.
-\vitem+both+\settowidth{\tmplength}{\tt both}\Vii[\tmplength]-- this gives both arrow argument nodes the same width and height.
-\end{description}
+ \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.
+\end{enumerate}
\begin{SideBySideExample}
\begin{rxn}
- \dummy\arrow{\ce{Br2}}{$h\nu$} \arrow{\chemfig{-[::30]-[::-60]OH}}{}
+ \arrow[,,.6]{\ce{Br2}}{$h\nu$} \arrow{\chemfig{-[::30]-[::-60]OH}}{}
\end{rxn}
\begin{rxn}
- \dummy\arrow[direction=above]{\ce{Br2}}{$h\nu$}
+ \arrow[above,,.6]{\ce{Br2}}{$h\nu$}
\end{rxn}
\begin{rxn}
- \dummy\arrow[direction=above]{\chemfig{-[::30]-[::-60]OH}}{}
+ \arrow[above]{\chemfig{-[::30]-[::-60]OH}}{}
\end{rxn}
\begin{rxn}
- \dummy\arrow[direction=above right]{\ce{Br2}}{$h\nu$}
+ \arrow[above right,,.5]{\ce{Br2}}{$h\nu$}
\end{rxn}
\begin{rxn}
- \dummy\arrow[direction=above right]{\chemfig{-[::30]-[::-60]OH}}{}
+ \arrow[above right]{\chemfig{-[::30]-[::-60]OH}}{}
\end{rxn}
\end{SideBySideExample}
Most keys in action:
\begin{SideBySideExample}
\begin{rxn}
- \reactand{A}
- \arrow[name=arrow_a]{B}{}
- \branch[above=of arrow_a,,yshift=-4em]{
- \arrow[type=<-,direction=above,length=.7]{}{}
- \reactand[above]{D}
+ \reactant{A}
+ \arrow[,,,arrow_a]{B}{}
+ \branch[above=of arrow_a,,yshift=1em]{
+ \arrow[above,<-,.7]{}{}
+ \reactant[above]{D}
}
- \reactand{C}
+ \reactant{C}
\end{rxn}
\end{SideBySideExample}
+\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.
\begin{SideBySideExample}
\makevisible
\begin{rxn}
- \reactand[,a]{A}
+ \reactant[,a]{A}
\arrow{}{}
\branch[below=of a]{
- \arrow[direction=below]{\chemfig{-[::30]-[::-60]OH}}{}
+ \arrow[below]{\chemfig{-[::30]-[::-60]OH}}{}
}
\end{rxn}
\makeinvisible
\end{SideBySideExample}
-By using the key \lstinline=both=, both argument nodes have the same size, which can correct the alignment.
+By using the key \lstinline=both=\index{arrow!both}, both argument nodes have the same size, which can correct the alignment.
\begin{SideBySideExample}
\makevisible
\begin{rxn}
- \reactand[,a]{A}
+ \reactant[,a]{A}
\arrow{}{}
\branch[below=of a]{
- \arrow[direction=below,both]{\chemfig{-[::30]-[::-60]OH}}{}
+ \arrow[below,,,,both]{\chemfig{-[::30]-[::-60]OH}}{}
}
\end{rxn}
\makeinvisible
\end{SideBySideExample}
There is more about the alignment problem 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.
+\index{arrow|)}
-\subsection{branch}\label{ssec:branch}
-\NEU\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.}
-\begin{Verbatim}
+\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.}
+\begin{lstlisting}
\branch[<alignment>,<anchor>,<tikz>]{<branch code>}
-\end{Verbatim}
+\end{lstlisting}
For \lstinline=\branch= alignment an anchor is important. Let's take a look at an example:
\begin{Example}
\begin{rxn}
- \reactand[,start]{\chemfig{-[::30]=_[::-60](-[::-60])-[::60]}}
- \arrow[length=.75]{\ce{HCl}}{}
- \reactand{\chemfig{-[::30]-[::-60](-[::120]Cl)(-[::-60])-[::60]}}
+ \reactant[,start]{\chemfig{-[::30]=_[::-60](-[::-60])-[::60]}}
+ \arrow[,,.75]{\ce{HCl}}{}
+ \reactant{\chemfig{-[::30]-[::-60](-[::120]Cl)(-[::-60])-[::60]}}
\chemand
- \reactand{\chemfig{-[::30](-[::60]Cl)-[::-60](-[::-60])-[::60]}}
+ \reactant{\chemfig{-[::30](-[::60]Cl)-[::-60](-[::-60])-[::60]}}
\branch[below right=of start]{
- \arrow[direction=below right,length=.75]{\ce{H2O}}{}
- \reactand[below right]{\chemfig{-[::30]-[::-60](-[::120]OH)(-[::-60])-[::60]}}
+ \arrow[below right,,.75]{\ce{H2O}}{}
+ \reactant[below right]{\chemfig{-[::30]-[::-60](-[::120]OH)(-[::-60])-[::60]}}
\chemand
- \reactand{\chemfig{-[::30](-[::60]OH)-[::-60](-[::-60])-[::60]}}
+ \reactant{\chemfig{-[::30](-[::60]OH)-[::-60](-[::-60])-[::60]}}
}
\end{rxn}
\end{Example}
-The first reactand got the anchor \lstinline+start+ (line 2, also see \ref{ssec:reactand}).
-\begin{Verbatim}[firstnumber=2]
- \reactand[,!!start!!]{ ... }
-\end{Verbatim}
-\lstinline=\branch= now refers to it in its alignment (line 6):
-\begin{Verbatim}[firstnumber=6]
+The first reactant got the anchor \lstinline+start+ (line 2, also see \ref{ssec:reactant}).
+\begin{lstlisting}[firstnumber=2]
+ \reactant[,!!start!!]{ ... }
+\end{lstlisting}
+\lstinline=\branch= now refers to it in its alignment (line 7):
+\begin{lstlisting}[firstnumber=7]
\branch[below right!!=of start!!]{ ... }
-\end{Verbatim}
-If you don't use the alignment reference to an anchor, you automatically refer to the last \lstinline=\reactand= or \lstinline=\arrow=. If you don't use alignment at all, then the branch is aligned to the right of the last \lstinline=\reactand= or \lstinline=\arrow=.
+\end{lstlisting}
+If you don't use the alignment reference to an anchor, you automatically refer to the last \lstinline=\reactant= or \lstinline=\arrow=. If you don't use alignment at all, then the branch is aligned to the right of the last \lstinline=\reactant= or \lstinline=\arrow=.
\begin{SideBySideExample}
\begin{rxn}
- \reactand{ \chemfig{CH_2=CH-OH} }
- \arrow[type={<=>},length=.5]{}{}
- \branch{ \reactand{ \chemfig{CH_3-CH=O} } }
+ \reactant{ \chemfig{CH_2=CH-OH} }
+ \arrow[,<=>,.5]{}{}
+ \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.
@@ -814,73 +888,75 @@ You have several options for alignment: you can either put the \lstinline+\branc
\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+\reactand+, see \ref{ssec:reactand}. Default is \lstinline+on chain=going right+.
+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{Alignment problems}\label{sssec:branch_ausrichtung}
+\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.
\begin{SideBySideExample}
\makevisible
\begin{rxn}
- \reactand[,a]{A}
+ \reactant[,a]{A}
\arrow{}{}
\branch[below=of a]{
- \arrow[direction=below,both]{\chemfig{-[::30]-[::-60]OH}}{\Hpl}
+ \arrow[below,,,,both]{\chemfig{-[::30]-[::-60]OH}}{\Hpl}
}
\end{rxn}
\makeinvisible
\end{SideBySideExample}
-What you have to do is shift the branch using the \TikZ keys \lstinline=xshift= and \lstinline=yshift=.
+What you have to do is shift the branch using the \TikZ keys \lstinline+xshift+\index{xshift} and \lstinline+yshift+\index{yshift}.
\begin{SideBySideExample}
\makevisible
\begin{rxn}
- \reactand[,a]{A}
+ \reactant[,a]{A}
\arrow{}{}
\branch[below=of a,,xshift=-1.35em]{
- \arrow[direction=below]{\chemfig{-[::30]-[::-60]OH}}{\Hpl}
+ \arrow[below]{\chemfig{-[::30]-[::-60]OH}}{\Hpl}
}
\end{rxn}
\makeinvisible
\end{SideBySideExample}
+\index{branch!alignment|)}\index{branch|)}
-\subsection{chemand}\label{ssec:chemand}
-\NEU%
+\subsection{chemand}\label{ssec:chemand}\index{chemand|(}\index{commands!chemand}
The command
-\begin{Verbatim}
+\begin{lstlisting}
\chemand[<alignment>,<anchor>,<tikz>]
-\end{Verbatim}
-produces and places a $+$ in the same way \lstinline+\reactand+ places arbitrary text.
+\end{lstlisting}
+produces and places a $+$ in the same way \lstinline+\reactant+ places arbitrary text.
\begin{Example}
\begin{rxn}
- \reactand{\chemfig{*6(------)}}
+ \reactant{\chemfig{*6(------)}}
\chemand
- \reactand{\ce{Br2}}
+ \reactant{\ce{Br2}}
\arrow{$h\nu$}{}
- \reactand{\chemfig{*6(--(-Br)----)}}
+ \reactant{\chemfig{*6(--(-Br)----)}}
\chemand
- \reactand{\ce{HBr}}
+ \reactant{\ce{HBr}}
\end{rxn}
\end{Example}
-The optional arguments for \lstinline+\chemand+ and \lstinline+\reactand+ are the same, see \ref{ssec:reactand}.
+The optional arguments for \lstinline+\chemand+ and \lstinline+\reactant+ are the same, see \ref{ssec:reactant} for \lstinline+\reactant+'s options.
+\index{chemand|)}
-\subsection{dummy}\label{ssec:dummy}
-\lstinline=\dummy= creates an empty node. \lstinline=\arrow= needs to follow after a node, because \lstinline=\arrow= internally uses \lstinline=\tikzchainprevious=. If there is no node on the chain \emph{before} \lstinline=\arrow= is used, it will cause an error. But by using \lstinline=\dummy= you can start a scheme with an arrow anyway.
-\begin{SideBySideExample}
+\subsection{dummy}\label{ssec:dummy}\index{dummy|(}\index{commands!dummy}
+\NEU\lstinline=\dummy= creates an empty node. Up to v1.3 \lstinline=\arrow= needed to follow after a node, because \lstinline=\arrow= internally uses \lstinline=\tikzchainprevious=. If there was no node on the chain \emph{before} \lstinline=\arrow= was used, it caused an error. With \lstinline+\branch+ it was similar. By using \lstinline=\dummy= you could start a scheme with an arrow anyway.
+\begin{lstlisting}
\begin{rxn}
\dummy\arrow{}{}
\end{rxn}
-\end{SideBySideExample}
+\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.
+\index{dummy|)}
-\subsection{elmove}\label{ssec:elmove}
+\subsection{elmove}\label{ssec:elmove}\index{elmove|(}\index{commands!elmove}
\lstinline=\elmove= just is a shortcut for \CF's \lstinline=\chemmove=.
-\begin{lstlisting}[emphstyle=\normalcolor]
+\begin{lstlisting}
\elmove[<tikz>]{<start>}{<start direction>}{<end>}{<end direction>}
\end{lstlisting}
This is expanding the command
-\begin{Verbatim}
+\begin{lstlisting}
\chemmove{\draw[!!<tikz>!!](!!<start>!!).. controls +(!!<start direction>!!) and +(!!<end direction>!!)..(!!<end>!!);}
-\end{Verbatim}
+\end{lstlisting}
using \lstinline?[->,red,shorten <=3pt,shorten >=1pt]? as default for \lstinline=<tikz>=. How you use \lstinline+\chemmove+ is described in the documentation for \CF.
-
\begin{Example}
\begin{center}
\setatomsep{1.8em}
@@ -888,151 +964,179 @@ using \lstinline?[->,red,shorten <=3pt,shorten >=1pt]? as default for \lstinline
\elmove{e1}{60:4mm}{e2}{0:4mm}
\end{center}
\end{Example}
+\index{elmove|)}
-\subsection{makeinvisible}\label{ssec:makeinvisible}
-\Vii%
+\subsection{makeinvisible}\label{ssec:makeinvisible}\index{makeinvisible|(}\index{commands!makeinvisible}
\lstinline=\makeinvisible= restores the normal \mC behaviour after \lstinline=\makevisible= (see \ref{ssec:makevisible}) has been used. \lstinline=\makeinvisible= only changes the looks of nodes following after it.
+\index{makeinvisible|)}
-\subsection{makevisible}\label{ssec:makevisible}
-\Vii%
-With \lstinline=\makevisible= you can visualize the nodes within which reactands, 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:
+\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 reactand\{\}\{\}}};, \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=purple, dotted](X){\texttt{\textbackslash branch\{\}}};. Also see \ref{ssec:makeinvisible}.
\lstinline=\makevisible= only changes the looks of nodes following after it.
\begin{SideBySideExample}
\makevisible
\begin{rxn}
- \reactand[,a]{A}
+ \reactant[,a]{A}
\arrow{a}{b}
\branch[below=of a]{
- \arrow[direction=below,both]{a}{b}
+ \arrow[below,,,,both]{a}{b}
}
\end{rxn}
\makeinvisible
\end{SideBySideExample}
+\index{makevisible|)}
-\subsection{marrow}\label{ssec:marrow}
+\subsection{marrow}\label{ssec:marrow}\index{marrow|(}\index{commands!marrow}
\lstinline=\marrow= creates a double-headed arrow.
-\begin{Verbatim}
+\begin{lstlisting}
\marrow[<direction>]
-\end{Verbatim}
-It is a shortcut for \lstinline+\arrow[type=<->,length=.5,direction=<direction>]{}{}+. You can use \lstinline=<direction>= like the alignment option of \lstinline=\reactand= (see \ref{ssec:reactand} or \ref{ssec:mesomeric}).
+\end{lstlisting}
+It is a shortcut for \lstinline+\arrow[<direction>,<->,.5]{}{}+.
+\index{marrow|)}
-\subsection{mCsetup}\label{ssec:mCsetup}
-\NEU%
+\subsection{mCsetup}\label{ssec:mCsetup}\index{mCsetup|(}\index{commands!mCsetup}
With
-\begin{Verbatim}
+\begin{lstlisting}
\mCsetup{<keys>}
-\end{Verbatim}
-you can fully customize \mC. For each of \mC's commands going like \lstinline+\set<command>+ except \lstinline+\setbondshape+ there is a key \lstinline+<command>=<value>+. Additionally there is the key \lstinline+align=<value>+, with which you can change the alignment behaviour of both \lstinline+rxn+ and \lstinline+rxnscheme+, and the key \lstinline+reset+, with whith all values are reset to default.
+\end{lstlisting}
+you can fully customize \mC. For each of \mC's commands going like \lstinline+\set<command>+ except \lstinline+\setbondshape+ there is a key \lstinline+<command>=<value>+. Additionally there is the key \lstinline+align=<value>+, with which you can change the alignment behaviour of both \lstinline+rxn+ and \lstinline+rxnscheme+, and the key \lstinline+reset+, with whith all values are reset to default.\index{mCsetup!align}\index{mCsetup!arrowlength}\index{mCsetup!atomsize}\index{mCsetup!bondlength}\index{mCsetup!mergelength}\index{mCsetup!rcndist}\index{mCsetup!rxnalign}\index{mCsetup!schemealign}\index{mCsetup!reset}
\begin{Example}
\mCsetup{
+ align=left,
arrowlength=3em,
- rcndist=2em,
- atomsize=\large,
+ arrowline=thick,
+ atomsize=\large,
bondlength=3em,
+ mergelength=4em,
+ rcndist=2em
%rxnalign=right,
- %schemealign=left,
- align=left
+ %schemealign=left
}
\setbondshape{4pt}{2pt}{1pt}
\begin{rxn}
- \reactand{A}\arrow{}{}\reactand{\chemfig{A-(<[2])(<:[6])-B}}
+ \reactant{A}\arrow{}{}\reactant{\chemfig{A-(<[2])(<:[6])-B}}
\end{rxn}
\mCsetup{reset}
\begin{rxn}
- \reactand{A}\arrow{}{}\reactand{\chemfig{A-(<[2])(<:[6])-B}}
+ \reactant{A}\arrow{}{}\reactant{\chemfig{A-(<[2])(<:[6])-B}}
\end{rxn}
\end{Example}
+\index{mCsetup|)}
-\subsection{merge}\label{ssec:merge}
-\lstinline=\merge= cannot only be used in \mC's environments but also in a `tikzpicture'. With \lstinline=\merge= you can, well, two branches into one. To be able to do that, you need to refer to anchors.
-\begin{Verbatim}
- \merge[<key>]{<target>}{<start a>}{<start b>}
-\end{Verbatim}
-\begin{SideBySideExample}
- \begin{center}
- \begin{tikzpicture}
- \node(a) at (0,0) {A};
- \node(b) at (10em,0) {B};
- \node[draw,minimum size=3em](c) at (5em,-8em) {C};
- \merge{c}{a}{b}
- \node(d) at (0,-16em) {D};
- \node(e) at (10em,-16em) {E};
- \merge[direction=above]{c}{d}{e}
- \node(f) at (-3em,-4em) {F};
- \node(g) at (-3em,-12em) {G};
- \merge[direction=right]{c}{f}{g}
- \node(h) at (13em,-4em) {H};
- \node(i) at (13em,-12em) {I};
- \merge[direction=left]{c}{h}{i}
- \end{tikzpicture}
- \end{center}
-\end{SideBySideExample}
-Usage of \lstinline=\merge= in a \mC environment:
+\subsection{merge}\label{ssec:merge}\index{merge|(}\index{commands!merge}
+\NEU%
+The \lstinline+merge+ command is used to merge different reaction chains. In order to do that, the reactants that are to be merged must have an anchor name (\lstinline+\reactant[,<anchor>]{}+, similar with branches, see \ref{ssec:reactant} and \ref{ssec:branch}) and be placed \emph{before} \lstinline+\merge+.
+\begin{lstlisting}
+ \merge[<label>,<direction>,<length>]{<target>}{<start a>}{<start b>}
+\end{lstlisting}
+\lstinline+\merge+ has three optional and three mandatory arguments. The latter are the anchor names of the reactants, that are to be merged.
+\begin{Example}
+ \begin{rxn}
+ \branch[,first]{
+ \reactant[,start_a]{\chemfig{-[:30]-[:-30]OH}}
+ \reactant[,start_b,xshift=9em]{\chemfig{-[:30]=[:-30]O}}
+ }
+ \branch[below=of first,target,yshift=-5em]{
+ \reactant{\chemfig{-[:30]-[:-30]O-[:30](-[2]OH)-[:-30]}}
+ }
+ \merge[\ce{[\Hyd]}]{target}{start_a}{start_b}
+ \end{rxn}
+\end{Example}
+The default \lstinline+<direction>+ is \lstinline+below+, other possible values are \lstinline+right+, \lstinline+left+ or \lstinline+above+. With \lstinline+<length>+ the length of the arrow from the point of merging to the tip can be changed. The default length is \SI{3}{\emlength}. The default length can be changed with \lstinline+\setmergelength+\index{setmergelength} or \lstinline+\mCsetup+\index{mCsetup}.
+\begin{Example}
+ \begin{rxn}
+ \reactant[,start_a]{\chemfig{-[:30]-[:-30]OH}}
+ \branch[below=of start_a,start_b,yshift=-9em]{
+ \reactant{\chemfig{-[:30]=[:-30]O}}
+ }
+ \branch[right=of start_a,target,xshift=7em,yshift=-6em]{
+ \reactant{\chemfig{-[:30]-[:-30]O-[:30](-[2]OH)-[:-30]}}
+ }
+ \merge[\ce{[\Hyd]},right,5em]{target}{start_a}{start_b}
+ \end{rxn}
+\end{Example}
+Since you have to place the reactants first, it might be useful to know a little bit about involved lengths. There are three values, which influence the needed distance between start points and the target reactant. There is the {\color{green}depth} of the involved reactants, the distance of the "reaction nodes" {\color{red}rcndist} (see \ref{ssec:setrcndist}) and the length of the \lstinline+\merge+ arrow {\color{blue}mergelength} (also see \ref{ssec:setmergelength}).
+\begin{rxn}
+ \node[above](a) at (0,0){A};
+ \node[above](b) at (10em,0){B};
+ \node[below](c) at (5em,-6em){C};
+ \merge{c}{a}{b}
+ \draw (-8.5em,1em) -- (-8.5em,-9em);
+ \foreach \x in {-1,0,1,2,3,4,5,6,7,8,9}{
+ \draw (-8.5em,-\x em) -- (-8.7em,-\x em);
+ }
+ \draw[<->,red] (10em,0)--node[midway,right,xshift=.2em]{rcndist (default: 1em)}(10em,-1em);
+ \draw[<->,red] (0,0)--(0,-1em);
+ \draw[<->,red] (5em,-5em)--(5em,-6em);
+ \draw[<->,blue] (6em,-2em) --node[midway,right,xshift=.2em]{mergelength (default: 3em)} (6em,-5em);
+ \draw[<->,green] ($(a.base)+(-.5em,0)$)--node[midway,left,xshift=-.2em]{reactant depth}++(0,.5em);
+\end{rxn}
+At last an example where two chains are merged.
\begin{Example}
\begin{rxn}
\setatomsep{1em}\tiny
- % branch 1
- \reactand[,above]{ \chemfig{Cl-[:30,1.5]--[:-30,1.5]O-[:30,1.5]--[:-30,1.5]Cl}{} }
- \arrow[length=.5]{}{}
- \reactand[,start_above]{ \chemfig{O(-[:-150]**6(-----(-OH)-))-[:90]-[:30]-[:-30]O-[:30]-[:-30]-[:-90]O-[:-30]**6(-(-HO)-----)} }
- % branch 2
- \branch[below=of above,start_below,xshift=8em,yshift=-4em]{
- \reactand{ \chemfig{**6((--[6,,,2]HO)-N-(--[6]OH)----)} }
- \arrow[length=.5]{}{}
- \reactand{ \chemfig{**6((--[6]Br)-N-(--[6]Br)----)} }
+ % chain 1
+ \reactant[,first]{ \chemfig{Cl-[:30,1.5]--[:-30,1.5]O-[:30,1.5]--[:-30,1.5]Cl}{} }
+ \arrow[,,.5]{}{}
+ \reactant[,start_above]{ \chemfig{O(-[:-150]**6(-----(-OH)-))-[:90]-[:30]-[:-30]O-[:30]-[:-30]-[:-90]O-[:-30]**6(-(-HO)-----)} }
+ % chain 2
+ \branch[below=of first,start_below,xshift=8em,yshift=-4em]{
+ \reactant{ \chemfig{**6((--[6,,,2]HO)-N-(--[6]OH)----)} }
+ \arrow[,,.5]{}{}
+ \reactant{ \chemfig{**6((--[6]Br)-N-(--[6]Br)----)} }
}
% target
\branch[right=of start_above,target,xshift=5em,yshift=-4em]{
- \reactand[,c]{ \chemfig{O(-[:-150]**6(-----(-O?)-))-[:90]-[:30]**6(-N-(--[:-90]O-[:-30]**6(-(-O-[6]-[:-150]-[:150]O-[:-150]-[:150]?)-----))----)} }
+ \reactant[,c]{ \chemfig{O(-[:-150]**6(-----(-O?)-))-[:90]-[:30]**6(-N-(--[:-90]O-[:-30]**6(-(-O-[6]-[:-150]-[:150]O-[:-150]-[:150]?)-----))----)} }
}
% merging:
- \merge[direction=right]{target}{start_above}{start_below}
+ \merge[,right]{target}{start_above}{start_below}
\end{rxn}
\end{Example}
-Please note, that you should use branches to refer to, when you use \lstinline=\merge= in a \mC environment. Using \lstinline=\merge= may afford playing with xshift and yshift until you get the result you want.
+The usage of \lstinline=\merge= may require some playing with branches, \lstinline+xshift+\index{xshift} and \lstinline+yshift+\index{yshift}, until you get the desired result.
\begin{Example}
\begin{rxn}
\setatomsep{1.5em}
- \reactand[,start_aa]{ \chemname{\chemfig{**6(---(-NH_2)---)}}{aniline} }
- \reactand[below,start_ab,yshift=-3em]{ \chemname{\ce{HNO2}}{nitrous acid} }
+ \reactant[,start_aa]{ \chemname{\chemfig{**6(---(-NH_2)---)}}{Anilin} }
+ \reactant[below,start_ab,yshift=-3em]{ \chemname{\ce{HNO2}}{salpetrige S"aure} }
\branch[right=of start_aa,target_a,xshift=6em,yshift=-5em]{
- \reactand{ \chemname{\chemfig{**6(---(-N|_2\op)---)}}{diazonium ion} }
+ \reactant{ \chemname{\chemfig{**6(---(-N|_2\op)---)}}{Diazoniumion} }
}% = start_ba
\branch[below=of target_a,start_bb,yshift=-3em]{
- \reactand{ \chemname{\chemfig{**6(---(-NH_2)---)}}{aniline} }
+ \reactant{ \chemname{\chemfig{**6(---(-NH_2)---)}}{Anilin} }
}
\branch[right=of target_a,target_b,xshift=6em,yshift=-5em]{
- \reactand{ \chemname{\chemfig{N(-[:-150]**6(------))=N-[:-30]**6(---(-NH_2)---)}}{aniline yellow} }
+ \reactant{ \chemname{\chemfig{N(-[:-150]**6(------))=N-[:-30]**6(---(-NH_2)---)}}{p-Aminodiazobenzol} }
}
- \merge[direction=right]{target_a}{start_aa}{start_ab}
- \merge[direction=right]{target_b}{target_a}{start_bb}
+ \merge[,right]{target_a}{start_aa}{start_ab}
+ \merge[,right]{target_b}{target_a}{start_bb}
\end{rxn}
\end{Example}
+\index{merge|)}
-\subsection{mesomeric}\label{ssec:mesomeric}
-\NEU%
-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.}
-\begin{Verbatim}
+\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.}
+\begin{lstlisting}
\mesomeric[<alignment>,<anchor>,<tikz>]{<formula>}
-\end{Verbatim}
-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=\reactand=.
+\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}
\begin{rxn}
\mesomeric{
- \reactand{
+ \reactant{
\chemfig{*6(=[@{e1}]-=-(-[:120]X)(-[:60]H)-(-[:-30,.4,,,white]\oplus)-[@{e2}])}
\elmove{e1}{60:4mm}{e2}{0:4mm}
}
\marrow
- \reactand{
+ \reactant{
\chemfig{*6(-(-[:90,.4,,,white]\oplus)-[@{e4}]=[@{e3}]-(-[:120]X)(-[:60]H)-=)}
\elmove{e3}{180:4mm}{e4}{150:4mm}
}
\marrow
- \reactand{
+ \reactant{
\chemfig{*6(-=-(-[:-150,.4,,,white]\oplus)-(-[:120]X)(-[:60]H)-=)}
}
}
@@ -1042,9 +1146,9 @@ Or vertical, too:
\begin{SideBySideExample}
\begin{rxn}
\mesomeric{
- \reactand{ \chemfig{*6(=-=-=-)} }
+ \reactant{ \chemfig{*6(=-=-=-)} }
\marrow[below]
- \reactand[below]{ \chemfig{*6(-=-=-=)} }
+ \reactant[below]{ \chemfig{*6(-=-=-=)} }
}
\end{rxn}
\end{SideBySideExample}
@@ -1053,20 +1157,21 @@ Or maybe a coordination complex?
\begin{rxn}
\setatomsep{3em}
\mesomeric[,a]{
- \reactand{ \chemfig{H_3\lewis{0,N}-[,1.35,,,dotted]{Cu}(-[2,,,,dotted]\lewis{6,N}H_3)(-[6,,,,dotted]\lewis{2,N}H_3)-[,1.2,,,dotted]\lewis{4,N}H_3} }
+ \reactant{ \chemfig{H_3\lewis{0,N}-[,1.35,,,dotted]{Cu}(-[2,,,,dotted]\lewis{6,N}H_3)(-[6,,,,dotted]\lewis{2,N}H_3)-[,1.2,,,dotted]\lewis{4,N}H_3} }
}
\node[above right=of a,yshift=-1em] {$2\oplus$};
\end{rxn}
\end{Example}
+\index{mesomeric|)}
-\subsection{reactand}\label{ssec:reactand}
+\subsection{reactant}\label{ssec:reactant}\index{reactant|(}\index{commands!reactant}
\NEU%
-The command \lstinline=\reactand= is somehow the basic command of \mC. \textbf{If you used earlier versions of \mC please be aware, that the command syntax has changed.}
-\begin{Verbatim}
- \reactand[<alignment>,<anchor>,<tikz>]{<formula>}
-\end{Verbatim}
+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.}
+\begin{lstlisting}
+ \reactant[<alignment>,<anchor>,<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:
-\begin{inparaenum}[(a)]
+\begin{alphlist}
\item \lstinline=right=,
\item \lstinline=above right=,
\item \lstinline=above=,
@@ -1075,1073 +1180,1230 @@ In this command the actual formul\ae\ are written (\lstinline=<formula>=). If ne
\item \lstinline=below left=,
\item \lstinline=below=,
\item \lstinline=below right=
-\end{inparaenum}
-Default is \lstinline=right=. You use this argument to place the reactand relatively to the reactand or arrow right before.
+\end{alphlist}
+Default is \lstinline=right=. You use this argument to place the reactant relatively to the reactant or arrow right before.
\begin{SideBySideExample}
%horizontal:
\begin{rxn}
- \reactand{\ce{Br2}}
- \reactand[below]{\ce{Cl2}}
+ \reactant{\ce{Br2}}
+ \reactant[below]{\ce{Cl2}}
\end{rxn}
-%more than one reactand:
+%more than one reactant:
\begin{rxn}
- \reactand{\ce{Br2}}
- \reactand[below]{\ce{I2}}
- \reactand{\ce{Cl2}}
+ \reactant{\ce{Br2}}
+ \reactant[below]{\ce{I2}}
+ \reactant{\ce{Cl2}}
\end{rxn}
%vertical reaction:
\begin{rxn}
- \reactand{\ce{Br-Br}}
- \arrow[length=.5,direction=below]{$h\nu$}{}
- \reactand[below]{\ce{2 ~\lewis{0.,Br}}}
+ \reactant{\ce{Br-Br}}
+ \arrow[below,,.5]{$h\nu$}{}
+ \reactant[below]{\ce{2 ~\lewis{0.,Br}}}
\end{rxn}
\end{SideBySideExample}
+\index{reactant|)}
-\subsection{rxn (environment)}\label{ssec:rxn}
-\lstinline=rxn= is a non-floating not numbered environment for reaction schemes. All schemes are centered.
-\begin{Verbatim}
- \begin{rxn}[<keys>]
+\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>]
...
\end{rxn}
-\end{Verbatim}
-The optional argument \lstinline=<scale factor>= has the same effect as has the key \lstinline+scale=<scalefactor>+ on \lstinline=rxnscheme=. Default is $1.0$.
+\end{lstlisting}
-\subsubsection{Options}\label{sssec:rxn_optionen}
-\Vii\lstinline=rxn= has two keys:
-\begin{description}
- \vitem+align=<alignment>+ alignment behaviour of the \lstinline=rxn= environment; default is `center'
- \vitem+scale=<factor>+ factor by which the \lstinline=rxn= environment is scaled; default: `1.0'
-\end{description}
+\subsubsection{Options}\label{sssec:rxn_optionen}\index{rxn!options|(}
+\NEU\lstinline=rxn= has two options, which are to be used in the following order, separated by a comma:
+\begin{enumerate}
+ \item\lstinline+<alignment>+\index{rxn!options!alignment} alignment behaviour of the \lstinline=rxn= environment; default is `center'.
+ \item\lstinline+<scalefactor>+\index{rxn!options!scale} factor by which the \lstinline=rxn= environment is scaled; default: `1.0'. Same behaviour as with \lstinline+rxnscheme+, see \ref{ssec:rxnscheme}.
+\end{enumerate}
+If you use the \lstinline+scalefactor+ option, you might see strange effects on \CF formul\ae.
+\begin{SideBySideExample}
+ \begin{rxn}[,.5]
+ \reactant{\chemfig{**6(------)}}
+ \end{rxn}
+\end{SideBySideExample}
+Scaling does in general not affect the size of \CF formul\ae, but does scale the aromaticity ring of benzene and similar molecules. This is due to a possible bug in \CF itself.
+\begin{SideBySideExample}
+ \chemfig[scale=.5]{**6(------)}
+\end{SideBySideExample}
+This can be solved either by using the \emph{first} optional argument of \lstinline+\chemfig+ to undo the scaling or by using the \emph{second} optional argument to scale the rest of the molecule.
+\begin{Example}
+ \begin{rxn}[,.5]
+ \reactant{\chemfig[scale=2]{**6(------)}}
+ \reactant{\chemfig[][scale=.5]{**6(------)}}
+ \end{rxn}
+ \chemfig[scale=.5][scale=.5]{**6(------)}
+\end{Example}
+Alignment examples:
\begin{Example}
- \begin{rxn}[align=center]
- \reactand{center}\arrow{}{}\reactand{centered}
+ \begin{rxn}[center]
+ \reactant{center}\arrow{}{}\reactant{centered}
\end{rxn}
- \begin{rxn}[align=right]
- \reactand{right}\arrow{}{}\reactand{raggedleft}
+ \begin{rxn}[right]
+ \reactant{right}\arrow{}{}\reactant{raggedleft}
\end{rxn}
- \begin{rxn}[align=left]
- \reactand{left}\arrow{}{}\reactand{raggedright}
+ \begin{rxn}[left]
+ \reactant{left}\arrow{}{}\reactant{raggedright}
\end{rxn}
\end{Example}
+\index{rxn!options|)}\index{rxn|)}
-\subsection{rxnscheme (environment)}\label{ssec:rxnscheme}
-\lstinline=rxnscheme= is a floating environment for reaction schemes.
-\begin{Verbatim}
- \begin{rxnscheme}[<keys>]{<caption>}
+\subsection{rxnscheme (environment)}\label{ssec:rxnscheme}\index{rxnscheme|(}\index{commands!rxnscheme|see{rxnscheme}}\index{environment!rxnscheme|see{rxnscheme}}
+\lstinline+rxnscheme+ is a floating environment for reaction schemes.
+\begin{lstlisting}
+ \begin{rxnscheme}[<label>,<placement>,<alignment>,<scalefactor>,<name>]{<caption>}
...
\end{rxnscheme}
-\end{Verbatim}
-\subsubsection{Options}\label{sssec:rxnscheme_optionen}
-\begin{description}
- \vitem+label=<label>+ Like every other floating environment \lstinline=rxnscheme= can be given a label. To do that, you need to use the key \lstinline+label=<label>+. For example if you use
-\begin{Verbatim}
- \begin{rxnscheme}[label={rs:schema}]{<caption>}
+\end{lstlisting}
+
+\subsubsection{Options}\label{sssec:rxnscheme_optionen}\index{rxnscheme!options|(}
+\NEU\lstinline=rxnscheme= has five options, which are to be used in the following order, separated by commas:
+\begin{enumerate}
+ \item\lstinline+<label>+\index{rxnscheme!options!label} Like every other floating environment \lstinline+rxnscheme+ can be given a label. To do that, you need to use the option \lstinline+<label>+. For example if you use
+\begin{lstlisting}
+ \begin{rxnscheme}[rs:schema]{<caption>}
...
\end{rxnscheme}
-\end{Verbatim}
-you can refer to it by using \lstinline=\ref{rs:schema}= as usual.
-\vitem+scale=<factor>+ \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 the \CF formul\ae.
-\begin{Verbatim}
- \begin{rxnscheme}[placement=<placement>]{<caption>}
+\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+<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>+.
+\begin{lstlisting}
+ \begin{rxnscheme}[,<placement>]{<caption>}
...
\end{rxnscheme}
-\end{Verbatim}
- \vitem+align=<alignment>+\settowidth{\tmplength}{\tt align=<ausrichtung>}\Vii[\tmplength]This key changes the alignment of the scheme. You can choose between \lstinline=left=, \lstinline=center= and \lstinline=right=.
-\end{description}
+\end{lstlisting}
+\end{enumerate}
\begin{Example}
- \begin{rxnscheme}[scale=2]{Big scheme}
+ \begin{rxnscheme}[,,,2]{Big scheme}
\large\setatomsep{3.5em}
- \reactand{ \chemfig{=[::30]-[::-60]OH} }
- \arrow[type={<=>}]{}{}
- \reactand{ \chemfig{-[::30]=[::-60]O} }
+ \reactant{ \chemfig{=[::30]-[::-60]OH} }
+ \arrow[,<=>]{}{}
+ \reactant{ \chemfig{-[::30]=[::-60]O} }
\end{rxnscheme}
- \begin{rxnscheme}[scale=.5]{Small scheme}
+ \begin{rxnscheme}[,,,.5]{Small scheme}
\tiny\setatomsep{1em}
- \reactand{ \chemfig{=[::30]-[::-60]OH} }
- \arrow[type={<=>}]{}{}
- \reactand{ \chemfig{-[::30]=[::-60]O} }
+ \reactant{ \chemfig{=[::30]-[::-60]OH} }
+ \arrow[,<=>]{}{}
+ \reactant{ \chemfig{-[::30]=[::-60]O} }
\end{rxnscheme}
\begin{rxnscheme}{center}
- \reactand{center}\arrow{}{}\reactand{centered}
+ \reactant{center}\arrow{}{}\reactant{centered}
\end{rxnscheme}
- \begin{rxnscheme}[align=right]{right}
- \reactand{right}\arrow{}{}\reactand{raggedleft}
+ \begin{rxnscheme}[,,right]{right}
+ \reactant{right}\arrow{}{}\reactant{raggedleft}
\end{rxnscheme}
- \begin{rxnscheme}[align=left]{left}
- \reactand{left}\arrow{}{}\reactand{raggedright}
+ \begin{rxnscheme}[,,left]{left}
+ \reactant{left}\arrow{}{}\reactant{raggedright}
\end{rxnscheme}
\end{Example}
+\index{rxnscheme!options|)}
-\subsubsection{Customizing rxnscheme}
-\paragraph{Style}
-If you don't like the style of \lstinline=rxnscheme= you can change it by using
-\begin{Verbatim}
+\subsubsection{Customizing rxnscheme}\index{rxnscheme!customize|(}
+\paragraph{Style}\index{rxnscheme!customize!style}
+If you don't like the style of \lstinline+rxnscheme+ you can change it by using
+\begin{lstlisting}
\floatstyle{<new style>}
\restylefloat{rxnfloat}
-\end{Verbatim}
+\end{lstlisting}
There are different possible styles, privided by the `float' package:
\begin{description}
\vitem=plain= without any special formatting, the caption is below the object
\vitem=plaintop= like \lstinline=plain=, but the caption is placed above the object
\vitem=boxed= the object is boxed, the caption placed below
- \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=
+ \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}
- \reactand{default style}
+ \reactant{default style}
\end{rxnscheme}
\floatstyle{boxed}
\restylefloat{rxnfloat}
\begin{rxnscheme}{boxed}
- \reactand{framed object}
+ \reactant{framed object}
\end{rxnscheme}
\floatstyle{plain}
\restylefloat{rxnfloat}
\begin{rxnscheme}{plain}
- \reactand{without any special formatting}
+ \reactant{without any special formatting}
\end{rxnscheme}
\end{Example}
\floatstyle{ruled}
\restylefloat{rxnfloat}
-\paragraph{Placement}
+\paragraph{Placement}\index{rxnscheme!customize!placement}
Usually floating environments have an optional argument for their placement. \lstinline=rxnscheme='s default placement is \lstinline=H= which means, it is placed \emph{exactly here}. If you want to change it into \lstinline=htp= or something, you can use
-\begin{Verbatim}
+\begin{lstlisting}
\floatplacement{rxnfloat}{<placement>}
-\end{Verbatim}
+\end{lstlisting}
It's easier, though, loading \mC with the `placement' option:
-\begin{Verbatim}
+\begin{lstlisting}
\usepackage[placement=<placement>]{mychemistry}
-\end{Verbatim}
-This will change the default placement behaviour from \lstinline=H= to \lstinline=<placement>=. You can also change the placement behaviour of just one \lstinline=rxnscheme= environment by using the placement key:
-\begin{Verbatim}
- \begin{rxnscheme}[placement=<placement>]{<caption>}
+\end{lstlisting}
+This will change the default placement behaviour from \lstinline=H= to \lstinline=<placement>=. You can also change the placement behaviour of just one \lstinline+rxnscheme+ environment by using the placement option:
+\begin{lstlisting}
+ \begin{rxnscheme}[,<placement>]{<caption>}
...
\end{rxnscheme}
-\end{Verbatim}
+\end{lstlisting}
-\paragraph{Name}\label{par:rxnscheme_name}
+\paragraph{Name}\label{par:rxnscheme_name}\index{rxnscheme!customize!name}
If you want to change the name of reaction scheme\footnote{You probably do. You reading the English documention means probably, that you're not German.}, you can do that with
-\begin{Verbatim}
+\begin{lstlisting}
\setschemename{<new name>}
-\end{Verbatim}
+\end{lstlisting}
The default name is "Reaktionschema" or, with package option `english', "Reaction scheme".
-\paragraph{Counter}
+\paragraph{Counter}\index{rxnscheme!customize!counter}
The counter can be changed just as usual. For example by using
-\begin{Verbatim}
+\begin{lstlisting}
\makeatletter
\@addtoreset{rxnfloat}{section}
\makeatletter
\renewcommand{\therxnscheme}{\arabic{section}.\arabic{rxnscheme}}
-\end{Verbatim}
-the counter is reset with every new section an looks like \lstinline=section.rxnscheme=. Please be aware, that you have to write \lstinline=\@addtoreset= between \lstinline=\makeatletter= and \lstinline=\makeatother= because of the {@}.
-\paragraph{List of schemes}
+\end{lstlisting}
+the counter is reset with every new section an looks like \lstinline+section.rxnscheme+. Please be aware, that you have to write \lstinline=\@addtoreset= between \lstinline=\makeatletter= and \lstinline=\makeatother= because of the {@}.
+\paragraph{List of schemes}\index{rxnscheme!customize!list}
By writing
-\begin{Verbatim}
+\begin{lstlisting}
\listof{rxnfloat}{<title>}
-\end{Verbatim}
-you can create a list of all schemes created with \lstinline=rxnscheme=.
+\end{lstlisting}
+you can create a list of all schemes created with \lstinline+rxnscheme+.
\begin{SideBySideExample}
\listof{rxnfloat}{Reaction schemes}
\end{SideBySideExample}
+\index{rxnscheme!customize|)}\index{rxnscheme|)}
-\subsection{setarrowlength}\label{ssec:setarrowlength}
-\NEU%
+\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
-\begin{Verbatim}
+\begin{lstlisting}
\setarrowlength{<length>}
-\end{Verbatim}
+\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.}
+\index{setarrowlength|)}
-\subsection{setatomsize}\label{ssec:setatomsize}
-\NEU%
+\subsection{setatomsize}\label{ssec:setatomsize}\index{setatomsize|(}\index{commands!setatomsize}
With
-\begin{Verbatim}
+\begin{lstlisting}
\setatomsize{<font size>}
-\end{Verbatim}
+\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}
-\NEU%
+\subsection{setbondlength}\label{ssec:setbondlength}\index{setbondlength|(}\index{commands!setbondlength}
With
-\begin{Verbatim}
+\begin{lstlisting}
\setbondlength{<length>}
-\end{Verbatim}
+\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.}
+\index{setbondlength|)}
-\subsection{setbondshape}\label{ssec:setbondshape}
+\subsection{setarrowline}\label{ssec:setarrowline}\index{setarrowline|(}\index{Befehle!setarrowline}
+\NEU%
+With the command
+\begin{lstlisting}
+ \setarrowline{<value>}
+\end{lstlisting}
+the thickness of the arrows can be customized. Possible values are
+ \begin{flushleft}
+ \begin{tikzpicture}
+ \draw[ultra thin] (0,0)--(1,0)node[right]{\tt ultra thin};
+ \draw[very thin] (0,-.5)--(1,-.5)node[right]{\tt very thin};
+ \draw[thin] (0,-1)--(1,-1)node[right]{\tt thin};
+ \draw[semithick] (0,-1.5)--(1,-1.5)node[right]{{\tt semithick} (default)};
+ \draw[thick] (0,-2)--(1,-2)node[right]{\tt thick};
+ \draw[very thick] (0,-2.5)--(1,-2.5)node[right]{\tt very thick};
+ \draw[ultra thick] (0,-3)--(1,-3)node[right]{\tt ultra thick};
+ \end{tikzpicture}
+\end{flushleft}
+The values \lstinline+very thick+ and \lstinline+ultra thick+ should not be used.
+
+This command also applies to \lstinline+\merge+\index{merge}.
+\index{setarrowline|)}
+
+\subsection{setbondshape}\label{ssec:setbondshape}\index{setbondshape|(}\index{commands!setbondshape}
With
-\begin{Verbatim}
+\begin{lstlisting}
\setbondshape{<base length>}{<dash thickness>}{<dash spacing>}
-\end{Verbatim}
+\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}
+\NEU%
+With
+\begin{lstlisting}
+ \setmergelength{<länge>}
+\end{lstlisting}
+you can change the length of the \lstinline+\merge+ arrow. More precisely you can change the length of the arrow from the point of line crossing to the arrow tip (see \ref{ssec:merge}). If you leave an argument empty, the value is reset to default (\SI{3}{\emlength}).
+\index{setmergelength|)}
-\subsection{setrcndist}\label{ssec:setrcndist}
-\Vii%
-The nodes within which the reactands an arrows are set have a certain distance between them. The default distance is \SI{1}{\emlength}. If you want to change that, you can use
-\begin{Verbatim}
+\subsection{setrcndist}\label{ssec:setrcndist}\index{setrcndist|(}\index{commands!setrcndist}
+The nodes within which the reactants an arrows are set have a certain distance between them. The default distance is \SI{1}{\emlength}. If you want to change that, you can use
+\begin{lstlisting}
\setrcndist{<länge>}
-\end{Verbatim}
+\end{lstlisting}
If you leave the argument empty, the distance is reset to \SI{1}{\emlength}.
\begin{SideBySideExample}
\setrcndist{2em}
\begin{rxn}
- \reactand{A}\arrow{}{}
+ \reactant{A}\arrow{}{}
\end{rxn}
\setrcndist{}
\begin{rxn}
- \reactand{A}\arrow{}{}
+ \reactant{A}\arrow{}{}
\end{rxn}
\end{SideBySideExample}
+\index{setrcndist|)}
-\subsection{setrxnalign/setschemealign}\label{ssec:setrxnalign}\label{ssec:setschemealign}
-\Vii%
+\subsection{setrxnalign/setschemealign}\label{ssec:setrxnalign}\label{ssec:setschemealign}\index{setrxnalign|(}\index{commands!setrxnalign}\index{setschemealign|(}\index{commands!setschemealign}
With the commands
-\begin{Verbatim}
+\begin{lstlisting}
\setrxnalign{<alignment>}
\setschemealign{<alignment>}
-\end{Verbatim}
-The default alignment behaviour of \lstinline=rxn= and \lstinline=rxnscheme= (see \ref{sssec:rxn_optionen} \&\ \ref{sssec:rxnscheme_optionen}) can be set. You can choose between \lstinline=left=, \lstinline=center= and \lstinline=right=.
+\end{lstlisting}
+The default alignment behaviour of \lstinline+rxn+ and \lstinline+rxnscheme+ (see \ref{sssec:rxn_optionen} \&\ \ref{sssec:rxnscheme_optionen}) can be set. You can choose between \lstinline=left=, \lstinline=center= and \lstinline=right=.
If you leave the argument empty, \mC's default behaviour (\lstinline=center=) is restored.
\begin{Example}
\setrxnalign{right}
\begin{rxn}
- \reactand{A}\arrow{}{}\reactand{B}
+ \reactant{A}\arrow{}{}\reactant{B}
\end{rxn}
\setrxnalign{}
\begin{rxn}
- \reactand{A}\arrow{}{}\reactand{B}
+ \reactant{A}\arrow{}{}\reactant{B}
\end{rxn}
\end{Example}
+\index{setrxnalign|)}\index{setschemealign|)}
-\subsection{setschemename}\label{ssec:setschemename}
+\subsection{setschemename}\label{ssec:setschemename}\index{setschemename|(}\index{commands!setschemename}
See \ref{par:rxnscheme_name}.
+\index{setschemename|)}
-\subsection{transition}\label{ssec:transition}
-\NEU\lstinline=\transition= works exactly like \lstinline=\reactand= (see \ref{ssec:reactand}). \textbf{If you used earlier versions of \mC please be aware, that the command syntax has changed.}
-\begin{Verbatim}
+\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.}
+\begin{lstlisting}
\transition[<alignment>,<anchor>,<tikz>]{<formula>}
-\end{Verbatim}
+\end{lstlisting}
\begin{SideBySideExample}
\begin{rxn}
- \reactand{ \ce{H2 + I2} }
- \arrow[type={<=>},length=.5,direction=below]{}{}
+ \reactant{ \ce{H2 + I2} }
+ \arrow[below,<=>,.5]{}{}
\transition[below]{ \chemfig[dotted][]{H?-I-[2]I-[4]H?} }
- \arrow[type={<=>},length=.5,direction=below]{}{}
- \reactand[below]{ \ce{2 HI} }
+ \arrow[below,<=>,.5]{}{}
+ \reactant[below]{ \ce{2 HI} }
\end{rxn}
\end{SideBySideExample}
+\index{transition|)}
\section{Examples}
\subsection{Addition Reaction}\label{ssec:addition}
A simple reaction scheme with two different products.
\begin{rxnscheme}{addition reaction}
- \reactand{ \chemfig{=_[::-30]-[::60](=[::60]O)-[::-60]} }
+ \reactant{ \chemfig{=_[::-30]-[::60](=[::60]O)-[::-60]} }
\arrow{ $+ \Hpl$ }{}
\mesomeric[,rf]{
- \reactand{ \chemfig{=_[:-30]-[::60](-[::60]OH)(-[::-120,.3,,,white]\oplus)-[::-60]} }
+ \reactant{ \chemfig{=_[:-30]-[::60](-[::60]OH)(-[::-120,.3,,,white]\oplus)-[::-60]} }
\marrow[below]
- \reactand[below]{ \chemfig{\oplus-[6,.3,,,white]-[:-30]=_[::60](-[::60]OH)-[::-60]} }
+ \reactant[below]{ \chemfig{\oplus-[6,.3,,,white]-[:-30]=_[::60](-[::60]OH)-[::-60]} }
}
\branch[right=of rf,,yshift=3em]{
\arrow{}{}
- \reactand{ \chemname{\chemfig{=_[:-30]-[::60](-[::60]OH)(-[::-120]R)-[::-60]}}{1,2-adduct} }
+ \reactant{ \chemname{\chemfig{=_[:-30]-[::60](-[::60]OH)(-[::-120]R)-[::-60]}}{1,2-adduct} }
}
\branch[right=of rf,,yshift=-5em]{
\arrow{}{}
- \reactand{ \chemname{\chemfig{R-[6]-[:-30]=_[::60](-[::60]OH)-[::-60]}}{1,4-adduct} }
+ \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 reactand and the reaction arrow.
-\begin{Verbatim}
- \reactand{ \chemfig{=_[::-30]-[::60](=[::60]O)-[::-60]} }
+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{Verbatim}
+\end{lstlisting}
\begin{rxn}
- \reactand{ \chemfig{=_[::-30]-[::60](=[::60]O)-[::-60]} }
+ \reactant{ \chemfig{=_[::-30]-[::60](=[::60]O)-[::-60]} }
\arrow{ $+ \Hpl$ }{}
\end{rxn}
-Then we write the resonance formul\ae. The \lstinline=\mesomeric= gets the anchor \lstinline=rf= (line 7).
-\begin{Verbatim}[firstnumber=3]
+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]{
- \reactand{ \chemfig{=_[:-30]-[::60](-[::60]OH)(-[::-120,.3,,,white]\oplus)-[::-60]} }
+ \reactant{ \chemfig{=_[:-30]-[::60](-[::60]OH)(-[::-120,.3,,,white]\oplus)-[::-60]} }
\marrow[below]
- \reactand[below]{ \chemfig{\oplus-[6,.3,,,white]-[:-30]=_[::60](-[::60]OH)-[::-60]} }
+ \reactant[below]{ \chemfig{\oplus-[6,.3,,,white]-[:-30]=_[::60](-[::60]OH)-[::-60]} }
}
-\end{Verbatim}
+\end{lstlisting}
\begin{rxn}
- \reactand{ \chemfig{=_[::-30]-[::60](=[::60]O)-[::-60]} }
+ \reactant{ \chemfig{=_[::-30]-[::60](=[::60]O)-[::-60]} }
\arrow{ $+ \Hpl$ }{}
\mesomeric[,rf]{
- \reactand{ \chemfig{=_[:-30]-[::60](-[::60]OH)(-[::-120,.3,,,white]\oplus)-[::-60]} }
+ \reactant{ \chemfig{=_[:-30]-[::60](-[::60]OH)(-[::-120,.3,,,white]\oplus)-[::-60]} }
\marrow[below]
- \reactand[below]{ \chemfig{\oplus-[6,.3,,,white]-[:-30]=_[::60](-[::60]OH)-[::-60]} }
+ \reactant[below]{ \chemfig{\oplus-[6,.3,,,white]-[:-30]=_[::60](-[::60]OH)-[::-60]} }
}
\end{rxn}
-Now comes the 1,2-adduct, placed in a branch referring \lstinline=rf=, shifted above with yshift:
-\begin{Verbatim}[firstnumber=8]
+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{}{}
- \reactand{ \chemname{\chemfig{=_[:-30]-[::60](-[::60]OH)(-[::-120]R)-[::-60]}}{1,2-adduct} }
+ \reactant{ \chemname{\chemfig{=_[:-30]-[::60](-[::60]OH)(-[::-120]R)-[::-60]}}{1,2-adduct} }
}
-\end{Verbatim}
+\end{lstlisting}
\begin{rxn}
- \reactand{ \chemfig{=_[::-30]-[::60](=[::60]O)-[::-60]} }
+ \reactant{ \chemfig{=_[::-30]-[::60](=[::60]O)-[::-60]} }
\arrow{ $+ \Hpl$ }{}
\mesomeric[,rf]{
- \reactand{ \chemfig{=_[:-30]-[::60](-[::60]OH)(-[::-120,.3,,,white]\oplus)-[::-60]} }
+ \reactant{ \chemfig{=_[:-30]-[::60](-[::60]OH)(-[::-120,.3,,,white]\oplus)-[::-60]} }
\marrow[below]
- \reactand[below]{ \chemfig{\oplus-[6,.3,,,white]-[:-30]=_[::60](-[::60]OH)-[::-60]} }
+ \reactant[below]{ \chemfig{\oplus-[6,.3,,,white]-[:-30]=_[::60](-[::60]OH)-[::-60]} }
}
\branch[right=of rf,,yshift=3em]{
\arrow{}{}
- \reactand{ \chemname{\chemfig{=_[:-30]-[::60](-[::60]OH)(-[::-120]R)-[::-60]}}{1,2-adduct} }
+ \reactant{ \chemname{\chemfig{=_[:-30]-[::60](-[::60]OH)(-[::-120]R)-[::-60]}}{1,2-adduct} }
}
\end{rxn}
-At last we write the branch containing the 1,4-adduct, also referencing \lstinline=rf=, shifted below with yshift:
-\begin{Verbatim}[firstnumber=12]
+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{}{}
- \reactand{ \chemname{\chemfig{R-[6]-[:-30]=_[::60](-[::60]OH)-[::-60]}}{1,4-adduct} }
+ \reactant{ \chemname{\chemfig{R-[6]-[:-30]=_[::60](-[::60]OH)-[::-60]}}{1,4-adduct} }
}
-\end{Verbatim}
+\end{lstlisting}
\begin{rxn}
- \reactand{ \chemfig{=_[::-30]-[::60](=[::60]O)-[::-60]} }
+ \reactant{ \chemfig{=_[::-30]-[::60](=[::60]O)-[::-60]} }
\arrow{ $+ \Hpl$ }{}
\mesomeric[,rf]{
- \reactand{ \chemfig{=_[:-30]-[::60](-[::60]OH)(-[::-120,.3,,,white]\oplus)-[::-60]} }
+ \reactant{ \chemfig{=_[:-30]-[::60](-[::60]OH)(-[::-120,.3,,,white]\oplus)-[::-60]} }
\marrow[below]
- \reactand[below]{ \chemfig{\oplus-[6,.3,,,white]-[:-30]=_[::60](-[::60]OH)-[::-60]} }
+ \reactant[below]{ \chemfig{\oplus-[6,.3,,,white]-[:-30]=_[::60](-[::60]OH)-[::-60]} }
}
\branch[right=of rf,,yshift=3em]{
\arrow{}{}
- \reactand{ \chemname{\chemfig{=_[:-30]-[::60](-[::60]OH)(-[::-120]R)-[::-60]}}{1,2-adduct} }
+ \reactant{ \chemname{\chemfig{=_[:-30]-[::60](-[::60]OH)(-[::-120]R)-[::-60]}}{1,2-adduct} }
}
\branch[right=of rf,,yshift=-5em]{
\arrow{}{}
- \reactand{ \chemname{\chemfig{R-[6]-[:-30]=_[::60](-[::60]OH)-[::-60]}}{1,4-adduct} }
+ \reactant{ \chemname{\chemfig{R-[6]-[:-30]=_[::60](-[::60]OH)-[::-60]}}{1,4-adduct} }
}
\end{rxn}
The complete code looks like this:
-\begin{Verbatim}
+\begin{lstlisting}
\begin{rxnscheme}{addition reaction}
- \reactand{ \chemfig{=_[::-30]-[::60](=[::60]O)-[::-60]} }
+ \reactant{ \chemfig{=_[::-30]-[::60](=[::60]O)-[::-60]} }
\arrow{ $+ \Hpl$ }{}
\mesomeric[,rf]{
- \reactand{ \chemfig{=_[:-30]-[::60](-[::60]OH)(-[::-120,.3,,,white]\oplus)-[::-60]} }
+ \reactant{ \chemfig{=_[:-30]-[::60](-[::60]OH)(-[::-120,.3,,,white]\oplus)-[::-60]} }
\marrow[below]
- \reactand[below]{ \chemfig{\oplus-[6,.3,,,white]-[:-30]=_[::60](-[::60]OH)-[::-60]} }
+ \reactant[below]{ \chemfig{\oplus-[6,.3,,,white]-[:-30]=_[::60](-[::60]OH)-[::-60]} }
}
\branch[right=of rf,,yshift=3em]{
\arrow{}{}
- \reactand{ \chemname{\chemfig{=_[:-30]-[::60](-[::60]OH)(-[::-120]R)-[::-60]}}{1,2-adduct} }
+ \reactant{ \chemname{\chemfig{=_[:-30]-[::60](-[::60]OH)(-[::-120]R)-[::-60]}}{1,2-adduct} }
}
\branch[right=of rf,,yshift=-5em]{
\arrow{}{}
- \reactand{ \chemname{\chemfig{R-[6]-[:-30]=_[::60](-[::60]OH)-[::-60]}}{1,4-adduct} }
+ \reactant{ \chemname{\chemfig{R-[6]-[:-30]=_[::60](-[::60]OH)-[::-60]}}{1,4-adduct} }
}
\end{rxnscheme}}
-\end{Verbatim}
+\end{lstlisting}
-\newpage
\subsection{Mesomerism}
We want to display the following reaction scheme:
-\begin{rxnscheme}[scale=.8]{electrophilic substitution}
+\begin{rxnscheme}[,,,.8]{electrophilic substitution}
\setatomsep{1.6em}
- \reactand[,start]{ \chemname{\chemfig{*6(-=-=(-[,,,,white]\phantom{Br})-=)}}{benzene \compound{benzene}} }
+ \reactant[,start]{ \chemname{\chemfig{*6(-=-=(-[,,,,white]\phantom{Br})-=)}}{benzene \compound{benzene}} }
\branch[below=of start]{
- \arrow[direction=below,name=pfeil_a,both]{\ce{Br2 / AlBr3}}{$-\ce{AlBr4\om}$}
+ \arrow[below,,,pfeil_a,both]{\ce{Br2 / AlBr3}}{$-\ce{AlBr4\om}$}
}
\branch[below=of pfeil_a,mesomerism,xshift=8.5em]{
\mesomeric{
- \reactand{
+ \reactant{
\chemfig{*6(=[@{e1}]-=-(-[:120]Br)(-[:60]H)-(-[:-30,.4,,,white]\oplus)-[@{e2}])}
\elmove{e1}{60:4mm}{e2}{0:4mm}
}
\marrow
- \reactand{
+ \reactant{
\chemfig{*6(-(-[:90,.4,,,white]\oplus)-[@{e4}]=[@{e3}]-(-[:120]Br)(-[:60]H)-=)}
\elmove{e3}{180:4mm}{e4}{150:4mm}
}
\marrow
- \reactand{
+ \reactant{
\chemfig{*6(-=-(-[:-150,.4,,,white]\oplus)-(-[:120]Br)(-[:60]H)-=)}
}
}
}
\branch[above=of mesomerism,,xshift=7.25em]{
- \arrow[direction=above]{$-\Hpl$}{}
+ \arrow[above]{$-\Hpl$}{}
}
- \arrow[length=2.6]{}{}
- \reactand{ \chemname{\chemfig{*6(-=-=(-Br)-=)}}{bromobenzene \compound{bromobenzene}} }
+ \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=\reactand=, \lstinline=\arrow= and the environment \lstinline=\begin{rxn} ... \end{rxn}=.
-\begin{Verbatim}
- \begin{rxn}
- \reactand{
+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{}{}
- \reactand{
+ \reactant{
\chemname{\chemfig{*6(-=-=(-Br)-=)}}{bromobenzene \compound{bromobenzene}}
}
- \end{rxn}
-\end{Verbatim}
+ \end{rxnscheme}
+\end{lstlisting}
\begin{rxn}
- \reactand{
+ \reactant{
\chemname{\chemfig{*6(-=-=-=)}}{benzene \compound{benzene}}
}
\arrow{}{}
- \reactand{
+ \reactant{
\chemname{\chemfig{*6(-=-=(-Br)-=)}}{bromobenzene \compound{bromobenzene}}
}
\end{rxn}
Now we make it a little bit smaller:
-\begin{Verbatim}
- \begin{rxn}!![scale=.8]
- \setatomsep{1.6em}!!
- \reactand{
+\begin{lstlisting}
+ \begin{rxnscheme}[,,,!!.8!!]{electrophilic substitution}
+ !!\setatomsep{1.6em}!!
+ \reactant{
\chemname{\chemfig{*6(-=-=-=)}}{benzene \compound{benzene}}
}
\arrow{}{}
- \reactand{
+ \reactant{
\chemname{\chemfig{*6(-=-=(-Br)-=)}}{bromobenzene \compound{bromobenzene}}
}
- \end{rxn}
-\end{Verbatim}
- \begin{rxn}[scale=.8]
+ \end{rxnscheme}
+\end{lstlisting}
+ \begin{rxn}[,.8]
\setatomsep{1.6em}
- \reactand{
+ \reactant{
\chemname{\chemfig{*6(-=-=-=)}}{benzene \compound{benzene}}
}
\arrow{}{}
- \reactand{
+ \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 code:
-\begin{Verbatim}[firstnumber=7]
- \reactand[,,!!yshift=1em!!]{
+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{Verbatim}
-This is not the best solution, because the arrow isn't centered with respect to the rings.
+\end{lstlisting}
+This is not the best solution, because the arrow\index{arrow} isn't centered with respect to the rings.
\begin{rxn}
- \reactand{
+ \reactant{
\chemname{\chemfig{*6(-=-=-=)}}{benzene \compound{benzene}}
}
\arrow{}{}
- \reactand[,,yshift=1em]{
+ \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 code, because the following arrow and reactand align themselves with respect to the reactand or arrow directly before. But we can write an invisible bromine to the first benzene to do the trick:
-\begin{Verbatim}[firstnumber=3]
- \reactand{
+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{Verbatim}
+\end{lstlisting}
\begin{rxn}
- \reactand{
+ \reactant{
\chemname{\chemfig{*6(-=-=(-[,,,,white]\phantom{Br})-=)}}{benzene \compound{benzene}}
}
\arrow{}{}
- \reactand{
+ \reactant{
\chemname{\chemfig{*6(-=-=(-Br)-=)}}{bromobenzene \compound{bromobenzene}}
}
\end{rxn}
-We need to give the first reactand an anchor in order to refer to it with the branch.
- \begin{Verbatim}
- \begin{rxn}[scale=.8]
+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}
- \reactand[,!!start!!]{
+ \reactant[,!!start!!]{
\chemname{\chemfig{*6(-=-=(-[,,,,white]\phantom{Br})-=)}}{benzene \compound{benzene}}
}
\branch[!!below=of start!!]{
- \arrow[!!direction=below!!,both]{ \ce{Br2 / AlBr3} }{ $-\ce{AlBr4\om}$ }
+ \arrow[!!below!!,,,,both]{ \ce{Br2 / AlBr3} }{ $-\ce{AlBr4\om}$ }
}
\arrow{}{}
- \reactand{
+ \reactant{
\chemname{\chemfig{*6(-=-=(-Br)-=)}}{bromobenzene \compound{bromobenzene}}
}
- \end{rxn}
-\end{Verbatim}
-So the first reactand gets the anchor \lstinline=start= and the branch refers to it with \lstinline+below=of start+. For the reaction arrow to point below, we need to use the key \lstinline+direction=below+. Now we get:
- \begin{rxn}[scale=.8]
+ \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}
- \reactand[,start]{
+ \reactant[,start]{
\chemname{\chemfig{*6(-=-=(-[,,,,white]\phantom{Br})-=)}}{benzene \compound{benzene}}
}
\branch[below=of start]{
- \arrow[direction=below,both]{\ce{Br2 / AlBr3}}{$-\ce{AlBr4\om}$}
+ \arrow[below,,,,both]{\ce{Br2 / AlBr3}}{$-\ce{AlBr4\om}$}
}
\arrow{}{}
- \reactand{
+ \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=, \lstinline=\marrow= and \lstinline=\elmove=.
-\begin{Verbatim}
+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{!!
- \reactand{
+ \reactant{
\chemfig{*6(=[@{e1}]-=-(-[:120]Br)(-[:60]H)-(-[:-30,.4,,,white]\oplus)-[@{e2}])}
!!\elmove{e1}{60:4mm}{e2}{0:4mm}!!
}
!!\marrow!!
- \reactand{
+ \reactant{
\chemfig{*6(-(-[:90,.4,,,white]\oplus)-[@{e4}]=[@{e3}]-(-[:120]Br)(-[:60]H)-=)}
\elmove{e3}{180:4mm}{e4}{150:4mm}
}
\marrow
- \reactand{
+ \reactant{
\chemfig{*6(-=-(-[:-150,.4,,,white]\oplus)-(-[:120]Br)(-[:60]H)-=)}
}
!!}!!
-\end{Verbatim}
-\begin{rxn}[scale=.8]
+\end{lstlisting}
+\begin{rxn}[,.8]
\setatomsep{1.6em}
\mesomeric{
- \reactand{
+ \reactant{
\chemfig{*6(=[@{e1}]-=-(-[:120]Br)(-[:60]H)-(-[:-30,.4,,,white]\oplus)-[@{e2}])}
\elmove{e1}{60:4mm}{e2}{0:4mm}
}
\marrow
- \reactand{
+ \reactant{
\chemfig{*6(-(-[:90,.4,,,white]\oplus)-[@{e4}]=[@{e3}]-(-[:120]Br)(-[:60]H)-=)}
\elmove{e3}{180:4mm}{e4}{150:4mm}
}
\marrow
- \reactand{
+ \reactant{
\chemfig{*6(-=-(-[:-150,.4,,,white]\oplus)-(-[:120]Br)(-[:60]H)-=)}
}
}
\end{rxn}
-When we write the code \emph{inside} of the branch, directly after the arrow, we get the following:
-\begin{rxn}[scale=.8]
+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}
- \reactand[,start]{
+ \reactant[,start]{
\chemname{\chemfig{*6(-=-=(-[,,,,white]\phantom{Br})-=)}}{benzene \compound{benzene}}
}
\branch[below=of start]{
- \arrow[direction=below,both]{\ce{Br2 / AlBr3}}{$-\ce{AlBr4\om}$}
+ \arrow[below,,,,both]{\ce{Br2 / AlBr3}}{$-\ce{AlBr4\om}$}
\mesomeric{
- \reactand{
+ \reactant{
\chemfig{*6(=[@{e1}]-=-(-[:120]Br)(-[:60]H)-(-[:-30,.4,,,white]\oplus)-[@{e2}])}
\elmove{e1}{60:4mm}{e2}{0:4mm}
}
\marrow
- \reactand{
+ \reactant{
\chemfig{*6(-(-[:90,.4,,,white]\oplus)-[@{e4}]=[@{e3}]-(-[:120]Br)(-[:60]H)-=)}
\elmove{e3}{180:4mm}{e4}{150:4mm}
}
\marrow
- \reactand{
+ \reactant{
\chemfig{*6(-=-(-[:-150,.4,,,white]\oplus)-(-[:120]Br)(-[:60]H)-=)}
}
}
}
\arrow{}{}
- \reactand{
+ \reactant{
\chemname{\chemfig{*6(-=-=(-Br)-=)}}{bromobenzene \compound{bromobenzene}}
}
\end{rxn}
This obviously messes everything up. We can try this, though:
-\begin{Verbatim}
- \begin{rxn}[scale=.8]
+\begin{lstlisting}
+ \begin{rxn}[,.8]
\setatomsep{1.6em}
- \reactand[,start]{
+ \reactant[,start]{
\chemname{\chemfig{*6(-=-=(-[,,,,white]\phantom{Br})-=)}}{benzene \compound{benzene}}
}
\branch[below=of start]{
- \arrow[direction=below,both]{\ce{Br2 / AlBr3}}{$-\ce{AlBr4\om}$}
+ \arrow[below,,,,both]{\ce{Br2 / AlBr3}}{$-\ce{AlBr4\om}$}
\mesomeric!![below]!!{
- \reactand{
+ \reactant{
\chemfig{*6(=[@{e1}]-=-(-[:120]Br)(-[:60]H)-(-[:-30,.4,,,white]\oplus)-[@{e2}])}
\elmove{e1}{60:4mm}{e2}{0:4mm}
}
\marrow
- \reactand{
+ \reactant{
\chemfig{*6(-(-[:90,.4,,,white]\oplus)-[@{e4}]=[@{e3}]-(-[:120]Br)(-[:60]H)-=)}
\elmove{e3}{180:4mm}{e4}{150:4mm}
}
\marrow
- \reactand{
+ \reactant{
\chemfig{*6(-=-(-[:-150,.4,,,white]\oplus)-(-[:120]Br)(-[:60]H)-=)}
}
}
}
\arrow{}{}
- \reactand{
+ \reactant{
\chemname{\chemfig{*6(-=-=(-Br)-=)}}{bromobenzene \compound{bromobenzene}}
}
\end{rxn}
-\end{Verbatim}
+\end{lstlisting}
The result is better:
- \begin{rxn}[scale=.8]
+ \begin{rxn}[,.8]
\setatomsep{1.6em}
- \reactand[,start]{
+ \reactant[,start]{
\chemname{\chemfig{*6(-=-=(-[,,,,white]\phantom{Br})-=)}}{benzene \compound{benzene}}
}
\branch[below=of start]{
- \arrow[direction=below,both]{\ce{Br2 / AlBr3}}{$-\ce{AlBr4\om}$}
+ \arrow[below,,,,both]{\ce{Br2 / AlBr3}}{$-\ce{AlBr4\om}$}
\mesomeric[below]{
- \reactand{
+ \reactant{
\chemfig{*6(=[@{e1}]-=-(-[:120]Br)(-[:60]H)-(-[:-30,.4,,,white]\oplus)-[@{e2}])}
\elmove{e1}{60:4mm}{e2}{0:4mm}
}
\marrow
- \reactand{
+ \reactant{
\chemfig{*6(-(-[:90,.4,,,white]\oplus)-[@{e4}]=[@{e3}]-(-[:120]Br)(-[:60]H)-=)}
\elmove{e3}{180:4mm}{e4}{150:4mm}
}
\marrow
- \reactand{
+ \reactant{
\chemfig{*6(-=-(-[:-150,.4,,,white]\oplus)-(-[:120]Br)(-[:60]H)-=)}
}
}
}
\arrow{}{}
- \reactand{
+ \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 of its own.
-\begin{Verbatim}[firstnumber=4]
+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[direction=below,both,!!name=arrow_a!!]{\ce{Br2 / AlBr3}}{$-\ce{AlBr4\om}$}
+ \arrow[below,,,!!arrow_a!!,both]{\ce{Br2 / AlBr3}}{$-\ce{AlBr4\om}$}
}
!!\branch[below=of arrow_a]{!!
\mesomeric{
- \reactand{
+ \reactant{
\chemfig{*6(=[@{e1}]-=-(-[:120]Br)(-[:60]H)-(-[:-30,.4,,,white]\oplus)-[@{e2}])}
\elmove{e1}{60:4mm}{e2}{0:4mm}
}
\marrow
- \reactand{
+ \reactant{
\chemfig{*6(-(-[:90,.4,,,white]\oplus)-[@{e4}]=[@{e3}]-(-[:120]Br)(-[:60]H)-=)}
\elmove{e3}{180:4mm}{e4}{150:4mm}
}
\marrow
- \reactand{
+ \reactant{
\chemfig{*6(-=-(-[:-150,.4,,,white]\oplus)-(-[:120]Br)(-[:60]H)-=)}
}
}
!!}!!
...
-\end{Verbatim}
-\begin{rxn}[scale=.8]
+\end{lstlisting}
+\begin{rxn}[,.8]
\setatomsep{1.6em}
- \reactand[,start]{\chemname{\chemfig{*6(-=-=(-[,,,,white]\phantom{Br})-=)}}{benzene \compound{benzene}} }
+ \reactant[,start]{\chemname{\chemfig{*6(-=-=(-[,,,,white]\phantom{Br})-=)}}{benzene \compound{benzene}} }
\branch[below=of start]{
- \arrow[direction=below,both,name=arrow_a]{\ce{Br2 / AlBr3}}{$-\ce{AlBr4\om}$}
+ \arrow[below,,,arrow_a,both]{\ce{Br2 / AlBr3}}{$-\ce{AlBr4\om}$}
}
\branch[below=of arrow_a]{
\mesomeric[,mesomerism]{
- \reactand{
+ \reactant{
\chemfig{*6(=[@{e1}]-=-(-[:120]Br)(-[:60]H)-(-[:-30,.4,,,white]\oplus)-[@{e2}])}
\elmove{e1}{60:4mm}{e2}{0:4mm}
}
\marrow
- \reactand{
+ \reactant{
\chemfig{*6(-(-[:90,.4,,,white]\oplus)-[@{e4}]=[@{e3}]-(-[:120]Br)(-[:60]H)-=)}
\elmove{e3}{180:4mm}{e4}{150:4mm}
}
\marrow
- \reactand{
+ \reactant{
\chemfig{*6(-=-(-[:-150,.4,,,white]\oplus)-(-[:120]Br)(-[:60]H)-=)}
}
}
}
\arrow{}{}
- \reactand{ \chemname{\chemfig{*6(-=-=(-Br)-=)}}{bromobenzene \compound{bromobenzene}} }
+ \reactant{ \chemname{\chemfig{*6(-=-=(-Br)-=)}}{bromobenzene \compound{bromobenzene}} }
\end{rxn}
-In first sight this isn't better. But by shifting the branch with xshift, we get what we want:
-\begin{Verbatim}[firstnumber=4]
+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[direction=below,both,name=arrow_a]{\ce{Br2 / AlBr3}}{$-\ce{AlBr4\om}$}
+ \arrow[below,,,arrow_a,both]{\ce{Br2 / AlBr3}}{$-\ce{AlBr4\om}$}
}
\branch[below=of arrow_a,,!!xshift=8.5em!!]{
\mesomeric{
- \reactand{
+ \reactant{
\chemfig{*6(=[@{e1}]-=-(-[:120]Br)(-[:60]H)-(-[:-30,.4,,,white]\oplus)-[@{e2}])}
\elmove{e1}{60:4mm}{e2}{0:4mm}
}
\marrow
- \reactand{
+ \reactant{
\chemfig{*6(-(-[:90,.4,,,white]\oplus)-[@{e4}]=[@{e3}]-(-[:120]Br)(-[:60]H)-=)}
\elmove{e3}{180:4mm}{e4}{150:4mm}
}
\marrow
- \reactand{
+ \reactant{
\chemfig{*6(-=-(-[:-150,.4,,,white]\oplus)-(-[:120]Br)(-[:60]H)-=)}
}
}
}
...
-\end{Verbatim}
-\begin{rxn}[scale=.8]
+\end{lstlisting}
+\begin{rxn}[,.8]
\setatomsep{1.6em}
- \reactand[,start]{\chemname{\chemfig{*6(-=-=(-[,,,,white]\phantom{Br})-=)}}{benzene \compound{benzene}} }
+ \reactant[,start]{\chemname{\chemfig{*6(-=-=(-[,,,,white]\phantom{Br})-=)}}{benzene \compound{benzene}} }
\branch[below=of start]{
- \arrow[direction=below,both,name=arrow_a]{\ce{Br2 / AlBr3}}{$-\ce{AlBr4\om}$}
+ \arrow[below,,,arrow_a,both]{\ce{Br2 / AlBr3}}{$-\ce{AlBr4\om}$}
}
\branch[below=of arrow_a,mesomerism,xshift=8.5em]{
\mesomeric{
- \reactand{
+ \reactant{
\chemfig{*6(=[@{e1}]-=-(-[:120]Br)(-[:60]H)-(-[:-30,.4,,,white]\oplus)-[@{e2}])}
\elmove{e1}{60:4mm}{e2}{0:4mm}
}
\marrow
- \reactand{
+ \reactant{
\chemfig{*6(-(-[:90,.4,,,white]\oplus)-[@{e4}]=[@{e3}]-(-[:120]Br)(-[:60]H)-=)}
\elmove{e3}{180:4mm}{e4}{150:4mm}
}
\marrow
- \reactand{
+ \reactant{
\chemfig{*6(-=-(-[:-150,.4,,,white]\oplus)-(-[:120]Br)(-[:60]H)-=)}
}
}
}
\arrow{}{}
- \reactand{ \chemname{\chemfig{*6(-=-=(-Br)-=)}}{bromobenzene \compound{bromobenzene}} }
+ \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{Verbatim}[firstnumber=4]
+\begin{lstlisting}[firstnumber=4]
...
\branch[below=of start]{
- \arrow[direction=below,both,!!name=arrow_a!!]{\ce{Br2 / AlBr3}}{$-\ce{AlBr4\om}$}
+ \arrow[below,,,!!arrow_a!!,both]{\ce{Br2 / AlBr3}}{$-\ce{AlBr4\om}$}
}
\branch[below=of arrow_a,!!mesomerism!!,xshift=8.5em]{
\mesomeric{
- \reactand{
+ \reactant{
\chemfig{*6(=[@{e1}]-=-(-[:120]Br)(-[:60]H)-(-[:-30,.4,,,white]\oplus)-[@{e2}])}
\elmove{e1}{60:4mm}{e2}{0:4mm}
}
\marrow
- \reactand{
+ \reactant{
\chemfig{*6(-(-[:90,.4,,,white]\oplus)-[@{e4}]=[@{e3}]-(-[:120]Br)(-[:60]H)-=)}
\elmove{e3}{180:4mm}{e4}{150:4mm}
}
\marrow
- \reactand{
+ \reactant{
\chemfig{*6(-=-(-[:-150,.4,,,white]\oplus)-(-[:120]Br)(-[:60]H)-=)}
}
}
}
\branch[!!above=of mesomerism,,xshift=7.25em!!]{
- \arrow[direction=above]{$-\Hpl$}{}
+ \arrow[above]{$-\Hpl$}{}
}
...
-\end{Verbatim}
-\begin{rxn}[scale=.8]
+\end{lstlisting}
+\begin{rxn}[,.8]
\setatomsep{1.6em}
- \reactand[,start]{\chemname{\chemfig{*6(-=-=(-[,,,,white]\phantom{Br})-=)}}{benzene \compound{benzene}} }
+ \reactant[,start]{\chemname{\chemfig{*6(-=-=(-[,,,,white]\phantom{Br})-=)}}{benzene \compound{benzene}} }
\branch[below=of start]{
- \arrow[direction=below,both,name=arrow_a]{\ce{Br2 / AlBr3}}{$-\ce{AlBr4\om}$}
+ \arrow[below,,,arrow_a,both]{\ce{Br2 / AlBr3}}{$-\ce{AlBr4\om}$}
}
\branch[below=of arrow_a,mesomerism,xshift=8.5em]{
\mesomeric{
- \reactand{
+ \reactant{
\chemfig{*6(=[@{e1}]-=-(-[:120]Br)(-[:60]H)-(-[:-30,.4,,,white]\oplus)-[@{e2}])}
\elmove{e1}{60:4mm}{e2}{0:4mm}
}
\marrow
- \reactand{
+ \reactant{
\chemfig{*6(-(-[:90,.4,,,white]\oplus)-[@{e4}]=[@{e3}]-(-[:120]Br)(-[:60]H)-=)}
\elmove{e3}{180:4mm}{e4}{150:4mm}
}
\marrow
- \reactand{
+ \reactant{
\chemfig{*6(-=-(-[:-150,.4,,,white]\oplus)-(-[:120]Br)(-[:60]H)-=)}
}
}
}
\branch[above=of mesomerism,,xshift=7.25em]{
- \arrow[direction=above]{$-\Hpl$}{}
+ \arrow[above]{$-\Hpl$}{}
}
\arrow{}{}
- \reactand{ \chemname{\chemfig{*6(-=-=(-Br)-=)}}{bromobenzene \compound{bromobenzene}} }
+ \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.
-\begin{Verbatim}
- \begin{rxn}[scale=.8]
+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}
- \reactand[,start]{\chemname{\chemfig{*6(-=-=(-[,,,,white]\phantom{Br})-=)}}{benzene \compound{benzene}} }
+ \reactant[,start]{\chemname{\chemfig{*6(-=-=(-[,,,,white]\phantom{Br})-=)}}{benzene \compound{benzene}} }
\branch[below=of start]{
- \arrow[direction=below,both,name=arrow_a]{\ce{Br2 / AlBr3}}{$-\ce{AlBr4\om}$}
+ \arrow[below,,,arrow_a,both]{\ce{Br2 / AlBr3}}{$-\ce{AlBr4\om}$}
}
\branch[below=of arrow_a,mesomerism,xshift=8.5em]{
\mesomeric{
- \reactand{
+ \reactant{
\chemfig{*6(=[@{e1}]-=-(-[:120]Br)(-[:60]H)-(-[:-30,.4,,,white]\oplus)-[@{e2}])}
\elmove{e1}{60:4mm}{e2}{0:4mm}
}
\marrow
- \reactand{
+ \reactant{
\chemfig{*6(-(-[:90,.4,,,white]\oplus)-[@{e4}]=[@{e3}]-(-[:120]Br)(-[:60]H)-=)}
\elmove{e3}{180:4mm}{e4}{150:4mm}
}
\marrow
- \reactand{
+ \reactant{
\chemfig{*6(-=-(-[:-150,.4,,,white]\oplus)-(-[:120]Br)(-[:60]H)-=)}
}
}
}
\branch[above=of mesomerism,,xshift=7.25em]{
- \arrow[direction=above]{$-\Hpl$}{}
+ \arrow[above]{$-\Hpl$}{}
}
- \arrow[!!length=2.6!!]{}{}
- \reactand{ \chemname{\chemfig{*6(-=-=(-Br)-=)}}{bromobenzene \compound{bromobenzene}} }
- \end{rxn}
-\end{Verbatim}
- \begin{rxn}[scale=.8]
- \setatomsep{1.6em}
- \reactand[,start]{\chemname{\chemfig{*6(-=-=(-[,,,,white]\phantom{Br})-=)}}{benzene \compound{benzene}} }
+ \arrow[,,!!2.6!!]{}{}
+ \reactant{ \chemname{\chemfig{*6(-=-=(-Br)-=)}}{bromobenzene \compound{bromobenzene}} }
+ \end{rxnscheme}
+\end{lstlisting}
- \branch[below=of start]{
- \arrow[direction=below,both,name=arrow_a]{\ce{Br2 / AlBr3}}{$-\ce{AlBr4\om}$}
+\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[below=of arrow_a,mesomerism,xshift=8.5em]{
- \mesomeric{
- \reactand{
- \chemfig{*6(=[@{e1}]-=-(-[:120]Br)(-[:60]H)-(-[:-30,.4,,,white]\oplus)-[@{e2}])}
- \elmove{e1}{60:4mm}{e2}{0:4mm}
- }
- \marrow
- \reactand{
- \chemfig{*6(-(-[:90,.4,,,white]\oplus)-[@{e4}]=[@{e3}]-(-[:120]Br)(-[:60]H)-=)}
- \elmove{e3}{180:4mm}{e4}{150:4mm}
- }
- \marrow
- \reactand{
- \chemfig{*6(-=-(-[:-150,.4,,,white]\oplus)-(-[:120]Br)(-[:60]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}}
}
- \branch[above=of mesomerism,,xshift=7.25em]{
- \arrow[direction=above]{$-\Hpl$}{}
+ \elmove{a1}{90:1.5cm}{a2}{0:3cm}
+ \branch[on chain=going left,,yshift=-3.5em]{
+ \arrow[left,<=>]{}{\tiny protolysis}
}
-
- \arrow[length=2.6]{}{}
- \reactand{ \chemname{\chemfig{*6(-=-=(-Br)-=)}}{bromobenzene \compound{bromobenzene}} }
+ \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}
-\newpage
-\subsection[Synthesis with \TikZ]{Creating an extensive synthesis using \TikZ, \mC and \CF}\label{ssec:tikzsynthese}
-Since the commands of \CF are functioning well in a `tikzpicure' environment, we can create extensive syntheses, using the \lstinline=\merge= command. The other \mC commands can't be used here without further attention, because they're placed on a chain. In the next example, we directly use the floating environment \lstinline=rxnfloat=.
-\begin{Verbatim}
-
- \begin{rxnfloat}
- \setatomsep{1.8em}\setcrambond{3pt}{.5pt}{1pt}
- \centering
- \begin{tikzpicture}[scale=.8]
- \small
- \node(a) at (0,0) {\chemfig{=_[::30]-[::-60]-[::60](-[::-60])(-[::120])-[::0]OH}};
- \node(b) at (0,-4) {\chemfig{Br-[::30]-[::-60]=_[::60](-[::-60])-[::60]}};
- \draw[-stealth,thick] (a.south) -- node[left]{HBr} (b.north);
- \node(c) at (5,1) {\chemname{\chemfig{**6(--(-SO_2Cl)---(-)-)}}{tosyle chloride}};
- \node(d) at (5,-4) {\chemfig{**6(--(-SO_2Na)---(-)-)}};
- \draw[-stealth,thick] (c.south) -- node[left]{NaOH} node[right]{Zn} (d.north);
- \node(e) at (2.5,-8.5) {\chemfig{**6(--(-SO_2-[:30]-[::-60]=_[::60](-[::60])-[::-60])---(-)-)}};
- \node(f) at (10,-4) {\chemname{\chemfig{-[::30](-[::60])=_[::-60]-[::60]COOH}}{3-methyl-2-butenoic acid}};
- \node(g) at (10,-8.5) {\chemfig{-[::30](-[::60])=_[::-60]-[::60]CO_2CH_3}};
- \draw[-stealth,thick] (f.south) -- node[left]{\ce{CH3OH}} (g.north);
- \merge{e}{b}{d}
- \node[left delimiter={[},right delimiter={]}](h) at (6.25,-14.5) {\chemfig{-[::30](-[::60])=^[::-60]-[::60](-[::60]S(=[::90]O)(=[::-90]O)-[::0]**6(---(-)---))-[::-60](-[::0])(-[::-120])-[::60](-[::60,.5,,,white]\ominus)-[::-60]CO_2CH_3}};
- \node at (5.25,-11) {\ce{NaOCH3}};
- \merge{h}{e}{g}
- \node(i) at (6.25,-18.5) {};
- \node(j) at (6.25,-21.5) {\chemname{\chemfig{-[::-30](-[::-60])=^[::60]>[::-60](-[::90,1.2])-[::30,1.2](-[::120,1.2](-[::-60])-[::0])<:[::-30]COOH}}{\emph{trans}-chrysanthemum acid}};
- \draw[-stealth,thick] (h.south) -- (i.north);
- \draw[-stealth,thick] (i.south) -- node[left]{KOH} (j.north);
- \end{tikzpicture}
- \caption{synthesis of chrysanthemum acid}
- \end{rxnfloat}
-
-\end{Verbatim}
-\begin{rxnfloat}
-\setatomsep{1.8em}\setcrambond{3pt}{.5pt}{1pt}
-\centering
-\begin{tikzpicture}[scale=.8]
- \small
- \node(a) at (0,0) {\chemfig{=_[::30]-[::-60]-[::60](-[::-60])(-[::120])-[::0]OH}};
- \node(b) at (0,-4) {\chemfig{Br-[::30]-[::-60]=_[::60](-[::-60])-[::60]}};
- \draw[-stealth,thick] (a.south) -- node[left]{HBr} (b.north);
-
- \node(c) at (5,1) {\chemname{\chemfig{**6(--(-SO_2Cl)---(-)-)}}{tosyle chloride}};
- \node(d) at (5,-4) {\chemfig{**6(--(-SO_2Na)---(-)-)}};
- \draw[-stealth,thick] (c.south) -- node[left]{NaOH} node[right]{Zn} (d.north);
-
- \node(e) at (2.5,-8.5) {\chemfig{**6(--(-SO_2-[:30]-[::-60]=_[::60](-[::60])-[::-60])---(-)-)}};
- \node(f) at (10,-4) {\chemname{\chemfig{-[::30](-[::60])=_[::-60]-[::60]COOH}}{3-methyl-2-butenoic acid}};
- \node(g) at (10,-8.5) {\chemfig{-[::30](-[::60])=_[::-60]-[::60]CO_2CH_3}};
- \draw[-stealth,thick] (f.south) -- node[left]{\ce{CH3OH}} (g.north);
- \merge{e}{b}{d}
-
- \node[left delimiter={[},right delimiter={]}](h) at (6.25,-14.5) {\chemfig{-[::30](-[::60])=^[::-60]-[::60](-[::60]S(=[::90]O)(=[::-90]O)-[::0]**6(---(-)---))-[::-60](-[::0])(-[::-120])-[::60](-[::60,.3,,,white]\ominus)-[::-60]CO_2CH_3}};
- \node at (5.25,-11) {\ce{NaOCH3}};
- \merge{h}{e}{g}
-
- \node(i) at (6.25,-18.5) {};
- \node(j) at (6.25,-21.5) {\chemname{\chemfig{-[::-30](-[::-60])=^[::60]>[::-60](-[::90,1.2])-[::30,1.2](-[::120,1.2](-[::-60])-[::0])<:[::-30]COOH}}{\emph{trans}-chrysanthemum acid}};
- \draw[-stealth,thick] (h.south) -- (i.north);
- \draw[-stealth,thick] (i.south) -- node[left]{KOH} (j.north);
-\end{tikzpicture}
-\caption{synthesis of chrysanthemum acid}
-\end{rxnfloat}
+\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{Verbatim}
-
- \begin{rxnfloat}
- \setatomsep{1.8em}\setcrambond{3pt}{.5pt}{1pt}
- \centering
- \begin{tikzpicture}[scale=.8]
- \small
- \node(a) at (0,0) {\chemfig{=_[::30]-[::-60]-[::60](-[::-60])(-[::120])-[::0]OH}};
- \node(b) at (0,-4) {\chemfig{Br-[::30]-[::-60]=_[::60](-[::-60])-[::60]}};
- \draw[-stealth,thick] (a.south) -- node[left]{HBr} (b.north);
-\end{Verbatim}
-In lines 1 -- 6 we begin the environment and make sure, that the formul\ae\ don't become to big. In lines 7 -- 9 the first two reactands are written (lines 7 and 8) and connected with an arrow (line 9).
-\setatomsep{1.8em}
-\setcrambond{3pt}{.5pt}{1pt}
-\begin{center}
-\begin{tikzpicture}[scale=.8]
- \small
- \node(a) at (0,0) {\chemfig{=_[::30]-[::-60]-[::60](-[::-60])(-[::120])-[::0]OH}};
- \node(b) at (0,-4) {\chemfig{Br-[::30]-[::-60]=_[::60](-[::-60])-[::60]}};
- \draw[-stealth,thick] (a.south) -- node[left]{HBr} (b.north);
-\end{tikzpicture}
-\end{center}
-\begin{Verbatim}[firstnumber=10]
- \node(c) at (5,1) {\chemname{\chemfig{**6(--(-SO_2Cl)---(-)-)}}{tosyle chloride}};
- \node(d) at (5,-4) {\chemfig{**6(--(-SO_2Na)---(-)-)}};
- \draw[-stealth,thick] (c.south) -- node[left]{NaOH} node[right]{Zn} (d.north);
-\end{Verbatim}
-In the three following lines 10 -- 12, we create the second branch of the synthesis.
-\begin{center}
-\begin{tikzpicture}[scale=.8]
- \small
- \node(a) at (0,0) {\chemfig{=_[::30]-[::-60]-[::60](-[::-60])(-[::120])-[::0]OH}};
- \node(b) at (0,-4) {\chemfig{Br-[::30]-[::-60]=_[::60](-[::-60])-[::60]}};
- \draw[-stealth,thick] (a.south) -- node[left]{HBr} (b.north);
- \node(c) at (5,1) {\chemname{\chemfig{**6(--(-SO_2Cl)---(-)-)}}{tosyle chloride}};
- \node(d) at (5,-4) {\chemfig{**6(--(-SO_2Na)---(-)-)}};
- \draw[-stealth,thick] (c.south) -- node[left]{NaOH} node[right]{Zn} (d.north);
-\end{tikzpicture}
-\end{center}
-\begin{Verbatim}[firstnumber=13]
- \node(e) at (2.5,-8.5) {\chemfig{**6(--(-SO_2-[:30]-[::-60]=_[::60](-[::60])-[::-60])---(-)-)}};
- \node(f) at (10,-4) {\chemname{\chemfig{-[::30](-[::60])=_[::-60]-[::60]COOH}}{3-methyl-2-butenoic acid}};
- \node(g) at (10,-8.5) {\chemfig{-[::30](-[::60])=_[::-60]-[::60]CO_2CH_3}};
- \draw[-stealth,thick] (f.south) -- node[left]{\ce{CH3OH}} (g.north);
-\end{Verbatim}
-In lines 13 -- 16 we create the third branch and the product of the first two branches.
-\begin{center}
-\begin{tikzpicture}[scale=.8]
- \small
- \node(a) at (0,0) {\chemfig{=_[::30]-[::-60]-[::60](-[::-60])(-[::120])-[::0]OH}};
- \node(b) at (0,-4) {\chemfig{Br-[::30]-[::-60]=_[::60](-[::-60])-[::60]}};
- \draw[-stealth,thick] (a.south) -- node[left]{HBr} (b.north);
- \node(c) at (5,1) {\chemname{\chemfig{**6(--(-SO_2Cl)---(-)-)}}{tosyle chloride}};
- \node(d) at (5,-4) {\chemfig{**6(--(-SO_2Na)---(-)-)}};
- \draw[-stealth,thick] (c.south) -- node[left]{NaOH} node[right]{Zn} (d.north);
- \node(e) at (2.5,-8.5) {\chemfig{**6(--(-SO_2-[:30]-[::-60]=_[::60](-[::60])-[::-60])---(-)-)}};
- \node(f) at (10,-4) {\chemname{\chemfig{-[::30](-[::60])=_[::-60]-[::60]COOH}}{3-methyl-2-butenoic acid}};
- \node(g) at (10,-8.5) {\chemfig{-[::30](-[::60])=_[::-60]-[::60]CO_2CH_3}};
- \draw[-stealth,thick] (f.south) -- node[left]{\ce{CH3OH}} (g.north);
-\end{tikzpicture}
-\end{center}
-\begin{Verbatim}[firstnumber=17]
- \merge{e}{b}{d}
-\end{Verbatim}
-In line 17 we merge the first two branches with their product.
-\begin{center}
-\begin{tikzpicture}[scale=.8]
- \small
- \node(a) at (0,0) {\chemfig{=_[::30]-[::-60]-[::60](-[::-60])(-[::120])-[::0]OH}};
- \node(b) at (0,-4) {\chemfig{Br-[::30]-[::-60]=_[::60](-[::-60])-[::60]}};
- \draw[-stealth,thick] (a.south) -- node[left]{HBr} (b.north);
- \node(c) at (5,1) {\chemname{\chemfig{**6(--(-SO_2Cl)---(-)-)}}{tosyle chloride}};
- \node(d) at (5,-4) {\chemfig{**6(--(-SO_2Na)---(-)-)}};
- \draw[-stealth,thick] (c.south) -- node[left]{NaOH} node[right]{Zn} (d.north);
- \node(e) at (2.5,-8.5) {\chemfig{**6(--(-SO_2-[:30]-[::-60]=_[::60](-[::60])-[::-60])---(-)-)}};
- \node(f) at (10,-4) {\chemname{\chemfig{-[::30](-[::60])=_[::-60]-[::60]COOH}}{3-methyl-2-butenoic acid}};
- \node(g) at (10,-8.5) {\chemfig{-[::30](-[::60])=_[::-60]-[::60]CO_2CH_3}};
- \draw[-stealth,thick] (f.south) -- node[left]{\ce{CH3OH}} (g.north);
- \merge{e}{b}{d}
-\end{tikzpicture}
-\end{center}
-\begin{Verbatim}[firstnumber=18]
- \node[left delimiter={[},right delimiter={]}](h) at (6.25,-14.5) {\chemfig{-[::30](-[::60])=^[::-60]-[::60](-[::60]S(=[::90]O)(=[::-90]O)-[::0]**6(---(-)---))-[::-60](-[::0])(-[::-120])-[::60](-[::60,.5,,,white]\ominus)-[::-60]CO_2CH_3}};
-\end{Verbatim}
-In line 18 we create the transition state.
-\begin{center}
-\begin{tikzpicture}[scale=.8]
- \small
- \node(e) at (2.5,-8.5) {\chemfig{**6(--(-SO_2-[:30]-[::-60]=_[::60](-[::60])-[::-60])---(-)-)}};
- \node(g) at (10,-8.5) {\chemfig{-[::30](-[::60])=_[::-60]-[::60]CO_2CH_3}};
- \node[left delimiter={[},right delimiter={]}](h) at (6.25,-14.5) {\chemfig{-[::30](-[::60])=^[::-60]-[::60](-[::60]S(=[::90]O)(=[::-90]O)-[::0]**6(---(-)---))-[::-60](-[::0])(-[::-120])-[::60](-[::60,.5,,,white]\ominus)-[::-60]CO_2CH_3}};
-\end{tikzpicture}
-\end{center}
-\begin{Verbatim}[firstnumber=19]
- \node at (5.25,-11) {\ce{NaOCH3}};
- \merge{h}{e}{g}
-\end{Verbatim}
-In lines 19 and 20 both branches are merged with the transition state an the merging arrow gets its reactand argument.
-\begin{center}
-\begin{tikzpicture}[scale=.8]
- \small
- \node(e) at (2.5,-8.5) {\chemfig{**6(--(-SO_2-[:30]-[::-60]=_[::60](-[::60])-[::-60])---(-)-)}};
- \node(g) at (10,-8.5) {\chemfig{-[::30](-[::60])=_[::-60]-[::60]CO_2CH_3}};
- \node[left delimiter={[},right delimiter={]}](h) at (6.25,-14.5) {\chemfig{-[::30](-[::60])=^[::-60]-[::60](-[::60]S(=[::90]O)(=[::-90]O)-[::0]**6(---(-)---))-[::-60](-[::0])(-[::-120])-[::60](-[::60,.5,,,white]\ominus)-[::-60]CO_2CH_3}};
- \node at (5.25,-11) {\ce{NaOCH3}};
- \merge{h}{e}{g}
-\end{tikzpicture}
-\end{center}
-\begin{Verbatim}[firstnumber=21]
- \node(i) at (6.25,-18.5) {};
- \node(j) at (6.25,-21.5) {\chemname{\chemfig{-[::-30](-[::-60])=^[::60]>[::-60](-[::90,1.2])-[::30,1.2](-[::120,1.2](-[::-60])-[::0])<:[::-30]COOH}}{\emph{trans}-chrysanthemum acid}};
- \draw[-stealth,thick] (h.south) -- (i.north);
- \draw[-stealth,thick] (i.south) -- node[left]{KOH} (j.north);
- \end{tikzpicture}
- \caption{synthesis of chrysanthemum acid}
- \end{rxnfloat}
-
-\end{Verbatim}
-In the last lines, 21 -- 28, we create at first an empty node (line 21) and then the product (line 22). In lines 23 and 24 we create the last two reaction arrows. In the last four lines we end the environment.
-\begin{center}
-\begin{tikzpicture}[scale=.8]
- \small
- \node(i) at (6.25,-18.5) {};
- \node(j) at (6.25,-21.5) {\chemname{\chemfig{-[::-30](-[::-60])=^[::60]>[::-60](-[::90,1.2])-[::30,1.2](-[::120,1.2](-[::-60])-[::0])<:[::-30]COOH}}{\emph{trans}-chrysanthemum acid}};
- \draw[-stealth,thick] (h.south) -- (i.north);
- \draw[-stealth,thick] (i.south) -- node[left]{KOH} (j.north);
-\end{tikzpicture}
-\end{center}
+\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 an 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?
+\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?
+
+I tried using real chemical reactions but I didn't make sure, that they all make sense chemically. So you shouldn't trust the examples in respect to chemistry but rather take a look into a real chemistry teaching book.
-I tried using real chemical reactions but I didn't make sure, that they all make sense chemically. So you shouldn't trust the examples in respect to chemistry but rather take a look into a real chemistry teaching book.\\
I apologize for any bad or wrong English. I hope you understood the documention anyway.
Have fun with \mC!
\par\vspace{.5cm}\hspace{.5cm}Clemens Niederberger, Berlin, \mCdate{en}
+
+\section{Thanks}
+I owe thanks for bug reports and suggestions to:
+
+F.\,Chervet, Ferghun, V.\,Garibal.
+
+\printindex
\end{document} \ No newline at end of file
diff --git a/Master/texmf-dist/tex/latex/mychemistry/mychemistry.sty b/Master/texmf-dist/tex/latex/mychemistry/mychemistry.sty
index 07b86991346..cf4ed6a2118 100644
--- a/Master/texmf-dist/tex/latex/mychemistry/mychemistry.sty
+++ b/Master/texmf-dist/tex/latex/mychemistry/mychemistry.sty
@@ -4,7 +4,7 @@
% - Creating reaction schemes with LaTeX and ChemFig ---------------------------------- %
% ------------------------------------------------------------------------------------- %
% - Clemens Niederberger -------------------------------------------------------------- %
-% - 2011/03/27 ------------------------------------------------------------------------ %
+% - 2011/04/15 ------------------------------------------------------------------------ %
% ------------------------------------------------------------------------------------- %
% - http://www.niederberger-berlin.net/2011/02/latex-mychemistry/ --------------------- %
% - kontakt@niederberger-berlin.net --------------------------------------------------- %
@@ -30,6 +30,7 @@
% - mychemistry_en.tex - %
% ------------------------------------------------------------------------------------- %
% - 2011/02/24 version 1.0 - %
+% - first release to CTAN - %
% ------------------------------------------------------------------------------------- %
% - 2011/03/01 version 1.1 - %
% - package option `english' added - %
@@ -59,11 +60,10 @@
% - commands \setrcndist, \setrxnalign, \setschemealign added - %
% - rxn-, rxnscheme-key align added - %
% - 2011/03/26 version 1.2.1 - %
-% - rewriting commands, so they accept second argument without first: - %
+% - rewritten commands, so they accept second argument without first: - %
% - \reactand, \mesomeric, \transition, \branch, \makevisible, \makeinvisible - %
-% - rewritten - %
% - 2011/03/28 version 1.2.2 - %
-% - bugfix with transition resolved - %
+% - bugfix with transition - %
% - atomsize, arrowlength, bondlength and bondshape renamed into set<name> - %
% - and code slightly rewritten - %
% - \mCsetup added - %
@@ -76,14 +76,31 @@
% - 2011/04/04 version 1.3 - %
% - commands \reactand, \mesomeric, \branch, \transition, \chemand (\makeinvisible - %
% - \makeinvisible) rewritten: more flexible with opt. arguments - %
+% - 2011/04/15 version 1.4 - %
+% - minor bugfixes - %
+% - \merge-command rewritten: it now accepts an arrow label and the length is - %
+% - adjustable - %
+% - \dummy mostly obsolete - %
+% - bugfix with aligning rxn & rxnscheme - %
+% - synonym to \reactand=\reactant added - %
+% - rxn & rxnscheme rewritten - %
+% - commands \reactant, \mesomeric, \branch & \transition modified: argument is set - %
+% - with \scantokens{\relax#1}, so the chemfig catcode regime is working properly - %
+% - before () (else possible problem with triple bond ~) - %
+% - syntax of \arrow changed so it fits to the syntax of all the other commands - %
+% - command \anywhere added - %
+% - own arrow tips defined - %
+% - command \setarrowline added - %
+% - new arrow type -+> added - %
% ------------------------------------------------------------------------------------- %
% - TODO - %
-% - make the arrow type {-|>} look nicer - %
% - work on how chemistry-packages are automatically loaded; - %
% - add ui for easy handling this issue? (via \mCsetup ?) - %
% - add rotate=<winkel> for diagonal arrows? - %
-% - option for baseline-alignment of reactands et.al.? - %
+% - option for baseline-alignment of reactants et.al.? - %
% - option for shifting arrows? - %
+% - Hook, damit die Befehle erkennen, ob sie innerhalb Umgebung sind? - %
+% - Pfeil-Typen: <<=>/<=>> hinzufügen - %
% ------------------------------------------------------------------------------------- %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\def\mC@def#1{%
@@ -92,78 +109,77 @@
\fi
\def#1%
}
-\mC@def\mC@version{v1.3}
-\mC@def\mC@date@de{04. April 2011}
-\mC@def\mC@date@en{April 4th 2011}
-\mC@def\mC@Date{2011/04/04}
+\mC@def\mC@version{1.4}
+\mC@def\mC@date@de{15. April 2011}
+\mC@def\mC@date@en{April 15th 2011}
+\mC@def\mC@date{2011/04/15}
\mC@def\mC@name{myChemistry}
-\ProvidesPackage{mychemistry}[\mC@Date\space v\mC@version]
+\ProvidesPackage{mychemistry}[\mC@date\space v\mC@version]
\typeout{}
-\typeout{\mC@name\space \mC@version}
-\typeout{\mC@Date\space Clemens Niederberger}
+\typeout{\mC@name\space v\mC@version}
+\typeout{\mC@date\space Clemens Niederberger}
\typeout{}
-\RequirePackage{ifthen,calc,float}
-\RequirePackage{xkeyval}
+\RequirePackage{ifthen,calc,float,xkeyval}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Optionen, z.T. auch an chemexec weitergeben
-\newcommand{\mC@exec@color}{black}
-\newcommand{\mC@exec@shade}{false}
+\mC@def\mC@exec@color{black}
+\mC@def\mC@exec@shade{false}
\newif\if@usecolor\@usecolorfalse
% wenn key color, dann Farbe und Option shade=true an chemexec weitergeben
\define@key[MC]{mychemistry.sty}%
{color}{
\@usecolortrue
- \renewcommand{\mC@exec@color}{#1}
- \renewcommand{\mC@exec@shade}{true}
+ \def\mC@exec@color{#1}
+ \def\mC@exec@shade{true}
}
% sonst nicht:
\DeclareOptionX[MC]{nocolor}{
\@usecolortrue
- \renewcommand{\mC@exec@color}{black}
- \renewcommand{\mC@exec@shade}{false}
+ \def\mC@exec@color{black}
+ \def\mC@exec@shade{false}
}
% shade separat (de-)aktivieren
\DeclareOptionX[MC]{shade}{%
- \renewcommand{\mC@exec@shade}{true}
+ \def\mC@exec@shade{true}
}
% chemexec abschalten
-\newcommand{\mC@exec@true}{true}
+\mC@def\mC@exec@true{true}
\DeclareOptionX[MC]{nochemexec}{%
- \renewcommand{\mC@exec@true}{false}
+ \def\mC@exec@true{false}
}
% mhchem abschalten
-\newcommand{\mC@mhchem@true}{true}
+\mC@def\mC@mhchem@true{true}
\DeclareOptionX[MC]{nomhchem}{%
- \renewcommand{\mC@mhchem@true}{false}
+ \def\mC@mhchem@true{false}
}
% chemcompounds abschalten
-\newcommand{\mC@compound@true}{true}
+\mC@def\mC@compound@true{true}
\DeclareOptionX[MC]{nocompounds}{%
- \renewcommand{\mC@compound@true}{false}
+ \def\mC@compound@true{false}
}
% chemstyle einschalten
-\newcommand{\mC@chemstyle@true}{false}
+\mC@def\mC@chemstyle@true{false}
\DeclareOptionX[MC]{chemstyle}{%
- \renewcommand{\mC@chemstyle@true}{true}
+ \def\mC@chemstyle@true{true}
}
% nur `chemfig' laden
\DeclareOptionX[MC]{nopackages}{%
- \renewcommand{\mC@exec@true}{false}
- \renewcommand{\mC@mhchem@true}{false}
- \renewcommand{\mC@compound@true}{false}
- \renewcommand{\mC@chemstyle@true}{false}
+ \def\mC@exec@true{false}
+ \def\mC@mhchem@true{false}
+ \def\mC@compound@true{false}
+ \def\mC@chemstyle@true{false}
}
% englische Version von chemexec, englische Variante von myChemistry
-\newcommand{\mC@exec@english}{}
-\newcommand{\mC@rs@name}{Reaktionsschema}
+\mC@def\mC@exec@english{}
+\mC@def\mC@rs@name{Reaktionsschema}
\DeclareOptionX[MC]{english}{
- \renewcommand{\mC@exec@english}{,english}
- \renewcommand{\mC@rs@name}{Reaction scheme}
+ \def\mC@exec@english{,english}
+ \def\mC@rs@name{Reaction scheme}
}
-\newcommand{\mC@rs@placement}{H}
-\newcommand{\mC@rs@currentplacement}{\mC@rs@placement}
+\mC@def\mC@rs@placement{H}
+\mC@def\mC@rs@currentplacement{\mC@rs@placement}
\define@key[MC]{mychemistry.sty}{placement}{
- \renewcommand{\mC@rs@placement}{#1}
+ \def\mC@rs@placement{#1}
}
\ProcessOptionsX[MC]
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -185,7 +201,7 @@
}
}{}
}{
- \PackageWarning{myChemistry: `chemcompounds' is not installed. You shoul use the `nocompounds' option.}
+ \PackageWarning{mychemistry}{`chemcompounds' is not installed. You should use the `nocompounds' option.}
}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% chemfig laden, falls verfügbar
@@ -195,7 +211,7 @@
}
\usetikzlibrary{arrows,positioning,decorations.pathmorphing,shapes,calc,matrix,chains,scopes}
}{% sonst Fehlermeldung
- \PackageError{mychemistry}{`ChemFig' is not installed! `mychemistry' can't work without it!}
+ \PackageError{mychemistry}{`ChemFig' is not installed! `myChemistry' can't work without it!}
}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% chemexec laden, falls verfügbar, falls nicht, dann wenigstens mhchem laden
@@ -209,7 +225,7 @@
}
}{}
}{
- \PackageWarning{myChemistry: `chemexec' ist not installed. You should use the `nochemexec' option.}
+ \PackageWarning{mychemistry}{`chemexec' ist not installed. You should use the `nochemexec' option.}
\IfFileExists{mhchem.sty}{
\ifthenelse{\equal{\mC@mhchem@true}{true}}{
\@ifpackageloaded{mhchem}{}{
@@ -217,7 +233,7 @@
}
}{}
}{
- \PackageWarning{myChemistry: `mhchem' ist not installed. You should use the `nomhchem' option.}
+ \PackageWarning{mychemistry}{`mhchem' ist not installed. You should use the `nomhchem' option.}
}
}
@@ -232,15 +248,19 @@
\IfFileExists{bondwidth.tex}{%
\ifx\CF@ver\mC@CFversion@test\input{bondwidth}\fi
}{}%
+\def\mC@CFversion@test{0.4}
+\IfFileExists{bondwidth.tex}{%
+ \ifx\CF@ver\mC@CFversion@test\input{bondwidth}\fi
+}{}%
% Optional Argument Analysis ---------------------------------------------------------- %
% Prüfen ob #2 in #1 enthalten ist
\mC@def\mC@if@instr#1#2{%
- \def\mC@if@instr@i##1#2##2\@nil{\ifx\@empty##2\@empty\expandafter\@secondoftwo\else\expandafter\@firstoftwo\fi}%
- \mC@if@instr@i#1\@@nil#2\@nil
+ \def\mC@if@instr@i##1#2##2\@nil{\ifx\@empty##2\@empty\expandafter\@secondoftwo\else\expandafter\@firstoftwo\fi}%
+ \mC@if@instr@i#1\@@nil#2\@nil
}
% Am ersten , splitten, #1 in #3 speichern, #2 in \mC@remainargs
\mC@def\mC@splitfirst#1,#2\@nil#3{%
- \def#3{#1}\def\mC@remainargs{#2}%
+ \def#3{#1}\def\mC@remainargs{#2}%
}
% ein durch , in 3 Teile getrenntes Argument splitten
\mC@def\mC@splitarg#1{
@@ -252,49 +272,51 @@
% PFEILE ------------------------------------------------------------------------------ %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% interne Befehle, Voreinstellungen --------------------------------------------------- %
-\newcommand{\mC@arrow@above}{above} % oben
-\newcommand{\mC@arrow@currentabove}{\mC@arrow@above} %
-\newcommand{\mC@arrow@below}{below} % unten
-\newcommand{\mC@arrow@currentbelow}{\mC@arrow@below} %
-\newcommand{\mC@arrow@direction}{right} % Richtung
-\newcommand{\mC@arrow@currentdirection}{\mC@arrow@direction}
-\newcommand{\mC@arrow@currentlength}{\mC@arrow@length}
+\mC@def\mC@arrow@above{above} % oben
+\mC@def\mC@arrow@currentabove{\mC@arrow@above} %
+\mC@def\mC@arrow@below{below} % unten
+\mC@def\mC@arrow@currentbelow{\mC@arrow@below} %
+\mC@def\mC@arrow@direction{right} % Richtung
+\mC@def\mC@arrow@currentdirection{\mC@arrow@direction}
+\mC@def\mC@arrow@currentlength{\mC@arrow@length}
\newlength{\mC@arrow@length@actual}
-\newcommand{\mC@arrow@rotate}{}
-\newcommand{\mC@arrow@argument@angle}{}
-\newcommand{\mC@arrow@argument@shift}{2pt}
-\newcommand{\mC@arrow@argument@anchor}{}
-\newcommand{\mC@arrow@argument@both}{}
-\newcommand{\mC@arrow@above@anchor}{}
-\newcommand{\mC@arrow@below@anchor}{}
-\newcommand{\mC@arrow@type}{->} % Pfeiltyp
-\newcommand{\mC@arrow@currenttype}{\mC@arrow@type} %
-\newcommand{\mC@arrow@start@up}{0,0.05} % Verschiebung für Glgw-Pfeil
-\newcommand{\mC@arrow@start@down}{0,-0.05} %
-\newcommand{\mC@arrow@placement}{on chain=going \mC@arrow@currentdirection} % wohin?
-\newcommand{\mC@arrow@currentplacement}{\mC@arrow@placement}
-\newcommand{\mC@arrow@cross@base@x}{} % Befehle für durchgestrichenen Pfeil
-\newcommand{\mC@arrow@cross@base@y}{} %
-\newcommand{\mC@arrow@cross@angle}{} %
-\newcommand{\mC@arrow@cross@length}{} %
-\newcommand{\mC@arrow@cross@draw}{} %
+\mC@def\mC@arrow@rotate{}
+\mC@def\mC@arrow@argument@angle{}
+\mC@def\mC@arrow@argument@shift{2pt}
+\mC@def\mC@arrow@argument@anchor{}
+\mC@def\mC@arrow@argument@both{}
+\mC@def\mC@arrow@above@anchor{}
+\mC@def\mC@arrow@below@anchor{}
+\mC@def\mC@arrow@type{->} % Pfeiltyp
+\mC@def\mC@arrow@currenttype{\mC@arrow@type} %
+\mC@def\mC@arrow@start@up{0,0.05} % Verschiebung für Glgw-Pfeil
+\mC@def\mC@arrow@start@down{0,-0.05} %
+\mC@def\mC@arrow@placement{on chain=going \mC@arrow@currentdirection} % wohin?
+\mC@def\mC@arrow@currentplacement{\mC@arrow@placement}
+\mC@def\mC@arrow@cross@base@x{} % Befehle für durchgestrichenen Pfeil
+\mC@def\mC@arrow@cross@base@y{} %
+\mC@def\mC@arrow@cross@angle{} %
+\mC@def\mC@arrow@cross@length{} %
+\mC@def\mC@arrow@cross@draw{} %
% Laengenfaktor ----------------------------------------------------------------------- %
-\newcommand{\mC@arrow@length}{1.0} % Längenfaktor
-\newcommand{\mC@arrow@length@factor}{1.0} % Default-Faktor
-\newcommand{\mC@arrow@end}{\mC@arrow@length@actual,0} % Pfeilende
+\mC@def\mC@arrow@length{1.0} % Längenfaktor
+\mC@def\mC@arrow@length@factor{1.0} % Default-Faktor
+\mC@def\mC@arrow@end{\mC@arrow@length@actual,0} % Pfeilende
\define@key{arrow}{length}[\mC@arrow@length]{% %
\renewcommand{\mC@arrow@currentlength}{#1}}% %
\newlength{\mC@arrow@length@default} %
-\setlength{\mC@arrow@length@default}{5em} % Default-Laenge
+\setlength{\mC@arrow@length@default}{5em} %
+\newlength{\mC@arrow@length@value} %
+\setlength{\mC@arrow@length@value}{\mC@arrow@length@default} % Default-Laenge
\mC@def\setarrowlength#1{
\ifx\@empty#1\@empty
- \setlength{\mC@arrow@length@default}{5em}
+ \setlength{\mC@arrow@length@value}{\mC@arrow@length@default}
\else
- \setlength{\mC@arrow@length@default}{#1}
+ \setlength{\mC@arrow@length@value}{#1}
\fi
}
-\let\arrowlength\setarrowlength
+% \let\arrowlength\setarrowlength
% Beschriftungen ---------------------------------------------------------------------- %
\newlength{\mC@arrow@argument@aboveshift} % Verschieben der Beschriftung
@@ -308,8 +330,8 @@
}
% Anker ------------------------------------------------------------------------------- %
-\newcommand{\mC@arrow@name}{} % Anker
-\newcommand{\mC@arrow@currentname}{\mC@arrow@name} %
+\mC@def\mC@arrow@name{} % Anker
+\mC@def\mC@arrow@currentname{\mC@arrow@name} %
\define@key{arrow}{name}[\mC@arrow@name]{% %
\renewcommand{\mC@arrow@currentname}{#1}}% %
@@ -471,29 +493,86 @@
}
}
-% Pfeiltyp ---------------------------------------------------------------------------- %
-\newcommand{\mC@arrow@drawing}{}
+% Pfeildicke -------------------------------------------------------------------------- %
+\mC@def\mC@arrow@linethickness@default{semithick}
+\mC@def\mC@arrow@linethickness{\mC@arrow@linethickness@default}
+\mC@def\setarrowline#1{%
+ \ifx\@empty#1\@empty%
+ \def\mC@arrow@linethickness{\mC@arrow@linethickness@default}%
+ \else%
+ \def\mC@arrow@linethickness{#1}%
+ \fi%
+}
+% eigene Pfeilspitze ------------------------------------------------------------------ %
+\pgfarrowsdeclare{mCtip}{mCtip}%
+{
+\arrowsize=0.2pt
+\advance\arrowsize by .5\pgflinewidth
+\pgfarrowsleftextend{-4\arrowsize-.5\pgflinewidth}
+\pgfarrowsrightextend{.5\pgflinewidth}
+}
+{
+\pgfsetdash{}{0pt} % do not dash
+\pgfsetroundjoin% fix join
+\pgfsetroundcap% fix cap
+\pgfpathmoveto{\pgfpointorigin}
+\pgfpathlineto{\pgfpoint{-3pt}{1pt}}
+\pgfpathlineto{\pgfpoint{-1.5pt}{0pt}}
+\pgfpathlineto{\pgfpoint{-3pt}{-1pt}}
+\pgfpathlineto{\pgfpoint{0pt}{0pt}}
+\pgfusepathqfillstroke
+}
+
+\pgfarrowsdeclare{mChtip}{mChtip}%
+{
+\arrowsize=0.2pt
+\advance\arrowsize by .5\pgflinewidth
+\pgfarrowsleftextend{-4\arrowsize-.5\pgflinewidth}
+\pgfarrowsrightextend{.5\pgflinewidth}
+}
+{
+\pgfsetdash{}{0pt}% do not dash
+\pgfsetroundjoin% fix join
+\pgfsetroundcap% fix cap
+\pgfpathmoveto{\pgfpoint{0pt}{0pt}}
+\pgfpathlineto{\pgfpoint{-3pt}{1pt}}
+\pgfpathlineto{\pgfpoint{-1.5pt}{0pt}}
+\pgfpathlineto{\pgfpoint{0pt}{0pt}}
+\pgfusepathqfillstroke
+}
+% Pfeil zeichnen ---------------------------------------------------------------------- %
+\mC@def\mC@arrow@drawing{}
\define@key{arrow}{type}[\mC@arrow@type]{%
\renewcommand{\mC@arrow@currenttype}{#1}
\ifthenelse{\equal{#1}{->}}{
- \renewcommand{\mC@arrow@drawing}{\draw[->,thick,text height=0] (0,0) -- node[pos=.5](@arrow@center){} ++(\mC@arrow@end);}
+ \let\mC@arrow@plusminus\@empty
+ \renewcommand{\mC@arrow@drawing}{\draw[-mCtip,\mC@arrow@linethickness,text height=0] (0,0) -- node[pos=.5](@arrow@center){} ++(\mC@arrow@end);}
}{
\ifthenelse{\equal{#1}{<->}}{
- \renewcommand{\mC@arrow@drawing}{\draw[<->,thick,text height=0] (0,0) -- node[pos=.5](@arrow@center){} ++(\mC@arrow@end);}
+ \let\mC@arrow@plusminus\@empty
+ \renewcommand{\mC@arrow@drawing}{\draw[mCtip-mCtip,\mC@arrow@linethickness,text height=0] (0,0) -- node[pos=.5](@arrow@center){} ++(\mC@arrow@end);}
}{
\ifthenelse{\equal{#1}{<-}}{
- \renewcommand{\mC@arrow@drawing}{\draw[<-,thick,text height=0] (0,0) -- node[pos=.5](@arrow@center){} ++(\mC@arrow@end);}
+ \let\mC@arrow@plusminus\@empty
+ \renewcommand{\mC@arrow@drawing}{\draw[mCtip-,\mC@arrow@linethickness,text height=0] (0,0) -- node[pos=.5](@arrow@center){} ++(\mC@arrow@end);}
}{
\ifthenelse{\equal{#1}{<=>}}{
- \renewcommand{\mC@arrow@drawing}{\draw[-left to,thick,text height=0] (\mC@arrow@start@up) -- ++(\mC@arrow@end);\draw[left to-,thick,text height=0] (\mC@arrow@start@down) -- ++(\mC@arrow@end);\draw[draw=none] (0,0) -- node[pos=.5](@arrow@center){} ++(\mC@arrow@end);}
+ \let\mC@arrow@plusminus\@empty
+ \renewcommand{\mC@arrow@drawing}{\draw[-mChtip,\mC@arrow@linethickness,text height=0] (\mC@arrow@start@up) -- ++(\mC@arrow@end);\draw[mChtip-,\mC@arrow@linethickness,text height=0] (\mC@arrow@start@down) -- ++(\mC@arrow@end);\draw[draw=none] (0,0) -- node[pos=.5](@arrow@center){} ++(\mC@arrow@end);}
}{
\ifthenelse{\equal{#1}{-|>}}{
- \setlength{\mC@arrow@argument@aboveshift}{.75em}
- \setlength{\mC@arrow@argument@belowshift}{.75em}
- \renewcommand{\mC@arrow@cross@draw}{\draw[thick] ($(@arrow@center.base) + (\mC@arrow@cross@base@x,\mC@arrow@cross@base@y) + (\mC@arrow@cross@angle:\mC@arrow@cross@length)$) -- ($(@arrow@center.base) + (\mC@arrow@cross@base@x,\mC@arrow@cross@base@y) + (\mC@arrow@cross@angle-180:\mC@arrow@cross@length)$);\draw[thick] ($(@arrow@center.base) + (-\mC@arrow@cross@base@x,-\mC@arrow@cross@base@y) + (\mC@arrow@cross@angle:\mC@arrow@cross@length)$) -- ($(@arrow@center.base) + (-\mC@arrow@cross@base@x,-\mC@arrow@cross@base@y) + (\mC@arrow@cross@angle-180:\mC@arrow@cross@length)$);}
- \renewcommand{\mC@arrow@drawing}{\draw[->,thick,text height=0] (0,0) -- node[pos=.5](@arrow@center){} ++(\mC@arrow@end);\mC@arrow@cross@draw}
+ \let\mC@arrow@plusminus\@empty
+ \setlength{\mC@arrow@argument@aboveshift}{.75em}
+ \setlength{\mC@arrow@argument@belowshift}{.75em}
+ \renewcommand{\mC@arrow@cross@draw}{\draw[\mC@arrow@linethickness] ($(@arrow@center.base) + (\mC@arrow@cross@base@x,\mC@arrow@cross@base@y) + (\mC@arrow@cross@angle:\mC@arrow@cross@length)$) -- ($(@arrow@center.base) + (\mC@arrow@cross@base@x,\mC@arrow@cross@base@y) + (\mC@arrow@cross@angle-180:\mC@arrow@cross@length)$);\draw[\mC@arrow@linethickness] ($(@arrow@center.base) + (-\mC@arrow@cross@base@x,-\mC@arrow@cross@base@y) + (\mC@arrow@cross@angle:\mC@arrow@cross@length)$) -- ($(@arrow@center.base) + (-\mC@arrow@cross@base@x,-\mC@arrow@cross@base@y) + (\mC@arrow@cross@angle-180:\mC@arrow@cross@length)$);}
+ \renewcommand{\mC@arrow@drawing}{\draw[-mCtip,\mC@arrow@linethickness,text height=0] (0,0) -- node[pos=.5](@arrow@center){} ++(\mC@arrow@end);\mC@arrow@cross@draw}
}{
- \PackageError{mychemistry}{Unknown arrow type}% oder Fehler
+ \ifthenelse{\equal{#1}{-+>}}{
+ \def\mC@arrow@plusminus{true}
+ \renewcommand{\mC@arrow@drawing}{\draw[-mCtip,\mC@arrow@linethickness,text height=0] (0,0) -- node[pos=.5](@arrow@center){} ++(\mC@arrow@end);}
+ }{
+ \PackageError{mychemistry}{Unknown arrow type}% oder Fehler
+ }
}
}
}
@@ -508,14 +587,14 @@
\newlength{\mC@width@A}
\newlength{\mC@width@B}
\newlength{\mC@arrow@argument@width}
-\newcommand{\mC@savenode}{%
+\mC@def\mC@savenode{%
\global\let\mC@minx=\pgfpositionnodelaterminx%
\global\let\mC@maxx=\pgfpositionnodelatermaxx%
\global\let\mC@miny=\pgfpositionnodelaterminy%
\global\let\mC@maxy=\pgfpositionnodelatermaxy%
}%
% der nächste Befehl benötigt pgf v2.10!
-\newcommand{\mC@largernode}[2]{
+\mC@def\mC@largernode#1#2{
\@ifundefined{pgfpositionnodelater}{
\PackageError{mychemistry}{The command \string\pgfpositionnodelater is undefined. Make sure, you have installed the latest version of pgf.}
}{}
@@ -538,11 +617,11 @@
}
% Pfeil zeichnen ---------------------------------------------------------------------- %
-\newcommand{\mC@arrow}[3][]{
+\mC@def\mC@arrow#1#2{
\renewcommand{\mC@arrow@length@factor}{\mC@arrow@currentlength}
- \setlength{\mC@arrow@length@actual}{\mC@arrow@currentlength\mC@arrow@length@default}
+ \setlength{\mC@arrow@length@actual}{\mC@arrow@currentlength\mC@arrow@length@value}
\ifthenelse{\equal{\mC@arrow@argument@both}{true}}{
- \mC@largernode{#2}{#3}
+ \mC@largernode{#1}{#2}
}{
\setlength{\mC@arrow@argument@width}{0pt}
\setlength{\mC@arrow@argument@height}{0pt}
@@ -552,10 +631,17 @@
}
};
\mC@arrow@argument@anchor
- \draw node[anchor=\mC@arrow@above@anchor,rotate=\mC@arrow@rotate,minimum width=\mC@arrow@argument@width, minimum height=\mC@arrow@argument@height]
- at ($(@arrow@center.base)+(90+\mC@arrow@argument@angle:\mC@arrow@argument@aboveshift)$) {#2};
- \draw node[anchor=\mC@arrow@below@anchor,rotate=\mC@arrow@rotate,minimum width=\mC@arrow@argument@width, minimum height=\mC@arrow@argument@height]
- at ($(@arrow@center.base)+(-90+\mC@arrow@argument@angle:\mC@arrow@argument@belowshift)$) {#3};
+ \ifx\@empty\mC@arrow@plusminus
+ \draw node[anchor=\mC@arrow@above@anchor,rotate=\mC@arrow@rotate,minimum width=\mC@arrow@argument@width, minimum height=\mC@arrow@argument@height]
+ at ($(@arrow@center.base)+(90+\mC@arrow@argument@angle:\mC@arrow@argument@aboveshift)$) {#1};
+ \draw node[anchor=\mC@arrow@below@anchor,rotate=\mC@arrow@rotate,minimum width=\mC@arrow@argument@width, minimum height=\mC@arrow@argument@height]
+ at ($(@arrow@center.base)+(-90+\mC@arrow@argument@angle:\mC@arrow@argument@belowshift)$) {#2};
+ \else
+ \draw (@arrow@center.base) edge[bend left] ++(146.3+\mC@arrow@argument@angle:.361\mC@arrow@length@actual);
+ \node[anchor=\mC@arrow@above@anchor,inner sep=.1em] at ($(@arrow@center.base)+(146.3+\mC@arrow@argument@angle:.361\mC@arrow@length@actual)$) {#1};
+ \draw (@arrow@center.base) edge[bend right,-mCtip] ++(33.7+\mC@arrow@argument@angle:.361\mC@arrow@length@actual);
+ \node[anchor=\mC@arrow@above@anchor,inner sep=.1em] at ($(@arrow@center.base)+(33.7+\mC@arrow@argument@angle:.361\mC@arrow@length@actual)$) {#2};
+ \fi
\setlength{\mC@arrow@argument@aboveshift}{2pt}
\setlength{\mC@arrow@argument@belowshift}{2pt}
}
@@ -567,75 +653,116 @@
{}
% Eigentlicher Befehl:
-\providecommand{\arrow}[3][]{
- \setkeys{arrow}{#1}
- \mC@arrow{#2}{#3}
+\mC@def\arrow{\@ifnextchar[{\mC@arrow@i}{\setkeys{arrow}{}\mC@arrow}}
+\mC@def\mC@arrow@i[#1]{% [<direction>,<type>,<length>,<name>,both]
+ \let\mC@remainargs\@empty\mC@splitarg{#1}%
+ \ifx\@empty\mC@firstarg% erste Option: direction
+ \def\mC@arrow@key@direction{right}%
+ \else%
+ \let\mC@arrow@key@direction\mC@firstarg%
+ \fi%
+ \ifx\@empty\mC@secondarg% zweite Option: type
+ \def\mC@arrow@key@type{->}%
+ \else%
+ \let\mC@arrow@key@type\mC@secondarg%
+ \fi%
+ \let\mC@remainargs\@empty%
+ \expandafter\mC@splitarg\expandafter{\mC@thirdarg}%
+ \ifx\@empty\mC@firstarg% dritte Option: length
+ \def\mC@arrow@key@length{1.0}%
+ \else%
+ \let\mC@arrow@key@length\mC@firstarg%
+ \fi%
+ \ifx\@empty\mC@secondarg% vierte Option: name
+ \let\mC@arrow@key@name\@empty%
+ \else%
+ \def\mC@arrow@key@name{\mC@secondarg}%
+ \fi%
+ \ifx\@empty\mC@thirdarg% fünfte Option: both
+ \let\mC@arrow@key@both\@empty%
+ \else%
+ \let\mC@arrow@key@both\mC@thirdarg%
+ \fi%
+ \setkeys{arrow}{direction=\mC@arrow@key@direction,type={\mC@arrow@key@type},length={\mC@arrow@key@length},name=\mC@arrow@key@name,\mC@arrow@key@both}\mC@arrow%
}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% MERGE ------------------------------------------------------------------------------- %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\newcommand{\mC@merge@direction}{below}
-\newcommand{\mC@merge@to}{}
-\newcommand{\mC@merge@from@one}{}
-\newcommand{\mC@merge@from@two}{}
-\newcommand{\mC@merge}[3]{
- \renewcommand{\mC@merge@to}{#1}
- \renewcommand{\mC@merge@from@one}{#2}
- \renewcommand{\mC@merge@from@two}{#3}
-}
+\mC@def\mC@merge@length@default{3em}
+\mC@def\mC@merge@length@value{\mC@merge@length@default}
% Basisbefehle ------------------------------------------------------------------------ %
-\newcommand{\mC@merge@right}{
- \draw[stealth-,thick] ($(\mC@merge@to.west)+(-1em,0)$) -- ($(\mC@merge@to.west)+(-4em,0)$) node(crossing) {};
- \draw[thick] ($(\mC@merge@from@one.east)+(1em,0)$) -| (crossing.base);
- \draw[thick] ($(\mC@merge@from@two.east)+(1em,0)$) -| (crossing.base);
-}
-\newcommand{\mC@merge@above}{
- \draw[stealth-,thick] ($(\mC@merge@to.south)+(0,-1em)$) -- ($(\mC@merge@to.south)+(0,-4em)$) node(crossing) {};
- \draw[thick] (crossing.base) -| ($(\mC@merge@from@one.north)+(0,1em)$);
- \draw[thick] (crossing.base) -| ($(\mC@merge@from@two.north)+(0,1em)$);
-}
-\newcommand{\mC@merge@left}{
- \draw[stealth-,thick] ($(\mC@merge@to.east)+(1em,0)$) -- ($(\mC@merge@to.east)+(4em,0)$) node(crossing) {};
- \draw[thick] ($(\mC@merge@from@one.west)+(-1em,0)$) -| (crossing.base);
- \draw[thick] ($(\mC@merge@from@two.west)+(-1em,0)$) -| (crossing.base);;
-}
-\newcommand{\mC@merge@below}[3]{
- \draw[stealth-,thick] ($(\mC@merge@to.north)+(0,1em)$) -- ($(\mC@merge@to.north)+(0,4em)$) node(crossing) {};
- \draw[thick] (crossing.base) -| ($(\mC@merge@from@one.south)+(0,-1em)$);
- \draw[thick] (crossing.base) -| ($(\mC@merge@from@two.south)+(0,-1em)$);
-}
-% key zur Auswahl --------------------------------------------------------------------- %
-\define@choicekey{merge}{direction}[\val\nr]{right,above,left,below}[below]{
- \ifcase\nr\relax
- \mC@merge@right
- \or
- \mC@merge@above
- \or
- \mC@merge@left
- \or
+\mC@def\mC@merge@right{
+ \draw[mCtip-,\mC@arrow@linethickness] ($(\mC@merge@to.west)+(-\mC@rxn@node@distance,0)$) --node[midway,above,yshift=.1em]{\mC@merge@arg} ++(-\mC@merge@length,0) node(crossing) {};
+ \draw[thick] ($(\mC@merge@from@one.east)+(\mC@rxn@node@distance,0)$) -| (crossing.base);
+ \draw[thick] ($(\mC@merge@from@two.east)+(\mC@rxn@node@distance,0)$) -| (crossing.base);
+}
+\mC@def\mC@merge@above{
+ \draw[mCtip-,\mC@arrow@linethickness] ($(\mC@merge@to.south)+(0,-\mC@rxn@node@distance)$) --node[midway,right,xshift=.1em]{\mC@merge@arg} ++(0,-\mC@merge@length) node(crossing) {};
+ \draw[thick] (crossing.base) -| ($(\mC@merge@from@one.north)+(0,\mC@rxn@node@distance)$);
+ \draw[thick] (crossing.base) -| ($(\mC@merge@from@two.north)+(0,\mC@rxn@node@distance)$);
+}
+\mC@def\mC@merge@left{
+ \draw[mCtip-,\mC@arrow@linethickness] ($(\mC@merge@to.east)+(\mC@rxn@node@distance,0)$) --node[midway,above,yshift=.1em]{\mC@merge@arg} ++(\mC@merge@length,0) node(crossing) {};
+ \draw[thick] ($(\mC@merge@from@one.west)+(-\mC@rxn@node@distance,0)$) -| (crossing.base);
+ \draw[thick] ($(\mC@merge@from@two.west)+(-\mC@rxn@node@distance,0)$) -| (crossing.base);
+}
+\mC@def\mC@merge@below{
+ \draw[mCtip-,\mC@arrow@linethickness] ($(\mC@merge@to.north)+(0,\mC@rxn@node@distance)$) --node[midway,right,xshift=.1em]{\mC@merge@arg} ++(0,\mC@merge@length) node(crossing) {};
+ \draw[thick] (crossing.base) -| ($(\mC@merge@from@one.south)+(0,-\mC@rxn@node@distance)$);
+ \draw[thick] (crossing.base) -| ($(\mC@merge@from@two.south)+(0,-\mC@rxn@node@distance)$);
+}
+% eigentlicher Befehl ----------------------------------------------------------------- %
+\mC@def\mC@merge{\@ifnextchar[{\mC@merge@ii}{\mC@merge@i}}
+\mC@def\mC@merge@i#1#2#3{
+ \def\mC@merge@length{\mC@merge@length@value}
+ \let\mC@merge@arg\@empty
+ \def\mC@merge@to{#1}
+ \def\mC@merge@from@one{#2}
+ \def\mC@merge@from@two{#3}
+ \mC@merge@below
+}
+\mC@def\mC@merge@ii[#1]#2#3#4{
+ \let\mC@remainargs\@empty\mC@splitarg{#1}
+ \ifx\mC@firstarg\@empty
+ \let\mC@merge@arg\@empty
+ \else
+ \let\mC@merge@arg\mC@firstarg
+ \fi
+ \ifx\mC@thirdarg\@empty
+ \def\mC@merge@length{\mC@merge@length@value}
+ \else
+ \def\mC@merge@length{\mC@thirdarg}
+ \fi
+ \def\mC@merge@to{#2}
+ \def\mC@merge@from@one{#3}
+ \def\mC@merge@from@two{#4}
+ \ifx\mC@secondarg\@empty
\mC@merge@below
+ \else
+ \expandafter\csname mC@merge@\mC@secondarg\endcsname
\fi
}
-% Voreinstellung ---------------------------------------------------------------------- %
-\presetkeys%
- {merge}
- {direction=below}
- {}
-% eigentlicher Befehl ----------------------------------------------------------------- %
-\newcommand{\merge}[4][]{
- \mC@merge{#2}{#3}{#4}
- \setkeys{merge}{#1}
+\mC@def\merge{\mC@merge}
+
+\mC@def\setmergelength#1{
+ \ifx\@empty#1\@empty
+ \def\mC@merge@length@value{\mC@merge@length@default}
+ \else
+ \def\mC@merge@length@value{#1}
+ \fi
}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% REAKTIONSSCHEMA --------------------------------------------------------------------- %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\newlength{\mC@rxn@node@distance@default}
+\setlength{\mC@rxn@node@distance@default}{1em}
\newlength{\mC@rxn@node@distance}
-\setlength{\mC@rxn@node@distance}{1em}
+\setlength{\mC@rxn@node@distance}{\mC@rxn@node@distance@default}
\mC@def\setrcndist#1{%
\ifx\@empty#1\@empty%
- \setlength{\mC@rxn@node@distance}{1em}%
+ \setlength{\mC@rxn@node@distance}{\mC@rxn@node@distance@default}%
\else%
\setlength{\mC@rxn@node@distance}{#1}%
\fi%
@@ -643,104 +770,135 @@
% ------------------------------------------------------------------------------------- %
% Schema ------------------------------------------------------------------------------ %
% ------------------------------------------------------------------------------------- %
-\newcommand{\mC@rs@scale}{1.0} % Default-Skalierung
-\newcommand{\mC@rs@currentscale}{\mC@rs@scale} %
-\providecommand{\setschemename}[1]{\renewcommand{\mC@rs@name}{#1}}
-\newcommand{\mC@rs@caption}{} % Beschriftung
-\newcommand{\mC@rs@label}{} % Label
-\newcommand{\mC@rs@currentlabel}{\mC@rs@label} %
-\define@key{rxnscheme}{label}{% %
- \ifthenelse{\equal{#1}{}}{}{ %
- \renewcommand{\mC@rs@currentlabel}{#1} %
- } %
-} %
-\define@key{rxnscheme}{scale}[1.0]{ % Skalierung
- \renewcommand{\mC@rs@currentscale}{#1} %
-} %
-\define@key{rxnscheme}{name}{ % Name
- \renewcommand{\mC@rs@name}{#1} %
-} %
-\define@key{rxnscheme}{placement}{ % Float-Platzierung
- \renewcommand{\mC@rs@currentplacement}{#1} %
-} %
-\newcommand{\mC@rs@align}{center} %
-\newcommand{\mC@rs@right}{right} %
-\newcommand{\mC@rs@center}{center} %
-\newcommand{\mC@rs@left}{left} %
+\mC@def\mC@rs@scale{1.0} % Default-Skalierung
+\mC@def\mC@rs@currentscale{\mC@rs@scale} %
+\mC@def\setschemename#1{\def\mC@rs@name{#1}} %
+\mC@def\mC@rs@caption{} % Beschriftung
+\mC@def\mC@rs@label{} % Label
+\mC@def\mC@rs@currentlabel{\mC@rs@label} %
+\mC@def\mC@rs@align{center} %
+\mC@def\mC@rs@right{right} %
+\mC@def\mC@rs@center{center} %
+\mC@def\mC@rs@left{left} %
\mC@def\setschemealign#1{% %
- \ifx\@empty#1\@empty %
- \renewcommand{\mC@rs@align}{center} %
- \else %
- \renewcommand{\mC@rs@align}{#1} %
- \fi %
+ \ifx\@empty#1\@empty% %
+ \def\mC@rs@align{center}% %
+ \else% %
+ \def\mC@rs@align{#1}% %
+ \fi% %
} %
-\define@key{rxnscheme}{align}{ % Alignment
- \renewcommand{\mC@rs@align}{#1}
-}
% Gleitumgebung
\floatstyle{ruled}
\newfloat{rxnfloat}{\mC@rs@currentplacement}{rxnscheme}
\floatname{rxnfloat}{\mC@rs@name} % Name ändern
% eigentliche Umgebung:
-\newenvironment{rxnscheme}[2][]{%
- \setkeys{rxnscheme}{#1}
- \renewcommand\mC@rs@caption{#2}
- \begin{rxnfloat}
- %\centering
- \ifx\mC@rs@align\mC@rs@center \centering \fi
- \ifx\mC@rs@align\mC@rs@left \raggedright \fi
- \ifx\mC@rs@align\mC@rs@right \raggedleft \fi
- \mC@atomsize\mC@bondlength\mC@bondshape
- \begin{tikzpicture}[every picture/.style={scale=\mC@rs@currentscale},start chain,node distance=\mC@rxn@node@distance,inner sep=0pt,outer sep=0pt]
-}{%
- \end{tikzpicture}%
- \caption{\mC@rs@caption}
- \ifthenelse{\equal{\mC@rs@currentlabel}{}}{}{\label{\mC@rs@currentlabel}}
- \end{rxnfloat}
+\mC@def\mC@rxnscheme{\@ifnextchar[{\mC@rxnscheme@ii}{\let\mC@rs@currentlabel\@empty\mC@rxnscheme@i}}
+\mC@def\mC@rxnscheme@ii[#1]{% [<label>,<placement>,<align>,<scale>,<name>]
+ \let\mC@remainargs\@empty\mC@splitarg{#1}%
+ \ifx\@empty\mC@firstarg% erste Option
+ \let\mC@rs@currentlabel\@empty%
+ \else%
+ \let\mC@rs@currentlabel\mC@firstarg%
+ \fi%
+ \ifx\@empty\mC@secondarg% zweite Option
+ \let\mC@rs@currentplacement\mC@rs@placement%
+ \else%
+ \let\mC@rs@currentplacement\mC@secondarg%
+ \fi%
+ \let\mC@remainargs\@empty%
+ \expandafter\mC@splitarg\expandafter{\mC@thirdarg}%
+ \ifx\@empty\mC@firstarg% dritte Option
+ \def\mC@rs@align{center}%
+ \else%
+ \let\mC@rs@align\mC@firstarg%
+ \fi%
+ \ifx\@empty\mC@secondarg% vierte Option
+ \def\mC@rs@currentscale{1}%
+ \else%
+ \let\mC@rs@currentscale\mC@secondarg%
+ \fi%
+ \ifx\@empty\mC@thirdarg\else% fünfte Option
+ \let\mC@rs@name\mC@thirdarg%
+ \fi%
+ \mC@rxnscheme@i%
+}
+\mC@def\mC@rxnscheme@i#1{%
+ \def\mC@rs@caption{#1}%
+ \rxnfloat%
+ \ifx\mC@rs@align\mC@rs@center \centering \fi%
+ \ifx\mC@rs@align\mC@rs@left \raggedright \fi%
+ \ifx\mC@rs@align\mC@rs@right \raggedleft \fi%
+ \mC@atomsize\mC@bondlength\mC@bondshape%
+ \tikzpicture[every picture/.style={scale=\mC@rs@currentscale},start chain,node distance=\mC@rxn@node@distance,inner sep=0pt,outer sep=0pt]%
+ \mC@dummy@ii%
+}
+\mC@def\rxnscheme{\mC@rxnscheme}
+\mC@def\endrxnscheme{%
+ \endtikzpicture%
+ \caption{\mC@rs@caption}%
+ \ifx\@empty\mC@rs@currentlabel\else%
+ \label{\mC@rs@currentlabel}%
+ \fi
+ \endrxnfloat%
}
% ------------------------------------------------------------------------------------- %
% einfache Reaktion ------------------------------------------------------------------- %
% ------------------------------------------------------------------------------------- %
-\newcommand{\mC@reaction@scale}{1.0}
-\newcommand{\mC@reaction@align}{center}
+\mC@def\mC@reaction@scale{1.0}
+\mC@def\mC@reaction@align{center}
\mC@def\setrxnalign#1{
\ifx\@empty#1\@empty
- \renewcommand{\mC@reaction@align}{center}
+ \def\mC@reaction@align{center}
\else
- \renewcommand{\mC@reaction@align}{#1}
+ \def\mC@reaction@align{#1}
\fi
}
-\newcommand{\mC@reaction@right}{right}
-\newcommand{\mC@reaction@center}{center}
-\newcommand{\mC@reaction@left}{left}
-\define@key{rxn}{scale}{
- \renewcommand{\mC@reaction@scale}{#1}}
-\define@key{rxn}{align}{
- \renewcommand{\mC@reaction@align}{#1}}
-\newenvironment{rxn}[1][]{%
- \setkeys{rxn}{#1}
- \ifx\mC@reaction@align\mC@reaction@center
- \begin{center}
- \fi
- \ifx\mC@reaction@align\mC@reaction@left
- \begin{flushleft}
- \fi
- \ifx\mC@reaction@align\mC@reaction@right
- \begin{flushright}
- \fi
- \mC@bondlength\mC@bondshape\mC@atomsize
- \begin{tikzpicture}[every picture/.style={scale=\mC@reaction@scale},start chain,node distance=\mC@rxn@node@distance,inner sep=0pt,outer sep=0pt]
-}{%
- \end{tikzpicture}%
- \ifx\mC@reaction@align\mC@reaction@center
- \end{center}
- \fi
- \ifx\mC@reaction@align\mC@reaction@left
- \end{flushleft}
- \fi
- \ifx\mC@reaction@align\mC@reaction@right
- \end{flushright}
+\mC@def\mC@reaction@right{right}
+\mC@def\mC@reaction@center{center}
+\mC@def\mC@reaction@left{left}
+
+\mC@def\mC@rxn{\@ifnextchar[{\mC@rxn@ii}{\mC@rxn@i}}
+\mC@def\mC@rxn@ii[#1]{%
+ \let\mC@remainargs\@empty\mC@splitarg{#1}%
+ \ifx\@empty\mC@firstarg%
+ \let\mC@reaction@align\mC@reaction@center%
+ \else%
+ \let\mC@reaction@align\mC@firstarg%
+ \fi%
+ \ifx\@empty\mC@secondarg%
+ \def\mC@reaction@scale{1}%
+ \else%
+ \let\mC@reaction@scale\mC@secondarg%
+ \fi%
+ \mC@rxn@i
+}
+\mC@def\mC@rxn@i{%
+ \hspace*{0pt}%
+ \ifx\mC@reaction@align\mC@reaction@center%
+ \center%
+ \fi%
+ \ifx\mC@reaction@align\mC@reaction@left%
+ \flushleft%
+ \fi%
+ \ifx\mC@reaction@align\mC@reaction@right%
+ \flushright%
+ \fi%
+ \mC@bondlength\mC@bondshape\mC@atomsize%
+ \tikzpicture[every picture/.style={scale=\mC@reaction@scale},start chain,node distance=\mC@rxn@node@distance,inner sep=0pt,outer sep=0pt]%
+ \mC@dummy@ii%
+}
+\mC@def\rxn{\mC@rxn}
+\mC@def\endrxn{%
+ \endtikzpicture%
+ \ifx\mC@reaction@align\mC@reaction@center%
+ \endcenter%
+ \fi%
+ \ifx\mC@reaction@align\mC@reaction@left%
+ \endflushleft%
+ \fi%
+ \ifx\mC@reaction@align\mC@reaction@right%
+ \endflushright%
\fi
}
@@ -748,15 +906,16 @@
% REAKTANDEN -------------------------------------------------------------------------- %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Standardreaktand -------------------------------------------------------------------- %
-\mC@def\mC@reactand{\@ifnextchar[{\mC@reactand@ii}{\mC@reactand@i}}
-\mC@def\mC@reactand@i#1{\def\mC@firstarg{on chain=going right}\let\mC@secondarg\@empty\let\mC@thirdarg\@empty\mC@reactand@iii{#1}}
-\mC@def\mC@reactand@ii[#1]#2{
+\mC@def\mC@reactant{\@ifnextchar[{\mC@reactant@ii}{\mC@reactant@i}}
+\mC@def\mC@reactant@i#1{\def\mC@firstarg{on chain=going right}\let\mC@secondarg\@empty\let\mC@thirdarg\@empty\mC@reactant@iii{#1}}
+\mC@def\mC@reactant@ii[#1]#2{
\let\mC@remainargs\@empty\mC@splitarg{#1}
- \ifx\mC@firstarg\@empty\def\mC@reactand@alignment{right}\else\let\mC@reactand@alignment\mC@firstarg\fi
- \def\mC@firstarg{on chain=going \mC@reactand@alignment}
- \mC@reactand@iii{#2}}
-\mC@def\mC@reactand@iii#1{\expandafter\expandafter\expandafter\node\expandafter\expandafter\expandafter[\expandafter\mC@firstarg\expandafter,\mC@thirdarg](\mC@secondarg){#1};}
-\mC@def\reactand{\mC@reactand}
+ \ifx\mC@firstarg\@empty\def\mC@reactant@alignment{right}\else\let\mC@reactant@alignment\mC@firstarg\fi
+ \def\mC@firstarg{on chain=going \mC@reactant@alignment}
+ \mC@reactant@iii{#2}}
+\mC@def\mC@reactant@iii#1{\expandafter\expandafter\expandafter\node\expandafter\expandafter\expandafter[\expandafter\mC@firstarg\expandafter,\mC@thirdarg](\mC@secondarg){\scantokens{\relax#1}};}% scantokens nötig, da sonst eine Dreifanchbindung ~ vor () mit falschem catcode interpretiert wird
+\mC@def\reactand{\mC@reactant}% old command
+\mC@def\reactant{\mC@reactant}% new correctly spelled command
% Mesomerie --------------------------------------------------------------------------- %
\mC@def\mC@mesomeric{\@ifnextchar[{\mC@mesomeric@ii}{\mC@mesomeric@i}}
@@ -766,12 +925,24 @@
\ifx\mC@firstarg\@empty\def\mC@mesomeric@alignment{right}\else\let\mC@mesomeric@alignment\mC@firstarg\fi
\def\mC@firstarg{on chain=going \mC@mesomeric@alignment}
\mC@mesomeric@iii{#2}}
-\mC@def\mC@mesomeric@iii#1{\expandafter\expandafter\expandafter\node\expandafter\expandafter\expandafter[\expandafter\mC@firstarg\expandafter,\mC@thirdarg,inner sep=1pt,left delimiter={[},right delimiter={]}](\mC@secondarg){\tikzpicture[start branch]#1\endtikzpicture};}
+\mC@def\mC@mesomeric@iii#1{\expandafter\expandafter\expandafter\node\expandafter\expandafter\expandafter[\expandafter\mC@firstarg\expandafter,\mC@thirdarg,inner sep=1pt,left delimiter={[},right delimiter={]}](\mC@secondarg){\tikzpicture[start branch]\scantokens{\relax#1}\endtikzpicture};}% scantokens nötig, da sonst eine Dreifanchbindung ~ vor () mit falschem catcode interpretiert wird
\mC@def\mesomeric{\mC@mesomeric}
-\providecommand{\marrow}[1][right]{\arrow[type=<->,length=.5,direction=#1]{}{}}
+% Mesomerie-Pfeil --------------------------------------------------------------------- %
+\mC@def\marrow{\@ifnextchar[{\mC@marrow@i}{\mC@marrow@ii}}
+\mC@def\mC@marrow@i[#1]{\arrow[#1,<->,.5]{}{}}
+\mC@def\mC@marrow@ii{\arrow[,<->,.5]{}{}}
+
+% Anywhere ---------------------------------------------------------------------------- %
+\mC@def\mC@anywhere{\@ifnextchar[{\mC@anywhere@ii}{\mC@anywhere@i}}
+\mC@def\mC@anywhere@ii[#1]#2#3{\node[#2](#1){#3};}
+\mC@def\mC@anywhere@i#1#2{\node[#1]{#2};}
+\mC@def\anywhere{\mC@anywhere}
+
% Dummy ------------------------------------------------------------------------------- %
-\providecommand{\dummy}[1][]{\draw node[on chain,xshift=-\mC@rxn@node@distance](#1) {};}
+\mC@def\dummy{\@ifnextchar[{\mC@dummy@i}{\mC@dummy@ii}}
+\mC@def\mC@dummy@i[#1]{\draw node[on chain,xshift=-\mC@rxn@node@distance](#1){};}
+\mC@def\mC@dummy@ii{\draw node[on chain,xshift=-\mC@rxn@node@distance]{};}
% Uebergangszustand ------------------------------------------------------------------- %
\mC@def\mC@transition@name{x}
@@ -783,31 +954,36 @@
\def\mC@firstarg{on chain=going \mC@transition@alignment}
\ifx\mC@secondarg\@empty\let\mC@secondarg\mC@transition@name\fi
\mC@transition@iii{#2}}
-\mC@def\mC@transition@iii#1{\expandafter\expandafter\expandafter\node\expandafter\expandafter\expandafter[\expandafter\mC@firstarg\expandafter,\mC@thirdarg,inner sep=1pt,left delimiter={[},right delimiter={]}](\mC@secondarg){#1} node at ($(\mC@secondarg.north east)+(.25,0)$) {$\ddagger$};}
+\mC@def\mC@transition@iii#1{\expandafter\expandafter\expandafter\node\expandafter\expandafter\expandafter[\expandafter\mC@firstarg\expandafter,\mC@thirdarg,inner sep=1pt,left delimiter={[},right delimiter={]}](\mC@secondarg){\scantokens{\relax#1}} node[above right=of \mC@secondarg,xshift=-.2em,yshift=-1.2em] {$\ddagger$};}% scantokens nötig, da sonst eine Dreifanchbindung ~ vor () mit falschem catcode interpretiert wird
\mC@def\transition{\mC@transition}
% Abzweigung -------------------------------------------------------------------------- %
\mC@def\mC@branch{\@ifnextchar[{\mC@branch@ii}{\mC@branch@i}}
\mC@def\mC@branch@i#1{\def\mC@firstarg{on chain=going right}\let\mC@secondarg\@empty\let\mC@thirdarg\@empty\mC@branch@iii{#1}}
\mC@def\mC@branch@ii[#1]#2{\let\mC@remainargs\@empty\mC@splitarg{#1}\ifx\mC@firstarg\@empty\def\mC@firstarg{on chain=going right}\fi\mC@branch@iii{#2}}
-\mC@def\mC@branch@iii#1{\expandafter\expandafter\expandafter\node\expandafter\expandafter\expandafter[\expandafter\mC@firstarg\expandafter,\mC@thirdarg](\mC@secondarg){\tikzpicture[start branch]#1\endtikzpicture};}
+\mC@def\mC@branch@iii#1{\expandafter\expandafter\expandafter\node\expandafter\expandafter\expandafter[\expandafter\mC@firstarg\expandafter,\mC@thirdarg](\mC@secondarg){\tikzpicture[start branch]\scantokens{\relax#1}\endtikzpicture};}% scantokens nötig, da sonst eine Dreifanchbindung ~ vor () mit falschem catcode interpretiert wird
\mC@def\branch{\mC@branch}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Sonstiges --------------------------------------------------------------------------- %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Elektronenverschiebungspfeile ------------------------------------------------------- %
-\providecommand{\elmove}[5][->,red,shorten <=3pt,shorten >=1pt]{\chemmove{\draw[#1](#2).. controls +(#3) and +(#5)..(#4);}}
+\mC@def\elmove{\@ifnextchar[{\mC@elmove@i}{\mC@elmove@ii}}
+\mC@def\mC@elmove@i[#1]#2#3#4#5{\chemmove{\draw[#1](#2).. controls +(#3) and +(#5)..(#4);}}
+\mC@def\mC@elmove@ii#1#2#3#4{\chemmove{\draw[->,red,shorten <=3pt,shorten >=1pt](#1).. controls +(#2) and +(#4)..(#3);}}
+
% Bindungslänge ----------------------------------------------------------------------- %
-\newcommand{\mC@bondlength}{\setatomsep{1.8em}}
+\mC@def\mC@bondlength@default{1.8em}
+\mC@def\mC@bondlength{\setatomsep{\mC@bondlength@default}}
\mC@def\setbondlength#1{
\ifx\@empty#1\@empty
- \renewcommand{\mC@bondlength}{\setatomsep{1.8em}}
+ \def\mC@bondlength{\setatomsep{\mC@bondlength@default}}
\else
- \renewcommand{\mC@bondlength}{\setatomsep{#1}}
+ \def\mC@bondlength{\setatomsep{#1}}
\fi
}
-\let\bondlength\setbondlength
+% \let\bondlength\setbondlength
+
% Keilbindungen ----------------------------------------------------------------------- %
\mC@def\mC@bondshape@one{3pt}
\mC@def\mC@bondshape@two{.5pt}
@@ -829,18 +1005,21 @@
\renewcommand{\mC@bondshape@three}{#3}
\fi
}
-\let\bondshape\setbondshape
+% \let\bondshape\setbondshape
\mC@def\mC@bondshape{\setcrambond{\mC@bondshape@one}{\mC@bondshape@two}{\mC@bondshape@three}}
+
% Atomgröße --------------------------------------------------------------------------- %
-\mC@def\mC@atomsize{\small}
+\mC@def\mC@atomsize@default{\small}
+\mC@def\mC@atomsize{\mC@atomsize@default}
\mC@def\setatomsize#1{
\ifx\@empty#1\@empty
- \renewcommand{\mC@atomsize}{\small}
+ \renewcommand{\mC@atomsize}{\mC@atomsize@default}
\else
\renewcommand{\mC@atomsize}{#1}
\fi
}
-\let\atomsize\setatomsize
+% \let\atomsize\setatomsize
+
% Plus -------------------------------------------------------------------------------- %
\mC@def\mC@chemand{\@ifnextchar[{\mC@chemand@ii}{\mC@chemand@i}}
\mC@def\mC@chemand@i{\def\mC@firstarg{on chain=going right}\let\mC@secondarg\@empty\let\mC@thirdarg\@empty\mC@chemand@iii}
@@ -851,17 +1030,20 @@
\mC@chemand@iii}
\mC@def\mC@chemand@iii{\expandafter\expandafter\expandafter\node\expandafter\expandafter\expandafter[\expandafter\mC@firstarg\expandafter,\mC@thirdarg](\mC@secondarg){\chemsign[0pt]{+}};}
\mC@def\chemand{\mC@chemand}
+
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Setup myChemistry ------------------------------------------------------------------- %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\mC@def\mCsetup#1{\setkeys{setup}{#1}}
-\define@key{setup}{arrowlength}[5em]{%
+\define@key{setup}{arrowlength}[\mC@arrow@length@default]{%
\setarrowlength{#1}}
-\define@key{setup}{atomsize}[\small]{%
+\define@key{setup}{arrowline}[\mC@arrow@linethickness@default]{%
+ \setarrowline{#1}}
+\define@key{setup}{atomsize}[\mC@atomsize@default]{%
\setatomsize{#1}}
-\define@key{setup}{bondlength}[1.8em]{%
+\define@key{setup}{bondlength}[\mC@bondlength@default]{%
\setbondlength{#1}}
-\define@key{setup}{rcndist}[1em]{%
+\define@key{setup}{rcndist}[\mC@rxn@node@distance@default]{%
\setrcndist{#1}}
\define@key{setup}{rxnalign}[center]{%
\setrxnalign{#1}}
@@ -870,25 +1052,30 @@
\define@key{setup}{align}[center]{%
\setrxnalign{#1}
\setschemealign{#1}}
+\define@key{setup}{mergelength}[\mC@merge@length@default]{
+ \setmergelength{#1}}
\define@key{setup}{reset}[]{%
\setarrowlength{}
+ \setarrowline{}
+ \setmergelength{}
\setatomsize{}
\setbondlength{}
\setbondshape{}{}{}
\setrcndist{}
\setrxnalign{}
- \setschemealign{}}
+ \setschemealign{}
+ }
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% NODES SICHTBAR/UNSICHTBAR MACHEN ---------------------------------------------------- %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\newcommand\makevisible{
- \def\mC@reactand@iii##1{\expandafter\expandafter\expandafter\node\expandafter\expandafter\expandafter[\expandafter\mC@firstarg\expandafter,\mC@thirdarg,draw=red!60,solid](\mC@secondarg){##1};}
- \def\mC@branch@iii##1{\expandafter\expandafter\expandafter\node\expandafter\expandafter\expandafter[\expandafter\mC@firstarg\expandafter,\mC@thirdarg,draw=purple,dotted](\mC@secondarg){\tikzpicture[start branch]##1\endtikzpicture};}
- \def\mC@transition@iii##1{\expandafter\expandafter\expandafter\node\expandafter\expandafter\expandafter[\expandafter\mC@firstarg\expandafter,\mC@thirdarg,inner sep=1pt,left delimiter={[},right delimiter={]},draw=red!60,solid](\mC@secondarg){##1} node at ($(\mC@secondarg.north east)+(.25,0)$) {$\ddagger$};}
+ \def\mC@reactant@iii##1{\expandafter\expandafter\expandafter\node\expandafter\expandafter\expandafter[\expandafter\mC@firstarg\expandafter,\mC@thirdarg,draw=red!60,solid](\mC@secondarg){\scantokens{\relax##1}};}
+ \def\mC@branch@iii##1{\expandafter\expandafter\expandafter\node\expandafter\expandafter\expandafter[\expandafter\mC@firstarg\expandafter,\mC@thirdarg,draw=purple,dotted](\mC@secondarg){\tikzpicture[start branch]\scantokens{\relax##1}\endtikzpicture};}
+ \def\mC@transition@iii##1{\expandafter\expandafter\expandafter\node\expandafter\expandafter\expandafter[\expandafter\mC@firstarg\expandafter,\mC@thirdarg,inner sep=1pt,left delimiter={[},right delimiter={]},draw=red!60,solid](\mC@secondarg){\scantokens{\relax##1}} node at ($(\mC@secondarg.north east)+(.25,0)$) {$\ddagger$};}
\renewcommand{\mC@arrow}[3][]{
\renewcommand{\mC@arrow@length@factor}{\mC@arrow@currentlength}
- \setlength{\mC@arrow@length@actual}{\mC@arrow@currentlength\mC@arrow@length@default}
+ \setlength{\mC@arrow@length@actual}{\mC@arrow@currentlength\mC@arrow@length@value}
\ifthenelse{\equal{\mC@arrow@argument@both}{true}}{
\mC@largernode{##2}{##3}
}{
@@ -910,12 +1097,12 @@
}
\newcommand\makeinvisible{
- \def\mC@reactand@iii##1{\expandafter\expandafter\expandafter\node\expandafter\expandafter\expandafter[\expandafter\mC@firstarg\expandafter,\mC@thirdarg](\mC@secondarg){##1};}
- \def\mC@branch@iii##1{\expandafter\expandafter\expandafter\node\expandafter\expandafter\expandafter[\expandafter\mC@firstarg\expandafter,\mC@thirdarg](\mC@secondarg){\tikzpicture[start branch]##1\endtikzpicture};}
- \def\mC@transition@iii##1{\expandafter\expandafter\expandafter\node\expandafter\expandafter\expandafter[\expandafter\mC@firstarg\expandafter,\mC@thirdarg,inner sep=1pt,left delimiter={[},right delimiter={]}](\mC@secondarg){##1} node at ($(\mC@secondarg.north east)+(.25,0)$) {$\ddagger$};}
+ \def\mC@reactant@iii##1{\expandafter\expandafter\expandafter\node\expandafter\expandafter\expandafter[\expandafter\mC@firstarg\expandafter,\mC@thirdarg](\mC@secondarg){\scantokens{\relax##1}};}
+ \def\mC@branch@iii##1{\expandafter\expandafter\expandafter\node\expandafter\expandafter\expandafter[\expandafter\mC@firstarg\expandafter,\mC@thirdarg](\mC@secondarg){\tikzpicture[start branch]\scantokens{\relax##1}\endtikzpicture};}
+ \def\mC@transition@iii##1{\expandafter\expandafter\expandafter\node\expandafter\expandafter\expandafter[\expandafter\mC@firstarg\expandafter,\mC@thirdarg,inner sep=1pt,left delimiter={[},right delimiter={]}](\mC@secondarg){\scantokens{\relax##1}} node at ($(\mC@secondarg.north east)+(.25,0)$) {$\ddagger$};}
\renewcommand{\mC@arrow}[3][]{
\renewcommand{\mC@arrow@length@factor}{\mC@arrow@currentlength}
- \setlength{\mC@arrow@length@actual}{\mC@arrow@currentlength\mC@arrow@length@default}
+ \setlength{\mC@arrow@length@actual}{\mC@arrow@currentlength\mC@arrow@length@value}
\ifthenelse{\equal{\mC@arrow@argument@both}{true}}{
\mC@largernode{##2}{##3}
}{
@@ -936,4 +1123,5 @@
}
}
% ------------------------------------------------------------------------------------- %
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \ No newline at end of file
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\endinput \ No newline at end of file