summaryrefslogtreecommitdiff
path: root/Master/texmf-dist
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2011-04-23 22:39:48 +0000
committerKarl Berry <karl@freefriends.org>2011-04-23 22:39:48 +0000
commit59c2fb860cfc7f447fded1f644421e4ee9bff956 (patch)
tree94338038fd674d5653722e937d0b76c1183bea61 /Master/texmf-dist
parente3cf4b9e3f515cb071141c031fb4c688ee2c9ce4 (diff)
mychemistry 1.5 (23apr11)
git-svn-id: svn://tug.org/texlive/trunk@22176 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist')
-rw-r--r--Master/texmf-dist/doc/latex/mychemistry/README18
-rw-r--r--Master/texmf-dist/doc/latex/mychemistry/examples.pdfbin0 -> 541796 bytes
-rw-r--r--Master/texmf-dist/doc/latex/mychemistry/examples.tex1071
-rw-r--r--Master/texmf-dist/doc/latex/mychemistry/mychemistry_de.pdfbin985138 -> 887928 bytes
-rw-r--r--Master/texmf-dist/doc/latex/mychemistry/mychemistry_de.tex1649
-rw-r--r--Master/texmf-dist/doc/latex/mychemistry/mychemistry_en.pdfbin962500 -> 840361 bytes
-rw-r--r--Master/texmf-dist/doc/latex/mychemistry/mychemistry_en.tex1593
-rw-r--r--Master/texmf-dist/tex/latex/mychemistry/mychemistry.sty1147
8 files changed, 2630 insertions, 2848 deletions
diff --git a/Master/texmf-dist/doc/latex/mychemistry/README b/Master/texmf-dist/doc/latex/mychemistry/README
index 16d1d9effe0..8c6ac16ef8b 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.4
+the myChemistry package v1.5
Creating reaction schemes with LaTeX and ChemFig
-2011/04/15
+2011/04/23
--------------------------------------------------------------------------
Clemens Niederberger
Web: http://www.niederberger-berlin.net/2011/02/latex-mychemistry/
@@ -22,25 +22,25 @@ This work has the LPPL maintenance status `maintained'.
The Current Maintainer of this work is Clemens Niederberger.
This work consists of the files mychemistry.sty, mychemistry_de.tex,
-mychemistry_en.tex and bondwidth.tex
+mychemistry_en.tex, bondwidth.tex, examples.tex and examples.pdf
--------------------------------------------------------------------------
-myChemistry relies on the ChemFig-package and won't work, if it isn't
-installed.
myChemistry provides commands for typesetting complex reaction schemes
with LaTeX and ChemFig.
+--------------------------------------------------------------------------
+myChemistry relies on the ChemFig-package and won't work, if it isn't
+installed. That also means that myChemistry needs TikZ to be installed.
+--------------------------------------------------------------------------
myChemistry bundles the packages ChemFig, mhchem, chemcompounds and
chemexec. With package options one can prevent myChemistry from loading
any chemistry related packages except ChemFig, though.
+--------------------------------------------------------------------------
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 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. \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/examples.pdf b/Master/texmf-dist/doc/latex/mychemistry/examples.pdf
new file mode 100644
index 00000000000..5a180f214f6
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/mychemistry/examples.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/mychemistry/examples.tex b/Master/texmf-dist/doc/latex/mychemistry/examples.tex
new file mode 100644
index 00000000000..2dba57f652d
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/mychemistry/examples.tex
@@ -0,0 +1,1071 @@
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% ------------------------------------------------------------------------------------- %
+% - myChemistry - mychemistry_en.tex -------------------------------------------------- %
+% - Creating reaction schemes with LaTeX and ChemFig ---------------------------------- %
+% ------------------------------------------------------------------------------------- %
+% - Clemens Niederberger -------------------------------------------------------------- %
+% - 2011/04/23 ------------------------------------------------------------------------ %
+% ------------------------------------------------------------------------------------- %
+% - http://www.niederberger-berlin.net/2011/02/latex-mychemistry/ --------------------- %
+% - kontakt@niederberger-berlin.net --------------------------------------------------- %
+% ------------------------------------------------------------------------------------- %
+% - If you have any ideas, questions, suggestions or bugs to report, please feel free - %
+% - to contact me. -------------------------------------------------------------------- %
+% ------------------------------------------------------------------------------------- %
+% - Copyright 2011 Clemens Niederberger - %
+% - - %
+% - This work may be distributed and/or modified under the - %
+% - conditions of the LaTeX Project Public License, either version 1.3 - %
+% - of this license or (at your option) any later version. - %
+% - The latest version of this license is in - %
+% - http://www.latex-project.org/lppl.txt - %
+% - and version 1.3 or later is part of all distributions of LaTeX - %
+% - version 2005/12/01 or later. - %
+% - - %
+% - This work has the LPPL maintenance status `maintained'. - %
+% - - %
+% - The Current Maintainer of this work is Clemens Niederberger. - %
+% - - %
+% - This work consists of the files mychemistry.sty, mychemistry_de.tex, - %
+% - mychemistry_en.tex and bondwidth.tex - %
+% ------------------------------------------------------------------------------------- %
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\documentclass[DIV10,titlepage,toc=index]{scrartcl}
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% - Pakete ---------------------------------------------------------------------------- %
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\usepackage{standalone}
+\usepackage{scrhack} % verbessert KOMAs Zusammenspiel mit floats
+\usepackage{emerald} % chemfig-Schrift
+\usepackage[utf8x]{inputenc} % Zeichenkodierung: Eingabe
+\usepackage[T1]{fontenc} % Text-Ausgabe-Codierung
+\usepackage{textcomp,mathcomp}
+\usepackage[english]{babel} % Sprache
+\usepackage{xspace,paralist} % xspace und Listen
+\usepackage{siunitx}
+ \DeclareSIUnit{\emlength}{em}
+ \DeclareSIUnit{\pt}{pt}
+ \sisetup{separate-uncertainty = true,
+ exponent-product = \cdot,
+ per-mode = symbol}
+\usepackage{listings,fancyvrb} % wortwörtliche Anzeige
+ \newcommand{\vitem}[1][]{\SaveVerb[aftersave={\item[\textnormal{\UseVerb[#1]{vsave}}]}]{vsave}}
+\usepackage[perpage,multiple]{footmisc} % Fußnoten
+\usepackage[ngerman]{varioref} % flexibles Referenzieren
+ \labelformat{section}{section #1}
+ \labelformat{subsection}{section #1}
+ \labelformat{subsubsection}{section #1}
+\usepackage[dvipsnames]{xcolor} % Farbe
+ \colorlet{code}{RawSienna}
+ \xdefinecolor{MyDarkRed}{rgb}{0.4392,0.0627,0.0627}
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% - Hyperlinks ------------------------------------------------------------------------ %
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\usepackage{hyperref}
+ \hypersetup{colorlinks=true, % Setup der Hyperlinks und des pdf
+ linkcolor=MyDarkRed!20!red,
+ urlcolor=blue!70,
+ plainpages=false,
+ bookmarksopen=true,
+ bookmarksopenlevel=2,
+ bookmarksnumbered=true,
+ pdfstartview=FitH,
+ pdfauthor={Clemens Niederberger},
+ pdftitle={myChemistry - Examples},
+ pdfsubject={Create reaction schemes with LaTeX and ChemFig},
+ pdfkeywords={myChemistry},
+ pdfcreator={LaTeX}
+ }
+\usepackage[english,color=MyDarkRed]{mychemistry} % myChemistry
+\renewcommand\thebeispiel{\arabic{beispiel}} % chemexec angepasst
+ \labelformat{beispiel}{example #1}
+ \labelformat{rxnfloat}{scheme #1}
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% - Listings anpassen ----------------------------------------------------------------- %
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\fvset{numbers=left,numbersep=3pt,xleftmargin=20pt,gobble=0,numberblanklines=true}
+\lstset{literate={ä}{{\"a}}1 {ö}{{\"o}}1 {ü}{{\"u}}1 {Ä}{{\"A}}1 {Ö}{{\"O}}1 {Ü}{{\"U}}1 {ß}{{\ss}}1}
+\lstset{
+ language=[LaTeX]TeX,
+ basicstyle={\ttfamily}, % Grundstil
+ extendedchars=true,
+ numbers=left, % Zeilennummern
+ numberstyle=\tiny, % Größe des Zeilennummern
+ numberblanklines=true, % Leerzeilen nummerieren
+ gobble=0, % das erste Leerzeichen abschneiden
+ xleftmargin=20pt, % Einrückung links
+ breaklines=true, % Zeilenumbruch
+ moredelim=[is][\color{red!25!purple}]{!!}{!!},% Hervorhebung
+ commentstyle={\color[named]{Gray}},
+ emph={begin,end}, % Umgebungen hervorheben
+ emphstyle=\color{red},
+ keywordstyle=\color{code},
+ keywordstyle=[20]\color{blue},
+ morekeywords=[20]{rxn,rxnfloat,rxnscheme,tikzpicture},
+ texcsstyle=[30]\color{code},
+ moretexcs=[30]{anywhere,arrow,branch,chemabove,chemand,chembelow,chemfig,chemmove,chemname,chemrel,chemsign,ce,color,compound,declarecompound,draw,dummy,elmove,floatplacement,floatstyle,Hpl,Hyd,lewis,listof,makeinvisible,makevisible,marrow,mCsetup,merge,mesomeric,node,nu,om,op,ox,pgfpositionnodelater,reactant,restylefloat,setarrowlength,setarrowline,setatomsep,setatomsize,setbondlength,setbondshape,setbondwidth,setcrambond,setmergelength,setrcndist,setrxnalign,setschemealign,setschemename,si,SI,textcolor,transition,vflipnext},
+ fancyvrb=true
+ }
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% - Kopf- und Fußzeile ---------------------------------------------------------------- %
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\usepackage{scrpage2}
+\pagestyle{scrheadings}
+\setheadwidth{textwithmarginpar}
+\automark{section}
+\ihead{\mC v\mCversion}
+\ohead{\bfseries Examples}
+\ifoot{\small\color{gray}-~page~\thepage~-}
+\cfoot{}
+\ofoot{}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% - Komascript ------------------------------------------------------------------------ %
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\setkomafont{disposition}{\rmfamily\bfseries} % Gewicht fett und Schriftart roman
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% - neue Befehle ---------------------------------------------------------------------- %
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% - weitere Makros -------------------------------------------------------------------- %
+\newcommand{\mC}{{\color{MyDarkRed}\ECFJD 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*\scrom{\scriptstyle\ominus}
+\newcommand*\scrop{\scriptstyle\oplus}
+\begin{document}
+\begin{titlepage}
+ % inspired by the titlepage of chemfig's documentation
+ \begin{tikzpicture}[remember picture,overlay]
+ \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}[,.7]
+ \setatomsep{1.5em}\footnotesize
+ \reactant[,a]{
+ \chemfig{C(-[4]*6(=-=-=-))(-[2]*6(=-=-=-))(-[6,,,2]HO)-C(-[2]CH_3)
+ (-[6]OH)-CH_3}
+ }
+ \arrow[a.20]{}{}
+ \reactant[20]{
+ \chemfig{C(-[4]*6(=-=-=-))(-[2]*6(=-=-=-))(-[@{e1}6,,,2]H_2@{e2}
+ \chembelow{O}{\oplus})-C(-[2]CH_3)(-[6]OH)-CH_3}\elmove{e1}
+ {10:4mm}{e2}{-10:4mm}
+ }
+ \arrow[,,1.42]{$-\ce{H2O}$}{}
+ \reactant{
+ \chemfig{\chembelow{C}{\oplus}(-[4]*6(=-=-=-))(-[2]
+ *6(=-=-=-))-C(-[2]CH_3)(-[6]OH)-CH_3}
+ }
+ \arrow[a.-20,-|>]{}{}
+ \reactant[-20]{
+ \chemfig{C(-[4]*6(=-=-=-))(-[2]*6(=-=-=-))(-[6,,,2]HO)-C(-[2]CH_3)
+ (-[@{e3}6]@{e4}\chembelow{O}{\oplus}H_2)-CH_3}\elmove{e3}
+ {170:4mm}{e4}{-170:4mm}
+ }
+ \arrow[,,1.42]{$-\ce{H2O}$}{}
+ \reactant{
+ \chemfig{C(-[4]*6(=-=-=-))(-[2]*6(=-=-=-))(-[6,,,2]HO)-
+ \chembelow{C}{\oplus}(-[2]CH_3)-CH_3}
+ }
+ \end{rxn}
+\end{verbatim}%
+};
+ \end{tikzpicture}
+ \begin{center}
+ \scalebox{4}{\mC}\par
+ \Large v\mCversion\par\bigskip
+ \footnotesize\mCdate{en}\par
+ \normalsize Clemens Niederberger\par\vskip1.5cm
+ \scalebox{3}{\color{white}Examples}%
+ \end{center}
+ \vskip3cm
+\begin{rxn}[,.7]
+ \setatomsep{1.5em}\footnotesize
+ \reactant[,a]{ \chemfig{C(-[4]*6(=-=-=-))(-[2]*6(=-=-=-))(-[6,,,2]HO)-C(-[2]CH_3)(-[6]OH)-CH_3} }
+ \arrow[a.20]{}{}
+ \reactant[20]{ \chemfig{C(-[4]*6(=-=-=-))(-[2]*6(=-=-=-))(-[@{e1}6,,,2]H_2@{e2}\chembelow{O}{\oplus})-C(-[2]CH_3)(-[6]OH)-CH_3}\elmove{e1}{10:4mm}{e2}{-10:4mm} }
+ \arrow[,,1.42]{$-\ce{H2O}$}{}
+ \reactant{ \chemfig{\chembelow{C}{\oplus}(-[4]*6(=-=-=-))(-[2]*6(=-=-=-))-C(-[2]CH_3)(-[6]OH)-CH_3} }{}
+ \arrow[a.-20,-|>]{}{}
+ \reactant[-20]{ \chemfig{C(-[4]*6(=-=-=-))(-[2]*6(=-=-=-))(-[6,,,2]HO)-C(-[2]CH_3)(-[@{e3}6]@{e4}\chembelow{O}{\oplus}H_2)-CH_3}\elmove{e3}{170:4mm}{e4}{-170:4mm} }
+ \arrow[,,1.42]{$-\ce{H2O}$}{}
+ \reactant{ \chemfig{C(-[4]*6(=-=-=-))(-[2]*6(=-=-=-))(-[6,,,2]HO)-\chembelow{C}{\oplus}(-[2]CH_3)-CH_3} }
+\end{rxn}
+\end{titlepage}
+
+\begin{abstract}
+ Since the documentation is already long enough, I decided to provide an extra file containing only examples and a few words where to find possibly interesting code.
+\end{abstract}
+
+\listof{rxnfloat}{Example Schemes}
+
+\section{Addition Reaction}\label{sec:addition}
+A simple reaction scheme with two different products.
+\begin{rxnscheme}[,H]{Addition Reaction}
+ \reactant{ \chemfig{=_[::-30]-[::60](=[::60]O)-[::-60]} }
+ \arrow{ $+ \Hpl$ }{}
+ \mesomeric[,rf]{
+ \reactant{ \chemfig{=_[:-30]-[::60](-[::60]OH)(-[::-120,.3,,,white]\oplus)-[::-60]} }
+ \marrow[below]
+ \reactant[below]{ \chemfig{\oplus-[6,.3,,,white]-[:-30]=_[::60](-[::60]OH)-[::-60]} }
+ }
+ \branch[right=of rf,,yshift=3em]{
+ \arrow{}{}
+ \reactant{ \chemname{\chemfig{=_[:-30]-[::60](-[::60]OH)(-[::-120]R)-[::-60]}}{1,2-adduct} }
+ }
+ \branch[right=of rf,,yshift=-5em]{
+ \arrow{}{}
+ \reactant{ \chemname{\chemfig{R-[6]-[:-30]=_[::60](-[::60]OH)-[::-60]}}{1,4-adduct} }
+ }
+\end{rxnscheme}
+
+\begin{lstlisting}
+ \begin{rxnscheme}[,H]{Addition Reaction}
+ \reactant{ \chemfig{=_[::-30]-[::60](=[::60]O)-[::-60]} }
+ \arrow{ $+ \Hpl$ }{}
+ \mesomeric[,rf]{
+ \reactant{ \chemfig{=_[:-30]-[::60](-[::60]OH)(-[::-120,.3,,,white]\oplus)-[::-60]} }
+ \marrow[below]
+ \reactant[below]{ \chemfig{\oplus-[6,.3,,,white]-[:-30]=_[::60](-[::60]OH)-[::-60]} }
+ }
+ \branch[right=of rf,,yshift=3em]{
+ \arrow{}{}
+ \reactant{ \chemname{\chemfig{=_[:-30]-[::60](-[::60]OH)(-[::-120]R)-[::-60]}}{1,2-adduct} }
+ }
+ \branch[right=of rf,,yshift=-5em]{
+ \arrow{}{}
+ \reactant{ \chemname{\chemfig{R-[6]-[:-30]=_[::60](-[::60]OH)-[::-60]}}{1,4-adduct} }
+ }
+ \end{rxnscheme}
+\end{lstlisting}
+
+\section{Mesomerism}
+\begin{rxnscheme}[,H,,.8]{Mesomerism}
+ \setatomsep{1.6em}
+ \reactant[,start]{ \chemname{\chemfig{*6(-=-=(-[,,,,white]\phantom{Br})-=)}}{benzene \compound{benzene}} }
+ \arrow[,,2.8]{}{}
+ \reactant{ \chemname{\chemfig{*6(-=-=(-Br)-=)}}{bromobenzene \compound{bromobenzene}} }
+ \arrow[start.below,,,pfeil_a]{\ce{Br2 / AlBr3}}{$-\ce{AlBr4\om}$}
+ \mesomeric[pfeil_a.below,mesomerism,xshift=8.5em,yshift=-2.5em]{
+ \reactant{
+ \chemfig{*6(=[@{e1}]-=-(-[:120]Br)(-[:60]H)-(-[:-30,.4,,,white]\oplus)-[@{e2}])}
+ \elmove{e1}{60:4mm}{e2}{0:4mm}
+ }
+ \marrow
+ \reactant{
+ \chemfig{*6(-(-[:90,.4,,,white]\oplus)-[@{e4}]=[@{e3}]-(-[:120]Br)(-[:60]H)-=)}
+ \elmove{e3}{180:4mm}{e4}{150:4mm}
+ }
+ \marrow
+ \reactant{
+ \chemfig{*6(-=-(-[:-150,.4,,,white]\oplus)-(-[:120]Br)(-[:60]H)-=)}
+ }
+ }
+ \branch[above=of mesomerism,,xshift=7.5em]{
+ \arrow[above]{$-\Hpl$}{}
+ }
+\end{rxnscheme}
+If you put something relative to an arrow you might have to consider, that the arrow's anchor point is in the middle of the arrow. That's why \lstinline+\mesomeric+ is shifted with \lstinline+yshift=-2.5em+ in line 9.
+\begin{lstlisting}
+ \begin{rxnscheme}[,H,,.8]{Mesomerism}
+ \setatomsep{1.6em}
+ % main reaction:
+ \reactant[,start]{ \chemname{\chemfig{*6(-=-=(-[,,,,white]\phantom{Br})-=)}}{benzene \compound{benzene}} }
+ \arrow[,,2.8]{}{}
+ \reactant{ \chemname{\chemfig{*6(-=-=(-Br)-=)}}{bromobenzene \compound{bromobenzene}} }
+ % branch:
+ \arrow[start.below,,,pfeil_a]{\ce{Br2 / AlBr3}}{$-\ce{AlBr4\om}$}
+ \mesomeric[!!pfeil_a.below!!,mesomerism,xshift=8.5em,!!yshift=-2.5em!!]{
+ \reactant{
+ \chemfig{*6(=[@{e1}]-=-(-[:120]Br)(-[:60]H)-(-[:-30,.4,,,white]\oplus)-[@{e2}])}
+ \elmove{e1}{60:4mm}{e2}{0:4mm}
+ }
+ \marrow
+ \reactant{
+ \chemfig{*6(-(-[:90,.4,,,white]\oplus)-[@{e4}]=[@{e3}]-(-[:120]Br)(-[:60]H)-=)}
+ \elmove{e3}{180:4mm}{e4}{150:4mm}
+ }
+ \marrow
+ \reactant{
+ \chemfig{*6(-=-(-[:-150,.4,,,white]\oplus)-(-[:120]Br)(-[:60]H)-=)}
+ }
+ }
+ % last arrow inside a branch, since it cannot be shifted by itself:
+ \branch[above=of mesomerism,,xshift=7.5em]{
+ \arrow[above]{$-\Hpl$}{}
+ }
+ \end{rxnscheme}
+\end{lstlisting}
+
+\section{The Titlepage}
+\begin{rxnscheme}[,,,.7]{The Titlepage}
+ \setatomsep{1.5em}\footnotesize
+ \reactant[,a]{ \chemfig{C(-[4]*6(=-=-=-))(-[2]*6(=-=-=-))(-[6,,,2]HO)-C(-[2]CH_3)(-[6]OH)-CH_3} }
+ \arrow[a.20]{}{}
+ \reactant[20]{ \chemfig{C(-[4]*6(=-=-=-))(-[2]*6(=-=-=-))(-[@{e1}6,,,2]H_2@{e2}\chembelow{O}{\oplus})-C(-[2]CH_3)(-[6]OH)-CH_3}\elmove{e1}{10:4mm}{e2}{-10:4mm} }
+ \arrow[,,1.42]{$-\ce{H2O}$}{}
+ \reactant{ \chemfig{\chembelow{C}{\oplus}(-[4]*6(=-=-=-))(-[2]*6(=-=-=-))-C(-[2]CH_3)(-[6]OH)-CH_3} }{}
+ \arrow[a.-20,-|>]{}{}
+ \reactant[-20]{ \chemfig{C(-[4]*6(=-=-=-))(-[2]*6(=-=-=-))(-[6,,,2]HO)-C(-[2]CH_3)(-[@{e3}6]@{e4}\chembelow{O}{\oplus}H_2)-CH_3}\elmove{e3}{170:4mm}{e4}{-170:4mm} }
+ \arrow[,,1.42]{$-\ce{H2O}$}{}
+ \reactant[,end]{ \chemfig{C(-[4]*6(=-=-=-))(-[2]*6(=-=-=-))(-[6,,,2]HO)-\chembelow{C}{\oplus}(-[2]CH_3)-CH_3} }
+ \anywhere{below=of end}{}
+\end{rxnscheme}
+
+\begin{lstlisting}
+ \begin{rxn}[,.7]
+ \setatomsep{1.5em}\footnotesize
+ % reaction above:
+ \reactant[,a]{ \chemfig{C(-[4]*6(=-=-=-))(-[2]*6(=-=-=-))(-[6,,,2]HO)-C(-[2]CH_3)(-[6]OH)-CH_3} }
+ \arrow[a.45]{}{}
+ \reactant[45]{ \chemfig{C(-[4]*6(=-=-=-))(-[2]*6(=-=-=-))(-[@{e1}6,,,2]H_2@{e2}\chembelow{O}{\oplus})-C(-[2]CH_3)(-[6]OH)-CH_3}\elmove{e1}{10:4mm}{e2}{-10:4mm} }
+ \arrow[,,1.42]{$-\ce{H2O}$}{}
+ \reactant{ \chemfig{\chembelow{C}{\oplus}(-[4]*6(=-=-=-))(-[2]*6(=-=-=-))-C(-[2]CH_3)(-[6]OH)-CH_3} }{}
+ % going down:
+ \arrow[a.-45,-|>]{}{}
+ \reactant[-45]{ \chemfig{C(-[4]*6(=-=-=-))(-[2]*6(=-=-=-))(-[6,,,2]HO)-C(-[2]CH_3)(-[@{e3}6]@{e4}\chembelow{O}{\oplus}H_2)-CH_3}\elmove{e3}{170:4mm}{e4}{-170:4mm} }
+ \arrow[,,1.42]{$-\ce{H2O}$}{}
+ \reactant{ \chemfig{C(-[4]*6(=-=-=-))(-[2]*6(=-=-=-))(-[6,,,2]HO)-\chembelow{C}{\oplus}(-[2]CH_3)-CH_3} }
+ \end{rxn}
+\end{lstlisting}
+
+\section{Condensation Reaction}
+\begin{rxnscheme}[,H]{Condensation Reaction}
+ \reactant{\chemfig{**6(---(-CH_2OH)-(-OH)--)}}
+ \chemand
+ \reactant{\chemfig{**6(----(-OH)-(-HOCH_2)-)}}
+ \arrow[,-+>]{}{\ce{H2O}}
+ \reactant{\chemfig{**6(---(-CH_2-[:-30]O-[:30]CH_2-[:-30]**6(-----(-OH)-))-(-OH)--)}}
+ \arrow[-90,-+>,,dec]{}{\ce{CH2O}}
+ \anywhere{dec.180,,xshift=-.2em}{\SI{200}{\celsius}}
+ \reactant[-90,target]{\chemfig{**6(---(-CH_2-[:-30]**6(-----(-OH)-))-(-OH)--)}}
+ \branch[left=of target]{
+ \reactant{\chemfig{**6(---(-CH_2OH)-(-OH)--)}}
+ \chemand
+ \reactant{\chemfig{**6(----(-OH)-(-H)-)}}
+ \arrow[,-+>]{}{\ce{H2O}}
+ }
+\end{rxnscheme}
+\begin{lstlisting}
+ \begin{rxnscheme}[,H]{Condensation Reaction}
+ \reactant{\chemfig{**6(---(-CH_2OH)-(-OH)--)}}
+ \chemand
+ \reactant{\chemfig{**6(----(-OH)-(-HOCH_2)-)}}
+ \arrow[,-+>]{}{\ce{H2O}}
+ \reactant{\chemfig{**6(---(-CH_2-[:-30]O-[:30]CH_2-[:-30]**6(-----(-OH)-))-(-OH)--)}}
+ \arrow[-90,-+>,,dec]{}{\ce{CH2O}}
+ \anywhere{dec.180,,xshift=-.2em}{\SI{200}{\celsius}}
+ \reactant[-90,target]{\chemfig{**6(---(-CH_2-[:-30]**6(-----(-OH)-))-(-OH)--)}}
+ \branch[left=of target]{
+ \reactant{\chemfig{**6(---(-CH_2OH)-(-OH)--)}}
+ \chemand
+ \reactant{\chemfig{**6(----(-OH)-(-H)-)}}
+ \arrow[,-+>]{}{\ce{H2O}}
+ }
+ \end{rxnscheme}
+\end{lstlisting}
+
+\section{Substitution vs. Elimination}
+\begin{rxnscheme}[,H]{Substitution vs. Elimination}
+ % first reaction:
+ \reactant[,start_a]{\chemfig{@{H}H-[@{b1}:-60]\chemabove{C}{\scriptstyle\beta}(<[:-100]H)(<:[:-150]H)-[@{b2}]\chemabove{C}{\scriptstyle\alpha}(<[:20]H)(<:[:60]H)-[@{b3}:-60]@{X1}X}}
+ \arrow{E2}{}
+ \reactant{\chemfig{H-[:60]C(-[:120]H)=C(-[:60]H)-[:-60]H}}
+ \chemand
+ \reactant{\ce{X\om}}
+ \chemand
+ \reactant{\chemfig{O(-[:60]H)-[:-60]H}}
+ % second reaction:
+ \reactant[start_a.-90,start_b,yshift=-4em]{\chemfig{H-[:-60]C(<[:-100]H)(<:[:-150]H)-@{C}C(<[:20]H)(<:[:60]H)-[@{b4}:-60]@{X2}X}}
+ \arrow{S$_\text{N}$2}{}
+ \reactant{\chemfig{H-[:-60]C(<[:-100]H)(<:[:-150]H)-C(<[:-80]H)(<:[:-30]H)-[:60]OH}}
+ \chemand
+ \reactant{\ce{X\om}}
+ % nucleophile/base:
+ \anywhere{start_b.135,nuc,xshift=-3em,yshift=2em}{\chemfig{H-@{O}\chemabove{\lewis{026,O}}{\hspace{5mm}\scrom}}}
+ % electron movements:
+ \anywhere{nuc.0}{
+ \elmove{O}{90:1.5cm}{H}{180:1cm}
+ \elmove{b1}{60:1cm}{b2}{90:5mm}
+ \elmove{b3}{-170:5mm}{X1}{180:5mm}
+ \elmove{O}{-90:1cm}{C}{100:1.5cm}
+ \elmove{b4}{-170:5mm}{X2}{180:5mm}
+ }
+\end{rxnscheme}
+You may see in line 20 that the \lstinline+\elmove+ commands are put inside of \lstinline+\anywhere+. This is necessary in order to produce the right scheme. But this time you can position \lstinline+\anywhere+ literally anywhere.
+\begin{lstlisting}
+ \newcommand*\scrom{\scriptstyle\ominus}
+ \begin{rxnscheme}[,H]{Substitution vs. Elimination}
+ % first reaction:
+ \reactant[,start_a]{\chemfig{@{H}H-[@{b1}:-60]\chemabove{C}{\scriptstyle\beta}(<[:-100]H)(<:[:-150]H)-[@{b2}]\chemabove{C}{\scriptstyle\alpha}(<[:20]H)(<:[:60]H)-[@{b3}:-60]@{X1}X}}
+ \arrow{E2}{}
+ \reactant{\chemfig{H-[:60]C(-[:120]H)=C(-[:60]H)-[:-60]H}}
+ \chemand
+ \reactant{\ce{X\om}}
+ \chemand
+ \reactant{\chemfig{O(-[:60]H)-[:-60]H}}
+ % second reaction:
+ \reactant[start_a.-90,start_b,yshift=-4em]{\chemfig{H-[:-60]C(<[:-100]H)(<:[:-150]H)-@{C}C(<[:20]H)(<:[:60]H)-[@{b4}:-60]@{X2}X}}
+ \arrow{S$_\text{N}$2}{}
+ \reactant{\chemfig{H-[:-60]C(<[:-100]H)(<:[:-150]H)-C(<[:-80]H)(<:[:-30]H)-[:60]OH}}
+ \chemand
+ \reactant{\ce{X\om}}
+ % nucleophile/base:
+ \anywhere{start_b.135,nuc,xshift=-3em,yshift=2em}{\chemfig{H-@{O}\chemabove{\lewis{026,O}}{\hspace{5mm}\scrom}}}
+ % electron movements:
+ \anywhere{nuc.0}{
+ \elmove{O}{90:1.5cm}{H}{180:1cm}
+ \elmove{b1}{60:1cm}{b2}{90:5mm}
+ \elmove{b3}{-170:5mm}{X1}{180:5mm}
+ \elmove{O}{-90:1cm}{C}{100:1.5cm}
+ \elmove{b4}{-170:5mm}{X2}{180:5mm}
+ }
+ \end{rxnscheme}
+\end{lstlisting}
+
+\section{Scheme with three Lines}\label{sec:three_lines}
+\begin{rxnscheme}{Scheme with three Lines}
+ \setatomsep{1.5em}
+ \footnotesize
+ \reactant[,start]{\chemfig{EtO-(=[2]O)-[:-60](-Br)-[:-120](=[6]O)-[4]EtO}}
+ \chemand
+ \reactant{\chemfig{*6(-=-=-*5(-(=O)-\chemabove{\lewis{4:,N}}{\scrom}(-[4,.7,,,draw=none]\chemabove{K}{\scrop})-(=O)--)=)}}
+ \arrow{}{}
+ \reactant{\chemfig{*6(-=-=-*5(-(=O)-N(-(-[::-60](=[::-60]O)-[::60]EtO)-[::60](=[::60]O)-[::-60]EtO)-(=O)--)=)}}
+ % newline, started with \anywhere:
+ \anywhere{start.-90,a,xshift=-4em,yshift=-5em}{}
+ \arrow[a.0,,.6]{\chemabove{\lewis{0:,B}}{\scrom}}{}
+ \arrow{\ce{R-X}}{}
+ \reactant{\chemfig{*6(-=-=-*5(-(=O)-N(-(-[4]R)(-[::-60](=[::-60]O)-[::60]EtO)-[::60](=[::60]O)-[::-60]EtO)-(=O)--)=)}}
+ \arrow[,,1.25]{\Hpl/\ce{H2O}}{}
+ \reactant{\chemfig{*6(-=-=-*5(-(=O)-N(-(-[4]R)(-[::-60](=[::-60]O)-[::60]HO_2C)-[::60](=[::60]O)-[::-60]HO_2C)-(=O)--)=)}}
+ % newline, started with \anywhere:
+ \anywhere{a.-90,b,yshift=-7em}{}
+ \arrow[b.0]{\ce{- CO2}}{}
+ \arrow{\Hpl}{\ce{H2O}}
+ \reactant{\chemfig{R-(-[6]H)(-[2]C|O_2\om)-NH_3\op}}
+\end{rxnscheme}
+\begin{lstlisting}
+ \newcommand*\scrom{\scriptstyle\ominus}
+ \newcommand*\scrop{\scriptstyle\oplus}
+ \begin{rxnscheme}{Scheme with three Lines}
+ \setatomsep{1.5em}
+ \footnotesize
+ \reactant[,start]{\chemfig{EtO-(=[2]O)-[:-60](-Br)-[:-120](=[6]O)-[4]EtO}}
+ \chemand
+ \reactant{\chemfig{*6(-=-=-*5(-(=O)-\chemabove{\lewis{4:,N}}{\scrom}(-[4,.7,,,draw=none]\chemabove{K}{\scrop})-(=O)--)=)}}
+ \arrow{}{}
+ \reactant{\chemfig{*6(-=-=-*5(-(=O)-N(-(-[::-60](=[::-60]O)-[::60]EtO)-[::60](=[::60]O)-[::-60]EtO)-(=O)--)=)}}
+ % newline, started with \anywhere:
+ \anywhere{start.-90,a,xshift=-4em,yshift=-5em}{}
+ \arrow[a.0,,.6]{\chemabove{\lewis{0:,B}}{\scrom}}{}
+ \arrow{\ce{R-X}}{}
+ \reactant{\chemfig{*6(-=-=-*5(-(=O)-N(-(-[4]R)(-[::-60](=[::-60]O)-[::60]EtO)-[::60](=[::60]O)-[::-60]EtO)-(=O)--)=)}}
+ \arrow[,,1.25]{\Hpl/\ce{H2O}}{}
+ \reactant{\chemfig{*6(-=-=-*5(-(=O)-N(-(-[4]R)(-[::-60](=[::-60]O)-[::60]HO_2C)-[::60](=[::60]O)-[::-60]HO_2C)-(=O)--)=)}}
+ % newline, started with \anywhere:
+ \anywhere{a.-90,b,yshift=-7em}{}
+ \arrow[b.0]{\ce{- CO2}}{}
+ \arrow{\Hpl}{\ce{H2O}}
+ \reactant{\chemfig{R-(-[6]H)(-[2]C|O_2\om)-NH_3\op}}
+ \end{rxnscheme}
+\end{lstlisting}
+
+
+\section{Hydratisation}\label{sec: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}{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[,<=>,.7]{}{}
+ \reactant{\chemfig{R_2C(-[:60]\chemabove{O}{\scriptstyle\oplus}H_2)-[:-60]OH}}
+ \arrow[below right,<=>,.7]{$-\Hpl$}{}
+ \reactant[below right]{\chemfig{R_2C(-[:60]OH)-[:-60]OH}}
+ \arrow[below left,<=>,.7]{}{\ce{H2O}}
+ \reactant[below left,zw]{\chemfig{R_2C(-[:60]OH)-[:-60]O|\om}}
+ \arrow[left,<=>,.7]{}{}
+ \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:
+\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{lstlisting}
+ \chemfig{-[,,,,lddbond]-[,,,,rddbond]}
+\end{lstlisting}
+\chemfig{-[,,,,lddbond]-[,,,,rddbond]}\par\medskip
+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:
+\begin{lstlisting}
+ \begin{rxnscheme}{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[,<=>,.7]{}{}
+ \reactant{\chemfig{R_2C(-[:60]\chemabove{O}{\scriptstyle\oplus}H_2)-[:-60]OH}}
+ \arrow[below right,<=>,.7]{$-\Hpl$}{}
+ \reactant[below right]{\chemfig{R_2C(-[:60]OH)-[:-60]OH}}
+ \arrow[below left,<=>,.7]{}{\ce{H2O}}
+ \reactant[below left,zw]{\chemfig{R_2C(-[:60]OH)-[:-60]O|\om}}
+ \arrow[left,<=>,.7]{}{}
+ \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}
+You can see that \lstinline+\anywhere+ was used several times, either to place molecules or to label molecules.
+
+\section{Esterification}\label{sec:veresterung}
+\begin{rxnscheme}[,H]{Esterification}
+ \reactant{\chemfig{H-C(=[:60]O)-[:-60]O-H}}
+ \arrow[,-+>,1.5,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,,xshift=-5em]{
+ \arrow[below,<=>]{\chemfig{H-[:120]@{a1}O-[:60]CH_3}}{\tiny addition}
+ \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[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.5]{\ce{HSO4\om}}{\ce{H2SO4}}
+ \reactant{\chemfig{H-C(=[:60]O)-[:-60]O-CH_3}}
+\end{rxnscheme}
+\begin{lstlisting}
+ \begin{rxn}{Esterification}
+ \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,,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[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{rxnscheme}
+\end{lstlisting}
+\newpage
+
+\section{Electrophilic Addition}\label{sec:elektrophile_addition}
+This scheme forms a circle.
+\begin{rxnscheme}[,H]{Electrophilic Addition}
+ \setarrowlength{3em}
+ \reactant{\chemfig{>[:-20]C(<[:40])=[6]C(<[:-130])<[:-20]}}
+ \chemand[,plus]
+ \reactant{\chemfig{\lewis{246,Br}-\lewis{026,Br}}}
+ \arrow[plus.-90,<=>]{\footnotesize fast}{}
+ \reactant[-90,attack]{\chemfig{>[:-20]C(<[:40])=[@{db}6]C(<[:-130])<[:-20]}}
+ \anywhere{right=of attack}{
+ \chemfig{@{Br1}\lewis{246,Br}-[@{b2}]@{Br2}\lewis{026,Br}}
+ \elmove{db}{20:5mm}{Br1}{135:5mm}
+ \elmove{b2}{-120:5mm}{Br2}{-120:5mm}
+ }
+ % to the left:
+ \arrow[attack.-135,<=>,2]{\ce{- Br\om}}{\footnotesize slow}
+ \reactant[-135,carbenium_a]{\vflipnext\chemfig{-[:-30]\chembelow{C}{\scriptstyle\oplus}(-[:30])-[6]C(<[:-150])(<:[:-100])-[:-30]\lewis{137,Br}}}
+ \anywhere{below=of carbenium_a}{\footnotesize carbenium ion}
+ \arrow[,<<=>]{}{}
+ \reactant[,bromonium]{\chemfig{>:[:-60]C?(<[:160])-[6]C(<[:-110])(<:[:-150])-[:30]\lewis{17,Br}?-[4,.5,,,draw=none]{\scriptstyle\oplus}}}
+ \anywhere{below=of bromonium,,yshift=.35em}{\footnotesize bromonium ion}
+ % to the right:
+ \arrow[attack.-45,<=>,2]{\footnotesize slow}{\ce{- Br\om}}
+ \reactant[-45,carbenium_b]{\chemfig{-[:-30]\chemabove{C}{\scriptstyle\oplus}(-[:30])-[6]C(<:[:-150])(<[:-100])-[:-30]\lewis{157,Br}}}
+ \anywhere{below=of carbenium_b}{\footnotesize carbenium ion}
+ \arrow[left,<<=>]{}{}
+ \mCsetup{reset}
+\end{rxnscheme}
+
+\begin{lstlisting}
+ \begin{rxnscheme}[,H]{Electrophilic Addition}
+ \setarrowlength{3em}
+ \reactant{\chemfig{>[:-20]C(<[:40])=[6]C(<[:-130])<[:-20]}}
+ \chemand[,plus]
+ \reactant{\chemfig{\lewis{246,Br}-\lewis{026,Br}}}
+ \arrow[plus.-90,<=>]{\footnotesize fast}{}
+ \reactant[-90,attack]{\chemfig{>[:-20]C(<[:40])=[@{db}6]C(<[:-130])<[:-20]}}
+ \anywhere{right=of attack}{
+ \chemfig{@{Br1}\lewis{246,Br}-[@{b2}]@{Br2}\lewis{026,Br}}
+ \elmove{db}{20:5mm}{Br1}{135:5mm}
+ \elmove{b2}{-120:5mm}{Br2}{-120:5mm}
+ }
+ % to the left:
+ \arrow[attack.-135,<=>,2]{\ce{- Br\om}}{\footnotesize slow}
+ \reactant[-135,carbenium_a]{\vflipnext\chemfig{-[:-30]\chembelow{C}{\scriptstyle\oplus}(-[:30])-[6]C(<[:-150])(<:[:-100])-[:-30]\lewis{137,Br}}}
+ \anywhere{below=of carbenium_a}{\footnotesize carbenium ion}
+ \arrow[,<<=>]{}{}
+ \reactant[,bromonium]{\chemfig{>:[:-60]C?(<[:160])-[6]C(<[:-110])(<:[:-150])-[:30]\lewis{17,Br}?-[4,.5,,,draw=none]{\scriptstyle\oplus}}}
+ \anywhere{below=of bromonium,,yshift=.35em}{\footnotesize bromonium ion}
+ % to the right:
+ \arrow[attack.-45,<=>,2]{\footnotesize slow}{\ce{- Br\om}}
+ \reactant[-45,carbenium_b]{\chemfig{-[:-30]\chemabove{C}{\scriptstyle\oplus}(-[:30])-[6]C(<:[:-150])(<[:-100])-[:-30]\lewis{157,Br}}}
+ \anywhere{below=of carbenium_b}{\footnotesize carbenium ion}
+ \arrow[left,<<=>]{}{}
+ \mCsetup{reset}
+ \end{rxnscheme}
+\end{lstlisting}
+
+\section{Activation of Fatty Acids}\label{sec:activation_fatty_acid}
+\begin{rxnscheme}[,H]{Activation of Fatty Acids}
+ \reactant[,ATP]{\chemfig{\chemabove{O}{\hspace*{-5mm}\scrom}-P(=[2]O)(-[6]\chembelow{O}{\scrom})-O-P(=[2]O)(-[6]\chembelow{O}{\scrom})-@{O1}O-[@{b1}]@{P}P(=[2]O)(-[6]\chembelow{O}{\scrom})-O-CH_2-[6,1.5,1](-[6,.5])(-[:20,1.3]O?[a])<[7](-[2,.5])(-[6]OH)-[,,,,line width=3pt](-[2,.5])(-[6]OH)>[1]?[a](-[6,.5])-[2,1.5]N?[b]-[:18]([:30]*6(-N=-N=(-NH_2)-=))-[:90]-[:162]N=^[:-126]?[b]}}
+ \anywhere{below right=of ATP,,xshift=-4em,yshift=3em}{\bfseries ATP}
+ \arrow[below,,1.5]{}{\chemname{\chemfig{R-C(=[:-60]O)-[:60]@{O2}O-[@{b2}]H}}{fatty acid}}
+ \branch[on chain=going below]{
+ \reactant[,pyrophosphat]{
+ \chemfig{\chemabove{O}{\hspace*{-5mm}\scrom}-P(=[2]O)(-[6]\chembelow{O}{\scrom})-O-P(=[2]O)(-[6]\chembelow{O}{\scrom})-\chemabove{O}{\hspace*{5mm}\scrom}}
+ \elmove{b1}{100:1cm}{O1}{90:5mm}
+ \elmove{O2}{135:1cm}{P}{-135:1cm}
+ \elmove{b2}{-90:5mm}{O2}{-60:5mm}
+ }
+ \anywhere{below=of pyrophosphat}{pyrophosphate PP$_\text{i}$}
+ \chemand
+ \reactant[,acyl-amp]{\chemfig{R-@{C}C(=[:-60]O)-[@{b3}:60]@{O3}O-P(-[6]\chembelow{O}{\scrom})(=[2]O)-O-CH_2-[6,,1,1]r|ibos|e-[2,1.05,3,1]a|denine}}
+ \anywhere{below=of acyl-amp}{\bfseries acyl-AMP}
+ }
+ \branch[on chain=going below,,xshift=-8em]{
+ \arrow[below]{\ce{H2O}}{}
+ \reactant[below,Pi]{2~\chemfig{HO-P(=[2]O)(-[6]\chembelow{O}{\scrom})-O}}
+ \anywhere{below right=of Pi}{P$_\text{i}$}
+ }
+ \branch[,,xshift=4em]{
+ \arrow[below,-+>]{\chemfig{CoA-@{S}S-[@{b4}:-60]H}}{AMP}
+ \reactant[below,acyl-SCoA]{
+ \chemfig{R-C(=[:-60]O)-[:60]S-CoA}
+ \elmove{S}{45:3cm}{C}{-120:2cm}
+ \elmove{b3}{135:5mm}{O3}{110:7mm}
+ \elmove{b4}{-120:7mm}{S}{-100:5mm}
+ }
+ \anywhere{below=of acyl-SCoA}{acyl-SCoA}
+ }
+\end{rxnscheme}
+
+\begin{lstlisting}
+ \def\scrom{\scriptstyle\ominus}
+ \begin{rxnscheme}[,H]{Activation of Fatty Acids}
+ \reactant[,ATP]{\chemfig{\chemabove{O}{\hspace*{-5mm}\scrom}-P(=[2]O)(-[6]\chembelow{O}{\scrom})-O-P(=[2]O)(-[6]\chembelow{O}{\scrom})-@{O1}O-[@{b1}]@{P}P(=[2]O)(-[6]\chembelow{O}{\scrom})-O-CH_2-[6,1.5,1](-[6,.5])(-[:20,1.3]O?[a])<[7](-[2,.5])(-[6]OH)-[,,,,line width=3pt](-[2,.5])(-[6]OH)>[1]?[a](-[6,.5])-[2,1.5]N?[b]-[:18]([:30]*6(-N=-N=(-NH_2)-=))-[:90]-[:162]N=^[:-126]?[b]}}
+ \anywhere{below right=of ATP,,xshift=-4em,yshift=3em}{\bfseries ATP}
+ \arrow[below,,1.5]{\chemname{\chemfig{R-C(=[:-60]O)-[:60]@{O2}O-[@{b2}]H}}{fatty acid}}{}
+ \branch[on chain=going below]{
+ \reactant[,pyrophosphat]{
+ \chemfig{\chemabove{O}{\hspace*{-5mm}\scrom}-P(=[2]O)(-[6]\chembelow{O}{\scrom})-O-P(=[2]O)(-[6]\chembelow{O}{\scrom})-\chemabove{O}{\hspace*{5mm}\scrom}}
+ \elmove{b1}{100:1cm}{O1}{90:5mm}
+ \elmove{O2}{135:1cm}{P}{-135:1cm}
+ \elmove{b2}{-90:5mm}{O2}{-60:5mm}
+ }
+ \anywhere{below=of pyrophosphat}{pyrophosphate PP$_\text{i}$}
+ \chemand
+ \reactant[,acyl-amp]{\chemfig{R-@{C}C(=[:-60]O)-[@{b3}:60]@{O3}O-P(-[6]\chembelow{O}{\scrom})(=[2]O)-O-CH_2-[6,,1,1]r|ibos|e-[2,1.05,3,1]A|denine}}
+ \anywhere{below=of acyl-amp}{\bfseries acyl-AMP}
+ }
+ \branch[on chain=going below,,xshift=-8em]{
+ \arrow[below]{\ce{H2O}}{}
+ \reactant[below,Pi]{2~\chemfig{HO-P(=[2]O)(-[6]\chembelow{O}{\scrom})-O}}
+ \anywhere{below right=of Pi}{P$_\text{i}$}
+ }
+ \branch[,,xshift=4em]{
+ \arrow[below,-+>]{\chemfig{CoA-@{S}S-[@{b4}:-60]H}}{AMP}
+ \reactant[below,acyl-SCoA]{
+ \chemfig{R-C(=[:-60]O)-[:60]S-CoA}
+ \elmove{S}{135:2cm}{C}{-135:1cm}
+ \elmove{b3}{-45:5mm}{O3}{-70:7mm}
+ \elmove{b4}{-120:7mm}{S}{-100:5mm}
+ }
+ \anywhere{below=of acyl-SCoA}{acyl-SCoA}
+ }
+ \end{rxnscheme}
+\end{lstlisting}
+
+\section{Change the layout with \TikZ}\label{sec:tikz_layout}
+\begin{rxnscheme}{Change the layout with \TikZ}
+ \colorlet{mCgreen}{green!50!gray}
+ \colorlet{mCblue}{cyan!50!gray}
+ \colorlet{mCred}{magenta!50!gray}
+ \tikzset{reactant/.style={draw=#1,fill=#1!10,minimum width=.8\textwidth,inner sep=1em,rounded corners}}
+ \mCsetup{arrowlength=3em,arrowline=very thick}
+ \reactant[,,reactant=mCgreen]{
+ \chemname{\chemfig{Alky|l--[6](-[4,,,2]Acy|l)-[6]-O-P(=[2]O)(-[6]O|\om)-O-[:-30]-[:30]-[:-30]NH_2}}{\bfseries Phosphatidylethanolamine}
+ }
+ \arrow[below]{\textit{N}-acyltransferase}{}
+ \reactant[below,,reactant=mCblue]{
+ \chemname{\chemfig{Alky|l--[6](-[4,,,2]Acy|l)-[6]-O-P(=[2]O)(-[6]O|\om)-O-[:-30]-[:30]-[:-30]\chembelow{N}{H}-[:30](=[2]O)-[:-30]-[:30]-[:-30]-[:30]=_-[:-30]-[:30]=_-[:-60]-[::-60]=_[:180]-[::-30]-[::60]=_[:180]-[::-30]-[::60]-[::-60]-[::60]-[6]}}{\bfseries\textit{N}-arachidonoyl-PE}
+ }
+ \arrow[below]{Phospholipase D}{}
+ \reactant[below,,reactant=mCred]{
+ \chemname{\chemfig{HO-[:-30]-[:30]-[:-30]\chembelow{N}{H}-[:30](=[2]O)-[:-30]-[:30]-[:-30]-[:30]=_-[:-30]-[:30]=_-[:-60]-[::-60]=_[:180]-[::-30]-[::60]=_[:180]-[::-30]-[::60]-[::-60]-[::60]-[6]}}{\bfseries Anandamide}
+ }
+ \mCsetup{reset}
+\end{rxnscheme}
+This is an example for the usage of the \lstinline+<tikz>+ option. Please take a closer look at lines \numlist{5;7;11;15}.
+\begin{lstlisting}
+ \begin{rxnscheme}{Change the layout with \TikZ}
+ \colorlet{mCgreen}{green!50!gray}
+ \colorlet{mCblue}{cyan!50!gray}
+ \colorlet{mCred}{magenta!50!gray}
+ !!\tikzset{reactant/.style={draw=#1,fill=#1!10,minimum width=.8\textwidth,inner sep=1em,rounded corners}}!!
+ \mCsetup{arrowlength=3em,arrowline=very thick}
+ \reactant[,,!!reactant=mCgreen!!]{
+ \chemname{\chemfig{Alky|l--[6](-[4,,,2]Acy|l)-[6]-O-P(=[2]O)(-[6]O|\om)-O-[:-30]-[:30]-[:-30]NH_2}}{\bfseries Phosphatidylethanolamine}
+ }
+ \arrow[below]{}{\textit{N}-acyltransferase}
+ \reactant[below,,!!reactant=mCblue!!]{
+ \chemname{\chemfig{Alky|l--[6](-[4,,,2]Acy|l)-[6]-O-P(=[2]O)(-[6]O|\om)-O-[:-30]-[:30]-[:-30]\chembelow{N}{H}-[:30](=[2]O)-[:-30]-[:30]-[:-30]-[:30]=_-[:-30]-[:30]=_-[:-60] -[::-60]=_[:180]-[::-30]-[::60]=_[:180]-[::-30]- [::60]-[::-60]-[::60]-[6]}}{\bfseries\textit{N}-arachidonoyl-PE}
+ }
+ \arrow[below]{}{Phospholipase D}
+ \reactant[below,,!!reactant=mCred!!]{
+ \chemname{\chemfig{HO-[:-30]-[:30]-[:-30]\chembelow{N}{H}-[:30](=[2]O)-[:-30]-[:30]-[:-30]-[:30]=_-[:-30]-[:30]=_-[:-60] -[::-60]=_[:180]-[::-30]-[::60]=_[:180]-[::-30]- [::60]-[::-60]-[::60]-[6]}}{\bfseries Anandamide}
+ }
+ \mCsetup{reset}
+ \end{rxnscheme}
+\end{lstlisting}
+
+\section{Claisen-Kondensation}
+\begin{rxnscheme}{Claisen-Kondensation}
+ \colorlet{mCred}{red!50!gray}
+ \setatomsep{1.5em}
+ % Ergebnis:
+ \branch[,one,draw=mCred,fill=mCred!10,rounded corners,inner sep=.5em]{
+ \reactant{\chemfig{[:30]-(=[2]O)-[:-30]O--[:-30]}}
+ \chemand
+ \reactant{\chemfig{[:30]-(=[2]O)-[:-30]O--[:-30]}}
+ \arrow[,,2]{\ce{NaOEt}, \ce{EtOH}}{}
+ \reactant{\chemfig{[:30]-(=[2]O)-[:-30]-(=[2]O)-[:-30]O--[:-30]}}
+ }
+ % Mechanismus:
+ \branch[-90,,xshift=-13.5em]{
+ \arrow[-90,<<=>]{\ce{{}\om OEt}}{}
+ }
+ \mesomeric[-90,two,xshift=4.5em]{
+ \reactant{\chemfig{[:30](-[:150,.3,,,draw=none]@{C1}\scriptstyle\ominus)-(=[2]O)-[:-30]O--[:-30]}}
+ \marrow
+ \reactant{\chemfig{[:30]=(-[2]O|\om)-[:-30]O--[:-30]}}
+ }
+ \chemand
+ \reactant{\ce{EtOH}}
+ \branch[two.-90,three,xshift=-5.5em]{
+ \arrow[-90,<=>,,,both]{\chemfig[][scale=.7]{[:30]-@{C2}(=[@{b1}2]O@{O1})-[:-30]O--[:-30]}}{}
+ }
+ \reactant[three.-90]{\chemfig{-(-[@{b2}2]@{O2}O|\om)(-[6]-[:-30](=[6]O)-[:30]O-[:-30]-[:30])-[@{b3}]@{O3}O-[:30]-[:-30]}}
+ \arrow[,<=>]{}{}
+ \reactant[,four]{\chemfig{[:30]-(=[2]O)-[:-30]@{C3}(-[:-120]H)(-[@{b4}:-60]H@{H})-(=[2]O)-[:-30]O--[:-30]}}
+ \chemand
+ \reactant{\chemfig{\om @{O4}OEt}}
+ \arrow[four.-90]{}{}
+ \mesomeric[-90]{
+ \reactant{\chemfig{[:30]-(=[2]O)-[:-30]=(-[2]O|\om)-[:-30]O--[:-30]}}
+ \marrow
+ \reactant{\chemfig{[:30]-(=[2]O)-[:-30](-[6,.3,,,draw=none]\scriptstyle\ominus)-(=[2]O)-[:-30]O--[:-30]}}
+ \marrow
+ \reactant{\chemfig{[:30]-(-[2]O|\om)=[:-30]-(=[2]O)-[:-30]O--[:-30]}}
+ }
+ \arrow[-90]{\Hpl, \ce{H2O}}{}
+ \reactant[-90]{\chemfig{[:30]-(=[2]O)-[:-30]-(=[2]O)-[:-30]O--[:-30]}}
+ \anywhere{one.0}{
+ \elmove{C1}{-100:2cm}{C2}{-90:2cm}
+ \elmove{b1}{10:5mm}{O1}{0:5mm}
+ \elmove{O2}{180:5mm}{b2}{180:5mm}
+ \elmove{b3}{80:5mm}{O3}{90:5mm}
+ \elmove{b4}{0:5mm}{C3}{0:7mm}
+ \elmove{O4}{-90:1cm}{H}{-45:1cm}
+ }
+\end{rxnscheme}
+
+\begin{lstlisting}
+ \begin{rxnscheme}{Claisen-Kondensation}
+ \colorlet{mCred}{red!50!gray}
+ \setatomsep{1.5em}
+ % Ergebnis:
+ \branch[,one,draw=mCred,fill=mCred!10,rounded corners,inner sep=.5em]{
+ \reactant{\chemfig{[:30]-(=[2]O)-[:-30]O--[:-30]}}
+ \chemand
+ \reactant{\chemfig{[:30]-(=[2]O)-[:-30]O--[:-30]}}
+ \arrow[,,2]{\ce{NaOEt}, \ce{EtOH}}{}
+ \reactant{\chemfig{[:30]-(=[2]O)-[:-30]-(=[2]O)-[:-30]O--[:-30]}}
+ }
+ % Mechanismus:
+ \branch[-90,,xshift=-13.5em]{
+ \arrow[-90,<=>]{\ce{{}\om OEt}}{}
+ }
+ \mesomeric[-90,two,xshift=4.5em]{
+ \reactant{\chemfig{[:30](-[:150,.3,,,draw=none]@{C1}\scriptstyle\ominus)-(=[2]O)-[:-30]O--[:-30]}}
+ \marrow
+ \reactant{\chemfig{[:30]=(-[2]O|\om)-[:-30]O--[:-30]}}
+ }
+ \chemand
+ \reactant{\ce{EtOH}}
+ \branch[two.-90,three,xshift=-5.5em]{
+ \arrow[-90,<=>,,,both]{\chemfig[][scale=.7]{[:30]-@{C2}(=[@{b1}2]O@{O1})-[:-30]O--[:-30]}}{}
+ }
+ \reactant[three.-90]{\chemfig{-(-[@{b2}2]@{O2}O|\om)(-[6]-[:-30](=[6]O)-[:30]O-[:-30]-[:30])-[@{b3}]@{O3}O-[:30]-[:-30]}}
+ \arrow[,<=>]{}{}
+ \reactant[,four]{\chemfig{[:30]-(=[2]O)-[:-30]@{C3}(-[:-120]H)(-[@{b4}:-60]H@{H})-(=[2]O)-[:-30]O--[:-30]}}
+ \chemand
+ \reactant{\chemfig{\om @{O4}OEt}}
+ \arrow[four.-90]{}{}
+ \mesomeric[-90]{
+ \reactant{\chemfig{[:30]-(=[2]O)-[:-30]=(-[2]O|\om)-[:-30]O--[:-30]}}
+ \marrow
+ \reactant{\chemfig{[:30]-(=[2]O)-[:-30](-[6,.3,,,draw=none]\scriptstyle\ominus)-(=[2]O)-[:-30]O--[:-30]}}
+ \marrow
+ \reactant{\chemfig{[:30]-(-[2]O|\om)=[:-30]-(=[2]O)-[:-30]O--[:-30]}}
+ }
+ \arrow[-90]{\Hpl, \ce{H2O}}{}
+ \reactant[-90]{\chemfig{[:30]-(=[2]O)-[:-30]-(=[2]O)-[:-30]O--[:-30]}}
+ \anywhere{one.0}{
+ \elmove{C1}{-100:2cm}{C2}{-90:2cm}
+ \elmove{b1}{10:5mm}{O1}{0:5mm}
+ \elmove{O2}{180:5mm}{b2}{180:5mm}
+ \elmove{b3}{80:5mm}{O3}{90:5mm}
+ \elmove{b4}{0:5mm}{C3}{0:7mm}
+ \elmove{O4}{-90:1cm}{H}{-45:1cm}
+ }
+ \end{rxnscheme}
+\end{lstlisting}
+
+
+\section{Extensive Synthesis}\label{sec:tikzsynthese}
+As last example we can create extensive syntheses, using the \lstinline=\merge= command.
+\begin{rxnscheme}[,,,.8]{Extensive Synthesis}
+ \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}[,,,.8]{Extensive Synthesis}
+ \setatomsep{1.5em}
+ \branch[,start_left]{
+ \reactant{\chemfig{=_[::30]-[::-60]-[::60](-[::-60])(-[::120])-[::0]OH}}
+ \arrow[below]{\ce{HBr}}{}
+ \reactant[below]{\chemfig{Br-[::30]-[::-60]=_[::60](-[::-60])-[::60]}}
+ }
+ \branch[right=of start_left,start_center,yshift=1em]{
+ \reactant{\chemname{\chemfig[][scale=.8]{**6(--(-SO_2Cl)---(-)-)}}{tosyle chloride}}
+ \arrow[below]{\ce{NaOH}}{\ce{Zn}}
+ \reactant[below]{\chemfig[][scale=.8]{**6(--(-SO_2Na)---(-)-)}}
+ }
+ \branch[right=of start_center,start_right,xshift=3em,yshift=-10em]{
+ \reactant{\chemname{\chemfig{-[::30](-[::60])=_[::-60]-[::60]COOH}}{3-methyl-2-butenoic acid}}
+ \arrow[below]{\ce{CH3OH}}{}
+ \reactant[below]{\chemfig{-[::30](-[::60])=_[::-60]-[::60]CO_2CH_3}}
+ }
+ \branch[below=of start_left,target_one,xshift=5em,yshift=-5em]{
+ \reactant{\chemfig[][scale=.8]{**6(--(-SO_2-[:30]-[::-60]=_[::60](-[::60])-[::-60])---(-)-)}}
+ }
+ \branch[below=of target_one,target_two,xshift=6em,yshift=-6em]{
+ \mesomeric{\chemfig[][scale=.8]{-[::30](-[::60])=^[::-60]-[::60](-[::60]S(=[::90]O)(=[::-90]O)-[::0]**6(---(-)---))-[::-60](-[::0])(-[::-120])-[::60](-[::60,.5,,,white]\ominus)-[::-60]CO_2CH_3}}
+ \arrow[below,,.5]{}{}
+ \arrow[below,,.5]{\ce{KOH}}{}
+ \reactant[below]{\chemname{\chemfig{-[::-30](-[::-60])=^[::60]>[::-60](-[::90,1.2])-[::30,1.2](-[::120,1.2](-[::-60])-[::0])<:[::-30]COOH}}{\emph{trans}-chrysanthemum acid}}
+ }
+ \merge{target_one}{start_left}{start_center}
+ \merge[\ce{NaOCH3}]{target_two}{target_one}{start_right}
+ \end{rxnscheme}
+\end{lstlisting}
+Let's go through the code, piece by piece.
+\begin{lstlisting}
+ \begin{rxnscheme}[,,,.8]{Extensive Synthesis}
+ \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 \numlist{1;2} we begin the environment and make sure, that the formul\ae\ don't become to big. In lines \numrange{3}{7} the first two reactants are written (lines \numlist{4;6}) and connected with an arrow (line \num{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 \numrange{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 \numrange{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 \numrange{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, 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}
+\end{document} \ No newline at end of file
diff --git a/Master/texmf-dist/doc/latex/mychemistry/mychemistry_de.pdf b/Master/texmf-dist/doc/latex/mychemistry/mychemistry_de.pdf
index 2f4df923e5f..5d8bb9e9151 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 74c130f8581..07a85abe8a2 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/15 ------------------------------------------------------------------------ %
+% - 2011/04/23 ------------------------------------------------------------------------ %
% ------------------------------------------------------------------------------------- %
% - http://www.niederberger-berlin.net/2011/02/latex-mychemistry/ --------------------- %
% - kontakt@niederberger-berlin.net --------------------------------------------------- %
@@ -37,15 +37,20 @@
\usepackage{etoolbox}
\usepackage{scrhack} % verbessert KOMAs Zusammenspiel mit floats
\usepackage{emerald} % chemfig-Schrift
-\usepackage[utf8x]{inputenc} % Zeichenkodierung: Eingabe
+\usepackage[utf8]{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}
+\usepackage{siunitx,booktabs}
\DeclareSIUnit{\emlength}{em}
\DeclareSIUnit{\pt}{pt}
+ \sisetup{list-final-separator = { und },
+ range-phrase = { bis },
+ separate-uncertainty = true,
+ exponent-product = \cdot,
+ per-mode = symbol}
\usepackage{listings,fancyvrb} % wortwörtliche Anzeige
\newcommand{\vitem}[1][]{\SaveVerb[aftersave={\item[\textnormal{\UseVerb[#1]{vsave}}]}]{vsave}}
\usepackage[perpage,multiple]{footmisc} % Fußnoten
@@ -53,6 +58,7 @@
\labelformat{section}{Ab\-schnitt #1}
\labelformat{subsection}{Ab\-schnitt #1}
\labelformat{subsubsection}{Ab\-schnitt #1}
+ \labelformat{table}{Ta\-bel\-le #1}
\usepackage[dvipsnames]{xcolor} % Farbe
\colorlet{code}{RawSienna}
\xdefinecolor{MyDarkRed}{rgb}{0.4392,0.0627,0.0627}
@@ -83,7 +89,7 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\usepackage{hyperref}
\hypersetup{colorlinks=true, % Setup der Hyperlinks und des pdf
- linkcolor=green!50!black,
+ linkcolor=MyDarkRed!20!red,
urlcolor=blue!70,
plainpages=false,
bookmarksopen=true,
@@ -92,7 +98,7 @@
pdfstartview=FitH,
pdfauthor={Clemens Niederberger},
pdftitle={myChemistry},
- pdfsubject={Creating reactionschemes with LaTeX},
+ pdfsubject={Create reaction schemes with LaTeX and ChemFig},
pdfkeywords={myChemistry},
pdfcreator={LaTeX}
}
@@ -123,7 +129,7 @@
keywordstyle=[20]\color{blue},
morekeywords=[20]{rxn,rxnfloat,rxnscheme,tikzpicture},
texcsstyle=[30]\color{code},
- moretexcs=[30]{anywhere,arrow,branch,chemabove,chemand,chembelow,chemfig,chemmove,chemname,chemrel,chemsign,ce,color,compound,declarecompound,draw,dummy,elmove,floatplacement,floatstyle,Hpl,Hyd,lewis,listof,makeinvisible,makevisible,marrow,mCsetup,merge,mesomeric,node,nu,om,op,ox,pgfpositionnodelater,reactant,restylefloat,setarrowlength,setarrowline,setatomsep,setatomsize,setbondlength,setbondshape,setbondwidth,setcrambond,setmergelength,setrcndist,setrxnalign,setschemealign,setschemename,si,SI,textcolor,transition},
+ moretexcs=[30]{anywhere,arrow,branch,chemabove,chemand,chembelow,chemfig,chemmove,chemname,chemrel,chemsign,ce,color,compound,declarecompound,draw,dummy,elmove,floatplacement,floatstyle,Hpl,Hyd,lewis,listof,makeinvisible,makevisible,marrow,mCsetup,merge,mesomeric,node,nu,om,op,ox,pgfpositionnodelater,reactant,restylefloat,setarrowlabel,setarrowlength,setarrowline,setatomsep,setatomsize,setbondlength,setbondshape,setbondwidth,setcrambond,setmergelength,setrcndist,setrxnalign,setschemealign,setschemename,si,SI,textcolor,transition,vflipnext},
fancyvrb=true
}
@@ -135,6 +141,7 @@
\setheadwidth{textwithmarginpar}
\automark{section}
\ihead{\mC v\mCversion}
+\ohead{\bfseries Dokumentation}
\ifoot{\small\color{gray}-~Seite~\thepage~-}
\cfoot{}
\ofoot{}
@@ -238,7 +245,7 @@
\makeatother
% - weitere Makros -------------------------------------------------------------------- %
-\newcommand{\mC}{{\color{MyDarkRed}\sffamily myChemistry}\xspace} % Paketname
+\newcommand{\mC}{{\color{MyDarkRed}\ECFJD my\-Chemis\-try}\xspace} % Paketname
\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}
@@ -263,31 +270,27 @@
\chemfig{C(-[4]*6(=-=-=-))(-[2]*6(=-=-=-))(-[6,,,2]HO)-C(-[2]CH_3)
(-[6]OH)-CH_3}
}
- \branch[above right=of a]{
- \arrow[above right,,.7]{}{}
- \reactant[above right]{
- \chemfig{C(-[4]*6(=-=-=-))(-[2]*6(=-=-=-))(-[@{e1}6,,,2]H_2@{e2}
- \chembelow{O}{\oplus})-C(-[2]CH_3)(-[6]OH)-CH_3}\elmove{e1}
- {10:4mm}{e2}{-10:4mm}
- }
- \arrow{$-\ce{H2O}$}{}
- \reactant{
- \chemfig{\chembelow{C}{\oplus}(-[4]*6(=-=-=-))(-[2]*6(=-=-=-))-C
- (-[2]CH_3)(-[6]OH)-CH_3}
- }
+ \arrow[a.20]{}{}
+ \reactant[20]{
+ \chemfig{C(-[4]*6(=-=-=-))(-[2]*6(=-=-=-))(-[@{e1}6,,,2]H_2@{e2}
+ \chembelow{O}{\oplus})-C(-[2]CH_3)(-[6]OH)-CH_3}\elmove{e1}
+ {10:4mm}{e2}{-10:4mm}
}
- \branch[below right=of a]{
- \arrow[below right,-|>.7]{}{}
- \reactant[below right]{
- \chemfig{C(-[4]*6(=-=-=-))(-[2]*6(=-=-=-))(-[6,,,2]HO)-C(-[2]CH_3)
- (-[@{e3}6]@{e4}\chembelow{O}{\oplus}H_2)-CH_3}\elmove{e3}
- {170:4mm}{e4}{-170:4mm}
- }
- \arrow{$-\ce{H2O}$}{}
- \reactant{
- \chemfig{C(-[4]*6(=-=-=-))(-[2]*6(=-=-=-))(-[6,,,2]HO)-
- \chembelow{C}{\oplus}(-[2]CH_3)-CH_3}
- }
+ \arrow[,,1.42]{$-\ce{H2O}$}{}
+ \reactant{
+ \chemfig{\chembelow{C}{\oplus}(-[4]*6(=-=-=-))(-[2]
+ *6(=-=-=-))-C(-[2]CH_3)(-[6]OH)-CH_3}
+ }
+ \arrow[a.-20,-|>]{}{}
+ \reactant[-20]{
+ \chemfig{C(-[4]*6(=-=-=-))(-[2]*6(=-=-=-))(-[6,,,2]HO)-C(-[2]CH_3)
+ (-[@{e3}6]@{e4}\chembelow{O}{\oplus}H_2)-CH_3}\elmove{e3}
+ {170:4mm}{e4}{-170:4mm}
+ }
+ \arrow[,,1.42]{$-\ce{H2O}$}{}
+ \reactant{
+ \chemfig{C(-[4]*6(=-=-=-))(-[2]*6(=-=-=-))(-[6,,,2]HO)-
+ \chembelow{C}{\oplus}(-[2]CH_3)-CH_3}
}
\end{rxn}
\end{verbatim}%
@@ -301,22 +304,18 @@
\color{white}\huge Reaktionsschemata mit \LaTeX\ und \CF erstellen%
\end{center}
\vskip3cm
- \begin{rxn}[,.7]
- \setatomsep{1.5em}\footnotesize
- \reactant[,a]{ \chemfig{C(-[4]*6(=-=-=-))(-[2]*6(=-=-=-))(-[6,,,2]HO)-C(-[2]CH_3)(-[6]OH)-CH_3} }
- \branch[above right=of a]{
- \arrow[above right,,.7]{}{}
- \reactant[above right]{ \chemfig{C(-[4]*6(=-=-=-))(-[2]*6(=-=-=-))(-[@{e1}6,,,2]H_2@{e2}\chembelow{O}{\oplus})-C(-[2]CH_3)(-[6]OH)-CH_3}\elmove{e1}{10:4mm}{e2}{-10:4mm} }
- \arrow{$-\ce{H2O}$}{}
- \reactant{ \chemfig{\chembelow{C}{\oplus}(-[4]*6(=-=-=-))(-[2]*6(=-=-=-))-C(-[2]CH_3)(-[6]OH)-CH_3} }
- }
- \branch[below right=of a]{
- \arrow[below right,-|>,.7]{}{}
- \reactant[below right]{ \chemfig{C(-[4]*6(=-=-=-))(-[2]*6(=-=-=-))(-[6,,,2]HO)-C(-[2]CH_3)(-[@{e3}6]@{e4}\chembelow{O}{\oplus}H_2)-CH_3}\elmove{e3}{170:4mm}{e4}{-170:4mm} }
- \arrow{$-\ce{H2O}$}{}
- \reactant{ \chemfig{C(-[4]*6(=-=-=-))(-[2]*6(=-=-=-))(-[6,,,2]HO)-\chembelow{C}{\oplus}(-[2]CH_3)-CH_3} }
- }
- \end{rxn}
+\begin{rxn}[,.7]
+ \setatomsep{1.5em}\footnotesize
+ \reactant[,a]{ \chemfig{C(-[4]*6(=-=-=-))(-[2]*6(=-=-=-))(-[6,,,2]HO)-C(-[2]CH_3)(-[6]OH)-CH_3} }
+ \arrow[a.20]{}{}
+ \reactant[20]{ \chemfig{C(-[4]*6(=-=-=-))(-[2]*6(=-=-=-))(-[@{e1}6,,,2]H_2@{e2}\chembelow{O}{\oplus})-C(-[2]CH_3)(-[6]OH)-CH_3}\elmove{e1}{10:4mm}{e2}{-10:4mm} }
+ \arrow[,,1.42]{$-\ce{H2O}$}{}
+ \reactant{ \chemfig{\chembelow{C}{\oplus}(-[4]*6(=-=-=-))(-[2]*6(=-=-=-))-C(-[2]CH_3)(-[6]OH)-CH_3} }{}
+ \arrow[a.-20,-|>]{}{}
+ \reactant[-20]{ \chemfig{C(-[4]*6(=-=-=-))(-[2]*6(=-=-=-))(-[6,,,2]HO)-C(-[2]CH_3)(-[@{e3}6]@{e4}\chembelow{O}{\oplus}H_2)-CH_3}\elmove{e3}{170:4mm}{e4}{-170:4mm} }
+ \arrow[,,1.42]{$-\ce{H2O}$}{}
+ \reactant{ \chemfig{C(-[4]*6(=-=-=-))(-[2]*6(=-=-=-))(-[6,,,2]HO)-\chembelow{C}{\oplus}(-[2]CH_3)-CH_3} }
+\end{rxn}
\end{titlepage}
\tableofcontents
@@ -336,7 +335,7 @@ Nicht zuletzt steht \mC ab v1.2 nun unter der LPPL Version 1.3 oder später.
\subsubsection{Version 1.3}
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>]{}
+ \befehl[<pos>,<name>,<tikz>]{}
\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}
@@ -353,18 +352,27 @@ Wenn man \CF v0.4 oder v0.4a verwendet, wird die Datei \lstinline+bondwidth.tex+
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.
-\subsubsection{Version \mCversion}
-\NEU%
+\subsubsection{Version 1.4}
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}.
-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}.
+Die Keys von \lstinline+\arrow+ sind in Optionen verändert worden, um die Syntax des Befehls mit den anderen anzugleichen. Zudem gibt es drei neue 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.
+\subsubsection{Version \mCversion}
+\NEU%
+Im Hintergrund ist viel passiert, was einige neue Features bei der Anwendung gebracht hat. Die wichtigste Neuerung ist eine deutlich flexiblere Richtungsangabe bei allen Befehlen (Reaktanden, Pfeile, Zweige \ldots). Anstelle der starren \lstinline+right below+ u.\,ä. kann jetzt der Winkel angegeben werden.
+
+Es gibt die neuen Pfeiltypen \lstinline+<=>>+ und \lstinline+<<=>+, mit denen ein verschobenes Gleichgewicht angezeigt werden kann.
+
+Die Default-Platzierung von \lstinline+rxnscheme+ wurde von \lstinline+H+ in \lstinline+htp+ geändert.
+
+Die konkreten Einsatz-Beispiele wurden aus der Dokumentation ausgelagert und befinden sich in der Datei \texttt{examples.tex} bzw. \texttt{examples.pdf}.
+
\subsection{Lizenz}
\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})
@@ -377,7 +385,7 @@ Damit \mC funktionieren kann, müssen ein paar Pakete installiert sein:
\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.
+ Genauer: der Befehl \lstinline=\pgfpositionnodelater= muss verfügbar sein. Noch genauer benötigt die Option \lstinline+both+ des Befehls \lstinline+\arrow+ diese Version. Wenn Sie die Option nicht verwenden, sollte \mC auch mit pgf v2.00 problemlos funktionieren. Ältere Versionen wurden nicht getestet.
\end{description}
\index{Voraussetzungen|)}
@@ -406,7 +414,7 @@ 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 \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.
+\mC stellt zwei Umgebungen zur Verfügung, innerhalb derer die Reaktionsmechanismen erstellt werden. Beide Umgebungen sind letztlich eine \lstinline+tikzpicture+-Um\-ge\-bung. 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 \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.
@@ -443,13 +451,18 @@ Dadurch ergeben sich einige Möglichkeiten, die `nodes' relativ zueinander zu pl
\node [draw,on chain] {C};
\end{tikzpicture}
\end{SideBySideExample}
-Sie müssen das nicht in allen Konsequenzen nachvollziehen, sollten aber die Richtungsangaben des letzten Beispiels in Erinnerung behalten, denn sie werden von \mC ebenfalls verwendet.
-
-In manchen Beispielen der Dokumentation werden die Nodes farbig eingerahmt (siehe \ref{ssec:makevisible}), damit man sehen kann, welchen Platz sie einnehmen und welchen Effekt eine Änderung der Ausrichtung hat.
+Sie müssen das nicht in allen Konsequenzen nachvollziehen, das Grundprinzip sollte reichen.
\subsection{Wie funktioniert's?}
\subsubsection{Basisbefehle}
-Sehen wir uns zunächst ein Beispiel an:
+Basis bilden folgende drei Befehle:\index{reactant}\index{rxn}\index{arrow}
+\begin{lstlisting}
+ \begin{rxn}[<ausrichtung>,<skalierung>]
+ \reactant[<pos>,<name>,<tikz>]{<formel>}
+ \arrow[<pos>,<typ>,<längenfaktor>,<name>,both,<tikz>]{<oben>}{<unten>}
+ \end{rxn}
+\end{lstlisting}
+Die Schemata werden innerhalb der \lstinline+rxn+-Umgebung erstellt. Dort werden Reaktanden und Pfeile gesetzt.
\begin{SideBySideExample}
\begin{rxn}
\reactant{ \chemfig{-[::30]-[::-60]OH} }
@@ -457,93 +470,202 @@ Sehen wir uns zunächst ein Beispiel an:
\reactant{ \chemfig{-[::30]=_[::-60]O} }
\end{rxn}
\end{SideBySideExample}
-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}
+Ohne Optionen werden Reaktanden und Pfeile immer rechts voneinander gesetzt. Möchte man das nicht, hat man die Möglichkeit, über \lstinline+<pos>+ die Positionierung zu ändern.
+\begin{SideBySideExample}
+ % Anordnung mit Schluesselwoertern:
+ \begin{rxn}
+ \reactant{ \chemfig{-[::30]-[::-60]OH} }
+ \arrow[below]{Ox.}{}
+ \reactant[below]{ \chemfig{-[::30]=_[::-60]O} }
+ \end{rxn}
+ % Anordnung durch Angabe des Winkels zur Horizontalen:
+ \begin{rxn}
+ \reactant{ \chemfig{-[::30]-[::-60]OH} }
+ \arrow[180]{}{Ox.}
+ \reactant[180]{ \chemfig{-[::30]=_[::-60]O} }
+ \end{rxn}
+\end{SideBySideExample}
+\begin{table}
+ \centering
+ \begin{tabular}{>{\tt}lSS}
+ \toprule
+ {\normalfont Schlüsselwort} & {pos. Winkel} & {neg. Winkel} \\
+ \midrule
+ right & 0 & \pm 360 \\
+ right above & 45 & -315 \\
+ above & 90 & -270 \\
+ above left & 135 & -225 \\
+ left & 180 & -180 \\
+ below left & 225 & -135 \\
+ below & 270 & -90 \\
+ below right & 315 & -45 \\
+ \bottomrule
+ \end{tabular}
+ \caption{Schlüsselwörter zur Positionierung}\label{tab:keywords}
+\end{table}
+Sie sehen im letzten Beispiel, dass die Positionierung durch Schlüsselwörter (siehe \ref{tab:keywords}) wie \lstinline+below+ oder durch Angabe eines Winkels aus dem Intervall $[\ang{-360};\ang{360}]$ zur Horizontalen. \ang{0} entspricht \lstinline+right+, der Voreinstellung. \emph{Positive Winkel} bedeuten eine Drehung im \emph{Gegenuhrzeigersinn}, negative eine im Uhrzeigersinn, ganz in der mathematischen Bedeutung.
+\begin{SideBySideExample}
+ \begin{rxn}
+ \reactant{ \chemfig{-[::30]-[::-60]OH} }
+ \arrow[20]{Ox.}{}
+ \reactant[20]{ \chemfig{-[::30]=_[::-60]O} }
+ \end{rxn}
+ \begin{rxn}
+ \reactant{ \chemfig{-[::30]-[::-60]OH} }
+ \arrow[-20]{Ox.}{}
+ \reactant[-20]{ \chemfig{-[::30]=_[::-60]O} }
+ \end{rxn}
+\end{SideBySideExample}
+
+\subsubsection{Positionierung}
+Die Reaktanden und Pfeile können nicht nur durch Schlüsselwörter und Winkel alleine positioniert werden, sondern auch in Bezug auf einen anderen Reaktanden oder Pfeil.
+\begin{Example}
+ \begin{rxn}
+ \reactant[,start]{ \chemfig{R-[::30](-[::60]R|^1) (-[::-120]R|^2)-[::-60]OH} }
+ \arrow[40]{\tiny$\text{R}^1=\text{H}$} {\tiny$\text{R}^2=\text{H}$}
+ \reactant[40]{ \chemfig{R-[::30]=_[::-60]O} }
+ \arrow[start.0]{\tiny$\text{R}^1=\text{Alkyl}$} {\tiny$\text{R}^2=\text{H}$}
+ \reactant{ \chemfig{R-[::30](-[::60]R)=_[::-60]O} }
+ \arrow[start.-40,-|>]{\tiny$\text{R}^1=\text{Alkyl}$} {\tiny$\text{R}^2=\text{Alkyl}$}
+ \end{rxn}
+\end{Example}
+Im letzen Beispiel wurden dem ersten Reaktanden der \lstinline+<name>+ \lstinline+start+ gegeben. Darauf konnten sich die Pfeile in Zeilen 5 und 7 in der Positionierung beziehen. Der \emph{zuvor vergebene Name} fungiert als Anker für den nächsten Reaktanden oder Pfeil, wenn die Positionierung nach dem Muster
\begin{lstlisting}
- \arrow[<richtung>,<typ>,<längenfaktor>,<anker>,both]{<oben>}{<unten>}
+ <anker>.<winkel>
\end{lstlisting}
-schreibt in der Standardeinstellung einen \SI{5}{\emlength} langen einfachen Pfeil nach rechts (siehe \ref{ssec:arrow}).
+angegeben wird. Auch Pfeile können einen Anker bekommen. Der Ankerpunkt eines Pfeils sitzt immer in der Mitte eines Pfeils und hat \emph{keine} Ausdehnung.
\begin{SideBySideExample}
\begin{rxn}
- \reactant{ \chemfig{-[::30]=_[::-60]O} }
- \arrow[below]{}{Ox.}
- \reactant[below]{ \chemfig{-[::30](-[::60]OH)=_[::-60]O} }
+ \reactant{\chemfig{[:60]-(-[::60])=[::-60](-[::-60])-}}
+ \arrow[,,,pfeil]{}{}
+ \reactant[pfeil.90]{\ce{H2O}}
\end{rxn}
\end{SideBySideExample}
-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.
+Bei dieser Art der Positionierung wird die Kette, aud der die Reaktanden und Pfeile sitzen, \emph{nicht} unterbrochen.
+\begin{lstlisting}
+ \begin{rxn}
+ \reactant[,a]{A}
+ \arrow{}{}
+ \reactant{B}
+ \arrow[a.-90]{}{}
+ \reactant[-90]{C}
+ \arrow[a.180]{}{}
+ \reactant[180]{D}
+ \end{rxn}
+\end{lstlisting}
+Alle sieben Objekte dieses Beispiels sitzen logisch gesehen auf einer Kette. Das nächste Objekt wird nun per Default rechts daneben geschrieben, wenn keine andere Positionierung angegeben wird.
+\begin{rxn}
+ \tikzset{nummer/.style={circle,fill=gray!30,draw=gray,minimum size=3.5mm}}
+ \reactant[,a]{A}\arrow[,,,pa]{}{}\reactant[,b]{B}
+ \arrow[a.-90,,,pb]{}{}\reactant[-90,c]{C}
+ \arrow[a.180,,,pc]{}{}\reactant[180,d]{D}
+ \anywhere{a.45,,nummer}{1}
+ \anywhere{pa.90,,nummer}{2}
+ \anywhere{b.45,,nummer}{3}
+ \anywhere{pb.0,,nummer}{4}
+ \anywhere{c.45,,nummer}{5}
+ \anywhere{pc.90,,nummer}{6}
+ \anywhere{d.45,,nummer}{7}
+\end{rxn}
\subsubsection{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.\index{branch}
+Um die Kette zu unterbrechen, gibt es den folgenden Befehl:\index{branch}
+\begin{lstlisting}
+ \branch[<pos>,<name>,<tikz>]{<formeln>}
+\end{lstlisting}
+Bei einem Branch funktioniert die Positionierung ein bisschen anders als bei den bisherigen Objekten, auch wenn die Syntax ähnlich ist. Zusätzlich zu den drei bisherigen Positionierungsmöglichkeiten kommen beim Branch noch zwei weitere dazu. Alle Positionierungen, die sich auf einen Anker beziehen, sorgen dafür, dass der Branch \emph{nicht} auf der Kette sitzt, sondern ein echter Ast ist.
+\begin{lstlisting}
+ <winkel> % auf der Kette
+ <schluessel> % auf der Kette
+ <anker>.<winkel> % nicht auf der Kette
+ on chain=going <schluessel> % auf der Kette
+ <schluessel>=of <anker> % nicht auf der Kette
+\end{lstlisting}
+Als \lstinline+<schluessel>+ können die Werte aus \ref{tab:keywords} verwendet werden.
\begin{Example}
\begin{rxn}
\reactant{ \chemfig{-[::30]-[::-60]OH} }
\arrow{}{}
\reactant[,carbonyl]{ \chemfig{-[::30]=_[::-60]O} }
- \arrow[below]{}{}
- \reactant[below]{ \chemfig{-[::30](-[::60]OH)=_[::-60]O} }
- \branch[right=of carbonyl]{
- \arrow[,<=>]{\ce{NH2R}}{}
- \reactant{ \chemfig{-[::30]=_[::-60]N(-[6]H)-[::60]R} }
+ \branch[carbonyl.-90]{
+ \arrow[-90,<=>]{\ce{NH2R}}{}
+ \reactant[-90]{ \chemfig{-[::30]=_[::-60]N(-[6]H)-[::60]R} }
}
+ \arrow{}{}
+ \reactant{ \chemfig{-[::30](-[::60]OH)=_[::-60]O} }
\end{rxn}
\end{Example}
-Im letzten Beispiel haben Sie einen weiteren wichtigen Befehl kennengelernt (siehe \ref{ssec:branch}):\index{branch}
+Beachten Sie im letzten Beispiel, dass der Pfeil und der Reaktand nach dem Branch die ursprüngliche Kette fortsetzen.
\begin{lstlisting}
- \vitem=\branch[<ausrichtung>,<anker>,<tikz>]{<zweig>}
+ \begin{rxn}
+ \reactant[,a]{A}
+ \arrow{}{}
+ \reactant{B}
+ \branch[a.-90]{
+ \arrow[-90]{}{}
+ \reactant[-90]{C}
+ }
+ \arrow[a.180]{}{}
+ \reactant[180]{D}
+ \end{rxn}
\end{lstlisting}
-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=\index{branch} können so umfangreichere Reaktionschemata entstehen:
+Die Kette wird durch den Ast unterbrochen, der seinerseits eine weitere Kette startet.
+\begin{rxn}
+ \tikzset{nummer/.style={circle,fill=gray!30,draw=gray,minimum size=3.5mm}}
+ \reactant[,a]{A}\arrow[,,,pa]{}{}\reactant[,b]{B}
+ \branch[a.-90]{
+ \arrow[-90,,,pb]{}{}\reactant[-90,c]{C}
+ \anywhere{pb.0,,nummer}{a}
+ \anywhere{c.45,,nummer}{b}
+ }
+ \arrow[a.180,,,pc]{}{}\reactant[180,d]{D}
+ \anywhere{a.45,,nummer}{1}
+ \anywhere{pa.90,,nummer}{2}
+ \anywhere{b.45,,nummer}{3}
+ \anywhere{pc.90,,nummer}{4}
+ \anywhere{d.45,,nummer}{5}
+\end{rxn}
+Durch \lstinline+\branch+ sind verzweigtere Schemata möglich:
\begin{Example}
\begin{rxn}
\reactant{ \chemfig{-[::30]-[::-60]OH} }
\arrow{}{}
\reactant[,carbonyl]{ \chemfig{-[::30]=_[::-60]O} }
- \arrow[below]{}{}
- \reactant[below]{ \chemfig{-[::30](-[::60]OH)=_[::-60]O} }
- \branch[right=of carbonyl,imin]{
+ \arrow[-90]{}{}
+ \reactant[-90]{ \chemfig{-[::30](-[::60]OH)=_[::-60]O} }
+ \branch[right=of carbonyl]{
\arrow[,<=>,1.12]{\ce{NH2R}}{}
\reactant{ \chemfig{-[::30]=_[::-60]N(-[6]H)-[::60]R} }
}
- \branch[below right=of carbonyl,halbacetal,yshift=-2pt,xshift=3pt]{
- \arrow[below right,<=>,1.12]{ \chemfig{[,.75]-[::30]-[::-60]OH} }{}
- \reactant[below right]{ \chemfig{-[::30](-[::60]O-[::-60]-[::-60])-[::-60]OH} }
- }
- \branch[above=of carbonyl,aldol,xshift=5.2em]{
- \arrow[above]{ \chemfig{[,.75]-[::30]=_[::-60]O}/\Hpl }{}
- \reactant[above]{ \chemfig{-[::30](-[::60]OH)-[::-60]-[::60]=[::60]O} }
- \arrow{$-\ce{H2O}$}{}
- \reactant{ \chemfig{-[::30]=[::-60]-[::60]=[::60]O} }
+ \branch[below right=of carbonyl]{
+ \arrow[-45,<=>,1.12]{ \chemfig{[,.75]-[::30]-[::-60]OH} }{}
+ \reactant[-45]{ \chemfig{-[::30](-[::60]O-[::-60]-[::-60])-[::-60]OH} }
}
+ \arrow[carbonyl.90]{ \chemfig{[,.75]-[::30]=_[::-60]O}/\Hpl }{}
+ \reactant[90]{ \chemfig{-[::30](-[::60]OH)-[::-60]-[::60]=[::60]O} }
+ \arrow{$-\ce{H2O}$}{}
+ \reactant{ \chemfig{-[::30]=[::-60]-[::60]=[::60]O} }
\end{rxn}
\end{Example}
\subsubsection{Nummerierte Schemata}
-Die zweite Umgebung von \mC funktioniert genau wie die erste, setzt das Reaktionsschema allerdings in eine nummerierte Gleitumgebung mit Überschrift.\index{rxnscheme}
+Es gibt noch eine weitere Umgebung, innerhalb derer Schemata erstellt werden können.\index{rxnscheme}
+\begin{lstlisting}
+ \begin{rxnscheme}[<label>,<platzierung>,<ausrichtung>,<skalierung>,<titel>]{<caption>}
+ ...
+ \end{rxnscheme}
+\end{lstlisting}
+Diese Umgebung stellt eine Gleitumgebung für Schemata bereit, die eine Beschriftung \lstinline+<caption>+, ein Label \lstinline+<label>+ und die üblichen Platzierungen \lstinline+<platzierung>+ wie \lstinline+hpt+ (Voreinstellung) erhalten kann.
\begin{Example}
- \begin{rxnscheme}{Keto-Enol-Tautomerie}
+ \begin{rxnscheme}[,H]{Keto-Enol-Tautomerie}
\reactant{ \chemfig{=[::30]-[::-60]OH} }
\arrow[,<=>]{}{}
\reactant{ \chemfig{-[::30]=[::-60]O} }
\end{rxnscheme}
\end{Example}
-Hier kommt die Umgebung
-\begin{lstlisting}
- \begin{rxnscheme}[<label>,<placement>,<align>,<scale>,<name>]{<caption>}
- ...
- \end{rxnscheme}
-\end{lstlisting}
-zum Einsatz. Wie Sie die Ihren Vorstellungen gemäß anpassen können, lesen Sie in der Befehlsreferenz (\ref{ssec:rxnscheme}).
\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:
+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:\index{setatomsep}\index{setcrambond}
\begin{lstlisting}
\setatomsep{1.8em}
\setcrambond{3pt}{0.5pt}{1pt}
@@ -561,33 +683,40 @@ Sie können die Voreinstellungen von \mC über folgende Befehle ändern:\index{s
\setbondshape{<basislänge>}{<strichdicke>}{<strichabstand>}
\setatomsize{<schriftgröße>}
\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=.
+Damit werden die Einstellungen nachfolgend \emph{für alle weiteren} \mC-Um\-ge\-bun\-gen 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}
- \reactant{\chemfig{-[::30](<[::60])-[::-60](<:[::-60])-[::60]}}
+ \reactant{\chemfig{-[::30](<[::60])-[::-60](<:[::-60])-[::60]A}}
\end{rxn}
\setbondlength{}\setbondshape{}{}{}\setatomsize{}
\begin{rxn}
- \reactant{\chemfig{-[::30](<[::60])-[::-60](<:[::-60])-[::60]}}
+ \reactant{\chemfig{-[::30](<[::60])-[::-60](<:[::-60])-[::60]A}}
\end{rxn}
\end{Example}
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
- \reactant{\chemfig{-[::30](<[::60])-[::-60](<:[::-60])-[::60]}}
+ \reactant{\chemfig{-[::30](<[::60])-[::-60](<:[::-60])-[::60]A}}
\end{rxn}
\begin{rxn}
- \reactant{\chemfig{-[::30](<[::60])-[::-60](<:[::-60])-[::60]}}
+ \reactant{\chemfig{-[::30](<[::60])-[::-60](<:[::-60])-[::60]A}}
\end{rxn}
\end{Example}
-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}
+Reaktionspfeile haben als Standardwert die Länge \SI{4}{\emlength}, die Standarddicke \lstinline+semithick+ und einen Beschriftungsabstand von \SI{0.2}{\emlength}. Die Voreinstellungen lassen sich mit den Befehlen\index{setarrowlength}\index{setarrowline}\index{setarrowlabel}
\begin{lstlisting}
\setarrowlength{<länge>}
+ \setarrowline{<liniendicke>}
+ \setarrowlabel{<label abstand>}
+\end{lstlisting}
+oder\index{mCsetup}
+\begin{lstlisting}
+ \mCsetup{arrowlength=<länge>,
+ arrowline=<liniendicke>,
+ arrowlabel=<label abstand>}
\end{lstlisting}
-\SaveVerb{arrowlength}=<länge>=%
-auf \UseVerb{arrowlength} bzw. $\text{\UseVerb{arrowlength}}\cdot\sqrt{2}$ ändern.
+ändern.
\index{Voreinstellungen|)}
\subsection{Paket-Optionen}\label{ssec:paketoptionen}\index{Optionen|(}
@@ -703,35 +832,73 @@ Man könnte natürlich, nur zum Spaß?, das Aussehen von Molekülen mit \TikZ ä
\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:
+Das Beispiel ist natürlich kein gutes, da mit \CF dasselbe Ergebnis erzielt werden kann. Vielfache andere Anwendungen sind aber denkbar: beispielsweise könnte man sich einen Stil definieren, in dem Reaktanden angezeigt werden sollen:
+\begin{Example}
+ \colorlet{mCgreen}{green!50!gray}
+ \colorlet{mCblue}{cyan!50!gray}
+ \colorlet{mCred}{magenta!50!gray}
+ \colorlet{mCyellow}{yellow!50!gray}
+ \begin{rxn}
+ \tikzset{reactant/.style={draw=#1,fill=#1!10,inner sep=1em,minimum height=10em,minimum width=12em,rounded corners}}
+ \reactant[,cytosin,reactant=mCred]{\chemfig{H-[:30]N*6(-(=O)-N=(-NH_2)-=-)}}
+ \anywhere{cytosin.-90,,yshift=-2mm}{Cytosin}
+ \reactant[,thymin,reactant=mCyellow]{\chemfig{H-[:30]N*6(-(=O)-N(-H)-(=O)-(-CH_3)=-)}}
+ \anywhere{thymin.-90,,yshift=-2mm}{Thymin}
+ \reactant[cytosin.-90,adenin,yshift=-1.5em,reactant=mCblue]{\chemfig{[:-36]*5(-N(-H)-*6(-N=-N=(-NH_2)--)--N=)}}
+ \anywhere{adenin.-90,Guanin,yshift=-2mm}{Adenin}
+ \reactant[,guanin,reactant=mCgreen]{\chemfig{[:-36]*5(-N(-H)-*6(-N=(-NH_2)-N(-H)-(=O)--)--N=)}}
+ \anywhere{guanin.-90,,yshift=-2mm}{Guanin}
+ \end{rxn}
+\end{Example}
+Auf diese Weise könnten Teile eines Schemas hervorgehoben werden:
\begin{Example}
- \newcommand{\leer}{\reactant[,minimum width=5em]{ \rule[-1em]{1em}{.5pt}\;\rule[-1em]{3em}{.5pt} }{}}
- \newcommand{\stoich}{\rule[-3pt]{1em}{.5pt}}
\begin{rxn}
- \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}}
+ \setatomsep{1.5em}
+ \colorlet{mCgreen}{green!50!gray}
+ \tikzset{emph/.style={draw=mCgreen,fill=mCgreen!10,inner sep=1em}}
+ \reactant[,lineOne]{\chemfig{R^1-[:30](=[@{b1}2]O)-[:-30]O-H}}
+ \arrow[,<=>]{\chemfig{@{Hpl1}\Hpl}}{}
+ \branch[,,emph]{
+ \reactant{\chemfig{R^1-[:30]@{C1}(-[2]O-[:30]H)(-[6,.5,,,draw=none]\oplus)-[:-30]O-H}}
+ \arrow[,<=>,2]{\chemfig{[:30]H-@{O1}O-[::-60]-R^2}}{}
+ \reactant{\chemfig{R^1-[:30](-[2]O-[:30]H)(-[6]@{O2}O-[:-150]H)-[:-30]@{O3}\chemabove{O}{\oplus}(-[@{b2}6]H)-[:30]-[:-30]R^2}}
+ }
+ \anywhere{lineOne.-90,lineTwo,xshift=-3em,yshift=-7em}{}
+ \arrow[lineTwo.0,<=>]{$-$\Hpl/\chemfig{@{Hpl2}\Hpl}}{}
+ \reactant{\chemfig{R^1-[:30](-[@{b3}2]O-[@{b4}:30]H)(-[@{b5}6]@{O4}\chembelow{O}{\oplus}(-[:-30]H)-[:-150]H)-[:-30]O-[:30]-[:-30]R^2}}
+ \arrow[,<=>,2]{\ce{- \Hpl - H2O}}{}
+ \reactant{\chemfig{R^1-[:30](=[2]O)-[:-30]O-[:30]-[:-30]R^2}}
+ \anywhere{lineTwo.-90}{
+ \elmove{b1}{10:5mm}{Hpl1}{135:1cm}\elmove{O1}{135:1.5cm}{C1}{30:5mm}
+ \elmove{O2}{-90:3cm}{Hpl2}{90:2cm}\elmove{b2}{0:5mm}{O3}{-10:5mm}
+ \elmove{b4}{-40:5mm}{b3}{0:5mm}\elmove{b5}{-30:5mm}{O4}{-10:5mm}
+ }
\end{rxn}
\end{Example}
-\section{Alphabetische Befehlsreferenz}
+\section{Alphabetische Befehlsreferenz}\label{sec:referenz}
Im folgenden Abschnitt werden alle Befehle von \mC in alphabetischer Reihenfolge vorgestellt.
\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}.
+Manchmal ist es nützlich, wenn man einen Reaktanden oder irgendetwas anderes außerhalb der Chain platzieren kann.
\begin{lstlisting}
- \anywhere[<anker>]{<tikz>}{<formel>}
+ \anywhere{<pos>,<name>,<tikz>}{<irgendwas>}
\end{lstlisting}
-Für diesen Fall gibt es den Befehl \lstinline+\anywhere+. Er wird über \lstinline+<tikz>+ auf ähnliche Weise wie \lstinline+\branch+ platziert.
+Für diesen Fall gibt es den Befehl \lstinline+\anywhere+. Er wird über \lstinline+<pos>+ auf ähnliche Weise wie \lstinline+\branch+ platziert:
+\begin{lstlisting}
+ <anker>.<winkel> % nicht auf der Kette
+ on chain=going <schluessel> % auf der Kette
+ <schluessel>=of <anker> % nicht auf der Kette
+\end{lstlisting}
+\textbf{Bitte beachten Sie, dass \lstinline+<pos>+ nicht leer bleiben kann.}
\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.
+Der Befehl kann \zB 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}}
@@ -747,73 +914,105 @@ Der Befehl kann gut zum Beschriften von Reaktionspartnern eingesetzt werden.
\anywhere{below=of mesomer}{$+$\color{blue}\ce{H2O}}
\end{rxn}
\end{Example}
+Viele weitere Beispiele für Einsatzmöglichkeiten finden Sie in der Datei \texttt{examples.tex} bzw. \texttt{examples.pdf}.
\index{anywhere|)}
\subsection{arrow}\label{ssec:arrow}\index{arrow|(}\index{Befehle!arrow}
Reaktionspfeile werden mit \lstinline=\arrow= erstellt.
\begin{lstlisting}
- \arrow[<richtung>,<typ>,<längenfaktor>,<anker>,both]{<oben>}{<unten>}
+ \arrow[<pos>,<typ>,<längenfaktor>,<name>,both,<tikz>]{<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.
+Mit mehreren Optionen können die Reaktionspfeile angepasst werden. Die Optionen müssen an entsprechender Stelle, durch Kommata separiert, angegeben werden.
\begin{enumerate}
-\item\lstinline+<richtung>+\index{arrow!Optionen!direction} -- mögliche Einstellungen sind:
+\item\lstinline+<pos>+\index{arrow!Optionen!pos} -- mögliche Einstellungen sind:
\begin{rxn}
\setarrowlength{2.5em}
\dummy[a]
- \arrow{}{}\reactant{right}
- \branch[above right=of a]{\arrow[above right]{}{}\reactant[above right]{above right}}
- \branch[above=of a]{\arrow[above]{}{}\reactant[above]{above}}
- \branch[above left=of a]{\arrow[above left]{}{}\reactant[above left]{above left}}
- \branch[left=of a]{\arrow[left]{}{}\reactant[left]{left}}
- \branch[below left=of a]{\arrow[below left]{}{}\reactant[below left]{below left}}
- \branch[below=of a]{\arrow[below]{}{}\reactant[below]{below}}
- \branch[below right=of a]{\arrow[below right]{}{}\reactant[below right]{below right}}
- \end{rxn}
-\item\lstinline+<typ>+\index{arrow!Optionen!type} -- mögliche Einstellungen sind:
+ \arrow{}{}\reactant{right = \ang{0}}
+ \branch[above right=of a]{\arrow[above right]{}{}\reactant[above right]{above right = \ang{45}}}
+ \branch[above=of a]{\arrow[above]{}{}\reactant[above]{above = \ang{90}}}
+ \branch[above left=of a]{\arrow[above left]{}{}\reactant[above left]{above left = \ang{135}}}
+ \branch[left=of a]{\arrow[left]{}{}\reactant[left]{left = \ang{180} = \ang{-180}}}
+ \branch[below left=of a]{\arrow[below left]{}{}\reactant[below left]{below left = \ang{225} = \ang{-135}}}
+ \branch[below=of a]{\arrow[below]{}{}\reactant[below]{below = \ang{270} = \ang{-90}}}
+ \branch[below right=of a]{\arrow[below right]{}{}\reactant[below right]{below right = \ang{315} = \ang{-45}}}
+ \end{rxn}
+ \NEU%
+ Außerdem kann jeder beliebige Winkel des Intervalls $[\ang{-360};\ang{360}]$ eingesetzt werden.
+
+ Zusätzlich kann der Winkel in Bezug auf ein durch \lstinline+<name>+ benanntes Objekt angegeben werden: \lstinline+<name>.<winkel>+ bedeutet im Winkel von \lstinline+<winkel>+ neben \lstinline+<name>+. Im Dokument \texttt{examples.tex} bzw.\texttt{examples.pdf} können Sie einige Beispiele dafür finden.
+\item\lstinline+<typ>+\index{arrow!Optionen!typ} -- mögliche Einstellungen sind:
\begin{rxn}
\dummy[a]
- \branch[below=of a,b,yshift=1em]{\arrow{}{}\reactant{\ttfamily -\textgreater}}
- \branch[below=of b,c,yshift=1em]{\arrow[,<-]{}{}\reactant{\ttfamily \textless-}}
- \branch[below=of c,d,xshift=.25em,yshift=1em]{\arrow[,<->]{}{}\reactant{\ttfamily \textless-\textgreater}}
- \branch[below=of d,e,yshift=1em]{\arrow[,<=>]{}{}\reactant{\ttfamily \textless=\textgreater}}
- \branch[below=of e,f,yshift=1em]{\arrow[,-|>]{}{}\reactant{\ttfamily -\textbar\textgreater}}
- \branch[below=of f,,yshift=1em]{\arrow[,-+>]{}{}\reactant{\ttfamily -+\textgreater}}
- \end{rxn}
-\item\lstinline+<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.
+ \branch[below=of a,b,yshift=.5em]{\arrow{}{}\reactant{\ttfamily -\textgreater}}
+ \branch[below=of b,c,yshift=.5em]{\arrow[,<-]{}{}\reactant{\ttfamily \textless-}}
+ \branch[below=of c,d,xshift=.25em,yshift=.5em]{\arrow[,<->]{}{}\reactant{\ttfamily \textless-\textgreater}}
+ \branch[below=of d,e,yshift=.5em]{\arrow[,<=>]{}{}\reactant{\ttfamily \textless=\textgreater}}
+ \branch[below=of e,f,xshift=.25em,yshift=.5em]{\arrow[,<=>>]{}{}\reactant{\ttfamily \textless=\textgreater{}\textgreater}}
+ \branch[below=of f,g,yshift=.5em]{\arrow[,<<=>]{}{}\reactant{\ttfamily \textless{}\textless=\textgreater}}
+ \branch[below=of g,h,xshift=-.25em,yshift=.5em]{\arrow[,-|>]{}{}\reactant{\ttfamily -\textbar\textgreater}}
+ \branch[below=of h,,yshift=.5em]{\arrow[,-+>]{ }{ }\reactant{\ttfamily -+\textgreater}}
+ \end{rxn}
+\item\lstinline+<längenfaktor>+\index{arrow!Optionen!längenfaktor@{längenfaktor}} -- mit dem Faktoren, den Sie hier angeben, wird die Pfeillänge (\SI{4}{\emlength} bei Faktor = $1.0$, Standard) multipliziert.
+\item\lstinline+<name>+\index{arrow!Optionen!name} -- 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 Label geschrieben werden, die gleichen Maße.
+\item\lstinline+<tikz>+\index{arrow!Optionen!tikz} -- mit dieser Option können die Pfeile mit \TikZ-Keys angepasst werden. Nicht alle \TikZ-Keys zeigen Auswirkungen. So können Pfeile \zB mit \lstinline+shift=<coord>+ \emph{nicht} verschoben werden.
\end{enumerate}
+\begin{Example}
+ \begin{rxn}
+ \arrow[,,.25]{M}{}\arrow[,,.5]{MM}{}\arrow[,,.75]{MMM}{}\arrow{MMMM}{}\arrow[,,1.125]{MMMMM}{}\arrow[,,1.25]{MMMMM}{}
+ \end{rxn}
+\end{Example}
+Beachten Sie, dass die Label \lstinline+<oben>+ und \lstinline+<unten>+ mit der Richtung gedreht werden. Bei einem Winkel von \ang{180} liegt \lstinline+<oben>+ tatsächlich unterhalb des Pfeils.
+\begin{SideBySideExample}
+ \begin{rxn}
+ \setarrowlength{2.5em}
+ \dummy[a]
+ \arrow{a}{b}
+ \arrow[a.45]{a}{b}
+ \arrow[a.90]{a}{b}
+ \arrow[a.135]{a}{b}
+ \arrow[a.180]{a}{b}
+ \arrow[a.225]{a}{b}
+ \arrow[a.270]{a}{b}
+ \arrow[a.315]{a}{b}
+ \end{rxn}
+\end{SideBySideExample}
+\NEU%
+Beim Pfeiltypen \lstinline"-+>" gibt es ein, zwei Dinge zu beachten: lässt man die Beschriftung leer, dann wird lediglich der nach rechts zeigende Pfeil angezeigt. Das erste Argument beschriftet den hinzukommenden und das zweite Argument den wegzeigenden Pfeil. Verwendet man nur eines dieser Argumente, wird auch nur der jeweilige Teil gezeichnet.\index{arrow!Optionen!typ}
\begin{SideBySideExample}
+ entspricht \verb"->":
\begin{rxn}
- \arrow[,,.6]{\ce{Br2}}{$h\nu$} \arrow{\chemfig{-[::30]-[::-60]OH}}{}
+ \arrow[,-+>]{}{}
\end{rxn}
+ hinzu:
\begin{rxn}
- \arrow[above,,.6]{\ce{Br2}}{$h\nu$}
+ \arrow[,-+>]{a}{}
\end{rxn}
+ weg:
\begin{rxn}
- \arrow[above]{\chemfig{-[::30]-[::-60]OH}}{}
+ \arrow[,-+>]{}{b}
\end{rxn}
+ hinzu und weg:
\begin{rxn}
- \arrow[above right,,.5]{\ce{Br2}}{$h\nu$}
+ \arrow[,-+>]{a}{b}
\end{rxn}
+ Leerzeichen sind \emph{kein} leeres Argument:
\begin{rxn}
- \arrow[above right]{\chemfig{-[::30]-[::-60]OH}}{}
+ \arrow[,-+>]{ }{ }
\end{rxn}
\end{SideBySideExample}
-Einmal die meisten Optionen im Einsatz:
-\begin{SideBySideExample}
+\NEU%
+Durch Verwendung von \TikZ-Keys kann das Aussehen der Pfeile verändert werden:\index{arrow!Optionen!tikz}
+\begin{Example}
\begin{rxn}
+ \mCsetup{arrowlabel=.7em,arrowlength=6em}
\reactant{A}
- \arrow[,,,pfeil]{B}{}
- \branch[above=of pfeil,,yshift=1em]{
- \arrow[above,<-,.7]{}{}
- \reactant[above]{D}
- }
- \reactant{C}
- \end{rxn}
-\end{SideBySideExample}
+ \arrow[20,,,,,decorate,decoration=snake,blue]{a}{b}
+ \reactant[20]{A$^*$}
+ \end{rxn}
+\end{Example}
\index{arrow!Optionen|)}
\subsubsection{Ausrichtung}\index{arrow!Ausrichtung|(}
@@ -824,7 +1023,7 @@ Liegt der Pfeil in einem Branch (siehe \ref{ssec:branch}), dann wird die Ausrich
\reactant[,a]{A}
\arrow{}{}
\branch[below=of a]{
- \arrow[below]{\chemfig{-[::30]-[::-60]OH}}{}
+ \arrow[-90]{\chemfig{-[::30]-[::-60]OH}}{}
}
\end{rxn}
\makeinvisible
@@ -833,10 +1032,10 @@ Durch die Verwendung der Option \lstinline=both=\index{arrow!Optionen!both} beko
\begin{SideBySideExample}
\makevisible
\begin{rxn}
- \reactant[,a]{A}s Keys
+ \reactant[,a]{A}
\arrow{}{}
\branch[below=of a]{
- \arrow[below,,,,both]{\chemfig{-[::30]-[::-60]OH}}{}
+ \arrow[-90,,,,both]{\chemfig{-[::30]-[::-60]OH}}{}
}
\end{rxn}
\makeinvisible
@@ -849,9 +1048,9 @@ Mit den Befehlen \lstinline+\setarrowlength+ (\ref{ssec:setarrowlength}) und \ls
\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.}
+Der Befehl \lstinline=\branch= wird verwendet, um eine Verzweigung der Reaktion zu realisieren.
\begin{lstlisting}
- \branch[<ausrichtung>,<anker>,<tikz>]{<formel(n)>}
+ \branch[<pos>,<name>,<tikz>]{<formel(n)>}
\end{lstlisting}
Für den \lstinline+\branch+ wird die Ausrichtung und der Anker wichtig. Sehen wir uns ein Beispiel an.
\begin{Example}
@@ -862,8 +1061,8 @@ Für den \lstinline+\branch+ wird die Ausrichtung und der Anker wichtig. Sehen w
\chemand
\reactant{\chemfig{-[::30](-[::60]Cl)-[::-60](-[::-60])-[::60]}}
\branch[below right=of start]{
- \arrow[below right,,.75]{\ce{H2O}}{}
- \reactant[below right]{\chemfig{-[::30]-[::-60](-[::120]OH)(-[::-60])-[::60]}}
+ \arrow[-45,,.75]{\ce{H2O}}{}
+ \reactant[-45]{\chemfig{-[::30]-[::-60](-[::120]OH)(-[::-60])-[::60]}}
\chemand
\reactant{\chemfig{-[::30](-[::60]OH)-[::-60](-[::-60])-[::60]}}
}
@@ -885,22 +1084,63 @@ Gibt man die Ausrichtung nicht in Bezug auf einen Anker an, bezieht sie sich imm
\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.
-\begin{description}
- \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+\reactant+, siehe \ref{ssec:reactant}. Die Voreinstellung ist \lstinline+on chain=going right+.
+
+\subsubsection{Positionierung}\label{sssec:branch_positionierung}\index{branch!Positionierung|(}
+Ein Ast kann auf verschiedene Arten positioniert werden. Je nachdem ist er dann Teil der Kette oder ein echter Ast.
+\begin{lstlisting}
+ <winkel> % auf der Kette
+ <schluessel> % auf der Kette
+ <anker>.<winkel> % nicht auf der Kette
+ on chain=going <schluessel> % auf der Kette
+ <schluessel>=of <anker> % nicht auf der Kette
+\end{lstlisting}
+Die Voreinstellung entspricht \lstinline+\branch[0]{}+. In unterschiedlichen Situationen kann eine unterschiedliche Verwendung angebracht sein. Wollen Sie zum Beispiel den Ast verwenden, um einen Pfeil zu verschieben, kann er durchaus Teil der Kette bleiben.
+\begin{SideBySideExample}
+ \begin{rxn}
+ \reactant{A}
+ \branch[,,yshift=1em]{\arrow{}{}}
+ \reactant[,,yshift=-1em]{B}
+ \end{rxn}
+\end{SideBySideExample}
+Beim Anfangen eines echten Astes ist es nicht immer egal, ob man Variante 3 (\lstinline+<anker>.<winkel>+) oder 5 (\lstinline+<schluessel>=of <anker>+) wählt:
+\begin{SideBySideExample}
+ \makevisible
+ \begin{rxn}
+ \reactant[,a]{\chemfig{[:30]--[::-60]-OH}}
+ \arrow{}{}
+ \branch[a.-45]{\arrow[-45]{}{}}
+ \end{rxn}
+ \begin{rxn}
+ \reactant[,a]{\chemfig{[:30]--[::-60]-OH}}
+ \arrow{}{}
+ \branch[below right=of a]{\arrow[-45]{}{}}
+ \end{rxn}
+\end{SideBySideExample}
+Im ersten Fall wird der Ast \ang{45} unterhalb der Horizontalen ausgehend vom Zentrum des Reaktands positioniert. Da die Form des Reaktands rechteckig ist und nicht etwa quadratisch oder rund, stimmen die \ang{45} nicht mit "`unten rechts"' überein.
+\begin{SideBySideExample}
+ \makevisible
+ \begin{rxn}
+ \reactant[,a,circle]{\chemfig{[:30]--[::-60]-OH}}
+ \arrow{}{}
+ \branch[a.-45]{\arrow[-45]{}{}}
+ \end{rxn}
+ \begin{rxn}
+ \reactant[,a,circle]{\chemfig{[:30]--[::-60]-OH}}
+ \arrow{}{}
+ \branch[below right=of a]{\arrow[-45]{}{}}
+ \end{rxn}
+\end{SideBySideExample}
+\index{branch!Positionierung|)}
\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.
+Wenn ein Pfeil zwei verschieden große Label 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}
\reactant[,a]{A}
\arrow{}{}
\branch[below=of a]{
- \arrow[below,,,,both]{\chemfig{-[::30]-[::-60]OH}}{\Hpl}
+ \arrow[-90,,,,both]{\chemfig{-[::30]-[::-60]OH}}{\Hpl}
}
\end{rxn}
\makeinvisible
@@ -911,8 +1151,8 @@ In diesem Fall können Sie den Branch mit den \TikZ-Keys \lstinline=xshift=\inde
\begin{rxn}
\reactant[,a]{A}
\arrow{}{}
- \branch[below=of a,,xshift=-1.35em]{
- \arrow[below]{\chemfig{-[::30]-[::-60]OH}}{\Hpl}
+ \branch[below=of a,,xshift=1.35em]{
+ \arrow[-90]{\chemfig{-[::30]-[::-60]OH}}{\Hpl}
}
\end{rxn}
\makeinvisible
@@ -922,9 +1162,12 @@ In diesem Fall können Sie den Branch mit den \TikZ-Keys \lstinline=xshift=\inde
\subsection{chemand}\label{ssec:chemand}\index{chemand|(}\index{Befehle!chemand}
Der Befehl
\begin{lstlisting}
- \chemand[<ausrichtung>,<anker>,<tikz>]
+ \chemand[<pos>,<name>,<tikz>]
+\end{lstlisting}
+erzeugt und platziert ein $+$ auf die gleiche Weise, wie \lstinline+\reactant+ beliebigen Text platziert. Letztlich ist er nur ein Shortcut für \lstinline+\reactant+:
+\begin{lstlisting}
+ \newcommand*{\chemand}[1][]{\reactant[#1]{\chemsign[0pt]{+}}}
\end{lstlisting}
-erzeugt und platziert ein $+$ auf die gleiche Weise, wie \lstinline+\reactant+ beliebigen Text platziert.
\begin{Example}
\begin{rxn}
\reactant{\chemfig{*6(------)}}
@@ -936,7 +1179,7 @@ erzeugt und platziert ein $+$ auf die gleiche Weise, wie \lstinline+\reactant+ b
\reactant{\ce{HBr}}
\end{rxn}
\end{Example}
-Die optionalen Argumente von \lstinline+\chemand+ und \lstinline+\reactant+ sind die gleichen, siehe \ref{ssec:reactant} für eine Beschreibung.
+Die optionalen Argumente von \lstinline+\chemand+ und \lstinline+\reactant+ sind also die gleichen, siehe \ref{ssec:reactant} für eine Beschreibung.
\index{chemand|)}
\subsection{dummy}\label{ssec:dummy}\index{dummy|(}\index{Befehle!dummy}
@@ -969,6 +1212,7 @@ Wie \lstinline=\chemmove= funktioniert, können Sie im Manual zu \CF nachlesen.
\elmove{e1}{60:4mm}{e2}{0:4mm}
\end{center}
\end{Example}
+Sie sollten \lstinline+\elmove+ \emph{nur innerhalb} von \lstinline+\anywhere+, \lstinline+\reactant+ oder \lstinline+\transition+ verwenden. Ansonsten könnten sich einige Ausrichtungsfehler ergeben.
\index{elmove|)}
\subsection{makeinvisible}\label{ssec:makeinvisible}\index{makeinvisible|(}\index{Befehle!makeinvisible}
@@ -978,28 +1222,33 @@ Dieser Befehl hebt die Änderungen von \lstinline=\makevisible= (siehe \ref{ssec
\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 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}.
+\tikz[baseline=(X.base)]\node[draw=red!60](X){\texttt{\textbackslash reactant\{\}}};, \tikz[baseline=(X.base)]\node[draw=green!60](X){\texttt{\textbackslash arrow\{above\}\{\}}};, \tikz[baseline=(X.base)]\node[draw=blue!60](X){\texttt{\textbackslash arrow\{\}\{below\}}}; und \tikz[baseline=(X.base)]\node[draw=cyan](X){\texttt{\textbackslash branch\{\}}};. Siehe auch \ref{ssec:makeinvisible}.
- \lstinline=\makevisible= wirkt sich nur auf nachfolgende Reaktanden aus.
+\lstinline=\makevisible= wirkt sich nur auf nachfolgende Reaktanden aus und ist auch nur innerhalb der Gruppe wirksam, in der er gesetzt wurde.
\begin{SideBySideExample}
- \makevisible
\begin{rxn}
+ \makevisible
\reactant[,a]{A}
\arrow{a}{b}
\branch[below=of a]{
- \arrow[below,,,,both]{a}{b}
+ \arrow[-90,,,,both]{a}{b}
}
\end{rxn}
- \makeinvisible
+ \begin{rxn}
+ {\makevisible
+ \reactant{\chemfig{[:30]--[::-60]-OH}}
+ }
+ \reactant{\chemfig{[:30]--[::-60]-OH}}
+ \end{rxn}
\end{SideBySideExample}
\index{makevisible|)}
\subsection{marrow}\label{ssec:marrow}\index{marrow|(}\index{Befehle!marrow}
Der Befehl \lstinline=\marrow= zeichnet einen Mesomeriepfeil.
\begin{lstlisting}
- \marrow[<ausrichtung>]
+ \marrow[<pos>]
\end{lstlisting}
-Er ist eine Abkürzung für \lstinline+\arrow[<richtung>,<->,.5]{}{}+.
+Er ist eine Abkürzung für \lstinline+\arrow[<pos>,<->,.5]{}{}+.
\index{marrow|)}
\subsection{mCsetup}\label{ssec:mCsetup}\index{mCsetup|(}\index{Befehle!mCsetup}
@@ -1011,6 +1260,7 @@ kann verwendet werden, um alle Voreinstellungen zu verändern. Für jeden der \l
\begin{Example}
\mCsetup{
align=left,
+ arrowlabel=.7em,
arrowlength=3em,
arrowline=thick,
atomsize=\large,
@@ -1022,20 +1272,21 @@ kann verwendet werden, um alle Voreinstellungen zu verändern. Für jeden der \l
}
\setbondshape{4pt}{2pt}{1pt}
\begin{rxn}
- \reactant{A}\arrow{}{}\reactant{\chemfig{A-(<[2])(<:[6])-B}}
+ \reactant{A}\arrow{a}{b}\reactant{\chemfig{A-(<[2])(<:[6])-B}}
\end{rxn}
\mCsetup{reset}
\begin{rxn}
- \reactant{A}\arrow{}{}\reactant{\chemfig{A-(<[2])(<:[6])-B}}
+ \reactant{A}\arrow{a}{b}\reactant{\chemfig{A-(<[2])(<:[6])-B}}
\end{rxn}
\end{Example}
+\textbf{Für} \lstinline+\mCsetup+ \textbf{gilt wie für alle anderen Einstellungsbefehle: er ist nur innerhalb der Gruppe wirksam, in der er gesetzt wurde.}
\index{mCsetup|)}
\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.
+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[,<name>]{}+, 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>}
+ \merge[<label>,<pos>,<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}
@@ -1050,7 +1301,7 @@ Mit dem \lstinline+merge+-Befehl können verschiedene Reaktionsstränge zu einem
\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.
+Die Standard-\lstinline+<pos>+ 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}}
@@ -1123,11 +1374,11 @@ Die Verwendung von \lstinline=\merge= erfordert unter Umständen einige Spielere
\index{merge|)}
\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.}
+Der \lstinline=\mesomeric=-Befehl funktioniert wie ähnlich wie \lstinline=\branch= (\ref{ssec:branch}). Sein Zweck ist es, eckige Klammern zu setzen.
\begin{lstlisting}
- \mesomeric[<ausrichtung>,<anker>,<tikz>]{<formel(n)>}
+ \mesomeric[<pos>,<name>,<tikz>]{<formel(n)>}
\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=.
+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=<name>=) versehen (\ref{ssec:branch}). Die \lstinline+<pos>+ funktioniert wie bei \lstinline=\reactant[<pos>]{}=.
\begin{Example}
\begin{rxn}
\mesomeric{
@@ -1164,18 +1415,17 @@ Vielleicht auch einen Komplex?
\mesomeric[,a]{
\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$};
+ \anywhere{above right=of a,,yshift=-1em}{$2\oplus$}
\end{rxn}
\end{Example}
\index{mesomeric|)}
\subsection{reactant}\label{ssec:reactant}\index{reactant|(}\index{Befehle!reactant}
-\NEU%
-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.}
+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.
\begin{lstlisting}
- \reactant[<ausrichtung>,<anker>,<tikz>]{<formel(n)>}
+ \reactant[<pos>,<name>,<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
+In diesen Befehl werden die Formeln (\lstinline=<formel>=) geschrieben und können, falls nötig, mit einem Anker (\lstinline=<name>=) versehen werden. \lstinline+<pos>+ kann die 8 Schlüssel-Werte
\begin{alphlist}
\item \lstinline+right+,
\item \lstinline+above right+,
@@ -1186,51 +1436,53 @@ In diesen Befehl werden die Formeln (\lstinline=<formel>=) geschrieben und könn
\item \lstinline+below+,
\item \lstinline+below right+
\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.
+\NEU%
+annehmen, einen Winkel des Intervalls $[\ang{-360};\ang{360}]$ oder eine Anker-Winkel-Kom\-bi\-na\-tion \lstinline+<anker>.<winkel>+ sein. Die Voreinstellung entspricht \lstinline+\reactant[0]{}+.
\begin{SideBySideExample}
%untereinander:
\begin{rxn}
\reactant{\ce{Br2}}
- \reactant[below]{\ce{Cl2}}
+ \reactant[-90]{\ce{Cl2}}
\end{rxn}
%Beispiel mit mehreren Reaktanden:
\begin{rxn}
\reactant{\ce{Br2}}
- \reactant[below]{\ce{I2}}
+ \reactant[-90]{\ce{I2}}
\reactant{\ce{Cl2}}
\end{rxn}
%Reaktion von oben nach unten:
\begin{rxn}
\reactant{\ce{Br-Br}}
- \arrow[below,,.5]{$h\nu$}{}
- \reactant[below]{\ce{2 ~\lewis{0.,Br}}}
+ \arrow[-90,,.5]{$h\nu$}{}
+ \reactant[-90]{\ce{2 ~\lewis{0.,Br}}}
\end{rxn}
\end{SideBySideExample}
+Viele weitere Beispiele finden Sie in der Datei \texttt{examples.tex} bzw. \texttt{examples.pdf}.
\index{reactant|)}
\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>]
+ \begin{rxn}[<ausrichtung>,<skalierung>]
...
\end{rxn}
\end{lstlisting}
\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:
+\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
+ \item\lstinline+<ausrichtung>+\index{rxn!Optionen!ausrichtung} das Ausrichtungsverhalten der \lstinline=rxn=-Umgebung, Default: center
+ \item\lstinline+<skalierung>+\index{rxn!Optionen!skalierung} 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.
+Wenn Sie die \lstinline+<skalierung>+-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.
+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 an einer Unannehmlichkeit von \CF.
\begin{SideBySideExample}
\chemfig[scale=.5]{**6(------)}
\end{SideBySideExample}
@@ -1259,13 +1511,13 @@ Beispiele zur Ausrichtung:
\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{lstlisting}
- \begin{rxnscheme}[<label>,<placement>,<align>,<scalefactor>,<name>]{<caption>}
+ \begin{rxnscheme}[<label>,<platzierung>,<ausrichtung>,<skalierung>,<titel>]{<caption>}
...
\end{rxnscheme}
\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:
+\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}
@@ -1274,36 +1526,36 @@ Die Umgebung \lstinline=rxnscheme= ist eine Gleitumgebung für Reaktionsschemata
\end{rxnscheme}
\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.
+ \item\lstinline+<platzierung>+\index{rxnscheme!Optionen!platzierung} Hier können sie Platzierungsangaben wie \lstinline+htp+ angeben. Default ist \lstinline+H+ (genau hier).
+ \item\lstinline+<ausrichtung>+\index{rxnscheme!Optionen!ausrichtung}Mit dieser Option kann man auswählen, ob das Schema links, rechts oder mittig ausgerichtet wird.
+ \item\lstinline+<skalierung>+\index{rxnscheme!Optionen!skalierung} 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>}
+ \begin{rxnscheme}[,,,<skalierung>]{<caption>}
...
\end{rxnscheme}
\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.
+ \item\lstinline+<titel>+\index{rxnscheme!Optionen!titel} Mit dieser Option lässt sich der Name des konkreten Schemas von "`Reaktionschema"' (oder "`Reaction scheme"') in \lstinline+<titel>+ ändern.
\end{enumerate}
\begin{Example}
- \begin{rxnscheme}[,,,2]{Gro\ss es Schema}
+ \begin{rxnscheme}[,H,,2]{Gro\ss es Schema}
\large\setatomsep{3.5em}
\reactant{ \chemfig{=[::30]-[::-60]OH} }
\arrow[,<=>]{}{}
\reactant{ \chemfig{-[::30]=[::-60]O} }
\end{rxnscheme}
- \begin{rxnscheme}[,,,.5]{Kleines Schema}
+ \begin{rxnscheme}[,H,,.5]{Kleines Schema}
\tiny\setatomsep{1em}
\reactant{ \chemfig{=[::30]-[::-60]OH} }
\arrow[,<=>]{}{}
\reactant{ \chemfig{-[::30]=[::-60]O} }
\end{rxnscheme}
- \begin{rxnscheme}{center}
+ \begin{rxnscheme}[,H]{center}
\reactant{center}\arrow{}{}\reactant{zentriert}
\end{rxnscheme}
- \begin{rxnscheme}[,,right]{right}
+ \begin{rxnscheme}[,H,right]{right}
\reactant{right}\arrow{}{}\reactant{rechts}
\end{rxnscheme}
- \begin{rxnscheme}[,,left]{left}
+ \begin{rxnscheme}[,H,left]{left}
\reactant{left}\arrow{}{}\reactant{links}
\end{rxnscheme}
\end{Example}
@@ -1325,24 +1577,24 @@ Wenn Ihnen der Stil nicht gefällt, können Sie diesen mit
\end{description}
zur Verfügung.
\begin{Example}
- \begin{rxnscheme}{ruled}
+ \begin{rxnscheme}[,H]{ruled}
\reactant{Standard-Stil}
\end{rxnscheme}
\floatstyle{boxed}
\restylefloat{rxnfloat}
- \begin{rxnscheme}{boxed}
+ \begin{rxnscheme}[,H]{boxed}
\reactant{mit Rahmen}
\end{rxnscheme}
\floatstyle{plain}
\restylefloat{rxnfloat}
- \begin{rxnscheme}{plain}
+ \begin{rxnscheme}[,H]{plain}
\reactant{ohne Schnickschnack}
\end{rxnscheme}
\end{Example}
\floatstyle{ruled}
\restylefloat{rxnfloat}
\paragraph{Platzierung}\index{rxnscheme!anpassen!Platzierung}
-Auch das Platzierungsverhalten, das in der Voreinstellung \lstinline=H= (genau hier) ist, können Sie entsprechend ändern.
+Auch das Platzierungsverhalten, das in der Voreinstellung \lstinline=hpt= ist, können Sie entsprechend ändern.
\begin{lstlisting}
\floatplacement{rxnfloat}{<position>}
\end{lstlisting}
@@ -1352,7 +1604,7 @@ Einfacher ist allerdings der Aufruf von \mC mit entsprechender Option.
\end{lstlisting}
Sie können auch das Verhalten einer einzigen Umgebung durch Angabe der entsprechenden Option ändern.
\begin{lstlisting}
- \begin{rxnscheme}[,<placement>]{<caption>}
+ \begin{rxnscheme}[,<platzierung>]{<caption>}
...
\end{rxnscheme}
\end{lstlisting}
@@ -1382,14 +1634,28 @@ können Sie eine Liste aller Reaktionsschemata erzeugen:
\end{SideBySideExample}
\index{rxnscheme!anpassen|)}\index{rxnscheme|)}
+\subsection{setarrowlabel}\label{ssec:setarrowlabel}\index{setarrowlabel|(}\index{Befehle!setarrowlabel}
+\NEU%
+Die Beschriftungen eines Pfeils haben in der Voreinstellung einen Abstand von \SI{0.2}{\emlength} vom Pfeil. Mit
+\begin{lstlisting}
+ \setarrowlabel{<abstand>}
+\end{lstlisting}
+kann der Abstand in \lstinline+<abstand>+ geändert werden.
+\begin{SideBySideExample}
+ \begin{rxn}
+ \arrow{a}{b}
+ \setarrowlabel{.5em}
+ \arrow{a}{b}
+ \end{rxn}
+\end{SideBySideExample}
+\index{setarrowlabel|)}
+
\subsection{setarrowlength}\label{ssec:setarrowlength}\index{setarrowlength|(}\index{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
+Reaktionspfeile haben als Standardwert die Länge \SI{4}{\emlength}. Die Voreinstellung lässt sich mit
\begin{lstlisting}
\setarrowlength{<länge>}
\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.}
+auf \lstinline+<länge>+ ändern. Beachten Sie, dass Sie eine Längeneinheit verwenden müssen. Lassen Sie das Argument leer, wird die Voreinstellung wiederhergestellt.
\index{setarrowlength|)}
\subsection{setarrowline}\label{ssec:setarrowline}\index{setarrowline|(}\index{Befehle!setarrowline}
@@ -1421,8 +1687,6 @@ Mit
\setatomsize{<größe>}
\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}\index{setbondlength|(}\index{Befehle!setbondlength}
@@ -1431,8 +1695,6 @@ Mit
\setbondlength{<länge>}
\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}\index{setbondshape|(}\index{Befehle!setbondshape}
@@ -1441,8 +1703,6 @@ Mit
\setbondshape{<basislänge>}{<strichdicke>}{<strichabstand>}
\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{setmergelength}\label{ssec:setmergelength}\index{setmergelength|(}\index{Befehle!setmergelength}
@@ -1498,9 +1758,9 @@ Siehe \ref{par:rxnscheme_name}.
\index{setschemename|)}
\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.}
+\lstinline=\transition= funktioniert genau wie \lstinline=\reactant= (siehe \ref{ssec:reactant}).
\begin{lstlisting}
- \transition[<ausrichtung>,<anker>,<tikz>]{<formel>}
+ \transition[<pos>,<name>,<tikz>]{<formel>}
\end{lstlisting}
\begin{SideBySideExample}
\begin{rxn}
@@ -1513,909 +1773,8 @@ Siehe \ref{par:rxnscheme_name}.
\end{SideBySideExample}
\index{transition|)}
-\section{Beispiele}
-\subsection{Addition}\label{ssec:addition}
-Ein einfaches Reaktionschema mit zwei unterschiedlichen Produkten.
-\begin{rxnscheme}{Additionsreaktion}
- \reactant{ \chemfig{=_[::-30]-[::60](=[::60]O)-[::-60]} }
- \arrow{ $+ \Hpl$ }{}
- \mesomeric[,gf]{
- \reactant{ \chemfig{=_[:-30]-[::60](-[::60]OH)(-[::-120,.3,,,white]\oplus)-[::-60]} }
- \marrow[below]
- \reactant[below]{ \chemfig{\oplus-[6,.3,,,white]-[:-30]=_[::60](-[::60]OH)-[::-60]} }
- }
- \branch[right=of gf,,yshift=3em]{
- \arrow{}{}
- \reactant{ \chemname{\chemfig{=_[:-30]-[::60](-[::60]OH)(-[::-120]R)-[::-60]}}{1,2-Addukt} }
- }
- \branch[right=of gf,,yshift=-5em]{
- \arrow{}{}
- \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{lstlisting}
- \reactant{ \chemfig{=_[::-30]-[::60](=[::60]O)-[::-60]} }
- \arrow{ $+ \Hpl$ }{}
-\end{lstlisting}
-\begin{rxn}
- \reactant{ \chemfig{=_[::-30]-[::60](=[::60]O)-[::-60]} }
- \arrow{ $+ \Hpl$ }{}
-\end{rxn}
-Anschließend die mesomeren Grenzformeln:\index{mesomeric}
-\begin{lstlisting}[firstnumber=3]
- \mesomeric[,gf]{
- \reactant{ \chemfig{=_[:-30]-[::60](-[::60]OH)(-[::-120,.3,,,white]\oplus)-[::-60]} }
- \marrow[below]
- \reactant[below]{ \chemfig{\oplus-[6,.3,,,white]-[:-30]=_[::60](-[::60]OH)-[::-60]} }
- }
-\end{lstlisting}
-\begin{rxn}
- \reactant{ \chemfig{=_[::-30]-[::60](=[::60]O)-[::-60]} }
- \arrow{ $+ \Hpl$ }{}
- \mesomeric[,gf]{
- \reactant{ \chemfig{=_[:-30]-[::60](-[::60]OH)(-[::-120,.3,,,white]\oplus)-[::-60]} }
- \marrow[below]
- \reactant[below]{ \chemfig{\oplus-[6,.3,,,white]-[:-30]=_[::60](-[::60]OH)-[::-60]} }
- }
-\end{rxn}
-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{}{}
- \reactant{ \chemname{\chemfig{=_[:-30]-[::60](-[::60]OH)(-[::-120]R)-[::-60]}}{1,2-Addukt} }
- }
-\end{lstlisting}
-\begin{rxn}
- \reactant{ \chemfig{=_[::-30]-[::60](=[::60]O)-[::-60]} }
- \arrow{ $+ \Hpl$ }{}
- \mesomeric[,gf]{
- \reactant{ \chemfig{=_[:-30]-[::60](-[::60]OH)(-[::-120,.3,,,white]\oplus)-[::-60]} }
- \marrow[below]
- \reactant[below]{ \chemfig{\oplus-[6,.3,,,white]-[:-30]=_[::60](-[::60]OH)-[::-60]} }
- }
- \branch[right=of gf,,yshift=3em]{
- \arrow{}{}
- \reactant{ \chemname{\chemfig{=_[:-30]-[::60](-[::60]OH)(-[::-120]R)-[::-60]}}{1,2-Addukt} }
- }
-\end{rxn}
-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{}{}
- \reactant{ \chemname{\chemfig{R-[6]-[:-30]=_[::60](-[::60]OH)-[::-60]}}{1,4-Addukt} }
- }
-\end{lstlisting}
-\begin{rxn}
- \reactant{ \chemfig{=_[::-30]-[::60](=[::60]O)-[::-60]} }
- \arrow{ $+ \Hpl$ }{}
- \mesomeric[,gf]{
- \reactant{ \chemfig{=_[:-30]-[::60](-[::60]OH)(-[::-120,.3,,,white]\oplus)-[::-60]} }
- \marrow[below]
- \reactant[below]{ \chemfig{\oplus-[6,.3,,,white]-[:-30]=_[::60](-[::60]OH)-[::-60]} }
- }
- \branch[right=of gf,,yshift=3em]{
- \arrow{}{}
- \reactant{ \chemname{\chemfig{=_[:-30]-[::60](-[::60]OH)(-[::-120]R)-[::-60]}}{1,2-Addukt} }
- }
- \branch[right=of gf,,yshift=-5em]{
- \arrow{}{}
- \reactant{ \chemname{\chemfig{R-[6]-[:-30]=_[::60](-[::60]OH)-[::-60]}}{1,4-Addukt} }
- }
-\end{rxn}
-Der komplette Code ist also der folgende:
-\begin{lstlisting}
- \begin{rxnscheme}{Additionsreaktion}
- \reactant{ \chemfig{=_[::-30]-[::60](=[::60]O)-[::-60]} }
- \arrow{ $+ \Hpl$ }{}
- \mesomeric[,gf]{
- \reactant{ \chemfig{=_[:-30]-[::60](-[::60]OH)(-[::-120,.3,,,white]\oplus)-[::-60]} }
- \marrow[below]
- \reactant[below]{ \chemfig{\oplus-[6,.3,,,white]-[:-30]=_[::60](-[::60]OH)-[::-60]} }
- }
- \branch[right=of gf,,yshift=3em]{
- \arrow{}{}
- \reactant{ \chemname{\chemfig{=_[:-30]-[::60](-[::60]OH)(-[::-120]R)-[::-60]}}{1,2-Addukt} }
- }
- \branch[right=of gf,,yshift=-5em]{
- \arrow{}{}
- \reactant{ \chemname{\chemfig{R-[6]-[:-30]=_[::60](-[::60]OH)-[::-60]}}{1,4-Addukt} }
- }
- \end{rxnscheme}
-\end{lstlisting}
-
-\subsection{Mesomerie}
-Folgendes Reaktionsschema soll verwirklicht werden.
-\begin{rxnscheme}[,,,.8]{Elektrophile Substitution}
- \setatomsep{1.6em}
- \reactant[,start]{ \chemname{\chemfig{*6(-=-=(-[,,,,white]\phantom{Br})-=)}}{Benzol \compound{benzol}} }
-
- \branch[below=of start]{
- \arrow[below,,,pfeil_a,both]{\ce{Br2 / AlBr3}}{$-\ce{AlBr4\om}$}
- }
-
- \branch[below=of pfeil_a,mesomerie,xshift=8.5em]{
- \mesomeric{
- \reactant{
- \chemfig{*6(=[@{e1}]-=-(-[:120]Br)(-[:60]H)-(-[:-30,.4,,,white]\oplus)-[@{e2}])}
- \elmove{e1}{60:4mm}{e2}{0:4mm}
- }
- \marrow
- \reactant{
- \chemfig{*6(-(-[:90,.4,,,white]\oplus)-[@{e4}]=[@{e3}]-(-[:120]Br)(-[:60]H)-=)}
- \elmove{e3}{180:4mm}{e4}{150:4mm}
- }
- \marrow
- \reactant{
- \chemfig{*6(-=-(-[:-150,.4,,,white]\oplus)-(-[:120]Br)(-[:60]H)-=)}
- }
- }
- }
-
- \branch[above=of mesomerie,,xshift=7.25em]{
- \arrow[above]{$-\Hpl$}{}
- }
-
- \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=\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{}{}
- \reactant{
- \chemname{\chemfig{*6(-=-=(-Br)-=)}}{Brombenzol \compound{brombenzol}}
- }
- \end{rxnscheme}
-\end{lstlisting}
- \begin{rxn}
- \reactant{
- \chemname{\chemfig{*6(-=-=-=)}}{Benzol \compound{benzol}}
- }
- \arrow{}{}
- \reactant{
- \chemname{\chemfig{*6(-=-=(-Br)-=)}}{Brombenzol \compound{brombenzol}}
- }
- \end{rxn}
-Nun wollen wir das ganze etwas verkleinern, damit wir nicht soviel Platz verbrauchen.
-\begin{lstlisting}
- \begin{rxnscheme}[,,,!!.8!!]{Elektrophile Substitution}
- !!\setatomsep{1.6em}!!
- \reactant{
- \chemname{\chemfig{*6(-=-=-=)}}{Benzol \compound{benzol}}
- }
- \arrow{}{}
- \reactant{
- \chemname{\chemfig{*6(-=-=(-Br)-=)}}{Brombenzol \compound{brombenzol}}
- }
- \end{rxnscheme}
-\end{lstlisting}
- \begin{rxn}[,.8]
- \setatomsep{1.6em}
- \reactant{
- \chemname{\chemfig{*6(-=-=-=)}}{Benzol \compound{benzol}}
- }
- \arrow{}{}
- \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\index{tikz@\TikZ} nach oben:
-\begin{lstlisting}[firstnumber=7]
- \reactant[,,!!yshift=1em!!]{
- \chemname{\chemfig{*6(-=-=(-Br)-=)}}{Brombenzol \compound{brombenzol}}
- }
-\end{lstlisting}
-Diese Lösung ist nicht optimal, da dann der Reaktionspfeil nicht mittig sondern etwas zu tief erscheint.
- \begin{rxn}
- \reactant{
- \chemname{\chemfig{*6(-=-=-=)}}{Benzol \compound{benzol}}
- }
- \arrow{}{}
- \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\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{lstlisting}
- \begin{rxn}
- \reactant{
- \chemname{\chemfig{*6(-=-=(-[,,,,white]\phantom{Br})-=)}}{Benzol \compound{benzol}}
- }
- \arrow{}{}
- \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=\index{branch} und wir müssen der ersten Formel einen Namen als Anker geben.
- \begin{lstlisting}
- \begin{rxnscheme}[,,,.8]{Elektrophile Substitution}
- \setatomsep{1.6em}
- \reactant[,!!start!!]{
- \chemname{\chemfig{*6(-=-=(-[,,,,white]\phantom{Br})-=)}}{Benzol \compound{benzol}}
- }
-
- \branch[!!below=of start!!]{
- \arrow[!!below!!,,,,both]{ \ce{Br2 / AlBr3} }{ $-\ce{AlBr4\om}$ }
- }
-
- \arrow{}{}
- \reactant{
- \chemname{\chemfig{*6(-=-=(-Br)-=)}}{Brombenzol \compound{brombenzol}}
- }
- \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}
- \reactant[,start]{
- \chemname{\chemfig{*6(-=-=(-[,,,,white]\phantom{Br})-=)}}{Benzol \compound{benzol}}
- }
- \branch[below=of start]{
- \arrow[below,,,,both]{\ce{Br2 / AlBr3}}{$-\ce{AlBr4\om}$}
- }
- \arrow{}{}
- \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=\index{mesomeric}, \lstinline=\marrow=\index{marrow} und \lstinline=\elmove=\index{elmove}.
-\begin{lstlisting}
- !!\mesomeric{!!
- \reactant{
- \chemfig{*6(=[@{e1}]-=-(-[:120]Br)(-[:60]H)-(-[:-30,.4,,,white]\oplus)-[@{e2}])}
- !!\elmove{e1}{60:4mm}{e2}{0:4mm}!!
- }
- !!\marrow!!
- \reactant{
- \chemfig{*6(-(-[:90,.4,,,white]\oplus)-[@{e4}]=[@{e3}]-(-[:120]Br)(-[:60]H)-=)}
- \elmove{e3}{180:4mm}{e4}{150:4mm}
- }
- \marrow
- \reactant{
- \chemfig{*6(-=-(-[:-150,.4,,,white]\oplus)-(-[:120]Br)(-[:60]H)-=)}
- }
- !!}!!
-\end{lstlisting}
-\begin{rxn}[,.8]
- \setatomsep{1.6em}
- \mesomeric{
- \reactant{
- \chemfig{*6(=[@{e1}]-=-(-[:120]Br)(-[:60]H)-(-[:-30,.4,,,white]\oplus)-[@{e2}])}
- \elmove{e1}{60:4mm}{e2}{0:4mm}
- }
- \marrow
- \reactant{
- \chemfig{*6(-(-[:90,.4,,,white]\oplus)-[@{e4}]=[@{e3}]-(-[:120]Br)(-[:60]H)-=)}
- \elmove{e3}{180:4mm}{e4}{150:4mm}
- }
- \marrow
- \reactant{
- \chemfig{*6(-=-(-[:-150,.4,,,white]\oplus)-(-[:120]Br)(-[:60]H)-=)}
- }
- }
-\end{rxn}
-Setzen wir den Code \emph{in den} \lstinline=\branch=\index{branch} nach dem Pfeil, ergibt sich folgendes Gesamtbild:
- \begin{rxn}[,.8]
- \setatomsep{1.6em}
- \reactant[,start]{
- \chemname{\chemfig{*6(-=-=(-[,,,,white]\phantom{Br})-=)}}{Benzol \compound{benzol}}
- }
-
- \branch[below=of start]{
- \arrow[below,,,,both]{\ce{Br2 / AlBr3}}{$-\ce{AlBr4\om}$}
- \mesomeric{
- \reactant{
- \chemfig{*6(=[@{e1}]-=-(-[:120]Br)(-[:60]H)-(-[:-30,.4,,,white]\oplus)-[@{e2}])}
- \elmove{e1}{60:4mm}{e2}{0:4mm}
- }
- \marrow
- \reactant{
- \chemfig{*6(-(-[:90,.4,,,white]\oplus)-[@{e4}]=[@{e3}]-(-[:120]Br)(-[:60]H)-=)}
- \elmove{e3}{180:4mm}{e4}{150:4mm}
- }
- \marrow
- \reactant{
- \chemfig{*6(-=-(-[:-150,.4,,,white]\oplus)-(-[:120]Br)(-[:60]H)-=)}
- }
- }
- }
-
- \arrow{}{}
- \reactant{
- \chemname{\chemfig{*6(-=-=(-Br)-=)}}{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{lstlisting}
- \begin{rxnscheme}[,,,.8]{Elektrophile Substitution}
- \setatomsep{1.6em}
- \reactant[,start]{
- \chemname{\chemfig{*6(-=-=(-[,,,,white]\phantom{Br})-=)}}{Benzol \compound{benzol}}
- }
-
- \branch[below=of start]{
- \arrow[below,,,,both]{\ce{Br2 / AlBr3}}{$-\ce{AlBr4\om}$}
- \mesomeric!![below]!!{
- \reactant{
- \chemfig{*6(=[@{e1}]-=-(-[:120]Br)(-[:60]H)-(-[:-30,.4,,,white]\oplus)-[@{e2}])}
- \elmove{e1}{60:4mm}{e2}{0:4mm}
- }
- \marrow
- \reactant{
- \chemfig{*6(-(-[:90,.4,,,white]\oplus)-[@{e4}]=[@{e3}]-(-[:120]Br)(-[:60]H)-=)}
- \elmove{e3}{180:4mm}{e4}{150:4mm}
- }
- \marrow
- \reactant{
- \chemfig{*6(-=-(-[:-150,.4,,,white]\oplus)-(-[:120]Br)(-[:60]H)-=)}
- }
- }
- }
-
- \arrow{}{}
- \reactant{
- \chemname{\chemfig{*6(-=-=(-Br)-=)}}{Brombenzol \compound{brombenzol}}
- }
- \end{rxnscheme}
-\end{lstlisting}
-Das Ergebnis ist schon besser:
- \begin{rxn}[,.8]
- \setatomsep{1.6em}
- \reactant[,start]{
- \chemname{\chemfig{*6(-=-=(-[,,,,white]\phantom{Br})-=)}}{Benzol \compound{benzol}}
- }
-
- \branch[below=of start]{
- \arrow[below,,,,both]{\ce{Br2 / AlBr3}}{$-\ce{AlBr4\om}$}
- \mesomeric[below]{
- \reactant{
- \chemfig{*6(=[@{e1}]-=-(-[:120]Br)(-[:60]H)-(-[:-30,.4,,,white]\oplus)-[@{e2}])}
- \elmove{e1}{60:4mm}{e2}{0:4mm}
- }
- \marrow
- \reactant{
- \chemfig{*6(-(-[:90,.4,,,white]\oplus)-[@{e4}]=[@{e3}]-(-[:120]Br)(-[:60]H)-=)}
- \elmove{e3}{180:4mm}{e4}{150:4mm}
- }
- \marrow
- \reactant{
- \chemfig{*6(-=-(-[:-150,.4,,,white]\oplus)-(-[:120]Br)(-[:60]H)-=)}
- }
- }
- }
-
- \arrow{}{}
- \reactant{
- \chemname{\chemfig{*6(-=-=(-Br)-=)}}{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=\index{branch} setzen.
-\begin{lstlisting}[firstnumber=6]
- ...
- \branch[below=of start]{
- \arrow[below,,,!!pfeil_a!!,both]{\ce{Br2 / AlBr3}}{$-\ce{AlBr4\om}$}
- }
- !!\branch[below=of pfeil_a]{!!
- \mesomeric{
- \reactant{
- \chemfig{*6(=[@{e1}]-=-(-[:120]Br)(-[:60]H)-(-[:-30,.4,,,white]\oplus)-[@{e2}])}
- \elmove{e1}{60:4mm}{e2}{0:4mm}
- }
- \marrow
- \reactant{
- \chemfig{*6(-(-[:90,.4,,,white]\oplus)-[@{e4}]=[@{e3}]-(-[:120]Br)(-[:60]H)-=)}
- \elmove{e3}{180:4mm}{e4}{150:4mm}
- }
- \marrow
- \reactant{
- \chemfig{*6(-=-(-[:-150,.4,,,white]\oplus)-(-[:120]Br)(-[:60]H)-=)}
- }
- }
- !!}!!
- ...
-\end{lstlisting}
-\begin{rxn}[,.8]
- \setatomsep{1.6em}
- \reactant[,start]{\chemname{\chemfig{*6(-=-=(-[,,,,white]\phantom{Br})-=)}}{Benzol \compound{benzol}} }
-
- \branch[below=of start]{
- \arrow[below,,,pfeil_a,both]{\ce{Br2 / AlBr3}}{$-\ce{AlBr4\om}$}
- }
-
- \branch[below=of pfeil_a,mesomerie]{
- \mesomeric{
- \reactant{
- \chemfig{*6(=[@{e1}]-=-(-[:120]Br)(-[:60]H)-(-[:-30,.4,,,white]\oplus)-[@{e2}])}
- \elmove{e1}{60:4mm}{e2}{0:4mm}
- }
- \marrow
- \reactant{
- \chemfig{*6(-(-[:90,.4,,,white]\oplus)-[@{e4}]=[@{e3}]-(-[:120]Br)(-[:60]H)-=)}
- \elmove{e3}{180:4mm}{e4}{150:4mm}
- }
- \marrow
- \reactant{
- \chemfig{*6(-=-(-[:-150,.4,,,white]\oplus)-(-[:120]Br)(-[:60]H)-=)}
- }
- }
- }
-
- \arrow{}{}
- \reactant{ \chemname{\chemfig{*6(-=-=(-Br)-=)}}{Brombenzol \compound{brombenzol}} }
-\end{rxn}
-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[below,,,pfeil_a,both]{\ce{Br2 / AlBr3}}{$-\ce{AlBr4\om}$}
- }
- \branch[below=of pfeil_a,mesomerie,!!xshift=8.5em!!]{
- \mesomeric{
- \reactant{
- \chemfig{*6(=[@{e1}]-=-(-[:120]Br)(-[:60]H)-(-[:-30,.4,,,white]\oplus)-[@{e2}])}
- \elmove{e1}{60:4mm}{e2}{0:4mm}
- }
- \marrow
- \reactant{
- \chemfig{*6(-(-[:90,.4,,,white]\oplus)-[@{e4}]=[@{e3}]-(-[:120]Br)(-[:60]H)-=)}
- \elmove{e3}{180:4mm}{e4}{150:4mm}
- }
- \marrow
- \reactant{
- \chemfig{*6(-=-(-[:-150,.4,,,white]\oplus)-(-[:120]Br)(-[:60]H)-=)}
- }
- }
- }
- ...
-\end{lstlisting}
-\begin{rxn}[,.8]
- \setatomsep{1.6em}
- \reactant[,start]{\chemname{\chemfig{*6(-=-=(-[,,,,white]\phantom{Br})-=)}}{Benzol \compound{benzol}} }
-
- \branch[below=of start]{
- \arrow[below,,,pfeil_a,both]{\ce{Br2 / AlBr3}}{$-\ce{AlBr4\om}$}
- }
-
- \branch[below=of pfeil_a,mesomerie,xshift=8.5em]{
- \mesomeric{
- \reactant{
- \chemfig{*6(=[@{e1}]-=-(-[:120]Br)(-[:60]H)-(-[:-30,.4,,,white]\oplus)-[@{e2}])}
- \elmove{e1}{60:4mm}{e2}{0:4mm}
- }
- \marrow
- \reactant{
- \chemfig{*6(-(-[:90,.4,,,white]\oplus)-[@{e4}]=[@{e3}]-(-[:120]Br)(-[:60]H)-=)}
- \elmove{e3}{180:4mm}{e4}{150:4mm}
- }
- \marrow
- \reactant{
- \chemfig{*6(-=-(-[:-150,.4,,,white]\oplus)-(-[:120]Br)(-[:60]H)-=)}
- }
- }
- }
-
- \arrow{}{}
- \reactant{ \chemname{\chemfig{*6(-=-=(-Br)-=)}}{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=\index{branch}.
-\begin{lstlisting}[firstnumber=6]
- ...
- \branch[below=of start]{
- \arrow[below,,,!!pfeil_a!!,both]{\ce{Br2 / AlBr3}}{$-\ce{AlBr4\om}$}
- }
- \branch[below=of pfeil_a,!!mesomerie!!,xshift=8.5em]{
- \mesomeric{
- \reactant{
- \chemfig{*6(=[@{e1}]-=-(-[:120]Br)(-[:60]H)-(-[:-30,.4,,,white]\oplus)-[@{e2}])}
- \elmove{e1}{60:4mm}{e2}{0:4mm}
- }
- \marrow
- \reactant{
- \chemfig{*6(-(-[:90,.4,,,white]\oplus)-[@{e4}]=[@{e3}]-(-[:120]Br)(-[:60]H)-=)}
- \elmove{e3}{180:4mm}{e4}{150:4mm}
- }
- \marrow
- \reactant{
- \chemfig{*6(-=-(-[:-150,.4,,,white]\oplus)-(-[:120]Br)(-[:60]H)-=)}
- }
- }
- }
- \branch[!!above=of mesomerie,,xshift=7.25em!!]{
- \arrow[above]{$-\Hpl$}{}
- }
- ...
-\end{lstlisting}
-\begin{rxn}[,.8]
- \setatomsep{1.6em}
- \reactant[,start]{\chemname{\chemfig{*6(-=-=(-[,,,,white]\phantom{Br})-=)}}{Benzol \compound{benzol}} }
-
- \branch[below=of start]{
- \arrow[below,,,pfeil_a,both]{\ce{Br2 / AlBr3}}{$-\ce{AlBr4\om}$}
- }
-
- \branch[below=of pfeil_a,mesomerie,xshift=8.5em]{
- \mesomeric{
- \reactant{
- \chemfig{*6(=[@{e1}]-=-(-[:120]Br)(-[:60]H)-(-[:-30,.4,,,white]\oplus)-[@{e2}])}
- \elmove{e1}{60:4mm}{e2}{0:4mm}
- }
- \marrow
- \reactant{
- \chemfig{*6(-(-[:90,.4,,,white]\oplus)-[@{e4}]=[@{e3}]-(-[:120]Br)(-[:60]H)-=)}
- \elmove{e3}{180:4mm}{e4}{150:4mm}
- }
- \marrow
- \reactant{
- \chemfig{*6(-=-(-[:-150,.4,,,white]\oplus)-(-[:120]Br)(-[:60]H)-=)}
- }
- }
- }
- \branch[above=of mesomerie,,xshift=7.25em]{
- \arrow[above]{$-\Hpl$}{}
- }
- \arrow{}{}
- \reactant{ \chemname{\chemfig{*6(-=-=(-Br)-=)}}{Brombenzol \compound{brombenzol}} }
-\end{rxn}
-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}
- \reactant[,start]{\chemname{\chemfig{*6(-=-=(-[,,,,white]\phantom{Br})-=)}}{Benzol \compound{benzol}} }
-
- \branch[below=of start]{
- \arrow[below,,,pfeil_a,both]{\ce{Br2 / AlBr3}}{$-\ce{AlBr4\om}$}
- }
- \branch[below=of pfeil_a,mesomerie,xshift=8.5em]{
- \mesomeric{
- \reactant{
- \chemfig{*6(=[@{e1}]-=-(-[:120]Br)(-[:60]H)-(-[:-30,.4,,,white]\oplus)-[@{e2}])}
- \elmove{e1}{60:4mm}{e2}{0:4mm}
- }
- \marrow
- \reactant{
- \chemfig{*6(-(-[:90,.4,,,white]\oplus)-[@{e4}]=[@{e3}]-(-[:120]Br)(-[:60]H)-=)}
- \elmove{e3}{180:4mm}{e4}{150:4mm}
- }
- \marrow
- \reactant{
- \chemfig{*6(-=-(-[:-150,.4,,,white]\oplus)-(-[:120]Br)(-[:60]H)-=)}
- }
- }
- }
- \branch[above=of mesomerie,,xshift=7.25em]{
- \arrow[above]{$-\Hpl$}{}
- }
-
- \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}
-
-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[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 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}
-\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.
-
-Auch wenn ich mich bemüht habe, sinnvolle chemische Reaktionen einzusetzen, habe ich nicht extra überprüft, ob jedes Beispiel chemisch sinnvoll ist. Vertrauen Sie den Beispielen diesbezüglich nicht, sondern sehen Sie in einem Lehrbuch der Chemie nach.
Viel Spaß mit \mC!
diff --git a/Master/texmf-dist/doc/latex/mychemistry/mychemistry_en.pdf b/Master/texmf-dist/doc/latex/mychemistry/mychemistry_en.pdf
index 64a09efc74a..c7a97b04807 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 1036d203924..70243a291ca 100644
--- a/Master/texmf-dist/doc/latex/mychemistry/mychemistry_en.tex
+++ b/Master/texmf-dist/doc/latex/mychemistry/mychemistry_en.tex
@@ -4,7 +4,7 @@
% - Creating reaction schemes with LaTeX and ChemFig ---------------------------------- %
% ------------------------------------------------------------------------------------- %
% - Clemens Niederberger -------------------------------------------------------------- %
-% - 2011/04/15 ------------------------------------------------------------------------ %
+% - 2011/04/23 ------------------------------------------------------------------------ %
% ------------------------------------------------------------------------------------- %
% - http://www.niederberger-berlin.net/2011/02/latex-mychemistry/ --------------------- %
% - kontakt@niederberger-berlin.net --------------------------------------------------- %
@@ -43,9 +43,12 @@
\usepackage[makeindex]{splitidx} % Index; Kompilieren: makeindex -sl index.ist *.idx
\usepackage[english]{babel} % Sprache
\usepackage{xspace,paralist} % xspace und Listen
-\usepackage{siunitx}
+\usepackage{siunitx,booktabs}
\DeclareSIUnit{\emlength}{em}
\DeclareSIUnit{\pt}{pt}
+ \sisetup{separate-uncertainty = true,
+ exponent-product = \cdot,
+ per-mode = symbol}
\usepackage{listings,fancyvrb} % wortwörtliche Anzeige
\newcommand{\vitem}[1][]{\SaveVerb[aftersave={\item[\textnormal{\UseVerb[#1]{vsave}}]}]{vsave}}
\usepackage[perpage,multiple]{footmisc} % Fußnoten
@@ -53,6 +56,7 @@
\labelformat{section}{section #1}
\labelformat{subsection}{section #1}
\labelformat{subsubsection}{section #1}
+ \labelformat{table}{table #1}
\usepackage[dvipsnames]{xcolor} % Farbe
\colorlet{code}{RawSienna}
\xdefinecolor{MyDarkRed}{rgb}{0.4392,0.0627,0.0627}
@@ -83,7 +87,7 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\usepackage{hyperref}
\hypersetup{colorlinks=true, % Setup der Hyperlinks und des pdf
- linkcolor=green!50!black,
+ linkcolor=MyDarkRed!20!red,
urlcolor=blue!70,
plainpages=false,
bookmarksopen=true,
@@ -92,7 +96,7 @@
pdfstartview=FitH,
pdfauthor={Clemens Niederberger},
pdftitle={myChemistry - english documentation},
- pdfsubject={Creating reactionschemes with LaTeX},
+ pdfsubject={Create reaction schemes with LaTeX and ChemFig},
pdfkeywords={myChemistry},
pdfcreator={LaTeX}
}
@@ -123,7 +127,7 @@
keywordstyle=[20]\color{blue},
morekeywords=[20]{rxn,rxnfloat,rxnscheme,tikzpicture},
texcsstyle=[30]\color{code},
- moretexcs=[30]{anywhere,arrow,branch,chemabove,chemand,chembelow,chemfig,chemmove,chemname,chemrel,chemsign,ce,color,compound,declarecompound,draw,dummy,elmove,floatplacement,floatstyle,Hpl,Hyd,lewis,listof,makeinvisible,makevisible,marrow,mCsetup,merge,mesomeric,node,nu,om,op,ox,pgfpositionnodelater,reactant,restylefloat,setarrowlength,setarrowline,setatomsep,setatomsize,setbondlength,setbondshape,setbondwidth,setcrambond,setmergelength,setrcndist,setrxnalign,setschemealign,setschemename,si,SI,textcolor,transition},
+ moretexcs=[30]{anywhere,arrow,branch,chemabove,chemand,chembelow,chemfig,chemmove,chemname,chemrel,chemsign,ce,color,compound,declarecompound,draw,dummy,elmove,floatplacement,floatstyle,Hpl,Hyd,lewis,listof,makeinvisible,makevisible,marrow,mCsetup,merge,mesomeric,node,nu,om,op,ox,pgfpositionnodelater,reactant,restylefloat,setarrowlabel,setarrowlength,setarrowline,setatomsep,setatomsize,setbondlength,setbondshape,setbondwidth,setcrambond,setmergelength,setrcndist,setrxnalign,setschemealign,setschemename,si,SI,textcolor,transition,vflipnext},
fancyvrb=true
}
@@ -135,6 +139,7 @@
\setheadwidth{textwithmarginpar}
\automark{section}
\ihead{\mC v\mCversion}
+\ohead{Manual}
\ifoot{\small\color{gray}-~page~\thepage~-}
\cfoot{}
\ofoot{}
@@ -238,7 +243,7 @@
\makeatother
% - weitere Makros -------------------------------------------------------------------- %
-\newcommand{\mC}{{\color{MyDarkRed}\sffamily my\-Chemis\-try}\xspace} % Paketname
+\newcommand{\mC}{{\color{MyDarkRed}\ECFJD my\-Che\-mis\-try}\xspace} % Paketname
\newcommand{\CF}{{\ECFAugie ChemFig}\xspace} % ChemFig in der originalen Schrift
\newcommand{\eg}{\mbox{e.\,g.}\xspace}
\newcommand{\TikZ}{\mbox{Ti{\bfseries\itshape k}Z}\xspace}
@@ -263,31 +268,27 @@
\chemfig{C(-[4]*6(=-=-=-))(-[2]*6(=-=-=-))(-[6,,,2]HO)-C(-[2]CH_3)
(-[6]OH)-CH_3}
}
- \branch[above right=of a]{
- \arrow[above right,,.7]{}{}
- \reactant[above right]{
- \chemfig{C(-[4]*6(=-=-=-))(-[2]*6(=-=-=-))(-[@{e1}6,,,2]H_2@{e2}
- \chembelow{O}{\oplus})-C(-[2]CH_3)(-[6]OH)-CH_3}\elmove{e1}
- {10:4mm}{e2}{-10:4mm}
- }
- \arrow{$-\ce{H2O}$}{}
- \reactant{
- \chemfig{\chembelow{C}{\oplus}(-[4]*6(=-=-=-))(-[2]*6(=-=-=-))-C
- (-[2]CH_3)(-[6]OH)-CH_3}
- }
+ \arrow[a.20]{}{}
+ \reactant[20]{
+ \chemfig{C(-[4]*6(=-=-=-))(-[2]*6(=-=-=-))(-[@{e1}6,,,2]H_2@{e2}
+ \chembelow{O}{\oplus})-C(-[2]CH_3)(-[6]OH)-CH_3}\elmove{e1}
+ {10:4mm}{e2}{-10:4mm}
}
- \branch[below right=of a]{
- \arrow[below right,-|>,.7]{}{}
- \reactant[below right]{
- \chemfig{C(-[4]*6(=-=-=-))(-[2]*6(=-=-=-))(-[6,,,2]HO)-C(-[2]CH_3)
- (-[@{e3}6]@{e4}\chembelow{O}{\oplus}H_2)-CH_3}\elmove{e3}
- {170:4mm}{e4}{-170:4mm}
- }
- \arrow{$-\ce{H2O}$}{}
- \reactant{
- \chemfig{C(-[4]*6(=-=-=-))(-[2]*6(=-=-=-))(-[6,,,2]HO)-
- \chembelow{C}{\oplus}(-[2]CH_3)-CH_3}
- }
+ \arrow[,,1.42]{$-\ce{H2O}$}{}
+ \reactant{
+ \chemfig{\chembelow{C}{\oplus}(-[4]*6(=-=-=-))(-[2]
+ *6(=-=-=-))-C(-[2]CH_3)(-[6]OH)-CH_3}
+ }
+ \arrow[a.-20,-|>]{}{}
+ \reactant[-20]{
+ \chemfig{C(-[4]*6(=-=-=-))(-[2]*6(=-=-=-))(-[6,,,2]HO)-C(-[2]CH_3)
+ (-[@{e3}6]@{e4}\chembelow{O}{\oplus}H_2)-CH_3}\elmove{e3}
+ {170:4mm}{e4}{-170:4mm}
+ }
+ \arrow[,,1.42]{$-\ce{H2O}$}{}
+ \reactant{
+ \chemfig{C(-[4]*6(=-=-=-))(-[2]*6(=-=-=-))(-[6,,,2]HO)-
+ \chembelow{C}{\oplus}(-[2]CH_3)-CH_3}
}
\end{rxn}
\end{verbatim}%
@@ -301,22 +302,18 @@
\color{white}\huge Creating reaction schemes with \LaTeX\ and \CF%
\end{center}
\vskip3cm
- \begin{rxn}[,.7]
- \setatomsep{1.5em}\footnotesize
- \reactant[,a]{ \chemfig{C(-[4]*6(=-=-=-))(-[2]*6(=-=-=-))(-[6,,,2]HO)-C(-[2]CH_3)(-[6]OH)-CH_3} }
- \branch[above right=of a]{
- \arrow[above right,,.7]{}{}
- \reactant[above right]{ \chemfig{C(-[4]*6(=-=-=-))(-[2]*6(=-=-=-))(-[@{e1}6,,,2]H_2@{e2}\chembelow{O}{\oplus})-C(-[2]CH_3)(-[6]OH)-CH_3}\elmove{e1}{10:4mm}{e2}{-10:4mm} }
- \arrow{$-\ce{H2O}$}{}
- \reactant{ \chemfig{\chembelow{C}{\oplus}(-[4]*6(=-=-=-))(-[2]*6(=-=-=-))-C(-[2]CH_3)(-[6]OH)-CH_3} }{}
- }
- \branch[below right=of a]{
- \arrow[below right,-|>,.7]{}{}
- \reactant[below right]{ \chemfig{C(-[4]*6(=-=-=-))(-[2]*6(=-=-=-))(-[6,,,2]HO)-C(-[2]CH_3)(-[@{e3}6]@{e4}\chembelow{O}{\oplus}H_2)-CH_3}\elmove{e3}{170:4mm}{e4}{-170:4mm} }
- \arrow{$-\ce{H2O}$}{}
- \reactant{ \chemfig{C(-[4]*6(=-=-=-))(-[2]*6(=-=-=-))(-[6,,,2]HO)-\chembelow{C}{\oplus}(-[2]CH_3)-CH_3} }
- }
- \end{rxn}
+\begin{rxn}[,.7]
+ \setatomsep{1.5em}\footnotesize
+ \reactant[,a]{ \chemfig{C(-[4]*6(=-=-=-))(-[2]*6(=-=-=-))(-[6,,,2]HO)-C(-[2]CH_3)(-[6]OH)-CH_3} }
+ \arrow[a.20]{}{}
+ \reactant[20]{ \chemfig{C(-[4]*6(=-=-=-))(-[2]*6(=-=-=-))(-[@{e1}6,,,2]H_2@{e2}\chembelow{O}{\oplus})-C(-[2]CH_3)(-[6]OH)-CH_3}\elmove{e1}{10:4mm}{e2}{-10:4mm} }
+ \arrow[,,1.42]{$-\ce{H2O}$}{}
+ \reactant{ \chemfig{\chembelow{C}{\oplus}(-[4]*6(=-=-=-))(-[2]*6(=-=-=-))-C(-[2]CH_3)(-[6]OH)-CH_3} }{}
+ \arrow[a.-20,-|>]{}{}
+ \reactant[-20]{ \chemfig{C(-[4]*6(=-=-=-))(-[2]*6(=-=-=-))(-[6,,,2]HO)-C(-[2]CH_3)(-[@{e3}6]@{e4}\chembelow{O}{\oplus}H_2)-CH_3}\elmove{e3}{170:4mm}{e4}{-170:4mm} }
+ \arrow[,,1.42]{$-\ce{H2O}$}{}
+ \reactant{ \chemfig{C(-[4]*6(=-=-=-))(-[2]*6(=-=-=-))(-[6,,,2]HO)-\chembelow{C}{\oplus}(-[2]CH_3)-CH_3} }
+\end{rxn}
\end{titlepage}
\tableofcontents
@@ -337,7 +334,7 @@ Last but not least since v1.2 \mC underlies LPPL version 1.3 or later.
\subsubsection{Version 1.3}
The commands \lstinline+\branch+, \lstinline+\mesomeric+, \lstinline+\reactant+ and \lstinline+\transition+ now cannot only accept alignment as optional argument but \TikZ keys as well. Also the second mandatory Argument \lstinline+<anchor>+ now is an optional one. So the first argument still is alignment, the second is the anchor name and in the third you can use arbitrary \TikZ keys.
\begin{lstlisting}
- \command[<alignment>,<anchor>,<tikz>]{}
+ \command[<pos>,<anchor>,<tikz>]{}
\end{lstlisting}
Version 1.2 explicitly needed a given alignment, if one wanted to use \TikZ keys, even with default alignment. Since v\mCversion\ this isn't required any more.
\begin{lstlisting}
@@ -354,18 +351,27 @@ If you're using \CF v0.4 or v0.4a, \mC inputs the file \lstinline+bondwith.tex+
And you might find this one nice: every \mC command in a listing in this do\-cu\-mentation is a hyperlink referring to the corresponding entry in the command reference.
-\subsubsection{Version \mCversion}
-\NEU%
+\subsubsection{Version 1.4}
The command \lstinline+\merge+ has been rewritten. Now the arrow can be labeled.
The main purpose of the command \lstinline+\dummy+ now is obsolete. The command still exists, though.
Both environments \lstinline+rxn+ and \lstinline+rxnscheme+ have changed regarding the usage of their options, see \ref{sssec:rxn_optionen} and \ref{sssec:rxnscheme_optionen}.
-The keys of the \lstinline+\arrow+ command now are options, so the syntax of the command now is consistent with the syntax of the other commands. Then there is a new arrow type, see \ref{ssec:arrow}. Also new is the appearance of the arrows and the possibility of customizing the line thickness of the arrows, see \ref{ssec:setarrowline}.
+The keys of the \lstinline+\arrow+ command now are options, so the syntax of the command now is consistent with the syntax of the other commands. Then there are three new arrow types, see \ref{ssec:arrow}. Also new is the appearance of the arrows and the possibility of customizing the line thickness of the arrows, see \ref{ssec:setarrowline}.
There is another new command \lstinline+\anywhere+ (\ref{ssec:anywhere}), with which text or formul\ae\ can be placed off the chain.
+\subsubsection{Version \mCversion}
+\NEU%
+Much happened in the background. This also provides some new features in the foreground. Most importantly is a new handling of the positioning of objects. All objects (reactants, arrows, branches \ldots) now cannot only be positioned with key words like \lstinline+right below+ but by using an actual angle.
+
+There are the new arrow types \lstinline+<=>>+ and \lstinline+<<=>+ which indicate an imbalanced equilibrium.
+
+The default placement identifier of \lstinline+rxnscheme+ has been changed from \lstinline+H+ to \lstinline+htp+.
+
+The example section has been moved from this manual to the file \texttt{examples.tex} or \texttt{examples.pdf}, resp.
+
\subsection{Licence}
\mC v\mCversion\ underlies the The \LaTeX\ project public license\\(\url{http://www.latex-project.org/lppl.txt}).
@@ -447,7 +453,14 @@ In some of the examples in this documentation the nodes are boxed with a coloure
\subsection{How does it work?}
\subsubsection{Basic Commands}
-Let's take a look at an example first:
+There are three basic commands:\index{reactant}\index{rxn}\index{arrow}
+\begin{lstlisting}
+ \begin{rxn}[<alignment>,<scale factor>]
+ \reactant[<pos>,<name>,<tikz>]{<formula>}
+ \arrow[<pos>,<type>,<length factor>,<name>,both,<tikz>]{<above>}{<below>}
+ \end{rxn}
+\end{lstlisting}
+Schemes are created within the \lstinline+rxn+ environment. There you place reactants and arrows.
\begin{SideBySideExample}
\begin{rxn}
\reactant{ \chemfig{-[::30]-[::-60]OH} }
@@ -455,90 +468,199 @@ Let's take a look at an example first:
\reactant{ \chemfig{-[::30]=_[::-60]O} }
\end{rxn}
\end{SideBySideExample}
-In this example you see the most important commands of \mC:\index{rxn}
-\begin{lstlisting}
- \begin{rxn}[<align>,<scalefactor>]
-\end{lstlisting}
-The first of two environments. It creates a centered reaction scheme between two paragraphs (see \ref{ssec:rxn}).\index{reactant}
-\begin{lstlisting}
- \reactant[<alignment>,<anchor>,<tikz>]{<formula>}
-\end{lstlisting}
-places a \lstinline+node+ on the \lstinline+chain+, in which the chemical formul\ae\ are written. The default alignment is to the \lstinline=right= (see \ref{ssec:reactant}).\index{arrow}
+When you don't use options reactants and arrows always are put to the right of the last object. With the option \lstinline+<pos>+ you can change this behaviour.
+\begin{SideBySideExample}
+ % positioning using key words
+ \begin{rxn}
+ \reactant{ \chemfig{-[::30]-[::-60]OH} }
+ \arrow[below]{Ox.}{}
+ \reactant[below]{ \chemfig{-[::30]=_[::-60]O} }
+ \end{rxn}
+ % positioning using an angle
+ \begin{rxn}
+ \reactant{ \chemfig{-[::30]-[::-60]OH} }
+ \arrow[180]{}{Ox.}
+ \reactant[180]{ \chemfig{-[::30]=_[::-60]O} }
+ \end{rxn}
+\end{SideBySideExample}
+\begin{table}
+ \centering
+ \begin{tabular}{>{\tt}lSS}
+ \toprule
+ {\normalfont key word} & {pos. angle} & {neg. angle} \\
+ \midrule
+ right & 0 & \pm 360 \\
+ right above & 45 & -315 \\
+ above & 90 & -270 \\
+ above left & 135 & -225 \\
+ left & 180 & -180 \\
+ below left & 225 & -135 \\
+ below & 270 & -90 \\
+ below right & 315 & -45 \\
+ \bottomrule
+ \end{tabular}
+ \caption{key words for positioning}\label{tab:keywords}
+\end{table}
+You can see in the last example, that positioning can be realized through key words (see \ref{tab:keywords}) like \lstinline+below+ or by using the angle relative to the horizontal line. Every angle from the interval $[\ang{-360};\ang{360}]$. \ang{0} corresponds to \lstinline+right+, which is the default value. \emph{Positive angles} mean a turn \emph{counter clockwise}, negative ones a turn clockwise, like you're used to in mathematics.
+\begin{SideBySideExample}
+ \begin{rxn}
+ \reactant{ \chemfig{-[::30]-[::-60]OH} }
+ \arrow[20]{Ox.}{}
+ \reactant[20]{ \chemfig{-[::30]=_[::-60]O} }
+ \end{rxn}
+ \begin{rxn}
+ \reactant{ \chemfig{-[::30]-[::-60]OH} }
+ \arrow[-20]{Ox.}{}
+ \reactant[-20]{ \chemfig{-[::30]=_[::-60]O} }
+ \end{rxn}
+\end{SideBySideExample}
+
+\subsubsection{Positioning}
+Reactants and arrows cannot only be positioned through key words and angles. They can refer to another reactant or arrow.
+\begin{Example}
+ \begin{rxn}
+ \reactant[,start]{ \chemfig{R-[::30](-[::60]R|^1) (-[::-120]R|^2)-[::-60]OH} }
+ \arrow[40]{\tiny$\text{R}^1=\text{H}$} {\tiny$\text{R}^2=\text{H}$}
+ \reactant[40]{ \chemfig{R-[::30]=_[::-60]O} }
+ \arrow[start.0]{\tiny$\text{R}^1=\text{alkyl}$} {\tiny$\text{R}^2=\text{H}$}
+ \reactant{ \chemfig{R-[::30](-[::60]R)=_[::-60]O} }
+ \arrow[start.-40,-|>]{\tiny$\text{R}^1=\text{alkyl}$} {\tiny$\text{R}^2=\text{Alkyl}$}
+ \end{rxn}
+\end{Example}
+In the last example the first reactant got the \lstinline+<name>+ \lstinline+start+. The arrows in lines 5 and 7 now could refer to it. A \emph{previously given name} can act as an anchor for later reactants or arrows, if the positioning is written like
\begin{lstlisting}
- \arrow[<direction>,<type>,<length factor>,<anchor>,both]{<above>}{<below>}
+ <anchor>.<angle>
\end{lstlisting}
-creates an arrow, which by default has a length of \SI{5}{\emlength} pointing to the right (see \ref{ssec:arrow}).
+Arrows can be given names, too. The anchor point of an arrow always is in the middle of the arrow line and has \emph{no} size.
\begin{SideBySideExample}
\begin{rxn}
- \reactant{ \chemfig{-[::30]=_[::-60]O} }
- \arrow[below]{}{Ox.}
- \reactant[below]{ \chemfig{-[::30](-[::60]OH)=_[::-60]O} }
+ \reactant{\chemfig{[:60]-(-[::60])=[::-60](-[::-60])-}}
+ \arrow[,,,arrow]{}{}
+ \reactant[arrow.90]{\ce{H2O}}
\end{rxn}
\end{SideBySideExample}
-As you can see one can align the reaction scheme vertical as well. By giving \lstinline=\reactant= the option \lstinline=below=, the carbonic acid is placed below the arrow. With \lstinline+below+ the arrow points down instead to the right.
+Using this kind of positioning does \emph{not} break the chain.
+\begin{lstlisting}
+ \begin{rxn}
+ \reactant[,a]{A}
+ \arrow{}{}
+ \reactant{B}
+ \arrow[a.-90]{}{}
+ \reactant[-90]{C}
+ \arrow[a.180]{}{}
+ \reactant[180]{D}
+ \end{rxn}
+\end{lstlisting}
+All seven objects of this example are logically speaking part of the same chain. The next obect is placed to the right of the last one, if no positioning is used.
+\begin{rxn}
+ \tikzset{nummer/.style={circle,fill=gray!30,draw=gray,minimum size=3.5mm}}
+ \reactant[,a]{A}\arrow[,,,pa]{}{}\reactant[,b]{B}
+ \arrow[a.-90,,,pb]{}{}\reactant[-90,c]{C}
+ \arrow[a.180,,,pc]{}{}\reactant[180,d]{D}
+ \anywhere{a.45,,nummer}{1}
+ \anywhere{pa.90,,nummer}{2}
+ \anywhere{b.45,,nummer}{3}
+ \anywhere{pb.0,,nummer}{4}
+ \anywhere{c.45,,nummer}{5}
+ \anywhere{pc.90,,nummer}{6}
+ \anywhere{d.45,,nummer}{7}
+\end{rxn}
\subsubsection{Branches}
-With what we saw until now it is not yet clear, why one would use \mC. the horizontal reaction schemes can be realized with \CF and `mhchem' just as well. And why would anyone need a vertical reaction scheme? But what could make \mC interesting is the possibility of branched reaction schemes.\index{branch}
+To break a chain you use the command\index{branch}
+\begin{lstlisting}
+ \branch[<pos>,<name>,<tikz>]{<formulae>}
+\end{lstlisting}
+The positioning of a branch is slightly different from earlier objects, although the syntax is similar. A branch has two additional ways of positioning. Every positioning that refers to an anchor cause that the branch is not a part of the chain but is a real branch.
+\begin{lstlisting}
+ <angle> % on the chain
+ <key> % on the chain
+ <anchor>.<angle> % not on the chain
+ on chain=going <key> % on the chain
+ <key>=of <anchor> % not on the chain
+\end{lstlisting}
+As \lstinline+<key>+ you again use the values from \ref{tab:keywords}.
\begin{Example}
\begin{rxn}
\reactant{ \chemfig{-[::30]-[::-60]OH} }
\arrow{}{}
\reactant[,carbonyl]{ \chemfig{-[::30]=_[::-60]O} }
- \arrow[below]{}{}
- \reactant[below]{ \chemfig{-[::30](-[::60]OH)=_[::-60]O} }
- \branch[right=of carbonyl]{
- \arrow[,<=>]{\ce{NH2R}}{}
- \reactant{ \chemfig{-[::30]=_[::-60]N(-[6]H)-[::60]R} }
+ \branch[carbonyl.-90]{
+ \arrow[-90,<=>]{\ce{NH2R}}{}
+ \reactant[-90]{ \chemfig{-[::30]=_[::-60]N(-[6]H)-[::60]R} }
}
+ \arrow{}{}
+ \reactant{ \chemfig{-[::30](-[::60]OH)=_[::-60]O} }
\end{rxn}
\end{Example}
-In the last example you've got to know another important command (see \ref{ssec:branch})\index{branch}:
+Please note that in the last example the arrow and the reactant placed after branch continue the original chain.
\begin{lstlisting}
- \branch[<alignment>,<anchor>,<tikz>]{<branch commands>}
+ \begin{rxn}
+ \reactant[,a]{A}
+ \arrow{}{}
+ \reactant{B}
+ \branch[a.-90]{
+ \arrow[-90]{}{}
+ \reactant[-90]{C}
+ }
+ \arrow[a.180]{}{}
+ \reactant[180]{D}
+ \end{rxn}
\end{lstlisting}
-The branch was placed right of the first reactant with the anchor \lstinline=carbonyl= by using the option \lstinline+right=of carbonyl+. Inside the branch we used an arrow with the key \lstinline+type={<=>}+ so we would get an equilibrium arrow. Other types would for example be \lstinline=->= (default), \lstinline=<-= or \lstinline=<->=.
-
-Extensive reaction schemes can be realized through multiple usage of \lstinline=\branch=\index{branch}:
+The chain is broken by the branch which starts a new chain itself.
+\begin{rxn}
+ \tikzset{nummer/.style={circle,fill=gray!30,draw=gray,minimum size=3.5mm}}
+ \reactant[,a]{A}\arrow[,,,pa]{}{}\reactant[,b]{B}
+ \branch[a.-90]{
+ \arrow[-90,,,pb]{}{}\reactant[-90,c]{C}
+ \anywhere{pb.0,,nummer}{a}
+ \anywhere{c.45,,nummer}{b}
+ }
+ \arrow[a.180,,,pc]{}{}\reactant[180,d]{D}
+ \anywhere{a.45,,nummer}{1}
+ \anywhere{pa.90,,nummer}{2}
+ \anywhere{b.45,,nummer}{3}
+ \anywhere{pc.90,,nummer}{4}
+ \anywhere{d.45,,nummer}{5}
+\end{rxn}
+Using \lstinline+\branch+ allows to create schemes with several branches:
\begin{Example}
\begin{rxn}
\reactant{ \chemfig{-[::30]-[::-60]OH} }
\arrow{}{}
\reactant[,carbonyl]{ \chemfig{-[::30]=_[::-60]O} }
- \arrow[below]{}{}
- \reactant[below]{ \chemfig{-[::30](-[::60]OH)=_[::-60]O} }
- \branch[right=of carbonyl,imin]{
+ \arrow[-90]{}{}
+ \reactant[-90]{ \chemfig{-[::30](-[::60]OH)=_[::-60]O} }
+ \branch[right=of carbonyl]{
\arrow[,<=>,1.12]{\ce{NH2R}}{}
\reactant{ \chemfig{-[::30]=_[::-60]N(-[6]H)-[::60]R} }
}
- \branch[below right=of carbonyl,halbacetal,yshift=-2pt,xshift=3pt]{
- \arrow[below right,<=>,1.12]{ \chemfig{[,.75]-[::30]-[::-60]OH} }{}
- \reactant[below right]{ \chemfig{-[::30](-[::60]O-[::-60]-[::-60])-[::-60]OH} }
- }
- \branch[above=of carbonyl,aldol,xshift=5.2em]{
- \arrow[above]{ \chemfig{[,.75]-[::30]=_[::-60]O}/\Hpl }{}
- \reactant[above]{ \chemfig{-[::30](-[::60]OH)-[::-60]-[::60]=[::60]O} }
- \arrow{$-\ce{H2O}$}{}
- \reactant{ \chemfig{-[::30]=[::-60]-[::60]=[::60]O} }
+ \branch[below right=of carbonyl]{
+ \arrow[-45,<=>,1.12]{ \chemfig{[,.75]-[::30]-[::-60]OH} }{}
+ \reactant[-45]{ \chemfig{-[::30](-[::60]O-[::-60]-[::-60])-[::-60]OH} }
}
+ \arrow[carbonyl.90]{ \chemfig{[,.75]-[::30]=_[::-60]O}/\Hpl }{}
+ \reactant[90]{ \chemfig{-[::30](-[::60]OH)-[::-60]-[::60]=[::60]O} }
+ \arrow{$-\ce{H2O}$}{}
+ \reactant{ \chemfig{-[::30]=[::-60]-[::60]=[::60]O} }
\end{rxn}
\end{Example}
\subsubsection{Numbered Schemes}
-The second environment provided by \mC works just as the first one. This time the scheme is placed within a numbered floating environment and is given a caption.\index{rxnscheme}
+There is another environment to create schemes.\index{rxnscheme}
+\begin{lstlisting}
+ \begin{rxnscheme}[<label>,<placement>,<alignment>,<skale factor>,<title>]{<caption>}
+ ...
+ \end{rxnscheme}
+\end{lstlisting}
+This is a floating environment for schemes, which can be given a \lstinline+<caption>+, a \lstinline+<label>+ and the common placement identifiers like \lstinline+htp+ (default).
\begin{Example}
- \begin{rxnscheme}{Keto-enol tautomerization}
+ \begin{rxnscheme}[,H]{Keto-Enol-tautomerism}
\reactant{ \chemfig{=[::30]-[::-60]OH} }
\arrow[,<=>]{}{}
\reactant{ \chemfig{-[::30]=[::-60]O} }
\end{rxnscheme}
\end{Example}
-Here we use the environment
-\begin{lstlisting}
- \begin{rxnscheme}[<label>,<placement>,<align>,<scalefactor>,<name>]{<caption>}
- ...
- \end{rxnscheme}
-\end{lstlisting}
-In the command reference (\ref{ssec:rxnscheme}) you can read how to customize the scheme.
\subsection{Predefined Values}\index{default values|(}
There are some predefined values, that are basically due to my personal taste. But of course you can change them according to your requirements. For \CF-formul\ae\ \emph{inside of \mC environments} some values are predefined as follows:
@@ -563,29 +685,35 @@ With these commands, the parameters are changed \emph{for all following} \mC env
\begin{Example}
\setbondlength{2.1em}\setbondshape{5pt}{1pt}{2pt}\setatomsize{\Large}
\begin{rxn}
- \reactant{\chemfig{-[::30](<[::60])-[::-60](<:[::-60])-[::60]}}
+ \reactant{\chemfig{-[::30](<[::60])-[::-60](<:[::-60])-[::60]A}}
\end{rxn}
\setbondlength{}\setbondshape{}{}{}\setatomsize{}
\begin{rxn}
- \reactant{\chemfig{-[::30](<[::60])-[::-60](<:[::-60])-[::60]}}
+ \reactant{\chemfig{-[::30](<[::60])-[::-60](<:[::-60])-[::60]A}}
\end{rxn}
\end{Example}
If you only want to change the parameters of a single environment you can use \CF's commands and \LaTeX's fontsize commands \emph{inside the environment}.
\begin{Example}
\begin{rxn}
\setatomsep{2.1em}\setcrambond{5pt}{1pt}{2pt}\Large
- \reactant{\chemfig{-[::30](<[::60])-[::-60](<:[::-60])-[::60]}}
+ \reactant{\chemfig{-[::30](<[::60])-[::-60](<:[::-60])-[::60]A}}
\end{rxn}
\begin{rxn}
- \reactant{\chemfig{-[::30](<[::60])-[::-60](<:[::-60])-[::60]}}
+ \reactant{\chemfig{-[::30](<[::60])-[::-60](<:[::-60])-[::60]A}}
\end{rxn}
\end{Example}
-The default length of an arrow is \SI{5}{\emlength} or $5\sqrt2\,\si{\emlength}$ if it's a diagonal one. You can change that by using the following command:\index{setarrowlength}
+The default length of reaction arrows is \SI{4}{\emlength}, the default line width is \lstinline+semithick+ and the default label distance is \SI{0.2}{\emlength}. You can change these default values with the commands\index{setarrowlength}\index{setarrowline}\index{setarrowlabel}
\begin{lstlisting}
\setarrowlength{<length>}
+ \setarrowline{<line width>}
+ \setarrowlabel{<label distance>}
+\end{lstlisting}
+or with\index{mCsetup}
+\begin{lstlisting}
+ \mCsetup{arrowlength=<length>,
+ arrowline=<line width>,
+ arrowlabel=<label distance>}
\end{lstlisting}
-\SaveVerb{arrowlength}=<length>=%
-Then the values are \UseVerb{arrowlength} or $\text{\UseVerb{arrowlength}}\cdot\sqrt{2}$ respectively.
\index{default values|)}
\subsection{Package options}\label{ssec:paketoptionen}\index{options|(}
@@ -701,35 +829,77 @@ You could, just for fun?, change the looks of a molecule with \TikZ.
\end{rxn}
\chemfig[->,green!45!blue!55]{*6(---(-)---)}
\end{SideBySideExample}
-The last example is not very good, of course, since you can achieve the same result using \CF's own possibilities. But other cases are imaginable:
+The last example is not very good, of course, since you can achieve the same result using \CF's own possibilities. But other cases are imaginable: for example one could define a style with which reactants are shown:
\begin{Example}
- \newcommand{\emptyreactant}{\reactant[,minimum width=5em]{ \rule[-1em]{1em}{.5pt}\;\rule[-1em]{3em}{.5pt} }{}}
- \newcommand{\stoich}{\rule[-3pt]{1em}{.5pt}}
+ \colorlet{mCgreen}{green!50!gray}
+ \colorlet{mCblue}{cyan!50!gray}
+ \colorlet{mCred}{magenta!50!gray}
+ \colorlet{mCyellow}{yellow!50!gray}
\begin{rxn}
- \reactant{\bf\Large Ionic compounds (I)}
- \reactant[below,a,yshift=1em]{Fill in the missing parts}
- \branch[below=of a,b]{ \reactant[,,minimum width=5em]{ \stoich\ Na }\chemand \emptyreactant \arrow{}{} \emptyreactant \chemand \emptyreactant }
- \branch[below=of b,,draw,inner sep=3pt]{\reactant[,,minimum width=5em]{}\chemand\reactant[,,minimum width=5em]{}\arrow{}{}\reactant[,,minimum width=5em]{Sodium chloride $+$ Hydrogen}}
+ \tikzset{reactant/.style={draw=#1,fill=#1!10,inner sep=1em,minimum height=10em,minimum width=12em,rounded corners}}
+ \reactant[,cytosine,reactant=mCred]{\chemfig{H-[:30]N*6(-(=O)-N=(-NH_2)-=-)}}
+ \anywhere{cytosine.-90,,yshift=-2mm}{Cytosine}
+ \reactant[,thymine,reactant=mCyellow]{\chemfig{H-[:30]N*6(-(=O)-N(-H)-(=O)-(-CH_3)=-)}}
+ \anywhere{thymine.-90,,yshift=-2mm}{Thymine}
+ \reactant[cytosine.-90,adenine,yshift=-2em,reactant=mCblue]{\chemfig{[:-36]*5(-N(-H)-*6(-N=-N=(-NH_2)--)--N=)}}
+ \anywhere{adenine.-90,Guanin,yshift=-2mm}{Adenine}
+ \reactant[,guanine,reactant=mCgreen]{\chemfig{[:-36]*5(-N(-H)-*6(-N=(-NH_2)-N(-H)-(=O)--)--N=)}}
+ \anywhere{guanine.-90,,yshift=-2mm}{Guanine}
\end{rxn}
\end{Example}
+This way certain parts of a scheme could be emphasized:
+\begin{Example}
+ \begin{rxn}
+ \setatomsep{1.5em}
+ \colorlet{mCgreen}{green!50!gray}
+ \tikzset{emph/.style={draw=mCgreen,fill=mCgreen!10,inner sep=1em}}
+ \reactant[,lineOne]{\chemfig{R^1-[:30](=[@{b1}2]O)-[:-30]O-H}}
+ \arrow[,<=>]{\chemfig{@{Hpl1}\Hpl}}{}
+ \branch[,,emph]{
+ \reactant{\chemfig{R^1-[:30]@{C1}(-[2]O-[:30]H)(-[6,.5,,,draw=none]\oplus)-[:-30]O-H}}
+ \arrow[,<=>,2]{\chemfig{[:30]H-@{O1}O-[::-60]-R^2}}{}
+ \reactant{\chemfig{R^1-[:30](-[2]O-[:30]H)(-[6]@{O2}O-[:-150]H)-[:-30]@{O3}\chemabove{O}{\oplus}(-[@{b2}6]H)-[:30]-[:-30]R^2}}
+ }
+ \anywhere{lineOne.-90,lineTwo,xshift=-3em,yshift=-7em}{}
+ \arrow[lineTwo.0,<=>]{$-$\Hpl/\chemfig{@{Hpl2}\Hpl}}{}
+ \reactant{\chemfig{R^1-[:30](-[@{b3}2]O-[@{b4}:30]H)(-[@{b5}6]@{O4}\chembelow{O}{\oplus}(-[:-30]H)-[:-150]H)-[:-30]O-[:30]-[:-30]R^2}}
+ \arrow[,<=>,2]{\ce{- \Hpl - H2O}}{}
+ \reactant{\chemfig{R^1-[:30](=[2]O)-[:-30]O-[:30]-[:-30]R^2}}
+ \anywhere{lineTwo.-90}{
+ \elmove{b1}{10:5mm}{Hpl1}{135:1cm}
+ \elmove{O1}{135:1.5cm}{C1}{30:5mm}
+ \elmove{O2}{-90:3cm}{Hpl2}{90:2cm}
+ \elmove{b2}{0:5mm}{O3}{-10:5mm}
+ \elmove{b4}{-40:5mm}{b3}{0:5mm}
+ \elmove{b5}{-30:5mm}{O4}{-10:5mm}
+ }
+ \end{rxn}
+\end{Example}
+\newpage
\section{Alphabetical Command Reference}
In the following section every command is explained.
-\subsection{anywhere}\label{ssec:anywhere}\index{anywhere|(}\index{Befehle!anywhere}
+\subsection{anywhere}\label{ssec:anywhere}\index{anywhere|(}\index{commands!anywhere}
\NEU%
-Sometimes it is useful to be able to place a reactant outside of the chain, \eg see \ref{rs:hydratisation}.
+Sometimes it might be useful to be able to place a reactant or anything else off the chain.
+\begin{lstlisting}
+ \anywhere{<pos>,<name>,<tikz>}{<something>}
+\end{lstlisting}
+For this case there's \lstinline+\anywhere+. It is positioned with \lstinline+<pos>+ similar to \lstinline+\branch+.
\begin{lstlisting}
- \anywhere[<anchor>]{<tikz>}{<formula>}
+ <anchor>.<angle> % not on the chain
+ on chain=going <key> % on the chain
+ <key>=of <anchor> % not on the chain
\end{lstlisting}
-The command \lstinline+\anywhere+ makes that possible. It is placed through \lstinline+<tikz>+ in a similar way as \lstinline+\branch+.
+\textbf{Please be aware that \lstinline+<pos>+ cannot be left empty.}
\begin{SideBySideExample}
\begin{rxn}
\reactant[,carbonyl_A]{\chemfig{R_2C=O}}
\anywhere{above=of carbonyl_A}{\chemfig{H-[:-30]O-[:30]H}};
\end{rxn}
\end{SideBySideExample}
-This command can be used for naming reaction partners.
+You can use this command \eg for placing labels naxt to reactants.
\begin{Example}
\begin{rxn}
\reactant[,ketone]{\chemfig{H-\chemabove{C}{\hspace*{5mm}\scriptstyle\alpha}(-[2]H)(-[6,,,2]{}|{\textcolor{blue}H})-C(=[:60]\lewis{02,O})-[:-60]C|H_3}}
@@ -745,113 +915,145 @@ This command can be used for naming reaction partners.
\anywhere{below=of mesomer}{$+$\color{blue}\ce{H2O}}
\end{rxn}
\end{Example}
+You can find many further examples for the usage of \lstinline+\anywhere+ in \texttt{examples.tex} or \texttt{examples.pdf}, resp.
\index{anywhere|)}
\subsection{arrow}\label{ssec:arrow}\index{arrow|(}\index{commands!arrow}
Reaction arrows are created with \lstinline=\arrow=.
\begin{lstlisting}
- \arrow[<direction>,<type>,<length factor>,<anchor>,both]{<above>}{<below>}
+ \arrow[<pos>,<type>,<length factor>,<name>,both,<tikz>]{<above>}{<below>}
\end{lstlisting}
-
\subsubsection{Options}\index{arrow!options|(}
-There are five options to customize the arrows. You've got to use them in the right order, separated by commas.
+There are a number of options to customize the arrows. The options must be used in the right order, seperated with commas.
\begin{enumerate}
-\item\lstinline+<direction>+\index{arrow!options!direction} -- possible values are:
+\item\lstinline+<pos>+\index{arrow!options!pos} -- possible values:
\begin{rxn}
\setarrowlength{2.5em}
\dummy[a]
- \arrow{}{}\reactant{right}
- \branch[above right=of a]{\arrow[above right]{}{}\reactant[above right]{above right}}
- \branch[above=of a]{\arrow[above]{}{}\reactant[above]{above}}
- \branch[above left=of a]{\arrow[above left]{}{}\reactant[above left]{above left}}
- \branch[left=of a]{\arrow[left]{}{}\reactant[left]{left}}
- \branch[below left=of a]{\arrow[below left]{}{}\reactant[below left]{below left}}
- \branch[below=of a]{\arrow[below]{}{}\reactant[below]{below}}
- \branch[below right=of a]{\arrow[below right]{}{}\reactant[below right]{below right}}
- \end{rxn}
-\item\lstinline+<type>+\index{arrow!options!type} -- possible values are:
+ \arrow{}{}\reactant{right = \ang{0}}
+ \branch[above right=of a]{\arrow[above right]{}{}\reactant[above right]{above right = \ang{45}}}
+ \branch[above=of a]{\arrow[above]{}{}\reactant[above]{above = \ang{90}}}
+ \branch[above left=of a]{\arrow[above left]{}{}\reactant[above left]{above left = \ang{135}}}
+ \branch[left=of a]{\arrow[left]{}{}\reactant[left]{left = \ang{180} = \ang{-180}}}
+ \branch[below left=of a]{\arrow[below left]{}{}\reactant[below left]{below left = \ang{225} = \ang{-135}}}
+ \branch[below=of a]{\arrow[below]{}{}\reactant[below]{below = \ang{270} = \ang{-90}}}
+ \branch[below right=of a]{\arrow[below right]{}{}\reactant[below right]{below right = \ang{315} = \ang{-45}}}
+ \end{rxn}
+ \NEU%
+ Additionally you can use every angle from the interval $[\ang{-360};\ang{360}]$.
+
+ You can also use an angle with respect to an object that's been named with \lstinline+<name>+: \lstinline+<name>.<angle>+. This means the arrow is placed in an angle of \lstinline+<angle>+ next to \lstinline+<name>+. You can find lots of examples in \texttt{examples.tex} or\texttt{examples.pdf}, resp.
+\item\lstinline+<type>+\index{arrow!options!type} -- possible values:
\begin{rxn}
\dummy[a]
- \branch[below=of a,b,yshift=1em]{\arrow{}{}\reactant{\ttfamily -\textgreater}}
- \branch[below=of b,c,yshift=1em]{\arrow[,<-]{}{}\reactant{\ttfamily \textless-}}
- \branch[below=of c,d,xshift=.25em,yshift=1em]{\arrow[,<->]{}{}\reactant{\ttfamily \textless-\textgreater}}
- \branch[below=of d,e,yshift=1em]{\arrow[,<=>]{}{}\reactant{\ttfamily \textless=\textgreater}}
- \branch[below=of e,f,yshift=1em]{\arrow[,-|>]{}{}\reactant{\ttfamily -\textbar\textgreater}}
- \branch[below=of f,,yshift=1em]{\arrow[,-+>]{}{}\reactant{\ttfamily -+\textgreater}}
- \end{rxn}
-\item\lstinline+<length factor>+\index{arrow!options!length} -- the length (\SI{5.0}{\emlength}, factor = $1.0$, default) is multiplied with this factor.
-\item\lstinline+<anchor>+\index{arrow!options!anchor} -- this anchor can be used to refer to the arrow, \eg with a branch.
-\item\lstinline+both+\index{arrow!options!both}-- this gives both arrow argument nodes the same width and height.
+ \branch[below=of a,b,yshift=.5em]{\arrow{}{}\reactant{\ttfamily -\textgreater}}
+ \branch[below=of b,c,yshift=.5em]{\arrow[,<-]{}{}\reactant{\ttfamily \textless-}}
+ \branch[below=of c,d,xshift=.25em,yshift=.5em]{\arrow[,<->]{}{}\reactant{\ttfamily \textless-\textgreater}}
+ \branch[below=of d,e,yshift=.5em]{\arrow[,<=>]{}{}\reactant{\ttfamily \textless=\textgreater}}
+ \branch[below=of e,f,xshift=.25em,yshift=.5em]{\arrow[,<=>>]{}{}\reactant{\ttfamily \textless=\textgreater{}\textgreater}}
+ \branch[below=of f,g,yshift=.5em]{\arrow[,<<=>]{}{}\reactant{\ttfamily \textless{}\textless=\textgreater}}
+ \branch[below=of g,h,xshift=-.25em,yshift=.5em]{\arrow[,-|>]{}{}\reactant{\ttfamily -\textbar\textgreater}}
+ \branch[below=of h,,yshift=.5em]{\arrow[,-+>]{ }{ }\reactant{\ttfamily -+\textgreater}}
+ \end{rxn}
+\item\lstinline+<length factor>+\index{arrow!options!length} -- this factor multiplies with the arrow length (\SI{4}{\emlength} with factor = $1.0$, default) \item\lstinline+<name>+\index{arrow!options!name} -- can be used to give the arrow an anchor, to which another object can refer.
+\item\lstinline+both+\index{arrow!options!both}-- this gives both nodes within which the labels are written the same size.
+\item\lstinline+<tikz>+\index{arrow!options!tikz} -- you can modify the arrow with \TikZ keys. Not every \TikZ keys have an effect, though. You can't shift arrows with \lstinline+shift=<coord>+, for example.
\end{enumerate}
+\begin{Example}
+ \begin{rxn}
+ \arrow[,,.25]{M}{}\arrow[,,.5]{MM}{}\arrow[,,.75]{MMM}{}\arrow{MMMM}{}\arrow[,,1.125]{MMMMM}{}\arrow[,,1.25]{MMMMM}{}
+ \end{rxn}
+\end{Example}
+Please note, that the labels \lstinline+<above>+ and \lstinline+<below>+ are rotated with the arrow. At an angle of \ang{180} \lstinline+<above>+ actually is \emph{below} the arrow.
\begin{SideBySideExample}
\begin{rxn}
- \arrow[,,.6]{\ce{Br2}}{$h\nu$} \arrow{\chemfig{-[::30]-[::-60]OH}}{}
+ \setarrowlength{2.5em}
+ \dummy[a]
+ \arrow{a}{b}
+ \arrow[a.45]{a}{b}
+ \arrow[a.90]{a}{b}
+ \arrow[a.135]{a}{b}
+ \arrow[a.180]{a}{b}
+ \arrow[a.225]{a}{b}
+ \arrow[a.270]{a}{b}
+ \arrow[a.315]{a}{b}
\end{rxn}
+\end{SideBySideExample}
+\NEU%
+You need to be aware of one or two points, when using the arrow type \lstinline"-+>": if you leave the labels empty, the arrow is the same as \lstinline"->".
+The first label is the one added to the reaction, the second the one subtracted. If you use only one of the labels only the corresponding arrow part is drawn.\index{arrow!options!type}
+\begin{SideBySideExample}
+ corresponds \verb"->":
+ \begin{rxn}
+ \arrow[,-+>]{}{}
+ \end{rxn}
+ add:
\begin{rxn}
- \arrow[above,,.6]{\ce{Br2}}{$h\nu$}
+ \arrow[,-+>]{a}{}
\end{rxn}
+ subtract:
\begin{rxn}
- \arrow[above]{\chemfig{-[::30]-[::-60]OH}}{}
+ \arrow[,-+>]{}{b}
\end{rxn}
+ both add and subtract:
\begin{rxn}
- \arrow[above right,,.5]{\ce{Br2}}{$h\nu$}
+ \arrow[,-+>]{a}{b}
\end{rxn}
+ Blanks are \emph{not} an empty label:
\begin{rxn}
- \arrow[above right]{\chemfig{-[::30]-[::-60]OH}}{}
+ \arrow[,-+>]{ }{ }
\end{rxn}
\end{SideBySideExample}
-Most keys in action:
-\begin{SideBySideExample}
+\NEU%
+You can change the appearance of an arrow with \TikZ keys:\index{arrow!options!tikz}
+\begin{Example}
\begin{rxn}
+ \mCsetup{arrowlabel=.7em,arrowlength=6em}
\reactant{A}
- \arrow[,,,arrow_a]{B}{}
- \branch[above=of arrow_a,,yshift=1em]{
- \arrow[above,<-,.7]{}{}
- \reactant[above]{D}
- }
- \reactant{C}
- \end{rxn}
-\end{SideBySideExample}
+ \arrow[20,,,,,decorate,decoration=snake,blue]{a}{b}
+ \reactant[20]{A$^*$}
+ \end{rxn}
+\end{Example}
\index{arrow!options|)}
\subsubsection{Alignment}\index{arrow!alignment|(}
-If an arrow is placed inside a branch (see \ref{ssec:branch}) the alignment of the branch possibly is determined by the width and height of the arrow arguments. If these arguments have different sizes, the alignment can go wrong.
+If an arrow is placed inside a branch, the alignment of the branch may be determined by the size of the label nodes. If the two labels have a different size, alignment can go wrong.
\begin{SideBySideExample}
\makevisible
\begin{rxn}
\reactant[,a]{A}
\arrow{}{}
\branch[below=of a]{
- \arrow[below]{\chemfig{-[::30]-[::-60]OH}}{}
+ \arrow[-90]{\chemfig{-[::30]-[::-60]OH}}{}
}
\end{rxn}
\makeinvisible
\end{SideBySideExample}
-By using the key \lstinline=both=\index{arrow!both}, both argument nodes have the same size, which can correct the alignment.
+By using the option \lstinline=both=\index{arrow!options!both} both nodes get the same size. This can correct the alignment.
\begin{SideBySideExample}
\makevisible
\begin{rxn}
\reactant[,a]{A}
\arrow{}{}
\branch[below=of a]{
- \arrow[below,,,,both]{\chemfig{-[::30]-[::-60]OH}}{}
+ \arrow[-90,,,,both]{\chemfig{-[::30]-[::-60]OH}}{}
}
\end{rxn}
\makeinvisible
\end{SideBySideExample}
-There is more about the alignment problem in \ref{sssec:branch_ausrichtung}.
+There's more to the question of alignment in \ref{sssec:branch_ausrichtung}.
\index{arrow!alignment|)}
\subsubsection{Appearance}\index{arrow!appearance}
-With the commands \lstinline+\setarrowlength+ (\ref{ssec:setarrowlength}) and \lstinline+\setarrowline+ (\ref{ssec:setarrowline}) the general appearance of the arrows can be changed.
+You can change the general appearance of arrows with \lstinline+\setarrowlength+ (\ref{ssec:setarrowlength}) and \lstinline+\setarrowline+ (\ref{ssec:setarrowline}).
\index{arrow|)}
\subsection{branch}\label{ssec:branch}\index{branch|(}\index{commands!branch}
-\lstinline=\branch= is used to, well, create a branch to a reaction. \textbf{If you used earlier versions of \mC please be aware, that the command syntax has changed with v1.3.}
+\lstinline=\branch= is used to, well, create a branch to a reaction.
\begin{lstlisting}
- \branch[<alignment>,<anchor>,<tikz>]{<branch code>}
+ \branch[<pos>,<anchor>,<tikz>]{<branch code>}
\end{lstlisting}
-For \lstinline=\branch= alignment an anchor is important. Let's take a look at an example:
+For \lstinline=\branch= positioning an anchor is important. Let's take a look at an example:
\begin{Example}
\begin{rxn}
\reactant[,start]{\chemfig{-[::30]=_[::-60](-[::-60])-[::60]}}
@@ -860,8 +1062,8 @@ For \lstinline=\branch= alignment an anchor is important. Let's take a look at a
\chemand
\reactant{\chemfig{-[::30](-[::60]Cl)-[::-60](-[::-60])-[::60]}}
\branch[below right=of start]{
- \arrow[below right,,.75]{\ce{H2O}}{}
- \reactant[below right]{\chemfig{-[::30]-[::-60](-[::120]OH)(-[::-60])-[::60]}}
+ \arrow[-45,,.75]{\ce{H2O}}{}
+ \reactant[-45]{\chemfig{-[::30]-[::-60](-[::120]OH)(-[::-60])-[::60]}}
\chemand
\reactant{\chemfig{-[::30](-[::60]OH)-[::-60](-[::-60])-[::60]}}
}
@@ -883,12 +1085,53 @@ If you don't use the alignment reference to an anchor, you automatically refer t
\branch{ \reactant{ \chemfig{CH_3-CH=O} } }
\end{rxn}
\end{SideBySideExample}
-You have several options for alignment: you can either put the \lstinline+\branch+ on a \lstinline+chain+ or place it relative to a object.
-\begin{description}
- \vitem+chain+ In this case you use: \lstinline+on chain=going <value>+.
- \item[relative] In this case you use: \lstinline+<value>=of <anchor>+.
-\end{description}
-As possible \lstinline+<value>+ you have the same choices as for \lstinline+\reactant+, see \ref{ssec:reactant}. Default is \lstinline+on chain=going right+.
+
+\subsubsection{Positioning}\label{sssec:branch_positionierung}\index{branch!positioning|(}
+There are several ways to position a branch. It can either be part of the chain or be a real branch.
+\begin{lstlisting}
+ <angle> % on the chain
+ <key> % on the chain
+ <anchor>.<angle> % not on the chain
+ on chain=going <key> % on the chain
+ <key>=of <anchor> % not on the chain
+\end{lstlisting}
+Default behaviour is equal to \lstinline+\branch[0]{}+. In different situations different ways can be favoured. For example if you want to use \lstinline+\branch+ to shift an arrow, it can still be part of the chain.
+\begin{SideBySideExample}
+ \begin{rxn}
+ \reactant{A}
+ \branch[,,yshift=1em]{\arrow{}{}}
+ \reactant[,,yshift=-1em]{B}
+ \end{rxn}
+\end{SideBySideExample}
+If you like to start a real branch, it \emph{does} matter, which way you use.
+\begin{SideBySideExample}
+ \makevisible
+ \begin{rxn}
+ \reactant[,a]{\chemfig{[:30]--[::-60]-OH}}
+ \arrow{}{}
+ \branch[a.-45]{\arrow[-45]{}{}}
+ \end{rxn}
+ \begin{rxn}
+ \reactant[,a]{\chemfig{[:30]--[::-60]-OH}}
+ \arrow{}{}
+ \branch[below right=of a]{\arrow[-45]{}{}}
+ \end{rxn}
+\end{SideBySideExample}
+If a reactant isn't squared or circled \ang{-45} does not mean the same as "below right".
+\begin{SideBySideExample}
+ \makevisible
+ \begin{rxn}
+ \reactant[,a,circle]{\chemfig{[:30]--[::-60]-OH}}
+ \arrow{}{}
+ \branch[a.-45]{\arrow[-45]{}{}}
+ \end{rxn}
+ \begin{rxn}
+ \reactant[,a,circle]{\chemfig{[:30]--[::-60]-OH}}
+ \arrow{}{}
+ \branch[below right=of a]{\arrow[-45]{}{}}
+ \end{rxn}
+\end{SideBySideExample}
+\index{branch!positioning|)}
\subsubsection{Alignment problems}\label{sssec:branch_ausrichtung}\index{branch!alignment|(}
If an arrow has two arguments with different sizes and is placed inside a branch, the alignment of the branch can go wrong. In this case the \lstinline=\arrow= key \lstinline=both= isn't a solution, since the smaller argument then is not placed next to the arrow but is centered in its node.
@@ -944,7 +1187,7 @@ The optional arguments for \lstinline+\chemand+ and \lstinline+\reactant+ are th
\dummy\arrow{}{}
\end{rxn}
\end{lstlisting}
-\emph{This is \textbf{not} necessary any more}. In some (alignment) cases, an empty node still might be useful, so the command still exists.
+\textbf{This is \emph{not} necessary any more}. In some (alignment) cases, an empty node still might be useful, so the command still exists.
\index{dummy|)}
\subsection{elmove}\label{ssec:elmove}\index{elmove|(}\index{commands!elmove}
@@ -964,6 +1207,7 @@ using \lstinline?[->,red,shorten <=3pt,shorten >=1pt]? as default for \lstinline
\elmove{e1}{60:4mm}{e2}{0:4mm}
\end{center}
\end{Example}
+You should use \lstinline+\elmove+ \emph{only inside} of \lstinline+\anywhere+, \lstinline+\reactant+ or \lstinline+\transition+. Otherwise, you might get alignment errors.
\index{elmove|)}
\subsection{makeinvisible}\label{ssec:makeinvisible}\index{makeinvisible|(}\index{commands!makeinvisible}
@@ -973,19 +1217,24 @@ using \lstinline?[->,red,shorten <=3pt,shorten >=1pt]? as default for \lstinline
\subsection{makevisible}\label{ssec:makevisible}\index{makevisible|(}\index{commands!makevisible}
With \lstinline=\makevisible= you can visualize the nodes within which reactants, arrows and branches are set. This is useful when you're aligning branches, for example. You can see an example for \lstinline=\makevisible= in \ref{ssec:arrow}. Every kind of nodes is emphasized with a different colour:
-\tikz[baseline=(X.base)]\node[draw=red!60](X){\texttt{\textbackslash reactant\{\}}};, \tikz[baseline=(X.base)]\node[draw=green!60](X){\texttt{\textbackslash arrow\{above\}\{\}}};, \tikz[baseline=(X.base)]\node[draw=blue!60](X){\texttt{\textbackslash arrow\{\}\{below\}}}; und \tikz[baseline=(X.base)]\node[draw=purple, dotted](X){\texttt{\textbackslash branch\{\}}};. Also see \ref{ssec:makeinvisible}.
+\tikz[baseline=(X.base)]\node[draw=red!60](X){\texttt{\textbackslash reactant\{\}}};, \tikz[baseline=(X.base)]\node[draw=green!60](X){\texttt{\textbackslash arrow\{above\}\{\}}};, \tikz[baseline=(X.base)]\node[draw=blue!60](X){\texttt{\textbackslash arrow\{\}\{below\}}}; und \tikz[baseline=(X.base)]\node[draw=cyan](X){\texttt{\textbackslash branch\{\}}};. Also see \ref{ssec:makeinvisible}.
- \lstinline=\makevisible= only changes the looks of nodes following after it.
+ \lstinline=\makevisible= only changes the looks of nodes following after it ond only effects the group whithin which it is used.
\begin{SideBySideExample}
- \makevisible
\begin{rxn}
+ \makevisible
\reactant[,a]{A}
\arrow{a}{b}
\branch[below=of a]{
- \arrow[below,,,,both]{a}{b}
+ \arrow[-90,,,,both]{a}{b}
}
\end{rxn}
- \makeinvisible
+ \begin{rxn}
+ {\makevisible
+ \reactant{\chemfig{[:30]--[::-60]-OH}}
+ }
+ \reactant{\chemfig{[:30]--[::-60]-OH}}
+ \end{rxn}
\end{SideBySideExample}
\index{makevisible|)}
@@ -1006,6 +1255,7 @@ you can fully customize \mC. For each of \mC's commands going like \lstinline+\s
\begin{Example}
\mCsetup{
align=left,
+ arrowlabel=.7em,
arrowlength=3em,
arrowline=thick,
atomsize=\large,
@@ -1017,13 +1267,14 @@ you can fully customize \mC. For each of \mC's commands going like \lstinline+\s
}
\setbondshape{4pt}{2pt}{1pt}
\begin{rxn}
- \reactant{A}\arrow{}{}\reactant{\chemfig{A-(<[2])(<:[6])-B}}
+ \reactant{A}\arrow{a}{b}\reactant{\chemfig{A-(<[2])(<:[6])-B}}
\end{rxn}
\mCsetup{reset}
\begin{rxn}
- \reactant{A}\arrow{}{}\reactant{\chemfig{A-(<[2])(<:[6])-B}}
+ \reactant{A}\arrow{a}{b}\reactant{\chemfig{A-(<[2])(<:[6])-B}}
\end{rxn}
\end{Example}
+\lstinline+\mCsetup+ \textbf{as well as for every other setup command only effects the group whithin which it is used.}
\index{mCsetup|)}
\subsection{merge}\label{ssec:merge}\index{merge|(}\index{commands!merge}
@@ -1118,9 +1369,9 @@ The usage of \lstinline=\merge= may require some playing with branches, \lstinli
\index{merge|)}
\subsection{mesomeric}\label{ssec:mesomeric}\index{mesomeric|(}\index{commands!mesomeric}
-The \lstinline=\mesomeric= command works just like \lstinline=\branch= (see \ref{ssec:branch}) but places the formul\ae\ into square brackets. \textbf{If you used earlier versions of \mC please be aware, that the command syntax has changed with v1.3.}
+The \lstinline=\mesomeric= command works just like \lstinline=\branch= (see \ref{ssec:branch}) but places the formul\ae\ into square brackets.
\begin{lstlisting}
- \mesomeric[<alignment>,<anchor>,<tikz>]{<formula>}
+ \mesomeric[<pos>,<anchor>,<tikz>]{<formula>}
\end{lstlisting}
The resonance formul\ae\ are written into \lstinline=<formula>=. With \lstinline=\marrow= (see \ref{ssec:marrow}) you create the resonance arrows. If needed you can give an anchor (\lstinline=<anchor>=) to \lstinline=\mesomeric= (also see \ref{ssec:branch}). Alignment is used the same way as with \lstinline=\reactant=.
\begin{Example}
@@ -1165,50 +1416,51 @@ Or maybe a coordination complex?
\index{mesomeric|)}
\subsection{reactant}\label{ssec:reactant}\index{reactant|(}\index{commands!reactant}
-\NEU%
-The command \lstinline=\reactant=\footnote{In older versions this command was called \texttt{\textbackslash reactand}, which is still available.} is somehow the basic command of \mC. \textbf{If you used earlier versions of \mC please be aware, that the command syntax has changed with v1.3.}
+\lstinline=\reactant=\footnote{In earlier versions it was called \texttt{\textbackslash reactand}. You can still use it.} is something like the basic command.
\begin{lstlisting}
- \reactant[<alignment>,<anchor>,<tikz>]{<formula>}
+ \reactant[<pos>,<name>,<tikz>]{<formula>}
\end{lstlisting}
-In this command the actual formul\ae\ are written (\lstinline=<formula>=). If needed, they can be given an anchor (\lstinline=<anchor>=). The optional argument \lstinline=<alignment>= can have 8 different values:
+Formul\ae\ (\lstinline=<formula>=) are written inside this command and can be named (\lstinline=<name>=) for other objects to refer to. \lstinline+<pos>+ can either be one of these key words
\begin{alphlist}
- \item \lstinline=right=,
- \item \lstinline=above right=,
- \item \lstinline=above=,
- \item \lstinline=above left=,
- \item \lstinline=left=,
- \item \lstinline=below left=,
- \item \lstinline=below=,
- \item \lstinline=below right=
+ \item \lstinline+right+,
+ \item \lstinline+above right+,
+ \item \lstinline+above+,
+ \item \lstinline+above left+,
+ \item \lstinline+left+,
+ \item \lstinline+below left+,
+ \item \lstinline+below+,
+ \item \lstinline+below right+
\end{alphlist}
-Default is \lstinline=right=. You use this argument to place the reactant relatively to the reactant or arrow right before.
+\NEU%
+or be an angle from the intervall $[\ang{-360};\ang{360}]$. You also can position it relativ to another object via \lstinline+<anchor>.<angle>+. The default equals \lstinline+\reactant[0]{}+.
\begin{SideBySideExample}
-%horizontal:
+ below:
\begin{rxn}
\reactant{\ce{Br2}}
- \reactant[below]{\ce{Cl2}}
+ \reactant[-90]{\ce{Cl2}}
\end{rxn}
-%more than one reactant:
+ more than one reactant:
\begin{rxn}
\reactant{\ce{Br2}}
- \reactant[below]{\ce{I2}}
+ \reactant[-90]{\ce{I2}}
\reactant{\ce{Cl2}}
\end{rxn}
-%vertical reaction:
+ going down:
\begin{rxn}
\reactant{\ce{Br-Br}}
- \arrow[below,,.5]{$h\nu$}{}
- \reactant[below]{\ce{2 ~\lewis{0.,Br}}}
+ \arrow[-90,,.5]{$h\nu$}{}
+ \reactant[-90]{\ce{2 ~\lewis{0.,Br}}}
\end{rxn}
\end{SideBySideExample}
+You can find many more examples in the file \texttt{examples.tex} or \texttt{examples.pdf}, resp.
\index{reactant|)}
\subsection{rxn (environment)}\label{ssec:rxn}\index{rxn|(}\index{commands!rxn|see{rxn}}\index{environment!rxn|see{rxn}}
\lstinline=rxn= is a non-floating not numbered environment for reaction schemes. Per default all schemes are centered.
\begin{lstlisting}
- \begin{rxn}[<align>,<scalefactor>]
+ \begin{rxn}[<alignment>,<scalefactor>]
...
\end{rxn}
\end{lstlisting}
@@ -1269,7 +1521,7 @@ Alignment examples:
\end{rxnscheme}
\end{lstlisting}
you can refer to it by using \lstinline=\ref{rs:schema}= as usual.
- \item\lstinline+<placement>+\index{rxnscheme!options!placement} With this option you can change the placement of the float, \eg with \lstinline+htp+. The default value is \lstinline+H+ (exactly here). An example for this option is \ref{rs:synthese} in \ref{ssec:tikzsynthese}.
+ \item\lstinline+<placement>+\index{rxnscheme!options!placement} With this option you can change the placement of the float, \eg with \lstinline+htp+. The default value is \lstinline+htp+.
\item\lstinline+<alignment>+\index{rxnscheme!options!alignment}This option changes the alignment of the scheme. You can choose between \lstinline=left=, \lstinline=center= and \lstinline=right=.
\item\lstinline+<scalefactor>+\index{rxnscheme!options!scale} \lstinline+rxnscheme+ has another key with which the scheme can be scaled. Please keep in mind that it doesn't affect the font size and the size of \CF formul\ae. You can have strange effects on \CF formul\ae\ if you use this key, though. See \ref{sssec:rxn_optionen} for more information.
\item\lstinline+<name>+\index{rxnscheme!options!name} This option changes the name of the actual scheme from "Reaktionschema" or "Reaction scheme" into \lstinline+<name>+.
@@ -1280,25 +1532,25 @@ Alignment examples:
\end{lstlisting}
\end{enumerate}
\begin{Example}
- \begin{rxnscheme}[,,,2]{Big scheme}
+ \begin{rxnscheme}[,H,,2]{Big scheme}
\large\setatomsep{3.5em}
\reactant{ \chemfig{=[::30]-[::-60]OH} }
\arrow[,<=>]{}{}
\reactant{ \chemfig{-[::30]=[::-60]O} }
\end{rxnscheme}
- \begin{rxnscheme}[,,,.5]{Small scheme}
+ \begin{rxnscheme}[,H,,.5]{Small scheme}
\tiny\setatomsep{1em}
\reactant{ \chemfig{=[::30]-[::-60]OH} }
\arrow[,<=>]{}{}
\reactant{ \chemfig{-[::30]=[::-60]O} }
\end{rxnscheme}
- \begin{rxnscheme}{center}
+ \begin{rxnscheme}[,H]{center}
\reactant{center}\arrow{}{}\reactant{centered}
\end{rxnscheme}
- \begin{rxnscheme}[,,right]{right}
+ \begin{rxnscheme}[,H,right]{right}
\reactant{right}\arrow{}{}\reactant{raggedleft}
\end{rxnscheme}
- \begin{rxnscheme}[,,left]{left}
+ \begin{rxnscheme}[,H,left]{left}
\reactant{left}\arrow{}{}\reactant{raggedright}
\end{rxnscheme}
\end{Example}
@@ -1319,17 +1571,17 @@ There are different possible styles, privided by the `float' package:
\vitem=ruled= the caption is placed above the object framed by to rules, one above and one below, another rule frames the object below; default for \lstinline+rxnscheme+
\end{description}
\begin{Example}
- \begin{rxnscheme}{ruled}
+ \begin{rxnscheme}[,H]{ruled}
\reactant{default style}
\end{rxnscheme}
\floatstyle{boxed}
\restylefloat{rxnfloat}
- \begin{rxnscheme}{boxed}
+ \begin{rxnscheme}[,H]{boxed}
\reactant{framed object}
\end{rxnscheme}
\floatstyle{plain}
\restylefloat{rxnfloat}
- \begin{rxnscheme}{plain}
+ \begin{rxnscheme}[,H]{plain}
\reactant{without any special formatting}
\end{rxnscheme}
\end{Example}
@@ -1377,14 +1629,28 @@ you can create a list of all schemes created with \lstinline+rxnscheme+.
\end{SideBySideExample}
\index{rxnscheme!customize|)}\index{rxnscheme|)}
+\subsection{setarrowlabel}\label{ssec:setarrowlabel}\index{setarrowlabel|(}\index{commands!setarrowlabel}
+\NEU%
+The distance of arrow labels to the arrow has a default value of \SI{0.2}{\emlength}. You can change this with
+\begin{lstlisting}
+ \setarrowlabel{<distance>}
+\end{lstlisting}
+into \lstinline+<distance>+.
+\begin{SideBySideExample}
+ \begin{rxn}
+ \arrow{a}{b}
+ \setarrowlabel{.5em}
+ \arrow{a}{b}
+ \end{rxn}
+\end{SideBySideExample}
+\index{setarrowlabel|)}
+
\subsection{setarrowlength}\label{ssec:setarrowlength}\index{setarrowlength|(}\index{commands!setarrowlength}
-The default length of an reaction arrow is \SI{5.0}{\emlength} or $5.0\cdot\sqrt{2}\,\si{\emlength}$ for the diagonal ones. You can change these values using
+The default length of an reaction arrow is \SI{4}{\emlength}. You can change this value with
\begin{lstlisting}
\setarrowlength{<length>}
\end{lstlisting}
-into \UseVerb{arrowlength} or $\text{\UseVerb{arrowlength}}\cdot\sqrt{2}$, respectively. Mind the fact that you have to use a length unit. If you leave the argument empty, the length is reset to default.
-
-{\bfseries This command replaces \lstinline=\arrowlength= from earlier versions.}
+into \lstinline+<length>+. Mind the fact that you have to use a length unit. If you leave the argument empty, the length is reset to default.
\index{setarrowlength|)}
\subsection{setatomsize}\label{ssec:setatomsize}\index{setatomsize|(}\index{commands!setatomsize}
@@ -1393,8 +1659,6 @@ With
\setatomsize{<font size>}
\end{lstlisting}
you can change the font size of the atom groups. Default value is \lstinline=\small=. If you leave the argument empty, the size is reset to default.
-
-{\bfseries This command replaces \lstinline=\atomsize= from earlier versions.}
\index{setatomsize|)}
\subsection{setbondlength}\label{ssec:setbondlength}\index{setbondlength|(}\index{commands!setbondlength}
@@ -1402,10 +1666,7 @@ With
\begin{lstlisting}
\setbondlength{<length>}
\end{lstlisting}
-you can change \lstinline=\setatomsep{<length>}= for all \CF formul\ae\ \emph{inside} of the\\
-\mC environments. Default value is \SI{1.8}{\emlength}. If you leave the argument empty, the length is reset to default.
-
-{\bfseries This command replaces \lstinline=\bondlength= from earlier versions.}
+you can change \lstinline=\setatomsep{<length>}= for all \CF formul\ae\ \emph{inside} of the \mC environments. Default value is \SI{1.8}{\emlength}. If you leave the argument empty, the length is reset to default.
\index{setbondlength|)}
\subsection{setarrowline}\label{ssec:setarrowline}\index{setarrowline|(}\index{Befehle!setarrowline}
@@ -1437,8 +1698,6 @@ With
\setbondshape{<base length>}{<dash thickness>}{<dash spacing>}
\end{lstlisting}
you can change \lstinline=\setcrambond{<base length>}{<dash thickness>}{<dash spacing>}= for all \CF formul\ae\ \emph{inside} of the \mC environments. Default values are (in this order) \SI{3}{\pt}, \SI{.5}{\pt} and \SI{1}{\pt}. If you leave an argument empty, the value is reset to default.
-
-{\bfseries This command replaces \lstinline=\bondshape= from earlier versions.}
\index{setbondshape|)}
\subsection{setmergelength}\label{ssec:setmergelength}\index{setmergelength|(}\index{commands!setmergelength}
@@ -1494,9 +1753,9 @@ See \ref{par:rxnscheme_name}.
\index{setschemename|)}
\subsection{transition}\label{ssec:transition}\index{transition|(}\index{commands!transition}
-\lstinline=\transition= works exactly like \lstinline=\reactant= (see \ref{ssec:reactant}). \textbf{If you used earlier versions of \mC please be aware, that the command syntax has changed with v1.3.}
+\lstinline=\transition= works exactly like \lstinline=\reactant= (see \ref{ssec:reactant}).
\begin{lstlisting}
- \transition[<alignment>,<anchor>,<tikz>]{<formula>}
+ \transition[<pos>,<anchor>,<tikz>]{<formula>}
\end{lstlisting}
\begin{SideBySideExample}
\begin{rxn}
@@ -1509,886 +1768,6 @@ See \ref{par:rxnscheme_name}.
\end{SideBySideExample}
\index{transition|)}
-\section{Examples}
-\subsection{Addition Reaction}\label{ssec:addition}
-A simple reaction scheme with two different products.
-\begin{rxnscheme}{addition reaction}
- \reactant{ \chemfig{=_[::-30]-[::60](=[::60]O)-[::-60]} }
- \arrow{ $+ \Hpl$ }{}
- \mesomeric[,rf]{
- \reactant{ \chemfig{=_[:-30]-[::60](-[::60]OH)(-[::-120,.3,,,white]\oplus)-[::-60]} }
- \marrow[below]
- \reactant[below]{ \chemfig{\oplus-[6,.3,,,white]-[:-30]=_[::60](-[::60]OH)-[::-60]} }
- }
- \branch[right=of rf,,yshift=3em]{
- \arrow{}{}
- \reactant{ \chemname{\chemfig{=_[:-30]-[::60](-[::60]OH)(-[::-120]R)-[::-60]}}{1,2-adduct} }
- }
- \branch[right=of rf,,yshift=-5em]{
- \arrow{}{}
- \reactant{ \chemname{\chemfig{R-[6]-[:-30]=_[::60](-[::60]OH)-[::-60]}}{1,4-adduct} }
- }
-\end{rxnscheme}
-Let's take a closer look, step after step. At first we write the first reactant and the reaction arrow.
-\begin{lstlisting}
- \reactant{ \chemfig{=_[::-30]-[::60](=[::60]O)-[::-60]} }
- \arrow{ $+ \Hpl$ }{}
-\end{lstlisting}
-\begin{rxn}
- \reactant{ \chemfig{=_[::-30]-[::60](=[::60]O)-[::-60]} }
- \arrow{ $+ \Hpl$ }{}
-\end{rxn}
-Then we write the resonance formul\ae. The \lstinline=\mesomeric=\index{mesomeric}\index{marrow} gets the anchor \lstinline=rf= (line 7).
-\begin{lstlisting}[firstnumber=3]
- \mesomeric[,rf]{
- \reactant{ \chemfig{=_[:-30]-[::60](-[::60]OH)(-[::-120,.3,,,white]\oplus)-[::-60]} }
- \marrow[below]
- \reactant[below]{ \chemfig{\oplus-[6,.3,,,white]-[:-30]=_[::60](-[::60]OH)-[::-60]} }
- }
-\end{lstlisting}
-\begin{rxn}
- \reactant{ \chemfig{=_[::-30]-[::60](=[::60]O)-[::-60]} }
- \arrow{ $+ \Hpl$ }{}
- \mesomeric[,rf]{
- \reactant{ \chemfig{=_[:-30]-[::60](-[::60]OH)(-[::-120,.3,,,white]\oplus)-[::-60]} }
- \marrow[below]
- \reactant[below]{ \chemfig{\oplus-[6,.3,,,white]-[:-30]=_[::60](-[::60]OH)-[::-60]} }
- }
-\end{rxn}
-Now comes the 1,2-adduct, placed in a branch\index{branch} referring \lstinline+rf+, shifted above with \lstinline+yshift+\index{yshift}:
-\begin{lstlisting}[firstnumber=8]
- \branch[right=of rf,,yshift=3em]{
- \arrow{}{}
- \reactant{ \chemname{\chemfig{=_[:-30]-[::60](-[::60]OH)(-[::-120]R)-[::-60]}}{1,2-adduct} }
- }
-\end{lstlisting}
-\begin{rxn}
- \reactant{ \chemfig{=_[::-30]-[::60](=[::60]O)-[::-60]} }
- \arrow{ $+ \Hpl$ }{}
- \mesomeric[,rf]{
- \reactant{ \chemfig{=_[:-30]-[::60](-[::60]OH)(-[::-120,.3,,,white]\oplus)-[::-60]} }
- \marrow[below]
- \reactant[below]{ \chemfig{\oplus-[6,.3,,,white]-[:-30]=_[::60](-[::60]OH)-[::-60]} }
- }
- \branch[right=of rf,,yshift=3em]{
- \arrow{}{}
- \reactant{ \chemname{\chemfig{=_[:-30]-[::60](-[::60]OH)(-[::-120]R)-[::-60]}}{1,2-adduct} }
- }
-\end{rxn}
-At last we write the branch\index{branch} containing the 1,4-adduct, also referencing \lstinline+rf+, shifted below with \lstinline+yshift+\index{yshift}:
-\begin{lstlisting}[firstnumber=12]
- \branch[right=of rf,,yshift=-5em]{
- \arrow{}{}
- \reactant{ \chemname{\chemfig{R-[6]-[:-30]=_[::60](-[::60]OH)-[::-60]}}{1,4-adduct} }
- }
-\end{lstlisting}
-\begin{rxn}
- \reactant{ \chemfig{=_[::-30]-[::60](=[::60]O)-[::-60]} }
- \arrow{ $+ \Hpl$ }{}
- \mesomeric[,rf]{
- \reactant{ \chemfig{=_[:-30]-[::60](-[::60]OH)(-[::-120,.3,,,white]\oplus)-[::-60]} }
- \marrow[below]
- \reactant[below]{ \chemfig{\oplus-[6,.3,,,white]-[:-30]=_[::60](-[::60]OH)-[::-60]} }
- }
- \branch[right=of rf,,yshift=3em]{
- \arrow{}{}
- \reactant{ \chemname{\chemfig{=_[:-30]-[::60](-[::60]OH)(-[::-120]R)-[::-60]}}{1,2-adduct} }
- }
- \branch[right=of rf,,yshift=-5em]{
- \arrow{}{}
- \reactant{ \chemname{\chemfig{R-[6]-[:-30]=_[::60](-[::60]OH)-[::-60]}}{1,4-adduct} }
- }
-\end{rxn}
-The complete code looks like this:
-\begin{lstlisting}
- \begin{rxnscheme}{addition reaction}
- \reactant{ \chemfig{=_[::-30]-[::60](=[::60]O)-[::-60]} }
- \arrow{ $+ \Hpl$ }{}
- \mesomeric[,rf]{
- \reactant{ \chemfig{=_[:-30]-[::60](-[::60]OH)(-[::-120,.3,,,white]\oplus)-[::-60]} }
- \marrow[below]
- \reactant[below]{ \chemfig{\oplus-[6,.3,,,white]-[:-30]=_[::60](-[::60]OH)-[::-60]} }
- }
- \branch[right=of rf,,yshift=3em]{
- \arrow{}{}
- \reactant{ \chemname{\chemfig{=_[:-30]-[::60](-[::60]OH)(-[::-120]R)-[::-60]}}{1,2-adduct} }
- }
- \branch[right=of rf,,yshift=-5em]{
- \arrow{}{}
- \reactant{ \chemname{\chemfig{R-[6]-[:-30]=_[::60](-[::60]OH)-[::-60]}}{1,4-adduct} }
- }
- \end{rxnscheme}}
-\end{lstlisting}
-
-\subsection{Mesomerism}
-We want to display the following reaction scheme:
-\begin{rxnscheme}[,,,.8]{electrophilic substitution}
- \setatomsep{1.6em}
- \reactant[,start]{ \chemname{\chemfig{*6(-=-=(-[,,,,white]\phantom{Br})-=)}}{benzene \compound{benzene}} }
- \branch[below=of start]{
- \arrow[below,,,pfeil_a,both]{\ce{Br2 / AlBr3}}{$-\ce{AlBr4\om}$}
- }
- \branch[below=of pfeil_a,mesomerism,xshift=8.5em]{
- \mesomeric{
- \reactant{
- \chemfig{*6(=[@{e1}]-=-(-[:120]Br)(-[:60]H)-(-[:-30,.4,,,white]\oplus)-[@{e2}])}
- \elmove{e1}{60:4mm}{e2}{0:4mm}
- }
- \marrow
- \reactant{
- \chemfig{*6(-(-[:90,.4,,,white]\oplus)-[@{e4}]=[@{e3}]-(-[:120]Br)(-[:60]H)-=)}
- \elmove{e3}{180:4mm}{e4}{150:4mm}
- }
- \marrow
- \reactant{
- \chemfig{*6(-=-(-[:-150,.4,,,white]\oplus)-(-[:120]Br)(-[:60]H)-=)}
- }
- }
- }
- \branch[above=of mesomerism,,xshift=7.25em]{
- \arrow[above]{$-\Hpl$}{}
- }
- \arrow[,,2.6]{}{}
- \reactant{ \chemname{\chemfig{*6(-=-=(-Br)-=)}}{bromobenzene \compound{bromobenzene}} }
-\end{rxnscheme}
-First we write the main reaction. To do so, we use the commands \lstinline=\reactant=\index{reactant}, \lstinline=\arrow=\index{arrow} and the environment \lstinline=\begin{rxnscheme} ... \end{rxnscheme}=\index{rxnscheme}.
-\begin{lstlisting}
- \begin{rxnscheme}{electrophilic substitution}
- \reactant{
- \chemname{\chemfig{*6(-=-=-=)}}{benzene \compound{benzene}}
- }
- \arrow{}{}
- \reactant{
- \chemname{\chemfig{*6(-=-=(-Br)-=)}}{bromobenzene \compound{bromobenzene}}
- }
- \end{rxnscheme}
-\end{lstlisting}
- \begin{rxn}
- \reactant{
- \chemname{\chemfig{*6(-=-=-=)}}{benzene \compound{benzene}}
- }
- \arrow{}{}
- \reactant{
- \chemname{\chemfig{*6(-=-=(-Br)-=)}}{bromobenzene \compound{bromobenzene}}
- }
- \end{rxn}
-Now we make it a little bit smaller:
-\begin{lstlisting}
- \begin{rxnscheme}[,,,!!.8!!]{electrophilic substitution}
- !!\setatomsep{1.6em}!!
- \reactant{
- \chemname{\chemfig{*6(-=-=-=)}}{benzene \compound{benzene}}
- }
- \arrow{}{}
- \reactant{
- \chemname{\chemfig{*6(-=-=(-Br)-=)}}{bromobenzene \compound{bromobenzene}}
- }
- \end{rxnscheme}
-\end{lstlisting}
- \begin{rxn}[,.8]
- \setatomsep{1.6em}
- \reactant{
- \chemname{\chemfig{*6(-=-=-=)}}{benzene \compound{benzene}}
- }
- \arrow{}{}
- \reactant{
- \chemname{\chemfig{*6(-=-=(-Br)-=)}}{bromobenzene \compound{bromobenzene}}
- }
- \end{rxn}
-We have two possibilities to align both benzene rings at the same height. Either we shift the second one up using \TikZ\index{tikz@\TikZ} code:
-\begin{lstlisting}[firstnumber=7]
- \reactant[,,!!yshift=1em!!]{
- \chemname{\chemfig{*6(-=-=(-Br)-=)}}{bromobenzene \compound{bromobenzene}}
- }
-\end{lstlisting}
-This is not the best solution, because the arrow\index{arrow} isn't centered with respect to the rings.
- \begin{rxn}
- \reactant{
- \chemname{\chemfig{*6(-=-=-=)}}{benzene \compound{benzene}}
- }
- \arrow{}{}
- \reactant[,,yshift=1em]{
- \chemname{\chemfig{*6(-=-=(-Br)-=)}}{bromobenzene \compound{bromobenzene}}
- }
- \end{rxn}
-The second possibility would be to shift the first ring down. We can't achieve that by using \TikZ\index{tikz@\TikZ} code, because the following arrow\index{arrow} and reactant\index{reactant} align themselves with respect to the reactant or arrow directly before. But we can write an invisible bromine to the first benzene to do the trick:
-\begin{lstlisting}[firstnumber=3]
- \reactant{
- \chemname{\chemfig{*6(-=-=!!(-[,,,,white]\phantom{Br})!!-=)}}{benzene \compound{benzene}}
- }
-\end{lstlisting}
- \begin{rxn}
- \reactant{
- \chemname{\chemfig{*6(-=-=(-[,,,,white]\phantom{Br})-=)}}{benzene \compound{benzene}}
- }
- \arrow{}{}
- \reactant{
- \chemname{\chemfig{*6(-=-=(-Br)-=)}}{bromobenzene \compound{bromobenzene}}
- }
- \end{rxn}
-We need to give the first reactant an anchor in order to refer to it with the branch\index{branch}.
- \begin{lstlisting}
- \begin{rxnscheme}[,,,.8]{electrophilic substitution}
- \setatomsep{1.6em}
- \reactant[,!!start!!]{
- \chemname{\chemfig{*6(-=-=(-[,,,,white]\phantom{Br})-=)}}{benzene \compound{benzene}}
- }
- \branch[!!below=of start!!]{
- \arrow[!!below!!,,,,both]{ \ce{Br2 / AlBr3} }{ $-\ce{AlBr4\om}$ }
- }
- \arrow{}{}
- \reactant{
- \chemname{\chemfig{*6(-=-=(-Br)-=)}}{bromobenzene \compound{bromobenzene}}
- }
- \end{rxnscheme}
-\end{lstlisting}
-So the first reactant gets the anchor \lstinline=start= and the branch\index{branch} refers to it with \lstinline+below=of start+. For the reaction arrow to point below, we need to use the option \lstinline+below+. Now we get:
- \begin{rxn}[,.8]
- \setatomsep{1.6em}
- \reactant[,start]{
- \chemname{\chemfig{*6(-=-=(-[,,,,white]\phantom{Br})-=)}}{benzene \compound{benzene}}
- }
- \branch[below=of start]{
- \arrow[below,,,,both]{\ce{Br2 / AlBr3}}{$-\ce{AlBr4\om}$}
- }
- \arrow{}{}
- \reactant{
- \chemname{\chemfig{*6(-=-=(-Br)-=)}}{bromobenzene \compound{bromobenzene}}
- }
- \end{rxn}
-Next we write the resonance formul\ae\ of the Wheland intermediate. To do that we use three further commands: \lstinline=\mesomeric=\index{mesomeric}, \lstinline=\marrow=\index{marrow} and \lstinline=\elmove=\index{elmove}.
-\begin{lstlisting}
- !!\mesomeric{!!
- \reactant{
- \chemfig{*6(=[@{e1}]-=-(-[:120]Br)(-[:60]H)-(-[:-30,.4,,,white]\oplus)-[@{e2}])}
- !!\elmove{e1}{60:4mm}{e2}{0:4mm}!!
- }
- !!\marrow!!
- \reactant{
- \chemfig{*6(-(-[:90,.4,,,white]\oplus)-[@{e4}]=[@{e3}]-(-[:120]Br)(-[:60]H)-=)}
- \elmove{e3}{180:4mm}{e4}{150:4mm}
- }
- \marrow
- \reactant{
- \chemfig{*6(-=-(-[:-150,.4,,,white]\oplus)-(-[:120]Br)(-[:60]H)-=)}
- }
- !!}!!
-\end{lstlisting}
-\begin{rxn}[,.8]
- \setatomsep{1.6em}
- \mesomeric{
- \reactant{
- \chemfig{*6(=[@{e1}]-=-(-[:120]Br)(-[:60]H)-(-[:-30,.4,,,white]\oplus)-[@{e2}])}
- \elmove{e1}{60:4mm}{e2}{0:4mm}
- }
- \marrow
- \reactant{
- \chemfig{*6(-(-[:90,.4,,,white]\oplus)-[@{e4}]=[@{e3}]-(-[:120]Br)(-[:60]H)-=)}
- \elmove{e3}{180:4mm}{e4}{150:4mm}
- }
- \marrow
- \reactant{
- \chemfig{*6(-=-(-[:-150,.4,,,white]\oplus)-(-[:120]Br)(-[:60]H)-=)}
- }
- }
-\end{rxn}
-When we write the code \emph{inside} of the branch\index{branch}, directly after the arrow, we get the following:
-\begin{rxn}[,.8]
- \setatomsep{1.6em}
- \reactant[,start]{
- \chemname{\chemfig{*6(-=-=(-[,,,,white]\phantom{Br})-=)}}{benzene \compound{benzene}}
- }
- \branch[below=of start]{
- \arrow[below,,,,both]{\ce{Br2 / AlBr3}}{$-\ce{AlBr4\om}$}
- \mesomeric{
- \reactant{
- \chemfig{*6(=[@{e1}]-=-(-[:120]Br)(-[:60]H)-(-[:-30,.4,,,white]\oplus)-[@{e2}])}
- \elmove{e1}{60:4mm}{e2}{0:4mm}
- }
- \marrow
- \reactant{
- \chemfig{*6(-(-[:90,.4,,,white]\oplus)-[@{e4}]=[@{e3}]-(-[:120]Br)(-[:60]H)-=)}
- \elmove{e3}{180:4mm}{e4}{150:4mm}
- }
- \marrow
- \reactant{
- \chemfig{*6(-=-(-[:-150,.4,,,white]\oplus)-(-[:120]Br)(-[:60]H)-=)}
- }
- }
- }
- \arrow{}{}
- \reactant{
- \chemname{\chemfig{*6(-=-=(-Br)-=)}}{bromobenzene \compound{bromobenzene}}
- }
- \end{rxn}
-This obviously messes everything up. We can try this, though:
-\begin{lstlisting}
- \begin{rxn}[,.8]
- \setatomsep{1.6em}
- \reactant[,start]{
- \chemname{\chemfig{*6(-=-=(-[,,,,white]\phantom{Br})-=)}}{benzene \compound{benzene}}
- }
- \branch[below=of start]{
- \arrow[below,,,,both]{\ce{Br2 / AlBr3}}{$-\ce{AlBr4\om}$}
- \mesomeric!![below]!!{
- \reactant{
- \chemfig{*6(=[@{e1}]-=-(-[:120]Br)(-[:60]H)-(-[:-30,.4,,,white]\oplus)-[@{e2}])}
- \elmove{e1}{60:4mm}{e2}{0:4mm}
- }
- \marrow
- \reactant{
- \chemfig{*6(-(-[:90,.4,,,white]\oplus)-[@{e4}]=[@{e3}]-(-[:120]Br)(-[:60]H)-=)}
- \elmove{e3}{180:4mm}{e4}{150:4mm}
- }
- \marrow
- \reactant{
- \chemfig{*6(-=-(-[:-150,.4,,,white]\oplus)-(-[:120]Br)(-[:60]H)-=)}
- }
- }
- }
- \arrow{}{}
- \reactant{
- \chemname{\chemfig{*6(-=-=(-Br)-=)}}{bromobenzene \compound{bromobenzene}}
- }
- \end{rxn}
-\end{lstlisting}
-The result is better:
- \begin{rxn}[,.8]
- \setatomsep{1.6em}
- \reactant[,start]{
- \chemname{\chemfig{*6(-=-=(-[,,,,white]\phantom{Br})-=)}}{benzene \compound{benzene}}
- }
- \branch[below=of start]{
- \arrow[below,,,,both]{\ce{Br2 / AlBr3}}{$-\ce{AlBr4\om}$}
- \mesomeric[below]{
- \reactant{
- \chemfig{*6(=[@{e1}]-=-(-[:120]Br)(-[:60]H)-(-[:-30,.4,,,white]\oplus)-[@{e2}])}
- \elmove{e1}{60:4mm}{e2}{0:4mm}
- }
- \marrow
- \reactant{
- \chemfig{*6(-(-[:90,.4,,,white]\oplus)-[@{e4}]=[@{e3}]-(-[:120]Br)(-[:60]H)-=)}
- \elmove{e3}{180:4mm}{e4}{150:4mm}
- }
- \marrow
- \reactant{
- \chemfig{*6(-=-(-[:-150,.4,,,white]\oplus)-(-[:120]Br)(-[:60]H)-=)}
- }
- }
- }
- \arrow{}{}
- \reactant{
- \chemname{\chemfig{*6(-=-=(-Br)-=)}}{bromobenzene \compound{bromobenzene}}
- }
- \end{rxn}
-It isn't really what we want, though, because the intermediate is centered below the arrow. In order to be able to shift the whole thing, we place it into a branch\index{branch} of its own.
-\begin{lstlisting}[firstnumber=4]
- ...
- \branch[below=of start]{
- \arrow[below,,,!!arrow_a!!,both]{\ce{Br2 / AlBr3}}{$-\ce{AlBr4\om}$}
- }
- !!\branch[below=of arrow_a]{!!
- \mesomeric{
- \reactant{
- \chemfig{*6(=[@{e1}]-=-(-[:120]Br)(-[:60]H)-(-[:-30,.4,,,white]\oplus)-[@{e2}])}
- \elmove{e1}{60:4mm}{e2}{0:4mm}
- }
- \marrow
- \reactant{
- \chemfig{*6(-(-[:90,.4,,,white]\oplus)-[@{e4}]=[@{e3}]-(-[:120]Br)(-[:60]H)-=)}
- \elmove{e3}{180:4mm}{e4}{150:4mm}
- }
- \marrow
- \reactant{
- \chemfig{*6(-=-(-[:-150,.4,,,white]\oplus)-(-[:120]Br)(-[:60]H)-=)}
- }
- }
- !!}!!
- ...
-\end{lstlisting}
-\begin{rxn}[,.8]
- \setatomsep{1.6em}
- \reactant[,start]{\chemname{\chemfig{*6(-=-=(-[,,,,white]\phantom{Br})-=)}}{benzene \compound{benzene}} }
- \branch[below=of start]{
- \arrow[below,,,arrow_a,both]{\ce{Br2 / AlBr3}}{$-\ce{AlBr4\om}$}
- }
- \branch[below=of arrow_a]{
- \mesomeric[,mesomerism]{
- \reactant{
- \chemfig{*6(=[@{e1}]-=-(-[:120]Br)(-[:60]H)-(-[:-30,.4,,,white]\oplus)-[@{e2}])}
- \elmove{e1}{60:4mm}{e2}{0:4mm}
- }
- \marrow
- \reactant{
- \chemfig{*6(-(-[:90,.4,,,white]\oplus)-[@{e4}]=[@{e3}]-(-[:120]Br)(-[:60]H)-=)}
- \elmove{e3}{180:4mm}{e4}{150:4mm}
- }
- \marrow
- \reactant{
- \chemfig{*6(-=-(-[:-150,.4,,,white]\oplus)-(-[:120]Br)(-[:60]H)-=)}
- }
- }
- }
- \arrow{}{}
- \reactant{ \chemname{\chemfig{*6(-=-=(-Br)-=)}}{bromobenzene \compound{bromobenzene}} }
-\end{rxn}
-In first sight this isn't better. But by shifting the branch with \lstinline+xshift+\index{xshift}, we get what we want:
-\begin{lstlisting}[firstnumber=4]
- ...
- \branch[below=of start]{
- \arrow[below,,,arrow_a,both]{\ce{Br2 / AlBr3}}{$-\ce{AlBr4\om}$}
- }
- \branch[below=of arrow_a,,!!xshift=8.5em!!]{
- \mesomeric{
- \reactant{
- \chemfig{*6(=[@{e1}]-=-(-[:120]Br)(-[:60]H)-(-[:-30,.4,,,white]\oplus)-[@{e2}])}
- \elmove{e1}{60:4mm}{e2}{0:4mm}
- }
- \marrow
- \reactant{
- \chemfig{*6(-(-[:90,.4,,,white]\oplus)-[@{e4}]=[@{e3}]-(-[:120]Br)(-[:60]H)-=)}
- \elmove{e3}{180:4mm}{e4}{150:4mm}
- }
- \marrow
- \reactant{
- \chemfig{*6(-=-(-[:-150,.4,,,white]\oplus)-(-[:120]Br)(-[:60]H)-=)}
- }
- }
- }
- ...
-\end{lstlisting}
-\begin{rxn}[,.8]
- \setatomsep{1.6em}
- \reactant[,start]{\chemname{\chemfig{*6(-=-=(-[,,,,white]\phantom{Br})-=)}}{benzene \compound{benzene}} }
- \branch[below=of start]{
- \arrow[below,,,arrow_a,both]{\ce{Br2 / AlBr3}}{$-\ce{AlBr4\om}$}
- }
- \branch[below=of arrow_a,mesomerism,xshift=8.5em]{
- \mesomeric{
- \reactant{
- \chemfig{*6(=[@{e1}]-=-(-[:120]Br)(-[:60]H)-(-[:-30,.4,,,white]\oplus)-[@{e2}])}
- \elmove{e1}{60:4mm}{e2}{0:4mm}
- }
- \marrow
- \reactant{
- \chemfig{*6(-(-[:90,.4,,,white]\oplus)-[@{e4}]=[@{e3}]-(-[:120]Br)(-[:60]H)-=)}
- \elmove{e3}{180:4mm}{e4}{150:4mm}
- }
- \marrow
- \reactant{
- \chemfig{*6(-=-(-[:-150,.4,,,white]\oplus)-(-[:120]Br)(-[:60]H)-=)}
- }
- }
- }
- \arrow{}{}
- \reactant{ \chemname{\chemfig{*6(-=-=(-Br)-=)}}{bromobenzene \compound{bromobenzene}} }
-\end{rxn}
-The last arrow is also placed in its own branch, so we can shift it where we want.
-\begin{lstlisting}[firstnumber=4]
- ...
- \branch[below=of start]{
- \arrow[below,,,!!arrow_a!!,both]{\ce{Br2 / AlBr3}}{$-\ce{AlBr4\om}$}
- }
- \branch[below=of arrow_a,!!mesomerism!!,xshift=8.5em]{
- \mesomeric{
- \reactant{
- \chemfig{*6(=[@{e1}]-=-(-[:120]Br)(-[:60]H)-(-[:-30,.4,,,white]\oplus)-[@{e2}])}
- \elmove{e1}{60:4mm}{e2}{0:4mm}
- }
- \marrow
- \reactant{
- \chemfig{*6(-(-[:90,.4,,,white]\oplus)-[@{e4}]=[@{e3}]-(-[:120]Br)(-[:60]H)-=)}
- \elmove{e3}{180:4mm}{e4}{150:4mm}
- }
- \marrow
- \reactant{
- \chemfig{*6(-=-(-[:-150,.4,,,white]\oplus)-(-[:120]Br)(-[:60]H)-=)}
- }
- }
- }
- \branch[!!above=of mesomerism,,xshift=7.25em!!]{
- \arrow[above]{$-\Hpl$}{}
- }
- ...
-\end{lstlisting}
-\begin{rxn}[,.8]
- \setatomsep{1.6em}
- \reactant[,start]{\chemname{\chemfig{*6(-=-=(-[,,,,white]\phantom{Br})-=)}}{benzene \compound{benzene}} }
- \branch[below=of start]{
- \arrow[below,,,arrow_a,both]{\ce{Br2 / AlBr3}}{$-\ce{AlBr4\om}$}
- }
- \branch[below=of arrow_a,mesomerism,xshift=8.5em]{
- \mesomeric{
- \reactant{
- \chemfig{*6(=[@{e1}]-=-(-[:120]Br)(-[:60]H)-(-[:-30,.4,,,white]\oplus)-[@{e2}])}
- \elmove{e1}{60:4mm}{e2}{0:4mm}
- }
- \marrow
- \reactant{
- \chemfig{*6(-(-[:90,.4,,,white]\oplus)-[@{e4}]=[@{e3}]-(-[:120]Br)(-[:60]H)-=)}
- \elmove{e3}{180:4mm}{e4}{150:4mm}
- }
- \marrow
- \reactant{
- \chemfig{*6(-=-(-[:-150,.4,,,white]\oplus)-(-[:120]Br)(-[:60]H)-=)}
- }
- }
- }
- \branch[above=of mesomerism,,xshift=7.25em]{
- \arrow[above]{$-\Hpl$}{}
- }
- \arrow{}{}
- \reactant{ \chemname{\chemfig{*6(-=-=(-Br)-=)}}{bromobenzene \compound{bromobenzene}} }
-\end{rxn}
-Now we're almost there: the arrow of the main reaction still is too short. The complete code:
-\begin{lstlisting}
- \begin{rxnscheme}[,,,.8]{electrophilic substitution}
- \setatomsep{1.6em}
- \reactant[,start]{\chemname{\chemfig{*6(-=-=(-[,,,,white]\phantom{Br})-=)}}{benzene \compound{benzene}} }
-
- \branch[below=of start]{
- \arrow[below,,,arrow_a,both]{\ce{Br2 / AlBr3}}{$-\ce{AlBr4\om}$}
- }
- \branch[below=of arrow_a,mesomerism,xshift=8.5em]{
- \mesomeric{
- \reactant{
- \chemfig{*6(=[@{e1}]-=-(-[:120]Br)(-[:60]H)-(-[:-30,.4,,,white]\oplus)-[@{e2}])}
- \elmove{e1}{60:4mm}{e2}{0:4mm}
- }
- \marrow
- \reactant{
- \chemfig{*6(-(-[:90,.4,,,white]\oplus)-[@{e4}]=[@{e3}]-(-[:120]Br)(-[:60]H)-=)}
- \elmove{e3}{180:4mm}{e4}{150:4mm}
- }
- \marrow
- \reactant{
- \chemfig{*6(-=-(-[:-150,.4,,,white]\oplus)-(-[:120]Br)(-[:60]H)-=)}
- }
- }
- }
- \branch[above=of mesomerism,,xshift=7.25em]{
- \arrow[above]{$-\Hpl$}{}
- }
-
- \arrow[,,!!2.6!!]{}{}
- \reactant{ \chemname{\chemfig{*6(-=-=(-Br)-=)}}{bromobenzene \compound{bromobenzene}} }
- \end{rxnscheme}
-\end{lstlisting}
-
-\newpage
-\subsection{Hydratisation}\label{ssec:hydratisation}
-\pgfdeclaredecoration{ddbond}{initial}{%
- \state{initial}[width=2pt]{%
- \pgfpathlineto{\pgfpoint{2pt}{0pt}}%
- \pgfpathmoveto{\pgfpoint{1.5pt}{2pt}}%
- \pgfpathlineto{\pgfpoint{2pt}{2pt}}%
- \pgfpathmoveto{\pgfpoint{2pt}{0pt}}%
- }%
- \state{final}{%
- \pgfpathlineto{\pgfpointdecoratedpathlast}%
- }%
-}%
-\tikzset{lddbond/.style={decorate,decoration=ddbond}}%
-\tikzset{rddbond/.style={decorate,decoration={ddbond,mirror}}}%
-\newcommand*\delm{\ensuremath{\text{\tiny$\delta\ominus$}}}%
-\newcommand*\delp{\ensuremath{\text{\tiny$\delta\oplus$}}}%
-A scheme with transition\index{transition} states.
-
-\begin{rxnscheme}[rs:hydratisation,htp]{Hydratisation}
- \reactant[,carbonyl_A]{\chemfig{R_2C=O}}
- \anywhere{above=of carbonyl_A}{\chemfig{H-[:-30]O-[:30]H}}
- \arrow[,<=>]{\tiny slow}{}
- \transition[,transition_A]{\chemfig{R_2C(-[2,,2,,densely dotted]\chemabove{O}{\delp}(-[:150]H)-[:30]H)-[:-30,1.15,,,lddbond]O-[6,,,,densely dotted]H-[,,,,densely dotted]\chemabove{A}{\delm}}}
- \anywhere{below=of transition_A,text width=3cm}{(general transition state, acid cat.)}
- \arrow[,<=>,.5]{}{}
- \reactant{\chemfig{R_2C(-[:60]\chemabove{O}{\scriptstyle\oplus}H_2)-[:-60]OH}}
- \arrow[below right,<=>,.5]{$-\Hpl$}{}
- \reactant[below right]{\chemfig{R_2C(-[:60]OH)-[:-60]OH}}
- \arrow[below left,<=>,.5]{\ce{H2O}}{}
- \reactant[below left,zw]{\chemfig{R_2C(-[:60]OH)-[:-60]O|\om}}
- \arrow[left,<=>,.5]{}{}
- \transition[left,transition_B]{\chemfig{R_2C(-[2,,2,,densely dotted]O(-[:150]H-[4,,,,densely dotted]\chemabove{B}{\delp})-[:30]H)-[:-30,1.15,,,lddbond]\chemabove{O}{\delm}-[6,,,,draw=none]\phantom{H}}}
- \anywhere{below=of transition_B,text width=3cm}{(general transition state, base cat.)}
- \arrow[left,<=>]{\tiny slow}{}
- \reactant[left,carbonyl_B]{\chemfig{R_2C=O}}
- \anywhere{above=of carbonyl_B}{\chemfig{H-[:-30]O-[:30]H}}
-\end{rxnscheme}
-
-For this example we first declare a style for the delocalized double bonds:\index{tikz@\TikZ}
-\begin{lstlisting}
- \pgfdeclaredecoration{ddbond}{initial}{%
- \state{initial}[width=2pt]{%
- \pgfpathlineto{\pgfpoint{2pt}{0pt}}%
- \pgfpathmoveto{\pgfpoint{1.5pt}{2pt}}%
- \pgfpathlineto{\pgfpoint{2pt}{2pt}}%
- \pgfpathmoveto{\pgfpoint{2pt}{0pt}}%
- }%
- \state{final}{%
- \pgfpathlineto{\pgfpointdecoratedpathlast}%
- }%
- }%
- \tikzset{lddbond/.style={decorate,decoration=ddbond}}%
- \tikzset{rddbond/.style={decorate,decoration={ddbond,mirror}}}%
-\end{lstlisting}
-Now the delocalized double bond can be used via \CF's fifth option (see the \CF manual):
-\begin{SideBySideExample}
- \chemfig{-[,,,,lddbond]-[,,,,rddbond]}
-\end{SideBySideExample}
-Further we define the two commands
-\begin{lstlisting}
- \newcommand*\delm{\ensuremath{\text{\tiny$\delta\ominus$}}}%
- \newcommand*\delp{\ensuremath{\text{\tiny$\delta\oplus$}}}%
-\end{lstlisting}
-to use the partial charges without effort.
-
-Then the whole code looks like follows:\index{anywhere}
-\begin{lstlisting}
- \begin{rxnscheme}[rs:hydratisation,htp]{Hydratisation}
- \reactant[,carbonyl_A]{\chemfig{R_2C=O}}
- \anywhere{above=of carbonyl_A}{\chemfig{H-[:-30]O-[:30]H}}
- \arrow[,<=>]{\tiny slow}{}
- \transition[,transition_A]{\chemfig{R_2C(-[2,,2,,densely dotted]\chemabove{O}{\delp}(-[:150]H)-[:30]H)-[:-30,1.15,,,lddbond]O-[6,,,,densely dotted]H-[,,,,densely dotted]\chemabove{A}{\delm}}}
- \anywhere{below=of transition_A,text width=3cm}{(general transition state, acid cat.)}
- \arrow[,<=>,.5]{}{}
- \reactant{\chemfig{R_2C(-[:60]\chemabove{O}{\scriptstyle\oplus}H_2)-[:-60]OH}}
- \arrow[below right,<=>,.5]{$-\Hpl$}{}
- \reactant[below right]{\chemfig{R_2C(-[:60]OH)-[:-60]OH}}
- \arrow[below left,<=>,.5]{\ce{H2O}}{}
- \reactant[below left,zw]{\chemfig{R_2C(-[:60]OH)-[:-60]O|\om}}
- \arrow[left,<=>,.5]{}{}
- \transition[left,transition_B]{\chemfig{R_2C(-[2,,2,,densely dotted]O(-[:150]H-[4,,,,densely dotted]\chemabove{B}{\delp})-[:30]H)-[:-30,1.15,,,lddbond]\chemabove{O}{\delm}-[6,,,,draw=none]\phantom{H}}}
- \anywhere{below=of transition_B,text width=3cm}{(general transition state, base cat.)}
- \arrow[left,<=>]{\tiny langsam}{}
- \reactant[left,carbonyl_B]{\chemfig{R_2C=O}}
- \anywhere{above=of carbonyl_B}{\chemfig{H-[:-30]O-[:30]H}}
- \end{rxnscheme}
-\end{lstlisting}
-
-\subsection{Esterification}\label{ssec:veresterung}
-\begin{rxn}
- \reactant{\chemfig{H-C(=[:60]O)-[:-60]O-H}}
- \arrow[,-+>,1.2,protolysis]{\ce{H2SO4}}{\ce{HSO4\om}}
- \anywhere{below=of protolysis,yshift=1em}{\tiny protolysis}
- \mesomeric{
- \reactant{\chemfig{H-@{a2}C(-[:60]O-H)(-[:30,.5,,,draw=none]{\scriptstyle\oplus})-[:-60]O-H}}
- \marrow
- \reactant{\chemfig{H-C(=[:60]\chemabove{O}{\scriptstyle\oplus}-H)-[:-60]O-H}}
- }
- \branch[on chain=going below,,xshift=-5em]{
- \arrow[below,<=>]{\tiny addition}{\chemfig{H-[:120]@{a1}O-[:60]CH_3}}
- \reactant[below]{\chemfig{H-C(-[2]O-[:30]H)(-\chemabove{O}{\scriptstyle\oplus}(-[:60]CH_3)-[:-60]H)-[6]O-[:-30]H}}
- }
- \elmove{a1}{90:1.5cm}{a2}{0:3cm}
- \branch[on chain=going left,,yshift=-3.5em]{
- \arrow[left,<=>]{}{\tiny protolysis}
- }
- \reactant[left]{\chemfig{H-C(-[2]O-[:30]H)(-O-CH_3)-[@{b1}6]@{a3}\chemabove{O}{\hspace*{-4mm}\scriptstyle\oplus}(-[:-150]H)-[:-30]H}}
- \elmove{b1}{0:5mm}{a3}{20:5mm}
- \arrow[below,<=>]{\ce{- H2O}}{\tiny elimination}
- \mesomeric[below,,xshift=6em]{
- \reactant{\chemfig{H-C(-[:60]O-H)(-[,.5,,,draw=none]{\scriptstyle\oplus})-[:-60]O-CH_3}}
- \marrow
- \reactant{\chemfig{H-C(=[:60]\chemabove{O}{\scriptstyle\oplus}-H)-[:-60]O-CH_3}}
- }
- \arrow[,-+>,1.2]{\ce{HSO4\om}}{\ce{H2SO4}}
- \reactant{\chemfig{H-C(=[:60]O)-[:-60]O-CH_3}}
-\end{rxn}
-\begin{lstlisting}
- \begin{rxn}
- \reactant{\chemfig{H-C(=[:60]O)-[:-60]O-H}}
- \arrow[,-+>,1.2,protolysis]{\ce{H2SO4}}{\ce{HSO4\om}}
- \anywhere{below=of protolysis,yshift=1em}{\tiny protolysis}
- \mesomeric{
- \reactant{\chemfig{H-@{a2}C(-[:60]O-H)(-[:30,.5,,,draw=none]{\scriptstyle\oplus})-[:-60]O-H}}
- \marrow
- \reactant{\chemfig{H-C(=[:60]\chemabove{O}{\scriptstyle\oplus}-H)-[:-60]O-H}}
- }
- \branch[on chain=going below,,xshift=-5em]{
- \arrow[below,<=>]{\tiny addition}{\chemfig{H-[:120]@{a1}O-[:60]CH_3}}
- \reactant[below]{\chemfig{H-C(-[2]O-[:30]H)(-\chemabove{O}{\scriptstyle\oplus}(-[:60]CH_3)-[:-60]H)-[6]O-[:-30]H}}
- }
- \elmove{a1}{90:1.5cm}{a2}{0:3cm}
- \branch[on chain=going left,,yshift=-3.5em]{
- \arrow[left,<=>]{}{\tiny protolysis}
- }
- \reactant[left]{\chemfig{H-C(-[2]O-[:30]H)(-O-CH_3)-[@{b1}6]@{a3}\chemabove{O}{\hspace*{-4mm}\scriptstyle\oplus}(-[:-150]H)-[:-30]H}}
- \elmove{b1}{0:5mm}{a3}{20:5mm}
- \arrow[below,<=>]{\ce{- H2O}}{\tiny elimination}
- \mesomeric[below,,xshift=6em]{
- \reactant{\chemfig{H-C(-[:60]O-H)(-[,.5,,,draw=none]{\scriptstyle\oplus})-[:-60]O-CH_3}}
- \marrow
- \reactant{\chemfig{H-C(=[:60]\chemabove{O}{\scriptstyle\oplus}-H)-[:-60]O-CH_3}}
- }
- \arrow[,-+>,1.2]{\ce{HSO4\om}}{\ce{H2SO4}}
- \reactant{\chemfig{H-C(=[:60]O)-[:-60]O-CH_3}}
- \end{rxn}
-\end{lstlisting}
-
-\subsection[Extensive Synthesis]{Creating an extensive synthesis using \mC and \CF}\label{ssec:tikzsynthese}
-As last example we can create extensive syntheses, using the \lstinline=\merge=\index{merge} command.
-\begin{rxnscheme}[rs:synthese,htp,,.8]{synthesis of chrysanthemum acid}
- \setatomsep{1.5em}
- \branch[,start_left]{
- \reactant{\chemfig{=_[::30]-[::-60]-[::60](-[::-60])(-[::120])-[::0]OH}}
- \arrow[below]{\ce{HBr}}{}
- \reactant[below]{\chemfig{Br-[::30]-[::-60]=_[::60](-[::-60])-[::60]}}
- }
- \branch[right=of start_left,start_center,yshift=1em]{
- \reactant{\chemname{\chemfig[][scale=.8]{**6(--(-SO_2Cl)---(-)-)}}{tosyle chloride}}
- \arrow[below]{\ce{NaOH}}{\ce{Zn}}
- \reactant[below]{\chemfig[][scale=.8]{**6(--(-SO_2Na)---(-)-)}}
- }
- \branch[right=of start_center,start_right,xshift=3em,yshift=-10em]{
- \reactant{\chemname{\chemfig{-[::30](-[::60])=_[::-60]-[::60]COOH}}{3-methyl-2-butenoic acid}}
- \arrow[below]{\ce{CH3OH}}{}
- \reactant[below]{\chemfig{-[::30](-[::60])=_[::-60]-[::60]CO_2CH_3}}
- }
- \branch[below=of start_left,target_one,xshift=5em,yshift=-5em]{
- \reactant{\chemfig[][scale=.8]{**6(--(-SO_2-[:30]-[::-60]=_[::60](-[::60])-[::-60])---(-)-)}}
- }
- \branch[below=of target_one,target_two,xshift=6em,yshift=-6em]{
- \mesomeric{\chemfig[][scale=.8]{-[::30](-[::60])=^[::-60]-[::60](-[::60]S(=[::90]O)(=[::-90]O)-[::0]**6(---(-)---))-[::-60](-[::0])(-[::-120])-[::60](-[::60,.5,,,white]\ominus)-[::-60]CO_2CH_3}}
- \arrow[below,,.5]{}{}
- \arrow[below,,.5]{\ce{KOH}}{}
- \reactant[below]{\chemname{\chemfig{-[::-30](-[::-60])=^[::60]>[::-60](-[::90,1.2])-[::30,1.2](-[::120,1.2](-[::-60])-[::0])<:[::-30]COOH}}{\emph{trans}-chrysanthemum acid}}
- }
- \merge{target_one}{start_left}{start_center}
- \merge[\ce{NaOCH3}]{target_two}{target_one}{start_right}
-\end{rxnscheme}
-\begin{lstlisting}
- \begin{rxnscheme}[,htp,,.8]{synthesis of chrysanthemum acid}
- \setatomsep{1.5em}
- \branch[,start_left]{
- \reactant{\chemfig{=_[::30]-[::-60]-[::60](-[::-60])(-[::120])-[::0]OH}}
- \arrow[below]{\ce{HBr}}{}
- \reactant[below]{\chemfig{Br-[::30]-[::-60]=_[::60](-[::-60])-[::60]}}
- }
- \branch[right=of start_left,start_center,yshift=1em]{
- \reactant{\chemname{\chemfig[][scale=.8]{**6(--(-SO_2Cl)---(-)-)}}{tosyle chloride}}
- \arrow[below]{\ce{NaOH}}{\ce{Zn}}
- \reactant[below]{\chemfig[][scale=.8]{**6(--(-SO_2Na)---(-)-)}}
- }
- \branch[right=of start_center,start_right,xshift=3em,yshift=-10em]{
- \reactant{\chemname{\chemfig{-[::30](-[::60])=_[::-60]-[::60]COOH}}{3-methyl-2-butenoic acid}}
- \arrow[below]{\ce{CH3OH}}{}
- \reactant[below]{\chemfig{-[::30](-[::60])=_[::-60]-[::60]CO_2CH_3}}
- }
- \branch[below=of start_left,target_one,xshift=5em,yshift=-5em]{
- \reactant{\chemfig[][scale=.8]{**6(--(-SO_2-[:30]-[::-60]=_[::60](-[::60])-[::-60])---(-)-)}}
- }
- \branch[below=of target_one,target_two,xshift=6em,yshift=-6em]{
- \mesomeric{\chemfig[][scale=.8]{-[::30](-[::60])=^[::-60]-[::60](-[::60]S(=[::90]O)(=[::-90]O)-[::0]**6(---(-)---))-[::-60](-[::0])(-[::-120])-[::60](-[::60,.5,,,white]\ominus)-[::-60]CO_2CH_3}}
- \arrow[below,,.5]{}{}
- \arrow[below,,.5]{\ce{KOH}}{}
- \reactant[below]{\chemname{\chemfig{-[::-30](-[::-60])=^[::60]>[::-60](-[::90,1.2])-[::30,1.2](-[::120,1.2](-[::-60])-[::0])<:[::-30]COOH}}{\emph{trans}-chrysanthemum acid}}
- }
- \merge{target_one}{start_left}{start_center}
- \merge[\ce{NaOCH3}]{target_two}{target_one}{start_right}
- \end{rxnscheme}
-\end{lstlisting}
-Let's go through the code, piece by piece.
-\begin{lstlisting}
- \begin{rxnscheme}[,htp,,.8]{synthesis of chrysanthemum acid}
- \setatomsep{1.5em}
- \branch[,start_left]{
- \reactant{\chemfig{=_[::30]-[::-60]-[::60](-[::-60])(-[::120])-[::0]OH}}
- \arrow[below]{\ce{HBr}}{}
- \reactant[below]{\chemfig{Br-[::30]-[::-60]=_[::60](-[::-60])-[::60]}}
- }
-\end{lstlisting}
-In lines 1 and 2 we begin the environment and make sure, that the formul\ae\ don't become to big. In lines 3 -- 7 the first two reactants are written (lines 4 and 6) and connected with an arrow (line 5).
-\begin{rxn}[,.8]
- \setatomsep{1.5em}
- \branch[,start_left]{
- \reactant{\chemfig{=_[::30]-[::-60]-[::60](-[::-60])(-[::120])-[::0]OH}}
- \arrow[below]{\ce{HBr}}{}
- \reactant[below]{\chemfig{Br-[::30]-[::-60]=_[::60](-[::-60])-[::60]}}
- }
-\end{rxn}
-\begin{lstlisting}[firstnumber=8]
- \branch[right=of start_left,start_center,yshift=1em]{
- \reactant{\chemname{\chemfig[][scale=.8]{**6(--(-SO_2Cl)---(-)-)}}{tosyle chloride}}
- \arrow[below]{\ce{NaOH}}{\ce{Zn}}
- \reactant[below]{\chemfig[][scale=.8]{**6(--(-SO_2Na)---(-)-)}}
- }
-\end{lstlisting}
-In the following lines 8 -- 12, we create the second branch of the synthesis.
-\begin{rxn}[,.8]
- \setatomsep{1.5em}
- \branch[,start_left]{
- \reactant{\chemfig{=_[::30]-[::-60]-[::60](-[::-60])(-[::120])-[::0]OH}}
- \arrow[below]{\ce{HBr}}{}
- \reactant[below]{\chemfig{Br-[::30]-[::-60]=_[::60](-[::-60])-[::60]}}
- }
- \branch[right=of start_left,start_center,yshift=1em]{
- \reactant{\chemname{\chemfig[][scale=.8]{**6(--(-SO_2Cl)---(-)-)}}{tosyle chloride}}
- \arrow[below]{\ce{NaOH}}{\ce{Zn}}
- \reactant[below]{\chemfig[][scale=.8]{**6(--(-SO_2Na)---(-)-)}}
- }
-\end{rxn}
-\begin{lstlisting}[firstnumber=13]
- \branch[right=of start_center,start_right,xshift=3em,yshift=-10em]{
- \reactant{\chemname{\chemfig{-[::30](-[::60])=_[::-60]-[::60]COOH}}{3-methyl-2-butenoic acid}}
- \arrow[below]{\ce{CH3OH}}{}
- \reactant[below]{\chemfig{-[::30](-[::60])=_[::-60]-[::60]CO_2CH_3}}
- }
- \branch[below=of start_left,target_one,xshift=5em,yshift=-5em]{
- \reactant{\chemfig[][scale=.8]{**6(--(-SO_2-[:30]-[::-60]=_[::60](-[::60])-[::-60])---(-)-)}}
- }
-\end{lstlisting}
-In lines 13 -- 20 we create the third branch and the product of the first two branches.
-\begin{rxn}[,.8]
- \setatomsep{1.5em}
- \branch[,start_left]{
- \reactant{\chemfig{=_[::30]-[::-60]-[::60](-[::-60])(-[::120])-[::0]OH}}
- \arrow[below]{\ce{HBr}}{}
- \reactant[below]{\chemfig{Br-[::30]-[::-60]=_[::60](-[::-60])-[::60]}}
- }
- \branch[right=of start_left,start_center,yshift=1em]{
- \reactant{\chemname{\chemfig[][scale=.8]{**6(--(-SO_2Cl)---(-)-)}}{tosyle chloride}}
- \arrow[below]{\ce{NaOH}}{\ce{Zn}}
- \reactant[below]{\chemfig[][scale=.8]{**6(--(-SO_2Na)---(-)-)}}
- }
- \branch[right=of start_center,start_right,xshift=3em,yshift=-10em]{
- \reactant{\chemname{\chemfig{-[::30](-[::60])=_[::-60]-[::60]COOH}}{3-methyl-2-butenoic acid}}
- \arrow[below]{\ce{CH3OH}}{}
- \reactant[below]{\chemfig{-[::30](-[::60])=_[::-60]-[::60]CO_2CH_3}}
- }
- \branch[below=of start_left,target_one,xshift=5em,yshift=-5em]{
- \reactant{\chemfig[][scale=.8]{**6(--(-SO_2-[:30]-[::-60]=_[::60](-[::60])-[::-60])---(-)-)}}
- }
-\end{rxn}
-\begin{lstlisting}[firstnumber=21]
- \branch[below=of target_one,target_two,xshift=6em,yshift=-6em]{
- \mesomeric{\chemfig[][scale=.8]{-[::30](-[::60])=^[::-60]-[::60](-[::60]S(=[::90]O)(=[::-90]O)-[::0]**6(---(-)---))-[::-60](-[::0])(-[::-120])-[::60](-[::60,.5,,,white]\ominus)-[::-60]CO_2CH_3}}
- \arrow[below,,.5]{}{}
- \arrow[below,,.5]{\ce{KOH}}{}
- \reactant[below]{\chemname{\chemfig{-[::-30](-[::-60])=^[::60]>[::-60](-[::90,1.2])-[::30,1.2](-[::120,1.2](-[::-60])-[::0])<:[::-30]COOH}}{\emph{trans}-chrysanthemum acid}}
- }
-\end{lstlisting}
-In lines 21 -- 26 we create the last branch.
-\begin{rxn}[,.8]
- \dummy[start_left]
- \branch[right=of start_left,start_right,xshift=13em,yshift=-4em]{
- \reactant[below]{\chemfig{-[::30](-[::60])=_[::-60]-[::60]CO_2CH_3}}
- }
- \branch[below=of start_left,target_one,xshift=5em]{
- \reactant{\chemfig[][scale=.8]{**6(--(-SO_2-[:30]-[::-60]=_[::60](-[::60])-[::-60])---(-)-)}}
- }
- \branch[below=of target_one,target_two,xshift=6em,yshift=-6em]{
- \mesomeric{\chemfig[][scale=.8]{-[::30](-[::60])=^[::-60]-[::60](-[::60]S(=[::90]O)(=[::-90]O)-[::0]**6(---(-)---))-[::-60](-[::0])(-[::-120])-[::60](-[::60,.5,,,white]\ominus)-[::-60]CO_2CH_3}}
- \arrow[below,,.5]{}{}
- \arrow[below,,.5]{\ce{KOH}}{}
- \reactant[below]{\chemname{\chemfig{-[::-30](-[::-60])=^[::60]>[::-60](-[::90,1.2])-[::30,1.2](-[::120,1.2](-[::-60])-[::0])<:[::-30]COOH}}{\emph{trans}-chrysanthemum acid}}
- }
-\end{rxn}
-Finally, the different branches are merged\index{merge}, the second merging arrow gets a label and the environment is ended.
-\begin{lstlisting}[firstnumber=27]
- \merge{target_one}{start_left}{start_center}
- \merge[\ce{NaOCH3}]{target_two}{target_one}{start_right}
- \end{rxnscheme}
-\end{lstlisting}
-
\section{Epilogue}
\mC is still very new. This means there are probably a number of bugs I haven't discovered yet. There also might be missing one or two features, that would be useful. Since I only can test and work on \mC in my spare time, I'd be very glad about \emph{every} kind of feedback. If you like \mC, why don't you help me improve it by telling me your experiences?
diff --git a/Master/texmf-dist/tex/latex/mychemistry/mychemistry.sty b/Master/texmf-dist/tex/latex/mychemistry/mychemistry.sty
index cf4ed6a2118..60a6b968d60 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/04/15 ------------------------------------------------------------------------ %
+% - 2011/04/23 ------------------------------------------------------------------------ %
% ------------------------------------------------------------------------------------- %
% - http://www.niederberger-berlin.net/2011/02/latex-mychemistry/ --------------------- %
% - kontakt@niederberger-berlin.net --------------------------------------------------- %
@@ -92,38 +92,53 @@
% - own arrow tips defined - %
% - command \setarrowline added - %
% - new arrow type -+> added - %
+% - 2011/04/23 version 1.5 - %
+% - major parts of the code rewritten -- - %
+% - the whole positioning part now is different and way more flexible: - %
+% - arbitrary angles can be used for positioning, referencing an object is - %
+% - easier, arrows can be modified using <tikz>, command \anywhere now has - %
+% - similar syntax - %
+% - arrow types <=>> and <<=> added - %
+% - arrow type -+> modified: more flexible - %
+% - bugfixes in error-handling - %
% ------------------------------------------------------------------------------------- %
-% - TODO - %
+% - TODO: - %
% - 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 reactants et.al.? - %
-% - option for shifting arrows? - %
-% - Hook, damit die Befehle erkennen, ob sie innerhalb Umgebung sind? - %
-% - Pfeil-Typen: <<=>/<=>> hinzufügen - %
+% - add arrow types <=+>, <+=>, <=+>>, <+=>>, <<=+>, <<+=> ? - %
% ------------------------------------------------------------------------------------- %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\def\mC@def#1{%
- \ifdefined#1%
- \errmessage{myChemistry Package Error: the macro \string#1\space is already defined. Please let the author know.}%
- \fi
- \def#1%
-}
-\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}
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% Paket Info %
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\def\mC@version{1.5}
+\def\mC@date@de{23. April 2011}
+\def\mC@date@en{April 23rd 2011}
+\def\mC@date{2011/04/23}
+\def\mC@name{myChemistry}
\ProvidesPackage{mychemistry}[\mC@date\space v\mC@version]
\typeout{}
\typeout{\mC@name\space v\mC@version}
\typeout{\mC@date\space Clemens Niederberger}
\typeout{}
\RequirePackage{ifthen,calc,float,xkeyval}
+% myChemistry Informationen ----------------------------------------------------------- %
+\def\mCversion{\mC@version}
+\def\mCdate#1{\csname mC@date@#1\endcsname}
+% additional für ChemFig v0.4 --------------------------------------------------------- %
+\def\mC@CFversion@test{0.4}%
+\IfFileExists{bondwidth.tex}{%
+ \ifx\CF@ver\mC@CFversion@test\input{bondwidth}\fi
+}{}%
+\def\mC@CFversion@test{0.4a}
+\IfFileExists{bondwidth.tex}{%
+ \ifx\CF@ver\mC@CFversion@test\input{bondwidth}\fi
+}{}%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Optionen, z.T. auch an chemexec weitergeben
-\mC@def\mC@exec@color{black}
-\mC@def\mC@exec@shade{false}
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\def\mC@exec@color{black}
+\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}%
@@ -143,22 +158,22 @@
\def\mC@exec@shade{true}
}
% chemexec abschalten
-\mC@def\mC@exec@true{true}
+\def\mC@exec@true{true}
\DeclareOptionX[MC]{nochemexec}{%
\def\mC@exec@true{false}
}
% mhchem abschalten
-\mC@def\mC@mhchem@true{true}
+\def\mC@mhchem@true{true}
\DeclareOptionX[MC]{nomhchem}{%
\def\mC@mhchem@true{false}
}
% chemcompounds abschalten
-\mC@def\mC@compound@true{true}
+\def\mC@compound@true{true}
\DeclareOptionX[MC]{nocompounds}{%
\def\mC@compound@true{false}
}
% chemstyle einschalten
-\mC@def\mC@chemstyle@true{false}
+\def\mC@chemstyle@true{false}
\DeclareOptionX[MC]{chemstyle}{%
\def\mC@chemstyle@true{true}
}
@@ -170,14 +185,14 @@
\def\mC@chemstyle@true{false}
}
% englische Version von chemexec, englische Variante von myChemistry
-\mC@def\mC@exec@english{}
-\mC@def\mC@rs@name{Reaktionsschema}
+\def\mC@exec@english{}
+\def\mC@rs@name{Reaktionsschema}
\DeclareOptionX[MC]{english}{
\def\mC@exec@english{,english}
\def\mC@rs@name{Reaction scheme}
}
-\mC@def\mC@rs@placement{H}
-\mC@def\mC@rs@currentplacement{\mC@rs@placement}
+\def\mC@rs@placement{hpt}
+\def\mC@rs@currentplacement{\mC@rs@placement}
\define@key[MC]{mychemistry.sty}{placement}{
\def\mC@rs@placement{#1}
}
@@ -211,7 +226,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}{The ChemFig package is not installed! myChemistry can't work without it}{See the myChemistry package documentation for explanation}
}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% chemexec laden, falls verfügbar, falls nicht, dann wenigstens mhchem laden
@@ -238,271 +253,332 @@
}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-% NEUE BEFEHLE: %
+% Tools ------------------------------------------------------------------------------- %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-% myChemistry Informationen ----------------------------------------------------------- %
-\mC@def\mCversion{\mC@version}
-\mC@def\mCdate#1{\csname mC@date@#1\endcsname}
-% additional für ChemFig v0.4 --------------------------------------------------------- %
-\mC@def\mC@CFversion@test{0.4}%
-\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
-}{}%
+\def\mC@true{true}
+\def\mC@false{false}
% Optional Argument Analysis ---------------------------------------------------------- %
% Prüfen ob #2 in #1 enthalten ist
-\mC@def\mC@if@instr#1#2{%
+\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
}
% Am ersten , splitten, #1 in #3 speichern, #2 in \mC@remainargs
-\mC@def\mC@splitfirst#1,#2\@nil#3{%
+\def\mC@splitfirst#1,#2\@nil#3{%
\def#3{#1}\def\mC@remainargs{#2}%
}
% ein durch , in 3 Teile getrenntes Argument splitten
-\mC@def\mC@splitarg#1{
+\def\mC@splitarg#1{
\mC@if@instr{#1}{,}{\expandafter\mC@splitfirst#1\@nil\mC@firstarg}{\def\mC@firstarg{#1}}
\expandafter\mC@if@instr\expandafter{\mC@remainargs}{,}{\expandafter\mC@splitfirst\mC@remainargs\@nil\mC@secondarg}{\expandafter\def\expandafter\mC@secondarg\expandafter{\mC@remainargs}}
\ifx\mC@remainargs\mC@secondarg\let\mC@thirdarg\@empty\else\expandafter\def\expandafter\mC@thirdarg\expandafter{\mC@remainargs}\fi
}
+% Direction Analysis ------------------------------------------------------------------ %
+% Richtungen:
+\def\mC@r{right}
+\def\mC@ar{above right}
+\def\mC@a{above}
+\def\mC@al{above left}
+\def\mC@l{left}
+\def\mC@br{below right}
+\def\mC@b{below}
+\def\mC@bl{below left}
+\def\mC@vert@i{90}
+\def\mC@vert@ii{-90}
+\def\mC@vert@iii{270}
+% Richtung in Bezug auf node oder nicht?
+\def\mC@split@angle#1.#2\@nil#3{\def#3{#1}\def\mC@direction{#2}}
+\def\mC@wowo@node#1{\mC@if@instr{#1}{.}{\expandafter\mC@split@angle#1\@nil\mC@referred@node}{\def\mC@direction{#1}}}
+% Winkel bestimmen:
+\def\mC@analyze@angle#1{
+ \let\mC@angle\@empty
+ \let\mC@referred@node\@empty
+ \mC@wowo@node{#1}
+ \ifx\mC@direction\mC@r\def\mC@angle{0}\fi
+ \ifx\mC@direction\mC@ar\def\mC@angle{45}\fi
+ \ifx\mC@direction\mC@a\def\mC@angle{90}\fi
+ \ifx\mC@direction\mC@al\def\mC@angle{135}\fi
+ \ifx\mC@direction\mC@l\def\mC@angle{180}\fi
+ \ifx\mC@direction\mC@bl\def\mC@angle{225}\fi
+ \ifx\mC@direction\mC@b\def\mC@angle{270}\fi
+ \ifx\mC@direction\mC@br\def\mC@angle{315}\fi
+ \ifx\mC@angle\@empty\pgfmathparse{\mC@direction <0 ? int(\mC@direction+360) : int(\mC@direction) }\edef\mC@angle{\pgfmathresult}\fi
+}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% PFEILE ------------------------------------------------------------------------------ %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-% interne Befehle, Voreinstellungen --------------------------------------------------- %
-\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}
-\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{} %
+% \arrow[<pos>,<type>,<length factor>,<name>,both,<tikz>]{<above>}{<below>}
+% Pfeiltypen:
+\def\mC@arrow@type@def{->}
+\def\mC@arrow@type@eqv{<->}
+\def\mC@arrow@type@back{<-}
+\def\mC@arrow@type@eq{<=>}
+\def\mC@arrow@type@eqq{<=>>}
+\def\mC@arrow@type@eeq{<<=>}
+\def\mC@arrow@type@not{-|>}
+\def\mC@arrow@type@pm{-+>}
-% Laengenfaktor ----------------------------------------------------------------------- %
-\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} %
-\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@value}{\mC@arrow@length@default}
- \else
- \setlength{\mC@arrow@length@value}{#1}
- \fi
-}
-% \let\arrowlength\setarrowlength
-
-% Beschriftungen ---------------------------------------------------------------------- %
-\newlength{\mC@arrow@argument@aboveshift} % Verschieben der Beschriftung
-\newlength{\mC@arrow@argument@belowshift} % Verschieben der Beschriftung
-\define@key{arrow}{aboveshift}[2pt]{%
- \setlength{\mC@arrow@argument@aboveshift}{#1}}
-\define@key{arrow}{belowshift}[2pt]{%
- \setlength{\mC@arrow@argument@belowshift}{#1}}
-\define@key{arrow}{both}[]{
- \renewcommand{\mC@arrow@argument@both}{true}
+% Voreinstellungen -------------------------------------------------------------------- %
+% Pfeillänge -------------------------------------------------------------------------- %
+% \newlength{\mC@arrow@length}
+\def\mC@arrow@length@def{4em}
+\let\mC@arrow@length\mC@arrow@length@def
+\def\mC@arrow@factor{1}
+\def\setarrowlength#1{%
+ \ifx\@empty#1\@empty%
+ \let\mC@arrow@length\mC@arrow@length@def%
+ \else%
+ \def\mC@arrow@length{#1}%
+ \fi%
}
-
-% Anker ------------------------------------------------------------------------------- %
-\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}}% %
-
-% Richtung ---------------------------------------------------------------------------- %
-\define@key{arrow}{direction}[\mC@arrow@direction]{%
- \renewcommand{\mC@arrow@currentdirection}{#1} %
- \ifthenelse{\equal{#1}{right}}{% nach rechts, Einstellungen:
- \renewcommand{\mC@arrow@end}{\mC@arrow@length@actual,0}
- \renewcommand{\mC@arrow@currentabove}{above}
- \renewcommand{\mC@arrow@currentbelow}{below}
- \renewcommand{\mC@arrow@above@anchor}{south}
- \renewcommand{\mC@arrow@below@anchor}{north}
- \renewcommand{\mC@arrow@argument@anchor}{
- \node(@arrow@center) at ($(\tikzchainprevious.east)+(.5\mC@arrow@length@actual+\mC@rxn@node@distance,0)$) {};
- }
- \renewcommand{\mC@arrow@argument@angle}{0}
- \renewcommand{\mC@arrow@rotate}{0}
- \renewcommand{\mC@arrow@start@up}{0,0.03}
- \renewcommand{\mC@arrow@start@down}{0,-0.03}
- \renewcommand{\mC@arrow@cross@base@x}{.15em}
- \renewcommand{\mC@arrow@cross@base@y}{0}
- \renewcommand{\mC@arrow@cross@angle}{60}
- \renewcommand{\mC@arrow@cross@length}{.5em}
- }{
- \ifthenelse{\equal{#1}{above right}}{% nach oben rechts, Einstellungen:
- \renewcommand{\mC@arrow@end}{\mC@arrow@length@actual,\mC@arrow@length@actual}
- \renewcommand{\mC@arrow@currentabove}{above left}
- \renewcommand{\mC@arrow@currentbelow}{below right}
- \renewcommand{\mC@arrow@above@anchor}{south}
- \renewcommand{\mC@arrow@below@anchor}{north}
- \renewcommand{\mC@arrow@argument@anchor}{
- \node(@arrow@center) at ($(\tikzchainprevious.north east)+(.5\mC@arrow@length@actual+.707\mC@rxn@node@distance,.5\mC@arrow@length@actual+.707\mC@rxn@node@distance)$) {};
- }
- \renewcommand{\mC@arrow@argument@angle}{45}
- \renewcommand{\mC@arrow@rotate}{45}
- \renewcommand{\mC@arrow@start@up}{-0.02,0.02}
- \renewcommand{\mC@arrow@start@down}{0.02,-0.02}
- \renewcommand{\mC@arrow@cross@base@x}{.1em}
- \renewcommand{\mC@arrow@cross@base@y}{.1em}
- \renewcommand{\mC@arrow@cross@angle}{-15}
- \renewcommand{\mC@arrow@cross@length}{.7em}
- }{
- \ifthenelse{\equal{#1}{above}}{% nach oben, Einstellungen:
- \renewcommand{\mC@arrow@end}{0,\mC@arrow@length@actual}
- \renewcommand{\mC@arrow@currentabove}{left}
- \renewcommand{\mC@arrow@currentbelow}{right}
- \renewcommand{\mC@arrow@above@anchor}{east}
- \renewcommand{\mC@arrow@below@anchor}{west}
- \renewcommand{\mC@arrow@argument@anchor}{
- \node(@arrow@center) at ($(\tikzchainprevious.north)+(0,.5\mC@arrow@length@actual+\mC@rxn@node@distance)$) {};
- }
- \renewcommand{\mC@arrow@argument@angle}{90}
- \renewcommand{\mC@arrow@rotate}{0}
- \renewcommand{\mC@arrow@start@up}{-0.03,0}
- \renewcommand{\mC@arrow@start@down}{0.03,0}
- \renewcommand{\mC@arrow@cross@base@x}{0}
- \renewcommand{\mC@arrow@cross@base@y}{.15em}
- \renewcommand{\mC@arrow@cross@angle}{30}
- \renewcommand{\mC@arrow@cross@length}{.5em}
- }{
- \ifthenelse{\equal{#1}{above left}}{% nach oben links, Einstellungen:
- \renewcommand{\mC@arrow@end}{-\mC@arrow@length@actual,\mC@arrow@length@actual}
- \renewcommand{\mC@arrow@currentabove}{above right}
- \renewcommand{\mC@arrow@currentbelow}{below left}
- \renewcommand{\mC@arrow@above@anchor}{south}
- \renewcommand{\mC@arrow@below@anchor}{north}
- \renewcommand{\mC@arrow@argument@anchor}{
- \node(@arrow@center) at ($(\tikzchainprevious.north west)+(-.5\mC@arrow@length@actual-.707\mC@rxn@node@distance,.5\mC@arrow@length@actual+.707\mC@rxn@node@distance)$) {};
- }
- \renewcommand{\mC@arrow@argument@angle}{-45}
- \renewcommand{\mC@arrow@rotate}{-45}
- \renewcommand{\mC@arrow@start@up}{-0.02,-0.02}
- \renewcommand{\mC@arrow@start@down}{0.02,0.02}
- \renewcommand{\mC@arrow@cross@base@x}{-.1em}
- \renewcommand{\mC@arrow@cross@base@y}{.1em}
- \renewcommand{\mC@arrow@cross@angle}{15}
- \renewcommand{\mC@arrow@cross@length}{.7em}
- }{
- \ifthenelse{\equal{#1}{left}}{% nach links, Einstellungen:
- \renewcommand{\mC@arrow@end}{-\mC@arrow@length@actual,0}
- \renewcommand{\mC@arrow@currentabove}{above}
- \renewcommand{\mC@arrow@currentbelow}{below}
- \renewcommand{\mC@arrow@above@anchor}{south}
- \renewcommand{\mC@arrow@below@anchor}{north}
- \renewcommand{\mC@arrow@argument@anchor}{
- \node(@arrow@center) at ($(\tikzchainprevious.west)+(-.5\mC@arrow@length@actual-\mC@rxn@node@distance,0)$) {};
- }
- \renewcommand{\mC@arrow@argument@angle}{0}
- \renewcommand{\mC@arrow@rotate}{0}
- \renewcommand{\mC@arrow@start@up}{0,-0.03}
- \renewcommand{\mC@arrow@start@down}{0,0.03}
- \renewcommand{\mC@arrow@cross@base@x}{.15em}
- \renewcommand{\mC@arrow@cross@base@y}{0}
- \renewcommand{\mC@arrow@cross@angle}{60}
- \renewcommand{\mC@arrow@cross@length}{.5em}
- }{
- \ifthenelse{\equal{#1}{below left}}{% nach unten links, Einstellungen:
- \renewcommand{\mC@arrow@end}{-\mC@arrow@length@actual,-\mC@arrow@length@actual}
- \renewcommand{\mC@arrow@currentabove}{above left}
- \renewcommand{\mC@arrow@currentbelow}{below right}
- \renewcommand{\mC@arrow@above@anchor}{south}
- \renewcommand{\mC@arrow@below@anchor}{north}
- \renewcommand{\mC@arrow@argument@anchor}{
- \node(@arrow@center) at ($(\tikzchainprevious.south west)+(-.5\mC@arrow@length@actual-.707\mC@rxn@node@distance,-.5\mC@arrow@length@actual-.707\mC@rxn@node@distance)$) {};
- }
- \renewcommand{\mC@arrow@argument@angle}{45}
- \renewcommand{\mC@arrow@rotate}{45}
- \renewcommand{\mC@arrow@start@up}{0.02,-0.02}
- \renewcommand{\mC@arrow@start@down}{-0.02,0.02}
- \renewcommand{\mC@arrow@cross@base@x}{.1em}
- \renewcommand{\mC@arrow@cross@base@y}{.1em}
- \renewcommand{\mC@arrow@cross@angle}{-15}
- \renewcommand{\mC@arrow@cross@length}{.7em}
- }{
- \ifthenelse{\equal{#1}{below}}{% nach unten, Einstellungen:
- \renewcommand{\mC@arrow@end}{0,-\mC@arrow@length@actual}
- \renewcommand{\mC@arrow@currentabove}{left}
- \renewcommand{\mC@arrow@currentbelow}{right}
- \renewcommand{\mC@arrow@above@anchor}{east}
- \renewcommand{\mC@arrow@below@anchor}{west}
- \renewcommand{\mC@arrow@argument@anchor}{
- \node(@arrow@center) at ($(\tikzchainprevious.south)+(0,-.5\mC@arrow@length@actual-\mC@rxn@node@distance)$) {};
- }
- \renewcommand{\mC@arrow@argument@angle}{90}
- \renewcommand{\mC@arrow@rotate}{0}
- \renewcommand{\mC@arrow@start@up}{0.03,0}
- \renewcommand{\mC@arrow@start@down}{-0.03,0}
- \renewcommand{\mC@arrow@cross@base@x}{0}
- \renewcommand{\mC@arrow@cross@base@y}{.15em}
- \renewcommand{\mC@arrow@cross@angle}{30}
- \renewcommand{\mC@arrow@cross@length}{.5em}
- }{
- \ifthenelse{\equal{#1}{below right}}{% nach unten rechts, Einstellungen:
- \renewcommand{\mC@arrow@end}{\mC@arrow@length@actual,-\mC@arrow@length@actual}
- \renewcommand{\mC@arrow@currentabove}{above right}
- \renewcommand{\mC@arrow@currentbelow}{below left}
- \renewcommand{\mC@arrow@above@anchor}{south}
- \renewcommand{\mC@arrow@below@anchor}{north}
- \renewcommand{\mC@arrow@argument@anchor}{
- \node(@arrow@center) at ($(\tikzchainprevious.south east)+(.5\mC@arrow@length@actual+.707\mC@rxn@node@distance,-.5\mC@arrow@length@actual-.707\mC@rxn@node@distance)$) {};
- }
- \renewcommand{\mC@arrow@argument@angle}{-45}
- \renewcommand{\mC@arrow@rotate}{-45}
- \renewcommand{\mC@arrow@start@up}{0.02,0.02}
- \renewcommand{\mC@arrow@start@down}{-0.02,-0.02}
- \renewcommand{\mC@arrow@cross@base@x}{-.1em}
- \renewcommand{\mC@arrow@cross@base@y}{.1em}
- \renewcommand{\mC@arrow@cross@angle}{15}
- \renewcommand{\mC@arrow@cross@length}{.7em}
- }{
- \PackageError{mychemistry}{Unknown arrow direction}% oder Fehler
- }
- }
- }
- }
- }
- }
- }
- }
+% Label-Abstand ----------------------------------------------------------------------- %
+\def\mC@arrow@label@dist@def{.2em}
+\def\mC@arrow@label@dist{\mC@arrow@label@dist@def}
+\def\setarrowlabel#1{%
+ \ifx\@empty#1\@empty%
+ \def\mC@arrow@label@dist{\mC@arrow@label@dist@def}%
+ \else%
+ \def\mC@arrow@label@dist{#1}%
+ \fi%
}
-
% Pfeildicke -------------------------------------------------------------------------- %
-\mC@def\mC@arrow@linethickness@default{semithick}
-\mC@def\mC@arrow@linethickness{\mC@arrow@linethickness@default}
-\mC@def\setarrowline#1{%
+\def\mC@arrow@linethickness@default{semithick}
+\def\mC@arrow@linethickness{\mC@arrow@linethickness@default}
+\def\setarrowline#1{%
\ifx\@empty#1\@empty%
\def\mC@arrow@linethickness{\mC@arrow@linethickness@default}%
\else%
\def\mC@arrow@linethickness{#1}%
\fi%
}
+% ------------------------------------------------------------------------------------- %
+% Winkel untersuchen, um Label richtig anzubringen ------------------------------------ %
+\def\mC@evaluate@angle#1{
+\newcount\mC@alpha
+\mC@alpha=#1
+\pgfmathparse{cos(\mC@alpha) > 0}
+\ifnum\pgfmathresult=1
+ \def\mC@beta{#1}
+ \def\mC@arrow@label@anchor@up{south}
+ \def\mC@arrow@label@anchor@down{north}
+ \ifnum\mC@alpha<180
+ \def\mC@arrow@label@anchor@add{east}
+ \def\mC@arrow@label@anchor@sub{south}
+ \else
+ \def\mC@arrow@label@anchor@add{south}
+ \def\mC@arrow@label@anchor@sub{west}
+ \fi
+\else
+ \pgfmathparse{cos(\mC@alpha) == 0}
+ \ifnum\pgfmathresult=1
+ \def\mC@beta{0}
+ \ifnum\mC@alpha=90
+ \def\mC@arrow@label@anchor@up{east}
+ \def\mC@arrow@label@anchor@down{west}
+ \def\mC@arrow@label@anchor@add{east}
+ \def\mC@arrow@label@anchor@sub{east}
+ \else
+ \def\mC@arrow@label@anchor@up{west}
+ \def\mC@arrow@label@anchor@down{east}
+ \def\mC@arrow@label@anchor@add{west}
+ \def\mC@arrow@label@anchor@sub{west}
+ \fi
+ \else
+ \def\mC@arrow@label@anchor@up{north}
+ \def\mC@arrow@label@anchor@down{south}
+ \ifnum\mC@alpha=180
+ \def\mC@beta{180-#1}
+ \def\mC@arrow@label@anchor@add{north}
+ \def\mC@arrow@label@anchor@sub{north}
+ \fi
+ \ifnum\mC@alpha>180
+ \def\mC@beta{180+#1}
+ \def\mC@arrow@label@anchor@add{west}
+ \def\mC@arrow@label@anchor@sub{north}
+ \fi
+ \ifnum\mC@alpha<180
+ \def\mC@beta{180+#1}
+ \def\mC@arrow@label@anchor@add{north}
+ \def\mC@arrow@label@anchor@sub{east}
+ \fi
+ \fi
+\fi
+}
+% ------------------------------------------------------------------------------------- %
+% Maße der Nodes der Pfeilargumente bestimmen, größere später an Pfeil weitergeben
+\def\mC@arrow@both{both}
+\newlength{\mC@height@A}
+\newlength{\mC@height@B}
+\newlength{\mC@arrow@label@height}
+\newlength{\mC@width@A}
+\newlength{\mC@width@B}
+\newlength{\mC@arrow@label@width}
+\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!
+\def\mC@largernode#1#2{
+ \@ifundefined{pgfpositionnodelater}{
+ \PackageError{mychemistry}{The command \string\pgfpositionnodelater\space is undefined. Make sure, you have installed the latest version of pgf}{See the myChemistry package documentation for explanation}
+ }{}
+ {\pgfpositionnodelater{\mC@savenode}
+ \node{#1};
+ \setlength{\mC@width@A}{\mC@maxx}%
+ \addtolength{\mC@width@A}{-\mC@minx}
+ \setlength{\mC@height@A}{\mC@maxy}%
+ \addtolength{\mC@height@A}{-\mC@miny}
+ \node{#2};
+ \setlength{\mC@width@B}{\mC@maxx}%
+ \addtolength{\mC@width@B}{-\mC@minx}
+ \setlength{\mC@height@B}{\mC@maxy}%
+ \addtolength{\mC@height@B}{-\mC@miny}
+ \pgfmathsetlength{\mC@arrow@label@width}{max(\mC@width@A,\mC@width@B)}
+ \pgfmathsetlength{\mC@arrow@label@height}{max(\mC@height@A,\mC@height@B)}
+ \global\mC@arrow@label@width=\mC@arrow@label@width
+ \global\mC@arrow@label@height=\mC@arrow@label@height
+ }
+}
+% ------------------------------------------------------------------------------------- %
+% Pfeil zeichnen:
+\def\arrow{\@ifnextchar[{\mC@arrow@ii}{\mC@arrow@i}}
+\def\mC@arrow@i#1#2{
+ \node[on chain=going {at=(\tikzchainprevious.0)},minimum size=0,inner sep=3pt,outer sep=0,anchor=180,shift=(0:.5*\mC@rxn@node@distance)] (@mC@arrow@start){};
+ \node[on chain=going {at=(\tikzchainprevious.0),shift=($(0:.5*\mC@arrow@factor*\mC@arrow@length)$)}, minimum size=0,inner sep=3pt,outer sep=0] (@mC@arrow@end){};
+ \draw[-mCtip,\mC@arrow@linethickness] let \n1={0}, \n2={180} in (@mC@arrow@start.\n1) --node[pos=.5,inner sep=0](mC@arrow@center){} ++($(0:\mC@arrow@factor*\mC@arrow@length)$);
+ \expandafter\node\expandafter[\mC@arrow@uplabel@visible,rotate=0,anchor=south,inner sep=0] at ($(mC@arrow@center)!\mC@arrow@label@dist!90:(@mC@arrow@end)$){#1};
+ \expandafter\node\expandafter[\mC@arrow@downlabel@visible,rotate=0,anchor=north,inner sep=0] at ($(mC@arrow@center)!\mC@arrow@label@dist!-90:(@mC@arrow@end)$){#2};
+}
+\def\mC@arrow@ii[#1]#2#3{
+ \let\mC@arrow@plusminus\@empty
+ \let\mC@arrow@type\@empty
+ \let\mC@remainargs\@empty\mC@splitarg{#1}
+ \ifx\@empty\mC@firstarg% erste Option: Richtung
+ \def\mC@angle{0}
+ \def\mC@beta{0}
+ \def\mC@arrow@label@anchor@up{south}
+ \def\mC@arrow@label@anchor@down{north}
+ \def\mC@arrow@label@anchor@add{south}
+ \def\mC@arrow@label@anchor@sub{south}
+ \def\mC@anchor{180}
+ \let\mC@referred@node\@empty
+ \else
+ \expandafter\mC@analyze@angle\expandafter{\mC@firstarg}
+ \def\mC@anchor{180+\mC@angle}
+ \mC@evaluate@angle{\mC@angle}
+ \fi
+ \ifx\mC@referred@node\@empty\def\mC@referred@node{\tikzchainprevious}\fi
+ \ifx\@empty\mC@secondarg\else% zweite Option: Typ
+ \def\mC@arrow@type{true}
+ \let\mC@arrow@type@actual\mC@secondarg
+ \fi
+ \let\mC@remainargs\@empty%
+ \expandafter\mC@splitarg\expandafter{\mC@thirdarg}%
+ \ifx\@empty\mC@firstarg% dritte Option: Längenfaktor
+ \def\mC@arrow@factor{1}%
+ \else%
+ \edef\mC@arrow@factor{\mC@firstarg}%
+ \fi%
+ \ifx\@empty\mC@secondarg% vierte Option: Name
+ \def\mC@arrow@name{mC@arrow@center}%
+ \else%
+ \edef\mC@arrow@name{\mC@secondarg}%
+ \fi%
+ \let\mC@remainargs\@empty%
+ \expandafter\mC@splitarg\expandafter{\mC@thirdarg}%
+ \ifx\mC@arrow@both\mC@firstarg% fünfte Option: both
+ \mC@largernode{#2}{#3}%
+ \else%
+ \setlength{\mC@arrow@label@width}{0pt}%
+ \setlength{\mC@arrow@label@height}{0pt}%
+ \fi%
+ \ifx\@empty\mC@secondarg% sechste Option: tikz
+ \let\mC@arrow@tikz\@empty%
+ \else%
+ \edef\mC@arrow@tikz{\mC@secondarg,\mC@thirdarg}%
+ \fi%
+ \node[on chain=going {at=(\mC@referred@node.\mC@angle)},minimum size=0,inner sep=3pt,outer sep=0,anchor=\mC@anchor,shift=(\mC@angle:.5*\mC@rxn@node@distance)] (@mC@arrow@start){};
+ \node[on chain=going {at=(\tikzchainprevious.\mC@angle),shift=($(\mC@angle:.5*\mC@arrow@factor*\mC@arrow@length)$)}, minimum size=0,inner sep=3pt,outer sep=0] (@mC@arrow@end){};
+ \ifx\mC@arrow@type\mC@true
+ \let\mC@arrow@type@valid\mC@false%
+ \ifx\mC@arrow@type@actual\mC@arrow@type@eq% <=>
+ \let\mC@arrow@type@valid\mC@true%
+ \expandafter\draw\expandafter[\mC@arrow@tikz,-mChtip,\mC@arrow@linethickness] let \n1={20+\mC@angle}, \n2={160+\mC@angle} in (@mC@arrow@start.\n1) --node[pos=.5,inner sep=0](mC@arrow@center@up){} ++($(\mC@angle:\mC@arrow@factor*\mC@arrow@length)$);
+ \expandafter\draw\expandafter[\mC@arrow@tikz,mChtip-,\mC@arrow@linethickness] let \n1={-20+\mC@angle}, \n2={200+\mC@angle} in (@mC@arrow@start.\n1) --node[pos=.5,inner sep=0](mC@arrow@center@down){} ++($(\mC@angle:\mC@arrow@factor*\mC@arrow@length)$);
+ \draw[draw=none] let \n1={\mC@angle}, \n2={180+\mC@angle} in (@mC@arrow@start.\n1) --node[pos=.5,inner sep=0](\mC@arrow@name){} ++($(\mC@angle:\mC@arrow@factor*\mC@arrow@length)$);
+ \expandafter\node\expandafter[\mC@arrow@uplabel@visible,rotate=\mC@beta,anchor=\mC@arrow@label@anchor@up,minimum width=\mC@arrow@label@width, minimum height=\mC@arrow@label@height,inner sep=0] at ($(mC@arrow@center@up)!\mC@arrow@label@dist!90:(@mC@arrow@end)$){#2};
+ \expandafter\node[\expandafter\mC@arrow@downlabel@visible,rotate=\mC@beta,anchor=\mC@arrow@label@anchor@down,minimum width=\mC@arrow@label@width, minimum height=\mC@arrow@label@height,inner sep=0] at ($(mC@arrow@center@down)!\mC@arrow@label@dist!-90:(@mC@arrow@end)$){#3};
+ \fi
+ \ifx\mC@arrow@type@actual\mC@arrow@type@eqq% <=>>
+ \let\mC@arrow@type@valid\mC@true%
+ \expandafter\draw\expandafter[\mC@arrow@tikz,-mChtip,\mC@arrow@linethickness] let \n1={20+\mC@angle}, \n2={160+\mC@angle} in (@mC@arrow@start.\n1) --node[pos=.5,inner sep=0](mC@arrow@center@up){} ++($(\mC@angle:\mC@arrow@factor*\mC@arrow@length)$);
+ \expandafter\draw\expandafter[\mC@arrow@tikz,mChtip-,\mC@arrow@linethickness] let \n1={-20+\mC@angle} in ($(@mC@arrow@start.\n1)+(\mC@angle:.25*\mC@arrow@factor*\mC@arrow@length)$) --node[pos=.5,inner sep=0](mC@arrow@center@down){} ++($(\mC@angle:.5*\mC@arrow@factor*\mC@arrow@length)$);
+ \draw[draw=none] let \n1={\mC@angle}, \n2={180+\mC@angle} in (@mC@arrow@start.\n1) --node[pos=.5,inner sep=0](\mC@arrow@name){} ++($(\mC@angle:\mC@arrow@factor*\mC@arrow@length)$);
+ \expandafter\node\expandafter[\mC@arrow@uplabel@visible,rotate=\mC@beta,anchor=\mC@arrow@label@anchor@up,minimum width=\mC@arrow@label@width, minimum height=\mC@arrow@label@height,inner sep=0] at ($(mC@arrow@center@up)!\mC@arrow@label@dist!90:(@mC@arrow@end)$){#2};
+ \expandafter\node\expandafter[\mC@arrow@downlabel@visible,rotate=\mC@beta,anchor=\mC@arrow@label@anchor@down,minimum width=\mC@arrow@label@width, minimum height=\mC@arrow@label@height,inner sep=0] at ($(mC@arrow@center@down)!\mC@arrow@label@dist!-90:(@mC@arrow@end)$){#3};
+ \fi
+ \ifx\mC@arrow@type@actual\mC@arrow@type@eeq% <<=>
+ \let\mC@arrow@type@valid\mC@true%
+ \expandafter\draw\expandafter[\mC@arrow@tikz,-mChtip,\mC@arrow@linethickness] let \n1={20+\mC@angle}, \n2={160+\mC@angle} in ($(@mC@arrow@start.\n1)+(\mC@angle:.25*\mC@arrow@factor*\mC@arrow@length)$) --node[pos=.5,inner sep=0](mC@arrow@center@up){} ++($(\mC@angle:.5*\mC@arrow@factor*\mC@arrow@length)$);
+ \expandafter\draw\expandafter[\mC@arrow@tikz,mChtip-,\mC@arrow@linethickness] let \n1={-20+\mC@angle}, \n2={200+\mC@angle} in (@mC@arrow@start.\n1) --node[pos=.5,inner sep=0](mC@arrow@center@down){} ++($(\mC@angle:\mC@arrow@factor*\mC@arrow@length)$);
+ \draw[draw=none] let \n1={\mC@angle}, \n2={180+\mC@angle} in (@mC@arrow@start.\n1) --node[pos=.5,inner sep=0](\mC@arrow@name){} ++($(\mC@angle:\mC@arrow@factor*\mC@arrow@length)$);
+ \expandafter\node\expandafter[\mC@arrow@uplabel@visible,rotate=\mC@beta,anchor=\mC@arrow@label@anchor@up,minimum width=\mC@arrow@label@width, minimum height=\mC@arrow@label@height,inner sep=0] at ($(mC@arrow@center@up)!\mC@arrow@label@dist!90:(@mC@arrow@end)$){#2};
+ \expandafter\node\expandafter[\mC@arrow@downlabel@visible,rotate=\mC@beta,anchor=\mC@arrow@label@anchor@down,minimum width=\mC@arrow@label@width, minimum height=\mC@arrow@label@height,inner sep=0] at ($(mC@arrow@center@down)!\mC@arrow@label@dist!-90:(@mC@arrow@end)$){#3};
+ \fi
+ \ifx\mC@arrow@type@actual\mC@arrow@type@def% ->
+ \let\mC@arrow@type@valid\mC@true%
+ \expandafter\draw\expandafter[\mC@arrow@tikz,-mCtip,\mC@arrow@linethickness,\mC@arrow@tikz] let \n1={\mC@angle}, \n2={180+\mC@angle} in (@mC@arrow@start.\n1) --node[pos=.5,inner sep=0](\mC@arrow@name){} ++($(\mC@angle:\mC@arrow@factor*\mC@arrow@length)$);
+ \expandafter\node\expandafter[\mC@arrow@uplabel@visible,rotate=\mC@beta,anchor=\mC@arrow@label@anchor@up,minimum width=\mC@arrow@label@width, minimum height=\mC@arrow@label@height] at ($(\mC@arrow@name)!\mC@arrow@label@dist!90:(@mC@arrow@end)$){#2};
+ \expandafter\node\expandafter[\mC@arrow@downlabel@visible,rotate=\mC@beta,anchor=\mC@arrow@label@anchor@down,minimum width=\mC@arrow@label@width, minimum height=\mC@arrow@label@height] at ($(\mC@arrow@name)!\mC@arrow@label@dist!-90:(@mC@arrow@end)$){#3};
+ \fi
+ \ifx\mC@arrow@type@actual\mC@arrow@type@eqv% <->
+ \let\mC@arrow@type@valid\mC@true%
+ \expandafter\draw\expandafter[\mC@arrow@tikz,mCtip-mCtip,\mC@arrow@linethickness] let \n1={\mC@angle}, \n2={180+\mC@angle} in (@mC@arrow@start.\n1) --node[pos=.5,inner sep=0](\mC@arrow@name){} ++($(\mC@angle:\mC@arrow@factor*\mC@arrow@length)$);
+ \expandafter\node\expandafter[\mC@arrow@uplabel@visible,rotate=\mC@beta,anchor=\mC@arrow@label@anchor@up,minimum width=\mC@arrow@label@width, minimum height=\mC@arrow@label@height,inner sep=0] at ($(\mC@arrow@name)!\mC@arrow@label@dist!90:(@mC@arrow@end)$){#2};
+ \expandafter\node\expandafter[\mC@arrow@downlabel@visible,rotate=\mC@beta,anchor=\mC@arrow@label@anchor@down,minimum width=\mC@arrow@label@width, minimum height=\mC@arrow@label@height,inner sep=0] at ($(\mC@arrow@name)!\mC@arrow@label@dist!-90:(@mC@arrow@end)$){#3};
+ \fi
+ \ifx\mC@arrow@type@actual\mC@arrow@type@back% <-
+ \let\mC@arrow@type@valid\mC@true%
+ \expandafter\draw\expandafter[\mC@arrow@tikz,mCtip-,\mC@arrow@linethickness] let \n1={\mC@angle}, \n2={180+\mC@angle} in (@mC@arrow@start.\n1) --node[pos=.5,inner sep=0](\mC@arrow@name){} ++($(\mC@angle:\mC@arrow@factor*\mC@arrow@length)$);
+ \expandafter\node\expandafter[\mC@arrow@uplabel@visible,rotate=\mC@beta,anchor=\mC@arrow@label@anchor@up,minimum width=\mC@arrow@label@width, minimum height=\mC@arrow@label@height,inner sep=0] at ($(\mC@arrow@name)!\mC@arrow@label@dist!90:(@mC@arrow@end)$){#2};
+ \expandafter\node\expandafter[\mC@arrow@downlabel@visible,rotate=\mC@beta,anchor=\mC@arrow@label@anchor@down,minimum width=\mC@arrow@label@width, minimum height=\mC@arrow@label@height,inner sep=0] at ($(\mC@arrow@name)!\mC@arrow@label@dist!-90:(@mC@arrow@end)$){#3};
+ \fi
+ \ifx\mC@arrow@type@actual\mC@arrow@type@not% -|>
+ \let\mC@arrow@type@valid\mC@true%
+ \expandafter\draw\expandafter[\mC@arrow@tikz,-mCtip,\mC@arrow@linethickness] let \n1={\mC@angle}, \n2={180+\mC@angle} in (@mC@arrow@start.\n1) --node[pos=.5,inner sep=0](\mC@arrow@name){} ++($(\mC@angle:\mC@arrow@factor*\mC@arrow@length)$);
+ \expandafter\node\expandafter[\mC@arrow@uplabel@visible,rotate=\mC@beta,anchor=\mC@arrow@label@anchor@up,minimum width=\mC@arrow@label@width, minimum height=\mC@arrow@label@height,inner sep=0] at ($(\mC@arrow@name)!.8em!90:(@mC@arrow@end)$){#2};
+ \expandafter\node\expandafter[\mC@arrow@downlabel@visible,rotate=\mC@beta,anchor=\mC@arrow@label@anchor@down,minimum width=\mC@arrow@label@width, minimum height=\mC@arrow@label@height,inner sep=0] at ($(\mC@arrow@name)!.8em!-90:(@mC@arrow@end)$){#3};
+ \draw ($(mC@arrow@center)!.6em!-110:(@mC@arrow@end)+(\mC@angle:.1em)$)--($(mC@arrow@center)!.6em!70:(@mC@arrow@end)+(\mC@angle:.1em)$);
+ \draw ($(mC@arrow@center)!.6em!-110:(@mC@arrow@end)+(180+\mC@angle:.1em)$)--($(mC@arrow@center)!.6em!70:(@mC@arrow@end)+(180+\mC@angle:.1em)$);
+ \fi
+ \ifx\mC@arrow@type@actual\mC@arrow@type@pm% -+>
+ \let\mC@arrow@type@valid\mC@true%
+ \def\mC@arrow@plusminus{true}
+ \draw[-mCtip,\mC@arrow@linethickness] let \n1={\mC@angle}, \n2={180+\mC@angle} in (@mC@arrow@start.\n1) --node[pos=.5,inner sep=0](\mC@arrow@name){} ++($(\mC@angle:\mC@arrow@factor*\mC@arrow@length)$);
+ \fi
+ \ifx\mC@arrow@type@valid\mC@false%
+ \PackageError{myChemistry}{Unknown arrow type \mC@arrow@type@actual}{}
+ \fi
+ \else% default: ->
+ \expandafter\draw\expandafter[\mC@arrow@tikz,-mCtip,\mC@arrow@linethickness] let \n1={\mC@angle}, \n2={180+\mC@angle} in (@mC@arrow@start.\n1) --node[pos=.5,inner sep=0](\mC@arrow@name){} ++($(\mC@angle:\mC@arrow@factor*\mC@arrow@length)$);
+ \expandafter\node\expandafter[\mC@arrow@uplabel@visible,rotate=\mC@beta,anchor=\mC@arrow@label@anchor@up,minimum width=\mC@arrow@label@width, minimum height=\mC@arrow@label@height,inner sep=0] at ($(\mC@arrow@name)!\mC@arrow@label@dist!90:(@mC@arrow@end)$){#2};
+ \expandafter\node\expandafter[\mC@arrow@downlabel@visible,rotate=\mC@beta,anchor=\mC@arrow@label@anchor@down,minimum width=\mC@arrow@label@width, minimum height=\mC@arrow@label@height,inner sep=0] at ($(\mC@arrow@name)!\mC@arrow@label@dist!-90:(@mC@arrow@end)$){#3};
+ \fi
+ \ifx\@empty\mC@arrow@plusminus\else
+ \ifx\@empty#2\@empty\else
+ \draw (\mC@arrow@name.base) edge[bend left] ++(${0.6667}*(146.3+\mC@angle:.5*\mC@arrow@factor*\mC@arrow@length)$);
+ \node[anchor=\mC@arrow@label@anchor@add,inner sep=\mC@arrow@label@dist,minimum width=\mC@arrow@label@width, minimum height=\mC@arrow@label@height] at ($(\mC@arrow@name.base)+{0.6667}*(146.3+\mC@angle:.5*\mC@arrow@factor*\mC@arrow@length)$) {#2};
+ \fi
+ \ifx\@empty#3\@empty\else
+ \draw (\mC@arrow@name.base) edge[bend right,-mCtip] ++(${0.6667}*(33.7+\mC@angle:.5*\mC@arrow@factor*\mC@arrow@length)$);
+ \node[anchor=\mC@arrow@label@anchor@sub,inner sep=\mC@arrow@label@dist,minimum width=\mC@arrow@label@width, minimum height=\mC@arrow@label@height] at ($(\mC@arrow@name.base)+{0.6667}*(33.7+\mC@angle:.5*\mC@arrow@factor*\mC@arrow@length)$) {#3};
+ \fi
+ \fi
+ \def\mC@arrow@factor{1}
+}
+
% eigene Pfeilspitze ------------------------------------------------------------------ %
\pgfarrowsdeclare{mCtip}{mCtip}%
{
@@ -540,181 +616,37 @@
\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}{->}}{
- \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}{<->}}{
- \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}{<-}}{
- \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}{<=>}}{
- \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}{-|>}}{
- \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}
- }{
- \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
- }
- }
- }
- }
- }
- }
-}%
-% ------------------------------------------------------------------------------------- %
-% Maße der Nodes der Pfeilargumente bestimmen, größere später an Pfeil weitergeben
-\newlength{\mC@height@A}
-\newlength{\mC@height@B}
-\newlength{\mC@arrow@argument@height}
-\newlength{\mC@width@A}
-\newlength{\mC@width@B}
-\newlength{\mC@arrow@argument@width}
-\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!
-\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.}
- }{}
- {\pgfpositionnodelater{\mC@savenode}
- \node{#1};
- \setlength{\mC@width@A}{\mC@maxx}%
- \addtolength{\mC@width@A}{-\mC@minx}
- \setlength{\mC@height@A}{\mC@maxy}%
- \addtolength{\mC@height@A}{-\mC@miny}
- \node{#2};
- \setlength{\mC@width@B}{\mC@maxx}%
- \addtolength{\mC@width@B}{-\mC@minx}
- \setlength{\mC@height@B}{\mC@maxy}%
- \addtolength{\mC@height@B}{-\mC@miny}
- \pgfmathsetlength{\mC@arrow@argument@width}{max(\mC@width@A,\mC@width@B)}
- \pgfmathsetlength{\mC@arrow@argument@height}{max(\mC@height@A,\mC@height@B)}
- \global\mC@arrow@argument@width=\mC@arrow@argument@width
- \global\mC@arrow@argument@height=\mC@arrow@argument@height
- }
-}
-
-% Pfeil zeichnen ---------------------------------------------------------------------- %
-\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@value}
- \ifthenelse{\equal{\mC@arrow@argument@both}{true}}{
- \mC@largernode{#1}{#2}
- }{
- \setlength{\mC@arrow@argument@width}{0pt}
- \setlength{\mC@arrow@argument@height}{0pt}
- }
- \draw node[on chain=going \mC@arrow@currentdirection](\mC@arrow@currentname) {\tikz{
- \mC@arrow@drawing
- }
- };
- \mC@arrow@argument@anchor
- \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}
-}
-
-% Voreinstellungen:
-\presetkeys%
- {arrow}
- {direction=\mC@arrow@direction,length=\mC@arrow@length,type=\mC@arrow@type,aboveshift=\mC@arrow@argument@shift,belowshift=\mC@arrow@argument@shift}
- {}
-
-% Eigentlicher Befehl:
-\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 ------------------------------------------------------------------------------- %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\mC@def\mC@merge@length@default{3em}
-\mC@def\mC@merge@length@value{\mC@merge@length@default}
+% \merge[<label>,<pos>,<length>]{<target>}{<start a>}{<start b>}
+\def\mC@merge@length@default{3em}
+\def\mC@merge@length@value{\mC@merge@length@default}
% Basisbefehle ------------------------------------------------------------------------ %
-\mC@def\mC@merge@right{
+\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);
+ \draw[\mC@arrow@linethickness] ($(\mC@merge@from@one.east)+(\mC@rxn@node@distance,0)$) -| (crossing.base);
+ \draw[\mC@arrow@linethickness] ($(\mC@merge@from@two.east)+(\mC@rxn@node@distance,0)$) -| (crossing.base);
}
-\mC@def\mC@merge@above{
+\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)$);
+ \draw[\mC@arrow@linethickness] (crossing.base) -| ($(\mC@merge@from@one.north)+(0,\mC@rxn@node@distance)$);
+ \draw[\mC@arrow@linethickness] (crossing.base) -| ($(\mC@merge@from@two.north)+(0,\mC@rxn@node@distance)$);
}
-\mC@def\mC@merge@left{
+\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);
+ \draw[\mC@arrow@linethickness] ($(\mC@merge@from@one.west)+(-\mC@rxn@node@distance,0)$) -| (crossing.base);
+ \draw[\mC@arrow@linethickness] ($(\mC@merge@from@two.west)+(-\mC@rxn@node@distance,0)$) -| (crossing.base);
}
-\mC@def\mC@merge@below{
+\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)$);
+ \draw[\mC@arrow@linethickness] (crossing.base) -| ($(\mC@merge@from@one.south)+(0,-\mC@rxn@node@distance)$);
+ \draw[\mC@arrow@linethickness] (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{\@ifnextchar[{\mC@merge@ii}{\mC@merge@i}}
+\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}
@@ -722,7 +654,7 @@
\def\mC@merge@from@two{#3}
\mC@merge@below
}
-\mC@def\mC@merge@ii[#1]#2#3#4{
+\def\mC@merge@ii[#1]#2#3#4{
\let\mC@remainargs\@empty\mC@splitarg{#1}
\ifx\mC@firstarg\@empty
\let\mC@merge@arg\@empty
@@ -743,9 +675,9 @@
\expandafter\csname mC@merge@\mC@secondarg\endcsname
\fi
}
-\mC@def\merge{\mC@merge}
+\def\merge{\mC@merge}
-\mC@def\setmergelength#1{
+\def\setmergelength#1{
\ifx\@empty#1\@empty
\def\mC@merge@length@value{\mC@merge@length@default}
\else
@@ -760,7 +692,7 @@
\setlength{\mC@rxn@node@distance@default}{1em}
\newlength{\mC@rxn@node@distance}
\setlength{\mC@rxn@node@distance}{\mC@rxn@node@distance@default}
-\mC@def\setrcndist#1{%
+\def\setrcndist#1{%
\ifx\@empty#1\@empty%
\setlength{\mC@rxn@node@distance}{\mC@rxn@node@distance@default}%
\else%
@@ -770,17 +702,18 @@
% ------------------------------------------------------------------------------------- %
% Schema ------------------------------------------------------------------------------ %
% ------------------------------------------------------------------------------------- %
-\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{% %
+% \begin{rxnscheme}[<label>,<placement>,<align>,<scale factor>,<name>]{<caption>}
+\def\mC@rs@scale{1.0} % Default-Skalierung
+\def\mC@rs@currentscale{\mC@rs@scale} %
+\def\setschemename#1{\def\mC@rs@name{#1}} %
+\def\mC@rs@caption{} % Beschriftung
+\def\mC@rs@label{} % Label
+\def\mC@rs@currentlabel{\mC@rs@label} %
+\def\mC@rs@align{center} %
+\def\mC@rs@right{right} %
+\def\mC@rs@center{center} %
+\def\mC@rs@left{left} %
+\def\setschemealign#1{% %
\ifx\@empty#1\@empty% %
\def\mC@rs@align{center}% %
\else% %
@@ -792,8 +725,8 @@
\newfloat{rxnfloat}{\mC@rs@currentplacement}{rxnscheme}
\floatname{rxnfloat}{\mC@rs@name} % Name ändern
% eigentliche Umgebung:
-\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>]
+\def\mC@rxnscheme{\@ifnextchar[{\mC@rxnscheme@ii}{\let\mC@rs@currentlabel\@empty\mC@rxnscheme@i}}
+\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%
@@ -822,7 +755,7 @@
\fi%
\mC@rxnscheme@i%
}
-\mC@def\mC@rxnscheme@i#1{%
+\def\mC@rxnscheme@i#1{%
\def\mC@rs@caption{#1}%
\rxnfloat%
\ifx\mC@rs@align\mC@rs@center \centering \fi%
@@ -832,8 +765,8 @@
\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{%
+\def\rxnscheme{\mC@rxnscheme}
+\def\endrxnscheme{%
\endtikzpicture%
\caption{\mC@rs@caption}%
\ifx\@empty\mC@rs@currentlabel\else%
@@ -845,21 +778,22 @@
% ------------------------------------------------------------------------------------- %
% einfache Reaktion ------------------------------------------------------------------- %
% ------------------------------------------------------------------------------------- %
-\mC@def\mC@reaction@scale{1.0}
-\mC@def\mC@reaction@align{center}
-\mC@def\setrxnalign#1{
+% \begin{rxn}[<align>,<scalefactor>]
+\def\mC@reaction@scale{1.0}
+\def\mC@reaction@align{center}
+\def\setrxnalign#1{
\ifx\@empty#1\@empty
\def\mC@reaction@align{center}
\else
\def\mC@reaction@align{#1}
\fi
}
-\mC@def\mC@reaction@right{right}
-\mC@def\mC@reaction@center{center}
-\mC@def\mC@reaction@left{left}
+\def\mC@reaction@right{right}
+\def\mC@reaction@center{center}
+\def\mC@reaction@left{left}
-\mC@def\mC@rxn{\@ifnextchar[{\mC@rxn@ii}{\mC@rxn@i}}
-\mC@def\mC@rxn@ii[#1]{%
+\def\mC@rxn{\@ifnextchar[{\mC@rxn@ii}{\mC@rxn@i}}
+\def\mC@rxn@ii[#1]{%
\let\mC@remainargs\@empty\mC@splitarg{#1}%
\ifx\@empty\mC@firstarg%
\let\mC@reaction@align\mC@reaction@center%
@@ -873,7 +807,7 @@
\fi%
\mC@rxn@i
}
-\mC@def\mC@rxn@i{%
+\def\mC@rxn@i{%
\hspace*{0pt}%
\ifx\mC@reaction@align\mC@reaction@center%
\center%
@@ -885,12 +819,12 @@
\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]%
+ \begin{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%
+\def\rxn{\mC@rxn}
+\def\endrxn{%
+ \end{tikzpicture}%
\ifx\mC@reaction@align\mC@reaction@center%
\endcenter%
\fi%
@@ -906,89 +840,174 @@
% REAKTANDEN -------------------------------------------------------------------------- %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Standardreaktand -------------------------------------------------------------------- %
-\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{
+% \reactant[<pos>,<name>,<tikz>]{<something>}
+\def\reactant{\@ifnextchar[{\reactant@ii}{\reactant@i}}
+\def\reactant@i#1{
+ \expandafter\node\expandafter[\mC@reactant@visible,on chain=going {at=(\tikzchainprevious.0)},anchor=180,shift=(0:\mC@rxn@node@distance)]{\scantokens{\relax#1}};
+}
+\def\reactant@ii[#1]#2{
\let\mC@remainargs\@empty\mC@splitarg{#1}
- \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
+ \ifx\@empty\mC@firstarg% erste Option: <pos>, zweite Option: <name>, dritte Option: <tikz>
+ \def\mC@angle{0}
+ \def\mC@anchor{180}
+ \let\mC@referred@node\@empty
+ \else
+ \expandafter\mC@analyze@angle\expandafter{\mC@firstarg}
+ \def\mC@anchor{180+\mC@angle}
+ \fi
+ \ifx\mC@referred@node\@empty\def\mC@referred@node{\tikzchainprevious}\fi
+ \expandafter\expandafter\expandafter\node\expandafter\expandafter\expandafter[\expandafter\mC@thirdarg\expandafter,\mC@reactant@visible,on chain=going {at=(\mC@referred@node.\mC@angle)},anchor=\mC@anchor,shift=(\mC@angle:\mC@rxn@node@distance)](\mC@secondarg){\scantokens{\relax#2}};
+}
+\let\reactand\reactant
% Mesomerie --------------------------------------------------------------------------- %
-\mC@def\mC@mesomeric{\@ifnextchar[{\mC@mesomeric@ii}{\mC@mesomeric@i}}
-\mC@def\mC@mesomeric@i#1{\def\mC@firstarg{on chain=going right}\let\mC@secondarg\@empty\let\mC@thirdarg\@empty\mC@mesomeric@iii{#1}}
-\mC@def\mC@mesomeric@ii[#1]#2{
+% \mesomeric[<pos>,<name>,<tikz>]{<something>}
+\def\mesomeric{\@ifnextchar[{\mesomeric@ii}{\mesomeric@i}}
+\def\mesomeric@i#1{
+ \node[on chain=going {at=(\tikzchainprevious.0),shift=($(0:\mC@rxn@node@distance)$)},anchor=180,shift=(0:\mC@rxn@node@distance),inner sep=1pt,left delimiter={[},right delimiter={]}]{\tikzpicture[start branch]\scantokens{\relax#1}\endtikzpicture};
+}
+\def\mesomeric@ii[#1]#2{
\let\mC@remainargs\@empty\mC@splitarg{#1}
- \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]\scantokens{\relax#1}\endtikzpicture};}% scantokens nötig, da sonst eine Dreifanchbindung ~ vor () mit falschem catcode interpretiert wird
-\mC@def\mesomeric{\mC@mesomeric}
+ \ifx\@empty\mC@firstarg% erste Option: <pos>, zweite Option: <name>, dritte Option: <tikz>
+ \def\mC@angle{0}
+ \def\mC@anchor{180}
+ \let\mC@referred@node\@empty
+ \else
+ \expandafter\mC@analyze@angle\expandafter{\mC@firstarg}
+ \def\mC@anchor{180+\mC@angle}
+ \fi
+ \ifx\mC@referred@node\@empty\def\mC@referred@node{\tikzchainprevious}\fi
+ \expandafter\node\expandafter[\mC@thirdarg,on chain=going {at=(\mC@referred@node.\mC@angle)},anchor=\mC@anchor,shift=(\mC@angle:\mC@rxn@node@distance),inner sep=1pt,left delimiter={[},right delimiter={]}](\mC@secondarg){\tikzpicture[start branch]\scantokens{\relax#2}\endtikzpicture};
+}
% 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]{}{}}
+% \marrow[<pos>]
+\def\marrow{\@ifnextchar[{\mC@marrow@ii}{\mC@marrow@i}}
+\def\mC@marrow@ii[#1]{\arrow[#1,<->,.5]{}{}}
+\def\mC@marrow@i{\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}
+% \anywhere{<pos>,<name>,<tikz>}{<something>}
+\def\anywhere#1#2{
+ \let\mC@remainargs\@empty\mC@splitarg{#1}% erste Option: <pos>, zweite Option: <name>, dritte Option: <tikz>
+ \ifx\mC@firstarg\@empty
+ \PackageError{mychemistry}{\string\anywhere: positioning missing}{See the myChemistry package documentation for explanation}
+ \else
+ \expandafter\mC@if@instr\expandafter{\mC@firstarg}{=}{
+ \edef\mC@anywhere@positioning{\mC@firstarg}
+ }{
+ \expandafter\mC@analyze@angle\expandafter{\mC@firstarg}
+ \def\mC@anchor{180+\mC@angle}
+ \ifx\mC@referred@node\@empty
+ \PackageError{mychemistry}{You can't use `angle' to position \string\anywhere. You need to use `name.angle'}{See the myChemistry package documentation for explanation}
+ \else
+ \def\mC@anywhere@positioning{at=(\mC@referred@node.\mC@angle),anchor=\mC@anchor}
+ \fi
+ }
+ \fi
+ \expandafter\expandafter\expandafter\node\expandafter\expandafter\expandafter[\expandafter\mC@thirdarg\expandafter,\mC@anywhere@positioning](\mC@secondarg){#2};
+}
% Dummy ------------------------------------------------------------------------------- %
-\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]{};}
+% \dummy[<name>]
+\def\dummy{\@ifnextchar[{\mC@dummy@i}{\mC@dummy@ii}}
+\def\mC@dummy@i[#1]{\draw node[on chain,xshift=-\mC@rxn@node@distance](#1){};}
+\def\mC@dummy@ii{\draw node[on chain,xshift=-\mC@rxn@node@distance]{};}
% Uebergangszustand ------------------------------------------------------------------- %
-\mC@def\mC@transition@name{x}
-\mC@def\mC@transition{\@ifnextchar[{\mC@transition@ii}{\mC@transition@i}}
-\mC@def\mC@transition@i#1{\def\mC@firstarg{on chain=going right}\let\mC@secondarg\mC@transition@name\let\mC@thirdarg\@empty\mC@transition@iii{#1}}
-\mC@def\mC@transition@ii[#1]#2{
+% \transition[<pos>,<name>,<tikz>]{<something>}
+\def\transition{\@ifnextchar[{\transition@ii}{\transition@i}}
+\def\transition@i#1{
+ \expandafter\node\expandafter[\mC@reactant@visible,on chain=going {at=(\tikzchainprevious.0)},anchor=180,shift=(0:\mC@rxn@node@distance),anchor=180,inner sep=3pt,left delimiter={[},right delimiter={]}](mC@transition@name){\scantokens{\relax#1}};
+ \node at ($(mC@transition@name.north east)+(.7em,0)$) {$\ddagger$};
+}
+\def\transition@ii[#1]#2{
\let\mC@remainargs\@empty\mC@splitarg{#1}
- \ifx\mC@firstarg\@empty\def\mC@transition@alignment{right}\else\let\mC@transition@alignment\mC@firstarg\fi
- \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){\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}
+ \ifx\@empty\mC@firstarg% erste Option: <pos>
+ \def\mC@angle{0}
+ \def\mC@anchor{180}
+ \let\mC@referred@node\@empty
+ \else
+ \expandafter\mC@analyze@angle\expandafter{\mC@firstarg}
+ \def\mC@anchor{180+\mC@angle}
+ \fi
+ \ifx\@empty\mC@secondarg% zweite Option: <name>, dritte Option: <tikz>
+ \def\mC@transition@name{mC@transition@name}
+ \else
+ \let\mC@transition@name\mC@secondarg
+ \fi
+ \ifx\mC@referred@node\@empty\def\mC@referred@node{\tikzchainprevious}\fi
+ \expandafter\expandafter\expandafter\node\expandafter\expandafter\expandafter[\mC@reactant@visible\expandafter,\mC@thirdarg,on chain=going {at=(\mC@referred@node.\mC@angle)},anchor=\mC@anchor,shift=(\mC@angle:\mC@rxn@node@distance),inner sep=3pt,left delimiter={[},right delimiter={]}](\mC@transition@name){\scantokens{\relax#2}};
+ \node at ($(\mC@transition@name.north east)+(.7em,0)$) {$\ddagger$};
+}
% 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]\scantokens{\relax#1}\endtikzpicture};}% scantokens nötig, da sonst eine Dreifanchbindung ~ vor () mit falschem catcode interpretiert wird
-\mC@def\branch{\mC@branch}
+% \branch[<pos>,<name>,<tikz>]{<formulae>}
+% <pos>: default: on chain=going "right" (0°)
+% on chain=going <somewhere>
+% <somewhere>=of <name>
+% <angle> (sitzt auf der Kette)
+% <name>.<angle> (sitzt nicht auf der Kette)
+\def\mC@branch{\@ifnextchar[{\mC@branch@ii}{\mC@branch@i}}
+\def\mC@branch@i#1{
+ \expandafter\def\expandafter\mC@branch@positioning\expandafter{\mC@branch@visible,on chain=going {at=(\tikzchainprevious.0)},anchor=180,shift=(0:\mC@rxn@node@distance)}
+ \let\mC@secondarg\@empty\let\mC@thirdarg\@empty
+ \mC@branch@iii{#1}}
+\def\mC@branch@ii[#1]#2{
+ \let\mC@remainargs\@empty\mC@splitarg{#1}% erste Option: <pos>, zweite Option: <name>, dritte Option: <tikz>
+ \ifx\mC@firstarg\@empty
+ \expandafter\def\expandafter\mC@branch@positioning\expandafter{\mC@branch@visible,on chain=going {at=(\tikzchainprevious.0)},anchor=180,shift=(0:\mC@rxn@node@distance)}
+ \else
+ \expandafter\mC@if@instr\expandafter{\mC@firstarg}{=}{
+ \edef\mC@branch@positioning{\mC@branch@visible,\mC@firstarg}
+ }{
+ \expandafter\mC@analyze@angle\expandafter{\mC@firstarg}
+ \def\mC@anchor{180+\mC@angle}
+ \ifx\mC@referred@node\@empty
+ \expandafter\def\expandafter\mC@branch@positioning\expandafter{\mC@branch@visible,on chain=going {at=(\tikzchainprevious.\mC@angle)},anchor=\mC@anchor,shift=(\mC@angle:\mC@rxn@node@distance)}
+ \else
+ \expandafter\def\expandafter\mC@branch@positioning\expandafter{\mC@branch@visible,at=(\mC@referred@node.\mC@angle),anchor=\mC@anchor,shift=(\mC@angle:\mC@rxn@node@distance)}
+ \fi
+ }
+ \fi
+ \mC@branch@iii{#2}}
+\def\mC@branch@iii#1{
+ \expandafter\expandafter\expandafter\node\expandafter\expandafter\expandafter[\expandafter\mC@branch@positioning\expandafter,\mC@thirdarg](\mC@secondarg){\tikzpicture[start branch]\scantokens{\relax#1}\endtikzpicture};}% scantokens nötig, da sonst eine Dreifachbindung ~ vor () mit falschem catcode interpretiert wird
+\def\branch{\mC@branch}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Sonstiges --------------------------------------------------------------------------- %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Elektronenverschiebungspfeile ------------------------------------------------------- %
-\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);}}
+\def\elmove{\@ifnextchar[{\mC@elmove@i}{\mC@elmove@ii}}
+\def\mC@elmove@i[#1]#2#3#4#5{\chemmove{\draw[#1](#2).. controls +(#3) and +(#5)..(#4);}}
+\def\mC@elmove@ii#1#2#3#4{\chemmove{\draw[->,red,shorten <=3pt,shorten >=1pt](#1).. controls +(#2) and +(#4)..(#3);}}
+
+% Plus -------------------------------------------------------------------------------- %
+\def\mC@chemand{\@ifnextchar[{\mC@chemand@ii}{\mC@chemand@i}}
+\def\mC@chemand@i{\reactant{\chemsign[0pt]{+}}}
+\def\mC@chemand@ii[#1]{\reactant[#1]{\chemsign[0pt]{+}}}
+\def\chemand{\mC@chemand}
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% Setup myChemistry ------------------------------------------------------------------- %
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Bindungslänge ----------------------------------------------------------------------- %
-\mC@def\mC@bondlength@default{1.8em}
-\mC@def\mC@bondlength{\setatomsep{\mC@bondlength@default}}
-\mC@def\setbondlength#1{
+\def\mC@bondlength@default{1.8em}
+\def\mC@bondlength{\setatomsep{\mC@bondlength@default}}
+\def\setbondlength#1{
\ifx\@empty#1\@empty
\def\mC@bondlength{\setatomsep{\mC@bondlength@default}}
\else
\def\mC@bondlength{\setatomsep{#1}}
\fi
}
-% \let\bondlength\setbondlength
% Keilbindungen ----------------------------------------------------------------------- %
-\mC@def\mC@bondshape@one{3pt}
-\mC@def\mC@bondshape@two{.5pt}
-\mC@def\mC@bondshape@three{1pt}
-\mC@def\setbondshape#1#2#3{
+\def\mC@bondshape@one{3pt}
+\def\mC@bondshape@two{.5pt}
+\def\mC@bondshape@three{1pt}
+\def\setbondshape#1#2#3{
\ifx\@empty#1\@empty
\renewcommand{\mC@bondshape@one}{3pt}
\else
@@ -1005,37 +1024,24 @@
\renewcommand{\mC@bondshape@three}{#3}
\fi
}
-% \let\bondshape\setbondshape
-\mC@def\mC@bondshape{\setcrambond{\mC@bondshape@one}{\mC@bondshape@two}{\mC@bondshape@three}}
+\def\mC@bondshape{\setcrambond{\mC@bondshape@one}{\mC@bondshape@two}{\mC@bondshape@three}}
% Atomgröße --------------------------------------------------------------------------- %
-\mC@def\mC@atomsize@default{\small}
-\mC@def\mC@atomsize{\mC@atomsize@default}
-\mC@def\setatomsize#1{
+\def\mC@atomsize@default{\small}
+\def\mC@atomsize{\mC@atomsize@default}
+\def\setatomsize#1{
\ifx\@empty#1\@empty
\renewcommand{\mC@atomsize}{\mC@atomsize@default}
\else
\renewcommand{\mC@atomsize}{#1}
\fi
}
-% \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}
-\mC@def\mC@chemand@ii[#1]{
- \let\mC@remainargs\@empty\mC@splitarg{#1}
- \ifx\mC@firstarg\@empty\def\mC@chemand@alignment{right}\else\let\mC@chemand@alignment\mC@firstarg\fi
- \def\mC@firstarg{on chain=going \mC@chemand@alignment}
- \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}[\mC@arrow@length@default]{%
+% allg. Setup ------------------------------------------------------------------------- %
+\def\mCsetup#1{\setkeys{setup}{#1}}
+\define@key{setup}{arrowlabel}[\mC@arrow@label@dist@def]{%
+ \setarrowlabel{#1}}
+\define@key{setup}{arrowlength}[\mC@arrow@length@def]{%
\setarrowlength{#1}}
\define@key{setup}{arrowline}[\mC@arrow@linethickness@default]{%
\setarrowline{#1}}
@@ -1043,6 +1049,9 @@
\setatomsize{#1}}
\define@key{setup}{bondlength}[\mC@bondlength@default]{%
\setbondlength{#1}}
+% \define@key{setup}{bondshape}[{\mC@bondshape@one,\mC@bondshape@two\mC@bondshape@three}]{%
+% \let\mC@remainargs\@empty\mC@splitarg{#1}%
+% \setbondshape{\mC@firstarg}{\mC@secondarg}{\mC@thirdarg}}
\define@key{setup}{rcndist}[\mC@rxn@node@distance@default]{%
\setrcndist{#1}}
\define@key{setup}{rxnalign}[center]{%
@@ -1055,6 +1064,7 @@
\define@key{setup}{mergelength}[\mC@merge@length@default]{
\setmergelength{#1}}
\define@key{setup}{reset}[]{%
+ \setarrowlabel{}
\setarrowlength{}
\setarrowline{}
\setmergelength{}
@@ -1069,58 +1079,21 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% NODES SICHTBAR/UNSICHTBAR MACHEN ---------------------------------------------------- %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\newcommand\makevisible{
- \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@value}
- \ifthenelse{\equal{\mC@arrow@argument@both}{true}}{
- \mC@largernode{##2}{##3}
- }{
- \setlength{\mC@arrow@argument@width}{0pt}
- \setlength{\mC@arrow@argument@height}{0pt}
- }
- \draw node[solid,on chain=going \mC@arrow@currentdirection](\mC@arrow@currentname) {\tikz{
- \mC@arrow@drawing
- }
- };
- \mC@arrow@argument@anchor
- \draw node[draw=green!60,solid,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[draw=blue!60,solid,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};
- \setlength{\mC@arrow@argument@aboveshift}{2pt}
- \setlength{\mC@arrow@argument@belowshift}{2pt}
- }
+\let\mC@reactant@visible\@empty
+\let\mC@arrow@uplabel@visible\@empty
+\let\mC@arrow@downlabel@visible\@empty
+\let\mC@branch@visible\@empty
+\def\makevisible{
+ \def\mC@reactant@visible{draw=red!60,solid}
+ \def\mC@arrow@uplabel@visible{draw=green!60,solid}
+ \def\mC@arrow@downlabel@visible{draw=blue!60,solid}
+ \def\mC@branch@visible{draw=cyan,solid}
}
-
-\newcommand\makeinvisible{
- \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@value}
- \ifthenelse{\equal{\mC@arrow@argument@both}{true}}{
- \mC@largernode{##2}{##3}
- }{
- \setlength{\mC@arrow@argument@width}{0pt}
- \setlength{\mC@arrow@argument@height}{0pt}
- }
- \draw node[on chain=going \mC@arrow@currentdirection](\mC@arrow@currentname) {\tikz{
- \mC@arrow@drawing
- }
- };
- \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};
- \setlength{\mC@arrow@argument@aboveshift}{2pt}
- \setlength{\mC@arrow@argument@belowshift}{2pt}
- }
+\def\makeinvisible{
+ \let\mC@reactant@visible\@empty
+ \let\mC@arrow@uplabel@visible\@empty
+ \let\mC@arrow@downlabel@visible\@empty
+ \let\mC@branch@visible\@empty
}
% ------------------------------------------------------------------------------------- %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%