diff options
author | Karl Berry <karl@freefriends.org> | 2011-03-22 23:33:58 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2011-03-22 23:33:58 +0000 |
commit | 33fd01046b3caf36764e935001a4b42fb974555c (patch) | |
tree | a0b830d3be69b933b61e9798e572f1e253ea4a7a /Master/texmf-dist/doc/latex | |
parent | 75cb2e1817d690a7047d0fc8e9506872b16d6fc2 (diff) |
mychemistry 1.2 (22mar11)
git-svn-id: svn://tug.org/texlive/trunk@21804 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/doc/latex')
-rw-r--r-- | Master/texmf-dist/doc/latex/mychemistry/README | 39 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/mychemistry/mychemistry_de.pdf | bin | 0 -> 846923 bytes | |||
-rw-r--r-- | Master/texmf-dist/doc/latex/mychemistry/mychemistry_de.tex | 1961 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/mychemistry/mychemistry_en.pdf | bin | 0 -> 826361 bytes | |||
-rw-r--r-- | Master/texmf-dist/doc/latex/mychemistry/mychemistry_en.tex | 1966 |
5 files changed, 3966 insertions, 0 deletions
diff --git a/Master/texmf-dist/doc/latex/mychemistry/README b/Master/texmf-dist/doc/latex/mychemistry/README new file mode 100644 index 00000000000..09c2e36b52c --- /dev/null +++ b/Master/texmf-dist/doc/latex/mychemistry/README @@ -0,0 +1,39 @@ +-------------------------------------------------------------------------- +the myChemistry package +Creating reaction schemes with LaTeX and ChemFig +2011/03/20 +-------------------------------------------------------------------------- +Clemens Niederberger +Web: http://www.niederberger-berlin.net/2011/02/latex-mychemistry/ +E-Mail: kontakt@niederberger-berlin.net +-------------------------------------------------------------------------- +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 and +mychemistry_en.tex +-------------------------------------------------------------------------- +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 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/2011. +With older will work, but you can't use the arrow option `both'. +-------------------------------------------------------------------------- +If you have any ideas, questions, suggestions or bugs to report, please +feel free to contact me. +--------------------------------------------------------------------------
\ 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 Binary files differnew file mode 100644 index 00000000000..ce423e0999e --- /dev/null +++ b/Master/texmf-dist/doc/latex/mychemistry/mychemistry_de.pdf diff --git a/Master/texmf-dist/doc/latex/mychemistry/mychemistry_de.tex b/Master/texmf-dist/doc/latex/mychemistry/mychemistry_de.tex new file mode 100644 index 00000000000..33ce8f88f19 --- /dev/null +++ b/Master/texmf-dist/doc/latex/mychemistry/mychemistry_de.tex @@ -0,0 +1,1961 @@ +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% ------------------------------------------------------------------------------------- % +% - myChemistry - mychemistry_de.tex -------------------------------------------------- % +% - Creating reaction schemes with LaTeX and ChemFig ---------------------------------- % +% ------------------------------------------------------------------------------------- % +% - Clemens Niederberger -------------------------------------------------------------- % +% - 2011/03/20 ------------------------------------------------------------------------ % +% ------------------------------------------------------------------------------------- % +% - 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 and - % +% - mychemistry_en.tex - % +% ------------------------------------------------------------------------------------- % +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\documentclass[DIV10,titlepage]{scrartcl} +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% - Pakete ---------------------------------------------------------------------------- % +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\usepackage{scrhack} % verbessert KOMAs Zusammenspiel mit floats +\usepackage[ngerman]{babel} % Sprache +\usepackage{emerald} % chemfig-Schrift +\usepackage[utf8x]{inputenc} % Zeichenkodierung: Eingabe +\usepackage[T1]{fontenc} % Text-Ausgabe-Codierung +\usepackage{textcomp,mathcomp} +\usepackage{xspace,paralist} % xspace und Listen +\usepackage[Gray]{SIunits} % Einheiten + \addunit{\emlength}{em} + \addunit{\pt}{pt} +\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}{Ab\-schnitt #1} + \labelformat{subsection}{Ab\-schnitt #1} + \labelformat{subsubsection}{Ab\-schnitt #1} +\usepackage[dvipsnames]{xcolor} % Farbe + \colorlet{code}{RawSienna} + \xdefinecolor{DarkRed}{rgb}{0.4392,0.0627,0.0627} +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% - Anzeige des Inhaltsverzeichnisses ------------------------------------------------- % +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\usepackage{titletoc} +\titlecontents{section} [6.5pc] % SECTION-ANZEIGE + {\renewcommand\familydefault{ppl}\addvspace{2pc}\bfseries + \color{DarkRed}\titlerule[2pt]\filright\normalcolor\nobreak} % davor + {\contentslabel + [\textsc{Abschnitt}\ + \thecontentslabel]{6.5pc}} % nummerierter Eintrag + {\hspace{-6.5pc}\scshape\thecontentslabel} % unnummerierter Eintrag + {\hfill\contentspage} + [\addvspace{3pt}\renewcommand\familydefault{ppl}] % danach +%% +\newcommand{\xquad}{\hspace{1em plus.4em minus.4em}} +\titlecontents*{subsubsection}[6pc] % SUBSUBSECTION-ANZEIGE + {\footnotesize\itshape} + {} + {} + {,~\thecontentspage} + [\xquad\textbullet\xquad] + {} +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% - Hyperlinks ------------------------------------------------------------------------ % +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\usepackage{hyperref} + \hypersetup{colorlinks=true, % Setup der Hyperlinks und des pdf + linkcolor=black, + urlcolor=blue!70, + citecolor=black, + plainpages=false, + bookmarksopen=true, + bookmarksopenlevel=2, + bookmarksnumbered=true, + pdfstartview=FitH, + pdfauthor={Clemens Niederberger}, + pdftitle={myChemistry}, + pdfsubject={Creating reactionschemes with LaTeX}, + pdfkeywords={myChemistry}, + pdfcreator={LaTeX} + } +\usepackage[color=dunkelrot]{mychemistry} % myChemistry + \renewcommand\thebeispiel{\arabic{beispiel}} % chemexec angepasst + \labelformat{beispiel}{Bei\-spiel #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\footnotesize}, % 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{blue}]{!!}{!!}, % Hervorhebung + commentstyle={\color[named]{Gray}}, + emph={begin,end}, % Umgebungen hervorheben + emphstyle=\color{red}, + keywordstyle=\color{code}, + morekeywords={arrow,arrowlength,atomsize,bondlength,bondshape,branch,chemfig,chemmove,chemname,chemsign,ce,compound,draw,dummy,elmove,floatplacement,floatstyle,lewis,listof,makeinvisible,makevisible,marrow,merge,mesomeric,node,reactand,restylefloat,setatomsep,setcrambond,setrcndist,setrxnalign,setschemealign,setschemename,transition}, + fancyvrb=true + } + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% - Kopf- und Fußzeile ---------------------------------------------------------------- % +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\usepackage{scrpage2} +\pagestyle{scrheadings} +\setheadwidth{textwithmarginpar} +\automark{section} +\ihead{\mC \mCversion} +\ifoot{\small\color{gray}-~Seite~\thepage~-} +\cfoot{} +\ofoot{} + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% - Komascript ------------------------------------------------------------------------ % +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\setkomafont{disposition}{\rmfamily\bfseries} % Gewicht fett und Schriftart roman + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% - neue Befehle ---------------------------------------------------------------------- % +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% - Beispiele ------------------------------------------------------------------------- % +% - auf Basis der Beispiele in der fancyvrb-Dokumentation ----------------------------- % +\makeatletter +\newcommand{\BeginExample}{% + \VerbatimEnvironment + \begin{VerbatimOut}[gobble=1]{\jobname.tmp}} + + \newcommand{\BelowExample}[1]{% + \VerbatimInput[numbersep=3pt,fontsize=\footnotesize, + numbers=left,xleftmargin=5mm,xrightmargin=0pt]{\jobname.tmp} +#1} +% - Code, Ergebnis rechts ------------------------------------------------------------- % +\newcommand{\SideBySide@Example}[1]{% +\setlength{\parindent}{0pt}% +\begin{minipage}[c]{.48\textwidth} + \VerbatimInput[numbersep=3pt,fontsize=\footnotesize, + numbers=left,xleftmargin=5mm,xrightmargin=0pt]{\jobname.tmp} +\end{minipage}% +\hspace*{2mm} +\begin{minipage}[c]{.48\textwidth} + #1 +\end{minipage} +} + +\def\SideBySideExample{% + \catcode`\^^M=\active + \@ifnextchar[{\catcode`\^^M=5\beispiel\vspace*{1mm}\SideBySideExample@}% + {\catcode`\^^M=5\beispiel\vspace*{1mm}\SideBySideExample@@}} +\def\SideBySideExample@[#1]{#1\SideBySideExample@@} +\def\SideBySideExample@@{\BeginExample} +\def\endSideBySideExample{% + \end{VerbatimOut}% + \SideBySide@Example{\input{\jobname.tmp}}\vspace*{1mm}\endbeispiel} +% - Code, Ergebnis danach ------------------------------------------------------------- % +\newcommand{\@Example}[1]{% +\setlength{\parindent}{0pt}% +\begin{minipage}{\textwidth} + \VerbatimInput[numbersep=3pt,fontsize=\footnotesize, + numbers=left,xleftmargin=5mm,xrightmargin=0pt]{\jobname.tmp} +\end{minipage}% + +\smallskip +\begin{minipage}{\textwidth} + #1 +\end{minipage} +} + +\def\Example{% + \catcode`\^^M=\active + \@ifnextchar[{\catcode`\^^M=5\beispiel\vspace*{1mm}\Example@}% + {\catcode`\^^M=5\beispiel\vspace*{1mm}\Example@@}} +\def\Example@[#1]{#1\Example@@} +\def\Example@@{\BeginExample} +\def\endExample{% + \end{VerbatimOut}% + \@Example{\input{\jobname.tmp}}\vspace*{1mm}\endbeispiel} +\makeatother + +% - weitere Makros -------------------------------------------------------------------- % +\newcommand{\mC}{{\color{DarkRed}\sffamily myChemistry}\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} +\newcommand\NEU[1][0pt]{\leavevmode\llap{\footnotesize\ECFTeenSpirit\color{red}Neu\kern\dimexpr20pt+#1\relax}} +\newlength{\tmplength} +% - für Beispiele --------------------------------------------------------------------- % +\newcommand{\oben}{\tikz\node[draw,minimum width=3em,minimum height=1.5em,blue]{\footnotesize oben};} +\newcommand{\unten}{\tikz\node[draw,minimum width=3em,minimum height=1.5em,red]{\footnotesize unten};} +\newcommand{\substanz}{\tikz\node[draw,minimum width=5em,minimum height=3em]{};} + +\begin{document} +\begin{titlepage} + % inspired by the titlepage of chemfig's documentation + \begin{tikzpicture}[remember picture,overlay] + \shade [color=dunkelrot,right color=white](current page.south west) rectangle ([yshift=3cm,xshift=-3cm]current page.center); + \shade[top color=black,bottom color=dunkelrot]([yshift=7cm]current page.east)rectangle([yshift=2.5cm]current page.west); + \node[text width=\textwidth,opacity=.15,yshift=-5.3cm] at (current page.center) {% +\begin{verbatim} + \begin{rxn}[scale=.7] + \setatomsep{1.5em}\footnotesize + \reactand{ + \chemfig{C(-[4]*6(=-=-=-))(-[2]*6(=-=-=-))(-[6,,,2]HO)-C(-[2]CH_3) + (-[6]OH)-CH_3} + }{a} + \branch[below right=of a]{ + \arrow[direction=above right,length=.7]{}{} + \reactand[above right]{ + \chemfig{C(-[4]*6(=-=-=-))(-[2]*6(=-=-=-))(-[@{e1}6,,,2]H_2@{e2} + \chembelow{O}{\oplus})-C(-[2]CH_3)(-[6]OH)-CH_3}\elmove{e1} + {10:4mm}{e2}{-10:4mm} + }{} + \arrow{$-\ce{H2O}$}{} + \reactand{ + \chemfig{\chembelow{C}{\oplus}(-[4]*6(=-=-=-))(-[2]*6(=-=-=-))-C + (-[2]CH_3)(-[6]OH)-CH_3} + }{} + }{} + \branch[below right=of a]{ + \arrow[type={-|>},direction=below right,length=.7]{}{} + \reactand[below right]{ + \chemfig{C(-[4]*6(=-=-=-))(-[2]*6(=-=-=-))(-[6,,,2]HO)-C(-[2]CH_3) + (-[@{e3}6]@{e4}\chembelow{O}{\oplus}H_2)-CH_3}\elmove{e3} + {170:4mm}{e4}{-170:4mm} + }{} + \arrow{$-\ce{H2O}$}{} + \reactand{ + \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\mCversion\par\bigskip + \footnotesize\mCdate{de}\par + \normalsize Clemens Niederberger\par\vskip1.5cm + \color{white}\huge Reaktionsschemata mit \LaTeX\ und \CF erstellen% + \end{center} + \vskip4cm + \begin{rxn}[scale=.7] + \setatomsep{1.5em}\footnotesize + \reactand{ \chemfig{C(-[4]*6(=-=-=-))(-[2]*6(=-=-=-))(-[6,,,2]HO)-C(-[2]CH_3)(-[6]OH)-CH_3} }{a} + \branch[above right=of a]{ + \arrow[direction=above right,length=.7]{}{} + \reactand[above right]{ \chemfig{C(-[4]*6(=-=-=-))(-[2]*6(=-=-=-))(-[@{e1}6,,,2]H_2@{e2}\chembelow{O}{\oplus})-C(-[2]CH_3)(-[6]OH)-CH_3}\elmove{e1}{10:4mm}{e2}{-10:4mm} }{} + \arrow{$-\ce{H2O}$}{} + \reactand{ \chemfig{\chembelow{C}{\oplus}(-[4]*6(=-=-=-))(-[2]*6(=-=-=-))-C(-[2]CH_3)(-[6]OH)-CH_3} }{} + }{} + \branch[below right=of a]{ + \arrow[type={-|>},direction=below right,length=.7]{}{} + \reactand[below right]{ \chemfig{C(-[4]*6(=-=-=-))(-[2]*6(=-=-=-))(-[6,,,2]HO)-C(-[2]CH_3)(-[@{e3}6]@{e4}\chembelow{O}{\oplus}H_2)-CH_3}\elmove{e3}{170:4mm}{e4}{-170:4mm} }{} + \arrow{$-\ce{H2O}$}{} + \reactand{ \chemfig{C(-[4]*6(=-=-=-))(-[2]*6(=-=-=-))(-[6,,,2]HO)-\chembelow{C}{\oplus}(-[2]CH_3)-CH_3} }{} + }{} + \end{rxn} +\end{titlepage} + +\tableofcontents + +\section{Über} +\subsection{Was ist neu?} +Neben einigen Bugfixes gibt es in Version \mCversion\ ein paar Neuerungen. Insbesondere wurde das fehlerhafte Verhalten bei der Ausrichtung von Branches sowie das seltsame Verhalten von Pfeilbeschriftungen, wenn man die Pfeillänge änderte, korrigiert. \textbf{Diese Veränderung hat zur Folge, das \mC nun \TikZ oder vielmehr pgf in der Version 2.10 benötigt} (siehe \ref{ssec:voraussetzungen}). + +Während sich diese Neuerungen im Hintergrund abspielen, gibt es auch ein paar Neuerungen für die Bedienung. Das wurde in der Dokumentation jeweils mit {\ECFTeenSpirit\color{red}Neu} gekennzeichnet. Zum Beispiel gibt es nun einige Paketoptionen, um die automatisch eingebundenen Pakete besser zu handhaben (\ref{ssec:paketoptionen}). Außerdem haben die Pfeile zwei neue Keys bekommen (siehe \ref{ssec:arrow}). + +Auch die Umgebungen haben nun ein paar Möglichkeiten mehr, den persönlichen Vortellungen angepasst zu werden (siehe \ref{sssec:rxn_optionen}, \ref{sssec:rxnscheme_optionen} und \ref{ssec:setrcndist}). + +Nicht zuletzt steht \mC ab \mCversion\ nun unter der LPPL Version 1.3 oder später. + +\subsection{Lizenz} +\mC \mCversion\ steht unter der LaTeX Project Public License Version 1.3 oder später.\newline(\url{http://www.latex-project.org/lppl.txt}) + +\subsection{Voraussetzungen}\label{ssec:voraussetzungen} +Damit \mC funktionieren kann, müssen ein paar Pakete installiert sein: +\begin{description} + \item[\CF] ohne das ergibt die ganze Sache gar keinen Sinn; + \item[ifthen] für interne Abfragen; + \item[calc] für interne Berechnungen; + \item[xkeyval] Paketoptionen und Befehl-Keys werden damit erstellt; + \item[float] damit wird die \verb=rxnscheme=-Umgebung definiert; + \item[pgf/\TikZ] pgf ist nicht nur ein Paket sondern eine ganze Reihe von Paketen. Sie stellen die gesamte Basis für \TikZ da. Damit \mC funktionieren kann, muss mindestens die Version vom 08.09.2010\footnote{\url{http://sourceforge.net/projects/pgf/files/}} installiert sein.\\ + Genauer: der Befehl \verb=\pgfpositionnodelater= muss verfügbar sein. +\end{description} + +\subsection{Die Idee} +Seit August 2010 steht mit \CF eine wirklich flexible Lösung für organische Strukturformeln zur Verfügung. So kann man nun durch das Einbinden von \CF und `mhchem' mehr oder weniger alle Struktur- und Summenformeln, die man als Chemiker so benötigt, mit \LaTeX\ setzen. Was \CF gegenüber `ochem' noch benachteiligt, ist das Erstellen richtiger Reaktionsmechanismen. Hier soll \mC Abhilfe schaffen. + +\mC bindet die Pakete +\begin{itemize} + \item \CF\footnote{von Christian Tellechea, \url{http://www.ctan.org/tex-archive/macros/latex/contrib/chemfig/}}, + \item wenn vorhanden `mhchem'\footnote{von Martin Hensel, \url{http://www.ctan.org/tex-archive/macros/latex/contrib/mhchem/}} in der Version 3, + \item wenn vorhanden `chemexec'\footnote{von mir, \url{http://www.niederberger-berlin.net/downloads/?did=1}} und + \item wenn vorhanden `chemcompounds'\footnote{von Stephan Schenk, \url{http://www.ctan.org/tex-archive/macros/latex/contrib/chemcompounds/}} ein. +\end{itemize} +Zur Funktion der Befehle der oben genannten Pakete siehe deren Dokumentation. Wenn Sie die Pakete separat laden wollen, weil Sie ihnen Optionen mitgeben wollen, dann sollten Sie das machen, \emph{bevor} Sie \mC laden, um Konflikte zu vermeiden. \mC prüft intern einerseits darauf, ob die Pakete installiert sind und falls ja, ob sie bereits geladen sind. Wenn nicht, werden sie von \mC aufgerufen. + +Befehle, die durch die eingebundenen Pakete zur Verfügung stehen, sind unter anderem +\begin{itemize} + \item \verb=\ce{}= (mhchem) + \item \verb=\ox{}{}=, \verb=\om[]=, \verb=\op[]=, \verb=\Hyd=, \verb=\Hpl= (chemexec) + \item \verb=\chemfig[][]{}=, \verb=\chemrel[]{}=, \verb=\chemsign[]{}=, \verb=\lewis{}= (\CF) + \item \verb=\declarecompound[]{}=, \verb=\compound{}= (chemcompounds). +\end{itemize} +In den Beispielen in diesem Manual wurden Befehle dieser Pakete verwendet \emph{ohne sie speziell als solche zu kennzeichnen}.\\ +Vor allem stellt \mC Befehle zum Erstellen von Reaktionsschemata zur Verfügung. + +\section{Verwendung} +\subsection{Hintergrund} +\mC stellt zwei Umgebungen zur Verfügung, innerhalb derer die Reaktionsmechanismen erstellt werden. Beide Umgebungen sind letztlich eine `tikzpicture'-Umgebung. Die Frage, die sich aufdrängt, ist natürlich: wozu? \CF bringt doch schon einiges an Möglichkeiten mit. Und mit \TikZ hat man wirklich alle Möglichkeiten offen. Zugegeben. Allerdings bin ich faul, also habe einige häufig verwendete \TikZ-Befehle zu Makros zusammengefasst. Die sind immer mehr geworden und haben immer mehr Feinheiten erhalten, so dass dieses Paket dabei herausgekommen ist. Selbstverständlich bleibt man mit \TikZ flexibler, aber die Möglichkeit bleibt einem ja immer offen. + +\subsection{Das Grundprinzip} +In dem `tikzpicture', das in den \mC-Umgebungen erstellt wird, werden Reaktanden und Reaktionspfeile mit einzelnen `nodes'\footnote{In einem tikzpicture kann man nahezu beliebig sogenannte `nodes' setzen, mit allen möglichen Formen und Inhalten. Das sind "`Knotenpunkte"' an bestimmten Koordinaten in einer `tikzpicture'-Umgebung.} auf einer `chain'\footnote{Dafür ist die tikzlibrary `chains' nötig.} angeordnet. +\begin{SideBySideExample} + \begin{tikzpicture}[start chain] + \node [on chain] {A}; + \node [on chain] {B}; + \node [on chain] {C}; + \end{tikzpicture} +\end{SideBySideExample} +Dadurch ergeben sich einige Möglichkeiten, die `nodes' relativ zueinander zu platzieren. +\begin{SideBySideExample} + \begin{tikzpicture}[start chain=going right,node distance=5mm] + \node [draw,on chain] {Hello}; + \node [draw,on chain] {World}; + \node [draw,continue chain=going below,on chain] {,}; + \node [draw,on chain] {this}; + \node [draw,on chain] {is}; + \end{tikzpicture} +\end{SideBySideExample} +\mC macht vor allem von der Möglichkeit Gebrauch, `branches' zu erstellen. +\begin{SideBySideExample} + \begin{tikzpicture}[start chain=going right,node distance=5mm] + \node [draw,on chain] {A}; + \node [draw,on chain] {B}; + { [start branch] + \node [on chain=going below] {1}; + \node [on chain=going below] {2}; + } + { [start branch] + \node [on chain=going above] {$\alpha$}; + \node [on chain=going above] {$\beta$}; + } + \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. + +\subsection{Wie funktioniert's?} +\subsubsection{Basisbefehle} +Sehen wir uns zunächst ein Beispiel an: +\begin{SideBySideExample} + \begin{rxn} + \reactand{ \chemfig{-[::30]-[::-60]OH} }{} + \arrow{Ox.}{} + \reactand{ \chemfig{-[::30]=_[::-60]O} }{} + \end{rxn} +\end{SideBySideExample} +Sie sehen hier die wichtigsten Befehle von \mC im Einsatz: +\begin{description} + \vitem=\begin{rxn}[<keys>]= Die erste von zwei Umgebungen. Sie stellt die Reaktionschemata zwischen den Text und zentriert sie (siehe \ref{ssec:rxn}). + \vitem=\reactand[<ausrichtung>]{<formeln>}{<anker>}= setzt eine `node' auf die `chain', in die die chemischen Formeln geschrieben werden. Die Standard-Ausrichtung ist nach \verb=right= (siehe \ref{ssec:reactand}). + \vitem=\arrow[<keys>]{<oben>}{<unten>}= schreibt in der Standardeinstellung einen \unit{5}\emlength\ langen einfachen Pfeil nach rechts (siehe \ref{ssec:arrow}). +\end{description} +\begin{SideBySideExample} + \begin{rxn} + \reactand{ \chemfig{-[::30]=_[::-60]O} }{} + \arrow[direction=below]{}{Ox.} + \reactand[below]{ \chemfig{-[::30](-[::60]OH)=_[::-60]O} }{} + \end{rxn} +\end{SideBySideExample} +Wie Sie sehen, lässt sich das Reaktionschema durch optionale Argumente anders ausrichten. Durch die Angabe \verb=below= wird die Carbonsäure unter den Pfeil gesetzt und nicht rechts daneben. Durch die Key-Angabe \verb+direction=below+ zeigt der Pfeil nach unten anstatt nach rechts. + +\subsubsection{Verzweigungen} +Bislang ist noch nicht recht einsichtig, wieso man \mC einsetzen sollte. Die waagerechten Reaktionen sind mit `mhchem' und \CF selbst zu verwirklichen. Und weshalb sollte man eine senkrechte Reaktion benötigen? Was den Einsatz von \mC aber interessant machen könnte, ist die Möglichkeit, verzweigte Reaktionsschemata zu erstellen. +\begin{Example} + \begin{rxn} + \reactand{ \chemfig{-[::30]-[::-60]OH} }{} + \arrow{}{} + \reactand{ \chemfig{-[::30]=_[::-60]O} }{carbonyl} + \arrow[direction=below]{}{} + \reactand[below]{ \chemfig{-[::30](-[::60]OH)=_[::-60]O} }{} + \branch[right=of carbonyl]{ + \arrow[type={<=>}]{\ce{NH2R}}{} + \reactand{ \chemfig{-[::30]=_[::-60]N(-[6]H)-[::60]R} }{} + }{} + \end{rxn} +\end{Example} +Im letzten Beispiel haben Sie einen weiteren wichtigen Befehl kennengelernt: +\begin{description} + \vitem=\branch[<ausrichtung>]{<zweig>}{<anker>}=\ +\end{description} +Der Zweig wurde mit \verb+right=of carbonyl+ rechts neben den ersten Reaktanden mit dem Anker \verb=carbonyl= angesetzt. Innerhalb des Zweigs wurde beim Pfeil der Key \verb+type={<=>}+ verwendet, wodurch der Gleichgewichtspfeil dargestellt wurde. Andere \verb=type=-Mög\-lich\-kei\-ten wären \verb=->= (Voreinstellung), \verb=<-= oder \verb=<->=. + +Durch mehrfaches Verwenden von \verb=\branch= können so umfangreichere Reaktionschemata entstehen: +\begin{Example} + \begin{rxn} + \reactand{ \chemfig{-[::30]-[::-60]OH} }{} + \arrow{}{} + \reactand{ \chemfig{-[::30]=_[::-60]O} }{carbonyl} + \arrow[direction=below]{}{} + \reactand[below]{ \chemfig{-[::30](-[::60]OH)=_[::-60]O} }{} + \branch[right=of carbonyl]{ + \arrow[type={<=>}]{\ce{NH2R}}{} + \reactand{ \chemfig{-[::30]=_[::-60]N(-[6]H)-[::60]R} }{} + }{imin} + \branch[below right=of carbonyl]{ + \arrow[type={<=>},direction=below right]{ \chemfig{[,.75]-[::30]-[::-60]OH} }{} + \reactand[below right]{ \chemfig{-[::30](-[::60]O-[::-60]-[::-60])-[::-60]OH} }{} + }{halbacetal} + \branch[above=of carbonyl,xshift=5.75em]{ + \arrow[direction=above]{ \chemfig{[,.75]-[::30]=_[::-60]O}/\Hpl }{} + \reactand[above]{ \chemfig{-[::30](-[::60]OH)-[::-60]-[::60]=[::60]O} }{} + \arrow{$-\ce{H2O}$}{} + \reactand{ \chemfig{-[::30]=[::-60]-[::60]=[::60]O} }{} + }{aldol} + \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. +\begin{Example} + \begin{rxnscheme}{Keto-Enol-Tautomerie} + \reactand{ \chemfig{=[::30]-[::-60]OH} }{} + \arrow[type={<=>}]{}{} + \reactand{ \chemfig{-[::30]=[::-60]O} }{} + \end{rxnscheme} +\end{Example} +Hier kommt die Umgebung +\begin{Verbatim} + \begin{rxnscheme}[<keys>]{<caption>} + ... + \end{rxnscheme} +\end{Verbatim} +zum Einsatz. Wie Sie die Ihren Vorstellungen gemäß anpassen können, lesen Sie in der Befehlsreferenz (\ref{ssec:rxnscheme}). + +\subsection{Voreinstellungen} +Es gibt einige Voreinstellungen, die zum Teil meinem persönlichen Geschmack geschuldet sind, die Sie aber nach Bedarf ändern können. So gelten für die \CF-Formeln \emph{innerhalb der \mC-Umgebungen} folgende Voreinstellungen: +\begin{Verbatim} + \setatomsep{1.8em} + \setcrambond{3pt}{0.5pt}{1pt} +\end{Verbatim} +Außerhalb der Umgebungen gelten weiterhin die Voreinstellungen von \CF. +\begin{SideBySideExample} + \begin{rxn} + \reactand{\chemfig{**6(------)}}{} + \end{rxn} + \chemfig{**6(------)} +\end{SideBySideExample} +Sie können die Voreinstellungen von \mC über folgende Befehle ändern: +\begin{Verbatim} + \bondlength{<länge>} + \bondshape{<basislänge>}{<strichdicke>}{<strichabstand>} + \atomsize{<schriftgröße>} +\end{Verbatim} +Damit werden die Einstellungen nachfolgend \emph{für alle weiteren} \mC-Umgebungen geändert. Lassen Sie die Argumente leer, werden die Voreinstellungen wiederhergestellt. \verb=\atomsize= hat die Voreinstellung \verb=\small=. +\begin{SideBySideExample} + \bondlength{2.1em}\bondshape{5pt}{1pt}{2pt}\atomsize{\Large} + \begin{rxn} + \reactand{\chemfig{-[::30](<[::60])-[::-60](<:[::-60])-[::60]}}{} + \end{rxn} + \bondlength{}\bondshape{}{}{}\atomsize{} + \begin{rxn} + \reactand{\chemfig{-[::30](<[::60])-[::-60](<:[::-60])-[::60]}}{} + \end{rxn} +\end{SideBySideExample} +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{SideBySideExample} + \begin{rxn} + \setatomsep{2.1em}\setcrambond{5pt}{1pt}{2pt}\Large + \reactand{\chemfig{-[::30](<[::60])-[::-60](<:[::-60])-[::60]}}{} + \end{rxn} + \begin{rxn} + \reactand{\chemfig{-[::30](<[::60])-[::-60](<:[::-60])-[::60]}}{} + \end{rxn} +\end{SideBySideExample} +Reaktionspfeile haben als Standardwert die Länge \unit{5}\emlength\ oder $\unit{5\sqrt{2}}\emlength$ im Fall der schrägen Pfeile. Die Voreinstellung lässt sich mit +\begin{Verbatim} + \arrowlength{<länge>} +\end{Verbatim} +\SaveVerb{arrowlength}=<länge>=% +auf \UseVerb{arrowlength} bzw. $\text{\UseVerb{arrowlength}}\cdot\sqrt{2}$ ändern. + +\subsection{Paket-Optionen}\label{ssec:paketoptionen} +\mC verfügt über einige Paket-Optionen. +\begin{description} + \vitem+english+ Wird diese Option aufgerufen, dann lädt \mC `chemexec' in der englischen Version, falls das Paket nicht vorher aufgerufen wurde. Außerdem wird der Name der \verb=rxnscheme=-Umgebung (siehe \ref{ssec:rxnscheme}) in "`Reaction scheme"' geändert. + \vitem+placement=<position>+ Durch den Aufruf dieser Option kann das Standard-Platzie\-rungs\-ver\-hal\-ten der \verb=rxnscheme=-Umgebung (siehe \ref{ssec:rxnscheme}) in \verb=<position>= geändert werden. + \vitem+color=<farbe>+ Mit dieser Option wird die entsprechende Farbe an `chemexec' weitergereicht und dessen Option \verb+shade=true+ aufgerufen. + \vitem+nocolor+ Mit dieser Option wird `chemexec' ohne Farbe und mit der Option \verb+shade=false+ geladen (Default-Verhalten von \mC). + \vitem+shade+ Mit dieser Option wird `chemexec' mit der Option \verb+shade=true+ geladen. + \vitem+nochemexec+ Durch diese Option können Sie verhindern, dass \mC `chemexec' lädt. + \vitem+nocompounds+\settowidth{\tmplength}{\tt nocompounds}\NEU[\tmplength]Durch diese Option können Sie verhindern, dass \mC `chemcompounds' lädt. + \vitem+nomhchem+\settowidth{\tmplength}{\tt nomhchem}\NEU[\tmplength]Durch diese Option können Sie verhindern, dass \mC `mhchem' lädt, vorausgesetzt, dass `chemexec' auch nicht geladen wird. + \vitem+chemstyle+\settowidth{\tmplength}{\tt chemstyle}\NEU[\tmplength]Mit dieser Option kann `chemstyle' automatisch geladen werden, ohne dass Konflikte mit \mC enstehen. + \vitem+nopackages+\settowidth{\tmplength}{\tt nopackages}\NEU[\tmplength]Durch diese Option werden (außer \CF) gar keine Pakete geladen\footnote{Außer denen, die \mC benötigt, um zu funktionieren (\TikZ etc.).}. +\end{description} + +\section{Fortgeschrittene Anwendung, Verwendung von \TikZ} +Die meisten der Befehle ermöglichen nach der Ausrichtungsangabe die Angabe weiteren \TikZ-Codes. Dadurch lassen sich viele Feinjustierungen vornehmen. Wenn Sie Sich mit \TikZ einigermaßen auskennen, können Sie sowieso noch weitaus mehr realisieren, als durch \CF und \mC vorgegeben (siehe \ref{ssec:tikzsynthese}). +\begin{SideBySideExample} + \begin{rxn} + \reactand[right,->,green!45!blue!55]{ \chemfig{*6(---(-)---)} }{} + \end{rxn} + \chemfig[->,green!45!blue!55]{*6(---(-)---)} +\end{SideBySideExample} +Das Beispiel ist natürlich kein gutes, da mit \CF dasselbe Ergebnis erzielt werden kann. Vielfache andere Anwendungen sind aber denkbar: +\begin{Example} + \newcommand{\leer}{\reactand[right,minimum width=5em]{ \rule[-1em]{1em}{.5pt}\;\rule[-1em]{3em}{.5pt} }{}} + \newcommand{\stoich}{\rule[-3pt]{1em}{.5pt}} + \begin{rxn} + \reactand{\bf\Large Salzbildung}{} + \reactand[below,yshift=1em]{F\"ulle die L\"ucken}{a} + \branch[below=of a]{ \reactand[right,minimum width=5em]{ \stoich\ Na }{}\reactand{$+$}{} \leer \arrow{}{} \leer \reactand{$+$}{} \leer }{b} + \branch[below=of b,draw,inner sep=3pt]{\reactand[right,minimum width=5em]{}{}\reactand{$+$}{}\reactand[right,minimum width=5em]{}{}\arrow{}{}\reactand[right,minimum width=5em]{Natriumchlorid $+$ Wasserstoff}{}}{} + \end{rxn} +\end{Example} + +\section{Alphabetische Befehlsreferenz} +Im folgenden Abschnitt werden alle Befehle von \mC in alphabetischer Reihenfolge vorgestellt. Manchmal werden in den Beispielen der Befehlsreferenz die Nodes (in der \TikZ-Bedeutung), innerhalb derer Reaktanden, Pfeile oder Branches gesetzt werden, farbig eingerahmt, um zu sehen, welchen Platz sie einnehmen. Das geschieht mithilfe des Befehls \verb=\makevisible=, siehe \ref{ssec:makevisible}. + +\subsection{arrow}\label{ssec:arrow} +Reaktionspfeile werden mit \verb=\arrow= erstellt. +\begin{Verbatim} + \arrow[<keys>]{<oben>}{<unten>} +\end{Verbatim} +Mit mehreren Keys können die Reaktionspfeile angepasst werden. Sie werden nach dem Muster \verb+key=wert+ angegeben. +\begin{description} +\vitem+direction=<richtung>+ -- mögliche Einstellungen sind: + \begin{rxn} + \arrowlength{2.5em} + \dummy[a] + \arrow{}{}\reactand{right}{} + \branch[above right=of a]{\arrow[direction=above right]{}{}\reactand[above right]{above right}{}}{} + \branch[above=of a]{\arrow[direction=above]{}{}\reactand[above]{above}{}}{} + \branch[above left=of a]{\arrow[direction=above left]{}{}\reactand[above left]{above left}{}}{} + \branch[left=of a]{\arrow[direction=left]{}{}\reactand[left]{left}{}}{} + \branch[below left=of a]{\arrow[direction=below left]{}{}\reactand[below left]{below left}{}}{} + \branch[below=of a]{\arrow[direction=below]{}{}\reactand[below]{below}{}}{} + \branch[below right=of a]{\arrow[direction=below right]{}{}\reactand[below right]{below right}{}}{} + \end{rxn} +\vitem+type=<typ>+ -- mögliche Einstellungen sind: + \begin{rxn} + \dummy[a] + \branch[below=of a,yshift=1em]{\arrow{}{}\reactand{\ttfamily type=\{-\textgreater\}}{}}{b} + \branch[below=of b,yshift=1em]{\arrow[type={<-}]{}{}\reactand{\ttfamily type=\{\textless-\}}{}}{c} + \branch[below=of c,xshift=.5em,yshift=1em]{\arrow[type={<->}]{}{}\reactand{\ttfamily type=\{\textless-\textgreater\}}{}}{d} + \branch[below=of d,yshift=1em]{\arrow[type={<=>}]{}{}\reactand{\ttfamily type=\{\textless=\textgreater\}}{}}{e} + \branch[below=of e,yshift=1em]{\arrow[type={-|>}]{}{}\reactand{\ttfamily type=\{-\textbar\textgreater\}}{}}{} + \end{rxn} +\vitem+length=<faktor>+ -- mit dem Faktoren, den Sie hier angeben, wird die Pfeillänge (\unit{5.0}\emlength\ bei Faktor = $1.0$, Standard) multipliziert. +\vitem+name=<anker>+ -- hier können Sie dem Pfeil einen Anker geben, auf den \zB mit einem Branch referenziert werden kann. +\vitem+both+\settowidth{\tmplength}{\tt both}\NEU[\tmplength]-- durch diesen Key haben die beiden Nodes, in die die Beschriftungen geschrieben werden, die gleichen Maße. +\end{description} +\begin{SideBySideExample} + \begin{rxn} + \dummy\arrow{\ce{Br2}}{$h\nu$} \arrow{\chemfig{-[::30]-[::-60]OH}}{} + \end{rxn} + \begin{rxn} + \dummy\arrow[direction=above]{\ce{Br2}}{$h\nu$} + \end{rxn} + \begin{rxn} + \dummy\arrow[direction=above]{\chemfig{-[::30]-[::-60]OH}}{} + \end{rxn} + \begin{rxn} + \dummy\arrow[direction=above right]{\ce{Br2}}{$h\nu$} + \end{rxn} + \begin{rxn} + \dummy\arrow[direction=above right]{\chemfig{-[::30]-[::-60]OH}}{} + \end{rxn} +\end{SideBySideExample} +Einmal die meisten Keys im Einsatz: +\begin{SideBySideExample} + \begin{rxn} + \reactand{A}{} + \arrow[name=pfeil]{B}{} + \branch[above=of pfeil,yshift=-4em]{ + \arrow[type=<-,direction=above,length=.7]{}{} + \reactand[above]{D}{} + }{} + \reactand{C}{} + \end{rxn} +\end{SideBySideExample} +Liegt der Pfeil in einem Branch (siehe \ref{ssec:branch}), dann wird die Ausrichtung des Branch bestimmt durch die Größe der Nodes, mit denen die Pfeilbeschriftung platziert wird. Hat der Pfeil nun nur eine oder zwei unterschiedlich große Beschriftungen, dann ist die Ausrichtung falsch. +\begin{SideBySideExample} + \makevisible + \begin{rxn} + \reactand{A}{a} + \arrow{}{} + \branch[below=of a]{ + \arrow[direction=below]{\chemfig{-[::30]-[::-60]OH}}{} + }{} + \end{rxn} + \makeinvisible +\end{SideBySideExample} +Durch die Verwendung des Keys \verb=both= bekommen die Nodes beider Pfeilbeschriftungen die gleichen Maße, wodurch die Ausrichtung korrigiert werden kann. +\begin{SideBySideExample} + \makevisible + \begin{rxn} + \reactand{A}{a} + \arrow{}{} + \branch[below=of a]{ + \arrow[direction=below,both]{\chemfig{-[::30]-[::-60]OH}}{} + }{} + \end{rxn} + \makeinvisible +\end{SideBySideExample} +Mehr zu dem Problem der Ausrichtung lesen Sie in \ref{sssec:branch_ausrichtung}. + +\subsection{arrowlength} +Reaktionspfeile haben als Standardwert die Länge \unit{5.0}\emlength\ oder $\unit{5.0\cdot\sqrt{2}}\emlength$ im Fall der schrägen Pfeile. Die Voreinstellung lässt sich mit +\begin{Verbatim} + \arrowlength{<länge>} +\end{Verbatim} +auf \UseVerb{arrowlength} bzw. $\text{\UseVerb{arrowlength}}\cdot\sqrt{2}$ ändern. Beachten Sie, dass Sie eine Längeneinheit verwenden müssen. + +\subsection{atomsize} +Mit +\begin{Verbatim} + \atomsize{<größe>} +\end{Verbatim} +lässt sich die Schriftgröße der Atomgruppen verändern. Standard ist \verb=\small=. + +\subsection{bondlength} +Mit +\begin{Verbatim} + \bondlength{<länge>} +\end{Verbatim} +lässt sich \verb=\setatomsep{<länge>}= für die \CF-Formeln \emph{innerhalb} der \mC-Umgebungen einstellen. Standard ist \unit{1.8}\emlength. + +\subsection{bondshape} +Mit +\begin{Verbatim} + \bondshape{<basislänge>}{<strichdicke>}{<strichabstand>} +\end{Verbatim} +lässt sich \verb=\setcrambond{<basislänge>}{<strichdicke>}{<strichabstand>}= für die \CF-Formeln \emph{innerhalb} der \mC-Umgebungen einstellen. Standard sind in dieser Reihenfolge \unit{3}\pt, \unit{.5}\pt\ und \unit{1}\pt. + +\subsection{branch}\label{ssec:branch} +Der Befehl \verb=\branch= wird verwendet, um eine Verzweigung der Reaktion zu realisieren. +\begin{Verbatim} + \branch[<ausrichtung>]{<formel(n)>}{<anker>} +\end{Verbatim} +Für den \texttt{\textbackslash branch} wird die Ausrichtung und der Anker wichtig. Sehen wir uns ein Beispiel an. +\begin{Example} + \begin{rxn} + \reactand{\chemfig{-[::30]=[::-60](-[::-60])-[::60]}}{start} + \arrow[length=.75]{\ce{HCl}}{} + \reactand{\chemfig{-[::30]-[::-60](-[::120]Cl)(-[::-60])-[::60]}}{} + \reactand{\chemsign+\chemfig{-[::30](-[::60]Cl)-[::-60](-[::-60])-[::60]}}{} + \branch[below right=of start]{ + \arrow[direction=below right,length=.75]{\ce{H2O}}{} + \reactand[below right]{\chemfig{-[::30]-[::-60](-[::120]OH)(-[::-60])-[::60]}}{} + \reactand{\chemsign+\chemfig{-[::30](-[::60]OH)-[::-60](-[::-60])-[::60]}}{} + }{} + \end{rxn} +\end{Example} +In diesem Beispiel hat der erste Reaktand den Anker \texttt{start} bekommen (Zeile 2, siehe auch \ref{ssec:reactand}). +\begin{Verbatim}[firstnumber=2] + \reactand{ ... }{!!start!!} +\end{Verbatim} +\texttt{\textbackslash branch} bezieht sich nun in seiner Ausrichtung darauf (Zeile 6): +\begin{Verbatim}[firstnumber=6] + \branch[below right!!=of start!!]{ ... }{} +\end{Verbatim} +Gibt man die Ausrichtung nicht in Bezug auf einen Anker an, bezieht sie sich immer auf den letzten \texttt{\textbackslash reactand} oder \texttt{\textbackslash arrow}. Lässt man das optionale Argument leer, dann platziert sich der Branch automatisch rechts. +\begin{SideBySideExample} + \begin{rxn} + \reactand{ \chemfig{CH_2=CH-OH} }{} + \arrow[type={<=>},length=.5]{}{} + \branch{ \reactand{ \chemfig{CH_3-CH=O} }{} }{} + \end{rxn} +\end{SideBySideExample} + +\subsubsection{Ausrichtungsprobleme}\label{sssec:branch_ausrichtung} +Wenn ein Pfeil zwei verschieden große Beschriftungen hat und in einem Branch liegt, wird der Branch nicht mehr richtig ausgerichtet. Der \verb=\arrow=-Key \verb=both= ist nicht wirklich eine Lösung, weil die kleinere Beschriftung dann nicht mehr am Pfeil liegt, sondern wegrutscht. +\begin{SideBySideExample} + \makevisible + \begin{rxn} + \reactand{A}{a} + \arrow{}{} + \branch[below=of a]{ + \arrow[direction=below,both]{\chemfig{-[::30]-[::-60]OH}}{\Hpl} + }{} + \end{rxn} + \makeinvisible +\end{SideBySideExample} +In diesem Fall können Sie den Branch mit den \TikZ-Keys \verb=xshift= und \verb=yshift= verschieben. +\begin{SideBySideExample} + \makevisible + \begin{rxn} + \reactand{A}{a} + \arrow{}{} + \branch[below=of a,xshift=-1.35em]{ + \arrow[direction=below]{\chemfig{-[::30]-[::-60]OH}}{\Hpl} + }{} + \end{rxn} + \makeinvisible +\end{SideBySideExample} + +\subsection{dummy} +Mit \verb=\dummy= zeichnet man eine leere Node. Die Pfeile, die mit \verb=\arrow= erzeugt werden, müssen einer Node nachfolgen. \verb=\arrow= ruft intern \verb=\tikzchainprevious= auf. Ist \emph{vor} einem Pfeil noch \emph{keine} Node auf die Chain geschrieben worden, erzeugt das eine Fehlermeldung. Duch setzen des \verb=\dummy= kann ein Schema dennoch mit einem Pfeil beginnen. +\begin{SideBySideExample} + \begin{rxn} + \dummy\arrow{}{} + \end{rxn} +\end{SideBySideExample} + +\subsection{elmove} +\verb=\elmove= ist lediglich ein Abkürzungsmakro für den \CF-Befehl \verb=\chemmove=. +\begin{Verbatim} + \elmove[<tikz>]{<start>}{<startrichtung>}{<ende>}{<endrichtung>} +\end{Verbatim} +Das schreibt den Befehl +\begin{Verbatim} + \chemmove{\draw[!!<tikz>!!](!!<start>!!).. controls +(!!<startrichtung>!!) and +(!!<endrichtung>!!)..(!!<ende>!!);} +\end{Verbatim} +mit \verb?[->,red,shorten <=3pt,shorten >=1pt]? als Voreinstellung für \verb=<tikz>=. Wie\linebreak\verb=\chemmove= funktioniert, können Sie im Manual zu \CF nachlesen. + +\begin{SideBySideExample} + \begin{center} + \setatomsep{1.8em} + \chemfig{*6(=[@{e1}]-=-(-[:120]Br)(-[:60]H)-(-[:-30,.4,,,white]\oplus)-[@{e2}])} + \elmove{e1}{60:4mm}{e2}{0:4mm} + \end{center} +\end{SideBySideExample} + +\subsection{makeinvisible}\label{ssec:makeinvisible} +\NEU% +Dieser Befehl hebt die Änderungen von \verb=\makevisible= (siehe \ref{ssec:makevisible}) auf und stellt das normale Verhalten von \mC wieder her. \verb=\makeinvisible= wirkt sich nur auf nachfolgende Reaktanden aus. + +\subsection{makevisible}\label{ssec:makevisible} +\NEU% +Mit \verb=\makevisible= können Sie die Nodes, innerhalb derer sich die Reaktanden befinden, farbig hervorheben. Das kann \zB bei der Positionierung und Feinjustierung von Branches ganz nützlich sein. Ein Beispiel dafür sehen Sie in \ref{ssec:arrow}. Je nach Art der Node ist die Markierung eine andere: + +\tikz[baseline=(X.base)]\node[draw=red!60](X){\texttt{\textbackslash reactand\{\}\{\}}};, \tikz[baseline=(X.base)]\node[draw=green!60](X){\texttt{\textbackslash arrow\{above\}\{\}}};, \tikz[baseline=(X.base)]\node[draw=blue!60](X){\texttt{\textbackslash arrow\{\}\{below\}}}; und \tikz[baseline=(X.base)]\node[draw=purple, dotted](X){\texttt{\textbackslash branch\{\}\{\}}};. Siehe auch \ref{ssec:makeinvisible}. + + \verb=\makevisible= wirkt sich nur auf nachfolgende Reaktanden aus. +\begin{SideBySideExample} + \makevisible + \begin{rxn} + \reactand{A}{a} + \arrow{a}{b} + \branch[below=of a]{ + \arrow[direction=below,both]{a}{b} + }{} + \end{rxn} + \makeinvisible +\end{SideBySideExample} + +\subsection{marrow}\label{ssec:marrow} +Der Befehl \verb=\marrow= zeichnet einen Mesomeriepfeil. +\begin{Verbatim} + \marrow[<ausrichtung>] +\end{Verbatim} +Die Ausrichtung funktioniert analog zu \verb=\reactand= (\ref{ssec:reactand}), siehe auch \ref{ssec:mesomeric}. + +\subsection{merge}\label{ssec:merge} +Der \verb=merge=-Befehl sind nicht nur für den direkten Einsatz in den \mC-Um\-ge\-bun\-gen gedacht, sondern können flexibler in einem `tikzpicture' eingesetzt werden. Mit diesem Befehl können verschiedene Reaktionsstränge zu einem vereint werden. Dafür müssen die einzelnen zu vereinenden Reaktanden als `nodes' mit Namen gekennzeichnet sein. +\begin{Verbatim} + \merge[<key>]{<ziel>}{<start a>}{<start b>} +\end{Verbatim} +\begin{SideBySideExample} + \begin{center} + \begin{tikzpicture} + \node(a) at (0,0) {A}; + \node(b) at (10em,0) {B}; + \node[draw,minimum size=3em](c) at (5em,-8em) {C}; + \merge{c}{a}{b} + \node(d) at (0,-16em) {D}; + \node(e) at (10em,-16em) {E}; + \merge[direction=above]{c}{d}{e} + \node(f) at (-3em,-4em) {F}; + \node(g) at (-3em,-12em) {G}; + \merge[direction=right]{c}{f}{g} + \node(h) at (13em,-4em) {H}; + \node(i) at (13em,-12em) {I}; + \merge[direction=left]{c}{h}{i} + \end{tikzpicture} + \end{center} +\end{SideBySideExample} +Gibt man den Start- und dem Zielreaktanden Anker, funktioniert \verb=\merge= natürlich auch in den \mC-Umgebungen. +\begin{Example} + \begin{rxn} + \setatomsep{1em}\tiny + % Strang 1 + \reactand{ \chemfig{Cl-[:30,1.5]--[:-30,1.5]O-[:30,1.5]--[:-30,1.5]Cl}{} }{oben} + \arrow[length=.5]{}{} + \reactand{ \chemfig{O(-[:-150]**6(-----(-OH)-))-[:90]-[:30]-[:-30]O-[:30]-[:-30]-[:-90]O-[:-30]**6(-(-HO)-----)} }{start_oben} + % Strang 2 + \branch[below=of oben,xshift=8em,yshift=-4em]{ + \reactand{ \chemfig{**6((--[6,,,2]HO)-N-(--[6]OH)----)} }{} + \arrow[length=.5]{}{} + \reactand{ \chemfig{**6((--[6]Br)-N-(--[6]Br)----)} }{} + }{start_unten} + % Ziel + \branch[right=of start_oben,xshift=5em,yshift=-4em]{ + \reactand{ \chemfig{O(-[:-150]**6(-----(-O?)-))-[:90]-[:30]**6(-N-(--[:-90]O-[:-30]**6(-(-O-[6]-[:-150]-[:150]O-[:-150]-[:150]?)-----))----)} }{c} + }{ziel} + % Zusammenfuehren: + \merge[direction=right]{ziel}{start_oben}{start_unten} + \end{rxn} +\end{Example} +Beachten Sie, dass für die `nodes' in der Regel Branches verwendet werden sollten, wenn Sie \verb=\merge= in den \mC-Umgebungen verwenden. Die Verwendung von \verb=\merge= erfordert unter Umständen einige Spielerei mit Branches, xshift und yshift, bis man das gewünschte Ergebnis erhält. +\begin{Example} + \begin{rxn} + \setatomsep{1.5em} + \reactand{ \chemname{\chemfig{**6(---(-NH_2)---)}}{Anilin} }{start_aa} + \reactand[below,yshift=-3em]{ \chemname{\ce{HNO2}}{salpetrige S"aure} }{start_ab} + \branch[right=of start_aa,xshift=6em,yshift=-5em]{ + \reactand{ \chemname{\chemfig{**6(---(-N|_2\op)---)}}{Diazoniumion} }{} + }{ziel_a}% = start_ba + \branch[below=of ziel_a,yshift=-3em]{ + \reactand{ \chemname{\chemfig{**6(---(-NH_2)---)}}{Anilin} }{} + }{start_bb} + \branch[right=of ziel_a,xshift=6em,yshift=-5em]{ + \reactand{ \chemname{\chemfig{N(-[:-150]**6(------))=N-[:-30]**6(---(-NH_2)---)}}{p-Aminodiazobenzol} }{} + }{ziel_b} + \merge[direction=right]{ziel_a}{start_aa}{start_ab} + \merge[direction=right]{ziel_b}{ziel_a}{start_bb} + \end{rxn} +\end{Example} + +\subsection{mesomeric}\label{ssec:mesomeric} +Der \verb=\mesomeric=-Befehl funktioniert wie \verb=\reactand= (\ref{ssec:reactand}). Sein Zweck ist es, eckige Klammern zu setzen. +\begin{Verbatim} + \mesomeric[<ausrichtung>]{<formel(n)>}{<anker>} +\end{Verbatim} +In \verb=<formel(n)>= werden die mesomeren Grenzstrukturen geschrieben. Mit \verb=\marrow=\linebreak (\ref{ssec:marrow}) werden die Mesomeriepfeile gesetzt. Man kann \verb=\mesomeric= falls nötig mit einem Anker (\verb=<anker>=) versehen (\ref{ssec:branch}). Die Ausrichtung funktioniert analog \verb=\reactand=. +\begin{Example} + \begin{rxn} + \mesomeric{ + \reactand{ + \chemfig{*6(=[@{e1}]-=-(-[:120]X)(-[:60]H)-(-[:-30,.4,,,white]\oplus)-[@{e2}])} + \elmove{e1}{60:4mm}{e2}{0:4mm} + }{} + \marrow + \reactand{ + \chemfig{*6(-(-[:90,.4,,,white]\oplus)-[@{e4}]=[@{e3}]-(-[:120]X)(-[:60]H)-=)} + \elmove{e3}{180:4mm}{e4}{150:4mm} + }{} + \marrow + \reactand{ + \chemfig{*6(-=-(-[:-150,.4,,,white]\oplus)-(-[:120]X)(-[:60]H)-=)} + }{} + }{} + \end{rxn} +\end{Example} +Oder auch von oben nach unten: +\begin{SideBySideExample} + \begin{rxn} + \mesomeric{ + \reactand{ \chemfig{*6(=-=-=-)} }{} + \marrow[below] + \reactand[below]{ \chemfig{*6(-=-=-=)} }{} + }{} + \end{rxn} +\end{SideBySideExample} +Vielleicht auch einen Komplex? +\begin{SideBySideExample} + \begin{rxn} + \setatomsep{3em} + \mesomeric{ + \reactand{ \chemfig{H_3\lewis{0,N}-[,1.35,,,dotted]{Cu}(-[2,,,,dotted]\lewis{6,N}H_3)(-[6,,,,dotted]\lewis{2,N}H_3)-[,1.2,,,dotted]\lewis{4,N}H_3} }{} + }{a} + \node[above right=of a,yshift=-1em] {$2\oplus$}; + \end{rxn} +\end{SideBySideExample} + +\subsection{reactand}\label{ssec:reactand} +Der Befehl \verb=\reactand= ist so etwas wie der Basisbefehl. +\begin{Verbatim} + \reactand[<ausrichtung>]{<formel(n)>}{<anker>} +\end{Verbatim} +In diesen Befehl werden die Formeln (\verb=<formel>=) geschrieben und können, falls nötig, mit einem Anker (\verb=<anker>=) versehen werden. Das optionale Argument kann die 8 Werte +\begin{inparaenum}[(a)] + \item \texttt{right}, + \item \texttt{above right}, + \item \texttt{above}, + \item \texttt{above left}, + \item \texttt{left}, + \item \texttt{below left}, + \item \texttt{below}, + \item \texttt{below right} +\end{inparaenum} +annehmen, Voreinstellung ist (\texttt{right}). Dieses Argument wird verwendet, wenn die Reaktionsgleichung nicht von links nach rechts, sondern \zB von oben nach unten verlaufen soll. +\begin{SideBySideExample} +%untereinander: + \begin{rxn} + \reactand{\ce{Br2}}{} + \reactand[below]{\ce{Cl2}}{} + \end{rxn} + +%Beispiel mit mehreren Reaktanden: + \begin{rxn} + \reactand{\ce{Br2}}{} + \reactand[below]{\ce{I2}}{} + \reactand{\ce{Cl2}}{} + \end{rxn} + +%Reaktion von oben nach unten: + \begin{rxn} + \reactand{\ce{Br-Br}}{} + \arrow[length=.5,direction=below]{$h\nu$}{} + \reactand[below]{\ce{2 ~\lewis{0.,Br}}}{} + \end{rxn} +\end{SideBySideExample} + +\subsection{rxn (Umgebung)}\label{ssec:rxn} +Die Umgebung \verb=rxn= ist eine unnummerierte nicht gleitende Umgebung für Reaktionsschemata. Die Reaktionsschemata werden zentriert. Die Voreinstellungen \verb=\bondlength=, \verb=\bondshape=, \verb=\arrowlength= und \verb=\atomsize= gelten hier ebenso wie bei \verb=rxnscheme=. +\begin{Verbatim} + \begin{rxn}[<keys>] + ... + \end{rxn} +\end{Verbatim} + +\subsubsection{Optionen}\label{sssec:rxn_optionen} +\NEU\verb=rxn= hat zwei Keys: +\begin{description} + \vitem+align=<ausrichtung>+ das Ausrichtungsverhalten der \verb=rxn=-Umgebung, Default: center + \vitem+scale=<factor>+ Skalierung der \verb=rxn=-Umgebung, Default: 1.0 +\end{description} +\begin{Example} + \begin{rxn}[align=center] + \reactand{center}{}\arrow{}{}\reactand{zentriert}{} + \end{rxn} + \begin{rxn}[align=right] + \reactand{right}{}\arrow{}{}\reactand{rechts}{} + \end{rxn} + \begin{rxn}[align=left] + \reactand{left}{}\arrow{}{}\reactand{links}{} + \end{rxn} +\end{Example} + +\subsection{rxnscheme (Umgebung)}\label{ssec:rxnscheme} +Die Umgebung \verb=\rxnscheme= ist eine Gleitumgebung für Reaktionsschemata. +\begin{Verbatim} + \begin{rxnscheme}[<keys>]{<caption>} + ... + \end{rxnscheme} +\end{Verbatim} +\subsubsection{Optionen}\label{sssec:rxnscheme_optionen} +\begin{description} + \vitem+label=<label>+ Wie jede Gleitumgebung kann auch \verb=rxnscheme= mit einem Label versehen werden. Setzen Sie \zB + \begin{Verbatim} + \begin{rxnscheme}[label={rs:schema}]{<caption>} + ... + \end{rxnscheme} + \end{Verbatim} + ein, können Sie mit \verb=\ref{rs:schema}= wie gewohnt referenzieren. + \vitem+scale=<scalefactor>+ Mit diesem Key kann das Reaktionsschema skaliert werden. Beachten Sie, dass er sich nicht auf die Schriftgröße und die Größe der \CF-Formeln auswirkt. + \begin{Verbatim} + \begin{rxnscheme}[scale=<scalefactor>]{<caption>} + ... + \end{rxnscheme} + \end{Verbatim} + \vitem+align=<ausrichtung>+\settowidth{\tmplength}{\tt align=<ausrichtung>}\NEU[\tmplength]Mit diesem Key kann man auswählen, ob das Schema links, rechts oder mittig ausgerichtet wird. +\end{description} +\begin{Example} + \begin{rxnscheme}[scale=2]{Gro\ss es Schema} + \large\setatomsep{3.5em} + \reactand{ \chemfig{=[::30]-[::-60]OH} }{} + \arrow[type={<=>}]{}{} + \reactand{ \chemfig{-[::30]=[::-60]O} }{} + \end{rxnscheme} + \begin{rxnscheme}[scale=.5]{Kleines Schema} + \tiny\setatomsep{1em} + \reactand{ \chemfig{=[::30]-[::-60]OH} }{} + \arrow[type={<=>}]{}{} + \reactand{ \chemfig{-[::30]=[::-60]O} }{} + \end{rxnscheme} + \begin{rxnscheme}{center} + \reactand{center}{}\arrow{}{}\reactand{zentriert}{} + \end{rxnscheme} + \begin{rxnscheme}[align=right]{right} + \reactand{right}{}\arrow{}{}\reactand{rechts}{} + \end{rxnscheme} + \begin{rxnscheme}[align=left]{left} + \reactand{left}{}\arrow{}{}\reactand{links}{} + \end{rxnscheme} +\end{Example} + +\subsubsection{rxnscheme anpassen}\label{sssec:rxnscheme_anpassen} +\paragraph{Stil} +Wenn Ihnen der Stil nicht gefällt, können Sie diesen mit +\begin{Verbatim} + \floatstyle{<neuer Stil>} + \restylefloat{rxnfloat} +\end{Verbatim} +ändern. Als Stile stehen durch das `float'-Paket +\begin{description} + \vitem=plain= Ohne spezielle Formatierungen, Legende erscheint unter dem Objekt + \vitem=plaintop= Wie \verb=plain=, aber Legende oberhalb des Objekts + \vitem=boxed= Objekt ist gerahmt, Legende unterhalb + \vitem=ruled= Legende erscheint von Linien umgeben oberhalb des Objekts, Objekt wird unterhalb von einer weiteren Linie begrenzt; Voreinstellung für \verb=rxnscheme= +\end{description} +zur Verfügung. +\begin{Example} + \begin{rxnscheme}{ruled} + \reactand{Standard-Stil}{} + \end{rxnscheme} + \floatstyle{boxed} + \restylefloat{rxnfloat} + \begin{rxnscheme}{boxed} + \reactand{mit Rahmen}{} + \end{rxnscheme} + \floatstyle{plain} + \restylefloat{rxnfloat} + \begin{rxnscheme}{plain} + \reactand{ohne Schnickschnack}{} + \end{rxnscheme} +\end{Example} +\floatstyle{ruled} +\restylefloat{rxnfloat} +\paragraph{Platzierung} +Auch das Platzierungsverhalten, das in der Voreinstellung \verb=H= ist, können Sie entsprechend ändern. +\begin{Verbatim} + \floatplacement{rxnfloat}{<position>} +\end{Verbatim} +Einfacher ist allerdings der Aufruf von \mC mit entsprechender Option. +\begin{Verbatim} + \usepackage[placement=<position>]{mychemistry} +\end{Verbatim} +Sie können auch das Verhalten einer einzigen Umgebung durch Angabe eines Keys ändern. +\begin{Verbatim} + \begin{rxnscheme}[placement=<position>]{<caption>} + ... + \end{rxnscheme} +\end{Verbatim} +\paragraph{Benennung}\label{par:rxnscheme_name} +Wollen Sie den Namen der Beschriftung ändern, können Sie das mit +\begin{Verbatim} + \setschemename{<neuer name>} +\end{Verbatim} +machen. Voreinstellung ist "`Reaktionschema"' bzw "`Reaction scheme"' bei der Paketoption `english'. +\paragraph{Zähler} +Um den Zähler zu ändern, gehen Sie wie üblich vor. Durch +\begin{Verbatim} + \makeatletter + \@addtoreset{rxnfloat}{section} + \makeatother + \renewcommand{\therxnfloat}{\arabic{section}.\arabic{rxnfloat}} +\end{Verbatim} +wird der Zähler der Schemata \zB mit jeder neuen \verb=section= zurückgesetzt und die Nummer nach den Muster \verb=section.rxnscheme= ausgegeben. Beachten Sie, dass Sie wegen des {@} den Aufruf mit \verb=\makeatletter= und\verb=\makeatother= begrenzen müssen. +\paragraph{Verzeichnis} +Mit +\begin{Verbatim} + \listof{rxnfloat}{<titel>} +\end{Verbatim} +können Sie eine Liste aller Reaktionsschemata erzeugen: +\begin{SideBySideExample} + \listof{rxnfloat}{Reaktionsschemata} +\end{SideBySideExample} + +\subsection{setrcndist}\label{ssec:setrcndist} +\NEU% +Die einzelnen Nodes, in denen die Reaktanden und Pfeile geschrieben werden, haben in den \mC-Umgebungen einen bestimmten Abstand voneinander. Per Default ist das \unit{1}\emlength. Wenn Sie das ändern wollen, können Sie das mit +\begin{Verbatim} + \setrcndist{<länge>} +\end{Verbatim} +machen. Lassen Sie das Argument leer, wird der Abstand wieder auf \unit{1}\emlength\ zurückgesetzt. +\begin{SideBySideExample} + \setrcndist{2em} + \begin{rxn} + \reactand{A}{}\arrow{}{} + \end{rxn} + \setrcndist{} + \begin{rxn} + \reactand{A}{}\arrow{}{} + \end{rxn} +\end{SideBySideExample} + +\subsection{setrxnalign/setschemealign} +\NEU% +Mit den Befehlen +\begin{Verbatim} + \setrxnalign{<alignment>} + \setschemealign{<alignment>} +\end{Verbatim} +lässt sich das Default-Ausrichtungsverhalten (siehe \ref{sssec:rxn_optionen} \&\ \ref{sssec:rxnscheme_optionen}) der Umgebungen festlegen. Es gibt die Einstellungsmöglichkeiten \verb=left=, \verb=center= oder \verb=right=. + +Lassen Sie das Argument leer, wird die Defaulteinstellung von \mC (\verb=center=) wiederhergestellt. +\begin{Example} + \setrxnalign{right} + \begin{rxn} + \reactand{A}{}\arrow{}{}\reactand{B}{} + \end{rxn} + \setrxnalign{} + \begin{rxn} + \reactand{A}{}\arrow{}{}\reactand{B}{} + \end{rxn} +\end{Example} + +\subsection{setschemename} +Siehe \ref{par:rxnscheme_name}. + +\subsection{transition}\label{ssec:transition} +\verb=\transition= funktioniert genau wie \verb=\mesomeric=. +\begin{Verbatim} + \transition[<ausrichtung>]{<formel>}{<anker>} +\end{Verbatim} +\begin{SideBySideExample} + \begin{rxn} + \reactand{ \ce{H2 + I2} }{} + \arrow[type={<=>},length=.5,direction=below]{}{} + \transition[below]{ + \reactand{ \chemfig[dotted][]{H?-I-[2]I-[4]H?} }{} + }{} + \arrow[type={<=>},length=.5,direction=below]{}{} + \reactand[below]{ \ce{2 HI} }{} + \end{rxn} +\end{SideBySideExample} + +\section{Beispiele} +\subsection{Addition}\label{ssec:addition} +Ein einfaches Reaktionschema mit zwei unterschiedlichen Produkten. +\begin{rxnscheme}{Additionsreaktion} + \reactand{ \chemfig{=_[::-30]-[::60](=[::60]O)-[::-60]} }{} + \arrow{ $+ \Hpl$ }{} + \mesomeric{ + \reactand{ \chemfig{=_[:-30]-[::60](-[::60]OH)(-[::-120,.3,,,white]\oplus)-[::-60]} }{} + \marrow[below] + \reactand[below]{ \chemfig{\oplus-[6,.3,,,white]-[:-30]=_[::60](-[::60]OH)-[::-60]} }{} + }{gf} + \branch[right=of gf,yshift=3em]{ + \arrow{}{} + \reactand{ \chemname{\chemfig{=_[:-30]-[::60](-[::60]OH)(-[::-120]R)-[::-60]}}{1,2-Addukt} }{} + }{} + \branch[right=of gf,yshift=-5em]{ + \arrow{}{} + \reactand{ \chemname{\chemfig{R-[6]-[:-30]=_[::60](-[::60]OH)-[::-60]}}{1,4-Addukt} }{} + }{} +\end{rxnscheme} + +Schritt für Schritt. Zunächst das Edukt und der erste Reaktionspfeil. +\begin{Verbatim} + \reactand{ \chemfig{=_[::-30]-[::60](=[::60]O)-[::-60]} }{} + \arrow{ $+ \Hpl$ }{} +\end{Verbatim} +\begin{rxn} + \reactand{ \chemfig{=_[::-30]-[::60](=[::60]O)-[::-60]} }{} + \arrow{ $+ \Hpl$ }{} +\end{rxn} +Anschließend die mesomeren Grenzformeln: +\begin{Verbatim}[firstnumber=3] + \mesomeric{ + \reactand{ \chemfig{=_[:-30]-[::60](-[::60]OH)(-[::-120,.3,,,white]\oplus)-[::-60]} }{} + \marrow[below] + \reactand[below]{ \chemfig{\oplus-[6,.3,,,white]-[:-30]=_[::60](-[::60]OH)-[::-60]} }{} + }{gf} +\end{Verbatim} +\begin{rxn} + \reactand{ \chemfig{=_[::-30]-[::60](=[::60]O)-[::-60]} }{} + \arrow{ $+ \Hpl$ }{} + \mesomeric{ + \reactand{ \chemfig{=_[:-30]-[::60](-[::60]OH)(-[::-120,.3,,,white]\oplus)-[::-60]} }{} + \marrow[below] + \reactand[below]{ \chemfig{\oplus-[6,.3,,,white]-[:-30]=_[::60](-[::60]OH)-[::-60]} }{} + }{gf} +\end{rxn} +Nun den Branch zum 1,2-Addukt, mit yshift nach oben verschoben: +\begin{Verbatim}[firstnumber=8] + \branch[right=of gf,yshift=3em]{ + \arrow{}{} + \reactand{ \chemname{\chemfig{=_[:-30]-[::60](-[::60]OH)(-[::-120]R)-[::-60]}}{1,2-Addukt} }{} + }{} +\end{Verbatim} +\begin{rxn} + \reactand{ \chemfig{=_[::-30]-[::60](=[::60]O)-[::-60]} }{} + \arrow{ $+ \Hpl$ }{} + \mesomeric{ + \reactand{ \chemfig{=_[:-30]-[::60](-[::60]OH)(-[::-120,.3,,,white]\oplus)-[::-60]} }{} + \marrow[below] + \reactand[below]{ \chemfig{\oplus-[6,.3,,,white]-[:-30]=_[::60](-[::60]OH)-[::-60]} }{} + }{gf} + \branch[right=of gf,yshift=3em]{ + \arrow{}{} + \reactand{ \chemname{\chemfig{=_[:-30]-[::60](-[::60]OH)(-[::-120]R)-[::-60]}}{1,2-Addukt} }{} + }{} +\end{rxn} +Zuletzt den Branch zum 1,4-Addukt, mit yshift nach unten verschoben: +\begin{Verbatim}[firstnumber=12] + \branch[right=of gf,yshift=-5em]{ + \arrow{}{} + \reactand{ \chemname{\chemfig{R-[6]-[:-30]=_[::60](-[::60]OH)-[::-60]}}{1,4-Addukt} }{} + }{} +\end{Verbatim} +\begin{rxn} + \reactand{ \chemfig{=_[::-30]-[::60](=[::60]O)-[::-60]} }{} + \arrow{ $+ \Hpl$ }{} + \mesomeric{ + \reactand{ \chemfig{=_[:-30]-[::60](-[::60]OH)(-[::-120,.3,,,white]\oplus)-[::-60]} }{} + \marrow[below] + \reactand[below]{ \chemfig{\oplus-[6,.3,,,white]-[:-30]=_[::60](-[::60]OH)-[::-60]} }{} + }{gf} + \branch[right=of gf,yshift=3em]{ + \arrow{}{} + \reactand{ \chemname{\chemfig{=_[:-30]-[::60](-[::60]OH)(-[::-120]R)-[::-60]}}{1,2-Addukt} }{} + }{} + \branch[right=of gf,yshift=-5em]{ + \arrow{}{} + \reactand{ \chemname{\chemfig{R-[6]-[:-30]=_[::60](-[::60]OH)-[::-60]}}{1,4-Addukt} }{} + }{} +\end{rxn} +Der komplette Code ist also der folgende: +\begin{Verbatim} + \begin{rxnscheme}{Additionsreaktion} + \reactand{ \chemfig{=_[::-30]-[::60](=[::60]O)-[::-60]} }{} + \arrow{ $+ \Hpl$ }{} + \mesomeric{ + \reactand{ \chemfig{=_[:-30]-[::60](-[::60]OH)(-[::-120,.3,,,white]\oplus)-[::-60]} }{} + \marrow[below] + \reactand[below]{ \chemfig{\oplus-[6,.3,,,white]-[:-30]=_[::60](-[::60]OH)-[::-60]} }{} + }{gf} + \branch[right=of gf,yshift=3em]{ + \arrow{}{} + \reactand{ \chemname{\chemfig{=_[:-30]-[::60](-[::60]OH)(-[::-120]R)-[::-60]}}{1,2-Addukt} }{} + }{} + \branch[right=of gf,yshift=-5em]{ + \arrow{}{} + \reactand{ \chemname{\chemfig{R-[6]-[:-30]=_[::60](-[::60]OH)-[::-60]}}{1,4-Addukt} }{} + }{} + \end{rxnscheme} +\end{Verbatim} + +\newpage +\subsection{Mesomerie} +Folgendes Reaktionsschema soll verwirklicht werden. +\begin{rxnscheme}[scale=.8]{Elektrophile Substitution} + \setatomsep{1.6em} + \reactand{ \chemname{\chemfig{*6(-=-=(-[,,,,white]\phantom{Br})-=)}}{Benzol \compound{benzol}} }{start} + + \branch[below=of start]{ + \arrow[direction=below,name=pfeil_a]{\ce{Br2 / AlBr3}}{$-\ce{AlBr4\om}$} + }{} + + \branch[below=of pfeil_a,xshift=8.5em]{ + \mesomeric{ + \reactand{ + \chemfig{*6(=[@{e1}]-=-(-[:120]Br)(-[:60]H)-(-[:-30,.4,,,white]\oplus)-[@{e2}])} + \elmove{e1}{60:4mm}{e2}{0:4mm} + }{m1} + \marrow + \reactand{ + \chemfig{*6(-(-[:90,.4,,,white]\oplus)-[@{e4}]=[@{e3}]-(-[:120]Br)(-[:60]H)-=)} + \elmove{e3}{180:4mm}{e4}{150:4mm} + }{m1} + \marrow + \reactand{ + \chemfig{*6(-=-(-[:-150,.4,,,white]\oplus)-(-[:120]Br)(-[:60]H)-=)} + }{m3} + }{} + }{mesomerie} + + \branch[above=of mesomerie,xshift=7.25em]{ + \arrow[direction=above]{$-\Hpl$}{} + }{} + + \arrow[length=2.6]{}{} + \reactand{ \chemname{\chemfig{*6(-=-=(-Br)-=)}}{Brombenzol \compound{brombenzol}} }{} +\end{rxnscheme} + +Zunächst erstellen wir die Hauptreaktion. Dafür setzen wir die Befehle \verb=\reactand=, \verb=\arrow= und die Umgebung \verb=\begin{rxn} ... \end{rxn}= ein. +\begin{Verbatim} + \begin{rxn} + \reactand{ + \chemname{\chemfig{*6(-=-=-=)}}{Benzol \compound{benzol}} + }{} + \arrow{}{} + \reactand{ + \chemname{\chemfig{*6(-=-=(-Br)-=)}}{Brombenzol \compound{brombenzol}} + }{} + \end{rxn} +\end{Verbatim} + \begin{rxn} + \reactand{ + \chemname{\chemfig{*6(-=-=-=)}}{Benzol \compound{benzol}} + }{} + \arrow{}{} + \reactand{ + \chemname{\chemfig{*6(-=-=(-Br)-=)}}{Brombenzol \compound{brombenzol}} + }{} + \end{rxn} +Nun wollen wir das ganze etwas verkleinern, damit wir nicht soviel Platz verbrauchen. +\begin{Verbatim} + \begin{rxn}!![scale=.8] + \setatomsep{1.6em}!! + \reactand{ + \chemname{\chemfig{*6(-=-=-=)}}{Benzol \compound{benzol}} + }{} + \arrow{}{} + \reactand{ + \chemname{\chemfig{*6(-=-=(-Br)-=)}}{Brombenzol \compound{brombenzol}} + }{} + \end{rxn} +\end{Verbatim} + \begin{rxn}[scale=.8] + \setatomsep{1.6em} + \reactand{ + \chemname{\chemfig{*6(-=-=-=)}}{Benzol \compound{benzol}} + }{} + \arrow{}{} + \reactand{ + \chemname{\chemfig{*6(-=-=(-Br)-=)}}{Brombenzol \compound{brombenzol}} + }{} + \end{rxn} +Damit die beiden Benzol-Ringe auf gleicher Höhe erscheinen, haben wir zwei Möglichkeiten. Entweder, wir verschieben den zweiten mit \TikZ-Code nach oben: +\begin{Verbatim}[firstnumber=7] + \reactand[!!right,yshift=1em!!]{ + \chemname{\chemfig{*6(-=-=(-Br)-=)}}{Brombenzol \compound{brombenzol}} + }{} +\end{Verbatim} +Beachten Sie, dass Sie, um den \TikZ-Code angeben zu können, die \textbf{Ausrichtung explizit schreiben müssen}. Diese Lösung ist nicht optimal, da dann der Reaktionspfeil nicht mittig sondern etwas zu tief erscheint. + \begin{rxn} + \reactand{ + \chemname{\chemfig{*6(-=-=-=)}}{Benzol \compound{benzol}} + }{} + \arrow{}{} + \reactand[right,yshift=1em]{ + \chemname{\chemfig{*6(-=-=(-Br)-=)}}{Brombenzol \compound{brombenzol}} + }{} + \end{rxn} +Die zweite Variante wäre, den ersten Ring nach unten zu verschieben. Das können wir nicht mit \TikZ-Code verwirklichen, da der Pfeil und der zweite Ring jeweils relativ zum vorhergehenden gesetzt werden. Durch ein unsichtbares Brom erreichen wir aber den gewünschten Effekt: +\begin{Verbatim}[firstnumber=3] + \reactand{ + \chemname{\chemfig{*6(-=-=!!(-[,,,,white]\phantom{Br})!!-=)}}{Benzol \compound{benzol}} + }{} +\end{Verbatim} + \begin{rxn} + \reactand{ + \chemname{\chemfig{*6(-=-=(-[,,,,white]\phantom{Br})-=)}}{Benzol \compound{benzol}} + }{} + \arrow{}{} + \reactand{ + \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 \verb=\branch= und wir müssen der ersten Formel einen Namen als Anker geben. + \begin{Verbatim} + \begin{rxn}[scale=.8] + \setatomsep{1.6em} + \reactand{ + \chemname{\chemfig{*6(-=-=(-[,,,,white]\phantom{Br})-=)}}{Benzol \compound{benzol}} + }{!!start!!} + + \branch[!!below=of start!!]{ + \arrow[!!direction=below!!]{ \ce{Br2 / AlBr3} }{ $-\ce{AlBr4\om}$ } + }{} + + \arrow{}{} + \reactand{ + \chemname{\chemfig{*6(-=-=(-Br)-=)}}{Brombenzol \compound{brombenzol}} + }{} + \end{rxn} +\end{Verbatim} +Wir nennen also die erste Substanz \verb=start= und sagen \verb=\branch= mit \verb+below=of start+, dass die Verzweigung unterhalb beginnen soll. Damit der anschließende Reaktionspfeil nach unten zeigt, bekommt \verb=\arrow= den Key \verb+direction=below+. Damit erhalten wir folgendes Bild: + \begin{rxn}[scale=.8] + \setatomsep{1.6em} + \reactand{ + \chemname{\chemfig{*6(-=-=(-[,,,,white]\phantom{Br})-=)}}{Benzol \compound{benzol}} + }{start} + \branch[below=of start]{ + \arrow[direction=below]{\ce{Br2 / AlBr3}}{$-\ce{AlBr4\om}$} + }{} + \arrow{}{} + \reactand{ + \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: \verb=\mesomeric=, \verb=\marrow= und \verb=\elmove=. +\begin{Verbatim} + !!\mesomeric{!! + \reactand{ + \chemfig{*6(=[@{e1}]-=-(-[:120]Br)(-[:60]H)-(-[:-30,.4,,,white]\oplus)-[@{e2}])} + !!\elmove{e1}{60:4mm}{e2}{0:4mm}!! + }{} + !!\marrow!! + \reactand{ + \chemfig{*6(-(-[:90,.4,,,white]\oplus)-[@{e4}]=[@{e3}]-(-[:120]Br)(-[:60]H)-=)} + \elmove{e3}{180:4mm}{e4}{150:4mm} + }{} + \marrow + \reactand{ + \chemfig{*6(-=-(-[:-150,.4,,,white]\oplus)-(-[:120]Br)(-[:60]H)-=)} + }{} + !!}{}!! +\end{Verbatim} +\begin{rxn}[scale=.8] + \setatomsep{1.6em} + \mesomeric{ + \reactand{ + \chemfig{*6(=[@{e1}]-=-(-[:120]Br)(-[:60]H)-(-[:-30,.4,,,white]\oplus)-[@{e2}])} + \elmove{e1}{60:4mm}{e2}{0:4mm} + }{} + \marrow + \reactand{ + \chemfig{*6(-(-[:90,.4,,,white]\oplus)-[@{e4}]=[@{e3}]-(-[:120]Br)(-[:60]H)-=)} + \elmove{e3}{180:4mm}{e4}{150:4mm} + }{} + \marrow + \reactand{ + \chemfig{*6(-=-(-[:-150,.4,,,white]\oplus)-(-[:120]Br)(-[:60]H)-=)} + }{} + }{} +\end{rxn} +Setzen wir den Code \emph{in den} \verb=\branch= nach dem Pfeil, ergibt sich folgendes Gesamtbild: + \begin{rxn}[scale=.8] + \setatomsep{1.6em} + \reactand{ + \chemname{\chemfig{*6(-=-=(-[,,,,white]\phantom{Br})-=)}}{Benzol \compound{benzol}} + }{start} + + \branch[below=of start]{ + \arrow[direction=below]{\ce{Br2 / AlBr3}}{$-\ce{AlBr4\om}$} + \mesomeric{ + \reactand{ + \chemfig{*6(=[@{e1}]-=-(-[:120]Br)(-[:60]H)-(-[:-30,.4,,,white]\oplus)-[@{e2}])} + \elmove{e1}{60:4mm}{e2}{0:4mm} + }{} + \marrow + \reactand{ + \chemfig{*6(-(-[:90,.4,,,white]\oplus)-[@{e4}]=[@{e3}]-(-[:120]Br)(-[:60]H)-=)} + \elmove{e3}{180:4mm}{e4}{150:4mm} + }{} + \marrow + \reactand{ + \chemfig{*6(-=-(-[:-150,.4,,,white]\oplus)-(-[:120]Br)(-[:60]H)-=)} + }{} + }{} + }{} + + \arrow{}{} + \reactand{ + \chemname{\chemfig{*6(-=-=(-Br)-=)}}{Brombenzol \compound{brombenzol}} + }{} + \end{rxn} +Die Ausrichtung der mesomeren Formeln stimmt offensichtlich nicht und der Pfeil ist nicht mehr, wo er sein soll. Wir könnten folgendes versuchen: +\begin{Verbatim} + \begin{rxn}[scale=.8] + \setatomsep{1.6em} + \reactand{ + \chemname{\chemfig{*6(-=-=(-[,,,,white]\phantom{Br})-=)}}{Benzol \compound{benzol}} + }{start} + + \branch[below=of start]{ + \arrow[direction=below]{\ce{Br2 / AlBr3}}{$-\ce{AlBr4\om}$} + \mesomeric!![below]!!{ + \reactand{ + \chemfig{*6(=[@{e1}]-=-(-[:120]Br)(-[:60]H)-(-[:-30,.4,,,white]\oplus)-[@{e2}])} + \elmove{e1}{60:4mm}{e2}{0:4mm} + }{} + \marrow + \reactand{ + \chemfig{*6(-(-[:90,.4,,,white]\oplus)-[@{e4}]=[@{e3}]-(-[:120]Br)(-[:60]H)-=)} + \elmove{e3}{180:4mm}{e4}{150:4mm} + }{} + \marrow + \reactand{ + \chemfig{*6(-=-(-[:-150,.4,,,white]\oplus)-(-[:120]Br)(-[:60]H)-=)} + }{} + }{} + }{} + + \arrow{}{} + \reactand{ + \chemname{\chemfig{*6(-=-=(-Br)-=)}}{Brombenzol \compound{brombenzol}} + }{} + \end{rxn} +\end{Verbatim} +Das Ergebnis ist schon besser: + \begin{rxn}[scale=.8] + \setatomsep{1.6em} + \reactand{ + \chemname{\chemfig{*6(-=-=(-[,,,,white]\phantom{Br})-=)}}{Benzol \compound{benzol}} + }{start} + + \branch[below=of start]{ + \arrow[direction=below]{\ce{Br2 / AlBr3}}{$-\ce{AlBr4\om}$} + \mesomeric[below]{ + \reactand{ + \chemfig{*6(=[@{e1}]-=-(-[:120]Br)(-[:60]H)-(-[:-30,.4,,,white]\oplus)-[@{e2}])} + \elmove{e1}{60:4mm}{e2}{0:4mm} + }{} + \marrow + \reactand{ + \chemfig{*6(-(-[:90,.4,,,white]\oplus)-[@{e4}]=[@{e3}]-(-[:120]Br)(-[:60]H)-=)} + \elmove{e3}{180:4mm}{e4}{150:4mm} + }{} + \marrow + \reactand{ + \chemfig{*6(-=-(-[:-150,.4,,,white]\oplus)-(-[:120]Br)(-[:60]H)-=)} + }{} + }{} + }{} + + \arrow{}{} + \reactand{ + \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 \verb=\branch= setzen. +\begin{Verbatim}[firstnumber=6] + ... + \branch[below=of start]{ + \arrow[direction=below,!!name=pfeil_a!!]{\ce{Br2 / AlBr3}}{$-\ce{AlBr4\om}$} + }{} + !!\branch[below=of pfeil_a]{!! + \mesomeric{ + \reactand{ + \chemfig{*6(=[@{e1}]-=-(-[:120]Br)(-[:60]H)-(-[:-30,.4,,,white]\oplus)-[@{e2}])} + \elmove{e1}{60:4mm}{e2}{0:4mm} + }{} + \marrow + \reactand{ + \chemfig{*6(-(-[:90,.4,,,white]\oplus)-[@{e4}]=[@{e3}]-(-[:120]Br)(-[:60]H)-=)} + \elmove{e3}{180:4mm}{e4}{150:4mm} + }{} + \marrow + \reactand{ + \chemfig{*6(-=-(-[:-150,.4,,,white]\oplus)-(-[:120]Br)(-[:60]H)-=)} + }{} + }{} + !!}{}!! + ... +\end{Verbatim} +\begin{rxn}[scale=.8] + \setatomsep{1.6em} + \reactand{\chemname{\chemfig{*6(-=-=(-[,,,,white]\phantom{Br})-=)}}{Benzol \compound{benzol}} }{start} + + \branch[below=of start]{ + \arrow[direction=below,name=pfeil_a]{\ce{Br2 / AlBr3}}{$-\ce{AlBr4\om}$} + }{} + + \branch[below=of pfeil_a]{ + \mesomeric{ + \reactand{ + \chemfig{*6(=[@{e1}]-=-(-[:120]Br)(-[:60]H)-(-[:-30,.4,,,white]\oplus)-[@{e2}])} + \elmove{e1}{60:4mm}{e2}{0:4mm} + }{m1} + \marrow + \reactand{ + \chemfig{*6(-(-[:90,.4,,,white]\oplus)-[@{e4}]=[@{e3}]-(-[:120]Br)(-[:60]H)-=)} + \elmove{e3}{180:4mm}{e4}{150:4mm} + }{m1} + \marrow + \reactand{ + \chemfig{*6(-=-(-[:-150,.4,,,white]\oplus)-(-[:120]Br)(-[:60]H)-=)} + }{m3} + }{} + }{mesomerie} + + \arrow{}{} + \reactand{ \chemname{\chemfig{*6(-=-=(-Br)-=)}}{Brombenzol \compound{brombenzol}} }{} +\end{rxn} +Das scheint auf den ersten Blick keine Verbesserung zu sein. Allerdings können wir den \verb=\branch= mit den \TikZ-Keys \verb=xshift= und \verb=yshift= noch beliebig verschieben. +\begin{Verbatim}[firstnumber=6] + ... + \branch[below=of start]{ + \arrow[direction=below,name=pfeil_a]{\ce{Br2 / AlBr3}}{$-\ce{AlBr4\om}$} + }{} + \branch[below=of pfeil_a,!!xshift=8.5em!!]{ + \mesomeric{ + \reactand{ + \chemfig{*6(=[@{e1}]-=-(-[:120]Br)(-[:60]H)-(-[:-30,.4,,,white]\oplus)-[@{e2}])} + \elmove{e1}{60:4mm}{e2}{0:4mm} + }{} + \marrow + \reactand{ + \chemfig{*6(-(-[:90,.4,,,white]\oplus)-[@{e4}]=[@{e3}]-(-[:120]Br)(-[:60]H)-=)} + \elmove{e3}{180:4mm}{e4}{150:4mm} + }{} + \marrow + \reactand{ + \chemfig{*6(-=-(-[:-150,.4,,,white]\oplus)-(-[:120]Br)(-[:60]H)-=)} + }{} + }{} + }{} + ... +\end{Verbatim} +\begin{rxn}[scale=.8] + \setatomsep{1.6em} + \reactand{\chemname{\chemfig{*6(-=-=(-[,,,,white]\phantom{Br})-=)}}{Benzol \compound{benzol}} }{start} + + \branch[below=of start]{ + \arrow[direction=below,name=pfeil_a]{\ce{Br2 / AlBr3}}{$-\ce{AlBr4\om}$} + }{} + + \branch[below=of pfeil_a,xshift=8.5em]{ + \mesomeric{ + \reactand{ + \chemfig{*6(=[@{e1}]-=-(-[:120]Br)(-[:60]H)-(-[:-30,.4,,,white]\oplus)-[@{e2}])} + \elmove{e1}{60:4mm}{e2}{0:4mm} + }{m1} + \marrow + \reactand{ + \chemfig{*6(-(-[:90,.4,,,white]\oplus)-[@{e4}]=[@{e3}]-(-[:120]Br)(-[:60]H)-=)} + \elmove{e3}{180:4mm}{e4}{150:4mm} + }{m1} + \marrow + \reactand{ + \chemfig{*6(-=-(-[:-150,.4,,,white]\oplus)-(-[:120]Br)(-[:60]H)-=)} + }{m3} + }{} + }{mesomerie} + + \arrow{}{} + \reactand{ \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 \verb=\branch=. +\begin{Verbatim}[firstnumber=6] + ... + \branch[below=of start]{ + \arrow[direction=below,!!name=pfeil_a!!]{\ce{Br2 / AlBr3}}{$-\ce{AlBr4\om}$} + }{} + \branch[below=of pfeil_a,xshift=8.5em]{ + \mesomeric{ + \reactand{ + \chemfig{*6(=[@{e1}]-=-(-[:120]Br)(-[:60]H)-(-[:-30,.4,,,white]\oplus)-[@{e2}])} + \elmove{e1}{60:4mm}{e2}{0:4mm} + }{} + \marrow + \reactand{ + \chemfig{*6(-(-[:90,.4,,,white]\oplus)-[@{e4}]=[@{e3}]-(-[:120]Br)(-[:60]H)-=)} + \elmove{e3}{180:4mm}{e4}{150:4mm} + }{} + \marrow + \reactand{ + \chemfig{*6(-=-(-[:-150,.4,,,white]\oplus)-(-[:120]Br)(-[:60]H)-=)} + }{} + }{} + }{!!mesomerie!!} + \branch[!!above=of mesomerie,xshift=7.25em!!]{ + \arrow[direction=above]{$-\Hpl$}{} + }{} + ... +\end{Verbatim} +\begin{rxn}[scale=.8] + \setatomsep{1.6em} + \reactand{\chemname{\chemfig{*6(-=-=(-[,,,,white]\phantom{Br})-=)}}{Benzol \compound{benzol}} }{start} + + \branch[below=of start]{ + \arrow[direction=below,name=pfeil_a]{\ce{Br2 / AlBr3}}{$-\ce{AlBr4\om}$} + }{} + + \branch[below=of pfeil_a,xshift=8.5em]{ + \mesomeric{ + \reactand{ + \chemfig{*6(=[@{e1}]-=-(-[:120]Br)(-[:60]H)-(-[:-30,.4,,,white]\oplus)-[@{e2}])} + \elmove{e1}{60:4mm}{e2}{0:4mm} + }{m1} + \marrow + \reactand{ + \chemfig{*6(-(-[:90,.4,,,white]\oplus)-[@{e4}]=[@{e3}]-(-[:120]Br)(-[:60]H)-=)} + \elmove{e3}{180:4mm}{e4}{150:4mm} + }{m1} + \marrow + \reactand{ + \chemfig{*6(-=-(-[:-150,.4,,,white]\oplus)-(-[:120]Br)(-[:60]H)-=)} + }{m3} + }{} + }{mesomerie} + \branch[above=of mesomerie,xshift=7.25em]{ + \arrow[direction=above]{$-\Hpl$}{} + }{} + \arrow{}{} + \reactand{ \chemname{\chemfig{*6(-=-=(-Br)-=)}}{Brombenzol \compound{brombenzol}} }{} +\end{rxn} +Nun sind wir fast am Ziel. Der Hauptreaktion ist noch zu kurz. +\begin{Verbatim} + \begin{rxn}[scale=.8] + \setatomsep{1.6em} + \reactand{\chemname{\chemfig{*6(-=-=(-[,,,,white]\phantom{Br})-=)}}{Benzol \compound{benzol}} }{start} + + \branch[below=of start]{ + \arrow[direction=below,name=pfeil_a]{\ce{Br2 / AlBr3}}{$-\ce{AlBr4\om}$} + }{} + \branch[below=of pfeil_a,xshift=8.5em]{ + \mesomeric{ + \reactand{ + \chemfig{*6(=[@{e1}]-=-(-[:120]Br)(-[:60]H)-(-[:-30,.4,,,white]\oplus)-[@{e2}])} + \elmove{e1}{60:4mm}{e2}{0:4mm} + }{} + \marrow + \reactand{ + \chemfig{*6(-(-[:90,.4,,,white]\oplus)-[@{e4}]=[@{e3}]-(-[:120]Br)(-[:60]H)-=)} + \elmove{e3}{180:4mm}{e4}{150:4mm} + }{} + \marrow + \reactand{ + \chemfig{*6(-=-(-[:-150,.4,,,white]\oplus)-(-[:120]Br)(-[:60]H)-=)} + }{} + }{} + }{mesomerie} + \branch[above=of mesomerie,xshift=7.25em]{ + \arrow[direction=above]{$-\Hpl$}{} + }{} + + \arrow[!!length=2.6!!]{}{} + \reactand{ \chemname{\chemfig{*6(-=-=(-Br)-=)}}{Brombenzol \compound{brombenzol}} }{} + \end{rxn} +\end{Verbatim} + \begin{rxn}[scale=.8] + \setatomsep{1.6em} + \reactand{\chemname{\chemfig{*6(-=-=(-[,,,,white]\phantom{Br})-=)}}{Benzol \compound{benzol}} }{start} + + \branch[below=of start]{ + \arrow[direction=below,name=pfeil_a]{\ce{Br2 / AlBr3}}{$-\ce{AlBr4\om}$} + }{} + \branch[below=of pfeil_a,xshift=8.5em]{ + \mesomeric{ + \reactand{ + \chemfig{*6(=[@{e1}]-=-(-[:120]Br)(-[:60]H)-(-[:-30,.4,,,white]\oplus)-[@{e2}])} + \elmove{e1}{60:4mm}{e2}{0:4mm} + }{} + \marrow + \reactand{ + \chemfig{*6(-(-[:90,.4,,,white]\oplus)-[@{e4}]=[@{e3}]-(-[:120]Br)(-[:60]H)-=)} + \elmove{e3}{180:4mm}{e4}{150:4mm} + }{} + \marrow + \reactand{ + \chemfig{*6(-=-(-[:-150,.4,,,white]\oplus)-(-[:120]Br)(-[:60]H)-=)} + }{} + }{} + }{mesomerie} + \branch[above=of mesomerie,xshift=7.25em]{ + \arrow[direction=above]{$-\Hpl$}{} + }{} + + \arrow[length=2.6]{}{} + \reactand{ \chemname{\chemfig{*6(-=-=(-Br)-=)}}{Brombenzol \compound{brombenzol}} }{} + \end{rxn} +\newpage +\subsection[Synthese mit \TikZ]{\TikZ, \mC und \CF für eine umfangreichere Synthese}\label{ssec:tikzsynthese} +Da die \CF-Befehle innerhalb einer \verb=tikzpicture=-Umgebung problemlos funktionieren, lassen sich mit dem \verb=\merge=-Befehl von \mC auch größere Synthesen realisieren. Die anderen \mC-Befehle funktionieren nicht ohne weiteres, da sie alle auf einer \verb=chain= angeordnet werden. Solange Sie \mC eingebunden haben, müssen Sie allerdings kaum eine \verb=tikzlibrary= zusätzlich einbinden. Im Beispiel wurde direkt auf die Gleitumgebung \verb=rxnfloat= von \mC zugegriffen. +\begin{Verbatim} + + \begin{rxnfloat} + \setatomsep{1.8em}\setcrambond{3pt}{.5pt}{1pt} + \centering + \begin{tikzpicture}[scale=.8] + \small + \node(a) at (0,0) {\chemfig{=_[::30]-[::-60]-[::60](-[::-60])(-[::120])-[::0]OH}}; + \node(b) at (0,-4) {\chemfig{Br-[::30]-[::-60]=_[::60](-[::-60])-[::60]}}; + \draw[-stealth,thick] (a.south) -- node[left]{HBr} (b.north); + \node(c) at (5,1) {\chemname{\chemfig{**6(--(-SO_2Cl)---(-)-)}}{Tosylchlorid}}; + \node(d) at (5,-4) {\chemfig{**6(--(-SO_2Na)---(-)-)}}; + \draw[-stealth,thick] (c.south) -- node[left]{NaOH} node[right]{Zn} (d.north); + \node(e) at (2.5,-8.5) {\chemfig{**6(--(-SO_2-[:30]-[::-60]=_[::60](-[::60])-[::-60])---(-)-)}}; + \node(f) at (10,-4) {\chemname{\chemfig{-[::30](-[::60])=_[::-60]-[::60]COOH}}{3-Methyl-2-butensäure}}; + \node(g) at (10,-8.5) {\chemfig{-[::30](-[::60])=_[::-60]-[::60]CO_2CH_3}}; + \draw[-stealth,thick] (f.south) -- node[left]{\ce{CH3OH}} (g.north); + \merge{e}{b}{d} + \node[left delimiter={[},right delimiter={]}](h) at (6.25,-14.5) {\chemfig{-[::30](-[::60])=^[::-60]-[::60](-[::60]S(=[::90]O)(=[::-90]O)-[::0]**6(---(-)---))-[::-60](-[::0])(-[::-120])-[::60](-[::60,.5,,,white]\ominus)-[::-60]CO_2CH_3}}; + \node at (5.25,-11) {\ce{NaOCH3}}; + \merge{h}{e}{g} + \node(i) at (6.25,-18.5) {}; + \node(j) at (6.25,-21.5) {\chemname{\chemfig{-[::-30](-[::-60])=^[::60]>[::-60](-[::90,1.2])-[::30,1.2](-[::120,1.2](-[::-60])-[::0])<:[::-30]COOH}}{\emph{trans}-Chrysanthemumsäure}}; + \draw[-stealth,thick] (h.south) -- (i.north); + \draw[-stealth,thick] (i.south) -- node[left]{KOH} (j.north); + \end{tikzpicture} + \caption{Synthese von Chrysanthemumsäure} + \end{rxnfloat} + +\end{Verbatim} + +\begin{rxnfloat} +\setatomsep{1.8em}\setcrambond{3pt}{.5pt}{1pt} +\centering +\begin{tikzpicture}[scale=.8] + \small + \node(a) at (0,0) {\chemfig{=_[::30]-[::-60]-[::60](-[::-60])(-[::120])-[::0]OH}}; + \node(b) at (0,-4) {\chemfig{Br-[::30]-[::-60]=_[::60](-[::-60])-[::60]}}; + \draw[-stealth,thick] (a.south) -- node[left]{HBr} (b.north); + + \node(c) at (5,1) {\chemname{\chemfig{**6(--(-SO_2Cl)---(-)-)}}{Tosylchlorid}}; + \node(d) at (5,-4) {\chemfig{**6(--(-SO_2Na)---(-)-)}}; + \draw[-stealth,thick] (c.south) -- node[left]{NaOH} node[right]{Zn} (d.north); + + \node(e) at (2.5,-8.5) {\chemfig{**6(--(-SO_2-[:30]-[::-60]=_[::60](-[::60])-[::-60])---(-)-)}}; + \node(f) at (10,-4) {\chemname{\chemfig{-[::30](-[::60])=_[::-60]-[::60]COOH}}{3-Methyl-2-butensäure}}; + \node(g) at (10,-8.5) {\chemfig{-[::30](-[::60])=_[::-60]-[::60]CO_2CH_3}}; + \draw[-stealth,thick] (f.south) -- node[left]{\ce{CH3OH}} (g.north); + \merge{e}{b}{d} + + \node[left delimiter={[},right delimiter={]}](h) at (6.25,-14.5) {\chemfig{-[::30](-[::60])=^[::-60]-[::60](-[::60]S(=[::90]O)(=[::-90]O)-[::0]**6(---(-)---))-[::-60](-[::0])(-[::-120])-[::60](-[::60,.3,,,white]\ominus)-[::-60]CO_2CH_3}}; + \node at (5.25,-11) {\ce{NaOCH3}}; + \merge{h}{e}{g} + + \node(i) at (6.25,-18.5) {}; + \node(j) at (6.25,-21.5) {\chemname{\chemfig{-[::-30](-[::-60])=^[::60]>[::-60](-[::90,1.2])-[::30,1.2](-[::120,1.2](-[::-60])-[::0])<:[::-30]COOH}}{\emph{trans}-Chrysanthemumsäure}}; + \draw[-stealth,thick] (h.south) -- (i.north); + \draw[-stealth,thick] (i.south) -- node[left]{KOH} (j.north); +\end{tikzpicture} +\caption{Synthese von Chrysanthemumsäure} +\end{rxnfloat} + +Gehen wir den Code Stück für Stück durch. +\begin{Verbatim} + + \begin{rxnfloat} + \setatomsep{1.8em}\setcrambond{3pt}{.5pt}{1pt} + \centering + \begin{tikzpicture}[scale=.8] + \small + \node(a) at (0,0) {\chemfig{=_[::30]-[::-60]-[::60](-[::-60])(-[::120])-[::0]OH}}; + \node(b) at (0,-4) {\chemfig{Br-[::30]-[::-60]=_[::60](-[::-60])-[::60]}}; + \draw[-stealth,thick] (a.south) -- node[left]{HBr} (b.north); +\end{Verbatim} +In den Zeilen 1 -- 6 wird die Umgebung begonnen und die Voreinstellungen vorgenommen, damit die Formeln nicht zu groß werden. In den Zeilen 7 -- 9 werden die beiden ersten Formeln erstellt (Zeilen 7 und 8) und mit Reaktionspfeil (Zeile 9) verbunden. +\setatomsep{1.8em} +\setcrambond{3pt}{.5pt}{1pt} +\begin{center} +\begin{tikzpicture}[scale=.8] + \small + \node(a) at (0,0) {\chemfig{=_[::30]-[::-60]-[::60](-[::-60])(-[::120])-[::0]OH}}; + \node(b) at (0,-4) {\chemfig{Br-[::30]-[::-60]=_[::60](-[::-60])-[::60]}}; + \draw[-stealth,thick] (a.south) -- node[left]{HBr} (b.north); +\end{tikzpicture} +\end{center} +\begin{Verbatim}[firstnumber=10] + \node(c) at (5,1) {\chemname{\chemfig{**6(--(-SO_2Cl)---(-)-)}}{Tosylchlorid}}; + \node(d) at (5,-4) {\chemfig{**6(--(-SO_2Na)---(-)-)}}; + \draw[-stealth,thick] (c.south) -- node[left]{NaOH} node[right]{Zn} (d.north); +\end{Verbatim} +In den drei folgenden Zeilen 10 -- 12 wird der zweite Syntheseast erstellt und mit Reaktionspfeil verbunden. +\begin{center} +\begin{tikzpicture}[scale=.8] + \small + \node(a) at (0,0) {\chemfig{=_[::30]-[::-60]-[::60](-[::-60])(-[::120])-[::0]OH}}; + \node(b) at (0,-4) {\chemfig{Br-[::30]-[::-60]=_[::60](-[::-60])-[::60]}}; + \draw[-stealth,thick] (a.south) -- node[left]{HBr} (b.north); + \node(c) at (5,1) {\chemname{\chemfig{**6(--(-SO_2Cl)---(-)-)}}{Tosylchlorid}}; + \node(d) at (5,-4) {\chemfig{**6(--(-SO_2Na)---(-)-)}}; + \draw[-stealth,thick] (c.south) -- node[left]{NaOH} node[right]{Zn} (d.north); +\end{tikzpicture} +\end{center} +\begin{Verbatim}[firstnumber=13] + \node(e) at (2.5,-8.5) {\chemfig{**6(--(-SO_2-[:30]-[::-60]=_[::60](-[::60])-[::-60])---(-)-)}}; + \node(f) at (10,-4) {\chemname{\chemfig{-[::30](-[::60])=_[::-60]-[::60]COOH}}{3-Methyl-2-butensäure}}; + \node(g) at (10,-8.5) {\chemfig{-[::30](-[::60])=_[::-60]-[::60]CO_2CH_3}}; + \draw[-stealth,thick] (f.south) -- node[left]{\ce{CH3OH}} (g.north); +\end{Verbatim} +In den Zeilen 13 -- 16 wird der dritte Ast sowie das Ergebnis der ersten beiden Äste erstellt. +\begin{center} +\begin{tikzpicture}[scale=.8] + \small + \node(a) at (0,0) {\chemfig{=_[::30]-[::-60]-[::60](-[::-60])(-[::120])-[::0]OH}}; + \node(b) at (0,-4) {\chemfig{Br-[::30]-[::-60]=_[::60](-[::-60])-[::60]}}; + \draw[-stealth,thick] (a.south) -- node[left]{HBr} (b.north); + \node(c) at (5,1) {\chemname{\chemfig{**6(--(-SO_2Cl)---(-)-)}}{Tosylchlorid}}; + \node(d) at (5,-4) {\chemfig{**6(--(-SO_2Na)---(-)-)}}; + \draw[-stealth,thick] (c.south) -- node[left]{NaOH} node[right]{Zn} (d.north); + \node(e) at (2.5,-8.5) {\chemfig{**6(--(-SO_2-[:30]-[::-60]=_[::60](-[::60])-[::-60])---(-)-)}}; + \node(f) at (10,-4) {\chemname{\chemfig{-[::30](-[::60])=_[::-60]-[::60]COOH}}{3-Methyl-2-butensäure}}; + \node(g) at (10,-8.5) {\chemfig{-[::30](-[::60])=_[::-60]-[::60]CO_2CH_3}}; + \draw[-stealth,thick] (f.south) -- node[left]{\ce{CH3OH}} (g.north); +\end{tikzpicture} +\end{center} +\begin{Verbatim}[firstnumber=17] + \merge{e}{b}{d} +\end{Verbatim} +In Zeile 17 werden nun die beiden ersten Äste zusammengeführt. +\begin{center} +\begin{tikzpicture}[scale=.8] + \small + \node(a) at (0,0) {\chemfig{=_[::30]-[::-60]-[::60](-[::-60])(-[::120])-[::0]OH}}; + \node(b) at (0,-4) {\chemfig{Br-[::30]-[::-60]=_[::60](-[::-60])-[::60]}}; + \draw[-stealth,thick] (a.south) -- node[left]{HBr} (b.north); + \node(c) at (5,1) {\chemname{\chemfig{**6(--(-SO_2Cl)---(-)-)}}{Tosylchlorid}}; + \node(d) at (5,-4) {\chemfig{**6(--(-SO_2Na)---(-)-)}}; + \draw[-stealth,thick] (c.south) -- node[left]{NaOH} node[right]{Zn} (d.north); + \node(e) at (2.5,-8.5) {\chemfig{**6(--(-SO_2-[:30]-[::-60]=_[::60](-[::60])-[::-60])---(-)-)}}; + \node(f) at (10,-4) {\chemname{\chemfig{-[::30](-[::60])=_[::-60]-[::60]COOH}}{3-Methyl-2-butensäure}}; + \node(g) at (10,-8.5) {\chemfig{-[::30](-[::60])=_[::-60]-[::60]CO_2CH_3}}; + \draw[-stealth,thick] (f.south) -- node[left]{\ce{CH3OH}} (g.north); + \merge{e}{b}{d} +\end{tikzpicture} +\end{center} +\begin{Verbatim}[firstnumber=18] + \node[left delimiter={[},right delimiter={]}](h) at (6.25,-14.5) {\chemfig{-[::30](-[::60])=^[::-60]-[::60](-[::60]S(=[::90]O)(=[::-90]O)-[::0]**6(---(-)---))-[::-60](-[::0])(-[::-120])-[::60](-[::60,.5,,,white]\ominus)-[::-60]CO_2CH_3}}; +\end{Verbatim} +In Zeile 18 erstellen wir den Übergangszustand. +\begin{center} +\begin{tikzpicture}[scale=.8] + \small + \node(e) at (2.5,-8.5) {\chemfig{**6(--(-SO_2-[:30]-[::-60]=_[::60](-[::60])-[::-60])---(-)-)}}; + \node(g) at (10,-8.5) {\chemfig{-[::30](-[::60])=_[::-60]-[::60]CO_2CH_3}}; + \node[left delimiter={[},right delimiter={]}](h) at (6.25,-14.5) {\chemfig{-[::30](-[::60])=^[::-60]-[::60](-[::60]S(=[::90]O)(=[::-90]O)-[::0]**6(---(-)---))-[::-60](-[::0])(-[::-120])-[::60](-[::60,.5,,,white]\ominus)-[::-60]CO_2CH_3}}; +\end{tikzpicture} +\end{center} +\begin{Verbatim}[firstnumber=19] + \node at (5.25,-11) {\ce{NaOCH3}}; + \merge{h}{e}{g} +\end{Verbatim} +In den Zeilen 19 und 20 werden de Äste zusammengeführt und der Pfeil beschriftet. +\begin{center} +\begin{tikzpicture}[scale=.8] + \small + \node(e) at (2.5,-8.5) {\chemfig{**6(--(-SO_2-[:30]-[::-60]=_[::60](-[::60])-[::-60])---(-)-)}}; + \node(g) at (10,-8.5) {\chemfig{-[::30](-[::60])=_[::-60]-[::60]CO_2CH_3}}; + \node[left delimiter={[},right delimiter={]}](h) at (6.25,-14.5) {\chemfig{-[::30](-[::60])=^[::-60]-[::60](-[::60]S(=[::90]O)(=[::-90]O)-[::0]**6(---(-)---))-[::-60](-[::0])(-[::-120])-[::60](-[::60,.5,,,white]\ominus)-[::-60]CO_2CH_3}}; + \node at (5.25,-11) {\ce{NaOCH3}}; + \merge{h}{e}{g} +\end{tikzpicture} +\end{center} +\begin{Verbatim}[firstnumber=21] + \node(i) at (6.25,-18.5) {}; + \node(j) at (6.25,-21.5) {\chemname{\chemfig{-[::-30](-[::-60])=^[::60]>[::-60](-[::90,1.2])-[::30,1.2](-[::120,1.2](-[::-60])-[::0])<:[::-30]COOH}}{\emph{trans}-Chrysanthemumsäure}}; + \draw[-stealth,thick] (h.south) -- (i.north); + \draw[-stealth,thick] (i.south) -- node[left]{KOH} (j.north); + \end{tikzpicture} + \caption{Synthese von Chrysanthemumsäure} + \end{rxnfloat} + +\end{Verbatim} +In den abschließenden Zeilen 21 -- 28 wird zunächst eine leere node erstellt (Zeile 21), dann das Produkt (Zeile 22). In den Zeilen 23 und 24 werden die beiden letzten Reaktionspfeile erstellt, in den letzten vier Zeilen die Umgebung dann beendet. +\begin{center} +\begin{tikzpicture}[scale=.8] + \small + \node(i) at (6.25,-18.5) {}; + \node(j) at (6.25,-21.5) {\chemname{\chemfig{-[::-30](-[::-60])=^[::60]>[::-60](-[::90,1.2])-[::30,1.2](-[::120,1.2](-[::-60])-[::0])<:[::-30]COOH}}{\emph{trans}-Chrysanthemumsäure}}; + \draw[-stealth,thick] (h.south) -- (i.north); + \draw[-stealth,thick] (i.south) -- node[left]{KOH} (j.north); +\end{tikzpicture} +\end{center} + +\section{Nachwort} +\mC steckt noch in den Kinderschuhen. Das bedeutet, das 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! + +\par\vspace{.5cm}\hspace{.5cm}Clemens Niederberger, Berlin, \mCdate{de} +\end{document}
\ No newline at end of file diff --git a/Master/texmf-dist/doc/latex/mychemistry/mychemistry_en.pdf b/Master/texmf-dist/doc/latex/mychemistry/mychemistry_en.pdf Binary files differnew file mode 100644 index 00000000000..e979f624c6b --- /dev/null +++ b/Master/texmf-dist/doc/latex/mychemistry/mychemistry_en.pdf diff --git a/Master/texmf-dist/doc/latex/mychemistry/mychemistry_en.tex b/Master/texmf-dist/doc/latex/mychemistry/mychemistry_en.tex new file mode 100644 index 00000000000..68dd917fc13 --- /dev/null +++ b/Master/texmf-dist/doc/latex/mychemistry/mychemistry_en.tex @@ -0,0 +1,1966 @@ +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% ------------------------------------------------------------------------------------- % +% - myChemistry - mychemistry_en.tex -------------------------------------------------- % +% - Creating reaction schemes with LaTeX and ChemFig ---------------------------------- % +% ------------------------------------------------------------------------------------- % +% - Clemens Niederberger -------------------------------------------------------------- % +% - 2011/03/20 ------------------------------------------------------------------------ % +% ------------------------------------------------------------------------------------- % +% - 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 and - % +% - mychemistry_en.tex - % +% ------------------------------------------------------------------------------------- % +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\documentclass[DIV10]{scrartcl} +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% - Pakete ---------------------------------------------------------------------------- % +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\usepackage{scrhack} % verbessert KOMAs Zusammenspiel mit floats +\usepackage[english]{babel} % Sprache +\usepackage{emerald} % chemfig-Schrift +\usepackage[utf8x]{inputenc} % Zeichenkodierung: Eingabe +\usepackage[T1]{fontenc} % Text-Ausgabe-Codierung +\usepackage{textcomp,mathcomp} +\usepackage{xspace,paralist} % xspace und Listen +\usepackage[Gray]{SIunits} % Einheiten + \addunit{\emlength}{em} + \addunit{\pt}{pt} +\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{DarkRed}{rgb}{0.4392,0.0627,0.0627} +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% - Anzeige des Inhaltsverzeichnisses ------------------------------------------------- % +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\usepackage{titletoc} +\titlecontents{section} [6.5pc] % SECTION-ANZEIGE + {\renewcommand\familydefault{ppl}\addvspace{2pc}\bfseries + \color{DarkRed}\titlerule[2pt]\filright\normalcolor\nobreak} % davor + {\contentslabel + [\textsc{Section}\ + \thecontentslabel]{6.5pc}} % nummerierter Eintrag + {\hspace{-6.5pc}\scshape\thecontentslabel} % unnummerierter Eintrag + {\hfill\contentspage} + [\addvspace{3pt}\renewcommand\familydefault{ppl}] % danach +%% +\newcommand{\xquad}{\hspace{1em plus.4em minus.4em}} +\titlecontents*{subsubsection}[6pc] % SUBSUBSECTION-ANZEIGE + {\footnotesize\itshape} + {} + {} + {,~\thecontentspage} + [\xquad\textbullet\xquad] + {} +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% - Hyperlinks ------------------------------------------------------------------------ % +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\usepackage{hyperref} + \hypersetup{colorlinks=true, % Setup der Hyperlinks und des pdf + linkcolor=black, + urlcolor=blue!70, + citecolor=black, + plainpages=false, + bookmarksopen=true, + bookmarksopenlevel=2, + bookmarksnumbered=true, + pdfstartview=FitH, + pdfauthor={Clemens Niederberger}, + pdftitle={myChemistry - english documentation}, + pdfsubject={Creating reactionschemes with LaTeX}, + pdfkeywords={myChemistry}, + pdfcreator={LaTeX} + } +\usepackage[english,color=dunkelrot]{mychemistry} % myChemistry + \renewcommand\thebeispiel{\arabic{beispiel}} % chemexec angepasst + \labelformat{beispiel}{example #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\footnotesize}, % 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{blue}]{!!}{!!}, % Hervorhebung + commentstyle={\color[named]{Gray}}, + emph={begin,end}, % Umgebungen hervorheben + emphstyle=\color{red}, + keywordstyle=\color{code}, + morekeywords={arrow,arrowlength,atomsize,bondlength,bondshape,branch,chemfig,chemmove,chemname,chemsign,ce,compound,draw,dummy,elmove,floatplacement,floatstyle,lewis,listof,makeinvisible,makevisible,marrow,merge,mesomeric,node,reactand,restylefloat,setatomsep,setcrambond,setrcndist,setrxnalign,setschemealign,setschemename,transition}, + fancyvrb=true + } + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% - Kopf- und Fußzeile ---------------------------------------------------------------- % +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\usepackage{scrpage2} +\pagestyle{scrheadings} +\setheadwidth{textwithmarginpar} +\automark{section} +\ihead{\mC \mCversion} +\ifoot{\small\color{gray}-~page~\thepage~-} +\cfoot{} +\ofoot{} + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% - Komascript ------------------------------------------------------------------------ % +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\setkomafont{disposition}{\rmfamily\bfseries} % Gewicht fett und Schriftart roman + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% - neue Befehle ---------------------------------------------------------------------- % +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% - Beispiele ------------------------------------------------------------------------- % +% - auf Basis der Beispiele in der fancyvrb-Dokumentation ----------------------------- % +\makeatletter +\newcommand{\BeginExample}{% + \VerbatimEnvironment + \begin{VerbatimOut}[gobble=1]{\jobname.tmp}} + + \newcommand{\BelowExample}[1]{% + \VerbatimInput[numbersep=3pt,fontsize=\footnotesize, + numbers=left,xleftmargin=5mm,xrightmargin=0pt]{\jobname.tmp} +#1} +% - Code, Ergebnis rechts ------------------------------------------------------------- % +\newcommand{\SideBySide@Example}[1]{% +\setlength{\parindent}{0pt}% +\begin{minipage}[c]{.48\textwidth} + \VerbatimInput[numbersep=3pt,fontsize=\footnotesize, + numbers=left,xleftmargin=5mm,xrightmargin=0pt]{\jobname.tmp} +\end{minipage}% +\hspace*{2mm} +\begin{minipage}[c]{.48\textwidth} + #1 +\end{minipage} +} + +\def\SideBySideExample{% + \catcode`\^^M=\active + \@ifnextchar[{\catcode`\^^M=5\beispiel\vspace*{1mm}\SideBySideExample@}% + {\catcode`\^^M=5\beispiel\vspace*{1mm}\SideBySideExample@@}} +\def\SideBySideExample@[#1]{#1\SideBySideExample@@} +\def\SideBySideExample@@{\BeginExample} +\def\endSideBySideExample{% + \end{VerbatimOut}% + \SideBySide@Example{\input{\jobname.tmp}}\vspace*{1mm}\endbeispiel} +% - Code, Ergebnis danach ------------------------------------------------------------- % +\newcommand{\@Example}[1]{% +\setlength{\parindent}{0pt}% +\begin{minipage}{\textwidth} + \VerbatimInput[numbersep=3pt,fontsize=\footnotesize, + numbers=left,xleftmargin=5mm,xrightmargin=0pt]{\jobname.tmp} +\end{minipage}% + +\smallskip +\begin{minipage}{\textwidth} + #1 +\end{minipage} +} + +\def\Example{% + \catcode`\^^M=\active + \@ifnextchar[{\catcode`\^^M=5\beispiel\vspace*{1mm}\Example@}% + {\catcode`\^^M=5\beispiel\vspace*{1mm}\Example@@}} +\def\Example@[#1]{#1\Example@@} +\def\Example@@{\BeginExample} +\def\endExample{% + \end{VerbatimOut}% + \@Example{\input{\jobname.tmp}}\vspace*{1mm}\endbeispiel} +\makeatother + +% - weitere Makros -------------------------------------------------------------------- % +\newcommand{\mC}{{\color{DarkRed}\sffamily my\-Chemis\-try}\xspace} % Paketname +\newcommand{\CF}{{\ECFAugie ChemFig}\xspace} % ChemFig in der originalen Schrift +\newcommand{\eg}{\mbox{e.\,g.}\xspace} +\newcommand{\TikZ}{\mbox{Ti{\bfseries\itshape k}Z}\xspace} +\newcommand\NEU[1][0pt]{\leavevmode\llap{\footnotesize\ECFTeenSpirit\color{red}New\kern\dimexpr20pt+#1\relax}} +\newlength{\tmplength} +% - für Beispiele --------------------------------------------------------------------- % +\newcommand{\abovearrow}{\tikz\node[draw,minimum width=3em,minimum height=1.5em,blue]{\footnotesize above};} +\newcommand{\belowarrow}{\tikz\node[draw,minimum width=3em,minimum height=1.5em,red]{\footnotesize below};} +\newcommand{\substance}{\tikz\node[draw,minimum width=5em,minimum height=3em]{};} + +\begin{document} +\begin{titlepage} + % inspired by the titlepage of chemfig's documentation + \begin{tikzpicture}[remember picture,overlay] + \shade [color=dunkelrot,right color=white](current page.south west) rectangle ([yshift=3cm,xshift=-3cm]current page.center); + \shade[top color=black,bottom color=dunkelrot]([yshift=7cm]current page.east)rectangle([yshift=2.5cm]current page.west); + \node[text width=\textwidth,opacity=.15,yshift=-5.3cm] at (current page.center) {% +\begin{verbatim} + \begin{rxn}[scale=.7] + \setatomsep{1.5em}\footnotesize + \reactand{ + \chemfig{C(-[4]*6(=-=-=-))(-[2]*6(=-=-=-))(-[6,,,2]HO)-C(-[2]CH_3) + (-[6]OH)-CH_3} + }{a} + \branch[below right=of a]{ + \arrow[direction=above right,length=.7]{}{} + \reactand[above right]{ + \chemfig{C(-[4]*6(=-=-=-))(-[2]*6(=-=-=-))(-[@{e1}6,,,2]H_2@{e2} + \chembelow{O}{\oplus})-C(-[2]CH_3)(-[6]OH)-CH_3}\elmove{e1} + {10:4mm}{e2}{-10:4mm} + }{} + \arrow{$-\ce{H2O}$}{} + \reactand{ + \chemfig{\chembelow{C}{\oplus}(-[4]*6(=-=-=-))(-[2]*6(=-=-=-))-C + (-[2]CH_3)(-[6]OH)-CH_3} + }{} + }{} + \branch[below right=of a]{ + \arrow[type={-|>},direction=below right,length=.7]{}{} + \reactand[below right]{ + \chemfig{C(-[4]*6(=-=-=-))(-[2]*6(=-=-=-))(-[6,,,2]HO)-C(-[2]CH_3) + (-[@{e3}6]@{e4}\chembelow{O}{\oplus}H_2)-CH_3}\elmove{e3} + {170:4mm}{e4}{-170:4mm} + }{} + \arrow{$-\ce{H2O}$}{} + \reactand{ + \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\mCversion\par\bigskip + \footnotesize\mCdate{en}\par + \normalsize Clemens Niederberger\par\vskip1.5cm + \color{white}\huge Creating reaction schemes with \LaTeX\ and \CF% + \end{center} + \vskip4cm + \begin{rxn}[scale=.7] + \setatomsep{1.5em}\footnotesize + \reactand{ \chemfig{C(-[4]*6(=-=-=-))(-[2]*6(=-=-=-))(-[6,,,2]HO)-C(-[2]CH_3)(-[6]OH)-CH_3} }{a} + \branch[above right=of a]{ + \arrow[direction=above right,length=.7]{}{} + \reactand[above right]{ \chemfig{C(-[4]*6(=-=-=-))(-[2]*6(=-=-=-))(-[@{e1}6,,,2]H_2@{e2}\chembelow{O}{\oplus})-C(-[2]CH_3)(-[6]OH)-CH_3}\elmove{e1}{10:4mm}{e2}{-10:4mm} }{} + \arrow{$-\ce{H2O}$}{} + \reactand{ \chemfig{\chembelow{C}{\oplus}(-[4]*6(=-=-=-))(-[2]*6(=-=-=-))-C(-[2]CH_3)(-[6]OH)-CH_3} }{} + }{} + \branch[below right=of a]{ + \arrow[type={-|>},direction=below right,length=.7]{}{} + \reactand[below right]{ \chemfig{C(-[4]*6(=-=-=-))(-[2]*6(=-=-=-))(-[6,,,2]HO)-C(-[2]CH_3)(-[@{e3}6]@{e4}\chembelow{O}{\oplus}H_2)-CH_3}\elmove{e3}{170:4mm}{e4}{-170:4mm} }{} + \arrow{$-\ce{H2O}$}{} + \reactand{ \chemfig{C(-[4]*6(=-=-=-))(-[2]*6(=-=-=-))(-[6,,,2]HO)-\chembelow{C}{\oplus}(-[2]CH_3)-CH_3} }{} + }{} + \end{rxn} +\end{titlepage} + +\tableofcontents + +\section{About} +\subsection{What's new?} +Since \mCversion\ there are some new features. The main part plays behind the scenes: the wrong arrow- and branch-alignments have been corrected. \textbf{Due to these changes \mC now needs Version 2.10 of \TikZ (or pgf, actually}, see \ref{ssec:voraussetzungen}). + +There are some new "frontend" features as well. In this documentation they are marked with {\ECFTeenSpirit\color{red}New}. For one thing there are some new package options (see \ref{ssec:paketoptionen}). Additionally the arrows have got two new keys (see \ref{ssec:arrow}). + +The environments have gained a few features, with which they can be customized, too (see \ref{sssec:rxn_optionen}, \ref{sssec:rxnscheme_optionen} and \ref{ssec:setrcndist}). + +Last but not least since \mCversion\ \mC underlies LPPL version 1.3 or later. + +\subsection{Licence} +\mC \mCversion\ underlies the The LaTeX project public license\\(\url{http://www.latex-project.org/lppl.txt}). + +\subsection{Requirements}\label{ssec:voraussetzungen} +In order to function properly \mC needs some packages to be available. +\begin{description} + \item[\CF] without it why would you use \mC? + \item[ifthen] for internal queries; + \item[calc] for internal calculations; + \item[xkeyval] package options and command keys are created with this package; + \item[float] the \verb=rxnscheme= environment is defined with this package; + \item[pgf/\TikZ] pgf actually isn't just one package but a whole bundle. They are the basis layer for \TikZ. \mC needs at least the version from 09/08/2011\footnote{\url{http://sourceforge.net/projects/pgf/files/}}. More precisely: the command \verb=\pgfpositionnodelater= must exist. +\end{description} + +\subsection{The Idea} +Since \CF was published August 2010, there is a flexible solution for creating organic structures. With \CF and `mhchem' one is able to create nearly all structural and molecular formulars that a chemist needs. There is one thing, though, in which `ochem' still beats \CF: creating reaction mechanisms. This is where \mC comes in. +\mC loads the packages +\begin{itemize} + \item \CF\footnote{by Christian Tellechea, \url{http://www.ctan.org/tex-archive/macros/latex/contrib/chemfig/}}, + \item `mhchem'\footnote{by Martin Hensel, \url{http://www.ctan.org/tex-archive/macros/latex/contrib/mhchem/}} in version 3, when ist exists, + \item `chemexec'\footnote{by me, \url{http://www.niederberger-berlin.net/downloads/?did=1}}, when it exists, and + \item `chemcompounds'\footnote{by Stephan Schenk, \url{http://www.ctan.org/tex-archive/macros/latex/contrib/chemcompounds/}}, when ist exists. +\end{itemize} +How these packages work, you can read in their documentation. Commands provided by these packages are for example +\begin{itemize} + \item \verb=\ce{}= (mhchem) + \item \verb=\ox{}{}=, \verb=\om[]=, \verb=\op[]=, \verb=\Hyd=, \verb=\Hpl= (chemexec) + \item \verb=\chemfig[][]{}=, \verb=\chemrel[]{}=, \verb=\chemsign[]{}=, \verb=\lewis{}= (\CF) + \item \verb=\declarecompound[]{}=, \verb=\compound{}= (chemcompounds). +\end{itemize} +Some of these commands are used in the examples of this documentation \textit{without being mentioned explicitly}. +Above all, \mC provides commands for creating reaction mechanisms. + +\section{Usage} +\subsection{Background} +\mC provides two environments within which the mechanisms are created. Both environments basically are `tikzpicture'-environments. One might ask oneself: why? You can do loads of stuff with \CF already. And \TikZ provides all the possibilities one could ask for. But since I'm a lazy guy I wrote several macros providing \TikZ commands, I often used. They got so many and got more and more possibilities to adjust, that I bundled them into this package. Of course you can still use \TikZ and stay more flexible with it, if you like. + +\subsection{Basic Principle} +Within the `tikzpicture' reactands and arrows are placed as nodes on a `chain'\footnote{Provided by the tikzlibrary `chains'}. +\begin{SideBySideExample} + \begin{tikzpicture}[start chain] + \node [on chain] {A}; + \node [on chain] {B}; + \node [on chain] {C}; + \end{tikzpicture} +\end{SideBySideExample} +This way there are several possibilities to place the nodes relative to the others. +\begin{SideBySideExample} + \begin{tikzpicture}[start chain=going right,node distance=5mm] + \node [draw,on chain] {Hello}; + \node [draw,on chain] {World}; + \node [draw,continue chain=going below,on chain] {,}; + \node [draw,on chain] {this}; + \node [draw,on chain] {is}; + \end{tikzpicture} +\end{SideBySideExample} +Above all \mC uses the possibility of creating branches to the chain. +\begin{SideBySideExample} + \begin{tikzpicture}[start chain=going right,node distance=5mm] + \node [draw,on chain] {A}; + \node [draw,on chain] {B}; + { [start branch] + \node [on chain=going below] {1}; + \node [on chain=going below] {2}; + } + { [start branch] + \node [on chain=going above] {$\alpha$}; + \node [on chain=going above] {$\beta$}; + } + \node [draw,on chain] {C}; + \end{tikzpicture} +\end{SideBySideExample} +You don't have to understand that mechanism in detail, but you should remember the placement commands in the last example, because \mC uses them in the same way. + +\subsection{How does it work?} +\subsubsection{Basic Commands} +Let's take a look at an example first: +\begin{SideBySideExample} + \begin{rxn} + \reactand{ \chemfig{-[::30]-[::-60]OH} }{} + \arrow{Ox.}{} + \reactand{ \chemfig{-[::30]=_[::-60]O} }{} + \end{rxn} +\end{SideBySideExample} +In this example you see the most important commands of \mC: +\begin{description} + \vitem=\begin{rxn}[<keys>]= The first of two environments. It creates a centered reaction scheme between to paragraphs (see \ref{ssec:rxn}). + \vitem=\reactand[<alignment>]{<formela>}{<anchor>}= places a `node' on the `chain', in\linebreak which the chemical formul\ae\ are written. The default placement is to the \verb=right= (see \ref{ssec:reactand}). + \vitem=\arrow[<keys>]{<above>}{<below>}= creates an arrow, which by default has the length \unit{5}\emlength\ pointing to the right (see \ref{ssec:arrow}). +\end{description} +\begin{SideBySideExample} + \begin{rxn} + \reactand{ \chemfig{-[::30]=_[::-60]O} }{} + \arrow[direction=below]{}{Ox.} + \reactand[below]{ \chemfig{-[::30](-[::60]OH)=_[::-60]O} }{} + \end{rxn} +\end{SideBySideExample} +As you can see one can align the reaction scheme vertical as well. By giving \verb=\reactand= the option \verb=below=, the carbonic acid is placed below the arrow. With the key \verb+direction=below+ the arrow points down instead to the right. + +\subsubsection{Branches} +With what we saw until now it is not yet clear, why one would use \mC. the horizontal reaction schemes can be realized with \CF and `mhchem' just as well. And why would anyone need a vertical reaction scheme? But what could make \mC interesting is the possibility of branched reaction schemes. +\begin{Example} + \begin{rxn} + \reactand{ \chemfig{-[::30]-[::-60]OH} }{} + \arrow{}{} + \reactand{ \chemfig{-[::30]=_[::-60]O} }{carbonyl} + \arrow[direction=below]{}{} + \reactand[below]{ \chemfig{-[::30](-[::60]OH)=_[::-60]O} }{} + \branch[right=of carbonyl]{ + \arrow[type={<=>}]{\ce{NH2R}}{} + \reactand{ \chemfig{-[::30]=_[::-60]N(-[6]H)-[::60]R} }{} + }{} + \end{rxn} +\end{Example} +In the last example you've got to know another important command: +\begin{description} + \vitem=\branch[<alignment>]{<branch commands>}{<anchor>}=\ +\end{description} +The branch was placed right of the first reactand with the anchor \verb=carbonyl= by using the option \verb+right=of carbonyl+. Inside the branch we used an arrow with the key \verb+type={<=>}+ so we would get an equilibrium arrow. Other types would for example be \verb=->= (default), \verb=<-= or \verb=<->=.\\ +Extensive reaction schemes can be realized through multiple usage ao \verb=\branch=: +\begin{Example} + \begin{rxn} + \reactand{ \chemfig{-[::30]-[::-60]OH} }{} + \arrow{}{} + \reactand{ \chemfig{-[::30]=_[::-60]O} }{carbonyl} + \arrow[direction=below]{}{} + \reactand[below]{ \chemfig{-[::30](-[::60]OH)=_[::-60]O} }{} + \branch[right=of carbonyl]{ + \arrow[type={<=>}]{\ce{NH2R}}{} + \reactand{ \chemfig{-[::30]=_[::-60]N(-[6]H)-[::60]R} }{} + }{imin} + \branch[below right=of carbonyl]{ + \arrow[type={<=>},direction=below right]{ \chemfig{[,.75]-[::30]-[::-60]OH} }{} + \reactand[below right]{ \chemfig{-[::30](-[::60]O-[::-60]-[::-60])-[::-60]OH} }{} + }{halbacetal} + \branch[above=of carbonyl,xshift=5.75em]{ + \arrow[direction=above]{ \chemfig{[,.75]-[::30]=_[::-60]O}/\Hpl }{} + \reactand[above]{ \chemfig{-[::30](-[::60]OH)-[::-60]-[::60]=[::60]O} }{} + \arrow{$-\ce{H2O}$}{} + \reactand{ \chemfig{-[::30]=[::-60]-[::60]=[::60]O} }{} + }{aldol} + \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. +\begin{Example} + \begin{rxnscheme}{Keto-enol tautomerization} + \reactand{ \chemfig{=[::30]-[::-60]OH} }{} + \arrow[type={<=>}]{}{} + \reactand{ \chemfig{-[::30]=[::-60]O} }{} + \end{rxnscheme} +\end{Example} +Here we use the environment +\begin{Verbatim} + \begin{rxnscheme}[<keys>]{<caption>} + ... + \end{rxnscheme} +\end{Verbatim} +In the command reference (\ref{ssec:rxnscheme}) you can read how you can customize. + +\subsection{Predefined Values} +There are some predefined values, that are basically due to my personal taste. But of course you can change them according to your requirements. For \CF-formul\ae\ \emph{inside of \mC environments} some values are predefined as follows: +\begin{Verbatim} + \setatomsep{1.8em} + \setcrambond{3pt}{0.5pt}{1pt} +\end{Verbatim} +Outside the \mC environments the defaults of \CF still are set. +\begin{SideBySideExample} + \begin{rxn} + \reactand{\chemfig{**6(------)}}{} + \end{rxn} + \chemfig{**6(------)} +\end{SideBySideExample} +\mC's defaults can be changed with these commands: +\begin{Verbatim} + \bondlength{<length>} + \bondshape{<base length>}{<dash thickness>}{<dash spacing>} + \atomsize{<font size>} +\end{Verbatim} +With these commands, the parameters are changed \emph{for all following} \mC environments. If you leave the arguments empty, default values are restored. Default for \verb=\atomsize= is \verb=\small=. +\begin{SideBySideExample} + \bondlength{2.1em}\bondshape{5pt}{1pt}{2pt}\atomsize{\Large} + \begin{rxn} + \reactand{\chemfig{-[::30](<[::60])-[::-60](<:[::-60])-[::60]}}{} + \end{rxn} + \bondlength{}\bondshape{}{}{}\atomsize{} + \begin{rxn} + \reactand{\chemfig{-[::30](<[::60])-[::-60](<:[::-60])-[::60]}}{} + \end{rxn} +\end{SideBySideExample} +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{SideBySideExample} + \begin{rxn} + \setatomsep{2.1em}\setcrambond{5pt}{1pt}{2pt}\Large + \reactand{\chemfig{-[::30](<[::60])-[::-60](<:[::-60])-[::60]}}{} + \end{rxn} + \begin{rxn} + \reactand{\chemfig{-[::30](<[::60])-[::-60](<:[::-60])-[::60]}}{} + \end{rxn} +\end{SideBySideExample} +The default length of an arrow is \unit{5}\emlength\ or $\unit{5\sqrt{2}}\emlength$ if it's a diagonal one. You can change that by using the following command: +\begin{Verbatim} + \arrowlength{<length>} +\end{Verbatim} +\SaveVerb{arrowlength}=<length>=% +Then the values are \UseVerb{arrowlength} or $\text{\UseVerb{arrowlength}}\cdot\sqrt{2}$ respectively. + +\subsection{Package options}\label{ssec:paketoptionen} +\mC has a number of package options. +\begin{description} + \vitem+english+ With this option, \mC loads the english version of `chemexec', if the package isn't loaded separately before. The name of the \verb=rxnscheme= environment (see \ref{ssec:rxnscheme}) is changed into "Reaction scheme". + \vitem+placement=<position>+ The default placement behaviour of the \verb=rxnscheme= environment is changed to \verb=<position>=. + \vitem+color=<colour>+ This loads `chemexec' with the options \verb=color<colour>= \&\ \verb+shade=true+. + \vitem+nocolor+ `chemexec' is loaded without colour and with the option \verb+shade=false+ (default behaviour of \mC). + \vitem+shade+ loads `chemexec' with the \verb+shade=true+ option. + \vitem+nochemexec+ prevent \mC from loading `chemexec'. + \vitem+nocompounds+\settowidth{\tmplength}{\tt nocompounds}\NEU[\tmplength]prevent \mC from loading `chemcompounds'. + \vitem+nomhchem+\settowidth{\tmplength}{\tt nomhchem}\NEU[\tmplength]prevent \mC from loading `mhchem' lädt, if `chemexec' isn't loaded either. + \vitem+chemstyle+\settowidth{\tmplength}{\tt chemstyle}\NEU[\tmplength]load the `chemstyle' package, without conflicts with \mC. + \vitem+nopackages+\settowidth{\tmplength}{\tt nopackages}\NEU[\tmplength]prevent \mC from loading \emph{any} package (except \CF)\footnote{apart from the ones \mC needs to function (like \TikZ etc.).}. +\end{description} + +\section{Advanced Usage, Usage with \TikZ} +Most of the commands allow alignment with \TikZ code. Using \TikZ code you have much more possibilities aligning reactands relatively to one another. If you are familiar with \TikZ you have even more flexibility, of course (see \ref{ssec:tikzsynthese}). +\begin{SideBySideExample} + \begin{rxn} + \reactand[right,->,green!45!blue!55]{ \chemfig{*6(---(-)---)} }{} + \end{rxn} + \chemfig[->,green!45!blue!55]{*6(---(-)---)} +\end{SideBySideExample} +The last example is not very good, of course, since you can achieve the same result using \CF's own possibilities. But other cases are imaginable: +\begin{Example} + \newcommand{\emptyreactand}{\reactand[right,minimum width=5em]{ \rule[-1em]{1em}{.5pt}\;\rule[-1em]{3em}{.5pt} }{}} + \newcommand{\stoich}{\rule[-3pt]{1em}{.5pt}} + \begin{rxn} + \reactand{\bf\Large Ionic compounds (I)}{} + \reactand[below,yshift=1em]{Fill in the missing parts}{a} + \branch[below=of a]{ \reactand[right,minimum width=5em]{ \stoich\ Na }{}\reactand{$+$}{} \emptyreactand \arrow{}{} \emptyreactand \reactand{$+$}{} \emptyreactand }{b} + \branch[below=of b,draw,inner sep=3pt]{\reactand[right,minimum width=5em]{}{}\reactand{$+$}{}\reactand[right,minimum width=5em]{}{}\arrow{}{}\reactand[right,minimum width=5em]{Sodium chloride $+$ Hydrogen}{}}{} + \end{rxn} +\end{Example} + +\section{Alphabetical Command Reference} +In the following section every command is explained. In some of the examples the nodes (in the \TikZ sense), within which the reactands and arrows are set, are emphasized. This is done by giving them are coloured frame through using the command \verb=\makevisible=, see \ref{ssec:makevisible}. +\subsection{arrow}\label{ssec:arrow} +Reaction arrows are created with \verb=\arrow=. +\begin{Verbatim} + \arrow[<keys>]{<above>}{<below>} +\end{Verbatim} +There are several keys to customize the arrows. They are used like \verb+key=value+. +\begin{description} +\vitem+direction=<direction>+ -- possible values are: + \begin{rxn} + \arrowlength{2.5em} + \dummy[a] + \arrow{}{}\reactand{right}{} + \branch[above right=of a]{\arrow[direction=above right]{}{}\reactand[above right]{above right}{}}{} + \branch[above=of a]{\arrow[direction=above]{}{}\reactand[above]{above}{}}{} + \branch[above left=of a]{\arrow[direction=above left]{}{}\reactand[above left]{above left}{}}{} + \branch[left=of a]{\arrow[direction=left]{}{}\reactand[left]{left}{}}{} + \branch[below left=of a]{\arrow[direction=below left]{}{}\reactand[below left]{below left}{}}{} + \branch[below=of a]{\arrow[direction=below]{}{}\reactand[below]{below}{}}{} + \branch[below right=of a]{\arrow[direction=below right]{}{}\reactand[below right]{below right}{}}{} + \end{rxn} +\vitem+type=<type>+ -- possible values are: + \begin{rxn} + \dummy[a] + \branch[below=of a,yshift=1em]{\arrow{}{}\reactand{\ttfamily type=\{-\textgreater\}}{}}{b} + \branch[below=of b,yshift=1em]{\arrow[type={<-}]{}{}\reactand{\ttfamily type=\{\textless-\}}{}}{c} + \branch[below=of c,xshift=.5em,yshift=1em]{\arrow[type={<->}]{}{}\reactand{\ttfamily type=\{\textless-\textgreater\}}{}}{d} + \branch[below=of d,yshift=1em]{\arrow[type={<=>}]{}{}\reactand{\ttfamily type=\{\textless=\textgreater\}}{}}{e} + \branch[below=of e,yshift=1em]{\arrow[type={-|>}]{}{}\reactand{\ttfamily type=\{-\textbar\textgreater\}}{}}{} + \end{rxn} +\vitem+length=<factor>+ -- the length (\unit{5.0}\emlength, factor = $1.0$, default) is multiplied with this factor. +\vitem+name=<anchor>+ -- this anchor can be used to refer to the arrow, \eg with a branch. +\vitem+both+\settowidth{\tmplength}{\tt both}\NEU[\tmplength]-- this gives both arrow argument nodes the same width and height. +\end{description} +\begin{SideBySideExample} + \begin{rxn} + \dummy\arrow{\ce{Br2}}{$h\nu$} \arrow{\chemfig{-[::30]-[::-60]OH}}{} + \end{rxn} + \begin{rxn} + \dummy\arrow[direction=above]{\ce{Br2}}{$h\nu$} + \end{rxn} + \begin{rxn} + \dummy\arrow[direction=above]{\chemfig{-[::30]-[::-60]OH}}{} + \end{rxn} + \begin{rxn} + \dummy\arrow[direction=above right]{\ce{Br2}}{$h\nu$} + \end{rxn} + \begin{rxn} + \dummy\arrow[direction=above right]{\chemfig{-[::30]-[::-60]OH}}{} + \end{rxn} +\end{SideBySideExample} +Most keys in action: +\begin{SideBySideExample} + \begin{rxn} + \reactand{A}{} + \arrow[name=arrow_a]{B}{} + \branch[above=of arrow_a,yshift=-4em]{ + \arrow[type=<-,direction=above,length=.7]{}{} + \reactand[above]{D}{} + }{} + \reactand{C}{} + \end{rxn} +\end{SideBySideExample} +If an arrow is placed inside a branch (see \ref{ssec:branch}) the alignment of the branch possibly is determined by the width and height of the arrow arguments. If these arguments have different sizes, the alignment can go wrong. +\begin{SideBySideExample} + \makevisible + \begin{rxn} + \reactand{A}{a} + \arrow{}{} + \branch[below=of a]{ + \arrow[direction=below]{\chemfig{-[::30]-[::-60]OH}}{} + }{} + \end{rxn} + \makeinvisible +\end{SideBySideExample} +By using the key \verb=both=, both argument nodes have the same size, which can correct the alignment. +\begin{SideBySideExample} + \makevisible + \begin{rxn} + \reactand{A}{a} + \arrow{}{} + \branch[below=of a]{ + \arrow[direction=below,both]{\chemfig{-[::30]-[::-60]OH}}{} + }{} + \end{rxn} + \makeinvisible +\end{SideBySideExample} +There is more about the alignment problem in \ref{sssec:branch_ausrichtung}. + +\subsection{arrowlength} +The default length of an reaction arrow is \unit{5.0}\emlength\ or $\unit{5.0\cdot\sqrt{2}}\emlength$ for the diagonal ones. You can change these values using +\begin{Verbatim} + \arrowlength{<length>} +\end{Verbatim} +into \UseVerb{arrowlength} or $\text{\UseVerb{arrowlength}}\cdot\sqrt{2}$, respectively. Mind the fact that you have to use a length unit. + +\subsection{atomsize} +With +\begin{Verbatim} + \atomsize{<font size>} +\end{Verbatim} +you can change the font size of the atom groups. Default value is \verb=\small=. + +\subsection{bondlength} +With +\begin{Verbatim} + \bondlength{<length>} +\end{Verbatim} +you can change \verb=\setatomsep{<length>}= for all \CF formul\ae\ \emph{inside} of the\\ +\mC environments. Default value is \unit{1.8}\emlength. + +\subsection{bondshape} +With +\begin{Verbatim} + \bondshape{<base length>}{<dash thickness>}{<dash spacing>} +\end{Verbatim} +you can change \verb=\setcrambond{<base length>}{<dash thickness>}{<dash spacing>}= for all \CF formul\ae\ \emph{inside} of the \mC environments. Default values are (in this order) \unit{3}\pt, \unit{.5}\pt\ and \unit{1}\pt. + +\subsection{branch}\label{ssec:branch} +\verb=\branch= is used to, well, create a branch to a reaction. +\begin{Verbatim} + \branch[<alignment>]{<branch code>}{<anchor>} +\end{Verbatim} +For \verb=\branch= alignment an anchor is important. Let's take a look at an example: +\begin{Example} + \begin{rxn} + \reactand{\chemfig{-[::30]=[::-60](-[::-60])-[::60]}}{start} + \arrow[length=.75]{\ce{HCl}}{} + \reactand{\chemfig{-[::30]-[::-60](-[::120]Cl)(-[::-60])-[::60]}}{} + \reactand{\chemsign+\chemfig{-[::30](-[::60]Cl)-[::-60](-[::-60])-[::60]}}{} + \branch[below right=of start]{ + \arrow[direction=below right,length=.75]{\ce{H2O}}{} + \reactand[below right]{\chemfig{-[::30]-[::-60](-[::120]OH)(-[::-60])-[::60]}}{} + \reactand{\chemsign+\chemfig{-[::30](-[::60]OH)-[::-60](-[::-60])-[::60]}}{} + }{} + \end{rxn} +\end{Example} +The first reactand got the anchor \texttt{start} (line 2, also see \ref{ssec:reactand}). +\begin{Verbatim}[firstnumber=2] + \reactand{ ... }{!!start!!} +\end{Verbatim} +\verb=\branch= now refers to it in its alignment (line 6): +\begin{Verbatim}[firstnumber=6] + \branch[below right!!=of start!!]{ ... }{} +\end{Verbatim} +If you don't use the alignment reference to an anchor, you automatically refer to the last \verb=\reactand= or \verb=\arrow=. If you don't use alignment at all, then the branch is aligned to the right of the last \verb=\reactand= or \verb=\arrow=. +\begin{SideBySideExample} + \begin{rxn} + \reactand{ \chemfig{CH_2=CH-OH} }{} + \arrow[type={<=>},length=.5]{}{} + \branch{ \reactand{ \chemfig{CH_3-CH=O} }{} }{} + \end{rxn} +\end{SideBySideExample} +%Using \TikZ code you have far more possibilities: +%\begin{SideBySideExample} +% \begin{rxn} +% \reactand{reactand}{reactand} +% \branch[right,xshift=2.2em,yshift=.8em,rotate=-20]{ +% \arrow{}{} +% \reactand[right,rotate=20]{product}{product} +% }{} +% \end{rxn} +%\end{SideBySideExample} + +\subsubsection{Alignment problems}\label{sssec:branch_ausrichtung} +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 \verb=\arrow= key \verb=both= isn't a solution, since the smaller argument then is not placed next to the arrow but is centered in its node. +\begin{SideBySideExample} + \makevisible + \begin{rxn} + \reactand{A}{a} + \arrow{}{} + \branch[below=of a]{ + \arrow[direction=below,both]{\chemfig{-[::30]-[::-60]OH}}{\Hpl} + }{} + \end{rxn} + \makeinvisible +\end{SideBySideExample} +What you have to do is shift the branch using the \TikZ keys \verb=xshift= and \verb=yshift=. +\begin{SideBySideExample} + \makevisible + \begin{rxn} + \reactand{A}{a} + \arrow{}{} + \branch[below=of a,xshift=-1.35em]{ + \arrow[direction=below]{\chemfig{-[::30]-[::-60]OH}}{\Hpl} + }{} + \end{rxn} + \makeinvisible +\end{SideBySideExample} + +\subsection{dummy} +\verb=\dummy= creates an empty node. \verb=\arrow= needs to follow after a node, because \verb=\arrow= internally uses \verb=\tikzchainprevious=. If there is no node on the chain \emph{before} \verb=\arrow= is used, it will cause an error. But by using \verb=\dummy= you can start a scheme with an arrow anyway. +\begin{SideBySideExample} + \begin{rxn} + \dummy\arrow{}{} + \end{rxn} +\end{SideBySideExample} + +\subsection{elmove} +\verb=\elmove= just is a shortcut for \CF's \verb=\chemmove=. +\begin{Verbatim} + \elmove[<tikz>]{<start>}{<start direction>}{<end>}{<end direction>} +\end{Verbatim} +This is expanding the command +\begin{Verbatim} + \chemmove{\draw[!!<tikz>!!](!!<start>!!).. controls +(!!<start direction>!!) and +(!!<end direction>!!)..(!!<end>!!);} +\end{Verbatim} +using \verb?[->,red,shorten <=3pt,shorten >=1pt]? as default for \verb=<tikz>=. How you use \texttt{\textbackslash chem\-move} is described in the documentation for \CF. + +\begin{SideBySideExample} + \begin{center} + \setatomsep{1.8em} + \chemfig{*6(=[@{e1}]-=-(-[:120]Br)(-[:60]H)-(-[:-30,.4,,,white]\oplus)-[@{e2}])} + \elmove{e1}{60:4mm}{e2}{0:4mm} + \end{center} +\end{SideBySideExample} + +\subsection{makeinvisible}\label{ssec:makeinvisible} +\NEU% +\verb=\makeinvisible= restores the normal \mC behaviour after \verb=\makevisible= (see \ref{ssec:makevisible}) has been used. \verb=\makeinvisible= only changes the looks of nodes following after it. + +\subsection{makevisible}\label{ssec:makevisible} +\NEU% +With \verb=\makevisible= you can visualize the nodes within which reactands, arrows and branches are set. This is useful when you're aligning branches, for example. You can see an example for \verb=\makevisible= in \ref{ssec:arrow}. Every kind of nodes is emphasized with a different colour: + +\tikz[baseline=(X.base)]\node[draw=red!60](X){\texttt{\textbackslash reactand\{\}\{\}}};, \tikz[baseline=(X.base)]\node[draw=green!60](X){\texttt{\textbackslash arrow\{above\}\{\}}};, \tikz[baseline=(X.base)]\node[draw=blue!60](X){\texttt{\textbackslash arrow\{\}\{below\}}}; und \tikz[baseline=(X.base)]\node[draw=purple, dotted](X){\texttt{\textbackslash branch\{\}\{\}}};. Also see \ref{ssec:makeinvisible}. + + \verb=\makevisible= only changes the looks of nodes following after it. +\begin{SideBySideExample} + \makevisible + \begin{rxn} + \reactand{A}{a} + \arrow{a}{b} + \branch[below=of a]{ + \arrow[direction=below,both]{a}{b} + }{} + \end{rxn} + \makeinvisible +\end{SideBySideExample} + +\subsection{marrow}\label{ssec:marrow} +\verb=\marrow= creates a double-headed arrow. +\begin{Verbatim} + \marrow[<direction>] +\end{Verbatim} +It is a shortcut for \verb+\arrow[type=<->,length=.5,direction=<direction>]{}{}+. You can use \verb=<direction>= like the alignment option of \verb=\reactand= (see \ref{ssec:reactand} or \ref{ssec:mesomeric}). + +\subsection{merge}\label{ssec:merge} +\verb=\merge= cannot only be used in \mC's environments but also in a `tikzpicture'. With \verb=\merge= you can, well, two branches into one. To be able to do that, you need to refer to anchors. +\begin{Verbatim} + \merge[<key>]{<target>}{<start a>}{<start b>} +\end{Verbatim} +\begin{SideBySideExample} + \begin{center} + \begin{tikzpicture} + \node(a) at (0,0) {A}; + \node(b) at (10em,0) {B}; + \node[draw,minimum size=3em](c) at (5em,-8em) {C}; + \merge{c}{a}{b} + \node(d) at (0,-16em) {D}; + \node(e) at (10em,-16em) {E}; + \merge[direction=above]{c}{d}{e} + \node(f) at (-3em,-4em) {F}; + \node(g) at (-3em,-12em) {G}; + \merge[direction=right]{c}{f}{g} + \node(h) at (13em,-4em) {H}; + \node(i) at (13em,-12em) {I}; + \merge[direction=left]{c}{h}{i} + \end{tikzpicture} + \end{center} +\end{SideBySideExample} +Usage of \verb=\merge= in a \mC environment: +\begin{Example} + \begin{rxn} + \setatomsep{1em}\tiny + % branch 1 + \reactand{ \chemfig{Cl-[:30,1.5]--[:-30,1.5]O-[:30,1.5]--[:-30,1.5]Cl}{} }{above} + \arrow[length=.5]{}{} + \reactand{ \chemfig{O(-[:-150]**6(-----(-OH)-))-[:90]-[:30]-[:-30]O-[:30]-[:-30]-[:-90]O-[:-30]**6(-(-HO)-----)} }{start_above} + % branch 2 + \branch[below=of above,xshift=8em,yshift=-4em]{ + \reactand{ \chemfig{**6((--[6,,,2]HO)-N-(--[6]OH)----)} }{} + \arrow[length=.5]{}{} + \reactand{ \chemfig{**6((--[6]Br)-N-(--[6]Br)----)} }{} + }{start_below} + % target + \branch[right=of start_above,xshift=5em,yshift=-4em]{ + \reactand{ \chemfig{O(-[:-150]**6(-----(-O?)-))-[:90]-[:30]**6(-N-(--[:-90]O-[:-30]**6(-(-O-[6]-[:-150]-[:150]O-[:-150]-[:150]?)-----))----)} }{c} + }{target} + % merging: + \merge[direction=right]{target}{start_above}{start_below} + \end{rxn} +\end{Example} +Please note, that you should use branches to refer to, when you use \verb=\merge= in a \mC environment. Using \verb=\merge= may afford playing with xshift and yshift until you get the result you want. +\begin{Example} + \begin{rxn} + \setatomsep{1.5em} + \reactand{ \chemname{\chemfig{**6(---(-NH_2)---)}}{aniline} }{start_aa} + \reactand[below,yshift=-3em]{ \chemname{\ce{HNO2}}{nitrous acid} }{start_ab} + \branch[right=of start_aa,xshift=6em,yshift=-5em]{ + \reactand{ \chemname{\chemfig{**6(---(-N|_2\op)---)}}{diazonium ion} }{} + }{target_a}% = start_ba + \branch[below=of target_a,yshift=-3em]{ + \reactand{ \chemname{\chemfig{**6(---(-NH_2)---)}}{aniline} }{} + }{start_bb} + \branch[right=of target_a,xshift=6em,yshift=-5em]{ + \reactand{ \chemname{\chemfig{N(-[:-150]**6(------))=N-[:-30]**6(---(-NH_2)---)}}{aniline yellow} }{} + }{target_b} + \merge[direction=right]{target_a}{start_aa}{start_ab} + \merge[direction=right]{target_b}{target_a}{start_bb} + \end{rxn} +\end{Example} + +\subsection{mesomeric}\label{ssec:mesomeric} +The \verb=\mesomeric= command works just like \verb=\reactand= (see \ref{ssec:reactand}) but places the formula into square brackets. +\begin{Verbatim} + \mesomeric[<alignment>]{<formula>}{<anchor>} +\end{Verbatim} +The resonance formul\ae\ are written into \verb=<formula>=. With \verb=\marrow= (see \ref{ssec:marrow}) you create the resonance arrows. If needed you can give an anchor (\verb=<anchor>=) to \verb=\mesomeric= (also see \ref{ssec:branch}). Alignment is used the same way as with \verb=\reactand=. +\begin{Example} + \begin{rxn} + \mesomeric{ + \reactand{ + \chemfig{*6(=[@{e1}]-=-(-[:120]X)(-[:60]H)-(-[:-30,.4,,,white]\oplus)-[@{e2}])} + \elmove{e1}{60:4mm}{e2}{0:4mm} + }{} + \marrow + \reactand{ + \chemfig{*6(-(-[:90,.4,,,white]\oplus)-[@{e4}]=[@{e3}]-(-[:120]X)(-[:60]H)-=)} + \elmove{e3}{180:4mm}{e4}{150:4mm} + }{} + \marrow + \reactand{ + \chemfig{*6(-=-(-[:-150,.4,,,white]\oplus)-(-[:120]X)(-[:60]H)-=)} + }{} + }{} + \end{rxn} +\end{Example} +Or vertical, too: +\begin{SideBySideExample} + \begin{rxn} + \mesomeric{ + \reactand{ \chemfig{*6(=-=-=-)} }{} + \marrow[below] + \reactand[below]{ \chemfig{*6(-=-=-=)} }{} + }{} + \end{rxn} +\end{SideBySideExample} +Or maybe a coordination complex? +\begin{SideBySideExample} + \begin{rxn} + \setatomsep{3em} + \mesomeric{ + \reactand{ \chemfig{H_3\lewis{0,N}-[,1.35,,,dotted]{Cu}(-[2,,,,dotted]\lewis{6,N}H_3)(-[6,,,,dotted]\lewis{2,N}H_3)-[,1.2,,,dotted]\lewis{4,N}H_3} }{} + }{a} + \node[above right=of a,yshift=-1em] {$2\oplus$}; + \end{rxn} +\end{SideBySideExample} + +\subsection{reactand}\label{ssec:reactand} +The command \verb=\reactand= is somehow the basic command of \mC. +\begin{Verbatim} + \reactand[<alignment>]{<formula>}{<anchor>} +\end{Verbatim} +In this command the actual formul\ae\ are written (\verb=<formula>=). If needed, they can be given an anchor (\verb=<anchor>=). The optional argument \verb=<alignment>= can have 8 different values: +\begin{inparaenum}[(a)] + \item \verb=right=, + \item \verb=above right=, + \item \verb=above=, + \item \verb=above left=, + \item \verb=left=, + \item \verb=below left=, + \item \verb=below=, + \item \verb=below right= +\end{inparaenum} +Default is \verb=right=. You use this argument to place the reactand relatively to the reactand or arrow right before. +\begin{SideBySideExample} +%horizontal: + \begin{rxn} + \reactand{\ce{Br2}}{} + \reactand[below]{\ce{Cl2}}{} + \end{rxn} + +%more than one reactand: + \begin{rxn} + \reactand{\ce{Br2}}{} + \reactand[below]{\ce{I2}}{} + \reactand{\ce{Cl2}}{} + \end{rxn} + +%vertical reaction: + \begin{rxn} + \reactand{\ce{Br-Br}}{} + \arrow[length=.5,direction=below]{$h\nu$}{} + \reactand[below]{\ce{2 ~\lewis{0.,Br}}}{} + \end{rxn} +\end{SideBySideExample} + +\subsection{rxn (environment)}\label{ssec:rxn} +\verb=rxn= is a non-floating not numbered environment for reaction schemes. All schemes are centered. +\begin{Verbatim} + \begin{rxn}[<keys>] + ... + \end{rxn} +\end{Verbatim} +The optional argument \verb=<scale factor>= has the same effect as has the key \verb+scale=<scale+\linebreak\verb+factor>+ on \verb=rxnscheme=. Default is $1.0$. + +\subsubsection{Options}\label{sssec:rxn_optionen} +\NEU\verb=rxn= has two keys: +\begin{description} + \vitem+align=<alignment>+ alignment behaviour of the \verb=rxn= environment; default is `center' + \vitem+scale=<factor>+ factor by which the \verb=rxn= environment is scaled; default: `1.0' +\end{description} +\begin{Example} + \begin{rxn}[align=center] + \reactand{center}{}\arrow{}{}\reactand{centered}{} + \end{rxn} + \begin{rxn}[align=right] + \reactand{right}{}\arrow{}{}\reactand{raggedleft}{} + \end{rxn} + \begin{rxn}[align=left] + \reactand{left}{}\arrow{}{}\reactand{raggedright}{} + \end{rxn} +\end{Example} + +\subsection{rxnscheme (environment)}\label{ssec:rxnscheme} +\verb=\rxnscheme= is a floating environment for reaction schemes. +\begin{Verbatim} + \begin{rxnscheme}[<keys>]{<caption>} + ... + \end{rxnscheme} +\end{Verbatim} +\subsubsection{Options}\label{sssec:rxnscheme_optionen} +\begin{description} + \vitem+label=<label>+ Like every other floating environment \verb=rxnscheme= can be given a label. To do that, you need to use the key \verb+label=<label>+. For example if you use +\begin{Verbatim} + \begin{rxnscheme}[label={rs:schema}]{<caption>} + ... + \end{rxnscheme} +\end{Verbatim} +you can refer to it by using \verb=\ref{rs:schema}= as usual. +\vitem+scale=<factor>+ \verb=rxnscheme= has another key with which the scheme can be scaled. Please keep in mind that it doesn't affect the font size and the size of the \CF formul\ae. +\begin{Verbatim} + \begin{rxnscheme}[placement=<placement>]{<caption>} + ... + \end{rxnscheme} +\end{Verbatim} + \vitem+align=<alignment>+\settowidth{\tmplength}{\tt align=<ausrichtung>}\NEU[\tmplength]This key changes the alignment of the scheme. You can choose between \verb=left=, \verb=center= and \verb=right=. +\end{description} +\begin{Example} + \begin{rxnscheme}[scale=2]{Big scheme} + \large\setatomsep{3.5em} + \reactand{ \chemfig{=[::30]-[::-60]OH} }{} + \arrow[type={<=>}]{}{} + \reactand{ \chemfig{-[::30]=[::-60]O} }{} + \end{rxnscheme} + \begin{rxnscheme}[scale=.5]{Small scheme} + \tiny\setatomsep{1em} + \reactand{ \chemfig{=[::30]-[::-60]OH} }{} + \arrow[type={<=>}]{}{} + \reactand{ \chemfig{-[::30]=[::-60]O} }{} + \end{rxnscheme} + \begin{rxnscheme}{center} + \reactand{center}{}\arrow{}{}\reactand{centered}{} + \end{rxnscheme} + \begin{rxnscheme}[align=right]{right} + \reactand{right}{}\arrow{}{}\reactand{raggedleft}{} + \end{rxnscheme} + \begin{rxnscheme}[align=left]{left} + \reactand{left}{}\arrow{}{}\reactand{raggedright}{} + \end{rxnscheme} +\end{Example} + +\subsubsection{Customizing rxnscheme} +\paragraph{Style} +If you don't like the style of \verb=rxnscheme= you can change it by using +\begin{Verbatim} + \floatstyle{<new style>} + \restylefloat{rxnfloat} +\end{Verbatim} +There are different possible styles, privided by the `float' package: +\begin{description} + \vitem=plain= without any special formatting, the caption is below the object + \vitem=plaintop= like \verb=plain=, but the caption is placed above the object + \vitem=boxed= the object is boxed, the caption placed below + \vitem=ruled= the caption is placed above the object framed by to rules, one above and one below, another rule frames the object below; default for \verb=rxnscheme= +\end{description} +\begin{Example} + \begin{rxnscheme}{ruled} + \reactand{default style}{} + \end{rxnscheme} + \floatstyle{boxed} + \restylefloat{rxnfloat} + \begin{rxnscheme}{boxed} + \reactand{framed object}{} + \end{rxnscheme} + \floatstyle{plain} + \restylefloat{rxnfloat} + \begin{rxnscheme}{plain} + \reactand{without any special formatting}{} + \end{rxnscheme} +\end{Example} +\floatstyle{ruled} +\restylefloat{rxnfloat} +\paragraph{Placement} +Usually floating environments have an optional argument for their placement. \verb=rxnscheme='s default placement is \verb=H= which means, it is placed \emph{exactly here}. If you want to change it into \verb=htp= or something, you can use +\begin{Verbatim} + \floatplacement{rxnfloat}{<placement>} +\end{Verbatim} +It's easier, though, loading \mC with the `placement' option: +\begin{Verbatim} + \usepackage[placement=<placement>]{mychemistry} +\end{Verbatim} +This will change the default placement behaviour from \verb=H= to \verb=<placement>=. You can also change the placement behaviour of just one \verb=rxnscheme= environment by using the placement key: +\begin{Verbatim} + \begin{rxnscheme}[placement=<placement>]{<caption>} + ... + \end{rxnscheme} +\end{Verbatim} + +\paragraph{Name}\label{par:rxnscheme_name} +If you want to change the name of reaction scheme\footnote{You probably do. You reading the English documention means probably, that you're not German.}, you can do that with +\begin{Verbatim} + \setschemename{<new name>} +\end{Verbatim} +The default name is "Reaktionschema" or, with package option `english', "Reaction scheme". +\paragraph{Counter} +The counter can be changed just as usual. For example by using +\begin{Verbatim} + \makeatletter + \@addtoreset{rxnfloat}{section} + \makeatletter + \renewcommand{\therxnscheme}{\arabic{section}.\arabic{rxnscheme}} +\end{Verbatim} +the counter is reset with every new section an looks like \verb=section.rxnscheme=. Please be aware, that you have to write \verb=\@addtoreset= between \verb=\makeatletter= and \verb=\makeatother= because of the {@}. +\paragraph{List of schemes} +By writing +\begin{Verbatim} + \listof{rxnfloat}{<title>} +\end{Verbatim} +you can create a list of all schemes created with \verb=rxnscheme=. +\begin{SideBySideExample} + \listof{rxnfloat}{Reaction schemes} +\end{SideBySideExample} + +\subsection{setrcndist}\label{ssec:setrcndist} +\NEU% +The nodes within which the reactands an arrows are set have a certain distance between them. The default distance is \unit{1}\emlength. If you want to change that, you can use +\begin{Verbatim} + \setrcndist{<länge>} +\end{Verbatim} +If you leave the argument empty, the distance is reset to \unit{1}\emlength. +\begin{SideBySideExample} + \setrcndist{2em} + \begin{rxn} + \reactand{A}{}\arrow{}{} + \end{rxn} + \setrcndist{} + \begin{rxn} + \reactand{A}{}\arrow{}{} + \end{rxn} +\end{SideBySideExample} + +\subsection{setrxnalign/setschemealign} +\NEU% +With the commands +\begin{Verbatim} + \setrxnalign{<alignment>} + \setschemealign{<alignment>} +\end{Verbatim} +The default alignment behaviour of \verb=rxn= and \verb=rxnscheme= (see \ref{sssec:rxn_optionen} \&\ \ref{sssec:rxnscheme_optionen}) can be set. You can choose between \verb=left=, \verb=center= and \verb=right=. + +If you leave the argument empty, \mC's default behaviour (\verb=center=) is restored. +\begin{Example} + \setrxnalign{right} + \begin{rxn} + \reactand{A}{}\arrow{}{}\reactand{B}{} + \end{rxn} + \setrxnalign{} + \begin{rxn} + \reactand{A}{}\arrow{}{}\reactand{B}{} + \end{rxn} +\end{Example} + +\subsection{setschemename} +See \ref{par:rxnscheme_name}. + +\subsection{transition}\label{ssec:transition} +\verb=\transition= works exactly like \verb=\mesomeric= (see \ref{ssec:mesomeric}). +\begin{Verbatim} + \transition[<alignment>]{<formula>}{<anchor>} +\end{Verbatim} +\begin{SideBySideExample} + \begin{rxn} + \reactand{ \ce{H2 + I2} }{} + \arrow[type={<=>},length=.5,direction=below]{}{} + \transition[below]{ + \reactand{ \chemfig[dotted][]{H?-I-[2]I-[4]H?} }{} + }{} + \arrow[type={<=>},length=.5,direction=below]{}{} + \reactand[below]{ \ce{2 HI} }{} + \end{rxn} +\end{SideBySideExample} + +\section{Examples} +\subsection{Addition Reaction}\label{ssec:addition} +A simple reaction scheme with two different products. +\begin{rxnscheme}{addition reaction} + \reactand{ \chemfig{=_[::-30]-[::60](=[::60]O)-[::-60]} }{} + \arrow{ $+ \Hpl$ }{} + \mesomeric{ + \reactand{ \chemfig{=_[:-30]-[::60](-[::60]OH)(-[::-120,.3,,,white]\oplus)-[::-60]} }{} + \marrow[below] + \reactand[below]{ \chemfig{\oplus-[6,.3,,,white]-[:-30]=_[::60](-[::60]OH)-[::-60]} }{} + }{rf} + \branch[right=of rf,yshift=3em]{ + \arrow{}{} + \reactand{ \chemname{\chemfig{=_[:-30]-[::60](-[::60]OH)(-[::-120]R)-[::-60]}}{1,2-adduct} }{} + }{} + \branch[right=of rf,yshift=-5em]{ + \arrow{}{} + \reactand{ \chemname{\chemfig{R-[6]-[:-30]=_[::60](-[::60]OH)-[::-60]}}{1,4-adduct} }{} + }{} +\end{rxnscheme} + +Let's take a closer look, step after step. At first we write the first reactand and the reaction arrow. +\begin{Verbatim} + \reactand{ \chemfig{=_[::-30]-[::60](=[::60]O)-[::-60]} }{} + \arrow{ $+ \Hpl$ }{} +\end{Verbatim} +\begin{rxn} + \reactand{ \chemfig{=_[::-30]-[::60](=[::60]O)-[::-60]} }{} + \arrow{ $+ \Hpl$ }{} +\end{rxn} +Then we write the resonance formul\ae. The \verb=\mesomeric= gets the anchor \verb=rf= (line 7). +\begin{Verbatim}[firstnumber=3] + \mesomeric{ + \reactand{ \chemfig{=_[:-30]-[::60](-[::60]OH)(-[::-120,.3,,,white]\oplus)-[::-60]} }{} + \marrow[below] + \reactand[below]{ \chemfig{\oplus-[6,.3,,,white]-[:-30]=_[::60](-[::60]OH)-[::-60]} }{} + }{rf} +\end{Verbatim} +\begin{rxn} + \reactand{ \chemfig{=_[::-30]-[::60](=[::60]O)-[::-60]} }{} + \arrow{ $+ \Hpl$ }{} + \mesomeric{ + \reactand{ \chemfig{=_[:-30]-[::60](-[::60]OH)(-[::-120,.3,,,white]\oplus)-[::-60]} }{} + \marrow[below] + \reactand[below]{ \chemfig{\oplus-[6,.3,,,white]-[:-30]=_[::60](-[::60]OH)-[::-60]} }{} + }{rf} +\end{rxn} +Now comes the 1,2-adduct, placed in a branch referring \verb=rf=, shifted above with yshift: +\begin{Verbatim}[firstnumber=8] + \branch[right=of rf,yshift=3em]{ + \arrow{}{} + \reactand{ \chemname{\chemfig{=_[:-30]-[::60](-[::60]OH)(-[::-120]R)-[::-60]}}{1,2-adduct} }{} + }{} +\end{Verbatim} +\begin{rxn} + \reactand{ \chemfig{=_[::-30]-[::60](=[::60]O)-[::-60]} }{} + \arrow{ $+ \Hpl$ }{} + \mesomeric{ + \reactand{ \chemfig{=_[:-30]-[::60](-[::60]OH)(-[::-120,.3,,,white]\oplus)-[::-60]} }{} + \marrow[below] + \reactand[below]{ \chemfig{\oplus-[6,.3,,,white]-[:-30]=_[::60](-[::60]OH)-[::-60]} }{} + }{rf} + \branch[right=of rf,yshift=3em]{ + \arrow{}{} + \reactand{ \chemname{\chemfig{=_[:-30]-[::60](-[::60]OH)(-[::-120]R)-[::-60]}}{1,2-adduct} }{} + }{} +\end{rxn} +At last we write the branch containing the 1,4-adduct, also referencing \verb=rf=, shifted below with yshift: +\begin{Verbatim}[firstnumber=12] + \branch[right=of rf,yshift=-5em]{ + \arrow{}{} + \reactand{ \chemname{\chemfig{R-[6]-[:-30]=_[::60](-[::60]OH)-[::-60]}}{1,4-adduct} }{} + }{} +\end{Verbatim} +\begin{rxn} + \reactand{ \chemfig{=_[::-30]-[::60](=[::60]O)-[::-60]} }{} + \arrow{ $+ \Hpl$ }{} + \mesomeric{ + \reactand{ \chemfig{=_[:-30]-[::60](-[::60]OH)(-[::-120,.3,,,white]\oplus)-[::-60]} }{} + \marrow[below] + \reactand[below]{ \chemfig{\oplus-[6,.3,,,white]-[:-30]=_[::60](-[::60]OH)-[::-60]} }{} + }{rf} + \branch[right=of rf,yshift=3em]{ + \arrow{}{} + \reactand{ \chemname{\chemfig{=_[:-30]-[::60](-[::60]OH)(-[::-120]R)-[::-60]}}{1,2-adduct} }{} + }{} + \branch[right=of rf,yshift=-5em]{ + \arrow{}{} + \reactand{ \chemname{\chemfig{R-[6]-[:-30]=_[::60](-[::60]OH)-[::-60]}}{1,4-adduct} }{} + }{} +\end{rxn} +The complete code looks like this: +\begin{Verbatim} + \begin{rxnscheme}{addition reaction} + \reactand{ \chemfig{=_[::-30]-[::60](=[::60]O)-[::-60]} }{} + \arrow{ $+ \Hpl$ }{} + \mesomeric{ + \reactand{ \chemfig{=_[:-30]-[::60](-[::60]OH)(-[::-120,.3,,,white]\oplus)-[::-60]} }{} + \marrow[below] + \reactand[below]{ \chemfig{\oplus-[6,.3,,,white]-[:-30]=_[::60](-[::60]OH)-[::-60]} }{} + }{rf} + \branch[right=of rf,yshift=3em]{ + \arrow{}{} + \reactand{ \chemname{\chemfig{=_[:-30]-[::60](-[::60]OH)(-[::-120]R)-[::-60]}}{1,2-adduct} }{} + }{} + \branch[right=of rf,yshift=-5em]{ + \arrow{}{} + \reactand{ \chemname{\chemfig{R-[6]-[:-30]=_[::60](-[::60]OH)-[::-60]}}{1,4-adduct} }{} + }{} + \end{rxnscheme}} +\end{Verbatim} + +\newpage +\subsection{Mesomerism} +We want to display the following reaction scheme: +\begin{rxnscheme}[scale=.8]{electrophilic substitution} + \setatomsep{1.6em} + \reactand{ \chemname{\chemfig{*6(-=-=(-[,,,,white]\phantom{Br})-=)}}{benzene \compound{benzene}} }{start} + + \branch[below=of start]{ + \arrow[direction=below,name=arrow_a]{\ce{Br2 / AlBr3}}{$-\ce{AlBr4\om}$} + }{} + + \branch[below=of arrow_a,xshift=8.5em]{ + \mesomeric{ + \reactand{ + \chemfig{*6(=[@{e1}]-=-(-[:120]Br)(-[:60]H)-(-[:-30,.4,,,white]\oplus)-[@{e2}])} + \elmove{e1}{60:4mm}{e2}{0:4mm} + }{m1} + \marrow + \reactand{ + \chemfig{*6(-(-[:90,.4,,,white]\oplus)-[@{e4}]=[@{e3}]-(-[:120]Br)(-[:60]H)-=)} + \elmove{e3}{180:4mm}{e4}{150:4mm} + }{m1} + \marrow + \reactand{ + \chemfig{*6(-=-(-[:-150,.4,,,white]\oplus)-(-[:120]Br)(-[:60]H)-=)} + }{m3} + }{} + }{mesomerism} + + \branch[above=of mesomerism,xshift=7.25em]{ + \arrow[direction=above]{$-\Hpl$}{} + }{} + + \arrow[length=2.6]{}{} + \reactand{ \chemname{\chemfig{*6(-=-=(-Br)-=)}}{bromobenzene \compound{bromobenzene}} }{} +\end{rxnscheme} + +First we write the main reaction. To do so, we use the commands \verb=\reactand=, \verb=\arrow= and the environment \verb=\begin{rxn} ... \end{rxn}=. +\begin{Verbatim} + \begin{rxn} + \reactand{ + \chemname{\chemfig{*6(-=-=-=)}}{benzene \compound{benzene}} + }{} + \arrow{}{} + \reactand{ + \chemname{\chemfig{*6(-=-=(-Br)-=)}}{bromobenzene \compound{bromobenzene}} + }{} + \end{rxn} +\end{Verbatim} + \begin{rxn} + \reactand{ + \chemname{\chemfig{*6(-=-=-=)}}{benzene \compound{benzene}} + }{} + \arrow{}{} + \reactand{ + \chemname{\chemfig{*6(-=-=(-Br)-=)}}{bromobenzene \compound{bromobenzene}} + }{} + \end{rxn} +Now we make it a little bit smaller: +\begin{Verbatim} + \begin{rxn}!![scale=.8] + \setatomsep{1.6em}!! + \reactand{ + \chemname{\chemfig{*6(-=-=-=)}}{benzene \compound{benzene}} + }{} + \arrow{}{} + \reactand{ + \chemname{\chemfig{*6(-=-=(-Br)-=)}}{bromobenzene \compound{bromobenzene}} + }{} + \end{rxn} +\end{Verbatim} + \begin{rxn}[scale=.8] + \setatomsep{1.6em} + \reactand{ + \chemname{\chemfig{*6(-=-=-=)}}{benzene \compound{benzene}} + }{} + \arrow{}{} + \reactand{ + \chemname{\chemfig{*6(-=-=(-Br)-=)}}{bromobenzene \compound{bromobenzene}} + }{} + \end{rxn} +We have two possibilities to align both benzene rings at the same height. Either we shift the second one up using \TikZ code: +\begin{Verbatim}[firstnumber=7] + \reactand[!!right,yshift=1em!!]{ + \chemname{\chemfig{*6(-=-=(-Br)-=)}}{bromobenzene \compound{bromobenzene}} + }{} +\end{Verbatim} +Please notice, that you have to write the alignment-command of the second reactand \textbf{explicitly} in order to use \TikZ. This is not the best solution, because the arrow isn't centered with respect to the rings. + \begin{rxn} + \reactand{ + \chemname{\chemfig{*6(-=-=-=)}}{benzene \compound{benzene}} + }{} + \arrow{}{} + \reactand[right,yshift=1em]{ + \chemname{\chemfig{*6(-=-=(-Br)-=)}}{bromobenzene \compound{bromobenzene}} + }{} + \end{rxn} +The second possibility would be to shift the first ring down. We can't achieve that by using \TikZ code, because the following arrow and reactand align themselves with respect to the reactand or arrow directly before. But we can write an invisible bromine to the first benzene to do the trick: +\begin{Verbatim}[firstnumber=3] + \reactand{ + \chemname{\chemfig{*6(-=-=!!(-[,,,,white]\phantom{Br})!!-=)}}{benzene \compound{benzene}} + }{} +\end{Verbatim} + \begin{rxn} + \reactand{ + \chemname{\chemfig{*6(-=-=(-[,,,,white]\phantom{Br})-=)}}{benzene \compound{benzene}} + }{} + \arrow{}{} + \reactand{ + \chemname{\chemfig{*6(-=-=(-Br)-=)}}{bromobenzene \compound{bromobenzene}} + }{} + \end{rxn} +We need to give the first reactand an anchor in order to refer to it with the branch. + \begin{Verbatim} + \begin{rxn}[scale=.8] + \setatomsep{1.6em} + \reactand{ + \chemname{\chemfig{*6(-=-=(-[,,,,white]\phantom{Br})-=)}}{benzene \compound{benzene}} + }{!!start!!} + + \branch[!!below=of start!!]{ + \arrow[!!direction=below!!]{ \ce{Br2 / AlBr3} }{ $-\ce{AlBr4\om}$ } + }{} + + \arrow{}{} + \reactand{ + \chemname{\chemfig{*6(-=-=(-Br)-=)}}{bromobenzene \compound{bromobenzene}} + }{} + \end{rxn} +\end{Verbatim} +So the first reactand gets the anchor \verb=start= and the branch refers to it with \verb+below=of+\linebreak\verb+start+. For the reaction arrow to point below, we need to use the key \verb+direction=below+. Now we get: + \begin{rxn}[scale=.8] + \setatomsep{1.6em} + \reactand{ + \chemname{\chemfig{*6(-=-=(-[,,,,white]\phantom{Br})-=)}}{benzene \compound{benzene}} + }{start} + \branch[below=of start]{ + \arrow[direction=below]{\ce{Br2 / AlBr3}}{$-\ce{AlBr4\om}$} + }{} + \arrow{}{} + \reactand{ + \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: \verb=\mesomeric=, \verb=\marrow= and \verb=\elmove=. +\begin{Verbatim} + !!\mesomeric{!! + \reactand{ + \chemfig{*6(=[@{e1}]-=-(-[:120]Br)(-[:60]H)-(-[:-30,.4,,,white]\oplus)-[@{e2}])} + !!\elmove{e1}{60:4mm}{e2}{0:4mm}!! + }{} + !!\marrow!! + \reactand{ + \chemfig{*6(-(-[:90,.4,,,white]\oplus)-[@{e4}]=[@{e3}]-(-[:120]Br)(-[:60]H)-=)} + \elmove{e3}{180:4mm}{e4}{150:4mm} + }{} + \marrow + \reactand{ + \chemfig{*6(-=-(-[:-150,.4,,,white]\oplus)-(-[:120]Br)(-[:60]H)-=)} + }{} + !!}{}!! +\end{Verbatim} +\begin{rxn}[scale=.8] + \setatomsep{1.6em} + \mesomeric{ + \reactand{ + \chemfig{*6(=[@{e1}]-=-(-[:120]Br)(-[:60]H)-(-[:-30,.4,,,white]\oplus)-[@{e2}])} + \elmove{e1}{60:4mm}{e2}{0:4mm} + }{} + \marrow + \reactand{ + \chemfig{*6(-(-[:90,.4,,,white]\oplus)-[@{e4}]=[@{e3}]-(-[:120]Br)(-[:60]H)-=)} + \elmove{e3}{180:4mm}{e4}{150:4mm} + }{} + \marrow + \reactand{ + \chemfig{*6(-=-(-[:-150,.4,,,white]\oplus)-(-[:120]Br)(-[:60]H)-=)} + }{} + }{} +\end{rxn} +When we write the code \emph{inside} of the branch, directly after the arrow, we get the following: + \begin{rxn}[scale=.8] + \setatomsep{1.6em} + \reactand{ + \chemname{\chemfig{*6(-=-=(-[,,,,white]\phantom{Br})-=)}}{benzene \compound{benzene}} + }{start} + + \branch[below=of start]{ + \arrow[direction=below]{\ce{Br2 / AlBr3}}{$-\ce{AlBr4\om}$} + \mesomeric{ + \reactand{ + \chemfig{*6(=[@{e1}]-=-(-[:120]Br)(-[:60]H)-(-[:-30,.4,,,white]\oplus)-[@{e2}])} + \elmove{e1}{60:4mm}{e2}{0:4mm} + }{} + \marrow + \reactand{ + \chemfig{*6(-(-[:90,.4,,,white]\oplus)-[@{e4}]=[@{e3}]-(-[:120]Br)(-[:60]H)-=)} + \elmove{e3}{180:4mm}{e4}{150:4mm} + }{} + \marrow + \reactand{ + \chemfig{*6(-=-(-[:-150,.4,,,white]\oplus)-(-[:120]Br)(-[:60]H)-=)} + }{} + }{} + }{} + + \arrow{}{} + \reactand{ + \chemname{\chemfig{*6(-=-=(-Br)-=)}}{bromobenzene \compound{bromobenzene}} + }{} + \end{rxn} +This obviously messes everything up. We can try this, though: +\begin{Verbatim} + \begin{rxn}[scale=.8] + \setatomsep{1.6em} + \reactand{ + \chemname{\chemfig{*6(-=-=(-[,,,,white]\phantom{Br})-=)}}{benzene \compound{benzene}} + }{start} + + \branch[below=of start]{ + \arrow[direction=below]{\ce{Br2 / AlBr3}}{$-\ce{AlBr4\om}$} + \mesomeric!![below]!!{ + \reactand{ + \chemfig{*6(=[@{e1}]-=-(-[:120]Br)(-[:60]H)-(-[:-30,.4,,,white]\oplus)-[@{e2}])} + \elmove{e1}{60:4mm}{e2}{0:4mm} + }{} + \marrow + \reactand{ + \chemfig{*6(-(-[:90,.4,,,white]\oplus)-[@{e4}]=[@{e3}]-(-[:120]Br)(-[:60]H)-=)} + \elmove{e3}{180:4mm}{e4}{150:4mm} + }{} + \marrow + \reactand{ + \chemfig{*6(-=-(-[:-150,.4,,,white]\oplus)-(-[:120]Br)(-[:60]H)-=)} + }{} + }{} + }{} + + \arrow{}{} + \reactand{ + \chemname{\chemfig{*6(-=-=(-Br)-=)}}{bromobenzene \compound{bromobenzene}} + }{} + \end{rxn} +\end{Verbatim} +The result is better: + \begin{rxn}[scale=.8] + \setatomsep{1.6em} + \reactand{ + \chemname{\chemfig{*6(-=-=(-[,,,,white]\phantom{Br})-=)}}{benzene \compound{benzene}} + }{start} + + \branch[below=of start]{ + \arrow[direction=below]{\ce{Br2 / AlBr3}}{$-\ce{AlBr4\om}$} + \mesomeric[below]{ + \reactand{ + \chemfig{*6(=[@{e1}]-=-(-[:120]Br)(-[:60]H)-(-[:-30,.4,,,white]\oplus)-[@{e2}])} + \elmove{e1}{60:4mm}{e2}{0:4mm} + }{} + \marrow + \reactand{ + \chemfig{*6(-(-[:90,.4,,,white]\oplus)-[@{e4}]=[@{e3}]-(-[:120]Br)(-[:60]H)-=)} + \elmove{e3}{180:4mm}{e4}{150:4mm} + }{} + \marrow + \reactand{ + \chemfig{*6(-=-(-[:-150,.4,,,white]\oplus)-(-[:120]Br)(-[:60]H)-=)} + }{} + }{} + }{} + + \arrow{}{} + \reactand{ + \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 iot into a branch of its own. +\begin{Verbatim}[firstnumber=6] + ... + \branch[below=of start]{ + \arrow[direction=below,!!name=arrow_a!!]{\ce{Br2 / AlBr3}}{$-\ce{AlBr4\om}$} + }{} + !!\branch[below=of arrow_a]{!! + \mesomeric{ + \reactand{ + \chemfig{*6(=[@{e1}]-=-(-[:120]Br)(-[:60]H)-(-[:-30,.4,,,white]\oplus)-[@{e2}])} + \elmove{e1}{60:4mm}{e2}{0:4mm} + }{} + \marrow + \reactand{ + \chemfig{*6(-(-[:90,.4,,,white]\oplus)-[@{e4}]=[@{e3}]-(-[:120]Br)(-[:60]H)-=)} + \elmove{e3}{180:4mm}{e4}{150:4mm} + }{} + \marrow + \reactand{ + \chemfig{*6(-=-(-[:-150,.4,,,white]\oplus)-(-[:120]Br)(-[:60]H)-=)} + }{} + }{} + !!}{}!! + ... +\end{Verbatim} +\begin{rxn}[scale=.8] + \setatomsep{1.6em} + \reactand{\chemname{\chemfig{*6(-=-=(-[,,,,white]\phantom{Br})-=)}}{benzene \compound{benzene}} }{start} + + \branch[below=of start]{ + \arrow[direction=below,name=arrow_a]{\ce{Br2 / AlBr3}}{$-\ce{AlBr4\om}$} + }{} + + \branch[below=of arrow_a]{ + \mesomeric{ + \reactand{ + \chemfig{*6(=[@{e1}]-=-(-[:120]Br)(-[:60]H)-(-[:-30,.4,,,white]\oplus)-[@{e2}])} + \elmove{e1}{60:4mm}{e2}{0:4mm} + }{m1} + \marrow + \reactand{ + \chemfig{*6(-(-[:90,.4,,,white]\oplus)-[@{e4}]=[@{e3}]-(-[:120]Br)(-[:60]H)-=)} + \elmove{e3}{180:4mm}{e4}{150:4mm} + }{m1} + \marrow + \reactand{ + \chemfig{*6(-=-(-[:-150,.4,,,white]\oplus)-(-[:120]Br)(-[:60]H)-=)} + }{m3} + }{} + }{mesomerism} + + \arrow{}{} + \reactand{ \chemname{\chemfig{*6(-=-=(-Br)-=)}}{bromobenzene \compound{bromobenzene}} }{} +\end{rxn} +In first sight this isn't better. But by shifting the branch with xshift, we get what we want: +\begin{Verbatim}[firstnumber=6] + ... + \branch[below=of start]{ + \arrow[direction=below,name=arrow_a]{\ce{Br2 / AlBr3}}{$-\ce{AlBr4\om}$} + }{} + \branch[below=of arrow_a,!!xshift=8.5em!!]{ + \mesomeric{ + \reactand{ + \chemfig{*6(=[@{e1}]-=-(-[:120]Br)(-[:60]H)-(-[:-30,.4,,,white]\oplus)-[@{e2}])} + \elmove{e1}{60:4mm}{e2}{0:4mm} + }{} + \marrow + \reactand{ + \chemfig{*6(-(-[:90,.4,,,white]\oplus)-[@{e4}]=[@{e3}]-(-[:120]Br)(-[:60]H)-=)} + \elmove{e3}{180:4mm}{e4}{150:4mm} + }{} + \marrow + \reactand{ + \chemfig{*6(-=-(-[:-150,.4,,,white]\oplus)-(-[:120]Br)(-[:60]H)-=)} + }{} + }{} + }{} + ... +\end{Verbatim} +\begin{rxn}[scale=.8] + \setatomsep{1.6em} + \reactand{\chemname{\chemfig{*6(-=-=(-[,,,,white]\phantom{Br})-=)}}{benzene \compound{benzene}} }{start} + + \branch[below=of start]{ + \arrow[direction=below,name=arrow_a]{\ce{Br2 / AlBr3}}{$-\ce{AlBr4\om}$} + }{} + + \branch[below=of arrow_a,xshift=8.5em]{ + \mesomeric{ + \reactand{ + \chemfig{*6(=[@{e1}]-=-(-[:120]Br)(-[:60]H)-(-[:-30,.4,,,white]\oplus)-[@{e2}])} + \elmove{e1}{60:4mm}{e2}{0:4mm} + }{m1} + \marrow + \reactand{ + \chemfig{*6(-(-[:90,.4,,,white]\oplus)-[@{e4}]=[@{e3}]-(-[:120]Br)(-[:60]H)-=)} + \elmove{e3}{180:4mm}{e4}{150:4mm} + }{m1} + \marrow + \reactand{ + \chemfig{*6(-=-(-[:-150,.4,,,white]\oplus)-(-[:120]Br)(-[:60]H)-=)} + }{m3} + }{} + }{mesomerism} + + \arrow{}{} + \reactand{ \chemname{\chemfig{*6(-=-=(-Br)-=)}}{bromobenzene \compound{bromobenzene}} }{} +\end{rxn} +The last arrow is also placed in its own branch, so we can shift it, where we want. +\begin{Verbatim}[firstnumber=6] + ... + \branch[below=of start]{ + \arrow[direction=below,!!name=arrow_a!!]{\ce{Br2 / AlBr3}}{$-\ce{AlBr4\om}$} + }{} + \branch[below=of arrow_a,xshift=8.5em]{ + \mesomeric{ + \reactand{ + \chemfig{*6(=[@{e1}]-=-(-[:120]Br)(-[:60]H)-(-[:-30,.4,,,white]\oplus)-[@{e2}])} + \elmove{e1}{60:4mm}{e2}{0:4mm} + }{} + \marrow + \reactand{ + \chemfig{*6(-(-[:90,.4,,,white]\oplus)-[@{e4}]=[@{e3}]-(-[:120]Br)(-[:60]H)-=)} + \elmove{e3}{180:4mm}{e4}{150:4mm} + }{} + \marrow + \reactand{ + \chemfig{*6(-=-(-[:-150,.4,,,white]\oplus)-(-[:120]Br)(-[:60]H)-=)} + }{} + }{} + }{!!mesomerism!!} + \branch[!!above=of mesomerism,xshift=7.25em!!]{ + \arrow[direction=above]{$-\Hpl$}{} + }{} + ... +\end{Verbatim} +\begin{rxn}[scale=.8] + \setatomsep{1.6em} + \reactand{\chemname{\chemfig{*6(-=-=(-[,,,,white]\phantom{Br})-=)}}{benzene \compound{benzene}} }{start} + + \branch[below=of start]{ + \arrow[direction=below,name=arrow_a]{\ce{Br2 / AlBr3}}{$-\ce{AlBr4\om}$} + }{} + + \branch[below=of arrow_a,xshift=8.5em]{ + \mesomeric{ + \reactand{ + \chemfig{*6(=[@{e1}]-=-(-[:120]Br)(-[:60]H)-(-[:-30,.4,,,white]\oplus)-[@{e2}])} + \elmove{e1}{60:4mm}{e2}{0:4mm} + }{m1} + \marrow + \reactand{ + \chemfig{*6(-(-[:90,.4,,,white]\oplus)-[@{e4}]=[@{e3}]-(-[:120]Br)(-[:60]H)-=)} + \elmove{e3}{180:4mm}{e4}{150:4mm} + }{m1} + \marrow + \reactand{ + \chemfig{*6(-=-(-[:-150,.4,,,white]\oplus)-(-[:120]Br)(-[:60]H)-=)} + }{m3} + }{} + }{mesomerism} + \branch[above=of mesomerism,xshift=7.25em]{ + \arrow[direction=above]{$-\Hpl$}{} + }{} + \arrow{}{} + \reactand{ \chemname{\chemfig{*6(-=-=(-Br)-=)}}{bromobenzene \compound{bromobenzene}} }{} +\end{rxn} +Now we're almost there: the arrow of the main reaction is too short. +\begin{Verbatim} + \begin{rxn}[scale=.8] + \setatomsep{1.6em} + \reactand{\chemname{\chemfig{*6(-=-=(-[,,,,white]\phantom{Br})-=)}}{benzene \compound{benzene}} }{start} + + \branch[below=of start]{ + \arrow[direction=below,name=arrow_a]{\ce{Br2 / AlBr3}}{$-\ce{AlBr4\om}$} + }{} + \branch[below=of arrow_a,xshift=8.5em]{ + \mesomeric{ + \reactand{ + \chemfig{*6(=[@{e1}]-=-(-[:120]Br)(-[:60]H)-(-[:-30,.4,,,white]\oplus)-[@{e2}])} + \elmove{e1}{60:4mm}{e2}{0:4mm} + }{} + \marrow + \reactand{ + \chemfig{*6(-(-[:90,.4,,,white]\oplus)-[@{e4}]=[@{e3}]-(-[:120]Br)(-[:60]H)-=)} + \elmove{e3}{180:4mm}{e4}{150:4mm} + }{} + \marrow + \reactand{ + \chemfig{*6(-=-(-[:-150,.4,,,white]\oplus)-(-[:120]Br)(-[:60]H)-=)} + }{} + }{} + }{mesomerism} + \branch[above=of mesomerism,xshift=7.25em]{ + \arrow[direction=above]{$-\Hpl$}{} + }{} + + \arrow[!!length=2.6!!]{}{} + \reactand{ \chemname{\chemfig{*6(-=-=(-Br)-=)}}{bromobenzene \compound{bromobenzene}} }{} + \end{rxn} +\end{Verbatim} + \begin{rxn}[scale=.8] + \setatomsep{1.6em} + \reactand{\chemname{\chemfig{*6(-=-=(-[,,,,white]\phantom{Br})-=)}}{benzene \compound{benzene}} }{start} + + \branch[below=of start]{ + \arrow[direction=below,name=arrow_a]{\ce{Br2 / AlBr3}}{$-\ce{AlBr4\om}$} + }{} + \branch[below=of arrow_a,xshift=8.5em]{ + \mesomeric{ + \reactand{ + \chemfig{*6(=[@{e1}]-=-(-[:120]Br)(-[:60]H)-(-[:-30,.4,,,white]\oplus)-[@{e2}])} + \elmove{e1}{60:4mm}{e2}{0:4mm} + }{} + \marrow + \reactand{ + \chemfig{*6(-(-[:90,.4,,,white]\oplus)-[@{e4}]=[@{e3}]-(-[:120]Br)(-[:60]H)-=)} + \elmove{e3}{180:4mm}{e4}{150:4mm} + }{} + \marrow + \reactand{ + \chemfig{*6(-=-(-[:-150,.4,,,white]\oplus)-(-[:120]Br)(-[:60]H)-=)} + }{} + }{} + }{mesomerism} + \branch[above=of mesomerism,xshift=7.25em]{ + \arrow[direction=above]{$-\Hpl$}{} + }{} + + \arrow[length=2.6]{}{} + \reactand{ \chemname{\chemfig{*6(-=-=(-Br)-=)}}{bromobenzene \compound{bromobenzene}} }{} + \end{rxn} +\newpage +\subsection[Synthesis with \TikZ]{Creating an extensive synthesis using \TikZ, \mC and \CF}\label{ssec:tikzsynthese} +Since the commands of \CF are functioning well in a `tikzpicure' environment, we can create extensive syntheses, using the \verb=\merge= command. The other \mC commands can't be used here without further attention, because they're placed on a chain. In the next example, we directly use the floating environment \verb=rxnfloat=. +\begin{Verbatim} + + \begin{rxnfloat} + \setatomsep{1.8em}\setcrambond{3pt}{.5pt}{1pt} + \centering + \begin{tikzpicture}[scale=.8] + \small + \node(a) at (0,0) {\chemfig{=_[::30]-[::-60]-[::60](-[::-60])(-[::120])-[::0]OH}}; + \node(b) at (0,-4) {\chemfig{Br-[::30]-[::-60]=_[::60](-[::-60])-[::60]}}; + \draw[-stealth,thick] (a.south) -- node[left]{HBr} (b.north); + \node(c) at (5,1) {\chemname{\chemfig{**6(--(-SO_2Cl)---(-)-)}}{tosyle chloride}}; + \node(d) at (5,-4) {\chemfig{**6(--(-SO_2Na)---(-)-)}}; + \draw[-stealth,thick] (c.south) -- node[left]{NaOH} node[right]{Zn} (d.north); + \node(e) at (2.5,-8.5) {\chemfig{**6(--(-SO_2-[:30]-[::-60]=_[::60](-[::60])-[::-60])---(-)-)}}; + \node(f) at (10,-4) {\chemname{\chemfig{-[::30](-[::60])=_[::-60]-[::60]COOH}}{3-methyl-2-butenoic acid}}; + \node(g) at (10,-8.5) {\chemfig{-[::30](-[::60])=_[::-60]-[::60]CO_2CH_3}}; + \draw[-stealth,thick] (f.south) -- node[left]{\ce{CH3OH}} (g.north); + \merge{e}{b}{d} + \node[left delimiter={[},right delimiter={]}](h) at (6.25,-14.5) {\chemfig{-[::30](-[::60])=^[::-60]-[::60](-[::60]S(=[::90]O)(=[::-90]O)-[::0]**6(---(-)---))-[::-60](-[::0])(-[::-120])-[::60](-[::60,.5,,,white]\ominus)-[::-60]CO_2CH_3}}; + \node at (5.25,-11) {\ce{NaOCH3}}; + \merge{h}{e}{g} + \node(i) at (6.25,-18.5) {}; + \node(j) at (6.25,-21.5) {\chemname{\chemfig{-[::-30](-[::-60])=^[::60]>[::-60](-[::90,1.2])-[::30,1.2](-[::120,1.2](-[::-60])-[::0])<:[::-30]COOH}}{\emph{trans}-chrysanthemum acid}}; + \draw[-stealth,thick] (h.south) -- (i.north); + \draw[-stealth,thick] (i.south) -- node[left]{KOH} (j.north); + \end{tikzpicture} + \caption{synthesis of chrysanthemum acid} + \end{rxnfloat} + +\end{Verbatim} +\begin{rxnfloat} +\setatomsep{1.8em}\setcrambond{3pt}{.5pt}{1pt} +\centering +\begin{tikzpicture}[scale=.8] + \small + \node(a) at (0,0) {\chemfig{=_[::30]-[::-60]-[::60](-[::-60])(-[::120])-[::0]OH}}; + \node(b) at (0,-4) {\chemfig{Br-[::30]-[::-60]=_[::60](-[::-60])-[::60]}}; + \draw[-stealth,thick] (a.south) -- node[left]{HBr} (b.north); + + \node(c) at (5,1) {\chemname{\chemfig{**6(--(-SO_2Cl)---(-)-)}}{tosyle chloride}}; + \node(d) at (5,-4) {\chemfig{**6(--(-SO_2Na)---(-)-)}}; + \draw[-stealth,thick] (c.south) -- node[left]{NaOH} node[right]{Zn} (d.north); + + \node(e) at (2.5,-8.5) {\chemfig{**6(--(-SO_2-[:30]-[::-60]=_[::60](-[::60])-[::-60])---(-)-)}}; + \node(f) at (10,-4) {\chemname{\chemfig{-[::30](-[::60])=_[::-60]-[::60]COOH}}{3-methyl-2-butenoic acid}}; + \node(g) at (10,-8.5) {\chemfig{-[::30](-[::60])=_[::-60]-[::60]CO_2CH_3}}; + \draw[-stealth,thick] (f.south) -- node[left]{\ce{CH3OH}} (g.north); + \merge{e}{b}{d} + + \node[left delimiter={[},right delimiter={]}](h) at (6.25,-14.5) {\chemfig{-[::30](-[::60])=^[::-60]-[::60](-[::60]S(=[::90]O)(=[::-90]O)-[::0]**6(---(-)---))-[::-60](-[::0])(-[::-120])-[::60](-[::60,.3,,,white]\ominus)-[::-60]CO_2CH_3}}; + \node at (5.25,-11) {\ce{NaOCH3}}; + \merge{h}{e}{g} + + \node(i) at (6.25,-18.5) {}; + \node(j) at (6.25,-21.5) {\chemname{\chemfig{-[::-30](-[::-60])=^[::60]>[::-60](-[::90,1.2])-[::30,1.2](-[::120,1.2](-[::-60])-[::0])<:[::-30]COOH}}{\emph{trans}-chrysanthemum acid}}; + \draw[-stealth,thick] (h.south) -- (i.north); + \draw[-stealth,thick] (i.south) -- node[left]{KOH} (j.north); +\end{tikzpicture} +\caption{synthesis of chrysanthemum acid} +\end{rxnfloat} +Let's go through the code, piece by piece. +\begin{Verbatim} + + \begin{rxnfloat} + \setatomsep{1.8em}\setcrambond{3pt}{.5pt}{1pt} + \centering + \begin{tikzpicture}[scale=.8] + \small + \node(a) at (0,0) {\chemfig{=_[::30]-[::-60]-[::60](-[::-60])(-[::120])-[::0]OH}}; + \node(b) at (0,-4) {\chemfig{Br-[::30]-[::-60]=_[::60](-[::-60])-[::60]}}; + \draw[-stealth,thick] (a.south) -- node[left]{HBr} (b.north); +\end{Verbatim} +In lines 1 -- 6 we begin the environment and make sure, that the formul\ae\ don't become to big. In lines 7 -- 9 the first two reactands are written (lines 7 and 8) and connected with an arrow (line 9). +\setatomsep{1.8em} +\setcrambond{3pt}{.5pt}{1pt} +\begin{center} +\begin{tikzpicture}[scale=.8] + \small + \node(a) at (0,0) {\chemfig{=_[::30]-[::-60]-[::60](-[::-60])(-[::120])-[::0]OH}}; + \node(b) at (0,-4) {\chemfig{Br-[::30]-[::-60]=_[::60](-[::-60])-[::60]}}; + \draw[-stealth,thick] (a.south) -- node[left]{HBr} (b.north); +\end{tikzpicture} +\end{center} +\begin{Verbatim}[firstnumber=10] + \node(c) at (5,1) {\chemname{\chemfig{**6(--(-SO_2Cl)---(-)-)}}{tosyle chloride}}; + \node(d) at (5,-4) {\chemfig{**6(--(-SO_2Na)---(-)-)}}; + \draw[-stealth,thick] (c.south) -- node[left]{NaOH} node[right]{Zn} (d.north); +\end{Verbatim} +In the three following lines 10 -- 12, we create the second branch of the synthesis. +\begin{center} +\begin{tikzpicture}[scale=.8] + \small + \node(a) at (0,0) {\chemfig{=_[::30]-[::-60]-[::60](-[::-60])(-[::120])-[::0]OH}}; + \node(b) at (0,-4) {\chemfig{Br-[::30]-[::-60]=_[::60](-[::-60])-[::60]}}; + \draw[-stealth,thick] (a.south) -- node[left]{HBr} (b.north); + \node(c) at (5,1) {\chemname{\chemfig{**6(--(-SO_2Cl)---(-)-)}}{tosyle chloride}}; + \node(d) at (5,-4) {\chemfig{**6(--(-SO_2Na)---(-)-)}}; + \draw[-stealth,thick] (c.south) -- node[left]{NaOH} node[right]{Zn} (d.north); +\end{tikzpicture} +\end{center} +\begin{Verbatim}[firstnumber=13] + \node(e) at (2.5,-8.5) {\chemfig{**6(--(-SO_2-[:30]-[::-60]=_[::60](-[::60])-[::-60])---(-)-)}}; + \node(f) at (10,-4) {\chemname{\chemfig{-[::30](-[::60])=_[::-60]-[::60]COOH}}{3-methyl-2-butenoic acid}}; + \node(g) at (10,-8.5) {\chemfig{-[::30](-[::60])=_[::-60]-[::60]CO_2CH_3}}; + \draw[-stealth,thick] (f.south) -- node[left]{\ce{CH3OH}} (g.north); +\end{Verbatim} +In lines 13 -- 16 we create the third branch and the product of the first two branches. +\begin{center} +\begin{tikzpicture}[scale=.8] + \small + \node(a) at (0,0) {\chemfig{=_[::30]-[::-60]-[::60](-[::-60])(-[::120])-[::0]OH}}; + \node(b) at (0,-4) {\chemfig{Br-[::30]-[::-60]=_[::60](-[::-60])-[::60]}}; + \draw[-stealth,thick] (a.south) -- node[left]{HBr} (b.north); + \node(c) at (5,1) {\chemname{\chemfig{**6(--(-SO_2Cl)---(-)-)}}{tosyle chloride}}; + \node(d) at (5,-4) {\chemfig{**6(--(-SO_2Na)---(-)-)}}; + \draw[-stealth,thick] (c.south) -- node[left]{NaOH} node[right]{Zn} (d.north); + \node(e) at (2.5,-8.5) {\chemfig{**6(--(-SO_2-[:30]-[::-60]=_[::60](-[::60])-[::-60])---(-)-)}}; + \node(f) at (10,-4) {\chemname{\chemfig{-[::30](-[::60])=_[::-60]-[::60]COOH}}{3-methyl-2-butenoic acid}}; + \node(g) at (10,-8.5) {\chemfig{-[::30](-[::60])=_[::-60]-[::60]CO_2CH_3}}; + \draw[-stealth,thick] (f.south) -- node[left]{\ce{CH3OH}} (g.north); +\end{tikzpicture} +\end{center} +\begin{Verbatim}[firstnumber=17] + \merge{e}{b}{d} +\end{Verbatim} +In line 17 we merge the first two branches with their product. +\begin{center} +\begin{tikzpicture}[scale=.8] + \small + \node(a) at (0,0) {\chemfig{=_[::30]-[::-60]-[::60](-[::-60])(-[::120])-[::0]OH}}; + \node(b) at (0,-4) {\chemfig{Br-[::30]-[::-60]=_[::60](-[::-60])-[::60]}}; + \draw[-stealth,thick] (a.south) -- node[left]{HBr} (b.north); + \node(c) at (5,1) {\chemname{\chemfig{**6(--(-SO_2Cl)---(-)-)}}{tosyle chloride}}; + \node(d) at (5,-4) {\chemfig{**6(--(-SO_2Na)---(-)-)}}; + \draw[-stealth,thick] (c.south) -- node[left]{NaOH} node[right]{Zn} (d.north); + \node(e) at (2.5,-8.5) {\chemfig{**6(--(-SO_2-[:30]-[::-60]=_[::60](-[::60])-[::-60])---(-)-)}}; + \node(f) at (10,-4) {\chemname{\chemfig{-[::30](-[::60])=_[::-60]-[::60]COOH}}{3-methyl-2-butenoic acid}}; + \node(g) at (10,-8.5) {\chemfig{-[::30](-[::60])=_[::-60]-[::60]CO_2CH_3}}; + \draw[-stealth,thick] (f.south) -- node[left]{\ce{CH3OH}} (g.north); + \merge{e}{b}{d} +\end{tikzpicture} +\end{center} +\begin{Verbatim}[firstnumber=18] + \node[left delimiter={[},right delimiter={]}](h) at (6.25,-14.5) {\chemfig{-[::30](-[::60])=^[::-60]-[::60](-[::60]S(=[::90]O)(=[::-90]O)-[::0]**6(---(-)---))-[::-60](-[::0])(-[::-120])-[::60](-[::60,.5,,,white]\ominus)-[::-60]CO_2CH_3}}; +\end{Verbatim} +In line 18 we create the transition state. +\begin{center} +\begin{tikzpicture}[scale=.8] + \small + \node(e) at (2.5,-8.5) {\chemfig{**6(--(-SO_2-[:30]-[::-60]=_[::60](-[::60])-[::-60])---(-)-)}}; + \node(g) at (10,-8.5) {\chemfig{-[::30](-[::60])=_[::-60]-[::60]CO_2CH_3}}; + \node[left delimiter={[},right delimiter={]}](h) at (6.25,-14.5) {\chemfig{-[::30](-[::60])=^[::-60]-[::60](-[::60]S(=[::90]O)(=[::-90]O)-[::0]**6(---(-)---))-[::-60](-[::0])(-[::-120])-[::60](-[::60,.5,,,white]\ominus)-[::-60]CO_2CH_3}}; +\end{tikzpicture} +\end{center} +\begin{Verbatim}[firstnumber=19] + \node at (5.25,-11) {\ce{NaOCH3}}; + \merge{h}{e}{g} +\end{Verbatim} +In lines 19 and 20 both branches are merged with the transition state an the merging arrow gets its reactand argument. +\begin{center} +\begin{tikzpicture}[scale=.8] + \small + \node(e) at (2.5,-8.5) {\chemfig{**6(--(-SO_2-[:30]-[::-60]=_[::60](-[::60])-[::-60])---(-)-)}}; + \node(g) at (10,-8.5) {\chemfig{-[::30](-[::60])=_[::-60]-[::60]CO_2CH_3}}; + \node[left delimiter={[},right delimiter={]}](h) at (6.25,-14.5) {\chemfig{-[::30](-[::60])=^[::-60]-[::60](-[::60]S(=[::90]O)(=[::-90]O)-[::0]**6(---(-)---))-[::-60](-[::0])(-[::-120])-[::60](-[::60,.5,,,white]\ominus)-[::-60]CO_2CH_3}}; + \node at (5.25,-11) {\ce{NaOCH3}}; + \merge{h}{e}{g} +\end{tikzpicture} +\end{center} +\begin{Verbatim}[firstnumber=21] + \node(i) at (6.25,-18.5) {}; + \node(j) at (6.25,-21.5) {\chemname{\chemfig{-[::-30](-[::-60])=^[::60]>[::-60](-[::90,1.2])-[::30,1.2](-[::120,1.2](-[::-60])-[::0])<:[::-30]COOH}}{\emph{trans}-chrysanthemum acid}}; + \draw[-stealth,thick] (h.south) -- (i.north); + \draw[-stealth,thick] (i.south) -- node[left]{KOH} (j.north); + \end{tikzpicture} + \caption{synthesis of chrysanthemum acid} + \end{rxnfloat} + +\end{Verbatim} +In the last lines, 21 -- 28, we create at first an empty node (line 21) and then the product (line 22). In lines 23 and 24 we create the last two reaction arrows. In the last four lines we end the environment. +\begin{center} +\begin{tikzpicture}[scale=.8] + \small + \node(i) at (6.25,-18.5) {}; + \node(j) at (6.25,-21.5) {\chemname{\chemfig{-[::-30](-[::-60])=^[::60]>[::-60](-[::90,1.2])-[::30,1.2](-[::120,1.2](-[::-60])-[::0])<:[::-30]COOH}}{\emph{trans}-chrysanthemum acid}}; + \draw[-stealth,thick] (h.south) -- (i.north); + \draw[-stealth,thick] (i.south) -- node[left]{KOH} (j.north); +\end{tikzpicture} +\end{center} + +\section{Epilogue} +\mC is still very new. This means there are probably a number of bugs I haven't discovered yet. There also might be missing one or two features, that would be useful. Since I only can test an work on \mC in my spare time, I'd be very glad about \emph{every} kind of feedback. If you like \mC, why don't you help me improve it by telling me your experiences? + +I tried using real chemical reactions but I didn't make sure, that they all make sense chemically. So you shouldn't trust the examples in respect to chemistry but rather take a look into a real chemistry teaching book.\\ +I apologize for any bad or wrong English. I hope you understood the documention anyway. + +Have fun with \mC! + +\par\vspace{.5cm}\hspace{.5cm}Clemens Niederberger, Berlin, \mCdate{en} +\end{document}
\ No newline at end of file |