diff options
Diffstat (limited to 'Master/texmf-dist/doc/latex/mychemistry/mychemistry_en.tex')
-rw-r--r-- | Master/texmf-dist/doc/latex/mychemistry/mychemistry_en.tex | 1897 |
1 files changed, 1897 insertions, 0 deletions
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..56faed11963 --- /dev/null +++ b/Master/texmf-dist/doc/latex/mychemistry/mychemistry_en.tex @@ -0,0 +1,1897 @@ +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% ------------------------------------------------------------------------------------- % +% - myChemistry - mychemistry_en.tex -------------------------------------------------- % +% - Creating reaction schemes with LaTeX and ChemFig ---------------------------------- % +% ------------------------------------------------------------------------------------- % +% - Clemens Niederberger -------------------------------------------------------------- % +% - 2011/03/01 ------------------------------------------------------------------------ % +% ------------------------------------------------------------------------------------- % +% - 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. -------------------------------------------------------------------- % +% ------------------------------------------------------------------------------------- % +% - Licence CC BY-NC-SA 3.0 ----------------------------------------------------------- % +% - http://creativecommons.org/licenses/by-nc-sa/3.0/ - % +% - You are free: - % +% - to Share: to copy, distribute and transmit the work - % +% - to Remix: to adapt the work - % +% - Under the following conditions: - % +% - Attribution: You must attribute the work in the manner specified by the author - % +% - or licensor (but not in any way that suggests that they endorse you or your - % +% - use of the work). - % +% - Noncommercial: You may not use this work for commercial purposes. - % +% - Share Alike: If you alter, transform, or build upon this work, you may - % +% - distribute the resulting work only under the same or similar license to - % +% - this one. - % +% - - % +% - This work consists of the files mychemistry.sty, mychemistry_de.tex and - % +% - mychemistry_en.tex - % +% ------------------------------------------------------------------------------------- % +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\documentclass[DIV10]{scrartcl} +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% - Pakete ---------------------------------------------------------------------------- % +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\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=1, + 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,listof,marrow,merge,mesomeric,node,reactand,restylefloat,setatomsep,setcrambond,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}[1][0]{% + \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 danach: ------------------------------------------------------------ % +\def\Example{% + \beispiel + \catcode`\^^M=\active + \@ifnextchar[{\catcode`\^^M=5\Example@}{\catcode`\^^M=5\Example@@}} +\def\Example@[#1]{\fvset{#1}\Example@@} +\def\Example@@{\BeginExample} +\def\endExample{% + \end{VerbatimOut}% + \BelowExample{\vspace*{-4mm}\color{black}\input{\jobname.tmp}} + \vspace*{-4mm}\endbeispiel} +% - Code, Ergebnis rechts ------------------------------------------------------------- % +\newcommand{\SideBySide@Example}[1]{% + \begin{beispiel} + \@tempdimb=\FV@XRightMargin + \advance\@tempdimb -5mm + \begin{minipage}[c]{.5\textwidth} + \VerbatimInput[numbersep=3pt,fontsize=\footnotesize, + numbers=left,xleftmargin=5mm,xrightmargin=0pt]{\jobname.tmp} + \end{minipage}% + \@tempdimb=\textwidth + \advance\@tempdimb -\FV@XRightMargin + \advance\@tempdimb 5mm + \begin{minipage}[c]{.5\textwidth} + \fvset{xrightmargin=0pt}\color{black} + \catcode`\Z=9\relax% + #1 + \end{minipage} + \end{beispiel}} + +\def\SideBySideExample{% + \catcode`\^^M=\active + \@ifnextchar[{\catcode`\^^M=5\SideBySideExample@}% + {\catcode`\^^M=5\SideBySideExample@@}} +\def\SideBySideExample@[#1]{\fvset{#1}\SideBySideExample@@} +\def\SideBySideExample@@{\BeginExample[1]} +\def\endSideBySideExample{% + \end{VerbatimOut}% + \SideBySide@Example{\input{\jobname.tmp}}} +\makeatother + +% - weitere Makros -------------------------------------------------------------------- % +\newcommand{\mC}{{\color{DarkRed}\sffamily my\-Chemis\-try}\xspace} % Paketname +\newcommand\version{\mbox{v1.0}\xspace} % Versionsnummer +\newcommand\CF{{\ECFAugie ChemFig}\xspace} % ChemFig in der originalen Schrift +%\newcommand{\zB}{\mbox{z.\,B.}\xspace} +\newcommand{\eg}{\mbox{e.\,g.}\xspace} +\newcommand{\TikZ}{\mbox{Ti{\bfseries\itshape k}Z}\xspace} +% - 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]{};} + +% - chemcompounds --------------------------------------------------------------------- % +\declarecompound[1a]{benzene} +\declarecompound[1b]{bromobenzene} + +%\renewcommand{\schemename}{Reaction scheme} +\setlength{\parindent}{0pt} +\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=-5cm] at (current page.center) {% +\begin{verbatim} + \begin{rxn}[.7] + \setatomsep{1.5em}\footnotesize + \reactand{ + \chemfig{C(-[4]*6(=-=-=-))(-[2]*6(=-=-=-))(-[6,,,2]HO)-C(-[2]CH_3) + (-[6]OH)-CH_3} + }{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} + \vskip3cm + \begin{rxn}[.7] + \setatomsep{1.5em}\footnotesize + \reactand{ \chemfig{C(-[4]*6(=-=-=-))(-[2]*6(=-=-=-))(-[6,,,2]HO)-C(-[2]CH_3)(-[6]OH)-CH_3} }{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{Licence} +\mC \mCversion\ underlies the The LaTeX project public license\\(\url{http://creativecommons.org/licenses/by-nc-sa/3.0/}). + +\section{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}[<scale factor>]= 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]--[::-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 valus are \UseVerb{arrowlength} or $\text{\UseVerb{arrowlength}}\cdot\sqrt{2}$ respectively. + +\subsection{Package Options} +There are some options for \mC. +\begin{description} + \vitem+english+ Using this option will load the English version of `chemexec', if `chemexec' hasn't been loaded before, and it will change the name of the \verb=rxnscheme= environment to "Reaction scheme" (see \ref{ssec:rxnscheme}). + \vitem+placement=<placement>+ With this option, the default placement behaviour of the\newline + \verb=rxnscheme= environment will be changed from \verb=H= to \verb=<placement>=. + \vitem+color=<farbe>+ Using this option will load `chemexec' with that color and the option \verb+shade=true+. + \vitem+nocolor+ Using this option will load `chemexec' with no color and the option \verb+shade=false+ (default behaviour of \mC). + \vitem+shade+ Using this option will load `chemexec' with \verb+shade=true+. + \vitem+nochemexec+ This option will prevent \mC from loading `chemexec'. +\end{description} + +\subsection{Known Problems}\label{ssec:probleme} +There are some unresolved issues with \mC for which there are only unsatisfying solutions: +\begin{enumerate} + \item Arguments\footnote{Text or formul\ae\ above/below or left/right of an arrow.} of arrows of which the length has been changed, see \ref{sssec:arrowproblem} + \item Alignment of branches, that contain arrows with only one argument, see \ref{sssec:branchproblem} +\end{enumerate} +I plan to find a solution for these problems in future versions of \mC. +\newpage +\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}).\\ +For example you can solve the problem of falsely aligned branches (see \ref{ssec:probleme}) using \TikZ code. +\begin{SideBySideExample} + % right: + \begin{rxn} + \reactand{\chemfig{-[::30]-[::-60]NH-[::-60,,1]}}{a} + \arrow[direction=below]{\ce{H2SO4}}{} + \end{rxn} + % wrong: + \begin{rxn} + \reactand{\chemfig{-[::30]-[::-60]NH-[::-60,,1]}}{a} + \branch[below=of a]{ + \arrow[direction=below]{\ce{H2SO4}}{} + }{} + \end{rxn} + % corrected (see line 16): + \begin{rxn} + \reactand{\chemfig{-[::30]-[::-60]NH-[::-60,,1]}}{a} + \branch[below=of a,xshift=-1.7em]{ + \arrow[direction=below]{\ce{H2SO4}}{} + }{} + \end{rxn} +\end{SideBySideExample} +You can use \TikZ code with the other commands (except \verb=\arrow=) \emph{after the alignment argument} in which case \emph{you have to use the alignment argument explicitly}. +\newpage +\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]{\reactand[right,minimum width=5em]{}{}\reactand{$+$}{}\reactand[right,minimum width=5em]{}{}\arrow{}{}\reactand[right,minimum width=5em]{Sodium chloride $+$ Hydrogen}{}}{} + \end{rxn} +\end{Example} + +\newpage +\section{Alphabetical Command Reference} +Every command of \mC is explained in this section, listed alphabetically. +\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. +\end{description} +\begin{SideBySideExample} + \begin{rxn} + \arrow{\ce{Br2}}{$h\nu$} \arrow{\chemfig{-[::30]-[::-60]OH}}{} + \end{rxn} + \begin{rxn} + \arrow[direction=above]{\ce{Br2}}{$h\nu$} + \end{rxn} + \begin{rxn} + \arrow[direction=above]{\chemfig{-[::30]-[::-60]OH}}{} + \end{rxn} + \begin{rxn} + \arrow[direction=above right]{\ce{Br2}}{$h\nu$} + \end{rxn} + \begin{rxn} + \arrow[direction=above right]{\chemfig{-[::30]-[::-60]OH}}{} + \end{rxn} +\end{SideBySideExample} +Every key in action: +\begin{SideBySideExample} + \begin{rxn} + \reactand{A}{} + \arrow[name=arrow_a]{B}{} + \branch[above=of arrow_a,yshift=-5em]{ + \arrow[type=<-,direction=above,length=.7]{}{} + \reactand[above]{D}{} + }{} + \reactand{C}{} + \end{rxn} +\end{SideBySideExample} + +\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. + +\subsubsection{Known Problem}\label{sssec:arrowproblem} +Die Änderung von \verb=\arrowlength= wirkt sich auf die Positionierung der Beschriftung von schrägen Pfeilen aus. Je kürzer die Pfeile, desto näher rutscht die Beschriftung an die Pfeile heran. +Changing \verb=\arrowlength= has an effect on the positioning of the arrow's arguments. The arguments are the closer to the arrow the shorter the arrow is. +\begin{SideBySideExample} + \begin{rxn} + \arrow[direction=above right,length=1.5]{\ce{Br2}}{$h\nu$} + \end{rxn} + \begin{rxn} + \arrow[direction=above right]{\ce{Br2}}{$h\nu$} + \end{rxn} + \begin{rxn} + \arrow[direction=above right,length=.5]{\ce{Br2}}{$h\nu$} + \end{rxn} +\end{SideBySideExample} +You can "push or pull" the arguments to or from the arrow with \verb=\hspace=, but then they aren't aligned relativly to one another any more. +\newpage +\begin{SideBySideExample} + \begin{rxn} + \arrow[direction=above right,length=1.5]{\ce{Br2}\hspace*{-2mm}}{\hspace*{-2mm}$h\nu$} + \end{rxn} + \begin{rxn} + \arrow[direction=above right]{\ce{Br2}}{$h\nu$} + \end{rxn} + \begin{rxn} + \arrow[direction=above right,length=.5]{\ce{Br2}\hspace*{1mm}}{\hspace*{1mm}$h\nu$} + \end{rxn} +\end{SideBySideExample} +This issue is to be solved in future versions of \mC. + +\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=. +\newpage +\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:branchproblem} +If you use arrows with just one argument inside a branch, you will see that the arrows no longer are centered. We define the following commands +\begin{Verbatim} + \newcommand{\abovearrow}{\tikz\node[draw,minimum width=3em,minimum height=1.5em,blue]{\footnotesize oben};} + \newcommand{\belowarrow}{\tikz\node[draw,minimum width=3em,minimum height=1.5em,red]{\footnotesize unten};} + \newcommand{\substance}{\tikz\node[draw,minimum width=5em,minimum height=3em]{};} +\end{Verbatim} +to visualize the problem: +\begin{Example} + \begin{rxn} + \reactand{ \substance }{left} + \arrow{\abovearrow}{\belowarrow} + \reactand{ \substance }{center} + \arrow{\abovearrow}{\belowarrow} + \reactand{ \substance }{right} + \branch[above=of left]{ + \arrow[direction=above]{\abovearrow}{} + \reactand[above]{ \substance }{} + }{} + \branch[above=of center]{ + \arrow[direction=above]{\abovearrow}{\belowarrow} + \reactand[above]{ \substance }{} + }{} + \branch[above=of right]{ + \arrow[direction=above]{}{\belowarrow} + \reactand[above]{ \substance }{} + }{} + \end{rxn} +\end{Example} +One possibility to solve the problem is using the \TikZ commands \verb=xshift= and \verb=yshift=. +\begin{Example} + \begin{rxn} + \reactand{ \substance }{left} + \arrow{\abovearrow}{\belowarrow} + \reactand{ \substance }{center} + \arrow{\abovearrow}{\belowarrow} + \reactand{ \substance }{right} + \branch[above=of left,xshift=-.5em]{ + \arrow[direction=above]{\abovearrow}{} + \reactand[above]{ \substance }{} + }{} + \branch[above=of center]{ + \arrow[direction=above]{\abovearrow}{\belowarrow} + \reactand[above]{ \substance }{} + }{} + \branch[above=of right,xshift=.5em]{ + \arrow[direction=above]{}{\belowarrow} + \reactand[above]{ \substance }{} + }{} + \end{rxn} +\end{Example} +This issue is to be solved in future versions of \mC. + +\subsection{dummy} +\verb=\dummy= creates an empty node. This can be useful if you want to start the reaction scheme with a command, that needs to refer (explicitly or implicitly) to a node on the main chain. + +\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{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} + \dummy + \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} + \dummy + \mesomeric{ + \reactand{ \chemfig{*6(=-=-=-)} }{} + \marrow[below] + \reactand[below]{ \chemfig{*6(-=-=-=)} }{} + }{} + \end{rxn} +\end{SideBySideExample} +Or maybe a coordination complex? +\begin{SideBySideExample} + \begin{rxn} + \dummy\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=-2em] {$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 \lw[2]{Br}{1}}}{} + \end{rxn} +\end{SideBySideExample} + +\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} +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. \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} +\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} +\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} +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{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}[<scale factor>] + ... + \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$. + +\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=4em]{ + \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=4em]{ + \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=4em]{ + \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=4em]{ + \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=4em]{ + \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=9.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=8em,yshift=-.5em]{ + \arrow[direction=above]{$-\Hpl$}{} + }{} + + \arrow[length=2.75]{}{} + \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}![.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}[.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}[.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}[.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}[.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}[.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}[.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}[.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}[.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=9.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}[.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=9.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=9.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=8em!]{ + \arrow[direction=above]{$-\Hpl$}{} + }{} + ... +\end{Verbatim} +\begin{rxn}[.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=9.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=8em]{ + \arrow[direction=above]{$-\Hpl$}{} + }{} + \arrow{}{} + \reactand{ \chemname{\chemfig{*6(-=-=(-Br)-=)}}{bromobenzene \compound{bromobenzene}} }{} +\end{rxn} +Now we're almost there. Due to whatever reasons, the last arrow is a little bit shifted up. And, of course, the arrow of the main reaction is too short. +\begin{Verbatim} + \begin{rxn}[.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=9.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=8em,!yshift=-.5em!]{ + \arrow[direction=above]{$-\Hpl$}{} + }{} + + \arrow[!length=2.75!]{}{} + \reactand{ \chemname{\chemfig{*6(-=-=(-Br)-=)}}{bromobenzene \compound{bromobenzene}} }{} + \end{rxn} +\end{Verbatim} + \begin{rxn}[.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=9.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=8em,yshift=-.5em]{ + \arrow[direction=above]{$-\Hpl$}{} + }{} + + \arrow[length=2.75]{}{} + \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} +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. +\end{document}
\ No newline at end of file |