summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/latex/mychemistry/mychemistry_en.tex
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2011-04-05 23:17:45 +0000
committerKarl Berry <karl@freefriends.org>2011-04-05 23:17:45 +0000
commit45355d823acdbb26b128d0aa6370058a85b7ecb5 (patch)
tree1fa57142655e811ea519516ff03cd44e0c08433f /Master/texmf-dist/doc/latex/mychemistry/mychemistry_en.tex
parent024228db99693079b2ebbc9aff20e89811eb8810 (diff)
mychemistry 1.3 (5apr11)
git-svn-id: svn://tug.org/texlive/trunk@21984 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/doc/latex/mychemistry/mychemistry_en.tex')
-rw-r--r--Master/texmf-dist/doc/latex/mychemistry/mychemistry_en.tex1339
1 files changed, 760 insertions, 579 deletions
diff --git a/Master/texmf-dist/doc/latex/mychemistry/mychemistry_en.tex b/Master/texmf-dist/doc/latex/mychemistry/mychemistry_en.tex
index 68dd917fc13..e9bdab2407d 100644
--- a/Master/texmf-dist/doc/latex/mychemistry/mychemistry_en.tex
+++ b/Master/texmf-dist/doc/latex/mychemistry/mychemistry_en.tex
@@ -4,7 +4,7 @@
% - Creating reaction schemes with LaTeX and ChemFig ---------------------------------- %
% ------------------------------------------------------------------------------------- %
% - Clemens Niederberger -------------------------------------------------------------- %
-% - 2011/03/20 ------------------------------------------------------------------------ %
+% - 2011/04/04 ------------------------------------------------------------------------ %
% ------------------------------------------------------------------------------------- %
% - http://www.niederberger-berlin.net/2011/02/latex-mychemistry/ --------------------- %
% - kontakt@niederberger-berlin.net --------------------------------------------------- %
@@ -26,14 +26,15 @@
% - - %
% - The Current Maintainer of this work is Clemens Niederberger. - %
% - - %
-% - This work consists of the files mychemistry.sty, mychemistry_de.tex and - %
-% - mychemistry_en.tex - %
+% - This work consists of the files mychemistry.sty, mychemistry_de.tex, - %
+% - mychemistry_en.tex and bondwidth.tex - %
% ------------------------------------------------------------------------------------- %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\documentclass[DIV10]{scrartcl}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% - Pakete ---------------------------------------------------------------------------- %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\usepackage{etoolbox}
\usepackage{scrhack} % verbessert KOMAs Zusammenspiel mit floats
\usepackage[english]{babel} % Sprache
\usepackage{emerald} % chemfig-Schrift
@@ -41,9 +42,9 @@
\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{siunitx}
+ \DeclareSIUnit{\emlength}{em}
+ \DeclareSIUnit{\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
@@ -81,9 +82,8 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\usepackage{hyperref}
\hypersetup{colorlinks=true, % Setup der Hyperlinks und des pdf
- linkcolor=black,
+ linkcolor=green!50!black,
urlcolor=blue!70,
- citecolor=black,
plainpages=false,
bookmarksopen=true,
bookmarksopenlevel=2,
@@ -105,7 +105,7 @@
\lstset{literate={ä}{{\"a}}1 {ö}{{\"o}}1 {ü}{{\"u}}1 {Ä}{{\"A}}1 {Ö}{{\"O}}1 {Ü}{{\"U}}1 {ß}{{\ss}}1}
\lstset{
language=[LaTeX]TeX,
- basicstyle={\ttfamily\footnotesize}, % Grundstil
+ basicstyle={\ttfamily}, % Grundstil
extendedchars=true,
numbers=left, % Zeilennummern
numberstyle=\tiny, % Größe des Zeilennummern
@@ -113,12 +113,15 @@
gobble=0, % das erste Leerzeichen abschneiden
xleftmargin=20pt, % Einrückung links
breaklines=true, % Zeilenumbruch
- moredelim=[is][\color{blue}]{!!}{!!}, % Hervorhebung
+ moredelim=[is][\color{red!25!purple}]{!!}{!!},% 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},
+ keywordstyle=[20]\color{blue},
+ morekeywords=[20]{rxn,rxnfloat,rxnscheme,tikzpicture},
+ texcsstyle=[30]\color{code},
+ moretexcs=[30]{arrow,branch,chemand,chemfig,chemmove,chemname,chemrel,chemsign,ce,compound,declarecompound,draw,dummy,elmove,floatplacement,floatstyle,Hpl,Hyd,lewis,listof,makeinvisible,makevisible,marrow,mCsetup,merge,mesomeric,node,nu,om,op,ox,reactand,restylefloat,setarrowlength,setatomsep,setatomsize,setbondlength,setbondshape,setcrambond,setrcndist,setrxnalign,setschemealign,setschemename,transition},
fancyvrb=true
}
@@ -142,9 +145,41 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% - neue Befehle ---------------------------------------------------------------------- %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% - Hyperlinks in Listings ------------------------------------------------------------ %
+% - auf Basis von Code usenet: comp.text.tex ------------------------------------------ %
+\makeatletter
+\AtBeginEnvironment{VerbatimOut}{\let\lsthk@OutputBox\lsthk@OutputBox@H@@k\let\lstbasicfont\footnotesize}
+\AtBeginEnvironment{Verbatim}{\let\lsthk@OutputBox\lsthk@OutputBox@H@@k\let\lstbasicfont\footnotesize}
+\AtBeginEnvironment{SideBySideExample}{\let\lsthk@OutputBox\lsthk@OutputBox@H@@k\let\lstbasicfont\footnotesize}
+\AtBeginDocument{\preto\FV@VerbatimBegin{\let\lsthk@OutputBox\lsthk@OutputBox@H@@k\let\lstbasicfont\footnotesize}}
+\AtBeginDocument{\preto\FV@VerbatimBegin{\let\lsthk@OutputBox\lsthk@OutputBox@H@@k\let\lstbasicfont\footnotesize}}
+\providerobustcmd*\ifrefundefined [1]{%
+ \begingroup%
+ \csname @safe@activestrue\endcsname%
+ \expandafter\endgroup\csname @\ifcsname r@#1\endcsname second\else first\fi oftwo\endcsname
+}% \ifrefundefined
+\def\lsthk@OutputBox@H@@k{%
+ \begingroup%
+ \let\lst@UM\@empty%
+ \edef\@tempc{ssec:\detokenize\expandafter{\the\lst@token }}%\edef
+ \ifrefundefined{\@tempc}%
+ \endgroup%
+ \sethyperlistings%
+}% \lsthk@OutputBox@fcltxH@@k
+\def\sethyperlistings {\global\let \hyperlistingsreference =\@tempc
+ \endgroup \aftergroup \dohyperlistings }% after \hbox
+\def\dohyperlistings {\def\lst@alloverstyle ##1{\hyperlistings ##1}}
+\def\hyperlistings{%
+ \setbox\@tempboxa\hbox%
+ \bgroup%
+ \rlap{\hypersetup {linkcolor=.}\relax\fboxrule\z@%
+ \hyperref[\hyperlistingsreference]{\boxframe{\wd\@tempboxa}{\ht\@tempboxa}{\dp\@tempboxa}}}%
+ \unhbox\@tempboxa%
+ \egroup%
+}% \hyperlistings
+\let\lsthk@OutputBox\lsthk@OutputBox@H@@k
% - Beispiele ------------------------------------------------------------------------- %
% - auf Basis der Beispiele in der fancyvrb-Dokumentation ----------------------------- %
-\makeatletter
\newcommand{\BeginExample}{%
\VerbatimEnvironment
\begin{VerbatimOut}[gobble=1]{\jobname.tmp}}
@@ -205,7 +240,8 @@
\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}}
+\newcommand\Vii[1][0pt]{\leavevmode\llap{\footnotesize\ECFTeenSpirit v1.2\kern\dimexpr20pt+#1\relax}}
+\newcommand\NEU[1][0pt]{\leavevmode\llap{\footnotesize\ECFTeenSpirit\color{red}New in \mCversion\kern\dimexpr20pt+#1\relax}}
\newlength{\tmplength}
% - für Beispiele --------------------------------------------------------------------- %
\newcommand{\abovearrow}{\tikz\node[draw,minimum width=3em,minimum height=1.5em,blue]{\footnotesize above};}
@@ -222,36 +258,36 @@
\begin{verbatim}
\begin{rxn}[scale=.7]
\setatomsep{1.5em}\footnotesize
- \reactand{
+ \reactand[,a]{
\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}%
};
@@ -266,33 +302,58 @@
\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}
+ \reactand[,a]{ \chemfig{C(-[4]*6(=-=-=-))(-[2]*6(=-=-=-))(-[6,,,2]HO)-C(-[2]CH_3)(-[6]OH)-CH_3} }
\branch[above right=of a]{
\arrow[direction=above right,length=.7]{}{}
- \reactand[above right]{ \chemfig{C(-[4]*6(=-=-=-))(-[2]*6(=-=-=-))(-[@{e1}6,,,2]H_2@{e2}\chembelow{O}{\oplus})-C(-[2]CH_3)(-[6]OH)-CH_3}\elmove{e1}{10:4mm}{e2}{-10:4mm} }{}
+ \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} }{}
+ \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} }{}
- }{}
+ \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}).
+\subsection{Changes}
+The new features or changes of each version are marked with {\ECFTeenSpirit v} followed by the version number, \eg {\ECFTeenSpirit v1.2}. The most recent changes are marked with {\ECFTeenSpirit\color{red}New in \mCversion}.
+
+\subsubsection{Version 1.2}
+\Vii%
+Since v1.2 there are some new features. The main part plays behind the scenes: the wrong arrow- and branch-alignments have been corrected. \textbf{Due to these changes \mC now needs Version 2.10 of \TikZ (or pgf, actually}, see \ref{ssec:voraussetzungen}).
-There are some new "frontend" features as well. 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}).
+There are some new "frontend" features as well. For one thing there are some new package options (see \ref{ssec:paketoptionen}). Additionally the arrows have got two new keys (see \ref{ssec:arrow}).
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.
+Last but not least since v1.2 \mC underlies LPPL version 1.3 or later.
+
+\subsubsection{Version 1.3}
+\NEU%
+The commands \lstinline+\branch+, \lstinline+\mesomeric+, \lstinline+\reactand+ and \lstinline+\transition+ now cannot only accept alignment as optional argument but \TikZ keys as well. Also the second mandatory Argument \lstinline+<anchor>+ now is an optional one. So the first argument still is alignment, the second is the anchor name and in the third you can use arbitrary \TikZ keys.
+\begin{Verbatim}
+ \command[<alignment>,<anchor>,<tikz>]{}
+\end{Verbatim}
+Version 1.2 explicitly needed a given alignment, if one wanted to use \TikZ keys, even with default alignment. Since \mCversion\ this isn't required any more.
+\begin{Verbatim}
+ % up to version 1.2:
+ \reactand{\ce{Br2}}{}\arrow{$h\nu$}{}\reactand!![right,draw,inner sep=5pt]!!{\ce{2 \lewis{0.,Br}}}{}
+ % since version 1.3:
+ \reactand{\ce{Br2}}\arrow{$h\nu$}{}\reactand!![,,draw,inner sep=5pt]!!{\ce{2 \lewis{0.,Br}}}
+\end{Verbatim}
+The commands to customize \mC have been renamed and the command\linebreak\lstinline+\mCsetup+ has been added. Now you can customize \mC using only one command. See \ref{ssec:setarrowlength}, \ref{ssec:setatomsize}, \ref{ssec:setbondlength}, \ref{ssec:setbondshape} and \ref{ssec:mCsetup}.
+
+There is the new command \lstinline+\chemand+, which produces a $+$, see \ref{ssec:chemand}.
+
+If you're using \CF v0.4, \mC inputs the file \lstinline+bondwith.tex+ which provides the command \lstinline+\setbondwidth{<width>}+ with which you can change the line thickness of bonds.
+
+And you might find this one nice: every \mC command in a listing is a hyperlink referring to the corresponding entry in the command reference.
\subsection{Licence}
\mC \mCversion\ underlies the The LaTeX project public license\\(\url{http://www.latex-project.org/lppl.txt}).
@@ -304,35 +365,37 @@ In order to function properly \mC needs some packages to be available.
\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.
+ \item[float] the \lstinline=rxnscheme= environment is defined with this package;
+ \item[pgf/\TikZ] pgf actually isn't just one package but a whole bundle. They are the basis layer for \TikZ. \mC needs at least the version from 09/08/2010\footnote{\url{http://sourceforge.net/projects/pgf/files/}}. More precisely: the command \lstinline=\pgfpositionnodelater= must exist. Even more precisely: only the \lstinline+\arrow+ key \lstinline+both+ (see \ref{ssec:arrow}) needs \lstinline=\pgfpositionnodelater=. If you don't use this option, \mC should work nicely with pgf v2.00. Older versions have not been tested.
\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 \CF\footnote{by Christian Tellechea, \url{http://www.ctan.org/tex-archive/macros/generic/chemfig/}},
\item `mhchem'\footnote{by Martin Hensel, \url{http://www.ctan.org/tex-archive/macros/latex/contrib/mhchem/}} in version 3, when ist exists,
- \item `chemexec'\footnote{by me, \url{http://www.niederberger-berlin.net/downloads/?did=1}}, when it exists, and
+ \item `chemexec'\footnote{by me, \url{http://www.ctan.org/tex-archive/macros/latex/contrib/chemexec/}}, when it exists, and
\item `chemcompounds'\footnote{by Stephan Schenk, \url{http://www.ctan.org/tex-archive/macros/latex/contrib/chemcompounds/}}, when ist exists.
\end{itemize}
-How these packages work, you can read in their documentation. Commands provided by these packages are for example
+How these packages work, you can read in their documentations. 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).
+ \item \lstinline=\ce{}= (mhchem)
+ \item \lstinline=\ox{}{}=, \lstinline=\om[]=, \lstinline=\op[]=, \lstinline=\Hyd=, \lstinline=\Hpl= (chemexec)
+ \item \lstinline=\chemfig[][]{}=, \lstinline=\chemrel[]{}=, \lstinline=\chemsign[]{}=, \lstinline=\lewis{}= (\CF)
+ \item \lstinline=\declarecompound[]{}=, \lstinline=\compound{}= (chemcompounds).
\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.
+\mC provides two environments within which the mechanisms are created. Both environments basically are \lstinline+tikzpicture+ environments. One might ask oneself: why? You can do loads of stuff with \CF already. And \TikZ provides all the possibilities one could ask for. But since I'm a lazy guy I wrote several macros providing \TikZ commands, I often used. They got so many and got more and more possibilities to adjust, that I bundled them into this package. Of course you can still use \TikZ and stay more flexible with it, if you like.
\subsection{Basic Principle}
-Within the `tikzpicture' reactands and arrows are placed as nodes on a `chain'\footnote{Provided by the tikzlibrary `chains'}.
+Within the \lstinline+tikzpicture+ reactands and arrows are placed as nodes on a \lstinline+chain+\footnote{Provided by the tikzlibrary `chains'}.
\begin{SideBySideExample}
\begin{tikzpicture}[start chain]
\node [on chain] {A};
@@ -368,73 +431,76 @@ Above all \mC uses the possibility of creating branches to the chain.
\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.
+In some of the examples in this documentation the nodes are boxed with a coloured frame (see \ref{ssec:makevisible}). This is done so one can see, which size they have and which impact changes of the alignment have on them.
+
\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} }{}
+ \reactand{ \chemfig{-[::30]-[::-60]OH} }
\arrow{Ox.}{}
- \reactand{ \chemfig{-[::30]=_[::-60]O} }{}
+ \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}).
+ \vitem=\begin{rxn}[<keys>]= The first of two environments. It creates a centered reaction scheme between two paragraphs (see \ref{ssec:rxn}).
+ \vitem=\reactand[<alignment>,<anchor>,<tikz>]{<formula>}= places a \lstinline+node+ on the \lstinline+chain+, in which the chemical formul\ae\ are written. The default alignment is to the \lstinline=right= (see \ref{ssec:reactand}).
+ \vitem=\arrow[<keys>]{<above>}{<below>}= creates an arrow, which by default has a length of \SI{5}{\emlength} pointing to the right (see \ref{ssec:arrow}).
\end{description}
\begin{SideBySideExample}
\begin{rxn}
- \reactand{ \chemfig{-[::30]=_[::-60]O} }{}
+ \reactand{ \chemfig{-[::30]=_[::-60]O} }
\arrow[direction=below]{}{Ox.}
- \reactand[below]{ \chemfig{-[::30](-[::60]OH)=_[::-60]O} }{}
+ \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.
+As you can see one can align the reaction scheme vertical as well. By giving \lstinline=\reactand= the option \lstinline=below=, the carbonic acid is placed below the arrow. With \lstinline+direction=below+ the arrow points down instead to the right.
\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} }{}
+ \reactand{ \chemfig{-[::30]-[::-60]OH} }
\arrow{}{}
- \reactand{ \chemfig{-[::30]=_[::-60]O} }{carbonyl}
+ \reactand[,carbonyl]{ \chemfig{-[::30]=_[::-60]O} }
\arrow[direction=below]{}{}
- \reactand[below]{ \chemfig{-[::30](-[::60]OH)=_[::-60]O} }{}
+ \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} }{}
- }{}
+ \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>}=\
+ \vitem=\branch[<alignment>,<anchor>,<tikz>]{<branch commands>}= (see \ref{ssec:branch})
\end{description}
-The branch was placed right of the first reactand with the anchor \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=:
+The branch was placed right of the first reactand with the anchor \lstinline=carbonyl= by using the option \lstinline+right=of carbonyl+. Inside the branch we used an arrow with the key \lstinline+type={<=>}+ so we would get an equilibrium arrow. Other types would for example be \lstinline=->= (default), \lstinline=<-= or \lstinline=<->=.
+
+Extensive reaction schemes can be realized through multiple usage of \lstinline=\branch=:
\begin{Example}
\begin{rxn}
- \reactand{ \chemfig{-[::30]-[::-60]OH} }{}
+ \reactand{ \chemfig{-[::30]-[::-60]OH} }
\arrow{}{}
- \reactand{ \chemfig{-[::30]=_[::-60]O} }{carbonyl}
+ \reactand[,carbonyl]{ \chemfig{-[::30]=_[::-60]O} }
\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]{
+ \reactand[below]{ \chemfig{-[::30](-[::60]OH)=_[::-60]O} }
+ \branch[right=of carbonyl,imin]{
+ \arrow[type={<=>},length=1.12]{\ce{NH2R}}{}
+ \reactand{ \chemfig{-[::30]=_[::-60]N(-[6]H)-[::60]R} }
+ }
+ \branch[below right=of carbonyl,halbacetal,yshift=-2pt,xshift=3pt]{
+ \arrow[type={<=>},direction=below right,length=1.12,aboveshift=3pt]{ \chemfig{[,.75]-[::30]-[::-60]OH} }{}
+ \reactand[below right]{ \chemfig{-[::30](-[::60]O-[::-60]-[::-60])-[::-60]OH} }
+ }
+ \branch[above=of carbonyl,aldol,xshift=5.2em]{
\arrow[direction=above]{ \chemfig{[,.75]-[::30]=_[::-60]O}/\Hpl }{}
- \reactand[above]{ \chemfig{-[::30](-[::60]OH)-[::-60]-[::60]=[::60]O} }{}
+ \reactand[above]{ \chemfig{-[::30](-[::60]OH)-[::-60]-[::60]=[::60]O} }
\arrow{$-\ce{H2O}$}{}
- \reactand{ \chemfig{-[::30]=[::-60]-[::60]=[::60]O} }{}
- }{aldol}
+ \reactand{ \chemfig{-[::30]=[::-60]-[::60]=[::60]O} }
+ }
\end{rxn}
\end{Example}
@@ -442,9 +508,9 @@ Extensive reaction schemes can be realized through multiple usage ao \verb=\bran
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} }{}
+ \reactand{ \chemfig{=[::30]-[::-60]OH} }
\arrow[type={<=>}]{}{}
- \reactand{ \chemfig{-[::30]=[::-60]O} }{}
+ \reactand{ \chemfig{-[::30]=[::-60]O} }
\end{rxnscheme}
\end{Example}
Here we use the environment
@@ -453,7 +519,7 @@ Here we use the environment
...
\end{rxnscheme}
\end{Verbatim}
-In the command reference (\ref{ssec:rxnscheme}) you can read how you can customize.
+In the command reference (\ref{ssec:rxnscheme}) you can read how to customize the scheme.
\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:
@@ -464,40 +530,40 @@ There are some predefined values, that are basically due to my personal taste. B
Outside the \mC environments the defaults of \CF still are set.
\begin{SideBySideExample}
\begin{rxn}
- \reactand{\chemfig{**6(------)}}{}
+ \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>}
+ \setbondlength{<length>}
+ \setbondshape{<base length>}{<dash thickness>}{<dash spacing>}
+ \setatomsize{<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}
+With these commands, the parameters are changed \emph{for all following} \mC environments. If you leave the arguments empty, default values are restored. Default for \lstinline=\setatomsize= is \lstinline=\small=.
+\begin{Example}
+ \setbondlength{2.1em}\setbondshape{5pt}{1pt}{2pt}\setatomsize{\Large}
\begin{rxn}
- \reactand{\chemfig{-[::30](<[::60])-[::-60](<:[::-60])-[::60]}}{}
+ \reactand{\chemfig{-[::30](<[::60])-[::-60](<:[::-60])-[::60]}}
\end{rxn}
- \bondlength{}\bondshape{}{}{}\atomsize{}
+ \setbondlength{}\setbondshape{}{}{}\setatomsize{}
\begin{rxn}
- \reactand{\chemfig{-[::30](<[::60])-[::-60](<:[::-60])-[::60]}}{}
+ \reactand{\chemfig{-[::30](<[::60])-[::-60](<:[::-60])-[::60]}}
\end{rxn}
-\end{SideBySideExample}
+\end{Example}
If you only want to change the parameters of a single environment you can use \CF's commands and \LaTeX's fontsize commands \emph{inside the environment}.
-\begin{SideBySideExample}
+\begin{Example}
\begin{rxn}
\setatomsep{2.1em}\setcrambond{5pt}{1pt}{2pt}\Large
- \reactand{\chemfig{-[::30](<[::60])-[::-60](<:[::-60])-[::60]}}{}
+ \reactand{\chemfig{-[::30](<[::60])-[::-60](<:[::-60])-[::60]}}
\end{rxn}
\begin{rxn}
- \reactand{\chemfig{-[::30](<[::60])-[::-60](<:[::-60])-[::60]}}{}
+ \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:
+\end{Example}
+The default length of an arrow is \SI{5}{\emlength} or $5\sqrt2\,\si{\emlength}$ if it's a diagonal one. You can change that by using the following command:
\begin{Verbatim}
- \arrowlength{<length>}
+ \setarrowlength{<length>}
\end{Verbatim}
\SaveVerb{arrowlength}=<length>=%
Then the values are \UseVerb{arrowlength} or $\text{\UseVerb{arrowlength}}\cdot\sqrt{2}$ respectively.
@@ -505,72 +571,151 @@ Then the values are \UseVerb{arrowlength} or $\text{\UseVerb{arrowlength}}\cdot\
\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+chemstyle+\settowidth{\tmplength}{\tt chemstyle}\Vii[\tmplength]load the `chemstyle' package, without conflicts with \mC.
+ \vitem+color=<colour>+ This loads `chemexec' with the options \lstinline=color<colour>= \&\ \lstinline+shade=true+.
+ \vitem+english+ With this option, \mC loads the english version of `chemexec', if the package isn't loaded separately before. The name of the \lstinline=rxnscheme= environment (see \ref{ssec:rxnscheme}) is changed into "Reaction scheme".
\vitem+nochemexec+ prevent \mC from loading `chemexec'.
- \vitem+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.).}.
+ \vitem+nocolor+ `chemexec' is loaded without colour and with the option \lstinline+shade=false+ (default behaviour of \mC).
+ \vitem+nocompounds+\settowidth{\tmplength}{\tt nocompounds}\Vii[\tmplength]prevent \mC from loading `chemcompounds'.
+ \vitem+nomhchem+\settowidth{\tmplength}{\tt nomhchem}\Vii[\tmplength]prevent \mC from loading `mhchem' lädt, if `chemexec' isn't loaded either.
+ \vitem+nopackages+\settowidth{\tmplength}{\tt nopackages}\Vii[\tmplength]prevent \mC from loading \emph{any} package (except \CF)\footnote{apart from the ones \mC needs to function (like \TikZ etc.).}.
+ \vitem+placement=<position>+ The default placement behaviour of the \lstinline=rxnscheme= environment is changed to \lstinline=<position>=.
+ \vitem+shade+ loads `chemexec' with the \lstinline+shade=true+ option.
\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}).
+
+\subsection{The Alignment Question}
+Since reactands, arrows and branches are aligned centered to the referred object, the default alignment not always produces nice results.
+\begin{Example}
+ \makevisible
+ \begin{rxn}
+ \reactand{ \chemname{\chemfig{*6(-=-=-=)}}{benzene \compound{benzene}} }
+ \arrow{}{}
+ \reactand{ \chemname{\chemfig{*6(-=-=(-Br)-=)}}{bromobenzene \compound{bromobenzene}} }
+ \end{rxn}
+\end{Example}
+As you can see, both reactands are not aligned equally to the arrow, as far as the benzene ring is concerned. The first reactand seems to be too shifted up. Trying to solve this with \TikZ code fails:
+\begin{Example}
+ \makevisible
+ \begin{rxn}
+ \reactand[,,yshift=-1em]{ \chemname{\chemfig{*6(-=-=-=)}}{benzene \compound{benzene}} }
+ \arrow{}{}
+ \reactand{ \chemname{\chemfig{*6(-=-=(-Br)-=)}}{bromobenzene \compound{bromobenzene}} }
+ \end{rxn}
+\end{Example}
+This is, because the first reactand is shifted with the respect to the object it refers to. Since it is the first object on the chain itself, it isn't shifted at all. The following arrow always is centered to the object before.
+\begin{SideBySideExample}
+ \makevisible
+ \begin{rxn}
+ \reactand{A}
+ \chemand
+ \reactand[,,yshift=1em]{B}
+ \arrow{}{}
+ \end{rxn}
+\end{SideBySideExample}
+Since there is no possibility to change the alignment of the arrow itself (yet), what you can do is put it inside a branch.
+\begin{Example}
+ \makevisible
+ \begin{rxn}
+ \reactand{A}
+ \chemand
+ \reactand[,,yshift=1em]{B}
+ \branch[,,yshift=-1em]{\arrow{}{}}
+ \end{rxn}
+ \begin{rxn}
+ \reactand{ \chemname{\chemfig{*6(-=-=-=)}}{benzene \compound{benzene}} }
+ \branch[,,yshift=1em]{\arrow{}{}}
+ \reactand{ \chemname{\chemfig{*6(-=-=(-Br)-=)}}{bromobenzene \compound{bromobenzene}} }
+ \end{rxn}
+\end{Example}
+For the last example this isn't the best solution, though, because exact alignment needs lots of tries until you get the required result. There is another solution: an invisible bromine to the first benzene.
+\begin{Example}
+ \makevisible
+ \begin{rxn}
+ \reactand{ \chemname{\chemfig{*6(-=-=(-[,,,,draw=none]\phantom{Br})-=)}}{benzene \compound{benzene}} }
+ \arrow{}{}
+ \reactand{ \chemname{\chemfig{*6(-=-=(-Br)-=)}}{bromobenzene \compound{bromobenzene}} }
+ \end{rxn}
+\end{Example}
+In other cases, \TikZ code can successfully be used:
+\begin{Example}
+ \makevisible
+ default:
+ \begin{rxn}
+ \reactand{\chemfig{-[:-30]-[:30](=[2]O)-[:-30]OH}}
+ \chemand
+ \reactand{\chemfig{HO-[:30]-[:-30]-[:30]}}
+ \arrow{[\Hpl]}{\SI{200}{\celsius}}
+ \reactand{\chemfig{-[:-30]-[:30](=[2]O)-[:-30]O-[:30]-[:-30]-[:30]}}
+ \end{rxn}
+ hydroxy groups at the same height:
+ \begin{rxn}
+ \reactand{\chemfig{-[:-30]-[:30](=[2]O)-[:-30]OH}}
+ \chemand[,,yshift=-1.2em]
+ \reactand[,,yshift=.12em]{\chemfig{HO-[:30]-[:-30]-[:30]}}
+ \branch[,,yshift=1em]{\arrow{[\Hpl]}{\SI{200}{\celsius}}}
+ \reactand{\chemfig{-[:-30]-[:30](=[2]O)-[:-30]O-[:30]-[:-30]-[:30]}}
+ \end{rxn}
+\end{Example}
+I'm afraid that in many cases you'll have to play with \lstinline+xshift+ and \lstinline+yshift+, until the scheme looks like you want. Maybe further versions of \mC will provide a more user friendly alignment syntax.
+
+\subsection{Using \TikZ to Achieve Other Results}
+You could, just for fun?, change the looks of a molecule with \TikZ.
\begin{SideBySideExample}
\begin{rxn}
- \reactand[right,->,green!45!blue!55]{ \chemfig{*6(---(-)---)} }{}
+ \reactand[,,->,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{\emptyreactand}{\reactand[,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}{}}{}
+ \reactand{\bf\Large Ionic compounds (I)}
+ \reactand[below,a,yshift=1em]{Fill in the missing parts}
+ \branch[below=of a,b]{ \reactand[,,minimum width=5em]{ \stoich\ Na }\chemand \emptyreactand \arrow{}{} \emptyreactand \chemand \emptyreactand }
+ \branch[below=of b,,draw,inner sep=3pt]{\reactand[,,minimum width=5em]{}\chemand\reactand[,,minimum width=5em]{}\arrow{}{}\reactand[,,minimum width=5em]{Sodium chloride $+$ Hydrogen}}
\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}.
+In the following section every command is explained.
+
\subsection{arrow}\label{ssec:arrow}
-Reaction arrows are created with \verb=\arrow=.
+Reaction arrows are created with \lstinline=\arrow=.
\begin{Verbatim}
\arrow[<keys>]{<above>}{<below>}
\end{Verbatim}
-There are several keys to customize the arrows. They are used like \verb+key=value+.
+There are several keys to customize the arrows. They are used like \lstinline+key=value+.
\begin{description}
\vitem+direction=<direction>+ -- possible values are:
\begin{rxn}
- \arrowlength{2.5em}
+ \setarrowlength{2.5em}
\dummy[a]
- \arrow{}{}\reactand{right}{}
- \branch[above right=of a]{\arrow[direction=above right]{}{}\reactand[above right]{above right}{}}{}
- \branch[above=of a]{\arrow[direction=above]{}{}\reactand[above]{above}{}}{}
- \branch[above left=of a]{\arrow[direction=above left]{}{}\reactand[above left]{above left}{}}{}
- \branch[left=of a]{\arrow[direction=left]{}{}\reactand[left]{left}{}}{}
- \branch[below left=of a]{\arrow[direction=below left]{}{}\reactand[below left]{below left}{}}{}
- \branch[below=of a]{\arrow[direction=below]{}{}\reactand[below]{below}{}}{}
- \branch[below right=of a]{\arrow[direction=below right]{}{}\reactand[below right]{below right}{}}{}
+ \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\}}{}}{}
+ \branch[below=of a,b,yshift=1em]{\arrow{}{}\reactand{\ttfamily type=\{-\textgreater\}}}
+ \branch[below=of b,c,yshift=1em]{\arrow[type={<-}]{}{}\reactand{\ttfamily type=\{\textless-\}}}
+ \branch[below=of c,d,xshift=.5em,yshift=1em]{\arrow[type={<->}]{}{}\reactand{\ttfamily type=\{\textless-\textgreater\}}}
+ \branch[below=of d,e,yshift=1em]{\arrow[type={<=>}]{}{}\reactand{\ttfamily type=\{\textless=\textgreater\}}}
+ \branch[below=of e,,yshift=1em]{\arrow[type={-|>}]{}{}\reactand{\ttfamily type=\{-\textbar\textgreater\}}}
\end{rxn}
-\vitem+length=<factor>+ -- the length (\unit{5.0}\emlength, factor = $1.0$, default) is multiplied with this factor.
+\vitem+length=<factor>+ -- the length (\SI{5.0}{\emlength}, factor = $1.0$, default) is multiplied with this factor.
\vitem+name=<anchor>+ -- this anchor can be used to refer to the arrow, \eg with a branch.
-\vitem+both+\settowidth{\tmplength}{\tt both}\NEU[\tmplength]-- this gives both arrow argument nodes the same width and height.
+\vitem+both+\settowidth{\tmplength}{\tt both}\Vii[\tmplength]-- this gives both arrow argument nodes the same width and height.
\end{description}
\begin{SideBySideExample}
\begin{rxn}
@@ -592,201 +737,217 @@ There are several keys to customize the arrows. They are used like \verb+key=val
Most keys in action:
\begin{SideBySideExample}
\begin{rxn}
- \reactand{A}{}
+ \reactand{A}
\arrow[name=arrow_a]{B}{}
- \branch[above=of arrow_a,yshift=-4em]{
+ \branch[above=of arrow_a,,yshift=-4em]{
\arrow[type=<-,direction=above,length=.7]{}{}
- \reactand[above]{D}{}
- }{}
- \reactand{C}{}
+ \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}
+ \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.
+By using the key \lstinline=both=, both argument nodes have the same size, which can correct the alignment.
\begin{SideBySideExample}
\makevisible
\begin{rxn}
- \reactand{A}{a}
+ \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.
+\NEU\lstinline=\branch= is used to, well, create a branch to a reaction. \textbf{If you used earlier versions of \mC please be aware, that the command syntax has changed.}
\begin{Verbatim}
- \branch[<alignment>]{<branch code>}{<anchor>}
+ \branch[<alignment>,<anchor>,<tikz>]{<branch code>}
\end{Verbatim}
-For \verb=\branch= alignment an anchor is important. Let's take a look at an example:
+For \lstinline=\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}
+ \reactand[,start]{\chemfig{-[::30]=_[::-60](-[::-60])-[::60]}}
\arrow[length=.75]{\ce{HCl}}{}
- \reactand{\chemfig{-[::30]-[::-60](-[::120]Cl)(-[::-60])-[::60]}}{}
- \reactand{\chemsign+\chemfig{-[::30](-[::60]Cl)-[::-60](-[::-60])-[::60]}}{}
+ \reactand{\chemfig{-[::30]-[::-60](-[::120]Cl)(-[::-60])-[::60]}}
+ \chemand
+ \reactand{\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]}}{}
- }{}
+ \reactand[below right]{\chemfig{-[::30]-[::-60](-[::120]OH)(-[::-60])-[::60]}}
+ \chemand
+ \reactand{\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}).
+The first reactand got the anchor \lstinline+start+ (line 2, also see \ref{ssec:reactand}).
\begin{Verbatim}[firstnumber=2]
- \reactand{ ... }{!!start!!}
+ \reactand[,!!start!!]{ ... }
\end{Verbatim}
-\verb=\branch= now refers to it in its alignment (line 6):
+\lstinline=\branch= now refers to it in its alignment (line 6):
\begin{Verbatim}[firstnumber=6]
- \branch[below right!!=of start!!]{ ... }{}
+ \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=.
+If you don't use the alignment reference to an anchor, you automatically refer to the last \lstinline=\reactand= or \lstinline=\arrow=. If you don't use alignment at all, then the branch is aligned to the right of the last \lstinline=\reactand= or \lstinline=\arrow=.
\begin{SideBySideExample}
\begin{rxn}
- \reactand{ \chemfig{CH_2=CH-OH} }{}
+ \reactand{ \chemfig{CH_2=CH-OH} }
\arrow[type={<=>},length=.5]{}{}
- \branch{ \reactand{ \chemfig{CH_3-CH=O} }{} }{}
+ \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}
+You have several options for alignment: you can either put the \lstinline+\branch+ on a \lstinline+chain+ or place it relative to a object.
+\begin{description}
+ \vitem+chain+ In this case you use: \lstinline+on chain=going <value>+.
+ \item[relative] In this case you use: \lstinline+<value>=of <anchor>+.
+\end{description}
+As possible \lstinline+<value>+ you have the same choices as for \lstinline+\reactand+, see \ref{ssec:reactand}. Default is \lstinline+on chain=going right+.
\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.
+If an arrow has two arguments with different sizes and is placed inside a branch, the alignment of the branch can go wrong. In this case the \lstinline=\arrow= key \lstinline=both= isn't a solution, since the smaller argument then is not placed next to the arrow but is centered in its node.
\begin{SideBySideExample}
\makevisible
\begin{rxn}
- \reactand{A}{a}
+ \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=.
+What you have to do is shift the branch using the \TikZ keys \lstinline=xshift= and \lstinline=yshift=.
\begin{SideBySideExample}
\makevisible
\begin{rxn}
- \reactand{A}{a}
+ \reactand[,a]{A}
\arrow{}{}
- \branch[below=of a,xshift=-1.35em]{
+ \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.
+\subsection{chemand}\label{ssec:chemand}
+\NEU%
+The command
+\begin{Verbatim}
+ \chemand[<alignment>,<anchor>,<tikz>]
+\end{Verbatim}
+produces and places a $+$ in the same way \lstinline+\reactand+ places arbitrary text.
+\begin{Example}
+ \begin{rxn}
+ \reactand{\chemfig{*6(------)}}
+ \chemand
+ \reactand{\ce{Br2}}
+ \arrow{$h\nu$}{}
+ \reactand{\chemfig{*6(--(-Br)----)}}
+ \chemand
+ \reactand{\ce{HBr}}
+ \end{rxn}
+\end{Example}
+The optional arguments for \lstinline+\chemand+ and \lstinline+\reactand+ are the same, see \ref{ssec:reactand}.
+
+\subsection{dummy}\label{ssec:dummy}
+\lstinline=\dummy= creates an empty node. \lstinline=\arrow= needs to follow after a node, because \lstinline=\arrow= internally uses \lstinline=\tikzchainprevious=. If there is no node on the chain \emph{before} \lstinline=\arrow= is used, it will cause an error. But by using \lstinline=\dummy= you can start a scheme with an arrow anyway.
\begin{SideBySideExample}
\begin{rxn}
\dummy\arrow{}{}
\end{rxn}
\end{SideBySideExample}
-\subsection{elmove}
-\verb=\elmove= just is a shortcut for \CF's \verb=\chemmove=.
-\begin{Verbatim}
+\subsection{elmove}\label{ssec:elmove}
+\lstinline=\elmove= just is a shortcut for \CF's \lstinline=\chemmove=.
+\begin{lstlisting}[emphstyle=\normalcolor]
\elmove[<tikz>]{<start>}{<start direction>}{<end>}{<end direction>}
-\end{Verbatim}
+\end{lstlisting}
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.
+using \lstinline?[->,red,shorten <=3pt,shorten >=1pt]? as default for \lstinline=<tikz>=. How you use \lstinline+\chemmove+ is described in the documentation for \CF.
-\begin{SideBySideExample}
+\begin{Example}
\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}
+\end{Example}
\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.
+\Vii%
+\lstinline=\makeinvisible= restores the normal \mC behaviour after \lstinline=\makevisible= (see \ref{ssec:makevisible}) has been used. \lstinline=\makeinvisible= only changes the looks of nodes following after it.
\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:
+\Vii%
+With \lstinline=\makevisible= you can visualize the nodes within which reactands, arrows and branches are set. This is useful when you're aligning branches, for example. You can see an example for \lstinline=\makevisible= in \ref{ssec:arrow}. Every kind of nodes is emphasized with a different colour:
\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.
+ \lstinline=\makevisible= only changes the looks of nodes following after it.
\begin{SideBySideExample}
\makevisible
\begin{rxn}
- \reactand{A}{a}
+ \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.
+\lstinline=\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}).
+It is a shortcut for \lstinline+\arrow[type=<->,length=.5,direction=<direction>]{}{}+. You can use \lstinline=<direction>= like the alignment option of \lstinline=\reactand= (see \ref{ssec:reactand} or \ref{ssec:mesomeric}).
+
+\subsection{mCsetup}\label{ssec:mCsetup}
+\NEU%
+With
+\begin{Verbatim}
+ \mCsetup{<keys>}
+\end{Verbatim}
+you can fully customize \mC. For each of \mC's commands going like \lstinline+\set<command>+ except \lstinline+\setbondshape+ there is a key \lstinline+<command>=<value>+. Additionally there is the key \lstinline+align=<value>+, with which you can change the alignment behaviour of both \lstinline+rxn+ and \lstinline+rxnscheme+, and the key \lstinline+reset+, with whith all values are reset to default.
+\begin{Example}
+ \mCsetup{
+ arrowlength=3em,
+ rcndist=2em,
+ atomsize=\large,
+ bondlength=3em,
+ %rxnalign=right,
+ %schemealign=left,
+ align=left
+ }
+ \setbondshape{4pt}{2pt}{1pt}
+ \begin{rxn}
+ \reactand{A}\arrow{}{}\reactand{\chemfig{A-(<[2])(<:[6])-B}}
+ \end{rxn}
+ \mCsetup{reset}
+ \begin{rxn}
+ \reactand{A}\arrow{}{}\reactand{\chemfig{A-(<[2])(<:[6])-B}}
+ \end{rxn}
+\end{Example}
\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.
+\lstinline=\merge= cannot only be used in \mC's environments but also in a `tikzpicture'. With \lstinline=\merge= you can, well, two branches into one. To be able to do that, you need to refer to anchors.
\begin{Verbatim}
\merge[<key>]{<target>}{<start a>}{<start b>}
\end{Verbatim}
@@ -809,162 +970,164 @@ It is a shortcut for \verb+\arrow[type=<->,length=.5,direction=<direction>]{}{}+
\end{tikzpicture}
\end{center}
\end{SideBySideExample}
-Usage of \verb=\merge= in a \mC environment:
+Usage of \lstinline=\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}
+ \reactand[,above]{ \chemfig{Cl-[:30,1.5]--[:-30,1.5]O-[:30,1.5]--[:-30,1.5]Cl}{} }
\arrow[length=.5]{}{}
- \reactand{ \chemfig{O(-[:-150]**6(-----(-OH)-))-[:90]-[:30]-[:-30]O-[:30]-[:-30]-[:-90]O-[:-30]**6(-(-HO)-----)} }{start_above}
+ \reactand[,start_above]{ \chemfig{O(-[:-150]**6(-----(-OH)-))-[:90]-[:30]-[:-30]O-[:30]-[:-30]-[:-90]O-[:-30]**6(-(-HO)-----)} }
% branch 2
- \branch[below=of above,xshift=8em,yshift=-4em]{
- \reactand{ \chemfig{**6((--[6,,,2]HO)-N-(--[6]OH)----)} }{}
+ \branch[below=of above,start_below,xshift=8em,yshift=-4em]{
+ \reactand{ \chemfig{**6((--[6,,,2]HO)-N-(--[6]OH)----)} }
\arrow[length=.5]{}{}
- \reactand{ \chemfig{**6((--[6]Br)-N-(--[6]Br)----)} }{}
- }{start_below}
+ \reactand{ \chemfig{**6((--[6]Br)-N-(--[6]Br)----)} }
+ }
% 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}
+ \branch[right=of start_above,target,xshift=5em,yshift=-4em]{
+ \reactand[,c]{ \chemfig{O(-[:-150]**6(-----(-O?)-))-[:90]-[:30]**6(-N-(--[:-90]O-[:-30]**6(-(-O-[6]-[:-150]-[:150]O-[:-150]-[:150]?)-----))----)} }
+ }
% 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.
+Please note, that you should use branches to refer to, when you use \lstinline=\merge= in a \mC environment. Using \lstinline=\merge= may afford playing with xshift and yshift until you get the result you want.
\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}
+ \reactand[,start_aa]{ \chemname{\chemfig{**6(---(-NH_2)---)}}{aniline} }
+ \reactand[below,start_ab,yshift=-3em]{ \chemname{\ce{HNO2}}{nitrous acid} }
+ \branch[right=of start_aa,target_a,xshift=6em,yshift=-5em]{
+ \reactand{ \chemname{\chemfig{**6(---(-N|_2\op)---)}}{diazonium ion} }
+ }% = start_ba
+ \branch[below=of target_a,start_bb,yshift=-3em]{
+ \reactand{ \chemname{\chemfig{**6(---(-NH_2)---)}}{aniline} }
+ }
+ \branch[right=of target_a,target_b,xshift=6em,yshift=-5em]{
+ \reactand{ \chemname{\chemfig{N(-[:-150]**6(------))=N-[:-30]**6(---(-NH_2)---)}}{aniline yellow} }
+ }
\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.
+\NEU%
+The \lstinline=\mesomeric= command works just like \lstinline=\branch= (see \ref{ssec:branch}) but places the formul\ae\ into square brackets. \textbf{If you used earlier versions of \mC please be aware, that the command syntax has changed.}
\begin{Verbatim}
- \mesomeric[<alignment>]{<formula>}{<anchor>}
+ \mesomeric[<alignment>,<anchor>,<tikz>]{<formula>}
\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=.
+The resonance formul\ae\ are written into \lstinline=<formula>=. With \lstinline=\marrow= (see \ref{ssec:marrow}) you create the resonance arrows. If needed you can give an anchor (\lstinline=<anchor>=) to \lstinline=\mesomeric= (also see \ref{ssec:branch}). Alignment is used the same way as with \lstinline=\reactand=.
\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(=-=-=-)} }{}
+ \reactand{ \chemfig{*6(=-=-=-)} }
\marrow[below]
- \reactand[below]{ \chemfig{*6(-=-=-=)} }{}
- }{}
+ \reactand[below]{ \chemfig{*6(-=-=-=)} }
+ }
\end{rxn}
\end{SideBySideExample}
Or maybe a coordination complex?
-\begin{SideBySideExample}
+\begin{Example}
\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}
+ \mesomeric[,a]{
+ \reactand{ \chemfig{H_3\lewis{0,N}-[,1.35,,,dotted]{Cu}(-[2,,,,dotted]\lewis{6,N}H_3)(-[6,,,,dotted]\lewis{2,N}H_3)-[,1.2,,,dotted]\lewis{4,N}H_3} }
+ }
\node[above right=of a,yshift=-1em] {$2\oplus$};
\end{rxn}
-\end{SideBySideExample}
+\end{Example}
\subsection{reactand}\label{ssec:reactand}
-The command \verb=\reactand= is somehow the basic command of \mC.
+\NEU%
+The command \lstinline=\reactand= is somehow the basic command of \mC. \textbf{If you used earlier versions of \mC please be aware, that the command syntax has changed.}
\begin{Verbatim}
- \reactand[<alignment>]{<formula>}{<anchor>}
+ \reactand[<alignment>,<anchor>,<tikz>]{<formula>}
\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:
+In this command the actual formul\ae\ are written (\lstinline=<formula>=). If needed, they can be given an anchor (\lstinline=<anchor>=). The optional argument \lstinline=<alignment>= can have 8 different values:
\begin{inparaenum}[(a)]
- \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=
+ \item \lstinline=right=,
+ \item \lstinline=above right=,
+ \item \lstinline=above=,
+ \item \lstinline=above left=,
+ \item \lstinline=left=,
+ \item \lstinline=below left=,
+ \item \lstinline=below=,
+ \item \lstinline=below right=
\end{inparaenum}
-Default is \verb=right=. You use this argument to place the reactand relatively to the reactand or arrow right before.
+Default is \lstinline=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}}{}
+ \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}}{}
+ \reactand{\ce{Br2}}
+ \reactand[below]{\ce{I2}}
+ \reactand{\ce{Cl2}}
\end{rxn}
%vertical reaction:
\begin{rxn}
- \reactand{\ce{Br-Br}}{}
+ \reactand{\ce{Br-Br}}
\arrow[length=.5,direction=below]{$h\nu$}{}
- \reactand[below]{\ce{2 ~\lewis{0.,Br}}}{}
+ \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.
+\lstinline=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$.
+The optional argument \lstinline=<scale factor>= has the same effect as has the key \lstinline+scale=<scalefactor>+ on \lstinline=rxnscheme=. Default is $1.0$.
\subsubsection{Options}\label{sssec:rxn_optionen}
-\NEU\verb=rxn= has two keys:
+\Vii\lstinline=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'
+ \vitem+align=<alignment>+ alignment behaviour of the \lstinline=rxn= environment; default is `center'
+ \vitem+scale=<factor>+ factor by which the \lstinline=rxn= environment is scaled; default: `1.0'
\end{description}
\begin{Example}
\begin{rxn}[align=center]
- \reactand{center}{}\arrow{}{}\reactand{centered}{}
+ \reactand{center}\arrow{}{}\reactand{centered}
\end{rxn}
\begin{rxn}[align=right]
- \reactand{right}{}\arrow{}{}\reactand{raggedleft}{}
+ \reactand{right}\arrow{}{}\reactand{raggedleft}
\end{rxn}
\begin{rxn}[align=left]
- \reactand{left}{}\arrow{}{}\reactand{raggedright}{}
+ \reactand{left}\arrow{}{}\reactand{raggedright}
\end{rxn}
\end{Example}
\subsection{rxnscheme (environment)}\label{ssec:rxnscheme}
-\verb=\rxnscheme= is a floating environment for reaction schemes.
+\lstinline=rxnscheme= is a floating environment for reaction schemes.
\begin{Verbatim}
\begin{rxnscheme}[<keys>]{<caption>}
...
@@ -972,48 +1135,48 @@ The optional argument \verb=<scale factor>= has the same effect as has the key \
\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
+ \vitem+label=<label>+ Like every other floating environment \lstinline=rxnscheme= can be given a label. To do that, you need to use the key \lstinline+label=<label>+. For example if you use
\begin{Verbatim}
\begin{rxnscheme}[label={rs:schema}]{<caption>}
...
\end{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.
+you can refer to it by using \lstinline=\ref{rs:schema}= as usual.
+\vitem+scale=<factor>+ \lstinline=rxnscheme= has another key with which the scheme can be scaled. Please keep in mind that it doesn't affect the font size and the size of the \CF formul\ae.
\begin{Verbatim}
\begin{rxnscheme}[placement=<placement>]{<caption>}
...
\end{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=.
+ \vitem+align=<alignment>+\settowidth{\tmplength}{\tt align=<ausrichtung>}\Vii[\tmplength]This key changes the alignment of the scheme. You can choose between \lstinline=left=, \lstinline=center= and \lstinline=right=.
\end{description}
\begin{Example}
\begin{rxnscheme}[scale=2]{Big scheme}
\large\setatomsep{3.5em}
- \reactand{ \chemfig{=[::30]-[::-60]OH} }{}
+ \reactand{ \chemfig{=[::30]-[::-60]OH} }
\arrow[type={<=>}]{}{}
- \reactand{ \chemfig{-[::30]=[::-60]O} }{}
+ \reactand{ \chemfig{-[::30]=[::-60]O} }
\end{rxnscheme}
\begin{rxnscheme}[scale=.5]{Small scheme}
\tiny\setatomsep{1em}
- \reactand{ \chemfig{=[::30]-[::-60]OH} }{}
+ \reactand{ \chemfig{=[::30]-[::-60]OH} }
\arrow[type={<=>}]{}{}
- \reactand{ \chemfig{-[::30]=[::-60]O} }{}
+ \reactand{ \chemfig{-[::30]=[::-60]O} }
\end{rxnscheme}
\begin{rxnscheme}{center}
- \reactand{center}{}\arrow{}{}\reactand{centered}{}
+ \reactand{center}\arrow{}{}\reactand{centered}
\end{rxnscheme}
\begin{rxnscheme}[align=right]{right}
- \reactand{right}{}\arrow{}{}\reactand{raggedleft}{}
+ \reactand{right}\arrow{}{}\reactand{raggedleft}
\end{rxnscheme}
\begin{rxnscheme}[align=left]{left}
- \reactand{left}{}\arrow{}{}\reactand{raggedright}{}
+ \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
+If you don't like the style of \lstinline=rxnscheme= you can change it by using
\begin{Verbatim}
\floatstyle{<new style>}
\restylefloat{rxnfloat}
@@ -1021,29 +1184,29 @@ If you don't like the style of \verb=rxnscheme= you can change it by using
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=plaintop= like \lstinline=plain=, but the caption is placed above the object
\vitem=boxed= the object is boxed, the caption placed below
- \vitem=ruled= the caption is placed above the object framed by to rules, one above and one below, another rule frames the object below; default for \verb=rxnscheme=
+ \vitem=ruled= the caption is placed above the object framed by to rules, one above and one below, another rule frames the object below; default for \lstinline=rxnscheme=
\end{description}
\begin{Example}
\begin{rxnscheme}{ruled}
- \reactand{default style}{}
+ \reactand{default style}
\end{rxnscheme}
\floatstyle{boxed}
\restylefloat{rxnfloat}
\begin{rxnscheme}{boxed}
- \reactand{framed object}{}
+ \reactand{framed object}
\end{rxnscheme}
\floatstyle{plain}
\restylefloat{rxnfloat}
\begin{rxnscheme}{plain}
- \reactand{without any special formatting}{}
+ \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
+Usually floating environments have an optional argument for their placement. \lstinline=rxnscheme='s default placement is \lstinline=H= which means, it is placed \emph{exactly here}. If you want to change it into \lstinline=htp= or something, you can use
\begin{Verbatim}
\floatplacement{rxnfloat}{<placement>}
\end{Verbatim}
@@ -1051,7 +1214,7 @@ 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:
+This will change the default placement behaviour from \lstinline=H= to \lstinline=<placement>=. You can also change the placement behaviour of just one \lstinline=rxnscheme= environment by using the placement key:
\begin{Verbatim}
\begin{rxnscheme}[placement=<placement>]{<caption>}
...
@@ -1072,73 +1235,111 @@ The counter can be changed just as usual. For example by using
\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 {@}.
+the counter is reset with every new section an looks like \lstinline=section.rxnscheme=. Please be aware, that you have to write \lstinline=\@addtoreset= between \lstinline=\makeatletter= and \lstinline=\makeatother= because of the {@}.
\paragraph{List of schemes}
By writing
\begin{Verbatim}
\listof{rxnfloat}{<title>}
\end{Verbatim}
-you can create a list of all schemes created with \verb=rxnscheme=.
+you can create a list of all schemes created with \lstinline=rxnscheme=.
\begin{SideBySideExample}
\listof{rxnfloat}{Reaction schemes}
\end{SideBySideExample}
-\subsection{setrcndist}\label{ssec:setrcndist}
+\subsection{setarrowlength}\label{ssec:setarrowlength}
+\NEU%
+The default length of an reaction arrow is \SI{5.0}{\emlength} or $5.0\cdot\sqrt{2}\,\si{\emlength}$ for the diagonal ones. You can change these values using
+\begin{Verbatim}
+ \setarrowlength{<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. If you leave the argument empty, the length is reset to default.
+
+{\bfseries This command replaces \lstinline=\arrowlength= from earlier versions.}
+
+\subsection{setatomsize}\label{ssec:setatomsize}
+\NEU%
+With
+\begin{Verbatim}
+ \setatomsize{<font size>}
+\end{Verbatim}
+you can change the font size of the atom groups. Default value is \lstinline=\small=. If you leave the argument empty, the size is reset to default.
+
+{\bfseries This command replaces \lstinline=\atomsize= from earlier versions.}
+
+\subsection{setbondlength}\label{ssec:setbondlength}
\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
+With
+\begin{Verbatim}
+ \setbondlength{<length>}
+\end{Verbatim}
+you can change \lstinline=\setatomsep{<length>}= for all \CF formul\ae\ \emph{inside} of the\\
+\mC environments. Default value is \SI{1.8}{\emlength}. If you leave the argument empty, the length is reset to default.
+
+{\bfseries This command replaces \lstinline=\bondlength= from earlier versions.}
+
+\subsection{setbondshape}\label{ssec:setbondshape}
+With
+\begin{Verbatim}
+ \setbondshape{<base length>}{<dash thickness>}{<dash spacing>}
+\end{Verbatim}
+you can change \lstinline=\setcrambond{<base length>}{<dash thickness>}{<dash spacing>}= for all \CF formul\ae\ \emph{inside} of the \mC environments. Default values are (in this order) \SI{3}{\pt}, \SI{.5}{\pt} and \SI{1}{\pt}. If you leave an argument empty, the value is reset to default.
+
+{\bfseries This command replaces \lstinline=\bondshape= from earlier versions.}
+
+\subsection{setrcndist}\label{ssec:setrcndist}
+\Vii%
+The nodes within which the reactands an arrows are set have a certain distance between them. The default distance is \SI{1}{\emlength}. If you want to change that, you can use
\begin{Verbatim}
\setrcndist{<länge>}
\end{Verbatim}
-If you leave the argument empty, the distance is reset to \unit{1}\emlength.
+If you leave the argument empty, the distance is reset to \SI{1}{\emlength}.
\begin{SideBySideExample}
\setrcndist{2em}
\begin{rxn}
- \reactand{A}{}\arrow{}{}
+ \reactand{A}\arrow{}{}
\end{rxn}
\setrcndist{}
\begin{rxn}
- \reactand{A}{}\arrow{}{}
+ \reactand{A}\arrow{}{}
\end{rxn}
\end{SideBySideExample}
-\subsection{setrxnalign/setschemealign}
-\NEU%
+\subsection{setrxnalign/setschemealign}\label{ssec:setrxnalign}\label{ssec:setschemealign}
+\Vii%
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=.
+The default alignment behaviour of \lstinline=rxn= and \lstinline=rxnscheme= (see \ref{sssec:rxn_optionen} \&\ \ref{sssec:rxnscheme_optionen}) can be set. You can choose between \lstinline=left=, \lstinline=center= and \lstinline=right=.
-If you leave the argument empty, \mC's default behaviour (\verb=center=) is restored.
+If you leave the argument empty, \mC's default behaviour (\lstinline=center=) is restored.
\begin{Example}
\setrxnalign{right}
\begin{rxn}
- \reactand{A}{}\arrow{}{}\reactand{B}{}
+ \reactand{A}\arrow{}{}\reactand{B}
\end{rxn}
\setrxnalign{}
\begin{rxn}
- \reactand{A}{}\arrow{}{}\reactand{B}{}
+ \reactand{A}\arrow{}{}\reactand{B}
\end{rxn}
\end{Example}
-\subsection{setschemename}
+\subsection{setschemename}\label{ssec:setschemename}
See \ref{par:rxnscheme_name}.
\subsection{transition}\label{ssec:transition}
-\verb=\transition= works exactly like \verb=\mesomeric= (see \ref{ssec:mesomeric}).
+\NEU\lstinline=\transition= works exactly like \lstinline=\reactand= (see \ref{ssec:reactand}). \textbf{If you used earlier versions of \mC please be aware, that the command syntax has changed.}
\begin{Verbatim}
- \transition[<alignment>]{<formula>}{<anchor>}
+ \transition[<alignment>,<anchor>,<tikz>]{<formula>}
\end{Verbatim}
\begin{SideBySideExample}
\begin{rxn}
- \reactand{ \ce{H2 + I2} }{}
+ \reactand{ \ce{H2 + I2} }
\arrow[type={<=>},length=.5,direction=below]{}{}
- \transition[below]{
- \reactand{ \chemfig[dotted][]{H?-I-[2]I-[4]H?} }{}
- }{}
+ \transition[below]{ \chemfig[dotted][]{H?-I-[2]I-[4]H?} }
\arrow[type={<=>},length=.5,direction=below]{}{}
- \reactand[below]{ \ce{2 HI} }{}
+ \reactand[below]{ \ce{2 HI} }
\end{rxn}
\end{SideBySideExample}
@@ -1146,111 +1347,111 @@ See \ref{par:rxnscheme_name}.
\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]} }{}
+ \reactand{ \chemfig{=_[::-30]-[::60](=[::60]O)-[::-60]} }
\arrow{ $+ \Hpl$ }{}
- \mesomeric{
- \reactand{ \chemfig{=_[:-30]-[::60](-[::60]OH)(-[::-120,.3,,,white]\oplus)-[::-60]} }{}
+ \mesomeric[,rf]{
+ \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]{
+ \reactand[below]{ \chemfig{\oplus-[6,.3,,,white]-[:-30]=_[::60](-[::60]OH)-[::-60]} }
+ }
+ \branch[right=of rf,,yshift=3em]{
\arrow{}{}
- \reactand{ \chemname{\chemfig{=_[:-30]-[::60](-[::60]OH)(-[::-120]R)-[::-60]}}{1,2-adduct} }{}
- }{}
- \branch[right=of rf,yshift=-5em]{
+ \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} }{}
- }{}
+ \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]} }{}
+ \reactand{ \chemfig{=_[::-30]-[::60](=[::60]O)-[::-60]} }
\arrow{ $+ \Hpl$ }{}
\end{Verbatim}
\begin{rxn}
- \reactand{ \chemfig{=_[::-30]-[::60](=[::60]O)-[::-60]} }{}
+ \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).
+Then we write the resonance formul\ae. The \lstinline=\mesomeric= gets the anchor \lstinline=rf= (line 7).
\begin{Verbatim}[firstnumber=3]
- \mesomeric{
- \reactand{ \chemfig{=_[:-30]-[::60](-[::60]OH)(-[::-120,.3,,,white]\oplus)-[::-60]} }{}
+ \mesomeric[,rf]{
+ \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}
+ \reactand[below]{ \chemfig{\oplus-[6,.3,,,white]-[:-30]=_[::60](-[::60]OH)-[::-60]} }
+ }
\end{Verbatim}
\begin{rxn}
- \reactand{ \chemfig{=_[::-30]-[::60](=[::60]O)-[::-60]} }{}
+ \reactand{ \chemfig{=_[::-30]-[::60](=[::60]O)-[::-60]} }
\arrow{ $+ \Hpl$ }{}
- \mesomeric{
- \reactand{ \chemfig{=_[:-30]-[::60](-[::60]OH)(-[::-120,.3,,,white]\oplus)-[::-60]} }{}
+ \mesomeric[,rf]{
+ \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}
+ \reactand[below]{ \chemfig{\oplus-[6,.3,,,white]-[:-30]=_[::60](-[::60]OH)-[::-60]} }
+ }
\end{rxn}
-Now comes the 1,2-adduct, placed in a branch referring \verb=rf=, shifted above with yshift:
+Now comes the 1,2-adduct, placed in a branch referring \lstinline=rf=, shifted above with yshift:
\begin{Verbatim}[firstnumber=8]
- \branch[right=of rf,yshift=3em]{
+ \branch[right=of rf,,yshift=3em]{
\arrow{}{}
- \reactand{ \chemname{\chemfig{=_[:-30]-[::60](-[::60]OH)(-[::-120]R)-[::-60]}}{1,2-adduct} }{}
- }{}
+ \reactand{ \chemname{\chemfig{=_[:-30]-[::60](-[::60]OH)(-[::-120]R)-[::-60]}}{1,2-adduct} }
+ }
\end{Verbatim}
\begin{rxn}
- \reactand{ \chemfig{=_[::-30]-[::60](=[::60]O)-[::-60]} }{}
+ \reactand{ \chemfig{=_[::-30]-[::60](=[::60]O)-[::-60]} }
\arrow{ $+ \Hpl$ }{}
- \mesomeric{
- \reactand{ \chemfig{=_[:-30]-[::60](-[::60]OH)(-[::-120,.3,,,white]\oplus)-[::-60]} }{}
+ \mesomeric[,rf]{
+ \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]{
+ \reactand[below]{ \chemfig{\oplus-[6,.3,,,white]-[:-30]=_[::60](-[::60]OH)-[::-60]} }
+ }
+ \branch[right=of rf,,yshift=3em]{
\arrow{}{}
- \reactand{ \chemname{\chemfig{=_[:-30]-[::60](-[::60]OH)(-[::-120]R)-[::-60]}}{1,2-adduct} }{}
- }{}
+ \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:
+At last we write the branch containing the 1,4-adduct, also referencing \lstinline=rf=, shifted below with yshift:
\begin{Verbatim}[firstnumber=12]
- \branch[right=of rf,yshift=-5em]{
+ \branch[right=of rf,,yshift=-5em]{
\arrow{}{}
- \reactand{ \chemname{\chemfig{R-[6]-[:-30]=_[::60](-[::60]OH)-[::-60]}}{1,4-adduct} }{}
- }{}
+ \reactand{ \chemname{\chemfig{R-[6]-[:-30]=_[::60](-[::60]OH)-[::-60]}}{1,4-adduct} }
+ }
\end{Verbatim}
\begin{rxn}
- \reactand{ \chemfig{=_[::-30]-[::60](=[::60]O)-[::-60]} }{}
+ \reactand{ \chemfig{=_[::-30]-[::60](=[::60]O)-[::-60]} }
\arrow{ $+ \Hpl$ }{}
- \mesomeric{
- \reactand{ \chemfig{=_[:-30]-[::60](-[::60]OH)(-[::-120,.3,,,white]\oplus)-[::-60]} }{}
+ \mesomeric[,rf]{
+ \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]{
+ \reactand[below]{ \chemfig{\oplus-[6,.3,,,white]-[:-30]=_[::60](-[::60]OH)-[::-60]} }
+ }
+ \branch[right=of rf,,yshift=3em]{
\arrow{}{}
- \reactand{ \chemname{\chemfig{=_[:-30]-[::60](-[::60]OH)(-[::-120]R)-[::-60]}}{1,2-adduct} }{}
- }{}
- \branch[right=of rf,yshift=-5em]{
+ \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} }{}
- }{}
+ \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]} }{}
+ \reactand{ \chemfig{=_[::-30]-[::60](=[::60]O)-[::-60]} }
\arrow{ $+ \Hpl$ }{}
- \mesomeric{
- \reactand{ \chemfig{=_[:-30]-[::60](-[::60]OH)(-[::-120,.3,,,white]\oplus)-[::-60]} }{}
+ \mesomeric[,rf]{
+ \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]{
+ \reactand[below]{ \chemfig{\oplus-[6,.3,,,white]-[:-30]=_[::60](-[::60]OH)-[::-60]} }
+ }
+ \branch[right=of rf,,yshift=3em]{
\arrow{}{}
- \reactand{ \chemname{\chemfig{=_[:-30]-[::60](-[::60]OH)(-[::-120]R)-[::-60]}}{1,2-adduct} }{}
- }{}
- \branch[right=of rf,yshift=-5em]{
+ \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} }{}
- }{}
+ \reactand{ \chemname{\chemfig{R-[6]-[:-30]=_[::60](-[::60]OH)-[::-60]}}{1,4-adduct} }
+ }
\end{rxnscheme}}
\end{Verbatim}
@@ -1259,58 +1460,54 @@ The complete code looks like this:
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}
-
+ \reactand[,start]{ \chemname{\chemfig{*6(-=-=(-[,,,,white]\phantom{Br})-=)}}{benzene \compound{benzene}} }
\branch[below=of start]{
- \arrow[direction=below,name=arrow_a]{\ce{Br2 / AlBr3}}{$-\ce{AlBr4\om}$}
- }{}
-
- \branch[below=of arrow_a,xshift=8.5em]{
+ \arrow[direction=below,name=pfeil_a,both]{\ce{Br2 / AlBr3}}{$-\ce{AlBr4\om}$}
+ }
+ \branch[below=of pfeil_a,mesomerism,xshift=8.5em]{
\mesomeric{
\reactand{
\chemfig{*6(=[@{e1}]-=-(-[:120]Br)(-[:60]H)-(-[:-30,.4,,,white]\oplus)-[@{e2}])}
\elmove{e1}{60:4mm}{e2}{0:4mm}
- }{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]{
+ }
+ }
+ }
+ \branch[above=of mesomerism,,xshift=7.25em]{
\arrow[direction=above]{$-\Hpl$}{}
- }{}
-
+ }
\arrow[length=2.6]{}{}
- \reactand{ \chemname{\chemfig{*6(-=-=(-Br)-=)}}{bromobenzene \compound{bromobenzene}} }{}
+ \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}=.
+First we write the main reaction. To do so, we use the commands \lstinline=\reactand=, \lstinline=\arrow= and the environment \lstinline=\begin{rxn} ... \end{rxn}=.
\begin{Verbatim}
\begin{rxn}
\reactand{
\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}
@@ -1318,103 +1515,101 @@ Now we make it a little bit smaller:
\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!!]{
+ \reactand[,,!!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.
+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]{
+ \reactand[,,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{
+ \reactand[,!!start!!]{
\chemname{\chemfig{*6(-=-=(-[,,,,white]\phantom{Br})-=)}}{benzene \compound{benzene}}
- }{!!start!!}
-
+ }
\branch[!!below=of start!!]{
- \arrow[!!direction=below!!]{ \ce{Br2 / AlBr3} }{ $-\ce{AlBr4\om}$ }
- }{}
-
+ \arrow[!!direction=below!!,both]{ \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:
+So the first reactand gets the anchor \lstinline=start= and the branch refers to it with \lstinline+below=of start+. For the reaction arrow to point below, we need to use the key \lstinline+direction=below+. Now we get:
\begin{rxn}[scale=.8]
\setatomsep{1.6em}
- \reactand{
+ \reactand[,start]{
\chemname{\chemfig{*6(-=-=(-[,,,,white]\phantom{Br})-=)}}{benzene \compound{benzene}}
- }{start}
+ }
\branch[below=of start]{
- \arrow[direction=below]{\ce{Br2 / AlBr3}}{$-\ce{AlBr4\om}$}
- }{}
+ \arrow[direction=below,both]{\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=.
+Next we write the resonance formul\ae\ of the Wheland intermediate. To do that we use three further commands: \lstinline=\mesomeric=, \lstinline=\marrow= and \lstinline=\elmove=.
\begin{Verbatim}
!!\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}
@@ -1422,348 +1617,334 @@ Next we write the resonance formul\ae\ of the Wheland intermediate. To do that w
\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{
+\begin{rxn}[scale=.8]
+ \setatomsep{1.6em}
+ \reactand[,start]{
+ \chemname{\chemfig{*6(-=-=(-[,,,,white]\phantom{Br})-=)}}{benzene \compound{benzene}}
+ }
+ \branch[below=of start]{
+ \arrow[direction=below,both]{\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}}
- }{}
+ }
+ }
+ }
+ \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{
+ \reactand[,start]{
\chemname{\chemfig{*6(-=-=(-[,,,,white]\phantom{Br})-=)}}{benzene \compound{benzene}}
- }{start}
-
+ }
\branch[below=of start]{
- \arrow[direction=below]{\ce{Br2 / AlBr3}}{$-\ce{AlBr4\om}$}
+ \arrow[direction=below,both]{\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{
+ \reactand[,start]{
\chemname{\chemfig{*6(-=-=(-[,,,,white]\phantom{Br})-=)}}{benzene \compound{benzene}}
- }{start}
-
+ }
\branch[below=of start]{
- \arrow[direction=below]{\ce{Br2 / AlBr3}}{$-\ce{AlBr4\om}$}
+ \arrow[direction=below,both]{\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]
+It isn't really what we want, though, because the intermediate is centered below the arrow. In order to be able to shift the whole thing, we place it into a branch of its own.
+\begin{Verbatim}[firstnumber=4]
...
\branch[below=of start]{
- \arrow[direction=below,!!name=arrow_a!!]{\ce{Br2 / AlBr3}}{$-\ce{AlBr4\om}$}
- }{}
+ \arrow[direction=below,both,!!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}
-
+ \reactand[,start]{\chemname{\chemfig{*6(-=-=(-[,,,,white]\phantom{Br})-=)}}{benzene \compound{benzene}} }
\branch[below=of start]{
- \arrow[direction=below,name=arrow_a]{\ce{Br2 / AlBr3}}{$-\ce{AlBr4\om}$}
- }{}
-
+ \arrow[direction=below,both,name=arrow_a]{\ce{Br2 / AlBr3}}{$-\ce{AlBr4\om}$}
+ }
\branch[below=of arrow_a]{
- \mesomeric{
+ \mesomeric[,mesomerism]{
\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}} }{}
+ \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]
+\begin{Verbatim}[firstnumber=4]
...
\branch[below=of start]{
- \arrow[direction=below,name=arrow_a]{\ce{Br2 / AlBr3}}{$-\ce{AlBr4\om}$}
- }{}
- \branch[below=of arrow_a,!!xshift=8.5em!!]{
+ \arrow[direction=below,both,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}
-
+ \reactand[,start]{\chemname{\chemfig{*6(-=-=(-[,,,,white]\phantom{Br})-=)}}{benzene \compound{benzene}} }
\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{
+ \arrow[direction=below,both,name=arrow_a]{\ce{Br2 / AlBr3}}{$-\ce{AlBr4\om}$}
+ }
+ \branch[below=of arrow_a,mesomerism,xshift=8.5em]{
+ \mesomeric{
\reactand{
\chemfig{*6(=[@{e1}]-=-(-[:120]Br)(-[:60]H)-(-[:-30,.4,,,white]\oplus)-[@{e2}])}
\elmove{e1}{60:4mm}{e2}{0:4mm}
- }{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}} }{}
+ \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]
+The last arrow is also placed in its own branch, so we can shift it where we want.
+\begin{Verbatim}[firstnumber=4]
...
\branch[below=of start]{
- \arrow[direction=below,!!name=arrow_a!!]{\ce{Br2 / AlBr3}}{$-\ce{AlBr4\om}$}
- }{}
- \branch[below=of arrow_a,xshift=8.5em]{
+ \arrow[direction=below,both,!!name=arrow_a!!]{\ce{Br2 / AlBr3}}{$-\ce{AlBr4\om}$}
+ }
+ \branch[below=of arrow_a,!!mesomerism!!,xshift=8.5em]{
\mesomeric{
\reactand{
\chemfig{*6(=[@{e1}]-=-(-[:120]Br)(-[:60]H)-(-[:-30,.4,,,white]\oplus)-[@{e2}])}
\elmove{e1}{60:4mm}{e2}{0:4mm}
- }{}
+ }
\marrow
\reactand{
\chemfig{*6(-(-[:90,.4,,,white]\oplus)-[@{e4}]=[@{e3}]-(-[:120]Br)(-[:60]H)-=)}
\elmove{e3}{180:4mm}{e4}{150:4mm}
- }{}
+ }
\marrow
\reactand{
\chemfig{*6(-=-(-[:-150,.4,,,white]\oplus)-(-[:120]Br)(-[:60]H)-=)}
- }{}
- }{}
- }{!!mesomerism!!}
- \branch[!!above=of mesomerism,xshift=7.25em!!]{
+ }
+ }
+ }
+ \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}
-
+ \reactand[,start]{\chemname{\chemfig{*6(-=-=(-[,,,,white]\phantom{Br})-=)}}{benzene \compound{benzene}} }
\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{
+ \arrow[direction=below,both,name=arrow_a]{\ce{Br2 / AlBr3}}{$-\ce{AlBr4\om}$}
+ }
+ \branch[below=of arrow_a,mesomerism,xshift=8.5em]{
+ \mesomeric{
\reactand{
\chemfig{*6(=[@{e1}]-=-(-[:120]Br)(-[:60]H)-(-[:-30,.4,,,white]\oplus)-[@{e2}])}
\elmove{e1}{60:4mm}{e2}{0:4mm}
- }{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]{
+ }
+ }
+ }
+ \branch[above=of mesomerism,,xshift=7.25em]{
\arrow[direction=above]{$-\Hpl$}{}
- }{}
+ }
\arrow{}{}
- \reactand{ \chemname{\chemfig{*6(-=-=(-Br)-=)}}{bromobenzene \compound{bromobenzene}} }{}
+ \reactand{ \chemname{\chemfig{*6(-=-=(-Br)-=)}}{bromobenzene \compound{bromobenzene}} }
\end{rxn}
-Now we're almost there: the arrow of the main reaction is too short.
+Now we're almost there: the arrow of the main reaction still is too short.
\begin{Verbatim}
\begin{rxn}[scale=.8]
\setatomsep{1.6em}
- \reactand{\chemname{\chemfig{*6(-=-=(-[,,,,white]\phantom{Br})-=)}}{benzene \compound{benzene}} }{start}
+ \reactand[,start]{\chemname{\chemfig{*6(-=-=(-[,,,,white]\phantom{Br})-=)}}{benzene \compound{benzene}} }
\branch[below=of start]{
- \arrow[direction=below,name=arrow_a]{\ce{Br2 / AlBr3}}{$-\ce{AlBr4\om}$}
- }{}
- \branch[below=of arrow_a,xshift=8.5em]{
+ \arrow[direction=below,both,name=arrow_a]{\ce{Br2 / AlBr3}}{$-\ce{AlBr4\om}$}
+ }
+ \branch[below=of arrow_a,mesomerism,xshift=8.5em]{
\mesomeric{
\reactand{
\chemfig{*6(=[@{e1}]-=-(-[:120]Br)(-[:60]H)-(-[:-30,.4,,,white]\oplus)-[@{e2}])}
\elmove{e1}{60:4mm}{e2}{0:4mm}
- }{}
+ }
\marrow
\reactand{
\chemfig{*6(-(-[:90,.4,,,white]\oplus)-[@{e4}]=[@{e3}]-(-[:120]Br)(-[:60]H)-=)}
\elmove{e3}{180:4mm}{e4}{150:4mm}
- }{}
+ }
\marrow
\reactand{
\chemfig{*6(-=-(-[:-150,.4,,,white]\oplus)-(-[:120]Br)(-[:60]H)-=)}
- }{}
- }{}
- }{mesomerism}
- \branch[above=of mesomerism,xshift=7.25em]{
+ }
+ }
+ }
+ \branch[above=of mesomerism,,xshift=7.25em]{
\arrow[direction=above]{$-\Hpl$}{}
- }{}
+ }
\arrow[!!length=2.6!!]{}{}
- \reactand{ \chemname{\chemfig{*6(-=-=(-Br)-=)}}{bromobenzene \compound{bromobenzene}} }{}
+ \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}
+ \reactand[,start]{\chemname{\chemfig{*6(-=-=(-[,,,,white]\phantom{Br})-=)}}{benzene \compound{benzene}} }
\branch[below=of start]{
- \arrow[direction=below,name=arrow_a]{\ce{Br2 / AlBr3}}{$-\ce{AlBr4\om}$}
- }{}
- \branch[below=of arrow_a,xshift=8.5em]{
+ \arrow[direction=below,both,name=arrow_a]{\ce{Br2 / AlBr3}}{$-\ce{AlBr4\om}$}
+ }
+ \branch[below=of arrow_a,mesomerism,xshift=8.5em]{
\mesomeric{
\reactand{
\chemfig{*6(=[@{e1}]-=-(-[:120]Br)(-[:60]H)-(-[:-30,.4,,,white]\oplus)-[@{e2}])}
\elmove{e1}{60:4mm}{e2}{0:4mm}
- }{}
+ }
\marrow
\reactand{
\chemfig{*6(-(-[:90,.4,,,white]\oplus)-[@{e4}]=[@{e3}]-(-[:120]Br)(-[:60]H)-=)}
\elmove{e3}{180:4mm}{e4}{150:4mm}
- }{}
+ }
\marrow
\reactand{
\chemfig{*6(-=-(-[:-150,.4,,,white]\oplus)-(-[:120]Br)(-[:60]H)-=)}
- }{}
- }{}
- }{mesomerism}
- \branch[above=of mesomerism,xshift=7.25em]{
+ }
+ }
+ }
+ \branch[above=of mesomerism,,xshift=7.25em]{
\arrow[direction=above]{$-\Hpl$}{}
- }{}
+ }
\arrow[length=2.6]{}{}
- \reactand{ \chemname{\chemfig{*6(-=-=(-Br)-=)}}{bromobenzene \compound{bromobenzene}} }{}
+ \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=.
+Since the commands of \CF are functioning well in a `tikzpicure' environment, we can create extensive syntheses, using the \lstinline=\merge= command. The other \mC commands can't be used here without further attention, because they're placed on a chain. In the next example, we directly use the floating environment \lstinline=rxnfloat=.
\begin{Verbatim}
\begin{rxnfloat}