summaryrefslogtreecommitdiff
path: root/Master
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2011-08-07 23:38:47 +0000
committerKarl Berry <karl@freefriends.org>2011-08-07 23:38:47 +0000
commit7ec5124fc8058384ae1dfbee47f1bd841a390cdc (patch)
tree9e54c1fb7b71c3ed3e451c5a7ebec49c169e5709 /Master
parent47b5d08d06fbe6e1df37991ef5280132f2d15016 (diff)
chemfig 1.0 (14jun11)
git-svn-id: svn://tug.org/texlive/trunk@23450 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master')
-rw-r--r--Master/texmf-dist/doc/generic/chemfig/README4
-rw-r--r--Master/texmf-dist/doc/generic/chemfig/chemfig_doc_en.pdfbin1117107 -> 1264980 bytes
-rw-r--r--Master/texmf-dist/doc/generic/chemfig/chemfig_doc_en.tex1101
-rw-r--r--Master/texmf-dist/doc/generic/chemfig/chemfig_doc_fr.pdfbin1140438 -> 1286443 bytes
-rw-r--r--Master/texmf-dist/doc/generic/chemfig/chemfig_doc_fr.tex1127
-rw-r--r--Master/texmf-dist/tex/generic/chemfig/chemfig.sty6
-rw-r--r--Master/texmf-dist/tex/generic/chemfig/chemfig.tex807
-rw-r--r--Master/texmf-dist/tex/generic/chemfig/t-chemfig.tex4
8 files changed, 2647 insertions, 402 deletions
diff --git a/Master/texmf-dist/doc/generic/chemfig/README b/Master/texmf-dist/doc/generic/chemfig/README
index 0c63eba2ea2..7117fe05ece 100644
--- a/Master/texmf-dist/doc/generic/chemfig/README
+++ b/Master/texmf-dist/doc/generic/chemfig/README
@@ -2,9 +2,9 @@ ___________________________________
The
ChemFig package
- v0.4a
+ v1.0
- 2011/04/10
+ 2011/06/15
___________________________________
Maintainer: Christian Tellechea
diff --git a/Master/texmf-dist/doc/generic/chemfig/chemfig_doc_en.pdf b/Master/texmf-dist/doc/generic/chemfig/chemfig_doc_en.pdf
index f7fa601944b..728af8c6347 100644
--- a/Master/texmf-dist/doc/generic/chemfig/chemfig_doc_en.pdf
+++ b/Master/texmf-dist/doc/generic/chemfig/chemfig_doc_en.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/generic/chemfig/chemfig_doc_en.tex b/Master/texmf-dist/doc/generic/chemfig/chemfig_doc_en.tex
index c02a4121e69..ccc602e335a 100644
--- a/Master/texmf-dist/doc/generic/chemfig/chemfig_doc_en.tex
+++ b/Master/texmf-dist/doc/generic/chemfig/chemfig_doc_en.tex
@@ -3,12 +3,12 @@
% | |
% | ChemFig Documentation |
% | |
-% | April 24, 2011 |
+% | June 15, 2011 |
% | |
% |__________________________________________________________________|
%
% This is chemfig_doc_en.tex, the LaTeX code of the chemfig English
-% documentation. Translation by Theo Hopman (hopman.theo@gmail.com).
+% documentation. Translation by Theo Hopman & Nikola Castillo
%
% Maintainer: Christian Tellechea
% E-mail : unbonpetit@gmail.com
@@ -57,9 +57,11 @@
\usepackage{textcomp}
\usepackage{enumitem}
\usepackage{chemfig}
-\usepackage{siunitx}
\usetikzlibrary{decorations.pathmorphing}
+\usetikzlibrary{matrix}
+\usepackage{siunitx}
\usepackage{emerald}
+\usepackage{xstring}
\usepackage[protrusion=true,expansion,final,babel=true]{microtype}
\usepackage{fancyhdr}
\fancypagestyle{plain}{%
@@ -80,7 +82,11 @@
\index{#1}%
\print@or@not{#1}%
\else
- \expandafter\index\expandafter{\expandafter\@gobble\string#1@\protect\texttt{\protect\string\protect#1}}%
+ \saveexpandmode\expandarg
+ \StrSubstitute{\string#1}{\string @}{\@empty\protect\symbol{'100}}[\temp@]%
+ \StrGobbleLeft\temp@1[\temp@]%
+ \restoreexpandmode
+ \expandafter\index\expandafter{\temp@ @\protect\texttt{\protect\textbackslash\temp@}}%
\print@or@not{\texttt{\string#1}}%
\fi
\else
@@ -112,6 +118,8 @@
\make@car@active\^^M{\par\leavevmode}%
\make@car@active\,{\leavevmode\kern\z@\string,}%
\make@car@active\-{\leavevmode\kern\z@\string-}%
+ \make@car@active\>{\leavevmode\kern\z@\string>}%
+ \make@car@active\<{\leavevmode\kern\z@\string<}%
\exemple@@{#1}{#2}%
}
@@ -245,36 +253,32 @@ delim_2 "\\dotfill"
\end{center}
\vskip1.5cm
\hfill
- \hbox to 0pt{\hss
- \scriptsize
+ \hbox to 0pt{\hss\scriptsize
\setbondoffset{1pt}
- \setatomsep{2em}
- \chemfig{(-[:-150]R')(-[:-30]R)=[2]N-[:30]OH}%
- \kern-1em
- \chemrel[\chemfig{\chemabove{H}{\kern10pt\scriptstyle\oplus}}]{<>}%
- \kern-0.5em
- \chemfig{(-[@{a0}:-150]R')(-[:-30]R)=[2]@{a1}N-[@{b0}:30]@{b1}\chemabove{O}{\scriptstyle\oplus}H_2}%
- \chemmove[red,-stealth,red,shorten <=2pt]{%
- \draw(a0)..controls +(135:2mm) and +(215:4mm).. (a1);
- \draw(b0)..controls +(120:2mm) and +(180:3mm).. ([yshift=7pt]b1.180);
- }
- \kern-1.5em
- \chemrel[\chemfig{{-}H_2O}]{<>}%
- $\left[\begin{tabular}{c}
- \chemfig{R'-\lewis{2:,N}=@{a1}\chemabove{C}{\scriptstyle\oplus}-R}\\
- \tikz\draw[stealth-stealth](0,3mm)--(0,-3mm);\\
- \chemfig{R'-\chemabove{N}{\scriptstyle\oplus}~C-R}
- \end{tabular}\right]$%
- \chemrel[\chemfig{H_2@{a0}\lewis{0:2:,O}}]{<>}%
- \chemmove[red,-stealth,red,shorten <=3pt]{%
- \draw(a0)..controls+(90:10mm)and+(45:10mm)..([yshift=6pt]a1.45);
- }%
- \chemfig{*6(R\rlap{$'$}-N=(-R)-\chemabove{O}{\scriptstyle\oplus} H_2)}%
- \chemrel[\chemfig{{-}\chemabove{H}{\kern10pt\scriptstyle\oplus}}]{<>}%
- \chemfig{*6(R\rlap{$'$}-N=(-R)-OH)}%
- \chemrel{-stealth}%
- \chemfig{*6(R\rlap{$'$}-\chembelow{N}{H}-(-R)(=[2]O))}\par\bigskip
- \hss}\hfill\null
+ \setatomsep{2.5em}
+ \setcompoundsep{5em}
+ \setarrowoffset{6pt}
+ \schemestart
+ \chemfig{(-[:-150]R')(-[:-30]R)=[2]N-[:30]OH}
+ \arrow{<=>[\chemfig{H^\oplus}]}
+ \chemfig{(-[@{a0}:-150]R')(-[:-30]R)=[2]@{a1}N-[@{b0}:30]@{b1}\chemabove{O}{\scriptstyle\oplus}H_2}
+ \chemmove[red,-stealth,red,shorten <=2pt]{
+ \draw(a0)..controls +(135:2mm) and +(215:4mm).. (a1);
+ \draw(b0)..controls +(120:2mm) and +(180:3mm).. ([yshift=7pt]b1.180);}
+ \arrow{<=>[\chemfig{{-}H_2O}]}[,1.1]
+ \chemleft[{\subscheme[90]{%
+ \chemfig{R'-\chemabove{N}{\scriptstyle\oplus}~C-R}
+ \arrow{<->}[,0.75]
+ \chemfig{R'-\lewis{2:,N}=@{a1}\chemabove{C}{\scriptstyle\oplus}-R}}}\chemright]
+ \arrow{<=>[\chemfig{H_2@{a0}\lewis{0:2:,O}}]}[,1.1]
+ \chemmove[red,-stealth,red,shorten <=3pt]{
+ \draw(a0)..controls+(90:10mm)and+(45:10mm)..([yshift=6pt]a1.45);}
+ \chemfig{*6(R\rlap{$'$}-N=(-R)-\chemabove{O}{\scriptstyle\oplus} H_2)}
+ \arrow{<=>[\chemfig{{-}H^\oplus}]}
+ \chemfig{*6(R\rlap{$'$}-N=(-R)-OH)}
+ \arrow
+ \chemfig{*6(R\rlap{$'$}-\chembelow{N}{H}-(-R)(=[2]O))}
+ \schemestop\hss}\hfill\null
\begin{center}
\ECFAugie\small The Beckmann rearrangement%
\end{center}
@@ -286,14 +290,14 @@ delim_2 "\\dotfill"
\setitemize{leftmargin=3em,topsep=0pt,parsep=0pt,itemsep=0pt}
\part{Introduction}
-\section{New in version 0.4b}
-Here's what's new in version 0.4b:
-\begin{enumerate}
- \item the argument of the \verb-\chemfig- command is no longer dependent of the \idx{catcode} regime. Therefore, the \verb-\chemfig- command can be put inside arguments of macros, even if the molecule code contains characters with an active catcode like ``\verb-~-''. It is now possible to write\footnote{The \texttt{\string\protect} command makes \texttt{\string\chemfig} robust, i.e. able to be stored without being altered by \texttt{\string\section} and reused later, especially in the table of content.} in a \LaTeX{} document something like:\par\verb-\section{The molecule \protect\chemfig{N~N}}-.
-
- ``\verb-#-'' is the exception to this rule. In order to put in an argument of a macro the command \verb-\chemfig- with a molecule code containing \verb-# -, you must wrap it between ``\verb-\catcode`\#=12-'' and ``\verb-\catcode`\#=6-''.
- \item The new \idx{\setbondstyle} command sets the style of the bonds, see page~\pageref{setbondstyle}.
-\end{enumerate}
+\section{New in version 1.0}
+Here is what is new in version 1.0:
+\begin{itemize}
+ \item it is now possible to build reaction schemes, see page~\pageref{schemas};
+ \item the macros \verb-\Chemabove- and \verb-\Chembelow- work the same way as \verb-\chemabove- and \verb-\chembelow- but the bounding box is changed to suit the size of the stack, read page~\pageref{Chemabove};
+ \item the macro \verb-\Lewis- works the same way as \verb-\lewis- but the bounding box is changed, see page~\pageref{Lewis};
+ \item the commands \verb-\chemleft-, \verb-\chemright-, \verb-\chemup- and \verb-\chemdown- enable to draw expandable delimiters on the left, the right, above or below a stuff. See page~\pageref{chemleft}.
+\end{itemize}
\section{Foreword}
This package has seen the light of day thanks to the assistance of Christophe \textsc{Casseau}, who had the idea after being confronted with the complexity of the syntax of the \href{http://www.ctan.org/tex-archive/help/Catalogue/entries/ppchtex.html}{\texttt{\textbf{ppchtex}}} package.
@@ -309,7 +313,7 @@ Experience shows that is it has been difficult to combine drawing of molecules w
\hfill Christophe \textsc{Casseau}\kern0.1\linewidth
\endgroup\medskip
-Finally, I wish to warmly thank Theo \textsc{Hopman} for offering to translate this manual into English.
+Finally, I wish to warmly thank Theo \textsc{Hopman} and more recently Nikola \textsc{Castillo} for offering to translate this manual into English.
\section{Presenting \protect\CF}
To use this package, start by adding the following code to the preamble:
@@ -1237,10 +1241,12 @@ If one wishes to draw two electrons instead of a line, follow the integer with a
All the decorations drawn by \idx{\lewis} are not included in the \idx{bounding box} of the atom; they are drawn afterwards. A consequence of this is seen in the two examples above, where the frame does not appear to be properly fitted to the drawing of the molecule, which extends downward slightly. This will be seen more often in this the ``Decorations'' chapter, which presents commands which do not change the bounding box.
+\label{Lewis}Il faut noter que la macro \idx{\Lewis} fonctionne de la même façon que la macro \verb-\lewis- mais les décorations seront \emph{prises en compte} dans la boîte englobante.% NOUVEAU
+
This can be seen more clearly by drawing an \verb-\fbox- around decorated atoms\idx*{\lewis}:
\exemple{Bounding box and the \string\lewis\ macro}*\fboxsep0pt
- \fbox{\lewis{0.2.4.6.,A}}\par\medskip
- \fbox{\lewis{13,B}}*
+\fbox{\lewis{0.2.4.6.,A}}\quad\fbox{\Lewis{0.2.4.6.,A}}\par\medskip
+\fbox{\lewis{13,B}}\quad\fbox{\Lewis{13,B}}*
\label{setlewis}Several parameters can be set with the help of the macro\idx*{\setlewis}
\centerverb|\setlewis[dim1]{<dim2>}{<dim3>}{<tikz code>}|
@@ -1276,6 +1282,8 @@ They are especially useful in rings, if care is taken to put braces around the l
They are sometimes useful for placing pseudo-exponents\idx*{ring!charge} which do not change the bounding box of the atoms, so that the bonds do not end up being too short:
\exemple{Hydronium ion}*\chemfig{H-\chemabove{\lewis{5|7,O}}{\quad\scriptstyle+}(-[2]H)-H}*
+\label{Chemabove}Les commandes \idx{\Chemabove} et \idx{\Chembelow} fonctionnent de la même façon sauf que la boîte englobante \emph{tient compte} du \verb-<matériel>- placé au dessus ou au dessous.% NOUVEAU
+
\subsection{Chemical reactions}\idx*{chemical reaction}
To write chemical reactions, \CF provides a command for the signs and a command for the arrows.
@@ -1672,39 +1680,728 @@ Water molecule rorated 30\si\degree: \chemfig{[:30]@1H-[::37.775,2]@2O-[::-75.55
\namebond12{\footnotesize0.9584\si\angstrom}
\namebond23{\footnotesize0.9584\si\angstrom}
\arclabel{0.5cm}{1}{2}{3}{\footnotesize104.45\si\degree}|
+\newpage
+
+\part{Reaction schemes}\label{schemas}
+\idx*{reaction scheme|(}Following several requests from users, it had become evident that \CF had a weakness regarding the drawing of reaction schemes. The gap is now filled. Therefore, \CF has now reached version 1.0 since I consider that the main features sought are now available.
+
+I thank Clemens \textsc {Niederberger} for his help and the tests he carried out on the new features presented in this part.
+\section{Overview}\label{schemestart}
+A reaction scheme must be contained between the commands ``\idx\schemestart'' and ``\idx\schemestop''. As shown in this example, \idx{debug information} is either hidden or displayed with the command ``\idx\schemedebug'' and the argument ``false'' or ``true'':
+\exemple[50]{Example 1}/\schemedebug{false}
+\schemestart
+ \chemfig{*6(-=-=-=)}\arrow
+ \chemfig{X=[1]Y}\arrow
+ \chemfig{S>T}
+\schemestop
+\bigskip
+
+\schemedebug{true}
+\schemestart
+ \chemfig{*6(-=-=-=)}\arrow
+ \chemfig{X=[1]Y}\arrow
+ \chemfig{S>T}
+\schemestop/
+
+Some comments:
+\begin{itemize}
+ \item the \idx{\arrow} commands draw the arrows;
+ \item everything lying between two \idx{\arrow} commands is considered a \idx{compound}. It was decided that all possible settings, whether for arrows or compounds, are controlled by the arguments of the \idx{\arrow} command, whose syntax may become quite complex;
+ \item arrows are plotted horizontally, this can obviously be modified;
+ \item arrows are plotted on the imaginary line connecting the center of the compounds' bounding boxes (the red and blue squares are the anchoring points of arrows). This behavior can also be modified;
+ \item debug information is displayed with the \idx{\schemedebug} command. It consists of:
+ \begin{itemize}
+ \item the green label above the bounding boxes is the default name assigned to compounds by \CF. It follows the series "c1", "c2", etc. Numbering is reset to 1 for every reaction scheme.
+ \item display of the compounds bounding boxes;
+ \item the arrows start and end points represented by red points and anchors by blue points;
+ \end{itemize}
+ \item the distance from edge to edge between two compounds is defined with the \idx*\setcompoundsep\verb-\setcompoundsep{<dim>}-\label{setcompoundsep} command, where the argument is a valid dimension in the sense of \TeX{}. By default, and if the argument is empty, this dimension is 5em;
+ \item finally, the distance between the edges of the compounds and the beginning and end of the arrows is defined with the \idx*\setarrowoffset\verb-\setarrowoffset{<dim>} command- where the argument is valid under a dimension of \TeX{}. By default, and if the argument is empty, this dimension is 4pt.\label{setarrowoffset}
+\end{itemize}
+
+\section{Arrow types}\label{arrow}
+When the \idx{\arrow} command is followed by an optional argument in braces (which is not mandatory), the argument defines the type of arrow\idx*{arrow!type}:
+\exemple[50]{Arrow types}|\schemestart A\arrow{->}B\schemestop\par % by default
+\schemestart A\arrow{-/>}B \schemestop\par
+\schemestart A\arrow{<-}B \schemestop\par
+\schemestart A\arrow{<->}B \schemestop\par
+\schemestart A\arrow{<=>}B \schemestop\par
+\schemestart A\arrow{<->>}B \schemestop\par
+\schemestart A\arrow{<<->}B \schemestop\par
+\schemestart A\arrow{0}B \schemestop\par
+\schemestart A\arrow{-U>}B \schemestop|
+The arrow ``\verb/-U>/'' is not fully drawn, an arc can be added tangent to the arrow center using optional arguments on the command, see page~\pageref{fleche.arg.optionnel}. Here is a ``\verb/-U>/'' arrow with the arc on top of it: \schemestart A\arrow{-U>[$\scriptstyle x$][$\scriptstyle y$]}B\schemestop
+
+For the sake of clarity, capital letters will be used throughout the documentation instead of chemical formulas made with the \idx\chemfig command except for specific examples. Reaction schemes obviously work identically with letters and drawn molecules. Several examples are shown in the Gallery with proper reaction schemes.
+
+\section{Arrows features}
+Each \idx{arrow} is characterized by:
+\begin{itemize}
+ \item \idx*{arrow!angle}an angle expressed in degrees;
+ \item \idx*{arrow!coefficient}a coefficient that specifies the arrow length through the multiplication of the compounds spacing value\idx*{compound!spacing} defined by \idx\setcompoundsep;
+ \item \idx*{arrow!style} a style with \TIKZ instructions to customize the color, the thickness or other graphical attribute of the arrow.
+\end{itemize}
+
+These features are defined with the command \idx\setarrowdefault\verb-{angle,coeff,style}-\label{setarrowdefault}. And this is made \emph{outside} the reaction scheme. If the angle is empty, it takes the value 0, and if the coefficient is empty, it is equal to 1. The as-defined features will be kept throughout the document, from the point where the instruction is found. To reset the default settings, just enter an empty argument.
+\exemple[50]{Definition of default values}/\schemestart A\arrow B\arrow C\schemestop
+
+\setarrowdefault{15,1.5,red,thick}
+\schemestart A\arrow B\arrow C\schemestop
+
+\setarrowdefault{,2.5,dashed}
+\schemestart A\arrow B\arrow C\schemestop
+
+\setarrowdefault{}
+\schemestart A\arrow B\arrow C\schemestop/
+
+In order to locally modify one or all of these default values, the \idx{\schemestart} command accepts an optional argument in the form \verb-[angle,coeff,style]- which changes the default arrow features within the sole reaction scheme:
+\exemple[50]{Optional argument}/\setarrowdefault{5,2.5,blue}
+\schemestart A\arrow B\arrow C\schemestop
+
+\schemestart[0] A\arrow B\arrow C\schemestop
+
+\schemestart[0,1] A\arrow B\arrow C\schemestop
+
+\schemestart[0,1,thick] A\arrow B\arrow C\schemestop
+
+\schemestart[0,1,black] A\arrow B\arrow C\schemestop/
+Regarding style\idx*{arrow!style}, the rule is: the style specified in the argument in brackets applies \emph{after} the default style, without overwrting it! This is why only the ``black'' color attribute is able to overwrite the `` blue'' default style.
+
+Finally, the \idx{\arrow} command accepts an optional argument in brackets in the form \verb-[angle,coeff,style]- to change the feature of that given arrow. As above, style applies \emph{after} the default style and \emph{after} the style possibly-specified in the optional argument of the \verb-\schemestart- command, again without overwrting them.
+\exemple[50]{Arrows features}/\schemestart
+ A\arrow[45]B\arrow[-20,2]C
+\schemestop
+\bigskip
+
+\schemestart
+ A\arrow[90,,thick]B\arrow[,2]C
+ \arrow[-45,,dashed,red]D
+\schemestop/
+
+\section{Compounds names}
+\idx*{compound!name}Automatic naming of compounds (``c1'', ``c2'', etc.) can be overridden. For this, the \idx{\arrow} command must be immediately followed by an argument in parentheses. The argument is of the form: \verb/(n1--n2)/. The compounds located at the beginning and at the end of the arrow are named ``\verb-n1-'' and ``\verb-n2-'', respectively. Any alphanumeric string can be used. The numbering of the names "c<n>" continues internally, so if a \idx{compound} has a different name than the default one, it does not affect the default name of the subsequent compounds.
+
+Names are optional, and the argument can be either \verb/(n1--)/ and \verb/(--n2)/.
+
+\exemple[50]{Compounds names}/\schemedebug{true}
+\schemestart
+ A\arrow(aa--bb)B\arrow(--cc)C\arrow(--dd)D\arrow E
+\schemestop
+\bigskip
+
+\schemestart
+ A\arrow(aa--)B\arrow(bb--)C\arrow(cc--dd)D\arrow E
+\schemestop/
+Note that both methods are equivalent. Therefore, compounds can either be named by arrows preceding or following them. However, when a \idx{compound} is surrounded by two arrows specifying its name, the first name is ignored and a warning message is generated:
+\exemple[50]{Overful naming}/\schemedebug{true}
+\schemestart
+ A\arrow(--foo)B\arrow(bar--)C
+\schemestop/
+Here \idx{compound} ``B'' is called ``foo'' by the arrow pointing at it, and ``bar'' by the arrowing leaving from it. Thus \CF generates a warning mentioning that the name "foo" will be ignored:
+
+\hfill\verb-Package chemfig Warning: two names for the same node, first name "foo" ignored-\hfill\null
+
+\section{Anchoring}
+\idx*{compound!anchoring}As noted above, arrows lie on the line connecting the center of the compounds' bounding boxes. Default anchors are called ``center'' in the sense of \idx*{tikz}\TIKZ. Non-default anchoring points can be user-specified as well with an argument between brackets:
+
+\hfill\verb/(n1.a1--n2.a2)/\hfill\null
+
+where the anchor ``\verb-a1-'' or ``\verb-a2-'' can be: north west, north, north east, west, center, east, mid west, mid, mid east, base west, base, base east, south west, south , south east, text, or any angle. Here is an example from the \TIKZ manual where the anchors are located on the bounding box:
+\exemple*{TikZ anchoring}|\Huge
+\begin{tikzpicture}[baseline]
+\node[anchor=base west,name=x,draw,inner sep=25pt] {\color{lightgray}Rectangle\vrule width 1pt height 2cm};
+\foreach \anchor/\placement in
+{north west/above left, north/above, north east/above right,west/left, center/above, east/right,
+mid west/left, mid/above, mid east/right,base west/left, base/below, base east/right,
+south west/below left, south/below, south east/below right,text/below,10/right,45/above,150/left}
+\draw[shift=(x.\anchor)] plot[mark=x] coordinates{(0,0)}
+node[\placement,inner sep=0pt,outer sep=2pt] {\scriptsize\texttt{(\anchor)}};
+\end{tikzpicture}|
+Like for names, arrival and departure anchoring points are independent and optional.
+
+In this example, the default alignment \idx*{reaction scheme!alignment} is not good because the two ``A'' are not aligned vertically. Debug information\idx*{debug information} show that the default ``center'' anchors are not suitable:
+\exemple[50]{Alignment problems}/\schemedebug{true}
+\schemestart
+ \chemfig{A*5(-----)}
+ \arrow
+ \chemfig{A*5(---(-)--)}
+\schemestop/
+For the alignment\idx*{reaction scheme!alignment} to be correct, arrows will leave/arrive either from the anchor ``base east''/``base west'', or from anchor ``mid east''/``mid west'':
+\exemple[50]{Alignment problems}/\schemedebug{true}
+\schemestart
+ \chemfig{A*5(-----)}
+ \arrow(.base east--.base west)
+ \chemfig{A*5(---(-)--)}
+\schemestop
+\bigskip
+
+\schemestart
+ \chemfig{A*5(-----)}
+ \arrow(foo.mid east--bar.mid west)
+ \chemfig{A*5(---(-)--)}
+\schemestop/
+
+\idx*{compound!anchoring}One last anchor need be specified: the anchor of the first \idx{compound} with respect to the \idx{baseline} of the text just before it. This is illustrated by the green point on the left-hand side of the scheme below:
+\exemple[50]{Initial anchoring}/\schemedebug{true}
+Preceding text:
+\schemestart
+ \chemfig{A*5(-----)}\arrow A
+\schemestop/
+
+The default position of this anchor on the first \idx{compound}'s bounding box is that given by ``text''. This position can be controlled with the second optional argument of the \idx{\schemestart} command:
+\exemple[50]{Adjusting the initial anchoring}/\schemedebug{true}
+Preceding text:
+\schemestart[][south]
+ \chemfig{A*5(-----)}\arrow A
+\schemestop
+\bigskip
+
+Preceding text:
+\schemestart[][north west]
+ \chemfig{A*5(-----)}\arrow A
+\schemestop
+\bigskip
+
+Preceding text:
+\schemestart[][west]
+ \chemfig{A*5(-----)}\arrow A
+\schemestop/
+
+\section{Compounds style}
+The \idx{\arrow} command can also include \TIKZ instructions to define the bounding box style ``\verb-s-'' of the reactant and the product of the reaction. This is done with the argument between parentheses. Always style through the argument in brackets of the \idx{\arrow}, we can specify with \TIKZ instructions the style ``\verb-s-'' to bounding box of the \idx{compound} of departure or of arrival. Therefore the complete syntax of the \idx{\arrow} command, with each specification being optional, is as follows:
+
+\hfill\verb/\arrow(n1.a1[s1]--n2.a2[s2]){arrow type}[angle,coeff,arrow style]/\hfill\null
+
+Like forn names, if specific styles are given to one compound by arrows arriving on it and leaving from it, the first style will be ignored with a warning.
+
+\exemple[60]{Compounds style}/\schemestart
+ A
+ \arrow([red]--[fill=blue,semitransparent,text opacity=1,
+ inner sep=10pt,rounded corners=2mm])
+ B
+\schemestop
+\bigskip
+
+\schemestart
+ A\arrow(--foo[yshift=5mm])B
+\schemestop/
+\label{setcompoundstyle}The macro \idx\setcompoundstyle\verb-{<code tikz>}- allows to globally define the style of compounds \idx*{compound!style} displayed thereafter. Entering an empty argument results in the absence of style, which corresponds to the default case.
+
+Here a style is defined with round corner-shaped boxes and semitransparent background:
+\exemple[50]{Global styles}/\setcompoundstyle{draw,line width=0.8pt,semitransparent,
+text opacity=1,inner sep=8pt,rounded corners=1mm}
+\schemestart
+ A\arrow([fill=red]--[fill=blue])[90]
+ B\arrow(--[fill=gray])
+ C\arrow(--[fill=green])[-90]
+ D\arrow(--[draw=none])[-180]
+\schemestop/
+
+\section{Branching}
+\idx*{reaction scheme!branching}So far, only linear reaction schemes have been treated. Branched schemes are also possible and this is where compound names play a key role. When a name is preceded by ``\verb-@-'' in the argument between brackets of the \idx{\arrow} command, it means that the \idx{compound} already exists. Several scenarios are possible:
+\begin{itemize}
+ \item \verb/(@n1--n2)/: the arrow will leave from the existing compound ``\verb-n1-'' and the scheme will continue following the arrow, thus creating a branch;
+ \item \verb/(@n1--@n2)/: the arrow is drawn between two existing compounds, no matter whether they are already defined or whether they will later in the reaction scheme: therefore this syntax can be placed \emph{anywhere} in the code of the reaction scheme;
+ \item \verb/(n1--@n2)/: this syntax is not permitted;
+\end{itemize}
+
+In the following example, 3 branches are made, a first one from ``B'', a second one from ``D'' and a last one from ``X''. Finally one more arrow connects two existing compounds: ``XX'' and ``D'':
+\exemple[50]{Branching}/\schemestart
+ A\arrow(aa--bb)B\arrow(--cc)C\arrow D
+ \arrow(@bb--xx1)[-90]X\arrow[-90]Y% 1st branch
+ \arrow(@c4--)[-90]Z\arrow W% 2nd branch
+ \arrow(@xx1--xx2)[-45]XX% 3rd branch
+ \arrow(@xx2--@c4)% XX-to-D arrow
+\schemestop/
+
+One may wish to have ``Y'' and ``XX'' on the same horizontal line. To achieve this, a horizontal invisible bond is drawn between ``Y'' and ``XX''; the scheme is completed with a final arrow between the two existing compounds ``XX'' and ``D'':
+\exemple[50]{Branching}/\schemestart
+ A\arrow(aa--bb)B\arrow(--cc)C\arrow D
+ \arrow(@bb--xx1)[-90]X\arrow[-90]Y\arrow(--xx2){0}XX
+ \arrow(@c4--)[-90]Z\arrow W
+ \arrow(@xx1--@xx2)% X-to-XX arrow
+ \arrow(@xx2--@c4)% XX-to-D arrow
+\schemestop/
+
+\section{Subscheme}\label{subscheme}
+\idx*{reaction scheme!subscheme}A fraction of the reaction scheme can be defined within a single bounding box, so that \CF treats it as a \idx{compound}. The reaction scheme fraction is defined inside the compulsory argument between braces of the \idx{\subscheme} command so it is subsequently reagarded as a single entity. When \idx{\subscheme} is located after an arrow, the command labels this subscheme as a \idx{compound} named ``c<n+1>'':
+\exemple[50]{Subscheme}/\schemedebug{true}
+\schemestart
+ A\arrow
+ \subscheme{B\arrow[-90,2]C}
+ \arrow
+ D
+\schemestop/
+Although this is not clearly seen because of labels overlap, the box around the subscheme is called ``c2'', and name numbering continues inside the subscheme with B called ``c3'' and C called ``c4''. Since the first \idx{compound} in the subscheme is ``B'', the subscheme's baseline is that of ``B''. This can be pointed out by specifying the anchors\idx*{reaction scheme!subscheme!anchoring}:
+\exemple[50]{Subscheme}/\schemedebug{true}
+\schemestart
+ A\arrow(--.mid west)
+ \subscheme{B\arrow[-90,2]C}
+ \arrow
+ D
+\schemestop/
+Note that since ``\idx\subscheme\verb-{<scheme>}-'' is only a convenient shortcut for \idx\schemestart\verb-<scheme>-\idx\schemestop, it can be used with the same optional arguments as \idx\schemestart.
+
+\idx*{reaction scheme!subscheme!delimiter|(}\label{chemleft}\CF provides the \idx{\chemleft} and \idx{\chemright} command pair. These allow to set expandable delimiters on either side of a material. The commands must be followed by delimiters, just like in the case of \TeX{} primitive commands \verb-\left- and \verb-\right-:
+\centerverb/\chemleft<car1><material>\chemright<car2>/
+where \verb-<car1>- and \verb-<car2>- can be ``('' et ``)'' or ``['' and ``]'', or any other expandable delimiter consistent with the \verb-\left- et \verb-\right- commands.
+\exemple{The \string\chemleft\ and \string\chemright macros}/\chemleft\lfloor\chemfig{A-[1]B}\chemright)
+
+\chemleft\{\chemfig{A-[1,1.25]B-[6,1.25]C}\chemright|
+
+\chemleft[\chemfig{H-[1]O-[7]H}\chemright]/
+The code of the reaction scheme discussed above including \idx{\chemleft} and \idx{\chemright} is written:
+\exemple{Reaction scheme with \string\chemleft\ and \string\chemright}/\schemestart
+ A\arrow
+ \chemleft[\subscheme{B\arrow[-90,2]C}\chemright]
+ \arrow
+ D
+\schemestop/
+\label{chemup}By analogy, the macros \idx{\chemup} and \idx{\chemdown} can be used to draw expandable delimiters above and below the material, respectively:
+\centerverb/\chemup<car1><material>\chemdown<car2>/
+For example:
+\exemple{The \string\chemup\ and \string\chemdown macros}/\schemestart[-90]
+X\arrow
+\chemup\{\chemfig{A-[1]B-[7]C}\chemdown\}
+\arrow Y
+\schemestop
+\qquad
+\schemestart[-90]
+X\arrow
+\chemup[\chemfig{A-[1]B-[7]C}\chemdown]
+\arrow Y
+\schemestop/
+
+Delimiters can can also be drawn through compounds' style and apply them to a random compound (and hereby to a subscheme). These expandable delimiters (parentheses, brackets, braces) can be used upon loading the ``matrix'' \TIKZ library in the document preamble:
+
+\hfill\verb-\usetikzlibrary{matrix}-\hfill\null
+
+Since the \idx{\chemleft}, \idx{\chemright}, \idx{\chemup} and \idx{\chemdown} commands are available, the \CF package will \emph{not} automatically load the library. As long as the user want to access this special set of delimiters, the library must be explicitly loaded.
+
+The same brackets-delimited subscheme as above is presented again:
+\exemple[50]{The ``matrix'' library delimiters}/\schemestart
+ A\arrow(--[left delimiter={[}, right delimiter={]}])
+ \subscheme{B\arrow[-90,2]C}
+ \arrow
+ D
+\schemestop/
+Since the delimiters are drawn outside the bounding box, it is advisable to slightly shorten the incoming and outgoing arrows:
+\exemple[50]{Subscheme}/\schemestart
+ A\arrow(--[left delimiter={[},
+ right delimiter={]}])[,,shorten >=6pt]
+ \subscheme{B\arrow[-90,2]C}
+ \arrow[,,shorten <=6pt]
+ D
+\schemestop/\idx*{reaction scheme!subscheme!delimiter|)}
+
+Subschemes should be used with care, undesired results are sometimes observed. In this example, a subscheme is used to horizontally align 3 different compounds:
+\exemple[50]{Subscheme}/\schemedebug{true}
+\schemestart
+ A
+ \arrow{0}[-90]
+ \subscheme{%
+ tagada\arrow{}
+ tsoin\arrow{}
+ fin}
+ \arrow(xx--yy){}E
+ \arrow(@c1--@c3){}
+ \arrow(@c1--@c5){}
+ \arrow(@c1--@c4){}
+\schemestop/
+The center of the subscheme is exactly located on the same vertical lign as the center of compound "A". This is because the two entities are connected by an invisible arrow\idx*{arrow!invisible} with a $-90 $ angle. However, the arrow between the two pre-existing compounds ``A'' and ``tsoin'' is \emph{not} vertical because ``tsoin'' is not on the center of the subscheme since "tagada" is wider than "end". If this arrow is to be vertical within the use of the \idx{\subscheme} command, one must find a correct angle for the arrival anchor of the invisible arrow by try-and-error.
+
+A much simpler method is to use a branch instead of a subscheme: draw a \emph{visible} arrow between ``A'' and ``tsoin'', and then draw horizontal arrows on both sides of ``tsoin'', with a branch for the right-hand side arrows.
+\exemple[50]{Subscheme}/\schemedebug{true}
+\schemestart
+ A
+ \arrow(--tsoin){->}[-90]
+ tsoin
+ \arrow{<-}[180]
+ tagada
+ \arrow(@tsoin--fin){}
+ fin
+ \arrow{}
+ E
+ \arrow(@c1--@c3){}
+ \arrow(@c1--@fin){}
+\schemestop/
+
+\section{Arrows optional arguments}\label{fleche.arg.optionnel}
+\idx*{arrow!optional argument}Within the argument in braces of the \idx\arrow command, the arrow name can be followed by optional arguments written between brackets. Here are the possible values for these optional arguments and their meaning, as defined by \CF:
+\begin{itemize}
+ \item the arrows ``\verb|->|'', ``\verb|<-|'', ``\verb|<->|'', ``\verb|<=>|'', ``\verb|<<->|'',``\verb|<->>|'', ``\verb|-/>|'' have three optional arguments:
+ \begin{itemize}
+ \item the first one contains the ``label'' to be placed above the arrow\idx*{arrow!label};
+ \item the second one contains the ``label'' to be placed below the arrow. The orientation of these two labels is given by the same angle as the arrow. The perpendicular shift\idx*{arrow!label!shift} between the arrow and the label anchor\idx*{arrow!label!anchoring} can be adjusted with the \idx*\setarrowlabelsep\verb-\setarrowlabelsep{<dim>}-\label{setarrowlabelsep} command, its argument is a valid dimension in the sense of \TeX{}. By default or if the argument is empty, this distance is 3pt. Labels contained in the two optional arguments are \emph{not} typed in math mode.
+ \item the third one is a dimension corresponding to a shift perpendicular to the arrow\idx*{arrow!shift} that can be applied to it: the dimension is positive for an upward shift of the arrow (and of its labels, if any), and negative for a downward shift.
+ \end{itemize}
+ \item the ``\verb|-U>|'' arrow has 5 optional arguments:
+ \begin{itemize}
+ \item the first three are identical to those found in the other arrow types;
+ \item the fourth one is a coefficient (which is 0.333 by default) which multiplies the length of the arrow to get the radius of the arc;
+ \item the fifth one is the half-angle from the center of the arc path, it is 60 degrees by default.
+ \end{itemize}
+ \item the invisible arrow\idx*{arrow!invisible} ``\verb-0-'' accepts two optional arguments of the same type as the first two listed above;
+\end{itemize}
+\exemple[50]{Arrows optional arguments}/\schemedebug{false}
+\schemestart A\arrow{->[up][down]}B \schemestop
+\qquad
+\schemestart A\arrow{->[up][down][4pt]}B \schemestop
+\qquad
+\schemestart A\arrow{->[up][down][-4pt]}B \schemestop
+\medskip
+
+\schemestart A\arrow{<=>[up][down]}[30,1.5]B \schemestop
+\medskip
+
+\schemestart[-20]
+ A\arrow{->}B\arrow{->[][][3pt]}C\arrow{->[][][-3pt]}D
+\schemestop/
+A problem arises for vertical arrows:
+\exemple[50]{Vertical arrows}/\schemestart
+ A\arrow{->[up][down]}[-90]B
+\schemestop/
+For the sake of clarity, one may prefer to have the ``above'' and ``below'' labels\idx*{arrow!label} written horizontally. Label angles\idx*{arrow!label!angle} can be specified, while default is the same angle as that of the arrow. To choose a specific angle, \verb-*{<angle>}- can be written at the beginning of the optional arguments:
+\exemple[55]{Choice of angles}/\schemedebug{true}
+\schemestart A\arrow{->[*{0}up][*{0}down]}[90]B\schemestop
+\qquad
+\schemestart A\arrow{->[*{0}up][*{0}down]}[45]B\schemestop
+\qquad
+\schemestart A\arrow{->[*{0}up][*{0}down]}[-45]B\schemestop
+\qquad
+\schemestart A\arrow{->[*{0}up][*{0}down]}[-90]B\schemestop/
+The default position of the label anchor can lead to undesired results:
+\exemple[50]{Anchors}/\schemedebug{true}
+\schemestart
+ A\arrow{->[*{0}on top of][*{0}underneath]}[45,2]B
+\schemestop/
+To counter this, the anchoring position\idx*{arrow!label!anchoring} can be specified as well to override the one selected by \CF by default. The syntax for this is: \verb-*{<angle>.<ancre>}-.
+\exemple[50]{Anchors}/\schemedebug{true}
+\schemestart
+ A\arrow{->[*{0.0}on top of][*{0.180}underneath]}[45,2]B
+\schemestop
+\qquad
+\schemestart
+ A\arrow{->[*{0.south east}on top of]%
+ [*{0.north west}underneath]}[45,2]B
+\schemestop/
+
+The ``\verb/-U>/'' arrow remains a particular case. If one of the two labels from the first two optional arguments is present, the corresponding arc is plotted:
+\exemple[50]{The \texttt{-U>} arrow}/\schemestart A\arrow{-U>[123][456]}B\schemestop
+\qquad
+\schemestart A\arrow{-U>[123]}[30]B\schemestop
+\qquad
+\schemestart A\arrow{-U>[][456]}[-30]B\schemestop/
+
+The fourth and fifth optional arguments modify the appearance of the arc: respectively the arrow length coefficient which sets the arc radius, and the angle that defines the half arc:
+\exemple[50]{The \texttt{-U>} arrow}/\schemestart A\arrow{-U>[123][456][][0.25]}B\schemestop
+\qquad
+\schemestart A\arrow{-U>[123][456][][][90]}B\schemestop
+\qquad
+\schemestart A\arrow{-U>[123][456][][1][45]}B\schemestop/
+With negative values for the radius and the angle, the arc is drawn below the arrow:
+\exemple[50]{The \texttt{-U>} arrow}/\schemestart
+ A\arrow{-U>[123][456][][-0.333][-60]}B
+\schemestop/
+Label angles and anchoring customization is controlled with the first two arguments, just like for other arrows:
+\exemple[50]{The \texttt{-U>} arrow}/\schemestart
+ A\arrow{-U>[123][456]}[-90]B
+\schemestop
+\qquad
+\schemestart
+ A\arrow{-U>[*{0.180}123][*{0.180}456]}[-90]B
+\schemestop/
+
+\section{Arrows customization}\label{definearrow}
+This section is quite technical and requires some knowledge of \TIKZ. It is targeted at advanced users only who need to define their own arrows.
+
+The \idx{\definearrow} command allows to build custom arrows. Its syntax is:
+
+\hfill\verb-\definearrow{<number>}{<arrow name>}{<code>}-\hfill\null
+
+where \verb-<number>- is the number of optional arguments that will be used in the \verb-<code>-, with the usual syntax \verb-#1-, \verb-#2-, etc. These optional arguments cannot accept default values; if no value is specified upon using the macro \verb-\arrow-, the arguments will remain empty.
-\section{List of commands}
+Before going further, let's examine the available internal macros when drawing arrows. Since these macros include the \verb-@- character in their name, they can only be accessed through the \idx{\makeatletter} and \idx{\makeatother} commands.
+\begin{itemize}
+ \item \idx{\CF@arrow@start@name} and \idx{\CF@arrow@end@name} include the names of the compounds (considered as nodes by \TIKZ) between which the arrow is drawn;
+ \item \idx{\CF@arrow@start@node} and \idx{\CF@arrow@end@node} include the node names where arrow ends will be located. After these names, user-defined anchors can be specified in the argument between brackets of the \idx\arrow command, unless the field is left empty;
+ \item \idx{\CF@arrow@current@style} and \idx{\CF@arrow@current@angle} contain the style and the angle of the arrow to be drawn\idx*{arrow!angle}\idx*{arrow!style};
+ \item \idx{\CF@arrow@shift@nodes}\verb-{<dim>}- shifts the nodes ``\idx{\CF@arrow@start@node}'' and ``\idx{\CF@arrow@end@node}'' perpendicularly relative to the arrow by a dimension specified in the argument\idx*{arrow!shift};
+ \item \idx{\CF@arrow@display@label}\verb/{#1}{#2}{#3}{#4}{#5}{#6}{#7}{#8}/ is the most complex one. It gives the labels position\idx*{arrow!label} with the following arguments:
+ \begin{itemize}
+ \item \verb-#1- and \verb-#5- are the labels to be written;
+ \item \verb-#2- and \verb-#6- are real numbers between 0 and 1. They specify the location of the labels on the arrow. 0 is the beginning of the arrow and 1 is its end, assuming a \emph{straight} arrow;
+ \item \verb-#3- and \verb-#7- are the ``+'' or ``-'' characters. ``+'' displays the label above the arrow, while ``-'' does it below it;
+ \item \verb-#4- and \verb-#8- are the names of the nodes corresponding to the beginning and the end of the arrow.
+ \end{itemize}
+ \item arrow ends\idx*{arrow!end} are either ``\verb-CF@full-''\footnote{this one is similar to the \TIKZ-defined arrow : \texttt{stealth}.} for a full arrow or ``\verb-CF@half-'' for an upper-half arrow.
+\end{itemize}
+
+\subsection{First arrow}
+As an example, assume we want to make an arrow with a circle on its center. Let's call it ``\verb/-.>/''. This arrow will accept four optional arguments. Like for previously-defined arrows, the first and second arguments will be the labels to be located above and below the arrow. The third one will define the perpendicular shift relative to the arrow direction. Finally, the 4th argument will define the circle size. If this last argument is absent the default circle size will be equal to 2pt.
+
+Let's start with \idx*\definearrow\verb/\definearrow{4}{-.>}/ to declare that the arrow will have 4 optional arguments and that it will be called \verb/-.>/. First, the position of the nodes between which the arrow is to be drawn must be modified in order to take the third-argument shift into account. This is made with the macro \idx{\CF@arrow@shift@nodes}, so the code of the arrow will start with: \idx{\CF@arrow@shift@nodes}\verb-{#3}%-. Then, one must plot the arrow itself, while taking the opportunity to set a node on the center of the segment, which will be called "\verb-mid@point-". Finally, the circle is defined with its center on that node. The whole \idx*{tikz}\TIKZ code is:
+
+{\hskip2em\verb-\edef\pt@radius{\ifx\@empty#4\@empty 2pt\else #4\fi}% circle radius-\par\parskip0pt
+\hskip2em\verb/\expandafter\draw\expandafter[\CF@arrow@current@style,-CF@full]/\par
+\hskip4em\verb/(\CF@arrow@start@node)--(\CF@arrow@end@node)coordinate[midway](mid@point);/\par
+\hskip2em\verb-\filldraw(mid@point)circle(\pt@radius);%-}
+
+The last step is to enter the labels\idx*{arrow!label}, if any, with the folwing line:
+
+\hskip2em\verb/\CF@arrow@display@label{#1}{0.5}{+}{\CF@arrow@start@node}{#2}{0.5}{-}{\CF@arrow@end@node}/
+
+Here is the completed arrow:
+\exemple*{Arrow ``-.>''}/\makeatletter
+\definearrow4{-.>}{%
+ \edef\pt@radius{\ifx\@empty#4\@empty 2pt\else #4\fi}% dot radius
+ \CF@arrow@shift@nodes{#3}%
+ \expandafter\draw\expandafter[\CF@arrow@current@style,-CF@full](\CF@arrow@start@node)--(\CF@arrow@end@node)
+ coordinate[midway](mid@point);
+ \filldraw(mid@point)circle(\pt@radius);%
+ \CF@arrow@display@label{#1}{0.5}{+}{\CF@arrow@start@node}{#2}{0.5}{-}{\CF@arrow@end@node}
+ }
+\makeatother
+\schemestart
+A \arrow{-.>} B \arrow{-.>[above][below][][1pt]} C \arrow{-.>[][below]}[30] D \arrow{-.>[above][][5pt][1.5pt]} E
+\schemestop/
+
+\subsection{Curved arrow}
+How about a curved arrow? To make things as simple as possible, assume it will have one single optional argument with the \TIKZ code that will specify the point(s) of control. If this argument is empty, a ``\verb/->/'' type arrow will be plotted.
+
+If \verb-#1- is not empty, attention should not be drawn to ``\idx{\CF@arrow@start@node}'' and ``\idx{\CF@arrow@end@node}'' which contain the node names of arrow ends positions, because the location of these nodes is already determined by the anchors\idx*{arrow!anchoring} calculated for \emph{straight} arrows! Instead we will use \idx{\CF@arrow@start@name} and \idx{\CF@arrow@end@name} which contain the names of the compound (which are nodes for \TIKZ), since the arrow must be plotted between them. Here's the \TIKZ code to draw the curved arrow between the two compounds:
+
+{\verb/\draw[shorten <=\CF@arrow@offset,shorten >=\CF@arrow@offset,\CF@arrow@current@style,-CF@full,/\par\parskip0pt
+\verb/(\CF@arrow@start@name).. controls #1 ..(\CF@arrow@end@name);%/}
+
+One must add a \TIKZ code to shorten the arrowby an amount \idx{\CF@arrow@offset} defined by \idx{\setarrowoffset}. Indeed, the nodes ar not the same as those for straight arrows (\idx{\CF@arrow@start@node} and \idx{\CF@arrow@end@node}). So before \idx{\CF@arrow@current@style}, the follwing code must be added\idx*{\CF@arrow@offset}\idx*{\CF@arrow@offset}:
+\centerverb/shorten <=\CF@arrow@offset, shorten >=\CF@arrow@offset/
+this is the role the two lines after \verb-\else-.
+
+So here is our curved arrow:
+\exemple*{Curved arrow}/\makeatletter
+\definearrow1{s>}{%
+\ifx\@empty#1\@empty
+ \expandafter\draw\expandafter[\CF@arrow@current@style,-CF@full](\CF@arrow@start@node)--(\CF@arrow@end@node);%
+\else
+ \def\curvedarrow@style{shorten <=\CF@arrow@offset,shorten >=\CF@arrow@offset,}%
+ \CF@expadd@tocs\curvedarrow@style\CF@arrow@current@style
+ \expandafter\draw\expandafter[\curvedarrow@style,-CF@full](\CF@arrow@start@name)..controls#1..(\CF@arrow@end@name);
+\fi
+}
+\makeatother
+\schemestart
+A\arrow{s>}
+B\arrow{s>[+(0.5cm,0.5cm)]}
+C\arrow{s>[+(45:1cm)]}
+D\arrow(.60--.120){s>[+(60:1cm) and +(-120:1cm)]}
+E\arrow{s>[+(45:1) and +(-135:1)]}
+F\arrow{s>[+(-30:1) and +(150:1)]}[,1.5]
+G\arrow(.90--.90){s>[+(60:1)and+(120:1)]}[,2]
+H
+\schemestop
+
+\schemestart
+A\arrow(.90--.180){s>[+(90:0.8) and +(180:0.8)]}[45]B
+\arrow(.0--.90){s>[+(0:0.8) and +(90:0.8)]}[-45]C
+\arrow(.-90--.0){s>[+(-90:0.8) and +(0:0.8)]}[-135]D
+\arrow(.180--.-90){s>[+(180:0.8) and +(-90:0.8)]}[135]
+\schemestop/
+
+\section{The \protect\texttt{\textbackslash merge} command}
+The \idx{\merge} command allows to draw arrows coming from several existing compounds that merge into one single arrow that arrive to one single compounds.
+
+Just after the \idx{\merge} command, the direction that follows up must be specified. For this, 4 different direction characters can be used: ``\verb->-'' (the default direction if no character is entered), ``\verb-<-'', ``\verb-^-'' and ``\verb-v-''.
+
+The syntax follows with:
+
+\hfill\verb/\merge{dir}(n1.a1)(n2.a2)(...)(ni.ai)--(n.a[s])/\hfill\null
+
+where the ``\verb-ni-'' names before the double dash are those already-defined compounds from which outcoming arrows will merge into a single one. One can also specify the ``\verb-ai-'' anchor, when the default one is not convenient. Like for the \idx\arrow command, the command ``\verb-n.a[s]-'' includes the name, the anchor and the style of the target compound.
+
+\exemple[50]{The \string\merge command}/\schemestart
+ABC\arrow[30]EFGHIJ\arrow[45]KLM\arrow[60]NO
+\merge>(c1)(c2)(c3)--()series 1
+\arrow series 2
+\schemestop
+\bigskip
+
+\schemestart
+Foooo\arrow(foo--bar){<=>}Bar\arrow(--baz){<=>}Bz
+\merge^(foo)(bar)(baz)--()series
+\schemestop
+\bigskip
+
+\schemedebug{true}
+\schemestart
+A\arrow{<->}[90]B
+\merge<(c1.120)(c2)--(foobar.45[circle,blue])CCC
+\schemestop/
+
+Regarding the geometry of the \idx{\merge} arrow, it consists of $n$ segments leaving from $n$ compounds up to the perpendicular line that connects them: the default length of the shortest of these segments is worth half of the compound-spacing distance defined by \idx\setcompoundsep. The arrow drawn from the connecting line to the target compound has the same default length, its origin is on the middle of the connecting line. These three geometric features can be customized with the optional argument immediately after the target compound:
+
+\hfill\verb/\merge{dir}(n1.a1)(n2.a2)(...)(ni.ai)--(n.a[s])[c1,c2,c,style]/\hfill\null
+
+where:
+\begin{itemize}
+ \item the shortest segment distance between reactants and the connecting line is controlled through the multiplication of the \idx{\setcompoundsep} distance by a coefficient \verb-c1-, whose default value is 0.5;
+ \item the length of the arrow between the connecting line and the product compound is controlled through the multiplication of the \idx{\setcompoundsep} distance by a coefficient \verb-c2-, whose default value is 0.5;
+ \item the origin of the arrow between the connecting line and the product compound is determined by the coefficient \verb-c-, a value of 0 involves a departure from the the left of the connect line (or from its top if the direction is \verb-v- or \verb-^-);
+ \item the style of the \idx{\merge} arrow is defined with the last argument: \verb-style-.
+\end{itemize}
+
+\exemple*{Geometrical parameters of \string\merge}/\schemestart A\arrow{<=>}[90]B\merge(c1)(c2)--()C\schemestop\qquad
+\schemestart A\arrow{<=>}[90]B\merge(c1)(c2)--()[1]C\schemestop\qquad
+\schemestart A\arrow{<=>}[90]B\merge(c1)(c2)--()[,1]C\schemestop\qquad
+\schemestart A\arrow{<=>}[90]B\merge(c1)(c2)--()[,,0.2]C\schemestop\qquad
+\schemestart A\arrow{<=>}[90]B\merge(c1)(c2)--()[,,0.9,red,thick]C\schemestop
+\bigskip
+
+\schemestart A\arrow{<=>}B\merge^(c1)(c2)--()C\schemestop\qquad
+\schemestart A\arrow{<=>}B\merge^(c1)(c2)--()[1]C\schemestop\qquad
+\schemestart A\arrow{<=>}B\merge^(c1)(c2)--()[,1]C\schemestop\qquad
+\schemestart A\arrow{<=>}B\merge^(c1)(c2)--()[,,0.2]C\schemestop\qquad
+\schemestart A\arrow{<=>}B\merge^(c1)(c2)--()[,,0.9,red,thick]C\schemestop/
+
+Finally, it is possible to write labels above or below the merged\idx*{\merge} arrow. For this, the direction character accepts two optional arguments in brackets, a first one for the label above the arrow and a second one for the label below it. Therefore, the full syntax of the \idx{merge} command is:
+
+\hfill\verb/\merge{dir}[labelup][labeldow](n1.a1)(n2.a2)(...)(ni.ai)--(n.a[s])[c1,c2,c,style]/\hfill\null
+
+All the features introduced before for arrow labelling can be implemented here as well, i.e. rotation angle and anchoring with the syntax \verb-*{angle.anchor}- entered just before the content of the label.
+
+\exemple*{Labels of the \string\merge command}/\schemestart
+ABC\arrow{<=>}[90]DEF\merge>[above][below](c1)(c2)--()[0.25,1,0.75]GHIJ
+\schemestop\qquad
+\schemestart
+ABC\arrow{<=>}[90]DEF\merge>[*{45.south west}above][*{45.north east}below](c1)(c2)--()[0.25,1,0.75]GHIJ
+\schemestop\qquad
+\schemestart
+ABC\arrow{<=>}[90]DEF\merge>[*{90}above][*{90}below](c1)(c2)--()[0.25,1,0.75]GHIJ
+\schemestop
+\bigskip
+
+\schemestart
+ABC\arrow{<=>}DEF\merge v[above][below](c1)(c2)--()[0.25,1,0.75]GHIJ
+\schemestop\qquad
+\schemestart
+ABC\arrow{<=>}DEF\merge v[*{45.north west}above][*{45.south east}below](c1)(c2)--()[0.25,1,0.75]GHIJ
+\schemestop\qquad
+\schemestart
+ABC\arrow{<=>}DEF\merge v[*{0}above][*{0}below](c1)(c2)--()[0.25,1,0.75]GHIJ
+\schemestop/
+
+\section{The + sign}\label{signe+}
+The use of a ``\idx\+'' macro that displays a ${}+{}$ sign is available between the commands \idx{\schemestart} and \idx{\schemestop}. This macro accepts an optional argument in braces with 3 dimensions in the form \verb-{<dim1>,<dim2>,<dim3>}-, where:
+\begin{itemize}
+ \item \verb-<dim1>- and \verb-<dim2>- are the dimensions to be inserted before and after the ${}+{}$ sign;
+ \item \verb-<dim3>- is the vertical offset of the sign.
+\end{itemize}
+If one argument is left empty or if the argument in braces is missing, the dimensions take their default values, which can be specified with the \idx\setandsign\verb-{<dim1>,<dim2>,<dim3>}-\label{setandsign} command. An empty field leads \verb-<dim1>- and \verb-<dim2>- to be worth 0.5em, while \verb-<dim3>- becomes 0pt empty. The default values \verb-{0.5em,0.5em,0pt}- are used when the user does not specify different ones.
+
+\exemple[50]{The \string\+ command}/\schemestart
+A\+B\+{2em,,5pt}C\+{0pt,0pt,-5pt}D\arrow E\+F
+\schemestop
+
+\setandsign{1em,1em,0pt}
+\schemestart
+A\+B\+{2em,,5pt}C\+{0pt,0pt,-5pt}D\arrow E\+F
+\schemestop/
+
+As shown in the example below, it should be kept in mind that the ${}+{}$ sign inserted by the \idx{\+} command is part of the compound:
+\exemple[50]{Compounds and \string\+}/\schemedebug{true}
+\schemestart A\+ B\+{,,5pt}C\arrow D\+ E\schemestop/
+This makes it difficult to draw a vertical arrow exactly below the letter ``A'' since this letter is not a single compound for \CF. This issue can be solved with the use of the \idx{\subscheme} command to uniquely define the letter ``A'' as a single compound (the same procedure can be applied to the ${}+{}$ sign itself) so that it can be referred to later on with its own name:
+\exemple[50]{Subcompound and \string\+}/\schemedebug{true}
+\schemestart
+\subscheme{A}\+ B\arrow C
+\arrow(@c2--)[-90]E
+\schemestop
+\medskip
+
+\schemestart
+A\subscheme{\+}BCDEF \arrow G
+\arrow(@c2--)[-90]H
+\schemestop/%
+\idx*{reaction scheme|)}
+A common problem can be the misalignment of the ``+'' sign with the molecules before or after it. For example:
+\exemple{+ sign alignment}/\schemedebug{true}
+\schemestart
+ \chemfig{C(<[:40])(<[:160])=[6]C(<[:-130])<[:-20]}
+ \+
+ \chemfig{\lewis{246,Br}-\lewis{026,Br}}
+\schemestop/
+Here, the ``+'' sign sits on the same baseline as the compound before it, and this baseline is that of the top carbon atom. One may shift the ``+'' sign, but this would not change the vertical position of ``\kern0.3333em\chemfig{\lewis{246,Br}-\lewis{026,Br}}\kern0.3333em''. In fact, the ``+'' sign does not prevent \CF from reading a compound, as shown in the example above where everything is included in the compound `` c1''. Therefore, one must stop the compound right after the first molecule with a \verb-\arrow{0}[,0]- that will draw an invisible, zero-length arrow. In order to vertically center the whole scheme, one must also set the the anchor of the first compound as ``west'' (or ``180'', which is a synonym) with the second optional argument of the \verb-\schemestart- command:
+\exemple{+ sign alignment}/\schemedebug{true}
+\schemestart[][west]
+ \chemfig{C(<[:40])(<[:160])=[6]C(<[:-130])<[:-20]}
+ \arrow{0}[,0]\+
+ \chemfig{\lewis{246,Br}-\lewis{026,Br}}
+\schemestop/
+Thus, the first compound `` c1'' consists of the first molecule and the second compound consists of everything else, i.e. the ``+'' sign and the second molecule. Alternatively, one can play with anchors or styles via the \verb-\arrow- command to move the second compound to another location. Here, for example, the second compound is shifted downwards by 10pt in the first case. In the second case, the ``south east'' anchor of the first compound matches the ``south west'' anchor of the second one:
+\exemple{+ sign alignment}/\schemedebug{true}
+\schemestart[][west]
+ \chemfig{C(<[:40])(<[:160])=[6]C(<[:-130])<[:-20]}
+ \arrow(--[yshift=-10pt]){0}[,0]\+
+ \chemfig{\lewis{246,Br}-\lewis{026,Br}}
+\schemestop
+\medskip
+
+\schemestart[][west]
+ \chemfig{C(<[:40])(<[:160])=[6]C(<[:-130])<[:-20]}
+ \arrow(.south east--.south west){0}[,0]\+
+ \chemfig{\lewis{246,Br}-\lewis{026,Br}}
+\schemestop/
+\newpage
+
+\part{List of commands}
The commands created by \CF are:
\begin{center}
\begin{longtable}{>\footnotesize l>\footnotesize p{9cm}}\\\hline
\hfill\normalsize Commands\hfill\null &\hfill\normalsize Description\hfill\null\\\hline
-\verb-\chemfig<code>-\idx*\chemfig& draws the molecule whose design is described by the \verb-<code>-\\
-\verb-\printatom-\idx*\printatom& displays the atoms within the molecules. It can be redefined to customize the output. See page~\pageref{perso.affichage}\\
-\verb-\setnodestyle{<style tikz>}-\idx*\setnodestyle& using \TIKZ syntax, this macro defines the style of nodes containing the atoms. See page~\pageref{style.noeuds}\\
-\verb-\setbondestyle{<style tikz>}-\idx*\setbondstyle& with the \TIKZ syntax, this macro defines the style of the bonds. See~\pageref{setbondstyle}\\
+\idx\chemfig\verb-<code>-& draws the molecule whose design is described by the \verb-<code>-\\
+\idx\printatom& displays the atoms within the molecules. It can be redefined to customize the output. See page~\pageref{perso.affichage}\\
+\idx\setnodestyle\verb-{<style tikz>}-& using \TIKZ syntax, this macro defines the style of nodes containing the atoms. See page~\pageref{style.noeuds}\\
+\idx\setbondestyle\verb-{<style tikz>}-& with the \TIKZ syntax, this macro defines the style of the bonds. See page~\pageref{setbondstyle}\\
\idx\hflipnext&the next molecule will be horizontally flipped\\
\idx\vflipnext&the next molecule will be vertically flipped\\
-\verb-\definesubmol{<name>}[code1]{<code2>}-\idx*\definesubmol& creates an alias \verb-!<nom>- which can be put in the code of molecules to be drawn, and which will be replaced with \verb-<code1>- or \verb-<code2>- depending on the angle of the last bond. See page~\pageref{definesubmol}\\
+\idx\definesubmol\verb-{<nom>}[code1]{<code2>}- & creates an alias \verb-!<nom>- which can be put in the code of molecules to be drawn, and which will be replaced with \verb-<code1>- or \verb-<code2>- depending on the angle of the last bond. See page~\pageref{definesubmol}\\
\idx\chemskipalign& tells the vertical alignment mechanism to ignore the current group of atoms. See page~\pageref{chemskipalign}.\\
-\verb-\redefinesubmol{<name>}{<code>}-\idx*\redefinesubmol & replaces a preexisting alias \verb-!<name>- with the new \verb-<code>-. See page~\pageref{redefinesubmol}\\[2ex]\hline
+\idx\redefinesubmol\verb-{<nom>}{<code>}- & replaces a preexisting alias \verb-!<name>- with the new \verb-<code>-. See page~\pageref{redefinesubmol}\\[2ex]\hline
+&\\
+\idx\setcrambond\verb-{<dim1>}{<dim2>}{<dim3>}-& sets the dimensions of the triangles representing Cram bonds: \verb-<dim1>- is the size of the base, \verb-<dim2>- is the spacing between the dashes and \verb-<dim3>- is the side of the dashes. See page~\pageref{setcrambond}\\
+\idx\setatomsep\verb-{<dim>}>- & sets the interatomic distance. See page~\pageref{setatomsep}\\
+\idx\setbondoffset\verb-{<dim>}- & sets the space between bonded atoms and the bond. See page~\pageref{setbondoffset}\\
+\idx\setdoublesep\verb-{<dim>}- & sets the spacing between the two lines of a double bond. See page~\pageref{setdoublesep}\\[2ex]\hline
&\\
-\verb-\setcrambond{<dim1>}{<dim2>}{<dim3>}-\idx*\setcrambond & sets the dimensions of the triangles representing Cram bonds: \verb-<dim1>- is the size of the base, \verb-<dim2>- is the spacing between the dashes and \verb-<dim3>- is the side of the dashes. See page~\pageref{setcrambond}\\
-\verb-\setatomsep{<dim>}>-\idx*\setatomsep & sets the interatomic distance. See page~\pageref{setatomsep}\\
-\verb-\setbondoffset{<dim>}-\idx*\setbondoffset & sets the space between bonded atoms and the bond. See page~\pageref{setbondoffset}\\
-\verb-\setdoublesep{<dim>}-\idx*\setdoublesep & sets the spacing between the two lines of a double bond. See page~\pageref{setdoublesep}\\[2ex]\hline
+\idx\lewis\verb-{<codes>,<atome>}-& displays the \verb-<atom>- and places Lewis dot decorations as specified in the \verb-<code>-. The dots drawn do not change the bounding box. See page~\pageref{lewis}\\
+\idx\Lewis\verb-{<codes>,<atome>}-& displays the \verb-<atom>- and places Lewis dot decorations as specified in the \verb-<code>-. See page~\pageref{lewis}\\
+\idx\setlewis\verb-{<dim1>}{<dim2>}{<code tikz>}- & sets the Lewis dot parameters; \verb-<dim1>- is the distance between the atoms and the decoration, \verb-<dim2>- is the length of the line representing the pair of electrons and \verb-<tikz code>- is code which is passed directly to \TIKZ. See page~\pageref{setlewis}\\[2ex]\hline
&\\
-\verb-\lewis{<codes>,<atom>}-\idx*\lewis & displays the \verb-<atom>- and places Lewis dot decorations as specified in the \verb-<code>-. The dots drawn do not change the bounding box. See page~\pageref{lewis}\\
-\verb-\setlewis{<dim1>}{<dim2>}{<tikz code>}-\idx*\setlewis & sets the Lewis dot parameters; \verb-<dim1>- is the distance between the atoms and the decoration, \verb-<dim2>- is the length of the line representing the pair of electrons and \verb-<tikz code>- is code which is passed directly to \TIKZ. See page~\pageref{setlewis}\\[2ex]\hline
+\idx\chemmove\verb-[<tikz options>]<tikz code>-& Makes a \verb-tikzpicture- environment, adding to it the \verb-<tikz options>-. Uses the \verb-<tikz code>- to join the nodes specified in the molecules with the help pf the ``\verb-@-'' character. See page~\pageref{mecanismes-reactionnels}.\\
+\idx\chemsign\verb-[<dim>]<sign>- & draws the \verb-<sign>-, placing before and after it an unbreakable space of length \verb-<dim>-. See page~\pageref{chemsign}\\
+\idx\chemrel\verb-[<txt1>][<txt2>]{<arrow code>}- & draws an arrow described by its \verb-<arrow code>- and places the optional text \verb-<txt1>- and \verb-<txt2>- above and below the arrow respectively. See page~\pageref{chemrel}\\
+\idx\setchemrel\verb-{<dim1>}{<dim2>}{<dim3>}- & sets the dimensions of the arrow drawn with the command \verb-\chemrel-: \verb-<dim1>- is the vertical space between the arrow and the optional text, \verb-<dim2>- is the unbreakable horizontal space inserted before and after the arrow and \verb-<dim3>- is the length of the arrow. See page~\pageref{setchemrel}\\[2ex]\hline
&\\
-\verb-\chemmove[<tikz options>]<tikz code>-\idx*\chemmove & Makes a \verb-tikzpicture- environment, adding to it the \verb-<tikz options>-. Uses the \verb-<tikz code>- to join the nodes specified in the molecules with the help pf the ``\verb-@-'' character. See page~\pageref{mecanismes-reactionnels}.\\
-\verb-\chemsign[<dim>]<sign>-\idx*\chemsign & draws the \verb-<sign>-, placing before and after it an unbreakable space of length \verb-<dim>-. See page~\pageref{chemsign}\\
-\verb-\chemrel[<txt1>][<txt2>]{<arrow code>}-\idx*\chemrel & draws an arrow described by its \verb-<arrow code>- and places the optional text \verb-<txt1>- and \verb-<txt2>- above and below the arrow respectively. See page~\pageref{chemrel}\\
-\verb-\setchemrel{<dim1>}{<dim2>}{<dim3>}-\idx*\setchemrel & sets the dimensions of the arrow drawn with the command \verb-\chemrel-: \verb-<dim1>- is the vertical space between the arrow and the optional text, \verb-<dim2>- is the unbreakable horizontal space inserted before and after the arrow and \verb-<dim3>- is the length of the arrow. See page~\pageref{setchemrel}\\[2ex]\hline
+\idx\chemabove\verb-[<dim>]{<txt1>}{txt2}-\idx*\chemabove & writes \verb-<txt1>- and places \verb-<txt2>- above, leaving \verb-<dim>- of vertical space. This command does not change the bounding box of \verb-<txt1>-. See page~\pageref{chemabove}\\
+\idx\chembelow\verb-[<dim>]{<txt1>}{txt2}-\idx*\chembelow & writes \verb-{txt1}- and places \verb-<txt2>- below, leaving \verb-<dim>- of vertical space. This command does not change the bounding box of \verb-<txt1>-. See page~\pageref{chemabove}\\
+\idx\Chemabove\verb-[<dim>]{<txt1>}{txt2}-\idx*\chemabove & writes \verb-<txt1>- and places \verb-<txt2>- above, leaving \verb-<dim>- of vertical space. See page~\pageref{chemabove}\\
+\idx\Chembelow\verb-[<dim>]{<txt1>}{txt2}-\idx*\chembelow & writes \verb-{txt1}- and places \verb-<txt2>- below, leaving \verb-<dim>- of vertical space. See page~\pageref{chemabove}\\
+\idx\chemname\verb-[<dim>]{<molecule>}{<name>}-\idx*\chemname & Places \verb-<name>- under the \verb-<molecule>-\\
+\idx\chemnameinit & Initializes the greatest molecule depth to ensure correct alignment of the names of the following molecules.\\[2ex]\hline
&\\
-\verb-\chemabove[<dim>]{<txt1>}{txt2}-\idx*\chemabove & writes \verb-<txt1>- and places \verb-<txt2>- above, leaving \verb-<dim>- of vertical space. This command does not change the bounding box of \verb-<txt1>-. See page~\pageref{chemabove}\\
-\verb-\chembelow[<dim>]{<txt1>}{txt2}-\idx*\chembelow & writes \verb-{txt1}- and places \verb-<txt2>- below, leaving \verb-<dim>- of vertical space. This command does not change the bounding box of \verb-<txt1>-. See page~\pageref{chemabove}\\
-\verb-\chemname[<dim>]{<molecule>}{<name>}-\idx*\chemname & Places \verb-<name>- under the \verb-<molecule>-\\
-\verb-\chemnameinit-\idx*\chemnameinit & Initializes the greatest molecule depth to ensure correct alignment of the names of the following molecules.\\\hline
+\idx\schemestart\dots\idx\schemestop& commands between which a reaction scheme is drawn. See page~\pageref{schemestart}.\\
+\idx\arrow& draws an arrow in a reaction scheme (this command is only defined inside a reaction scheme). See page~\pageref{arrow}.\\
+\idx\+ & prints a $+$ sign in a reaction scheme (this command is only defined inside a reaction scheme). See page~\pageref{signe+}.\\
+\idx\subscheme\verb-{<code>}- & draws a subscheme (this command is only defined inside a reaction scheme). Voir~\pageref{subscheme}.\\
+\idx\definearrow & defines an arrow. See page~\pageref{definearrow}.\\
+\idx\chemleft\verb-<car1><stuff>-\idx\chemright\verb-<car1>-& draws expandable delimiters defined with \verb-<car1>- and \verb-<car2>- on the left and on the right of the \verb-<stuffl>-, see page~\pageref{chemleft}.\\
+\idx\chemup\verb-<car1><matériel>-\idx\chemdown\verb-<car1>-& draws expandable delimiters defined with \verb-<car1>- and \verb-<car2>- above and below the \verb-<stuff>-, voir page~\pageref{chemup}.\\
+\idx\setcompoundsep\verb-{<dim>}-& sets the space between the edges of the compounds in a reaction scheme. See page~\pageref{setcompoundsep}.\\
+\idx\setarrowoffset\verb-{<dim>}-& sets the space between the edges of the compound and the arrow. See page~\pageref{setarrowoffset}.\\
+\idx\setarrowdefault\verb-{angle,coeff,style}-&sets the default settings of the arrow. See page~\pageref{setarrowdefault}.\\
+\idx\setcompoundstyle\verb-{<code tikz>}-&set the default style of the compounds. See page~\pageref{setcompoundstyle}.\\
+\idx\setarrowlabelsep\verb-{<dim>}-&sets the space between the arrow and the anchor of its lables. See page~\pageref{setarrowlabelsep}.\\
+\idx\setandsign\verb-{<dim1>,<dim2>,<dim3>}-&sets the defaiult setting of the $+$ sign where \verb-<dim1>- and \verb-<dim2>- are the dimensions before and after the sign while \verb-<dim3>- is the vertical shift. See page~\pageref{setandsign}.\\\hline
\end{longtable}
\end{center}
\newpage
@@ -1714,7 +2411,7 @@ This manual concludes with drawings of molecules of varying complexity.
The curious user can look at the \verb-<code>- of each molecule, though it does become less attractive the more complex the molecule gets. Indeed, beyond a certain level of complexity, though it it is fairly easy to write \verb-<code>-, it becomes much harder to read the \verb-<code>- to analyze it afterwards. We quickly reached the limits of immediate readability of the code of a complex drawing.
-Anyway, I hope that this package will help all \LaTeX{} users wishing to draw molecules. Given the newness of this package, I hope that you will be forgiving with bugs you encounter and send me an \href{mailto:unbonpetit@gmail.com}{\texttt{\textbf{email}}} to let me know of any malfunctions or suggestions for improvement.\nobreak
+Anyway, I hope that this package will help all \LaTeX{} users wishing to draw molecules. Although \CF has been thoroughly tested and although its version number is now greater than 1.0, I hope that you will be forgiving with bugs you encounter and send me an \href{mailto:unbonpetit@gmail.com}{\texttt{\textbf{email}}} to let me know of any malfunctions or suggestions for improvement.
\hfill Christian \textsc{Tellechea}
\bigskip
@@ -1815,13 +2512,15 @@ $\star\quad\star$
-[::-150,1.5](-[:20]CH(-[1]CH_3)(-[7]CH_3))(-[6]H)-[::-90,2]-[::+60]?)}/
\idx*\chembelow
-\idx*\chemsign
-\idx*\chemrel
-\exemple*{Fischer indole synthesis}/\chemfig{*6(=-*6(-\chembelow{N}{H}-NH_2)=-=-)}
-\chemsign+
-\chemfig{(=[:-150]O)(-[:-30]R_2)-[2]-[:150]R_1}
-\chemrel[$\mathrm{H^+}$]{-stealth}
-\chemfig{*6(-=*5(-\chembelow{N}{H}-(-R_2)=(-R_1)-)-=-=)}/
+\idx*\+
+\idx*\schemestart
+\exemple*{Fischer indole synthesis}/\schemestart
+ \chemfig{*6(=-*6(-\chembelow{N}{H}-NH_2)=-=-)}
+ \+
+ \chemfig{(=[:-150]O)(-[:-30]R_2)-[2]-[:150]R_1}
+ \arrow(.mid east--.mid west){->[\chemfig{H^+}]}
+ \chemfig{*6(-=*5(-\chembelow{N}{H}-(-R_2)=(-R_1)-)-=-=)}
+\schemestop/
\idx*\chemabove
\idx*\chemrel
@@ -1854,58 +2553,105 @@ $\star\quad\star$
}/
\idx*\lewis
-\idx*\chemsign
\idx*\chemabove
\idx*\chemmove
-\idx*\chemrel
+\idx*\arrow\idx*\+\idx*\schemestart\idx*\schemestop
\idx*{"@}
\idx*\chembelow
\idx*{charge!\protect\texttt{\protect\string\protect\oplus}}
-\exemple*{Nucleophilic addition. Primary amines}/\chemfig{R-@{aton}\lewis{2,N}H_2}
-\chemsign{+}
+\exemple*{Nucleophilic addition. Primary amines}/\setatomsep{2.5em}
+\setcompoundsep{5em}
+\schemestart
+\chemfig{R-@{aton}\lewis{2,N}H_2}
+\+
\chemfig{@{atoc}C([3]-CH_3)([5]-CH_3)=[@{atoo1}]O}
-\hspace{1cm}
\chemfig{@{atoo2}\chemabove{H}{\scriptstyle\oplus}}
\chemmove[-stealth,shorten <=3pt,dash pattern= on 1pt off 1pt,thin]{
\draw[shorten >=2pt](aton) ..controls +(up:10mm) and +(left:5mm)..(atoc);
\draw[shorten >=8pt](atoo1) ..controls +(up:10mm) and +(north west:10mm)..(atoo2);}
-\chemrel[\tiny addition]{<>}
+\arrow{<=>[\tiny addition]}
\chemfig{R-@{aton}\chembelow{N}{\scriptstyle\oplus}H([2]-[@{sb}]H)-C(-[2]CH_3)(-[6]CH_3)-OH}
-\par
+\schemestop
\chemmove{
\draw[-stealth,dash pattern= on 1pt off 1pt,shorten <=3pt, shorten >=2pt]
(sb)..controls +(left:5mm) and +(135:2mm)..(aton);}
-\chemrel{<>}
+\par
+\schemestart
+\arrow{<=>}
\chemfig{R-@{aton}\lewis{2,N}([6]-[@{sbh}]H)-[@{sb}]C(-[2]CH_3)(-[6]CH_3)-[@{sbo}]@{atoo}
\chemabove{O}{\scriptstyle\oplus}(-[1]H)(-[7]H)}
\chemmove[-stealth,shorten <=3pt,shorten >=2pt,dash pattern= on 1pt off 1pt,thin]{
\draw(aton) ..controls +(up:5mm) and +(up:5mm)..(sb);
\draw(sbh) ..controls +(left:5mm) and +(south west:5mm)..(aton);
\draw(sbo) ..controls +(up:5mm) and +(north west:5mm)..(atoo);}
-\chemrel[\tiny elimination]{<>}
-\chemfig{R-N=C(-[1]CH_3)(-[7]CH_3)}
-\chemsign{+}
-\chemfig{H_3\chemabove{O}{\scriptstyle\oplus}}/
+\arrow{<=>[\tiny élimination]}\chemfig{R-N=C(-[1]CH_3)(-[7]CH_3)}
+\+
+\chemfig{H_3\chemabove{O}{\scriptstyle\oplus}}
+\schemestop/
+
+\idx*\setatomsep
+\idx*\schemestart\idx*\arrow\idx*\merge\idx*\schemestop
+\exemple*{Reaction scheme}/\setatomsep{2em}
+\schemestart[-90]
+ \chemfig{**6(---(-NH _2)---)}\arrow{0}\chemfig{HNO_2}
+ \merge(c1)(c2)--()
+ \chemfig{**6(---(-N_2|{}^\oplus)---)}\arrow{0}\chemfig{**6(---(-NH _2)---)}
+ \merge(c3)(c4)--()
+ \chemfig{**6(---(-N=[::-30]N-[::-30]**6(---(-NH_2)---))---)}
+\schemestop/
+
+\idx*\setatomsep
+\idx*\schemestart\idx*\arrow\idx*\subscheme\idx*\schemestop\idx*\chemleft\idx*\chemright
+\idx*{charge!\protect\texttt{\protect\string\protect\oplus}}
+\exemple*{Addition}/\setatomsep{2.5em}
+\schemestart
+ \chemfig{*6(=-(-)(=[2]O))}
+ \arrow{->[\+\chemfig{H^\oplus}]}
+ \chemleft[\subscheme[90]{%
+ \chemfig{*6((-[2,0.33,,,draw=none]\scriptstyle\oplus)-=(-)-OH)}
+ \arrow{<->}
+ \chemfig{*6(=-(-)(-[6,0.33,,,draw=none]\scriptstyle\oplus)-OH)}}\chemright]
+ \arrow(@c3--)\chemfig{*6((-[2]R)-=(-)-OH)}
+ \arrow(@c4--)\chemfig{*6(=-(-)(-[6]R)-OH)}
+\schemestop/
+
+\idx*\setatomsep
+\idx*\schemestart\idx*\arrow\idx*\subscheme\idx*\schemestop\idx*\chemname\idx*\definesubmol\idx*\chemleft\idx*\chemright
+\idx*{charge!\protect\texttt{\protect\string\protect\oplus}}
+\idx*{charge!\protect\texttt{\protect\string\protect\ominus}}
+\exemple*{Electrophilic aromatic substitution}Z\setatomsep{1.5em}%
+\definesubmol{+}{-[,-0.4,,,draw=none]\oplus}%
+\schemestart
+ \arrow{0}[,0]
+ \chemleft[\subscheme{\chemfig{*6(=-=-(-[:120]Br)(-[:60]H)-(!+)-)}
+ \arrow{<->}
+ \chemfig{*6(-(!+)-=-(-[:120]Br)(-[:60]H)-=)}
+ \arrow{<->}
+ \chemfig{*6(-=-(!+)-(-[:120]Br)(-[:60]H)-=)}}\chemright]
+ \arrow(@c2--){<-[*0\chemfig{{-}AlBr_4|^\ominus}][*0\chemfig{Br_2/Al_2Br_3}]}[90,1.5]
+ \chemname{\chemfig{*6(-=-=-=-)}}{Benzène 1}
+ \arrow(@c4--){->[*0\chemfig{{-}H^\oplus}]}[90,1.5]
+ \chemname{\chemfig{*6(-=-=(-Br)-=-)}}{Bromobenzène 2}
+ \arrow(@c5.mid east--@c6.mid west)
+\schemestop Z
\idx*\setbondoffset
\idx*\setatomsep
\idx*\lewis
-\idx*\chemrel
-\idx*\chemsign
+\idx*\arrow\idx*\+\idx*\schemestart\idx*\schemestop\idx*\setcompoundsep
\idx*\chemmove
\idx*{"@}
-\exemple*{Reaction mechanism of chlorination}/\scriptsize
-\setbondoffset{1pt}\setatomsep{2em}
-\chemfig{Cl-[4]@{a0}(=[@{a1}:120]@{a2}O)-[:-120](=[:-60]O)-[4]Cl}\chemsign{+}
-\chemfig{*6(-=-=(-@{oh1}OH)-=)}\chemrel{-stealth}
+\exemple*{Reaction mechanism of chlorination}/\scriptsize\setbondoffset{1pt}\setatomsep{2em}\setcompoundsep{4em}
+\schemestart
+\chemfig{Cl-[4]@{a0}(=[@{a1}:120]@{a2}O)-[:-120](=[:-60]O)-[4]Cl}\+\chemfig{*6(-=-=(-@{oh1}OH)-=)}\arrow
\chemfig{*6((-O-[:150](-[@{o0}:150]@{o1}\lewis{6.,O})(-[@{cl0}:60]@{cl1}Cl)-[:240](-[4]Cl)=[6]O)=-=-=-)}
-\chemrel{-stealth}\chemfig{*6((-O-[:150](=[2]O)-[:-150](=[6]O)-[:150]Cl)=-=-=-)}\chemsign{+}
-\chemfig{HCl}\par
-\chemfig{*6(-=*6(-O-*6(-@{o2}(=[@{o3}]@{o4}O)-Cl)=)-=-=)}\chemsign{+}
-\chemfig{*6(-=-=(-@{oh2}OH)-=)}\chemrel{-stealth}
+\arrow\chemfig{*6((-O-[:150](=[2]O)-[:-150](=[6]O)-[:150]Cl)=-=-=-)}\+\chemfig{HCl}
+\arrow(@c1--){0}[-90,0.5]
+\chemfig{*6(-=*6(-O-*6(-@{o2}(=[@{o3}]@{o4}O)-Cl)=)-=-=)}\+\chemfig{*6(-=-=(-@{oh2}OH)-=)}\arrow
\chemfig{*6(-=*6(-O-(-(-[@{cl2}:60]@{cl3}Cl)(-[@{o5}:-120]@{o6}\lewis{6.,O})-O-[::-40]*6(=-=-=-))=)-=-=)}
-\kern-3em \chemrel{-stealth}\chemfig{[:30]*6(=-(-O-[:-60](=O)-[:-120](=[4]O)-[:-60]O-*6(=-=-=-))=-=-)}
-\kern-3em \chemsign{+}\chemfig{HCl}
+\kern-3em \arrow\chemfig{[:30]*6(=-(-O-[:-60](=O)-[:-120](=[4]O)-[:-60]O-*6(=-=-=-))=-=-)}
+\kern-3em \+\chemfig{HCl}
+\schemestop
\chemmove[line width=0.2pt,-stealth,dash pattern = on 2pt off 1pt]{
\draw[shorten <=2pt](a1)..controls+(200:5mm)and+(200:5mm)..(a2);
\draw[shorten >=2pt](oh1.west)..controls+(180:15mm)and+(60:5mm)..(a0);
@@ -1947,68 +2693,133 @@ $\star\quad\star$
\catcode`;=12
\idx*\setbondoffset
\idx*\setatomsep
-\idx*\chemrel
\idx*{"@}
\idx*\chemabove
\idx*\chemmove
\idx*\lewis
\idx*{charge!\protect\texttt{\protect\string\protect\oplus}}
-\exemple*{Beckmann rearrangement}/
-\setbondoffset{1pt}
+\idx*\schemestart\idx*\arrow\idx*\setcompoundsep\idx*\setarrowoffset\idx*\subscheme\idx*\chemleft\idx*\chemright
+\exemple*{Beckmann rearrangement}/\setbondoffset{1pt}
\setatomsep{2.5em}
-\chemfig{(-[:-150]R')(-[:-30]R)=[2]N-[:30]OH}
-\kern-1em
-\chemrel[\chemfig{\chemabove{H}{\kern10pt\scriptstyle\oplus}}]{<>}
-\kern-0.5em
-\chemfig{(-[@{a0}:-150]R')(-[:-30]R)=[2]@{a1}N-[@{b0}:30]@{b1}\chemabove{O}{\scriptstyle\oplus}H_2}
-\chemmove[red,-stealth,red,shorten <=2pt]{
- \draw(a0)..controls +(135:2mm) and +(215:4mm).. (a1);
- \draw(b0)..controls +(120:2mm) and +(180:3mm).. ([yshift=7pt]b1.180);
-}
-\kern-1.5em
-\chemrel[\chemfig{{-}H_2O}]{<>}
-$\left[\begin{tabular}{c}
- \chemfig{R'-\lewis{2:,N}=@{a1}\chemabove{C}{\scriptstyle\oplus}-R}\\
- \tikz\draw[stealth-stealth](0,3mm)--(0,-3mm);\\
+\setcompoundsep{5em}
+\setarrowoffset{6pt}
+\schemestart
+ \chemfig{(-[:-150]R')(-[:-30]R)=[2]N-[:30]OH}
+ \arrow{<=>[\chemfig{H^\oplus}]}
+ \chemfig{(-[@{a0}:-150]R')(-[:-30]R)=[2]@{a1}N-[@{b0}:30]@{b1}\chemabove{O}{\scriptstyle\oplus}H_2}
+ \chemmove[red,-stealth,red,shorten <=2pt]{
+ \draw(a0)..controls +(135:2mm) and +(215:4mm).. (a1);
+ \draw(b0)..controls +(120:2mm) and +(180:3mm).. ([yshift=7pt]b1.180);}
+ \arrow{<=>[\chemfig{{-}H_2O}]}[,1.1]
+ \chemleft[\subscheme[90]{%
\chemfig{R'-\chemabove{N}{\scriptstyle\oplus}~C-R}
-\end{tabular}\right]$
-\chemrel[\chemfig{H_2@{a0}\lewis{0:2:,O}}]{<>}\par
-\chemmove[red,-stealth,red,shorten <=3pt]{
- \draw(a0)..controls+(90:10mm)and+(45:10mm)..([yshift=6pt]a1.45);
-}
-\chemfig{*6(R\rlap{$'$}-N=(-R)-\chemabove{O}{\scriptstyle\oplus} H_2)}
-\chemrel[\chemfig{{-}\chemabove{H}{\kern10pt\scriptstyle\oplus}}]{<>}
-\chemfig{*6(R\rlap{$'$}-N=(-R)-OH)}
-\chemrel{-stealth}
-\chemfig{*6(R\rlap{$'$}-\chembelow{N}{H}-(-R)(=[2]O))}
-/
+ \arrow{<->}[,0.75]
+ \chemfig{R'-\lewis{2:,N}=@{a1}\chemabove{C}{\scriptstyle\oplus}-R}}\chemright]
+ \arrow{<=>[\chemfig{H_2@{a0}\lewis{0:2:,O}}]}[,1.1]
+ \chemmove[red,-stealth,red,shorten <=3pt]{
+ \draw(a0)..controls+(90:10mm)and+(45:10mm)..([yshift=6pt]a1.45);}
+ \arrow(@c1--){0}[-90,0.333]
+ \chemfig{*6(R\rlap{$'$}-N=(-R)-\chemabove{O}{\scriptstyle\oplus} H_2)}
+ \arrow{<=>[\chemfig{{-}H^\oplus}]}
+ \chemfig{*6(R\rlap{$'$}-N=(-R)-OH)}
+ \arrow
+ \chemfig{*6(R\rlap{$'$}-\chembelow{N}{H}-(-R)(=[2]O))}
+\schemestop/
\endgroup
+\idx*\setatomsep
+\idx*\setcompoundsep
+\idx*\schemestart\idx*\schemestop\idx*\arrow\idx*\+
+\exemple*{Reaction scheme}/\setatomsep{1.5em}
+\setcompoundsep{4em}
+\schemestart
+ \chemfig{-[::30]=_[::-60](-[:: -60])-[::60]}
+ \arrow{->[\chemfig{HCl}]}
+ \chemfig{-[::30]-[::-60](-[::120]Cl)(-[::-60])-[::60]}\+\chemfig{-[::30](-[::60]Cl)-[::-60](-[::-60])-[::60]}
+ \arrow(@c1--.north west){->[\chemfig{H_2O}]}[-45,1.7]
+ \chemfig{-[::30]-[::-60](-[::120]OH)(-[::-60])-[::60]}\+\chemfig{-[::30](-[::60]OH)-[::-60](-[::-60])-[::60]}
+\schemestop/
+
+\idx*\tikzset\idx*\schemestart\idx*\arrow\idx*\chemmove\idx*\schemestop
+\idx*{charge!\protect\texttt{\protect\string\protect\oplus}}
+\exemple*{Esterification of formic acid}Z\tikzset{obrace/.style={left delimiter={[},inner sep=3pt},
+ cbrace/.style={right delimiter={]},inner sep=3pt},
+ braces/.style={left delimiter={[},right delimiter={]},inner sep=3pt}}
+\setatomsep{2em}
+\schemestart
+ \chemfig{H-C(=[:60]O)-[:-60]O-H}
+ \arrow(--M1[obrace]){-U>[\scriptsize\chemfig{H_2SO_4^{}}][\scriptsize\chemfig{HSO_4^\ominus}][][.25]}%
+ [,1.5,shorten >=6pt]
+ \chemfig{H-@{a2}C(-[:60]O-H)(-[:30,.5,,,draw=none]{\scriptstyle\oplus})-[:-60]O-H}
+ \arrow(--[cbrace]){<->}
+ \chemfig{H-C(=[:60]\chemabove{O}{\scriptstyle\oplus}-H)-[:-60]O-H}
+ \arrow(@M1--){<=>[*{0}\scriptsize\chemfig{H-[:120]@{a1}O-[:60]CH_3}][*{0}\tiny addition]}[-90,1.33]
+ \chemfig{H-C(-[2]O-[:30]H)(-\chemabove{O}{\scriptstyle\oplus}(-[:60]CH_3)-[:-60]H)-[6]O-[:-30]H}
+ \arrow{<=>[\tiny protolysis]}[180]
+ \chemfig{H-C(-[2]O-[:30]H)(-O-CH_3)-[@{b1}6]@{a3}\chemabove{O}{\kern-4mm\scriptstyle\oplus}(-[:-150]H)-[:-30]H}
+ \arrow(--[obrace]){<=>[*{0}\scriptsize\chemfig{{-}H_2O}][*{0}\tiny elimination]}[-90,,shorten >=6pt]
+ \chemfig{H-C(-[:60]O-H)(-[,.5,,,draw=none]{\scriptstyle\oplus})-[:-60]O-CH_3}
+ \arrow(--[cbrace]){<->}
+ \chemfig{H-C(=[:60]\chemabove{O}{\scriptstyle\oplus}-H)-[:-60]O-CH_3}
+ \arrow{-U>[\scriptsize\chemfig{HSO_4^\ominus}][\scriptsize\chemfig{H_2SO_4^{}}][][.25]}[,1.5]
+ \chemfig{H-C(=[:60]O)-[:-60]O-CH_3}
+ \arrow(@M1--[yshift=-5pt]){0}[180,.5]{\tiny protolysis}
+ \chemmove[->,red,shorten <=3pt,shorten >=1pt]{
+ \draw(a1)..controls +(0:1.5cm)and+(0:3cm).. (a2);
+ \draw(b1)..controls +(0:5mm)and+(20:5mm)..(a3);}
+\schemestop Z
+
+\idx*\schemestart\idx*\subscheme\idx*\arrow\idx*\lewis\idx*\+\idx*\arrow
+\idx*\chemname\idx*\vflipnext\idx*\chemmove\idx*\chemabove\idx*\llap
+\idx*{charge!\protect\texttt{\protect\string\protect\oplus}}
+\idx*{charge!\protect\texttt{\protect\string\protect\ominus}}
+\exemple*{Electrophilic addition of halogen to olefin}/\schemestart
+ \subscheme{%
+ \chemfig{C(<[:40])(<[:160])=[6]C(<[:-130])<[:-20]}
+ \arrow{0}[,0]\+\chemfig{\lewis{246,Br}-\lewis{026,Br}}}
+ \arrow(@c1--olefin){<=>[*{0}rapide]}[-90]
+ \chemfig{>[:-20]C(<[:40])=[@{db}6]C(<[:-130])<[:-20]}
+ \arrow(--bromonium){0}[-90]
+ \chemname{\chemfig{C*3((<)(<:[:-155])-\raise1.5pt\llap{$\scriptstyle\oplus$}\lewis{17,Br}-C(<:)(<[:155])-)}}
+ {bromonium ion}
+ \arrow(--carbeniumA){<<->}[,1.5]
+ \chemname[12pt]{\chemfig{-[:-30]\chemabove{C}{\scriptstyle\oplus}(-[:30])-[6]C(<:[:-150])(<[:-100])-[:-30]
+ \lewis{157,Br}}}{carbenium ion}
+ \arrow(@bromonium--carbeniumB){<<->}[180,1.5]
+ \chemname[12pt]{\vflipnext\chemfig{-[:-30]\chembelow{C}{\scriptstyle\oplus}(-[:30])-[6]C(<[:-150])
+ (<:[:-100])-[:-30]\lewis{137,Br}}}{carbenium ion}
+ \arrow(@olefin--){0}[,.25]
+ \chemfig{@{Br1}\chemabove[3pt]{\lewis{246,Br}}{\scriptstyle\delta\oplus}-[@{b2}]@{Br2}
+ \chemabove[3pt]{\lewis{026,Br}}{\scriptstyle\delta\ominus}}
+ \arrow(@olefin--[left]){0}[180,0]
+ $\pi$ complexe
+ \arrow(@carbeniumA--@olefin){<=>[lent, \chemfig{{-}Br^\ominus}]}
+ \arrow(@carbeniumB--@olefin){<=>[lent, \chemfig{{-}Br^\ominus}]}
+ \chemmove[-stealth,red,shorten <=3pt,shorten >=2pt]{
+ \draw(db) .. controls +(20:5mm) and +(135:5mm) .. (Br1);
+ \draw(b2) .. controls +(-90:5mm) and +(-120:5mm) .. (Br2);}
+\schemestop/
+
\idx*\definesubmol
\idx*\setatomsep
\idx*\chemname
-\idx*\chemsign
-\idx*\chemrel
\idx*\chemmove
+\idx*\schemestart\idx*\arrow\idx*\+\idx*\schemestop
\idx*{charge!\protect\texttt{\protect\string\protect\oplus}}
-\exemple*{Sulfonation of naphthalene}/\newcommand\putchemnode[1]{\begin{tikzpicture}[remember picture]\node(#1){};\end{tikzpicture}}
-\definesubmol\cycleoplus{-[,0.25,,,draw=none]\oplus}
+\exemple*{Sulfonation of naphthalene}/\definesubmol\cycleoplus{-[,0.25,,,draw=none]\oplus}
\definesubmol{so2oh}{S(=[::90]O)(=[::-90]O)-OH}
-\footnotesize
\setatomsep{2.5em}
-\begin{tabular}{ll}
-&\putchemnode{l1}\chemname{\chemfig{*6(=-*6(-=-(!\cycleoplus)-(-SO_3H)-)=-=-)}}{1-arenium ion}
-\chemrel{-stealth}
-\chemname{\chemfig{*6(=-*6(-=-=(-!{so2oh})-)=-=-)}}{1-naphthalenesulfonic acid}\\
-\chemname{\chemfig{*6(=-*6(-=-=-)=-=-)}}{Naphthalene}
-\chemsign{+}
-\chemfig{H_2SO_4}\putchemnode{a}\kern1cm&\\[-5ex]
-&\putchemnode{l2}\chemname{\chemfig{*6(=-*6(-=-(-SO_3H)-(!\cycleoplus)-)=-=-)}}{2-arenium ion}\kern-3em
-\chemrel{-stealth}
-\chemname{\chemfig{*6(=-*6(-=-(-!{so2oh})=-)=-=-)}}{2-naphthalenesulfonic acid}
-\end{tabular}
-\chemmove[-stealth,yshift=1cm]{
- \draw(a)--node[sloped,above]{80\degres C}(l1);\draw(a)--node[sloped,above]{160\degres C}(l2);}/
+\schemestart[,1.5]
+ \chemname{\chemfig{*6(=-*6(-=-=-)=-=-)}}{Naphtalène}\+\chemfig{H_2SO_4}
+ \arrow(nph.mid east--.south west){->[80\degres C]}[45]
+ \chemname{\chemfig{*6(=-*6(-=-(!\cycleoplus)-(-SO_3H)-)=-=-)}}{Ion 1-arenium}
+ \arrow(.mid east--.mid west)
+ \chemname{\chemfig{*6(=-*6(-=-=(-!{so2oh})-)=-=-)}}{Acide 1-naphthalenesulfonique}
+ \arrow(@nph.mid east--.north west){->[160\degres C]}[-45]
+ \chemname{\chemfig{*6(=-*6(-=-(-SO_3H)-(!\cycleoplus)-)=-=-)}}{Ion 2-arenium}\kern-4em
+ \arrow(.mid east--.mid west)
+ \chemname{\chemfig{*6(=-*6(-=-(-!{so2oh})=-)=-=-)}}{Acide 2-naphthalenesulfonique}
+\schemestop/
\begingroup\catcode`;12
\idx*\chemname
@@ -2080,9 +2891,7 @@ $\left[\begin{tabular}{c}
\idx*{-, =, \protect\string\protect~@\protect\texttt-, \protect\texttt=, \protect\texttt{\protect\string~}|see{bond/types}}
\idx*{=\protect\string_, =\protect\string^@\protect\texttt{=\protect\string_}, \protect\texttt{=\protect\string^}|see{bond/shifted}}
\idx*{"!|see{save a molecule}}
-%
-%
-\clearpage
+\newpage
\phantomsection
\addcontentsline{toc}{part}{Index}
\printindex
diff --git a/Master/texmf-dist/doc/generic/chemfig/chemfig_doc_fr.pdf b/Master/texmf-dist/doc/generic/chemfig/chemfig_doc_fr.pdf
index 88cbaffa998..dcf215da84d 100644
--- a/Master/texmf-dist/doc/generic/chemfig/chemfig_doc_fr.pdf
+++ b/Master/texmf-dist/doc/generic/chemfig/chemfig_doc_fr.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/generic/chemfig/chemfig_doc_fr.tex b/Master/texmf-dist/doc/generic/chemfig/chemfig_doc_fr.tex
index c92c6990af9..25eae1e525a 100644
--- a/Master/texmf-dist/doc/generic/chemfig/chemfig_doc_fr.tex
+++ b/Master/texmf-dist/doc/generic/chemfig/chemfig_doc_fr.tex
@@ -3,7 +3,7 @@
% | |
% | Documentation de ChemFig |
% | |
-% | 24 avril 2011 |
+% | 15 juin 2011 |
% | |
% |__________________________________________________________________|
%
@@ -57,9 +57,11 @@
\usepackage{textcomp}
\usepackage{enumitem}
\usepackage{chemfig}
-\usepackage{siunitx}
\usetikzlibrary{decorations.pathmorphing}
+\usetikzlibrary{matrix}
+\usepackage{siunitx}
\usepackage{emerald}
+\usepackage{xstring}
\usepackage[protrusion=true,expansion,final,babel=true]{microtype}
\usepackage{fancyhdr}
\fancypagestyle{plain}{%
@@ -80,7 +82,11 @@
\index{#1}%
\print@or@not{#1}%
\else
- \expandafter\index\expandafter{\expandafter\@gobble\string#1@\protect\texttt{\protect\string\protect#1}}%
+ \saveexpandmode\expandarg
+ \StrSubstitute{\string#1}{\string @}{\@empty\protect\symbol{'100}}[\temp@]%
+ \StrGobbleLeft\temp@1[\temp@]%
+ \restoreexpandmode
+ \expandafter\index\expandafter{\temp@ @\protect\texttt{\protect\textbackslash\temp@}}%
\print@or@not{\texttt{\string#1}}%
\fi
\else
@@ -112,6 +118,8 @@
\make@car@active\^^M{\par\leavevmode}%
\make@car@active\,{\leavevmode\kern\z@\string,}%
\make@car@active\-{\leavevmode\kern\z@\string-}%
+ \make@car@active\>{\leavevmode\kern\z@\string>}%
+ \make@car@active\<{\leavevmode\kern\z@\string<}%
\exemple@@{#1}{#2}%
}
@@ -175,7 +183,7 @@
\newcommand\falseverb[1]{{\ttfamily\detokenize{#1}}}
\long\def\centerverb#1{%
- \def\centerverb@i##1#1{##1\hfill\null\par\egroup}
+ \def\centerverb@i##1#1{##1\hfill\null\par\egroup}%
\bgroup
\ttfamily\@noligs
\parskip3.5pt\par\hfill
@@ -245,36 +253,32 @@ delim_2 "\\dotfill"
\end{center}
\vskip1.5cm
\hfill
- \hbox to 0pt{\hss
- \scriptsize
+ \hbox to 0pt{\hss\scriptsize
\setbondoffset{1pt}
- \setatomsep{2em}
- \chemfig{(-[:-150]R')(-[:-30]R)=[2]N-[:30]OH}%
- \kern-1em
- \chemrel[\chemfig{\chemabove{H}{\kern10pt\scriptstyle\oplus}}]{<>}%
- \kern-0.5em
- \chemfig{(-[@{a0}:-150]R')(-[:-30]R)=[2]@{a1}N-[@{b0}:30]@{b1}\chemabove{O}{\scriptstyle\oplus}H_2}%
- \chemmove[red,-stealth,red,shorten <=2pt]{%
- \draw(a0)..controls +(135:2mm) and +(215:4mm).. (a1);
- \draw(b0)..controls +(120:2mm) and +(180:3mm).. ([yshift=7pt]b1.180);
- }
- \kern-1.5em
- \chemrel[\chemfig{{-}H_2O}]{<>}%
- $\left[\begin{tabular}{c}
- \chemfig{R'-\lewis{2:,N}=@{a1}\chemabove{C}{\scriptstyle\oplus}-R}\\
- \tikz\draw[stealth-stealth](0,3mm)--(0,-3mm);\\
- \chemfig{R'-\chemabove{N}{\scriptstyle\oplus}~C-R}
- \end{tabular}\right]$%
- \chemrel[\chemfig{H_2@{a0}\lewis{0:2:,O}}]{<>}%
- \chemmove[red,-stealth,red,shorten <=3pt]{%
- \draw(a0)..controls+(90:10mm)and+(45:10mm)..([yshift=6pt]a1.45);
- }%
- \chemfig{*6(R\rlap{$'$}-N=(-R)-\chemabove{O}{\scriptstyle\oplus} H_2)}%
- \chemrel[\chemfig{{-}\chemabove{H}{\kern10pt\scriptstyle\oplus}}]{<>}%
- \chemfig{*6(R\rlap{$'$}-N=(-R)-OH)}%
- \chemrel{-stealth}%
- \chemfig{*6(R\rlap{$'$}-\chembelow{N}{H}-(-R)(=[2]O))}\par\bigskip
- \hss}\hfill\null
+ \setatomsep{2.5em}
+ \setcompoundsep{5em}
+ \setarrowoffset{6pt}
+ \schemestart
+ \chemfig{(-[:-150]R')(-[:-30]R)=[2]N-[:30]OH}
+ \arrow{<=>[\chemfig{H^\oplus}]}
+ \chemfig{(-[@{a0}:-150]R')(-[:-30]R)=[2]@{a1}N-[@{b0}:30]@{b1}\chemabove{O}{\scriptstyle\oplus}H_2}
+ \chemmove[red,-stealth,red,shorten <=2pt]{
+ \draw(a0)..controls +(135:2mm) and +(215:4mm).. (a1);
+ \draw(b0)..controls +(120:2mm) and +(180:3mm).. ([yshift=7pt]b1.180);}
+ \arrow{<=>[\chemfig{{-}H_2O}]}[,1.1]
+ \chemleft[{\subscheme[90]{%
+ \chemfig{R'-\chemabove{N}{\scriptstyle\oplus}~C-R}
+ \arrow{<->}[,0.75]
+ \chemfig{R'-\lewis{2:,N}=@{a1}\chemabove{C}{\scriptstyle\oplus}-R}}}\chemright]
+ \arrow{<=>[\chemfig{H_2@{a0}\lewis{0:2:,O}}]}[,1.1]
+ \chemmove[red,-stealth,red,shorten <=3pt]{
+ \draw(a0)..controls+(90:10mm)and+(45:10mm)..([yshift=6pt]a1.45);}
+ \chemfig{*6(R\rlap{$'$}-N=(-R)-\chemabove{O}{\scriptstyle\oplus} H_2)}
+ \arrow{<=>[\chemfig{{-}H^\oplus}]}
+ \chemfig{*6(R\rlap{$'$}-N=(-R)-OH)}
+ \arrow
+ \chemfig{*6(R\rlap{$'$}-\chembelow{N}{H}-(-R)(=[2]O))}
+ \schemestop\hss}\hfill\null
\begin{center}
\ECFAugie\small Réarrangement de Beckmann%
\end{center}
@@ -286,14 +290,14 @@ delim_2 "\\dotfill"
\setitemize{leftmargin=3em,topsep=0pt,parsep=0pt,itemsep=0pt,label=--}
\part{Introduction}
-\section{Nouveautés de la version 0.4b}
-Voici les nouveautés de la version 0.4b :
-\begin{enumerate}
- \item l'argument de la commande \verb-\chemfig- n'est plus sensible au régime courant des \idx{codes de catégories}. Par conséquent, la commande \verb-\chemfig- peut se trouver dans l'argument d'autres macros, même lorsque le code de la molécule contient des caractères ayant des codes de catégorie non inoffensifs : \verb-~-, \verb-!- ou \verb-?-. On peut donc sans problème écrire\footnote{La commande \texttt{\string\protect} ne sert ici qu'à rendre la commande \texttt{\string\chemfig} \emph{robuste}, c'est-à-dire capable d'être sauvegardée et conservée intacte par \texttt{\string\section} pour être réutilisée plus tard, dans la table des matières notamment.} dans un document \LaTeX : \verb-\section{La molécule \protect\chemfig{N~N}}-.
-
- Seul \og\verb-#-\fg{} est l'exception à cette règle. Pour mettre dans l'argument d'une macro la commande \texttt{\string\chemfig} dont le code de la molécule contient le caractère \verb-#-, il faut faire précéder le tout de \og\verb-\catcode`\#=12-\fg{} et le faire suivre de \og\verb-\catcode`\#=6-\fg.
- \item La commande \idx{\setbondstyle} permet de régler le style des liaisons, voir page~\pageref{setbondstyle}.
-\end{enumerate}
+\section{Nouveautés de la version 1.0}
+Voici les nouveautés de la version 1.0 :
+\begin{itemize}
+ \item on peut désormais tracer des schémas réactionnels, voir page~\pageref{schemas};
+ \item les macros \verb-\Chemabove- et \verb-\Chembelow- fonctionnent de la même façon que \verb-\chemabove- et \verb-\chembelow- mais modifient la boîte englobante, voir page~\pageref{Chemabove};
+ \item la macro \verb-\Lewis- fonctionne de la même façon que \verb-\lewis- mais modifie la boîte englobante, voir page~\pageref{Lewis};
+ \item les commandes \verb-\chemleft-, \verb-\chemright-, \verb-\chemup- et \verb-\chemdown- permettent de tracer des délimiteurs extensibles à gauche, à droite, au dessus ou au dessous d'un matériel quelconque. Voir page~\pageref{chemleft}.
+\end{itemize}
\section{Avant propos}
Cette extension a pu voir le jour grâce à l'aide de Christophe \textsc{Casseau} qui en a eu l'idée après s'être confronté à la complexité de la syntaxe de l'extension \href{http://www.ctan.org/tex-archive/help/Catalogue/entries/ppchtex.html}{\texttt{\textbf{ppchtex}}}.
@@ -316,7 +320,7 @@ Pour charger \CF, il faut écrire :
\begin{itemize}
\item {\color{blue}\verb-\input chemfig.tex-} avec $\varepsilon$\TeX\idx*\input;
\item {\color{blue}\verb-\usepackage{chemfig}-} avec \LaTeX\idx*{Latex@\protect\LaTeX}\idx*\usepackage;
- \item {\color{blue}\verb-\usemodule[chemfig]-} avec Con\TeX t\idx*{ConTeXt@Con\protect\TeX{}t}\idx*\usemodule.
+ \item {\color{blue}\verb-\usemodule[chemfig]-} avec Con\TeX t\idx*{ConTeXt@Con\protect\TeX{}t}\idx*\usemodule;
\end{itemize}
Dans tous les cas, le package \TIKZ\idx*{tikz}, s'il n'a pas été chargé auparavant, est chargé par \CF.
@@ -402,7 +406,7 @@ Remarques :
\end{itemize}
\subsection{Représentation de CRAM}
-\idx*{representation de Cram@représentation de Cram}Une autre façon d'indiquer l'angle de la liaison entre deux atomes.
+\idx*{Cram (représentation)}Une autre façon d'indiquer l'angle de la liaison entre deux atomes.
\exemple{Le méthane}|\chemfig{C(-[5]H)(-[2]H)(<[:-70]H)(<:[:-20]H)}|
\subsection{Formule topologique}
@@ -414,7 +418,7 @@ La liaison double est tracée de part et d'autre de la ligne de liaison simple.
\chemfig{=[:-30]-[:30]=[:-30]} \chemfig{=_[:-30]-[:30]=^[:-30]}/
\subsection{Formule de Lewis}
-\idx*{representation de Lewis@représentation de Lewis}La syntaxe est la suivante :
+\idx*{Lewis (représentation)}La syntaxe est la suivante :
\centerverb/\lewis{<indice de position><état électronique>,<atome>}/
\smallskip
@@ -469,7 +473,7 @@ La commande \verb|\chemfig| vous place directement dans le mode mathématique\id
Pour les puristes il est possible d'entourer la charge de l'ion en utilisant les commandes \verb|\ominus| et \verb|\oplus|\idx*{charge!\protect\texttt{\protect\string\protect\oplus}}\idx*{charge!\protect\texttt{\protect\string\protect\ominus}}.
-Pour répondre à toutes les exigences, il existe deux autres commandes \idx{\chemabove} et \idx{\chembelow} qui permettent de placer les charges au dessus et en dessous de l'atome considéré.\idx*\lewis
+\label{Chemabove}Pour répondre à toutes les exigences, il existe deux autres commandes \idx{\chemabove} et \idx{\chembelow} qui permettent de placer les charges au dessus et en dessous de l'atome considéré.\idx*\lewis
\exemple{Quelques ions}|\chemfig{-(-[1]O^{\ominus})=[7]O}
\hspace{1cm}
@@ -485,7 +489,7 @@ Pour ceux qui font du zèle, les commandes \idx{\chemabove} et \idx{\chembelow}
\section{Équations chimiques}
\idx*{reaction chimique@réaction chimique}Voici un exemple de réaction chimique :
\exemple*{Réaction chimique}/\chemfig{**6(------)} \hspace{.5cm} + \hspace{.5cm} \chemfig{H_3C-Cl}
-\hspace{.5cm} $\xrightarrow{catalyseur}$ \hspace{.5cm}
+\hspace{.5cm} $\xrightarrow{catalyseur}$ \hspace{.5cm}
\chemfig{**6(---(-)---)} \hspace{.5cm} + \hspace{.5cm} \chemfig{H-Cl}/
\CF introduit également deux nouvelles commandes \idx{\chemsign} et \idx{\chemrel} qui permettent de simplifier légèrement la syntaxe précédente.
@@ -567,7 +571,7 @@ Si deux liaisons se suivent, alors \CF insère un groupe vide \verb-{}-, et auto
Par défaut, tous les atomes se trouvant dans les groupes d'atomes sont composés en mode mathématique\idx*{mode mathematique@mode mathématique} (les espaces sont ignorés). Ils peuvent donc contenir des caractères propres à ce mode comme la mise en indice ou en exposant\footnote{Il existe un problème de placement des groupes d'atomes contenant des exposants ou des indices. Voir page~\pageref{alignement.vertical}.}:
\exemple{Mode mathématique}|\chemfig{A_1B^2-C _ 3 ^ 4}|
-Il existe des réglages spécifiques aux liaisons de Cram\idx*{representation de Cram@représentation de Cram}\idx*\setcrambond. On utilise cette syntaxe :\label{setcrambond}
+Il existe des réglages spécifiques aux liaisons de Cram\idx*{Cram (représentation)}\idx*\setcrambond. On utilise cette syntaxe :\label{setcrambond}
\centerverb/\setcrambond{<dim1>}{<dim2>}{<dim3>}/
\smallskip
@@ -744,7 +748,7 @@ où chaque champ prend sa valeur par défaut s'il est vide :
\begin{itemize}
\item le \verb-<nom>- est le nom du crochet : tous les caractères alphanumériques (a..z, A..Z, 0..9) sont admis\footnote{Ce n'est pas totalement exact. En réalité, tous les caractères pouvant être mis entre \texttt{\string\csname...\string\endcsname} sont autorisés.}. Ce nom vaut ``\verb-a-'' par défaut. Seul ce champ est pris en compte lors de la première occurrence de ce crochet portant ce nom.
\item \verb-<liaison>- spécifie avec quelle liaison l'atome portant cette occurrence du crochet doit être reliée a l'atome portant la première occurrence. Deux cas de figure sont possibles; soit ce champ est un entier représentant le type de liaison voulu : 1=liaison simple, 2=liaison double, etc. Voir le tableau page~\pageref{types.liaisons} pour les codes des liaisons.
-
+
Soit la \verb-<liaison>- est constituée des caractères codant la liaison, à condition que ces caractères soient \emph{entre accolades};
\item \verb-<tikz>- sera passé directement à \TIKZ comme on l'a vu avec les liaisons classiques.
\end{itemize}
@@ -996,7 +1000,7 @@ Il y a quelques contraintes avec cette commande. Pour en pendre conscience, mett
\chemsign{+}
\chemname{\chemfig{H_2O}}{Eau}/
-En fait, au dessous de la ligne de base de chaque molécule (en gris clair sur les exemples de ce manuel), pour écrire le \verb-<nom>-, la commande \idx{\chemname} insère 1.5ex${}+{}$\emph{la plus grande des profondeurs\footnote{En langage \TeX{}, la profondeur est la dimension qui s'étend verticalement sous la ligne de base.} des molécules rencontrées}. La macro \verb-\chemnameinit{<argument>}-\idx*{\chemnameinit} initialise cette plus grande profondeur avec le contenu de l'\verb-<argument>-. Il convient donc :
+En fait, au dessous de la ligne de base de chaque molécule (en gris clair sur les exemples de ce manuel), pour écrire le \verb-<nom>-, la commande \idx{\chemname} insère 1.5ex${}+{}$\emph{la plus grande des profondeurs\footnote{En langage \TeX{}, la profondeur est la dimension qui s'étend verticalement sous la ligne de base.} des molécules rencontrées}. \label{chemnameinit}La macro \verb-\chemnameinit{<argument>}-\idx*{\chemnameinit} initialise cette plus grande profondeur avec le contenu de l'\verb-<argument>-. Il convient donc :
\begin{itemize}
\item d'écrire \verb-\chemnameinit{<plus profonde molécule>}- avant d'impliquer cette commande dans une réaction, sauf si cette réaction commence par la plus profonde molécule;
\item d'écrire \verb-\chemnameinit{}- après avoir écrit tous les noms d'une réaction chimique afin d'éviter que la plus grande profondeur trouvée dans cette réaction n'interfère dans une réaction future.
@@ -1217,7 +1221,7 @@ On va définir une séquence de contrôle \verb-\Me- pour ``méthyl'' de telle s
\section{Décorations}
\subsection{Formule de Lewis}\label{lewis}
-\idx*{representation de Lewis@représentation de Lewis}La macro \idx{\lewis} permet de placer des paires d'électrons, des électrons ou une lacune. On utilise cette syntaxe :
+\idx*{Lewis (représentation)}La macro \idx{\lewis} permet de placer des paires d'électrons, des électrons ou une lacune. On utilise cette syntaxe :
\centerverb|\lewis{<n1><n2>...<ni>,<atome>}|
\smallskip
@@ -1237,10 +1241,12 @@ Ion oxonuim : \chemfig{H-\lewis{5|7,O^+}(-[2]H)-H}*
Toutes les décorations dessinées par l'intermédiaire de \idx{\lewis} ne sont pas comptabilisées dans la boîte englobante\idx*{boite englobante@boîte englobante} de l'atome. Les décorations sont faites en surimpression. On en voit une conséquence dans les deux exemples ci-dessus où les cadre ne semblent ne plus être correctement ajustés au dessin de la molécule qui dépasse légèrement vers le bas. Ceci sera parfois observable dans ce chapitre ``Décorations'' où l'on présente des commandes qui ne modifient pas la boîte englobante.
+\label{Lewis}Il faut noter que la macro \idx{\Lewis} fonctionne de la même façon que la macro \verb-\lewis- mais les décorations seront \emph{prises en compte} dans la boîte englobante.
+
On peut le constater de façon plus évidente en traçant une \verb-\fbox- autour des atomes décorés\idx*{\lewis} :
\exemple{Boîte englobante et macro \string\lewis}*\fboxsep0pt
-\fbox{\lewis{0.2.4.6.,A}}\par\medskip
-\fbox{\lewis{13,B}}*
+\fbox{\lewis{0.2.4.6.,A}}\quad\fbox{\Lewis{0.2.4.6.,A}}\par\medskip
+\fbox{\lewis{13,B}}\quad\fbox{\Lewis{13,B}}*
\label{setlewis}On peut régler plusieurs paramètres à l'aide la macro\idx*\setlewis
\centerverb|\setlewis[<dim1>]{<dim2>}{<dim3>}{<code tikz>}|
@@ -1266,7 +1272,7 @@ et\idx*{\chembelow}
\centerverb|\chembelow[<dim>]{<code>}{<matériel>}|
\smallskip
-placent le \verb-<matériel>- respectivement au dessus et au dessous du \verb-<code>- à une distance verticale \verb-<dim>-, et cela sans changer la \idx*{boite englobante@boîte englobante} du \verb-<code>-. La dimension \verb-<dim>- vaut 1.5pt par défaut.
+placent le \verb-<matériel>- respectivement au dessus et au dessous du \verb-<code>- à une distance verticale \verb-<dim>-, et cela sans changer la boîte englobante\idx*{boite englobante@boîte englobante} du \verb-<code>-. La dimension \verb-<dim>- vaut 1.5pt par défaut.
Ces commandes sont indépendantes de la macro \verb-\chemfig- et peuvent aussi bien être appelées à l'intérieur ou à l'extérieur de son argument.
@@ -1276,6 +1282,8 @@ On peut les utiliser notamment dans les cycles en prenant soin de mettre des acc
Elles sont parfois utiles pour placer des pseudo exposants tenant lieu de charge\idx*{cycle!charge} qui ne changent pas la boîte englobante de l'atome, de façon à ce que les liaisons n'en soient pas trop éloignées :
\exemple{ion oxonium}*\chemfig{H-\chemabove{\lewis{5|7,O}}{\quad\scriptstyle+}(-[2]H)-H}*
+Les commandes \idx{\Chemabove} et \idx{\Chembelow} fonctionnent de la même façon sauf que la boîte englobante \emph{tient compte} du \verb-<matériel>- placé au dessus ou au dessous.
+
\subsection{Réactions chimiques}\idx*{reaction chimique@réaction chimique}
Pour écrire des réactions chimiques, \CF fournit une commande pour les signes et une commande pour les flèches.
@@ -1672,39 +1680,728 @@ Molécule d'eau pivotée de +30\si\degree : \chemfig{[:30]@1H-[::37.775,2]@2O-[:
\namebond12{\footnotesize0.9584\si\angstrom}
\namebond23{\footnotesize0.9584\si\angstrom}
\arclabel{0.5cm}{1}{2}{3}{\footnotesize104.45\si\degree}|
+\newpage
+
+\part{Schémas réactionnels}\label{schemas}
+\idx*{schéma réactionnel|(}Suite à plusieurs demandes d'utilisateurs et étant devenu évident que \CF présentait une faiblesse quant au tracé de schémas réactionnels, cette lacune est désormais comblée. Par conséquent, \CF passe en version 1.0 puisque je considère que les fonctionnalités principales que je souhaitais implémenter sont désormais disponibles.
+
+Je remercie Clemens \textsc{Niederberger} pour l'aide qu'il m'a apportée et les tests qu'il a effectués sur les nouvelles fonctionnalités présentées dans cette partie.
+\section{Généralités}\label{schemestart}
+Un schéma réactionnel doit être contenu entre les commandes ``\idx\schemestart'' et ``\idx\schemestop''. Comme on le constate sur cet exemple, des \idx{informations de débogage} ont été masquées puis rendues visibles pour aider à la compréhension avec la commande ``\idx\schemedebug'' et l'argument ``false'' ou ``true'' :
+\exemple[50]{Exemple 1}/\schemedebug{false}
+\schemestart
+ \chemfig{*6(-=-=-=)}\arrow
+ \chemfig{X=[1]Y}\arrow
+ \chemfig{S>T}
+\schemestop
+\bigskip
+
+\schemedebug{true}
+\schemestart
+ \chemfig{*6(-=-=-=)}\arrow
+ \chemfig{X=[1]Y}\arrow
+ \chemfig{S>T}
+\schemestop/
+
+Quelques remarques :
+\begin{itemize}
+ \item les commandes \idx{\arrow} tracent les flèches;
+ \item tout ce qui se trouve entre deux commande \idx{\arrow} est considéré comme étant un \idx{composé}. Le parti a été pris que tous les réglages possibles, qu'ils concernent les flèches ou les composés, le seront grâce aux arguments de la commande \idx{\arrow}, dont la syntaxe en devient assez complexe;
+ \item les flèches sont tracées horizontalement, ce qui est bien évidemment modifiable;
+ \item les flèches sont sur la ligne imaginaire reliant les centre des boîtes englobantes les composés (les points rouges et bleus sont les points d'attache des flèches). Ce comportement est également modifiable;
+ \item Les informations de débogage, qui sont rendues visibles ou pas avec la commande \idx{\schemedebug} sont :
+ \begin{itemize}
+ \item ce qui se trouve en vert au dessus des boîtes englobantes est le nom attribué par défaut par \CF aux composés et suit la progression "c1", "c2", etc. La numérotation repart à 1 pour un nouveau schéma réactionnel.
+ \item les boîtes englobantes des composés ont été tracées;
+ \item les extrémités des flèches sont matérialisés par des points rouge et les ancres par des points bleu;
+ \end{itemize}
+ \item la distance de bord à bord entre deux composés est définie avec la commande \idx*\setcompoundsep\verb-\setcompoundsep{<dim>}-\label{setcompoundsep} où l'argument est une dimension valide au sens de \TeX{}. Par défaut, et si l'argument est vide, cette dimension vaut 5em;
+ \item enfin, la distance entre les bords des composés et le début et la fin des flèches est défini avec la commande \idx*\setarrowoffset\verb-\setarrowoffset{<dim>}- où l'argument est une dimension valide au sens de \TeX{}. Par défaut, et si l'argument est vide, cette dimension vaut 4pt.\label{setarrowoffset}
+\end{itemize}
+
+\section{Types de flèches}\label{arrow}
+Lorsque la commande \idx{\arrow} est suivie d'un argument optionnel entre accolades (qui n'est donc pas obligatoire), cet argument contient le type de flèche\idx*{flèche!type} :
+\exemple[50]{Types de flèches}|\schemestart A\arrow{->}B\schemestop\par % par défaut
+\schemestart A\arrow{-/>}B \schemestop\par
+\schemestart A\arrow{<-}B \schemestop\par
+\schemestart A\arrow{<->}B \schemestop\par
+\schemestart A\arrow{<=>}B \schemestop\par
+\schemestart A\arrow{<->>}B \schemestop\par
+\schemestart A\arrow{<<->}B \schemestop\par
+\schemestart A\arrow{0}B \schemestop\par
+\schemestart A\arrow{-U>}B \schemestop|
+La flèche ``\verb/-U>/'' n'est pas dessinée de façon complète, un arc de cercle qui lui est tangent en son milieu peut être rajouté avec les arguments optionnels passés à cette flèche, voir page~\pageref{fleche.arg.optionnel}. Voici une flèche ``\verb/-U>/'' avec son arc de cercle : \schemestart A\arrow{-U>[$\scriptstyle x$][$\scriptstyle y$]}B\schemestop
+
+Par souci de concision, par la suite, sauf exemple spécial, des lettres majuscules seront mises au lieu de formules chimiques crées via la commande \idx\chemfig. Il est bien évident que les schémas réactionnels fonctionnent de façon identique avec des lettres ou des dessins de molécules. On peut voir dans la galerie plusieurs exemples où les schémas réactionnels entrent en jeu.
+
+\section{Caractéristiques des flèches}
+Chaque \idx{flèche} est caractérisée par :
+\begin{itemize}
+ \item \idx*{flèche!angle}un angle exprimé en degrés;
+ \item \idx*{flèche!coefficient}un coefficient qui spécifie la longueur de la flèche par multiplication de la valeur de l'espacement entre composés\idx*{composé!espacement} défini par \idx\setcompoundsep;
+ \item \idx*{flèche!style}un style qui contient des instructions \TIKZ qui vont permettre de personnaliser la couleur, l'épaisseur de la flèche ou un autre attribut graphique.
+\end{itemize}
+
+On peut définir ces caractéristiques à l'aide de la commande \idx\setarrowdefault\verb-{angle,coeff,style}-\label{setarrowdefault}, et ce, à \emph{l'extérieur} d'un schéma réactionnel. Si l'angle est vide, il prend la valeur 0 et si le coeff est est vide, il vaut 1. Les caractéristiques ainsi définies sont valables pour tout le reste du document, à partir du moment où l'instruction est rencontrée. Pour revenir aux valeurs par défaut, il suffit d'entrer un argument vide.
+\exemple[50]{Définition de valeurs par défaut}/\schemestart A\arrow B\arrow C\schemestop
+
+\setarrowdefault{15,1.5,red,thick}
+\schemestart A\arrow B\arrow C\schemestop
+
+\setarrowdefault{,2.5,dashed}
+\schemestart A\arrow B\arrow C\schemestop
+
+\setarrowdefault{}
+\schemestart A\arrow B\arrow C\schemestop/
+
+Pour modifier localement une, ou toutes ces valeurs par défaut, la commande \idx{\schemestart} admet un argument optionnel de la forme \verb-[angle,coeff,style]- qui change les caractéristiques par défaut à l'intérieur du schéma réactionnel concerné :
+\exemple[50]{Argument optionnel}/\setarrowdefault{5,2.5,blue}
+\schemestart A\arrow B\arrow C\schemestop
+
+\schemestart[0] A\arrow B\arrow C\schemestop
+
+\schemestart[0,1] A\arrow B\arrow C\schemestop
+
+\schemestart[0,1,thick] A\arrow B\arrow C\schemestop
+
+\schemestart[0,1,black] A\arrow B\arrow C\schemestop/
+Pour le style\idx*{flèche!style}, la règle est la suivante : le style spécifié dans l'argument entre crochets s'applique \emph{après} le style par défaut, sans l'écraser ! C'est pour cette raison que seul l'attribut de couleur ``black'' parvient à écraser celui par défaut qui est ``blue''.
+
+Enfin, la commande \idx{\arrow} admet un argument optionnel entre crochets de la forme \verb-[angle,coeff,style]- pour modifier les caractéristiques de la flèche concernée. Pour le style, comme précédemment, celui est-ci est appliqué \emph{après} le style par défaut et l'éventuel style spécifié dans l'argument optionnel de la commande \verb-\schemestart-, le tout sans écrasement.
+\exemple[50]{Caractéristiques des flèches}/\schemestart
+ A\arrow[45]B\arrow[-20,2]C
+\schemestop
+\bigskip
+
+\schemestart
+ A\arrow[90,,thick]B\arrow[,2]C
+ \arrow[-45,,dashed,red]D
+\schemestop/
+
+\section{Nom des composés}
+\idx*{composé!nom}On peut passer outre le mécanisme automatique qui nomme les composés ``c1'', ``c2'', etc. Pour cela, la commande \idx{\arrow} admet un argument entre parenthèses qui doit suivre immédiatement la commande. Cet argument est de la forme : \verb/(n1--n2)/. Il nomme ``\verb-n1-'' le \idx{composé} se trouvant à l'origine de la flèche et ``\verb-n2-'' celui se trouvant à sa fin. N'importe quelle chaîne de caractères alphanumériques peut être utilisée. La numérotation des noms "c<n>" continue en interne ce qui signifie que si un \idx{composé} porte un autre nom que celui par défaut, cela ne change pas le nom par défaut des composés suivants.
+
+Les noms sont facultatifs et l'argument peut aussi bien être \verb/(n1--)/ que \verb/(--n2)/.
+
+\exemple[50]{Nom des composés}/\schemedebug{true}
+\schemestart
+ A\arrow(aa--bb)B\arrow(--cc)C\arrow(--dd)D\arrow E
+\schemestop
+\bigskip
+
+\schemestart
+ A\arrow(aa--)B\arrow(bb--)C\arrow(cc--dd)D\arrow E
+\schemestop/
+On le voit, les deux méthodes sont équivalentes et l'on peut donc nommer un \idx{composé} avec la flèche qui le précède ou avec la flèche qui le suit. Par contre lorsqu'un \idx{composé} est entouré de deux flèches spécifiant son nom, le premier nom est ignoré et un warning est émis :
+\exemple[50]{Noms surabondants}/\schemedebug{true}
+\schemestart
+ A\arrow(--foo)B\arrow(bar--)C
+\schemestop/
+Ici, le \idx{composé} ``B'' est nommé ``foo'' par la flèche qui lui arrive dessus et ``bar'' par celle qui en part. \CF émet donc le warning suivant annonçant que le nom "foo" sera ignoré :
+
+\hfill\verb-Package chemfig Warning: two names for the same node, first name "foo" ignored-\hfill\null
+
+\section{Ancres}
+\idx*{composé!ancre}Comme on l'a vu, les flèches sont sur la ligne reliant les centre de boites englobant les composés. On peut spécifier un ancre autre que celui par défaut (qui, au sens de \idx*{tikz}\TIKZ, s'appelle ``center''). On utilise pour cela l'argument entre parenthèses :
+
+\hfill\verb/(n1.a1--n2.a2)/\hfill\null
+
+où l'ancre ''\verb-a1-`` ou ''\verb-a2-`` peut être : north west, north, north east, west, center, east, mid west, mid, mid east, base west, base, base east, south west, south, south east, text, ou n'importe quel angle. Voici un exemple du manuel de \TIKZ où les ancres sont placés sur la boîte englobante :
+\exemple*{Ancres de tikz}|\Huge
+\begin{tikzpicture}[baseline]
+\node[anchor=base west,name=x,draw,inner sep=25pt] {\color{lightgray}Rectangle\vrule width 1pt height 2cm};
+\foreach \anchor/\placement in
+{north west/above left, north/above, north east/above right,west/left, center/above, east/right,
+mid west/left, mid/above, mid east/right,base west/left, base/below, base east/right,
+south west/below left, south/below, south east/below right,text/below,10/right,45/above,150/left}
+\draw[shift=(x.\anchor)] plot[mark=x] coordinates{(0,0)}
+node[\placement,inner sep=0pt,outer sep=2pt] {\scriptsize\texttt{(\anchor)}};
+\end{tikzpicture}|
+Comme les noms, les ancres de départ et de fin sont indépendants et facultatifs.
+
+Voici un exemple où l'alignement\idx*{schéma réactionnel!alignement} par défaut n'est pas bon car les deux ``A'' ne sont pas alignés verticalement. Les \idx{informations de débogage} ont été rendues visibles pour constater que les ancres ``center'' par défaut ne conviennent pas :
+\exemple[50]{Problèmes d'alignement}/\schemedebug{true}
+\schemestart
+ \chemfig{A*5(-----)}
+ \arrow
+ \chemfig{A*5(---(-)--)}
+\schemestop/
+Pour que l'alignement\idx*{schéma réactionnel!alignement} soit correct, on va faire partir/arriver la flèche soit des ancres ``base east''/``base west'', soit des ancres ``mid east''/``mid west'' :
+\exemple[50]{Problèmes d'alignement}/\schemedebug{true}
+\schemestart
+ \chemfig{A*5(-----)}
+ \arrow(.base east--.base west)
+ \chemfig{A*5(---(-)--)}
+\schemestop
+\bigskip
+
+\schemestart
+ \chemfig{A*5(-----)}
+ \arrow(foo.mid east--bar.mid west)
+ \chemfig{A*5(---(-)--)}
+\schemestop/
+
+\idx*{composé!ancre}Un dernier ancre reste à spécifier, c'est celui du premier \idx{composé} par rapport à la \idx{ligne de base} du texte qui le précède, il s'agit du point vert de gauche sur le schéma qui suit :
+\exemple[50]{Ancre initial}/\schemedebug{true}
+Texte qui précède :
+\schemestart
+ \chemfig{A*5(-----)}\arrow A
+\schemestop/
+
+L'emplacement de cet ancre sur la boîte contenant le premier \idx{composé} vaut par défaut ``text''. Il est réglable avec le second argument optionnel de la commande \idx{\schemestart} :
+\exemple[50]{Réglage de l'ancre initial}/\schemedebug{true}
+Texte qui précède :
+\schemestart[][south]
+ \chemfig{A*5(-----)}\arrow A
+\schemestop
+\bigskip
+
+Texte qui précède :
+\schemestart[][north west]
+ \chemfig{A*5(-----)}\arrow A
+\schemestop
+\bigskip
+
+Texte qui précède :
+\schemestart[][west]
+ \chemfig{A*5(-----)}\arrow A
+\schemestop/
+
+\section{Style des composés}
+\idx*{composé!style}Toujours par l'intermédiaire de l'argument entre parenthèses de la commande \idx{\arrow}, on peut spécifier avec des instructions de \TIKZ le style ``\verb-s-'' de la boîte englobante du \idx{composé} de départ ou de celui d'arrivée. La syntaxe complète de la commande \idx{\arrow} est donc la suivante, où chaque spécification est optionnelle et peut être omise :
+
+\hfill\verb/\arrow(n1.a1[s1]--n2.a2[s2]){type flèche}[angle,coeff,style flèche]/\hfill\null
+
+Tout comme les noms, si un style est spécifié à un composé par la flèche qui lui arrive dessus et par celle qui en part, le premier style sera ignoré avec un warning.
+
+\exemple[60]{Style des composés}/\schemestart
+ A
+ \arrow([red]--[fill=blue,semitransparent,text opacity=1,
+ inner sep=10pt,rounded corners=2mm])
+ B
+\schemestop
+\bigskip
+
+\schemestart
+ A\arrow(--foo[yshift=5mm])B
+\schemestop/
+\label{setcompoundstyle}La macro \idx\setcompoundstyle\verb-{<code tikz>}- permet de définir de façon générale le style des composés\idx*{composé!style} affichés par la suite. Il faut bien évidemment entrer un argument vide pour qu'aucun style ne soit appliqué, ce qui est le cas par défaut.
+
+Ici, nous allons définir un style en forme de boites aux coins arrondis, dont le fond sera semi transparent :
+\exemple[50]{Styles globaux}/\setcompoundstyle{draw,line width=0.8pt,semitransparent,
+text opacity=1,inner sep=8pt,rounded corners=1mm}
+\schemestart
+ A\arrow([fill=red]--[fill=blue])[90]
+ B\arrow(--[fill=gray])
+ C\arrow(--[fill=green])[-90]
+ D\arrow(--[draw=none])[-180]
+\schemestop/
+
+\section{Embranchements}
+\idx*{schéma réactionnel!embranchements}Jusqu'à présent, on n'a pu tracer que des schémas réactionnels linéaires. On peut également faire des embranchements et c'est là que le nom des composés va prendre toute son importance. Dans l'argument entre parenthèses de la commande \idx{\arrow}, si un nom est précédé de \og\verb-@-\fg, cela signifie que ce \idx{composé} existe déjà. Plusieurs cas de figure peuvent se présenter :
+\begin{itemize}
+ \item \verb/(@n1--n2)/ : la flèche sera tracée depuis le composé existant \og\verb-n1-\fg{} et le schéma continuera à la suite de cette flèche, créant donc un embranchement;
+ \item \verb/(@n1--@n2)/ : la flèche est tracée entre deux composés existants, qu'ils soient déjà définis ou qu'ils soient définis plus tard dans le schéma réactionnel : cette syntaxe peut donc se placer \emph{n'importe où} dans le code du schéma réactionnel;
+ \item \verb/(n1--@n2)/ : cette syntaxe n'est pas admise;
+\end{itemize}
+
+Voici un exemple où 3 embranchements sont créés, l'un partant de ``B'', l'autre de ``D'' et le dernier de ``X''. À la fin, une flèche est tracée entre 2 composés existants \og XX\fg{} et \og D\fg{} :
+\exemple[50]{Embranchements}/\schemestart
+ A\arrow(aa--bb)B\arrow(--cc)C\arrow D
+ \arrow(@bb--xx1)[-90]X\arrow[-90]Y% 1er embranchement
+ \arrow(@c4--)[-90]Z\arrow W% 2è embranchement
+ \arrow(@xx1--xx2)[-45]XX% 3è embranchement
+ \arrow(@xx2--@c4)% flèche XX à D
+\schemestop/
+
+On pourrait vouloir que ``Y'' et ``XX'' soient sur une même horizontale. Pour cela, on va tracer une liaison invisible horizontale de ``Y'' à ``XX'' et finir le schéma par une flèche entre les deux composés existants ``XX'' et ``D'' :
+\exemple[50]{Embranchements}/\schemestart
+ A\arrow(aa--bb)B\arrow(--cc)C\arrow D
+ \arrow(@bb--xx1)[-90]X\arrow[-90]Y\arrow(--xx2){0}XX
+ \arrow(@c4--)[-90]Z\arrow W
+ \arrow(@xx1--@xx2)% flèche de X à XX
+ \arrow(@xx2--@c4)% flèche XX à D
+\schemestop/
+
+\section{Sous schéma}\label{subscheme}
+\idx*{schéma réactionnel!sous schéma}On peut placer une partie d'un schéma réactionnel dans une boîte englobante unique, considérée par \CF comme un \idx{composé}. La commande \idx{\subscheme} dont l'argument obligatoire contient le sous schéma entre accolades permet de grouper un sous schéma comme un tout et lorsque \idx{\subscheme} se trouve après une flèche, la commande enveloppe ce sous schéma dans un \idx{composé} portant le nom ``c<n+1>'' :
+\exemple[50]{Sous schéma}/\schemedebug{true}
+\schemestart
+ A\arrow
+ \subscheme{B\arrow[-90,2]C}
+ \arrow
+ D
+\schemestop/
+Bien que ça ne soit pas clair car les noms se superposent, la boîte contenant le sous schéma porte le nom ``c2'' et la numérotation se poursuit à l'intérieur du sous schéma ``c3'' pour B, ``c4'' pour C. Comme le premier \idx{composé} du sous schéma est ``B'', la ligne de base du sous schéma est celle de ``B''. On peut le mettre en évidence en précisant les ancres\idx*{schéma réactionnel!sous schéma!ancre} :
+\exemple[50]{Sous schéma}/\schemedebug{true}
+\schemestart
+ A\arrow(--.mid west)
+ \subscheme{B\arrow[-90,2]C}
+ \arrow
+ D
+\schemestop/
+Il faut noter que la commande \idx\subscheme\verb-{<scheme>}- n'étant rien d'autre qu'un raccourci pratique pour \idx\schemestart\verb-<scheme>-\idx\schemestop, elle admet les mêmes arguments optionnels que \idx\schemestart.
+
+\idx*{schéma réactionnel!sous schéma!délimiteur|(}\label{chemleft}\CF fournit la paire de commandes \idx{\chemleft} et \idx{\chemright} qui permettent de placer des délimiteurs extensibles de part et d'autre d'un matériel. Ces commandes doivent être suivies de délimiteurs, tout comme on en mettrait à la suite des primitives de \TeX{} \verb-\left- et \verb-\right- :
+\centerverb/\chemleft<car1><matériel>\chemright<car2>/
+où \verb-<car1>- et \verb-<car2>- sont ``('' et ``)'' ou ``['' et ``]'' ou tout autre délimiteur extensible accepté par les commandes \verb-\left- et \verb-\right-.
+\exemple{Les macros \string\chemleft\ et \string\chemright}/\chemleft\lfloor\chemfig{A-[1]B}\chemright)
+
+\chemleft\{\chemfig{A-[1,1.25]B-[6,1.25]C}\chemright|
+
+\chemleft[\chemfig{H-[1]O-[7]H}\chemright]/
+Voici le code du schéma réactionnel vu précédemment où l'on utilise \idx{\chemleft} et \idx{\chemright} :
+\exemple{Schéma réactionnel avec \string\chemleft\ et \string\chemright}/\schemestart
+ A\arrow
+ \chemleft[\subscheme{B\arrow[-90,2]C}\chemright]
+ \arrow
+ D
+\schemestop/
+\label{chemup}Dans le même ordre d'idée, les macros \idx{\chemup} et \idx{\chemdown} fonctionnent de la même façon sauf que les délimiteurs extensibles sont positionnés au dessus et au dessous du matériel :
+\centerverb/\chemup<car1><matériel>\chemdown<car2>/
+Voici un exemple :
+\exemple{Les macros \string\chemup\ et \string\chemdown}/\schemestart[-90]
+X\arrow
+\chemup\{\chemfig{A-[1]B-[7]C}\chemdown\}
+\arrow Y
+\schemestop
+\qquad
+\schemestart[-90]
+X\arrow
+\chemup[\chemfig{A-[1]B-[7]C}\chemdown]
+\arrow Y
+\schemestop/
+
+Avec les styles des composés, il est possible également possible de délimiter un composé quelconque (et donc un sous schéma) par des délimiteurs extensibles (parenthèses, crochets, accolades), ceci après avoir chargé la librairie de \TIKZ \og matrix\fg{} en mettant dans le préambule du document :
+
+\hfill\verb-\usetikzlibrary{matrix}-\hfill\null
+
+Comme les commandes \idx{\chemleft}, \idx{\chemright}, \idx{\chemup} et \idx{\chemdown} sont disponibles, l'extension \CF ne procède \emph{pas} à ce chargement, il appartient donc à l'utilisateur de le faire s'il souhaite avoir accès à ces délimiteurs.
+
+Voici le sous schéma précédent délimité par des crochets :
+\exemple[50]{les délimiteurs de la librairie ``matrix''}/\schemestart
+ A\arrow(--[left delimiter={[}, right delimiter={]}])
+ \subscheme{B\arrow[-90,2]C}
+ \arrow
+ D
+\schemestop/
+Les délimiteurs étant tracés en dehors de la boîte englobante, il est souhaitable ici de raccourcir un peu les flèches arrivant et partant de ces délimiteurs :
+\exemple[50]{Sous schéma}/\schemestart
+ A\arrow(--[left delimiter={[},
+ right delimiter={]}])[,,shorten >=6pt]
+ \subscheme{B\arrow[-90,2]C}
+ \arrow[,,shorten <=6pt]
+ D
+\schemestop/\idx*{schéma réactionnel!sous schéma!délimiteur|)}
+
+Les sous schémas doivent être utilisés à bon escient et peuvent parfois donner des résultats non désirés. Voici un exemple où l'on se sert d'un sous schéma pour aligner horizontalement 3 composés :
+\exemple[50]{Sous schéma}/\schemedebug{true}
+\schemestart
+ A
+ \arrow{0}[-90]
+ \subscheme{%
+ tagada\arrow{}
+ tsoin\arrow{}
+ fin}
+ \arrow(xx--yy){}E
+ \arrow(@c1--@c3){}
+ \arrow(@c1--@c5){}
+ \arrow(@c1--@c4){}
+\schemestop/
+On constate que le centre du sous schéma est sur la même verticale que le centre du composé "A" puisqu'on a tracé une flèche invisible\idx*{flèche!invisible} avec un angle de $-90$. Par contre, la flèche entre deux composés existants \og A\fg{} et \og tsoin\fg{} n'est \emph{pas} verticale car \og tsoin\fg{} ne se trouve pas sous le centre du sous-schéma puisque "tagada" est plus large que "fin". Pour rendre cette flèche verticale, on ne peut pas s'en sortir avec un sous schéma, sauf à spécifier un angle trouvé en tâtonnant pour l'ancre d'arrivée de la flèche invisible.
+
+Il sera beaucoup plus simple de procéder sans sous-schéma et en utilisant un embranchement : tracer une flèche \emph{visible} entre \og A\fg{} et \og tsoin\fg{}, puis partir de \og tsoin\fg{} pour tracer de part et d'autre des flèches horizontales, en créant un embranchement pour les flèches vers la droite.
+\exemple[50]{Sous schéma}/\schemedebug{true}
+\schemestart
+ A
+ \arrow(--tsoin){->}[-90]
+ tsoin
+ \arrow{<-}[180]
+ tagada
+ \arrow(@tsoin--fin){}
+ fin
+ \arrow{}
+ E
+ \arrow(@c1--@c3){}
+ \arrow(@c1--@fin){}
+\schemestop/
+
+\section{Arguments optionnels des flèches}\label{fleche.arg.optionnel}
+\idx*{flèche!argument optionnel}À l'intérieur de l'argument entre accolades de la commande \idx\arrow, le nom des flèches peut être suivi d'arguments optionnels placés entre crochets. Voici ces arguments optionnels et leur signification pour les flèches définies par \CF :
+\begin{itemize}
+ \item les flèches ``\verb|->|'', ``\verb|<-|'', ``\verb|<->|'', ``\verb|<=>|'', ``\verb|<<->|'',``\verb|<->>|'', ``\verb|-/>|'' ont trois arguments optionnels :
+ \begin{itemize}
+ \item le premier contient le ``label'' qui sera placé au dessus de la flèche\idx*{flèche!label};
+ \item le second contient le ``label'' qui sera placé sous la flèche. Ces deux labels sont orientés selon le même angle que la flèche. On peut régler le décalage perpendiculaire\idx*{flèche!label!décalage} entre la flèche et l'ancre\idx*{flèche!label!ancre} des labels avec la commande \idx*\setarrowlabelsep\verb-\setarrowlabelsep{<dim>}-\label{setarrowlabelsep}, où l'argument est une dimension valide au sens de \TeX{}. Par défaut, ou si l'argument est vide, cette distance vaut 3pt. Les labels contenus dans les deux arguments optionnels ne \emph{sont pas} composés en mode mathématique.
+ \item le troisième est une dimension qui correspond au décalage dans la direction perpendiculaire au sens de la flèche\idx*{flèche!décalage} que l'on veut lui faire subir : cette dimension sera positive pour un décalage de la flèche (et ses éventuels labels) vers le haut et négative si l'on souhaite un décalage vers le bas.
+ \end{itemize}
+ \item la flèche ``\verb|-U>|'' dispose de 5 arguments optionnels :
+ \begin{itemize}
+ \item les trois premiers sont identiques à ceux des autres types de flèches;
+ \item le quatrième est le coefficient (qui vaut 0.333 par défaut) qui multiplie la longueur de la flèche pour obtenir le rayon de l'arc de cercle;
+ \item le cinquième est le demi angle partant du centre de l'arc de cercle tracé, il vaut 60 degrés par défaut.
+ \end{itemize}
+ \item la flèche invisible\idx*{flèche!invisible} ``\verb-0-'' admet 2 arguments optionnels qui sont du même type que les deux premiers vus au dessus;
+\end{itemize}
+\exemple[50]{Arguments optionnels des flèches}/\schemedebug{false}
+\schemestart A\arrow{->[sur][sous]}B \schemestop
+\qquad
+\schemestart A\arrow{->[sur][sous][4pt]}B \schemestop
+\qquad
+\schemestart A\arrow{->[sur][sous][-4pt]}B \schemestop
+\medskip
+
+\schemestart A\arrow{<=>[sur][sous]}[30,1.5]B \schemestop
+\medskip
+
+\schemestart[-20]
+ A\arrow{->}B\arrow{->[][][3pt]}C\arrow{->[][][-3pt]}D
+\schemestop/
+Un problème survient lorsque les flèches sont verticales :
+\exemple[50]{Flèches verticales}/\schemestart
+ A\arrow{->[sur][sous]}[-90]B
+\schemestop/
+Par souci de lisibilité, il serait souhaitable que les \idx*{flèche!label}labels placés au dessus et au dessous soient horizontaux. On peut choisir l'angle selon lequel les labels sont affichés\idx*{flèche!label!angle}, la valeur par défaut étant l'angle de la flèche. Pour spécifier un autre angle, il suffit de placer au début des arguments optionnels \verb-*{<angle>}- :
+\exemple[55]{Choix des angles}/\schemedebug{true}
+\schemestart A\arrow{->[*{0}sur][*{0}sous]}[90]B\schemestop
+\qquad
+\schemestart A\arrow{->[*{0}sur][*{0}sous]}[45]B\schemestop
+\qquad
+\schemestart A\arrow{->[*{0}sur][*{0}sous]}[-45]B\schemestop
+\qquad
+\schemestart A\arrow{->[*{0}sur][*{0}sous]}[-90]B\schemestop/
+L'ancre par défaut où est attaché chaque label provoque parfois des affichages indésirables :
+\exemple[50]{Ancres}/\schemedebug{true}
+\schemestart
+ A\arrow{->[*{0}au-dessus][*{0}au-dessous]}[45,2]B
+\schemestop/
+On peut spécifier également l'ancre d'attache\idx*{flèche!label!ancre} pour écraser celui choisi par \CF par défaut. Il suffit d'utiliser la syntaxe suivante : \verb-*{<angle>.<ancre>}-.
+\exemple[50]{Ancres}/\schemedebug{true}
+\schemestart
+ A\arrow{->[*{0.0}au-dessus][*{0.180}au-dessous]}[45,2]B
+\schemestop
+\qquad
+\schemestart
+ A\arrow{->[*{0.south east}au-dessus]%
+ [*{0.north west}au-dessous]}[45,2]B
+\schemestop/
+
+Le cas particulier à envisager est la flèche ``\verb/-U>/''. Si l'un des deux labels contenus dans les deux premiers arguments optionnels est présent, l'arc de cercle correspondant est tracé :
+\exemple[50]{La flèche \texttt{-U>}}/\schemestart A\arrow{-U>[123][456]}B\schemestop
+\qquad
+\schemestart A\arrow{-U>[123]}[30]B\schemestop
+\qquad
+\schemestart A\arrow{-U>[][456]}[-30]B\schemestop/
+
+Le quatrième et cinquième argument optionnel changent les dimensions de l'arc de cercle, respectivement le coefficient qui multiplie la longueur de la flèche pour obtenir le rayon et l'angle correspondant au demi arc de cercle :
+\exemple[50]{La flèche \texttt{-U>}}/\schemestart A\arrow{-U>[123][456][][0.25]}B\schemestop
+\qquad
+\schemestart A\arrow{-U>[123][456][][][90]}B\schemestop
+\qquad
+\schemestart A\arrow{-U>[123][456][][1][45]}B\schemestop/
+En mettant un rayon et un angle négatif, l'arc de cercle se situe sous la flèche :
+\exemple[50]{La flèche \texttt{-U>}}/\schemestart
+ A\arrow{-U>[123][456][][-0.333][-60]}B
+\schemestop/
+Les deux premiers arguments disposent des mêmes fonctionnalités concernant les angles d'affichage et les ancres paramétrables que ceux des autres flèches :
+\exemple[50]{La flèche \texttt{-U>}}/\schemestart
+ A\arrow{-U>[123][456]}[-90]B
+\schemestop
+\qquad
+\schemestart
+ A\arrow{-U>[*{0.180}123][*{0.180}456]}[-90]B
+\schemestop/
+
+\section{Créer ses propres flèches}\label{definearrow}
+Cette section, assez technique et demandant des connaissances sur \TIKZ, n'intéressera que les utilisateurs confirmés ayant besoin de définir leur propres flèches.
+
+La commande \idx{\definearrow} permet de construire des flèches personnalisées. La syntaxe de cette commande est la suivante :
-\section{Liste des commandes}
+\hfill\verb-\definearrow{<nombre>}{<nom flèche>}{<code>}-\hfill\null
+
+où \verb-<nombre>- est le nombre d'arguments optionnels auxquels on fera référence dans le \verb-<code>- avec la syntaxe habituelle \verb-#1-, \verb-#2-, etc. On ne peut pas définir de valeur par défaut pour ces arguments optionnels, et s'ils sont absents lorsque l'utilisateur utilise la macro \verb-\arrow-, ils seront vides.
+
+Avant d'aller plus loin, examinons les macros disponibles en interne lors du tracé des flèches. Comme ces macros ont le caractère \verb-@- dans leur nom, on ne peut y accéder qu'entre les commandes \idx{\makeatletter} et \idx{\makeatother}.
+\begin{itemize}
+ \item \idx{\CF@arrow@start@name} et \idx{\CF@arrow@end@name} contiennent les noms des composés (qui sont des nœuds pour \TIKZ) entre lesquels doit être tracée la flèche;
+ \item \idx{\CF@arrow@start@node} et \idx{\CF@arrow@end@node} contiennent les noms des nœuds où seront placés les extrémités des flèches. À la suite de ces noms viennent s'ajouter, s'ils ne sont pas vides, les ancres spécifiés par l'utilisateur dans l'argument entre parenthèses de la commande \idx\arrow;
+ \item \idx{\CF@arrow@current@style} et \idx{\CF@arrow@current@angle} contiennent le style et l'angle de la flèche devant être tracée\idx*{flèche!angle}\idx*{flèche!style};
+ \item \idx{\CF@arrow@shift@nodes}\verb-{<dim>}- décale les nœuds ``\idx{\CF@arrow@start@node}'' et ``\idx{\CF@arrow@end@node}'' de la dimension contenue dans son argument et ce, dans la direction perpendiculaire à la flèche\idx*{flèche!décalage};
+ \item \idx{\CF@arrow@display@label}\verb/{#1}{#2}{#3}{#4}{#5}{#6}{#7}{#8}/ est la plus complexe et se charge de placer les labels\idx*{flèche!label} avec les arguments suivants :
+ \begin{itemize}
+ \item \verb-#1- et \verb-#5- sont les labels a écrire;
+ \item \verb-#2- et \verb-#6- sont des réels compris entre 0 et 1 spécifiant à quel endroit de la flèche ces labels doivent être écrits, 0 étant le début et 1 étant la fin,, le tout étant supposé que la flèche est \emph{rectiligne};
+ \item \verb-#3- et \verb-#7- sont les caractères ``+'' ou ``-'', ``+'' affichant le label au dessus et ``-'' l'affichant au dessous
+ \item \verb-#4- et \verb-#8- sont les nom des nœuds correspondant au début et à la fin de la flèche.
+ \end{itemize}
+ \item les extrémités de flèches\idx*{flèche!extrémité} employées sont ``\verb-CF@full-''\footnote{cette extrémité ressemble à la flèche définie dans \TIKZ : \texttt{stealth}.} pour une flèche complète et ``\verb-CF@half-'' pour la demi flèche supérieure.
+\end{itemize}
+
+\subsection{Une première flèche}
+Pour créer un exemple, mettons que l'on veuille construire une flèche avec un disque en son milieu que l'on va appeler ``\verb/-.>/''. Décidons qu'elle admettra 4 arguments optionnels. Comme pour les flèches déjà définies, le premier et le second seront les labels à mettre au dessus et au dessous et le troisième sera le décalage de la flèche dans le sens perpendiculaire à sa direction. Enfin, le 4\ieme{} argument sera la taille du point que l'on prendra égale à 2pt si le 4\ieme{} argument est absent.
+
+Nous allons d'abord écrire \idx*\definearrow\verb/\definearrow{4}{-.>}/ pour déclarer que la flèche aura 4 arguments optionnels et s'appellera \verb/-.>/. Tout d'abord, il faut modifier les positions des nœuds entre lesquels doit être tracée la flèche pour tenir compte du décalage contenu dans le 3\ieme{} argument. Ceci est réalisé par la macro \idx{\CF@arrow@shift@nodes}, et il suffit donc de commencer le code de la flèche par : \idx{\CF@arrow@shift@nodes}\verb-{#3}%-. Ensuite, il faut tracer la flèche elle même et en profiter pour poser un nœud au milieu du segment que nous appelons "\verb-mid@point-", puis tracer un cercle dont le centre est ce dernier nœud. Tout ceci est fait par le code \idx*{tikz}\TIKZ suivant :
+
+{\hskip2em\verb-\edef\pt@radius{\ifx\@empty#4\@empty 2pt\else #4\fi}% rayon du point-\par\parskip0pt
+\hskip2em\verb/\expandafter\draw\expandafter[\CF@arrow@current@style,-CF@full]/\par
+\hskip4em\verb/(\CF@arrow@start@node)--(\CF@arrow@end@node)coordinate[midway](mid@point);/\par
+\hskip2em\verb-\filldraw(mid@point)circle(\pt@radius);%-}
+
+Il ne nous reste plus qu'à placer les labels\idx*{flèche!label} s'ils existent avec la ligne suivante :
+
+\hskip2em\verb/\CF@arrow@display@label{#1}{0.5}{+}{\CF@arrow@start@node}{#2}{0.5}{-}{\CF@arrow@end@node}/
+
+Voici notre flèche achevée :
+\exemple*{Flèche ``-.>''}/\makeatletter
+\definearrow4{-.>}{%
+ \edef\pt@radius{\ifx\@empty#4\@empty 2pt\else #4\fi}% rayon du point
+ \CF@arrow@shift@nodes{#3}%
+ \expandafter\draw\expandafter[\CF@arrow@current@style,-CF@full](\CF@arrow@start@node)--(\CF@arrow@end@node)
+ coordinate[midway](mid@point);
+ \filldraw(mid@point)circle(\pt@radius);%
+ \CF@arrow@display@label{#1}{0.5}{+}{\CF@arrow@start@node}{#2}{0.5}{-}{\CF@arrow@end@node}
+ }
+\makeatother
+\schemestart
+A \arrow{-.>} B \arrow{-.>[sur][sous][][1pt]} C \arrow{-.>[][sous]}[30] D \arrow{-.>[sur][][5pt][1.5pt]} E
+\schemestop/
+
+\subsection{Une flèche courbe}
+Pourquoi ne pas maintenant créer une flèche courbe ? Pour rendre les choses simples, mettons qu'elle n'aura qu'un seul argument optionnel contenant le code \TIKZ qui définira le (ou les) point de contrôle, et si cet argument est vide, une flèche du type ``\verb/->/'' sera tracée.
+
+Si l'argument \verb-#1- n'est pas vide, ce qui nous intéresse ne sont pas \idx{\CF@arrow@start@node} et \idx{\CF@arrow@end@node} qui contiennent les noms des nœuds où seront placés les extrémités des flèches parce que l'emplacement des ces nœuds est déjà déterminés par les ancres\idx*{flèche!ancre} qui sont calculés pour des flèches \emph{rectilignes} ! Nous allons plutôt prendre \idx{\CF@arrow@start@name} et \idx{\CF@arrow@end@name} qui contiennent les noms des composés (qui sont des nœuds pour \TIKZ) entre lesquels doit être tracée la flèche. Voici le code \TIKZ qui va tracer la ligne courbe entre ces deux composés :
+
+{\verb/\draw[shorten <=\CF@arrow@offset,shorten >=\CF@arrow@offset,\CF@arrow@current@style,-CF@full,/\par\parskip0pt
+\verb/(\CF@arrow@start@name).. controls #1 ..(\CF@arrow@end@name);%/}
+
+On doit rajouter le code \TIKZ qui permet de raccourcir la flèche tracée de la valeur \idx{\CF@arrow@offset} définie par \idx{\setarrowoffset} puisqu'on ne part pas des nœuds correspondant aux flèches rectilignes \idx{\CF@arrow@start@node} et \idx{\CF@arrow@end@node}. Il faudra donc rajouter au début de \idx{\CF@arrow@current@style} le code suivant\idx*{\CF@arrow@offset}\idx*{\CF@arrow@offset} :
+\centerverb/shorten <=\CF@arrow@offset, shorten >=\CF@arrow@offset/
+c'est ce que font les deux lignes qui suivent le \verb-\else-.
+
+Voici donc notre flèche :
+\exemple*{Flèche courbe}/\makeatletter
+\definearrow1{s>}{%
+\ifx\@empty#1\@empty
+ \expandafter\draw\expandafter[\CF@arrow@current@style,-CF@full](\CF@arrow@start@node)--(\CF@arrow@end@node);%
+\else
+ \def\curvedarrow@style{shorten <=\CF@arrow@offset,shorten >=\CF@arrow@offset,}%
+ \CF@expadd@tocs\curvedarrow@style\CF@arrow@current@style
+ \expandafter\draw\expandafter[\curvedarrow@style,-CF@full](\CF@arrow@start@name)..controls#1..(\CF@arrow@end@name);
+\fi
+}
+\makeatother
+\schemestart
+A\arrow{s>}
+B\arrow{s>[+(0.5cm,0.5cm)]}
+C\arrow{s>[+(45:1cm)]}
+D\arrow(.60--.120){s>[+(60:1cm) and +(-120:1cm)]}
+E\arrow{s>[+(45:1) and +(-135:1)]}
+F\arrow{s>[+(-30:1) and +(150:1)]}[,1.5]
+G\arrow(.90--.90){s>[+(60:1)and+(120:1)]}[,2]
+H
+\schemestop
+
+\schemestart
+A\arrow(.90--.180){s>[+(90:0.8) and +(180:0.8)]}[45]B
+\arrow(.0--.90){s>[+(0:0.8) and +(90:0.8)]}[-45]C
+\arrow(.-90--.0){s>[+(-90:0.8) and +(0:0.8)]}[-135]D
+\arrow(.180--.-90){s>[+(180:0.8) and +(-90:0.8)]}[135]
+\schemestop/
+
+\section{La commande \protect\texttt{\textbackslash merge}}
+La commande \idx{\merge} permet de tracer des flèches qui partent de plusieurs composés existants puis qui se rejoignent pour continuer le schéma réactionnel.
+
+Immédiatement après la commande \idx{\merge}, il faut spécifier dans quelle direction va se faire la progression. Pour cela, on utilise un des 4 caractères de direction : ``\verb->-'' (qui est celui par défaut si le caractère est absent), ``\verb-<-'', ``\verb-^-'' et ``\verb-v-''.
+
+La syntaxe devient ensuite :
+
+\hfill\verb/\merge{dir}(n1.a1)(n2.a2)(...)(ni.ai)--(n.a[s])/\hfill\null
+
+Où les noms ``\verb-ni-'' avant le double tiret sont ceux que des composés déjà existant que l'on veut joindre. On peut également préciser l'ancre ``\verb-ai-'' duquel doit partir la flèche si l'ancre par défaut ne convient pas. Comme pour la commande \idx\arrow, ``\verb-n.a[s]-'' contient le nom, l'ancre et le style du prochain composé.
+
+\exemple[50]{La commande \string\merge}/\schemestart
+ABC\arrow[30]EFGHIJ\arrow[45]KLM\arrow[60]NO
+\merge>(c1)(c2)(c3)--()suite 1
+\arrow suite 2
+\schemestop
+\bigskip
+
+\schemestart
+Foooo\arrow(foo--bar){<=>}Bar\arrow(--baz){<=>}Bz
+\merge^(foo)(bar)(baz)--()suite
+\schemestop
+\bigskip
+
+\schemedebug{true}
+\schemestart
+A\arrow{<->}[90]B
+\merge<(c1.120)(c2)--(foobar.45[circle,blue])CCC
+\schemestop/
+
+En ce qui concerne la géométrie de la flèche \idx{\merge}, celle-ci se compose de $n$ traits qui partent de chaque composé et vont jusqu'à la ligne de jonction qui leur est perpendiculaire : la longueur par défaut du plus court de ces traits est la moitié de l'espacement entre les composés défini avec \idx\setcompoundsep. La flèche tracée depuis la ligne de jonction jusqu'au composé suivant a également cette longueur par défaut, et elle part du milieu de la ligne de jonction. Ces 3 caractéristiques géométriques peuvent être modifiées au moyen de l'argument optionnel qui vient après le nom de composé suivant :
+
+\hfill\verb/\merge{dir}(n1.a1)(n2.a2)(...)(ni.ai)--(n.a[s])[c1,c2,c,style]/\hfill\null
+
+où :
+\begin{itemize}
+ \item la longueur de trait le plus court entre les composés à joindre et la ligne de jonction s'obtient en multipliant l'espacement entre les composés défini avec \idx{\setcompoundsep} par le coefficient \verb-c1-, qui vaut 0.5 par défaut;
+ \item la longueur de la flèche entre la ligne de jonction et le composé suivant s'obtient en l'espacement entre les composés par le coefficient \verb-c2-, qui vaut 0.5 par défaut;
+ \item l'endroit d'où part la flèche depuis la ligne de jonction est déterminée par le coefficient \verb-c-, sachant que s'il vaut 0, la flèche partira de la gauche de la ligne de jonction (ou du haut si la direction est \verb-v- ou \verb-^-);
+ \item le style de la flèche tracée avec \idx{\merge} est défini par le dernier argument \verb-style-.
+\end{itemize}
+
+\exemple*{Paramètres géométriques de \string\merge}/\schemestart A\arrow{<=>}[90]B\merge(c1)(c2)--()C\schemestop\qquad
+\schemestart A\arrow{<=>}[90]B\merge(c1)(c2)--()[1]C\schemestop\qquad
+\schemestart A\arrow{<=>}[90]B\merge(c1)(c2)--()[,1]C\schemestop\qquad
+\schemestart A\arrow{<=>}[90]B\merge(c1)(c2)--()[,,0.2]C\schemestop\qquad
+\schemestart A\arrow{<=>}[90]B\merge(c1)(c2)--()[,,0.9,red,thick]C\schemestop
+\bigskip
+
+\schemestart A\arrow{<=>}B\merge^(c1)(c2)--()C\schemestop\qquad
+\schemestart A\arrow{<=>}B\merge^(c1)(c2)--()[1]C\schemestop\qquad
+\schemestart A\arrow{<=>}B\merge^(c1)(c2)--()[,1]C\schemestop\qquad
+\schemestart A\arrow{<=>}B\merge^(c1)(c2)--()[,,0.2]C\schemestop\qquad
+\schemestart A\arrow{<=>}B\merge^(c1)(c2)--()[,,0.9,red,thick]C\schemestop/
+
+Enfin, il est possible d'écrire des labels au dessus ou au dessous de la flèche créée par la commande \idx{\merge}. Pour cela, le caractère définissant la direction admet deux arguments optionnels entre crochets, le premier contenant le label mis au dessus et le second celui mis au dessous de la flèche. La syntaxe complète de la commande \idx{\merge} est donc :
+
+\hfill\verb/\merge{dir}[labelup][labeldow](n1.a1)(n2.a2)(...)(ni.ai)--(n.a[s])[c1,c2,c,style]/\hfill\null
+
+Toutes les fonctionnalités déjà présentées pour les labels des flèches sont ici possibles, à savoir choisir l'angle de rotation et l'ancre avec la syntaxe \verb-*{angle.ancre}- placée juste avant le contenu du label.
+
+\exemple*{Labels de la commande \string\merge}/\schemestart
+ABC\arrow{<=>}[90]DEF\merge>[sur][sous](c1)(c2)--()[0.25,1,0.75]GHIJ
+\schemestop\qquad
+\schemestart
+ABC\arrow{<=>}[90]DEF\merge>[*{45.south west}sur][*{45.north east}sous](c1)(c2)--()[0.25,1,0.75]GHIJ
+\schemestop\qquad
+\schemestart
+ABC\arrow{<=>}[90]DEF\merge>[*{90}sur][*{90}sous](c1)(c2)--()[0.25,1,0.75]GHIJ
+\schemestop
+\bigskip
+
+\schemestart
+ABC\arrow{<=>}DEF\merge v[sur][sous](c1)(c2)--()[0.25,1,0.75]GHIJ
+\schemestop\qquad
+\schemestart
+ABC\arrow{<=>}DEF\merge v[*{45.north west}sur][*{45.south east}sous](c1)(c2)--()[0.25,1,0.75]GHIJ
+\schemestop\qquad
+\schemestart
+ABC\arrow{<=>}DEF\merge v[*{0}sur][*{0}sous](c1)(c2)--()[0.25,1,0.75]GHIJ
+\schemestop/
+
+\section{Le signe +}\label{signe+}
+Entre les commandes \idx{\schemestart} et \idx{\schemestop}, on dispose de la macro ``\idx\+'' qui affiche un signe ${}+{}$. Elle admet un argument optionnel \emph{entre accolades} contenant 3 dimensions sous cette forme \verb-{<dim1>,<dim2>,<dim3>}- où :
+\begin{itemize}
+ \item \verb-<dim1>- et \verb-<dim2>- sont les dimensions qui vont être insérées avant et après le signe ${}+{}$;
+ \item \verb-<dim3>- est le décalage vertical que l'on veut faire subir au signe.'
+\end{itemize}
+Si l'un des arguments est vide ou si l'argument entre accolades n'existe pas, les dimensions prennent leur valeur par défaut que l'on peut spécifier avec la commande \idx\setandsign\verb-{<dim1>,<dim2>,<dim3>}-\label{setandsign}. Si l'on spécifie un champ vide, \verb-<dim1>- et \verb-<dim2>- valent 0.5em tandisque que \verb-<dim3>- vaut 0pt s'il est vide. Les valeurs par défaut \verb-{0.5em,0.5em,0pt}- sont celles en vigueur si l'utilisateur n'en spécifie pas d'autres.
+
+\exemple[50]{La commande \string\+}/\schemestart
+A\+B\+{2em,,5pt}C\+{0pt,0pt,-5pt}D\arrow E\+F
+\schemestop
+
+\setandsign{1em,1em,0pt}
+\schemestart
+A\+B\+{2em,,5pt}C\+{0pt,0pt,-5pt}D\arrow E\+F
+\schemestop/
+
+Comme on le voit sur l'exemple ci-dessous, il faut comprendre que le signe ${}+{}$ inséré par la commande \idx{\+} fait partie du composé :
+\exemple[50]{Les composés et \string\+}/\schemedebug{true}
+\schemestart A\+ B\+{,,5pt}C\arrow D\+ E\schemestop/
+Il devient donc difficile de faire partir une flèche exactement sous la lettre``A'' puisque cette lettre n'est pas un composé unique aux yeux de \CF. On peut donc utiliser dans ce cas la commande \idx{\subscheme} pour envelopper dans un composé unique la lettre ``A'', voire même le signe lui même et pouvoir y faire référence par la suite avec le nom qui lui est attribué :
+\exemple[50]{Sous composé et \string\+}/\schemedebug{true}
+\schemestart
+\subscheme{A}\+ B\arrow C
+\arrow(@c2--)[-90]E
+\schemestop
+\medskip
+
+\schemestart
+A\subscheme{\+}BCDEF \arrow G
+\arrow(@c2--)[-90]H
+\schemestop/%
+\idx*{schéma réactionnel|)}
+Il peut arriver que l'alignement du signe ``+'' avec les molécules qui précèdent ou qui suivent pose problème. Voici un exemple :
+\exemple{Alignement du signe +}/\schemedebug{true}
+\schemestart
+ \chemfig{C(<[:40])(<[:160])=[6]C(<[:-130])<[:-20]}
+ \+
+ \chemfig{\lewis{246,Br}-\lewis{026,Br}}
+\schemestop/
+Ce qui se passe est que le signe ``+'' est sur la même ligne de base que le composé qui précède, et cette ligne de base est celle de l'atome ``C'' du haut. On pourrait bien sûr décaler le signe ``+'' mais cela ne changerait pas la position verticale de ``\kern0.3333em\chemfig{\lewis{246,Br}-\lewis{026,Br}}\kern0.3333em''. En fait, le signe ``+'' ne stoppe pas la lecture d'un composé pour \CF ce que l'on constate dans l'exemple ci-dessus où tout est englobé dans le composé ``c1''. On va donc être obligé de stopper le composé après la première molécule avec un \verb-\arrow{0}[,0]- qui produira une flèche invisible de longueur nulle. Pour centrer verticalement le tout, on va également préciser que l'ancre du premier composé doit être ``west'' (ou ``180'' qui est un synonyme) avec le deuxième argument optionnel de la commande \verb-\schemestart- :
+\exemple{Alignement du signe +}/\schemedebug{true}
+\schemestart[][west]
+ \chemfig{C(<[:40])(<[:160])=[6]C(<[:-130])<[:-20]}
+ \arrow{0}[,0]\+
+ \chemfig{\lewis{246,Br}-\lewis{026,Br}}
+\schemestop/
+De cette façon, le premier composé ``c1'' est la première molécule et le second composé est le reste, c'est-à-dire le signe ``+'' et la seconde molécule. On aurait pû jouer sur les ancres ou les styles via la commande \verb-\arrow- pour placer le second composé à un autre endroit. Ici, par exemple on décale le second composé de 10pt vers le bas dans le premier cas et on fait coïncider l'ancre ``south east'' du premier composé avec l'ancre ``south west'' du second dans le deuxième cas :
+\exemple{Alignement du signe +}/\schemedebug{true}
+\schemestart[][west]
+ \chemfig{C(<[:40])(<[:160])=[6]C(<[:-130])<[:-20]}
+ \arrow(--[yshift=-10pt]){0}[,0]\+
+ \chemfig{\lewis{246,Br}-\lewis{026,Br}}
+\schemestop
+\medskip
+
+\schemestart[][west]
+ \chemfig{C(<[:40])(<[:160])=[6]C(<[:-130])<[:-20]}
+ \arrow(.south east--.south west){0}[,0]\+
+ \chemfig{\lewis{246,Br}-\lewis{026,Br}}
+\schemestop/
+\newpage
+
+\part{Liste des commandes}
Les commandes créées par \CF sont :
\begin{center}
\begin{longtable}{>\footnotesize l>\footnotesize p{9cm}}\\\hline
\hfill\normalsize Commandes\hfill\null &\hfill\normalsize Description\hfill\null\\\hline
-\verb-\chemfig<code>-\idx*\chemfig&dessine la molécule dont le dessin est décrit par le \verb-<code>-\\
-\verb-\printatom-\idx*\printatom & cette macro affiche les atomes dans les molécules. Elle peut être redéfinie pour personnaliser l'affichage, voir~\pageref{perso.affichage}\\
-\verb-\setnodestyle{<style tikz>}-\idx*\setnodestyle& à l'aide de la syntaxe de \TIKZ, cette macro définit le style de nœuds contenant les atomes, voir~\pageref{style.noeuds}\\
-\verb-\setbondestyle{<style tikz>}-\idx*\setbondstyle& à l'aide de la syntaxe de \TIKZ, cette macro définit le style des liaisons voir~\pageref{setbondstyle}\\
-\verb-\hflipnext-\idx*\hflipnext&la prochaine molécule sera inversée horizontalement\\
-\verb-\vflipnext-\idx*\vflipnext&la prochaine molécule sera inversée verticalement\\
-\verb-\definesubmol{<nom>}[code1]{<code2>}-\idx*\definesubmol & créé un alias \verb-!<nom>- que l'on peut placer dans le code des molécules à dessiner qui remplace le \verb-<code1>- ou le \verb-<code2>- selon l'inclinaison de la dernière liaison. Voir page~\pageref{definesubmol}\\
-\verb-\chemskipalign-\idx*\chemskipalign & Ignore le groupe d'atomes en cours pour le mécanisme d'alignement vertical. Voir page~\pageref{chemskipalign}.\\
-\verb-\redefinesubmol{<nom>}{<code>}-\idx*\redefinesubmol & remplace l'alias déjà existant \verb-!<nom>- par le nouveau \verb-<code>-. Voir page~\pageref{redefinesubmol}\\[2ex]\hline
+\idx\chemfig\verb-<code>-&dessine la molécule dont le dessin est décrit par le \verb-<code>-\\
+\idx\printatom & cette macro affiche les atomes dans les molécules. Elle peut être redéfinie pour personnaliser l'affichage, voir page~\pageref{perso.affichage}\\
+\idx\setnodestyle\verb-{<style tikz>}-& à l'aide de la syntaxe de \TIKZ, cette macro définit le style de nœuds contenant les atomes, voir page~\pageref{style.noeuds}\\
+\idx\setbondestyle\verb-{<style tikz>}-& à l'aide de la syntaxe de \TIKZ, cette macro définit le style des liaisons voir page~\pageref{setbondstyle}\\
+\idx\hflipnext&la prochaine molécule sera inversée horizontalement\\
+\idx\vflipnext&la prochaine molécule sera inversée verticalement\\
+\idx\definesubmol\verb-{<nom>}[code1]{<code2>}- & créé un alias \verb-!<nom>- que l'on peut placer dans le code des molécules à dessiner qui remplace le \verb-<code1>- ou le \verb-<code2>- selon l'inclinaison de la dernière liaison. Voir page~\pageref{definesubmol}\\
+\idx\chemskipalign & Ignore le groupe d'atomes en cours pour le mécanisme d'alignement vertical. Voir page~\pageref{chemskipalign}.\\
+\idx\redefinesubmol\verb-{<nom>}{<code>}-& remplace l'alias déjà existant \verb-!<nom>- par le nouveau \verb-<code>-. Voir page~\pageref{redefinesubmol}\\[2ex]\hline
&\\
-\verb-\setcrambond{<dim1>}{<dim2>}{<dim3>}-\idx*\setcrambond & règle les dimensions des triangles représentant les liaisons de Cram : \verb-<dim1>- est la largeur de la base, \verb-<dim2>- est l'espacement entre les pointillés et \verb-<dim3>- est la largeur des pointillés. Voir page~\pageref{setcrambond}\\
-\verb-\setatomsep{<dim>}>-\idx*\setatomsep & règle la distance interatome. Voir page~\pageref{setatomsep}\\
-\verb-\setbondoffset{<dim>}-\idx*\setbondoffset & règle l'espacement entre les atomes liés et la liaison. Voir page~\pageref{setbondoffset}\\
-\verb-\setdoublesep{<dim>}-\idx*\setdoublesep & règle l'espacement entre les deux traits d'une double liaison. Voir page~\pageref{setdoublesep}\\[2ex]\hline
+\idx\setcrambond\verb-{<dim1>}{<dim2>}{<dim3>}-& règle les dimensions des triangles représentant les liaisons de Cram : \verb-<dim1>- est la largeur de la base, \verb-<dim2>- est l'espacement entre les pointillés et \verb-<dim3>- est la largeur des pointillés. Voir page~\pageref{setcrambond}\\
+\idx\setatomsep\verb-{<dim>}>-& règle la distance interatome. Voir page~\pageref{setatomsep}\\
+\idx\setbondoffset\verb-{<dim>}- & règle l'espacement entre les atomes liés et la liaison. Voir page~\pageref{setbondoffset}\\
+\idx\setdoublesep\verb-{<dim>}- & règle l'espacement entre les deux traits d'une double liaison. Voir page~\pageref{setdoublesep}\\[2ex]\hline
&\\
-\verb-\lewis{<codes>,<atome>}-\idx*\lewis & affiche l'\verb-<atome>- et positionne les décorations de Lewis selon ce qui est spécifié dans le \verb-<code>-. Les décorations dessinées ne modifient pas la boîte englobante de l'\verb-<atome>-. Voir page~\pageref{lewis}\\
-\verb-\setlewis{<dim1>}{<dim2>}{<code tikz>}-\idx*\setlewis & règle les décoration de Lewis; \verb-<dim1>- est la distance entre l'atome et la décoration, \verb-<dim2>- est la longueur du trait représentant la paire d'électrons et \verb-<code tikz>- est le code qui sera passé directement à \TIKZ. Voir page~\pageref{setlewis}\\[2ex]\hline
+\idx\lewis\verb-{<codes>,<atome>}-& affiche l'\verb-<atome>- et positionne les décorations de Lewis selon ce qui est spécifié dans le \verb-<code>-. Les décorations dessinées ne modifient pas la boîte englobante de l'\verb-<atome>-. Voir page~\pageref{lewis}\\
+\idx\Lewis\verb-{<codes>,<atome>}-& affiche l'\verb-<atome>- et positionne les décorations de Lewis selon ce qui est spécifié dans le \verb-<code>-. Voir page~\pageref{Lewis}\\
+\idx\setlewis\verb-{<dim1>}{<dim2>}{<code tikz>}- & règle les décoration de Lewis; \verb-<dim1>- est la distance entre l'atome et la décoration, \verb-<dim2>- est la longueur du trait représentant la paire d'électrons et \verb-<code tikz>- est le code qui sera passé directement à \TIKZ. Voir page~\pageref{setlewis}\\[2ex]\hline
&\\
-\verb-\chemmove[<options tikz>]<code tikz>-\idx*\chemmove & Ouvre un environnement \verb-tikzpicture- en y ajoutant à celles qui existent déjà les \verb-<options tikz>-, et relie avec le \verb-<code tikz>- les nœuds posés dans les molécules à l'aide du caractère ``\verb-@-''. Voir page~\pageref{mecanismes-reactionnels}.\\
-\verb-\chemsign[<dim>]<signe>-\idx*\chemsign & affiche le \verb-<signe>- en plaçant avant et après un espace insécable de longueur \verb-<dim>-. Voir page~\pageref{chemsign}\\
-\verb-\chemrel[<txt1>][<txt2>]{<code fleche>}-\idx*\chemrel & affiche une flèche décrite par son \verb-<code fleche>- en positionnant les textes optionnels \verb-<txt1>- et \verb-<txt2>- respectivement au dessus et au dessous de la flèche. Voir page~\pageref{chemrel}\\
-\verb-\setchemrel{<dim1>}{<dim2>}{<dim3>}-\idx*\setchemrel & règle les dimensions des flèches dessinées avec la commande \verb-\chemrel- : \verb-<dim1>- est l'espacement vertical entre la flèche et les textes optionnels, \verb-<dim2>- est l'espacement horizontal insécable inséré avant et après la flèche et \verb-<dim3>- est la longueur de la flèche. Voir page~\pageref{setchemrel}\\[2ex]\hline
+\idx\chemmove\verb-[<options tikz>]<code tikz>-& Ouvre un environnement \verb-tikzpicture- en y ajoutant à celles qui existent déjà les \verb-<options tikz>-, et relie avec le \verb-<code tikz>- les nœuds posés dans les molécules à l'aide du caractère ``\verb-@-''. Voir page~\pageref{mecanismes-reactionnels}.\\
+\idx\chemsign\verb-[<dim>]<signe>-& affiche le \verb-<signe>- en plaçant avant et après un espace insécable de longueur \verb-<dim>-. Voir page~\pageref{chemsign}\\
+\idx\chemrel\verb-[<txt1>][<txt2>]{<code fleche>}-& affiche une flèche décrite par son \verb-<code fleche>- en positionnant les textes optionnels \verb-<txt1>- et \verb-<txt2>- respectivement au dessus et au dessous de la flèche. Voir page~\pageref{chemrel}\\
+\idx\setchemrel\verb-{<dim1>}{<dim2>}{<dim3>}-& règle les dimensions des flèches dessinées avec la commande \verb-\chemrel- : \verb-<dim1>- est l'espacement vertical entre la flèche et les textes optionnels, \verb-<dim2>- est l'espacement horizontal insécable inséré avant et après la flèche et \verb-<dim3>- est la longueur de la flèche. Voir page~\pageref{setchemrel}\\[2ex]\hline
&\\
-\verb-\chemabove[<dim>]{<txt1>}{txt2}-\idx*\chemabove & écrit le \verb-<txt1>- et positionne le \verb-<txt2>- au dessus en laissant \verb-<dim>- d'espacement vertical. Cette commande ne change pas la boîte englobante de \verb-<txt1>-. Voir page~\pageref{chemabove}\\
-\verb-\chembelow[<dim>]{<txt1>}{txt2}-\idx*\chembelow & écrit le \verb-{txt1}- et positionne le \verb-<txt2>- au dessous en laissant \verb-<dim>- d'espacement vertical. Cette commande ne change pas la boîte englobante de \verb-<txt1>-. Voir page~\pageref{chemabove}\\
-\verb-\chemname[<dim>]{<molécule>}{<nom>}-\idx*\chemname & Affiche le \verb-<nom>- sous la \verb-<molécule>-\\
-\verb-\chemnameinit-\idx*\chemnameinit & Initialise la plus grande profondeur des molécules rencontrées pour avoir un alignement correct de leurs noms\\\hline
+\idx\chemabove\verb-[<dim>]{<txt1>}{txt2}- & écrit le \verb-<txt1>- et positionne le \verb-<txt2>- au dessus en laissant \verb-<dim>- d'espacement vertical. Cette commande ne change pas la boîte englobante de \verb-<txt1>-. Voir page~\pageref{chemabove}\\
+\idx\chembelow\verb-[<dim>]{<txt1>}{txt2}- & écrit le \verb-{txt1}- et positionne le \verb-<txt2>- au dessous en laissant \verb-<dim>- d'espacement vertical. Cette commande ne change pas la boîte englobante de \verb-<txt1>-. Voir page~\pageref{chemabove}\\
+\idx\Chemabove\verb-[<dim>]{<txt1>}{txt2}- & écrit le \verb-<txt1>- et positionne le \verb-<txt2>- au dessus en laissant \verb-<dim>- d'espacement vertical. Voir page~\pageref{Chemabove}\\
+\idx\Chembelow\verb-[<dim>]{<txt1>}{txt2}- & écrit le \verb-{txt1}- et positionne le \verb-<txt2>- au dessous en laissant \verb-<dim>- d'espacement vertical. Voir page~\pageref{Chemabove}\\
+\idx\chemname\verb-[<dim>]{<molécule>}{<nom>}-\idx*\chemname & Affiche le \verb-<nom>- sous la \verb-<molécule>-. Voir page~\pageref{chemname}\\
+\idx\chemnameinit & initialise la plus grande profondeur des molécules rencontrées pour avoir un alignement correct de leurs noms. Voir page~\pageref{chemnameinit}\\[2ex]\hline
+&\\
+\idx\schemestart\dots\idx\schemestop& balises entre lesquelles un schéma réactionnel est tracé. Voir page~\pageref{schemestart}.\\
+\idx\arrow& trace une flèche dans un schéma réactionnel (la commande n'est définie que dans un schéma réactionnel). Voir page~\pageref{arrow} et suivantes.\\
+\idx\+ & affiche un signe $+$ dans un schéma réactionnel (la commande n'est définie que dans un schéma réactionnel). Voir page~\pageref{signe+}.\\
+\idx\subscheme\verb-{<code>}- & trace un sous schéma réactionnel (la commande n'est définie que dans un schéma réactionnel). Voir page~\pageref{subscheme}.\\
+\idx\definearrow & définit une flèche. Voir page~\pageref{definearrow}.\\
+\idx\chemleft\verb-<car1><matériel>-\idx\chemright\verb-<car1>-& trace des delimiteurs extensibles définis par \verb-<car1>- et \verb-<car2>- à gauche et à droite du \verb-<matériel>-, voir page~\pageref{chemleft}.\\
+\idx\chemup\verb-<car1><matériel>-\idx\chemdown\verb-<car1>-& trace des delimiteurs extensibles définis par \verb-<car1>- et \verb-<car2>- au dessus et au dessous du \verb-<matériel>-, voir page~\pageref{chemup}.\\
+\idx\setcompoundsep\verb-{<dim>}-& définit l'espacement de bord à bord des composés dans un schéma réactionnel. Voir page~\pageref{setcompoundsep}.\\
+\idx\setarrowoffset\verb-{<dim>}-&définit l'espacement entre le bord d'un composé et le début et la fin d'une flèche. Voir page~\pageref{setarrowoffset}.\\
+\idx\setarrowdefault\verb-{angle,coeff,style}-&définit les caractéristiques par défaut d'une flèche. Voir page~\pageref{setarrowdefault}.\\
+\idx\setcompoundstyle\verb-{<code tikz>}-&définit le style par défaut des composés. Voir page~\pageref{setcompoundstyle}.\\
+\idx\setarrowlabelsep\verb-{<dim>}-&définit l'espacement entre la flèche et l'ancre des labels qui sont placés au dessus et au dessous. Voir page~\pageref{setarrowlabelsep}.\\
+\idx\setandsign\verb-{<dim1>,<dim2>,<dim3>}-&définit les caractéristiques du signe $+$ où \verb-<dim1>- et \verb-<dim2>- sont les espaces laissés avant et près le signe et \verb-<dim3>- est le décalage vertical. Voir page~\pageref{setandsign}.\\\hline
\end{longtable}
\end{center}
\newpage
@@ -1714,7 +2411,7 @@ Ce manuel s'achève avec des dessins de molécules plus ou moins complexes.
L'utilisateur curieux pourra s'intéresser au \verb-<code>- de chaque molécule, bien que celui-ci devienne parfois rebutant lorsqu'elles deviennent complexes. En effet, au delà d'un certain niveau de complexité, bien qu'il soit est assez facile d'écrire un \verb-<code>- pour dessiner une molécule, il est assez ardu de relire ce \verb-<code>- pour l'analyser a posteriori. On atteint rapidement les limites de la lisibilité immédiate du code d'un dessin complexe.
-Quoi qu'il en soit, j'espère que cette extension aidera tous les utilisateurs de \LaTeX{} qui souhaitent dessiner des molécules chimiques. Compte tenu de la jeunesse de cette extension, j'espère que vous serez indulgent quant aux bugs rencontrés. Un \href{mailto:unbonpetit@gmail.com}{\texttt{\textbf{email}}} pour me signaler tout dysfonctionnement ou toute proposition d'amélioration sera bienvenu.\nobreak
+Quoi qu'il en soit, j'espère que cette extension aidera tous les utilisateurs de \LaTeX{} qui souhaitent dessiner des molécules chimiques. Bien que \CF ait été testé de façon approfondie et que le numéro de version soit supérieur à 1.0, j'espère que vous serez indulgent quant aux bugs rencontrés. Un \href{mailto:unbonpetit@gmail.com}{\texttt{\textbf{email}}} pour me signaler tout dysfonctionnement ou toute proposition d'amélioration sera bienvenu.\nobreak
\hfill Christian \textsc{Tellechea}
\bigskip
@@ -1815,13 +2512,15 @@ $\star\quad\star$
-[::-150,1.5](-[:20]CH(-[1]CH_3)(-[7]CH_3))(-[6]H)-[::-90,2]-[::+60]?)}/
\idx*\chembelow
-\idx*\chemsign
-\idx*\chemrel
-\exemple*{Synthèse de Fischer de l'indole}/\chemfig{*6(=-*6(-\chembelow{N}{H}-NH_2)=-=-)}
-\chemsign+
-\chemfig{(=[:-150]O)(-[:-30]R_2)-[2]-[:150]R_1}
-\chemrel[$\mathrm{H^+}$]{-stealth}
-\chemfig{*6(-=*5(-\chembelow{N}{H}-(-R_2)=(-R_1)-)-=-=)}/
+\idx*\+
+\idx*\schemestart
+\exemple*{Synthèse de Fischer de l'indole}/\schemestart
+ \chemfig{*6(=-*6(-\chembelow{N}{H}-NH_2)=-=-)}
+ \+
+ \chemfig{(=[:-150]O)(-[:-30]R_2)-[2]-[:150]R_1}
+ \arrow(.mid east--.mid west){->[\chemfig{H^+}]}
+ \chemfig{*6(-=*5(-\chembelow{N}{H}-(-R_2)=(-R_1)-)-=-=)}
+\schemestop/
\idx*\chemabove
\idx*\chemrel
@@ -1854,58 +2553,105 @@ $\star\quad\star$
}/
\idx*\lewis
-\idx*\chemsign
\idx*\chemabove
\idx*\chemmove
-\idx*\chemrel
+\idx*\arrow\idx*\+\idx*\schemestart\idx*\schemestop
\idx*{"@}
\idx*\chembelow
\idx*{charge!\protect\texttt{\protect\string\protect\oplus}}
-\exemple*{Addition nucléophile. Amines primaires}/\chemfig{R-@{aton}\lewis{2,N}H_2}
-\chemsign{+}
+\exemple*{Addition nucléophile. Amines primaires}/\setatomsep{2.5em}
+\setcompoundsep{5em}
+\schemestart
+\chemfig{R-@{aton}\lewis{2,N}H_2}
+\+
\chemfig{@{atoc}C([3]-CH_3)([5]-CH_3)=[@{atoo1}]O}
-\hspace{1cm}
\chemfig{@{atoo2}\chemabove{H}{\scriptstyle\oplus}}
\chemmove[-stealth,shorten <=3pt,dash pattern= on 1pt off 1pt,thin]{
\draw[shorten >=2pt](aton) ..controls +(up:10mm) and +(left:5mm)..(atoc);
\draw[shorten >=8pt](atoo1) ..controls +(up:10mm) and +(north west:10mm)..(atoo2);}
-\chemrel[\tiny addition]{<>}
+\arrow{<=>[\tiny addition]}
\chemfig{R-@{aton}\chembelow{N}{\scriptstyle\oplus}H([2]-[@{sb}]H)-C(-[2]CH_3)(-[6]CH_3)-OH}
-\par
+\schemestop
\chemmove{
\draw[-stealth,dash pattern= on 1pt off 1pt,shorten <=3pt, shorten >=2pt]
(sb)..controls +(left:5mm) and +(135:2mm)..(aton);}
-\chemrel{<>}
+\par
+\schemestart
+\arrow{<=>}
\chemfig{R-@{aton}\lewis{2,N}([6]-[@{sbh}]H)-[@{sb}]C(-[2]CH_3)(-[6]CH_3)-[@{sbo}]@{atoo}
\chemabove{O}{\scriptstyle\oplus}(-[1]H)(-[7]H)}
\chemmove[-stealth,shorten <=3pt,shorten >=2pt,dash pattern= on 1pt off 1pt,thin]{
\draw(aton) ..controls +(up:5mm) and +(up:5mm)..(sb);
\draw(sbh) ..controls +(left:5mm) and +(south west:5mm)..(aton);
\draw(sbo) ..controls +(up:5mm) and +(north west:5mm)..(atoo);}
-\chemrel[\tiny élimination]{<>}
-\chemfig{R-N=C(-[1]CH_3)(-[7]CH_3)}
-\chemsign{+}
-\chemfig{H_3\chemabove{O}{\scriptstyle\oplus}}/
+\arrow{<=>[\tiny élimination]}\chemfig{R-N=C(-[1]CH_3)(-[7]CH_3)}
+\+
+\chemfig{H_3\chemabove{O}{\scriptstyle\oplus}}
+\schemestop/
+
+\idx*\setatomsep
+\idx*\schemestart\idx*\arrow\idx*\merge\idx*\schemestop
+\exemple*{Schéma réactionnel}/\setatomsep{2em}
+\schemestart[-90]
+ \chemfig{**6(---(-NH _2)---)}\arrow{0}\chemfig{HNO_2}
+ \merge(c1)(c2)--()
+ \chemfig{**6(---(-N_2|{}^\oplus)---)}\arrow{0}\chemfig{**6(---(-NH _2)---)}
+ \merge(c3)(c4)--()
+ \chemfig{**6(---(-N=[::-30]N-[::-30]**6(---(-NH_2)---))---)}
+\schemestop/
+
+\idx*\setatomsep
+\idx*\schemestart\idx*\arrow\idx*\subscheme\idx*\schemestop\idx*\chemleft\idx*\chemright
+\idx*{charge!\protect\texttt{\protect\string\protect\oplus}}
+\exemple*{Réaction d'addition}/\setatomsep{2.5em}
+\schemestart
+ \chemfig{*6(=-(-)(=[2]O))}
+ \arrow{->[\+\chemfig{H^\oplus}]}
+ \chemleft[\subscheme[90]{%
+ \chemfig{*6((-[2,0.33,,,draw=none]\scriptstyle\oplus)-=(-)-OH)}
+ \arrow{<->}
+ \chemfig{*6(=-(-)(-[6,0.33,,,draw=none]\scriptstyle\oplus)-OH)}}\chemright]
+ \arrow(@c3--)\chemfig{*6((-[2]R)-=(-)-OH)}
+ \arrow(@c4--)\chemfig{*6(=-(-)(-[6]R)-OH)}
+\schemestop/
+
+\idx*\setatomsep
+\idx*\schemestart\idx*\arrow\idx*\subscheme\idx*\schemestop\idx*\chemname\idx*\definesubmol\idx*\chemleft\idx*\chemright
+\idx*{charge!\protect\texttt{\protect\string\protect\oplus}}
+\idx*{charge!\protect\texttt{\protect\string\protect\ominus}}
+\exemple*{Substitution aromatique éléctrophile}Z\setatomsep{1.5em}%
+\definesubmol{+}{-[,-0.4,,,draw=none]\oplus}%
+\schemestart
+ \arrow{0}[,0]
+ \chemleft[\subscheme{\chemfig{*6(=-=-(-[:120]Br)(-[:60]H)-(!+)-)}
+ \arrow{<->}
+ \chemfig{*6(-(!+)-=-(-[:120]Br)(-[:60]H)-=)}
+ \arrow{<->}
+ \chemfig{*6(-=-(!+)-(-[:120]Br)(-[:60]H)-=)}}\chemright]
+ \arrow(@c2--){<-[*0\chemfig{{-}AlBr_4|^\ominus}][*0\chemfig{Br_2/Al_2Br_3}]}[90,1.5]
+ \chemname{\chemfig{*6(-=-=-=-)}}{Benzène 1}
+ \arrow(@c4--){->[*0\chemfig{{-}H^\oplus}]}[90,1.5]
+ \chemname{\chemfig{*6(-=-=(-Br)-=-)}}{Bromobenzène 2}
+ \arrow(@c5.mid east--@c6.mid west)
+\schemestop Z
\idx*\setbondoffset
\idx*\setatomsep
\idx*\lewis
-\idx*\chemrel
-\idx*\chemsign
+\idx*\arrow\idx*\+\idx*\schemestart\idx*\schemestop\idx*\setcompoundsep
\idx*\chemmove
\idx*{"@}
-\exemple*{Mécanismes réactionnels de la chloration}/\scriptsize
-\setbondoffset{1pt}\setatomsep{2em}
-\chemfig{Cl-[4]@{a0}(=[@{a1}:120]@{a2}O)-[:-120](=[:-60]O)-[4]Cl}\chemsign{+}
-\chemfig{*6(-=-=(-@{oh1}OH)-=)}\chemrel{-stealth}
+\exemple*{Mécanismes réactionnels de la chloration}/\scriptsize\setbondoffset{1pt}\setatomsep{2em}\setcompoundsep{4em}
+\schemestart
+\chemfig{Cl-[4]@{a0}(=[@{a1}:120]@{a2}O)-[:-120](=[:-60]O)-[4]Cl}\+\chemfig{*6(-=-=(-@{oh1}OH)-=)}\arrow
\chemfig{*6((-O-[:150](-[@{o0}:150]@{o1}\lewis{6.,O})(-[@{cl0}:60]@{cl1}Cl)-[:240](-[4]Cl)=[6]O)=-=-=-)}
-\chemrel{-stealth}\chemfig{*6((-O-[:150](=[2]O)-[:-150](=[6]O)-[:150]Cl)=-=-=-)}\chemsign{+}
-\chemfig{HCl}\par
-\chemfig{*6(-=*6(-O-*6(-@{o2}(=[@{o3}]@{o4}O)-Cl)=)-=-=)}\chemsign{+}
-\chemfig{*6(-=-=(-@{oh2}OH)-=)}\chemrel{-stealth}
+\arrow\chemfig{*6((-O-[:150](=[2]O)-[:-150](=[6]O)-[:150]Cl)=-=-=-)}\+\chemfig{HCl}
+\arrow(@c1--){0}[-90,0.5]
+\chemfig{*6(-=*6(-O-*6(-@{o2}(=[@{o3}]@{o4}O)-Cl)=)-=-=)}\+\chemfig{*6(-=-=(-@{oh2}OH)-=)}\arrow
\chemfig{*6(-=*6(-O-(-(-[@{cl2}:60]@{cl3}Cl)(-[@{o5}:-120]@{o6}\lewis{6.,O})-O-[::-40]*6(=-=-=-))=)-=-=)}
-\kern-3em \chemrel{-stealth}\chemfig{[:30]*6(=-(-O-[:-60](=O)-[:-120](=[4]O)-[:-60]O-*6(=-=-=-))=-=-)}
-\kern-3em \chemsign{+}\chemfig{HCl}
+\kern-3em \arrow\chemfig{[:30]*6(=-(-O-[:-60](=O)-[:-120](=[4]O)-[:-60]O-*6(=-=-=-))=-=-)}
+\kern-3em \+\chemfig{HCl}
+\schemestop
\chemmove[line width=0.2pt,-stealth,dash pattern = on 2pt off 1pt]{
\draw[shorten <=2pt](a1)..controls+(200:5mm)and+(200:5mm)..(a2);
\draw[shorten >=2pt](oh1.west)..controls+(180:15mm)and+(60:5mm)..(a0);
@@ -1947,68 +2693,133 @@ $\star\quad\star$
\catcode`;=12
\idx*\setbondoffset
\idx*\setatomsep
-\idx*\chemrel
\idx*{"@}
\idx*\chemabove
\idx*\chemmove
\idx*\lewis
\idx*{charge!\protect\texttt{\protect\string\protect\oplus}}
-\exemple*{Réarrangement de Beckmann}/
-\setbondoffset{1pt}
+\idx*\schemestart\idx*\arrow\idx*\setcompoundsep\idx*\setarrowoffset\idx*\subscheme\idx*\chemleft\idx*\chemright
+\exemple*{Réarrangement de Beckmann}/\setbondoffset{1pt}
\setatomsep{2.5em}
-\chemfig{(-[:-150]R')(-[:-30]R)=[2]N-[:30]OH}
-\kern-1em
-\chemrel[\chemfig{\chemabove{H}{\kern10pt\scriptstyle\oplus}}]{<>}
-\kern-0.5em
-\chemfig{(-[@{a0}:-150]R')(-[:-30]R)=[2]@{a1}N-[@{b0}:30]@{b1}\chemabove{O}{\scriptstyle\oplus}H_2}
-\chemmove[red,-stealth,red,shorten <=2pt]{
- \draw(a0)..controls +(135:2mm) and +(215:4mm).. (a1);
- \draw(b0)..controls +(120:2mm) and +(180:3mm).. ([yshift=7pt]b1.180);
-}
-\kern-1.5em
-\chemrel[\chemfig{{-}H_2O}]{<>}
-$\left[\begin{tabular}{c}
- \chemfig{R'-\lewis{2:,N}=@{a1}\chemabove{C}{\scriptstyle\oplus}-R}\\
- \tikz\draw[stealth-stealth](0,3mm)--(0,-3mm);\\
+\setcompoundsep{5em}
+\setarrowoffset{6pt}
+\schemestart
+ \chemfig{(-[:-150]R')(-[:-30]R)=[2]N-[:30]OH}
+ \arrow{<=>[\chemfig{H^\oplus}]}
+ \chemfig{(-[@{a0}:-150]R')(-[:-30]R)=[2]@{a1}N-[@{b0}:30]@{b1}\chemabove{O}{\scriptstyle\oplus}H_2}
+ \chemmove[red,-stealth,red,shorten <=2pt]{
+ \draw(a0)..controls +(135:2mm) and +(215:4mm).. (a1);
+ \draw(b0)..controls +(120:2mm) and +(180:3mm).. ([yshift=7pt]b1.180);}
+ \arrow{<=>[\chemfig{{-}H_2O}]}[,1.1]
+ \chemleft[\subscheme[90]{%
\chemfig{R'-\chemabove{N}{\scriptstyle\oplus}~C-R}
-\end{tabular}\right]$
-\chemrel[\chemfig{H_2@{a0}\lewis{0:2:,O}}]{<>}\par
-\chemmove[red,-stealth,red,shorten <=3pt]{
- \draw(a0)..controls+(90:10mm)and+(45:10mm)..([yshift=6pt]a1.45);
-}
-\chemfig{*6(R\rlap{$'$}-N=(-R)-\chemabove{O}{\scriptstyle\oplus} H_2)}
-\chemrel[\chemfig{{-}\chemabove{H}{\kern10pt\scriptstyle\oplus}}]{<>}
-\chemfig{*6(R\rlap{$'$}-N=(-R)-OH)}
-\chemrel{-stealth}
-\chemfig{*6(R\rlap{$'$}-\chembelow{N}{H}-(-R)(=[2]O))}
-/
+ \arrow{<->}[,0.75]
+ \chemfig{R'-\lewis{2:,N}=@{a1}\chemabove{C}{\scriptstyle\oplus}-R}}\chemright]
+ \arrow{<=>[\chemfig{H_2@{a0}\lewis{0:2:,O}}]}[,1.1]
+ \chemmove[red,-stealth,red,shorten <=3pt]{
+ \draw(a0)..controls+(90:10mm)and+(45:10mm)..([yshift=6pt]a1.45);}
+ \arrow(@c1--){0}[-90,0.333]
+ \chemfig{*6(R\rlap{$'$}-N=(-R)-\chemabove{O}{\scriptstyle\oplus} H_2)}
+ \arrow{<=>[\chemfig{{-}H^\oplus}]}
+ \chemfig{*6(R\rlap{$'$}-N=(-R)-OH)}
+ \arrow
+ \chemfig{*6(R\rlap{$'$}-\chembelow{N}{H}-(-R)(=[2]O))}
+\schemestop/
\endgroup
+\idx*\setatomsep
+\idx*\setcompoundsep
+\idx*\schemestart\idx*\schemestop\idx*\arrow\idx*\+
+\exemple*{Schéma réactionnel}/\setatomsep{1.5em}
+\setcompoundsep{4em}
+\schemestart
+ \chemfig{-[::30]=_[::-60](-[:: -60])-[::60]}
+ \arrow{->[\chemfig{HCl}]}
+ \chemfig{-[::30]-[::-60](-[::120]Cl)(-[::-60])-[::60]}\+\chemfig{-[::30](-[::60]Cl)-[::-60](-[::-60])-[::60]}
+ \arrow(@c1--.north west){->[\chemfig{H_2O}]}[-45,1.7]
+ \chemfig{-[::30]-[::-60](-[::120]OH)(-[::-60])-[::60]}\+\chemfig{-[::30](-[::60]OH)-[::-60](-[::-60])-[::60]}
+\schemestop/
+
+\idx*\tikzset\idx*\schemestart\idx*\arrow\idx*\chemmove\idx*\schemestop
+\idx*{charge!\protect\texttt{\protect\string\protect\oplus}}
+\exemple*{Estérification de l'acide formique}Z\tikzset{obrace/.style={left delimiter={[},inner sep=3pt},
+ cbrace/.style={right delimiter={]},inner sep=3pt},
+ braces/.style={left delimiter={[},right delimiter={]},inner sep=3pt}}
+\setatomsep{2em}
+\schemestart
+ \chemfig{H-C(=[:60]O)-[:-60]O-H}
+ \arrow(--M1[obrace]){-U>[\scriptsize\chemfig{H_2SO_4^{}}][\scriptsize\chemfig{HSO_4^\ominus}][][.25]}%
+ [,1.5,shorten >=6pt]
+ \chemfig{H-@{a2}C(-[:60]O-H)(-[:30,.5,,,draw=none]{\scriptstyle\oplus})-[:-60]O-H}
+ \arrow(--[cbrace]){<->}
+ \chemfig{H-C(=[:60]\chemabove{O}{\scriptstyle\oplus}-H)-[:-60]O-H}
+ \arrow(@M1--){<=>[*{0}\scriptsize\chemfig{H-[:120]@{a1}O-[:60]CH_3}][*{0}\tiny addition]}[-90,1.33]
+ \chemfig{H-C(-[2]O-[:30]H)(-\chemabove{O}{\scriptstyle\oplus}(-[:60]CH_3)-[:-60]H)-[6]O-[:-30]H}
+ \arrow{<=>[\tiny protolysis]}[180]
+ \chemfig{H-C(-[2]O-[:30]H)(-O-CH_3)-[@{b1}6]@{a3}\chemabove{O}{\kern-4mm\scriptstyle\oplus}(-[:-150]H)-[:-30]H}
+ \arrow(--[obrace]){<=>[*{0}\scriptsize\chemfig{{-}H_2O}][*{0}\tiny elimination]}[-90,,shorten >=6pt]
+ \chemfig{H-C(-[:60]O-H)(-[,.5,,,draw=none]{\scriptstyle\oplus})-[:-60]O-CH_3}
+ \arrow(--[cbrace]){<->}
+ \chemfig{H-C(=[:60]\chemabove{O}{\scriptstyle\oplus}-H)-[:-60]O-CH_3}
+ \arrow{-U>[\scriptsize\chemfig{HSO_4^\ominus}][\scriptsize\chemfig{H_2SO_4^{}}][][.25]}[,1.5]
+ \chemfig{H-C(=[:60]O)-[:-60]O-CH_3}
+ \arrow(@M1--[yshift=-5pt]){0}[180,.5]{\tiny protolysis}
+ \chemmove[->,red,shorten <=3pt,shorten >=1pt]{
+ \draw(a1)..controls +(0:1.5cm)and+(0:3cm).. (a2);
+ \draw(b1)..controls +(0:5mm)and+(20:5mm)..(a3);}
+\schemestop Z
+
+\idx*\schemestart\idx*\subscheme\idx*\arrow\idx*\lewis\idx*\+\idx*\arrow
+\idx*\chemname\idx*\vflipnext\idx*\chemmove\idx*\chemabove\idx*\llap
+\idx*{charge!\protect\texttt{\protect\string\protect\oplus}}
+\idx*{charge!\protect\texttt{\protect\string\protect\ominus}}
+\exemple*{Addition électrophile d'halogène sur l'oléfine}/\schemestart
+ \subscheme{%
+ \chemfig{C(<[:40])(<[:160])=[6]C(<[:-130])<[:-20]}
+ \arrow{0}[,0]\+\chemfig{\lewis{246,Br}-\lewis{026,Br}}}
+ \arrow(@c1--olefin){<=>[*{0}rapide]}[-90]
+ \chemfig{>[:-20]C(<[:40])=[@{db}6]C(<[:-130])<[:-20]}
+ \arrow(--bromonium){0}[-90]
+ \chemname{\chemfig{C*3((<)(<:[:-155])-\raise1.5pt\llap{$\scriptstyle\oplus$}\lewis{17,Br}-C(<:)(<[:155])-)}}
+ {bromonium ion}
+ \arrow(--carbeniumA){<<->}[,1.5]
+ \chemname[12pt]{\chemfig{-[:-30]\chemabove{C}{\scriptstyle\oplus}(-[:30])-[6]C(<:[:-150])(<[:-100])-[:-30]
+ \lewis{157,Br}}}{carbenium ion}
+ \arrow(@bromonium--carbeniumB){<<->}[180,1.5]
+ \chemname[12pt]{\vflipnext\chemfig{-[:-30]\chembelow{C}{\scriptstyle\oplus}(-[:30])-[6]C(<[:-150])
+ (<:[:-100])-[:-30]\lewis{137,Br}}}{carbenium ion}
+ \arrow(@olefin--){0}[,.25]
+ \chemfig{@{Br1}\chemabove[3pt]{\lewis{246,Br}}{\scriptstyle\delta\oplus}-[@{b2}]@{Br2}
+ \chemabove[3pt]{\lewis{026,Br}}{\scriptstyle\delta\ominus}}
+ \arrow(@olefin--[left]){0}[180,0]
+ $\pi$ complexe
+ \arrow(@carbeniumA--@olefin){<=>[lent, \chemfig{{-}Br^\ominus}]}
+ \arrow(@carbeniumB--@olefin){<=>[lent, \chemfig{{-}Br^\ominus}]}
+ \chemmove[-stealth,red,shorten <=3pt,shorten >=2pt]{
+ \draw(db) .. controls +(20:5mm) and +(135:5mm) .. (Br1);
+ \draw(b2) .. controls +(-90:5mm) and +(-120:5mm) .. (Br2);}
+\schemestop/
+
\idx*\definesubmol
\idx*\setatomsep
\idx*\chemname
-\idx*\chemsign
-\idx*\chemrel
\idx*\chemmove
+\idx*\schemestart\idx*\arrow\idx*\+\idx*\schemestop
\idx*{charge!\protect\texttt{\protect\string\protect\oplus}}
-\exemple*{Sulfonation de la naphtalène}/\newcommand\putchemnode[1]{\begin{tikzpicture}[remember picture]\node(#1){};\end{tikzpicture}}
-\definesubmol\cycleoplus{-[,0.25,,,draw=none]\oplus}
+\exemple*{Sulfonation de la naphtalène}/\definesubmol\cycleoplus{-[,0.25,,,draw=none]\oplus}
\definesubmol{so2oh}{S(=[::90]O)(=[::-90]O)-OH}
-\footnotesize
\setatomsep{2.5em}
-\begin{tabular}{ll}
-&\putchemnode{l1}\chemname{\chemfig{*6(=-*6(-=-(!\cycleoplus)-(-SO_3H)-)=-=-)}}{Ion 1-arenium}
-\chemrel{-stealth}
-\chemname{\chemfig{*6(=-*6(-=-=(-!{so2oh})-)=-=-)}}{Acide 1-naphthalenesulfonique}\\
-\chemname{\chemfig{*6(=-*6(-=-=-)=-=-)}}{Naphtalène}
-\chemsign{+}
-\chemfig{H_2SO_4}\putchemnode{a}\kern1cm&\\[-5ex]
-&\putchemnode{l2}\chemname{\chemfig{*6(=-*6(-=-(-SO_3H)-(!\cycleoplus)-)=-=-)}}{Ion 2-arenium}\kern-3em
-\chemrel{-stealth}
-\chemname{\chemfig{*6(=-*6(-=-(-!{so2oh})=-)=-=-)}}{Acide 2-naphthalenesulfonique}
-\end{tabular}
-\chemmove[-stealth,yshift=1cm]{
- \draw(a)--node[sloped,above]{80\degre C}(l1);\draw(a)--node[sloped,above]{160\degre C}(l2);}/
+\schemestart[,1.5]
+ \chemname{\chemfig{*6(=-*6(-=-=-)=-=-)}}{Naphtalène}\+\chemfig{H_2SO_4}
+ \arrow(nph.mid east--.south west){->[80\degres C]}[45]
+ \chemname{\chemfig{*6(=-*6(-=-(!\cycleoplus)-(-SO_3H)-)=-=-)}}{Ion 1-arenium}
+ \arrow(.mid east--.mid west)
+ \chemname{\chemfig{*6(=-*6(-=-=(-!{so2oh})-)=-=-)}}{Acide 1-naphthalenesulfonique}
+ \arrow(@nph.mid east--.north west){->[160\degres C]}[-45]
+ \chemname{\chemfig{*6(=-*6(-=-(-SO_3H)-(!\cycleoplus)-)=-=-)}}{Ion 2-arenium}\kern-4em
+ \arrow(.mid east--.mid west)
+ \chemname{\chemfig{*6(=-*6(-=-(-!{so2oh})=-)=-=-)}}{Acide 2-naphthalenesulfonique}
+\schemestop/
\begingroup\catcode`;12
\idx*\chemname
@@ -2076,13 +2887,11 @@ $\left[\begin{tabular}{c}
\idx*{*|see{cycle}}
\idx*{**|see{cycle/cercle intérieur}}
\idx*{\protect\symbol{'0174}@\protect\texttt{\protect\symbol{'0174}}|see{découpage en atomes}}
-\idx*{>, <, >\protect\symbol{'0174}, <\protect\symbol{'0174}, >:, <:@\protect\texttt>, \protect\texttt<, \protect\texttt{>\protect\symbol{'0174}}, \protect\texttt{<\protect\symbol{'0174}}, >\protect\string:, <\protect\string:|see{représentation de Cram}}
+\idx*{>, <, >\protect\symbol{'0174}, <\protect\symbol{'0174}, >:, <:@\protect\texttt>, \protect\texttt<, \protect\texttt{>\protect\symbol{'0174}}, \protect\texttt{<\protect\symbol{'0174}}, >\protect\string:, <\protect\string:|see{Cram (représentation)}}
\idx*{-, =, \protect\string\protect~@\protect\texttt-, \protect\texttt=, \protect\texttt{\protect\string~}|see{liaison/types}}
\idx*{=\protect\string_, =\protect\string^@\protect\texttt{=\protect\string_}, \protect\texttt{=\protect\string^}|see{liaison/déportées}}
\idx*{"!|see{sauvegarde d'une molécule}}
-\idx*{Cram|see{représentation de Cram}}
-\idx*{Lewis|see{représentation de Lewis}}
-\clearpage
+\newpage
\phantomsection
\addcontentsline{toc}{part}{Index}
\printindex
diff --git a/Master/texmf-dist/tex/generic/chemfig/chemfig.sty b/Master/texmf-dist/tex/generic/chemfig/chemfig.sty
index 85c3a9269c0..27a0fbe14de 100644
--- a/Master/texmf-dist/tex/generic/chemfig/chemfig.sty
+++ b/Master/texmf-dist/tex/generic/chemfig/chemfig.sty
@@ -1,13 +1,13 @@
% __________________________________________________________________
% | |
% | |
-% | chemfig v0.4b |
+% | chemfig v1.0 |
% | |
-% | April 24, 2011 |
+% | June 15, 2011 |
% | |
% |__________________________________________________________________|
%
-% This is t-chemfig.tex, the package file for conTeXt.
+% This is chemfig.sty, the package file for LaTeX.
%
% Maintainer: Christian Tellechea
% E-mail : unbonpetit@gmail.com
diff --git a/Master/texmf-dist/tex/generic/chemfig/chemfig.tex b/Master/texmf-dist/tex/generic/chemfig/chemfig.tex
index 11a90945caf..c1385494eba 100644
--- a/Master/texmf-dist/tex/generic/chemfig/chemfig.tex
+++ b/Master/texmf-dist/tex/generic/chemfig/chemfig.tex
@@ -1,9 +1,9 @@
% __________________________________________________________________
% | |
% | |
-% | chemfig v0.4b |
+% | chemfig v1.0 |
% | |
-% | April 24, 2011 |
+% | June 15, 2011 |
% | |
% |__________________________________________________________________|
%
@@ -42,10 +42,10 @@
% Sauvegarde tous les catcodes des caract\`eres sp\'eciaux sauf #
\begingroup
-\def\X#1{\catcode\number`#1=\number\catcode`#1\relax}
-\expandafter\xdef\csname CF@savedcatcode\endcsname{%
- \X\[\X\]\X\:\X\(\X\)\X\,\X\-\X\=\X\~\X\!\X\?\X\<\X\>\X\;\X\*\X\|\X\@%
-}
+ \def\X#1{\catcode\number`#1=\number\catcode`#1\relax}
+ \expandafter\xdef\csname CF@savedcatcode\endcsname{%
+ \X\[\X\]\X\:\X\(\X\)\X\,\X\-\X\=\X\~\X\!\X\?\X\<\X\>\X\;\X\*\X\|\X\@%
+ }
\endgroup
% Pour la dur\'ee de lecture du package, changer les catcodes :
@@ -62,10 +62,10 @@
\def#1%
}
-\CF@def\CF@ver {0.4b}
-\CF@def\CF@date {2011/04/24}
-\CF@def\CF@fr@date {24 avril 2011}
-\CF@def\CF@en@date {April 24, 2011}
+\CF@def\CF@ver {1.0}
+\CF@def\CF@date {2011/06/15}
+\CF@def\CF@fr@date {15 juin 2011}
+\CF@def\CF@en@date {June 15, 2011}
\CF@def\CF@package@name{chemfig}
\expandafter\ifx\csname @latexerr\endcsname\relax% on n'utilise pas LaTeX ?
@@ -534,21 +534,12 @@
\expandafter\def\expandafter#1\expandafter{\expandafter{\expandafter}#1}%
}
-\CF@def\CF@make@other#1{%
- \ifx\@empty#1\@empty
- \else
- \expandafter\@makeother\@car#1\@nil
- \CF@swap@fi
- \expandafter\CF@make@other\expandafter{\@gobble#1}%
- \fi
-}
-
\CF@def\chemfig{\@testopt\CF@chemfig@i{}}
\CF@def\CF@chemfig@i[#1]{\@testopt{\CF@chemfig@ii[#1]}{}}
\CF@def\CF@chemfig@ii[#1][#2]{%
- \edef\CF@tmp@str{[remember picture,every node/.style={anchor=base,inner sep=0pt,outer sep=0pt,minimum size=0pt\ifx\@empty#2\@empty\else,#2\fi},baseline\ifx\@empty#1\@empty\else,#1\fi]}%
+ \edef\CF@tmp@str{[remember picture,every node/.style={anchor=base,inner sep=\z@,outer sep=\z@,minimum size=\z@\ifx\@empty#2\@empty\else,#2\fi},baseline\ifx\@empty#1\@empty\else,#1\fi]}%
\expandafter\tikzpicture\CF@tmp@str
\begingroup
\let\CF@hook@list\@empty
@@ -1227,90 +1218,100 @@
\setlewis{}{}{}
-\CF@def\lewis{\begingroup\@makeother;\@makeother:\CF@lewis@i}
-
-\CF@def\CF@lewis@i#1{\CF@lewis@ii#1\@nil}
-
-\CF@def\CF@lewis@ii#1,#2\@nil{%
- \setbox\CF@lewis@box\hbox{\printatom{#2}}%
- \def\CF@lewis@remainpos{#1}%
- \let\CF@lewis@previouspos\@empty
- \loop
- \unless\ifx\CF@lewis@remainpos\@empty
- \edef\CF@lewis@currentpos{\expandafter\@car\CF@lewis@remainpos\@nil}%
- \edef\CF@lewis@remainpos{\expandafter\@gobble\CF@lewis@remainpos}%
- \pgfmathparse{\wd\CF@lewis@box/2+\ifcase\CF@lewis@currentpos\space1\or1\or0\or-1\or-1\or-1\or0\or1\fi*(\wd\CF@lewis@box/2+\CF@lewis@offset)}%
- \let\CF@lewis@x\pgfmathresult
- \pgfmathparse{\ht\CF@lewis@box/2+\ifcase\CF@lewis@currentpos\space0\or1\or1\or1\or0\or-1\or-1\or-1\fi*(\ht\CF@lewis@box/2\ifnum\CF@lewis@currentpos>4 +\dp\CF@lewis@box\fi+\CF@lewis@offset)}%
- \let\CF@lewis@y\pgfmathresult
- \edef\CF@lewis@xoffset{\ifcase\CF@lewis@currentpos\space
- 0\or0.70711\or1\or0.70711\or0\or-0.70711\or-1\or-0.70711\fi}%
- \edef\CF@lewis@yoffset{\ifcase\CF@lewis@currentpos\space
- -1\or-0.70711\or0\or0.70711\or1\or0.70711\or0\or-0.70711\fi}%
- \pgfmathparse{veclen(\CF@lewis@xoffset,\CF@lewis@yoffset)}\let\CF@len@normvec\pgfmathresult
- \edef\CF@lewis@diagmul{\ifcase\CF@lewis@currentpos\space1\or0\or1\or0\or1\or0\or1\or0\fi}% annule l'offset pour les diagonales
- \if.\expandafter\@car\CF@lewis@remainpos\relax\@nil
+\CF@def\Lewis{%
+ \tikzpicture[every node/.style={anchor=base,inner sep=\z@,outer sep=\z@,minimum size=\z@},baseline]%
+ \@makeother;\@makeother:%
+ \CF@lewis@i{}}
+
+\CF@def\lewis{%
+ \tikzpicture[every node/.style={anchor=base,inner sep=\z@,outer sep=\z@,minimum size=\z@},baseline]%
+ \@makeother;\@makeother:%
+ \CF@lewis@i{overlay}}
+
+\CF@def\CF@lewis@i#1#2{\CF@lewis@ii#2\@nil{#1}}
+
+\CF@def\CF@lewis@ii#1,#2\@nil#3{%
+ \setbox\CF@lewis@box\hbox{\printatom{#2}}%
+ \node(CF@lewis@anchor){};
+ \def\CF@lewis@remainpos{#1}%
+ \let\CF@lewis@previouspos\@empty
+ \loop
+ \unless\ifx\CF@lewis@remainpos\@empty
+ \edef\CF@lewis@currentpos{\expandafter\@car\CF@lewis@remainpos\@nil}%
\edef\CF@lewis@remainpos{\expandafter\@gobble\CF@lewis@remainpos}%
- \tikz \draw[overlay,fill,black]
- (\CF@lewis@x pt-\CF@lewis@yoffset*\CF@lewis@diagmul*0.1ex,
- \CF@lewis@y pt+\CF@lewis@xoffset*\CF@lewis@diagmul*0.1ex)circle(0.15ex);%
- \else
- \if|\expandafter\@car\CF@lewis@remainpos\relax\@nil
+ \pgfmathparse{\wd\CF@lewis@box/2+\ifcase\CF@lewis@currentpos\space1\or1\or0\or-1\or-1\or-1\or0\or1\fi*(\wd\CF@lewis@box/2+\CF@lewis@offset)}%
+ \let\CF@lewis@x\pgfmathresult
+ \pgfmathparse{\ht\CF@lewis@box/2+\ifcase\CF@lewis@currentpos\space0\or1\or1\or1\or0\or-1\or-1\or-1\fi*(\ht\CF@lewis@box/2\ifnum\CF@lewis@currentpos>4 +\dp\CF@lewis@box\fi+\CF@lewis@offset)}%
+ \let\CF@lewis@y\pgfmathresult
+ \edef\CF@lewis@xoffset{\ifcase\CF@lewis@currentpos\space
+ 0\or0.70711\or1\or0.70711\or0\or-0.70711\or-1\or-0.70711\fi}%
+ \edef\CF@lewis@yoffset{\ifcase\CF@lewis@currentpos\space
+ -1\or-0.70711\or0\or0.70711\or1\or0.70711\or0\or-0.70711\fi}%
+ \pgfmathparse{veclen(\CF@lewis@xoffset,\CF@lewis@yoffset)}\let\CF@len@normvec\pgfmathresult
+ \edef\CF@lewis@diagmul{\ifcase\CF@lewis@currentpos\space1\or0\or1\or0\or1\or0\or1\or0\fi}% annule l'offset pour les diagonales
+ \if.\expandafter\@car\CF@lewis@remainpos\relax\@nil
\edef\CF@lewis@remainpos{\expandafter\@gobble\CF@lewis@remainpos}%
- \expandafter\tikz\expandafter\draw\expandafter[\CF@lewis@style,overlay]%
- (\CF@lewis@x-\CF@lewis@length*\CF@lewis@xoffset/2 pt,\CF@lewis@y-\CF@lewis@length*\CF@lewis@yoffset/2 pt)--
- ([xshift=-\CF@lewis@yoffset*\CF@lewis@widthdouble,yshift=\CF@lewis@xoffset*\CF@lewis@widthdouble]\CF@lewis@x-\CF@lewis@xoffset*\CF@lewis@length/2 pt,\CF@lewis@y-\CF@lewis@yoffset*\CF@lewis@length/2 pt)--
- ([xshift=-\CF@lewis@yoffset*\CF@lewis@widthdouble,yshift=\CF@lewis@xoffset*\CF@lewis@widthdouble]\CF@lewis@x+\CF@lewis@length*\CF@lewis@xoffset/2 pt,\CF@lewis@y+\CF@lewis@length*\CF@lewis@yoffset/2 pt)--
- (\CF@lewis@x+\CF@lewis@length*\CF@lewis@xoffset/2 pt,\CF@lewis@y+\CF@lewis@length*\CF@lewis@yoffset/2 pt)--cycle;%
+ \draw[fill,black,#3]
+ (\CF@lewis@x pt-\CF@lewis@yoffset*\CF@lewis@diagmul*0.1ex,
+ \CF@lewis@y pt+\CF@lewis@xoffset*\CF@lewis@diagmul*0.1ex)circle(0.15ex);%
\else
- \if:\expandafter\@car\CF@lewis@remainpos\relax\@nil
+ \if|\expandafter\@car\CF@lewis@remainpos\relax\@nil
\edef\CF@lewis@remainpos{\expandafter\@gobble\CF@lewis@remainpos}%
- \tikz \draw[overlay,fill,black]
- (\CF@lewis@x pt-\CF@lewis@yoffset*\CF@lewis@diagmul*0.2ex-.2em*\CF@lewis@xoffset/\CF@len@normvec,\CF@lewis@y pt+\CF@lewis@xoffset*\CF@lewis@diagmul*0.2ex-.2em*\CF@lewis@yoffset/\CF@len@normvec)circle(0.15ex)%
- (\CF@lewis@x pt-\CF@lewis@yoffset*\CF@lewis@diagmul*0.2ex+.2em*\CF@lewis@xoffset/\CF@len@normvec,\CF@lewis@y pt+\CF@lewis@xoffset*\CF@lewis@diagmul*0.2ex+.2em*\CF@lewis@yoffset/\CF@len@normvec)circle(0.15ex);%
+ \expandafter\draw\expandafter[\CF@lewis@style,#3]%
+ (\CF@lewis@x-\CF@lewis@length*\CF@lewis@xoffset/2 pt,\CF@lewis@y-\CF@lewis@length*\CF@lewis@yoffset/2 pt)--
+ ([xshift=-\CF@lewis@yoffset*\CF@lewis@widthdouble,yshift=\CF@lewis@xoffset*\CF@lewis@widthdouble]\CF@lewis@x-\CF@lewis@xoffset*\CF@lewis@length/2 pt,\CF@lewis@y-\CF@lewis@yoffset*\CF@lewis@length/2 pt)--
+ ([xshift=-\CF@lewis@yoffset*\CF@lewis@widthdouble,yshift=\CF@lewis@xoffset*\CF@lewis@widthdouble]\CF@lewis@x+\CF@lewis@length*\CF@lewis@xoffset/2 pt,\CF@lewis@y+\CF@lewis@length*\CF@lewis@yoffset/2 pt)--
+ (\CF@lewis@x+\CF@lewis@length*\CF@lewis@xoffset/2 pt,\CF@lewis@y+\CF@lewis@length*\CF@lewis@yoffset/2 pt)--cycle;%
\else
- \expandafter\tikz\expandafter\draw\expandafter[\CF@lewis@style,overlay]%
- (\CF@lewis@x-\CF@lewis@length*\CF@lewis@xoffset/2 pt,\CF@lewis@y-\CF@lewis@length*\CF@lewis@yoffset/2 pt)--%
- (\CF@lewis@x+\CF@lewis@length*\CF@lewis@xoffset/2 pt,\CF@lewis@y+\CF@lewis@length*\CF@lewis@yoffset/2 pt);%
+ \if:\expandafter\@car\CF@lewis@remainpos\relax\@nil
+ \edef\CF@lewis@remainpos{\expandafter\@gobble\CF@lewis@remainpos}%
+ \draw[fill,black,#3]
+ (\CF@lewis@x pt-\CF@lewis@yoffset*\CF@lewis@diagmul*0.2ex-.2em*\CF@lewis@xoffset/\CF@len@normvec,\CF@lewis@y pt+\CF@lewis@xoffset*\CF@lewis@diagmul*0.2ex-.2em*\CF@lewis@yoffset/\CF@len@normvec)circle(0.15ex)%
+ (\CF@lewis@x pt-\CF@lewis@yoffset*\CF@lewis@diagmul*0.2ex+.2em*\CF@lewis@xoffset/\CF@len@normvec,\CF@lewis@y pt+\CF@lewis@xoffset*\CF@lewis@diagmul*0.2ex+.2em*\CF@lewis@yoffset/\CF@len@normvec)circle(0.15ex);%
+ \else
+ \expandafter\draw\expandafter[\CF@lewis@style,#3]%
+ (\CF@lewis@x-\CF@lewis@length*\CF@lewis@xoffset/2 pt,\CF@lewis@y-\CF@lewis@length*\CF@lewis@yoffset/2 pt)--%
+ (\CF@lewis@x+\CF@lewis@length*\CF@lewis@xoffset/2 pt,\CF@lewis@y+\CF@lewis@length*\CF@lewis@yoffset/2 pt);%
+ \fi
\fi
- \fi
- \fi
- \repeat
- \box\CF@lewis@box
- \endgroup
+ \fi
+ \repeat
+ \node[anchor=base west]at(CF@lewis@anchor){\box\CF@lewis@box};%
+ \endtikzpicture
}
-\CF@def\chembelow{%
- \@testopt\CF@chembelow{1.5pt}}
+\CF@def\Chembelow{\begingroup\let\CF@tmp@str\@gobble\CF@chembelow@i}
-\CF@def\CF@chembelow[#1]#2#3{%
+\CF@def\chembelow{\begingroup\let\CF@tmp@str\@firstofone\CF@chembelow@i}
+
+\CF@def\CF@chembelow@i{\@testopt\CF@chembelow@ii{1.5pt}}
+
+\CF@def\CF@chembelow@ii[#1]#2#3{%
\setbox\CF@box@boxa\hbox{\printatom{#2}}\setbox\CF@box@boxb\hbox{\printatom{#3}}%
\vtop{%
\hbox{\printatom{#2}}%
- \hrule width0pt depth0pt height#1\relax
- \hbox{%
- \hskip\dimexpr(\wd\CF@box@boxa-\wd\CF@box@boxb)/\tw@
- \printatom{#3}%
- \hskip\dimexpr(\wd\CF@box@boxa-\wd\CF@box@boxb)/\tw@
- }%
- \vskip-\dimexpr\ht\CF@box@boxb+\dp\CF@box@boxb+#1\relax
+ \hrule width\z@ depth\z@ height#1
+ \hbox to\wd\CF@box@boxa{\hss\printatom{#3}\hss}%
+ \CF@tmp@str{\hrule width\z@ depth\z@ height-\dimexpr\ht\CF@box@boxb+\dp\CF@box@boxb+#1\relax}%
}%
+ \endgroup
}
-\CF@def\chemabove{%
- \@testopt\CF@chemabove{1.5pt}}
+\CF@def\Chemabove{\begingroup\let\CF@tmp@str\@gobble\CF@chemabove@i}
+
+\CF@def\chemabove{\begingroup\let\CF@tmp@str\@firstofone\CF@chemabove@i}
+
+\CF@def\CF@chemabove@i{\@testopt\CF@chemabove@ii{1.5pt}}
-\CF@def\CF@chemabove[#1]#2#3{%
+\CF@def\CF@chemabove@ii[#1]#2#3{%
\setbox\CF@box@boxa\hbox{\printatom{#2}}\setbox\CF@box@boxb\hbox{\printatom{#3}}%
- \vtop{%
+ \vbox{%
+ \CF@tmp@str{\hrule width\z@ depth\z@ height-\dimexpr\ht\CF@box@boxb+\dp\CF@box@boxb+#1\relax}%
+ \hbox to\wd\CF@box@boxa{\hss\printatom{#3}\hss}%
+ \hrule width\z@ depth\z@ height#1
\hbox{\printatom{#2}}%
- \hrule width0pt depth0pt height-\dimexpr#1+\ht\CF@box@boxa+\ht\CF@box@boxb+\dp\CF@box@boxb\relax
- \hbox{%
- \hskip\dimexpr(\wd\CF@box@boxa-\wd\CF@box@boxb)/\tw@
- \printatom{#3}%
- \hskip\dimexpr(\wd\CF@box@boxa-\wd\CF@box@boxb)/\tw@
- }%
- }%
+ }%
+ \endgroup
}
%%%%%% les signes et les fl\`eches
@@ -1326,15 +1327,14 @@
\setchemrel{}{}{}
-\CF@def\chemrel{%
- \@testopt\CF@chemchemrel@i{}}
+\CF@def\chemrel{\@testopt\CF@chemchemrel@i{}}
\CF@def\CF@chemchemrel@i[#1]{\@testopt{\CF@chemchemrel@ii[#1]}{}}
\CF@def\CF@chemchemrel@ii[#1][#2]#3{%
\def\CF@chemrel@stuff
{\leavevmode\kern\CF@chemrel@hsep
- \tikzpicture[every node/.style={anchor=base,inner sep=0pt,outer sep=0pt,minimum size=0pt},baseline]%
+ \tikzpicture[every node/.style={anchor=base,inner sep=\z@,outer sep=\z@,minimum size=\z@},baseline]%
\CF@if@instr{#3}{<>}%
{\node[yshift=-1pt] at(0,0)(chemrel@start){\vphantom I};\node[yshift=-1pt] at(\CF@chemrel@length,0)(chemrel@end){\vphantom I};%
\expandafter\draw\expandafter[\CF@remove@equichars#3,\@nil-](chemrel@end)--(chemrel@start);\fill (chemrel@start)--++(4pt,-1.75pt)--+(-1.5pt,1.75pt)--cycle;%
@@ -1407,6 +1407,625 @@
}%
}
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%% S C H E M A S R E A C T I O N N E L S %%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+\newcount\CF@compound@cnt
+
+\newdimen\CF@arrow@size
+
+\newif\ifCF@name@start
+\newif\ifCF@name@end
+\newif\ifCF@reac@debug
+
+\let\CF@scheme@nest\z@% ne PAS modifier cette ligne !
+
+\CF@def\CF@subscheme{\@testopt\CF@subscheme@i{}}
+\CF@def\CF@subscheme@i[#1]{\@testopt{\CF@subscheme@ii[#1]}{text}}
+\CF@def\CF@subscheme@ii[#1][#2]#3{\schemestart[#1][#2]#3\schemestop}
+
+\CF@def\schemedebug#1{% #1=true ou false
+ \ifcsname CF@reac@debug#1\endcsname\csname CF@reac@debug#1\endcsname\else\CF@reac@debugfalse\fi
+}
+\schemedebug{false}
+
+\CF@def\setcompoundstyle{\def\CF@default@compound@style}
+\setcompoundstyle{}
+
+\CF@def\CF@set@arrow@style#1,#2,#3\@nil#4#5#6{%
+ \def#4{#1}%
+ \expandafter\def\expandafter#5\expandafter{#2}%
+ \expandafter\expandafter\expandafter\def\expandafter\expandafter\expandafter#6\expandafter\expandafter\expandafter{\expandafter\CF@sanitize@lastitem#3,\@empty\@nil}%
+}
+
+\CF@def\setarrowdefault#1{%
+ \CF@set@arrow@style#1,\@empty,\@empty\@nil\CF@default@arrow@angle\CF@default@arrow@length\CF@default@arrow@style
+ \ifx\@empty\CF@default@arrow@angle\def\CF@default@arrow@angle{0}\fi
+ \ifx\@empty\CF@default@arrow@length\def\CF@default@arrow@length{1}\fi
+}
+\setarrowdefault{}
+
+\CF@def\setarrowoffset#1{\def\CF@arrow@offset{#1}\ifx\CF@arrow@offset\@empty\def\CF@arrow@offset{1em}\fi}
+\setarrowoffset{}
+
+\CF@def\setcompoundsep#1{\def\CF@compound@sep{#1}\ifx\CF@compound@sep\@empty\def\CF@compound@sep{5em}\fi}
+\setcompoundsep{}
+
+\CF@def\setarrowlabelsep#1{\def\CF@arrow@labelsep{#1}\ifx\CF@arrow@labelsep\@empty\def\CF@arrow@labelsep{3pt}\fi}
+\setarrowlabelsep{}
+
+\CF@def\chemleft#1#2\chemright#3{%
+ \leavevmode
+ \begingroup
+ \setbox\z@\hbox{$\vcenter{\hbox{}}$}\edef\CF@delim@math@ht{\the\ht\z@}%
+ \setbox\z@\hbox{#2}\edef\CF@delim@dim{\the\dimexpr(\ht\z@+\dp\z@)/\tw@}%
+ \edef\CF@delim@shift{\the\dimexpr(\ht\z@-\dp\z@)/\tw@-\CF@delim@math@ht}%
+ \raise\CF@delim@shift\hbox{$\left#1\vrule height\CF@delim@dim depth\CF@delim@dim width\z@\right.$}\unhbox\z@
+ \raise\CF@delim@shift\hbox{$\left.\vrule height\CF@delim@dim depth\CF@delim@dim width\z@\right#3$}%
+ \endgroup
+}
+
+\CF@def\chemright#1{%
+ \immediate\write\CF@unused{Package \CF@package@name\space Warning: "\string\chemright\string#1"ignored! No \string\chemleft\space previously found.^^J}%
+}
+
+\CF@def\chemup#1#2\chemdown#3{%
+ \begingroup
+ \setbox\z@\hbox{\printatom{#2}}\edef\CF@delim@dim{\the\dimexpr\wd\z@/\tw@}%
+ \tikzpicture[every node/.style={inner sep=\z@,outer sep=\z@,minimum size=\z@},baseline]%
+ \node[anchor=base west](chem@stuff){\unhbox\z@};%
+ \node[at=(chem@stuff.north),anchor=east,rotate=-90]{$\left#1\vrule height\CF@delim@dim depth\CF@delim@dim width\z@\right.$};%
+ \node[at=(chem@stuff.south),anchor=west,rotate=-90]{$\left.\vrule height\CF@delim@dim depth\CF@delim@dim width\z@\right#3$};%
+ \endtikzpicture
+ \endgroup
+}
+
+\CF@def\chemdown#1{%
+ \immediate\write\CF@unused{Package \CF@package@name\space Warning: "\string\chemdown\string#1" ignored! No \string\chemup\space previously found.^^J}%
+}
+
+\CF@def\CF@and{\futurelet\CF@toks@a\CF@and@i}
+
+\CF@def\CF@and@i{%
+ \ifx\CF@toks@a\bgroup
+ \expandafter\CF@and@ii
+ \else
+ \expandafter\CF@and@ii\expandafter{\expandafter}%
+ \fi
+}
+
+\CF@def\CF@and@ii#1{%
+ \CF@set@arrow@style#1,\@empty,\@empty\@nil\CF@signspace@ante\CF@signspace@post\CF@sign@vshift
+ \ifx\@empty\CF@signspace@ante\let\CF@signspace@ante\CF@signspace@ante@default\fi
+ \ifx\@empty\CF@signspace@post\let\CF@signspace@post\CF@signspace@post@default\fi
+ \ifx\@empty\CF@sign@vshift\let\CF@sign@vshift\CF@sign@vshift@default\fi
+ \raise\CF@sign@vshift\hbox{\kern\CF@signspace@ante$+$\kern\CF@signspace@post}%
+}
+
+\CF@def\setandsign#1{%
+ \CF@set@arrow@style#1,\@empty,\@empty\@nil\CF@signspace@ante@default\CF@signspace@post@default\CF@sign@vshift@default
+ \ifx\@empty\CF@signspace@ante@default\def\CF@signspace@ante@default{.5em}\fi
+ \ifx\@empty\CF@signspace@post@default\def\CF@signspace@post@default{.5em}\fi
+ \ifx\@empty\CF@sign@vshift@default\let\CF@sign@vshift@default\z@\fi
+}
+\setandsign{}
+
+\CF@def\schemestart{%
+ \xdef\CF@scheme@nest{\number\numexpr\CF@scheme@nest+\@ne}%
+ \@testopt\CF@schemestart@i{}%
+}
+
+\CF@def\CF@schemestart@i[#1]{%
+ \CF@set@arrow@style#1,\@empty,\@empty\@nil\CF@arrow@angle\CF@arrow@length\CF@arrow@style
+ \ifx\@empty\CF@arrow@angle\let\CF@arrow@angle\CF@default@arrow@angle\fi
+ \ifx\@empty\CF@arrow@length\let\CF@arrow@length\CF@default@arrow@length\fi
+ \ifx\@empty\CF@arrow@style
+ \let\CF@arrow@style\CF@default@arrow@style
+ \else
+ \expandafter\expandafter\expandafter\def\expandafter\expandafter\expandafter\CF@arrow@style\expandafter\expandafter\expandafter
+ {\expandafter\CF@default@arrow@style\expandafter,\CF@arrow@style}% se rajoute apr\`es le style par d\'efaut
+ \fi
+ \ifCF@reac@debug
+ \tikzpicture[every node/.style={draw,anchor=base,inner sep=\z@,outer sep=\z@,minimum size=1.5pt},baseline,remember picture]%
+ \else
+ \tikzpicture[every node/.style={anchor=base,inner sep=\z@,outer sep=\z@,minimum size=\z@},baseline,remember picture]%
+ \fi
+ \let\+\CF@and
+ \let\arrow\CF@arrow
+ \let\schemestop\CF@schemestop
+ \let\subscheme\CF@subscheme
+ \@testopt{\CF@schemestart@ii[#1]}{text}%
+}
+
+\CF@def\CF@schemestart@ii[#1][#2]{%
+ \ifnum\CF@scheme@nest=\@ne% la commande n'est pas imbriqu\'ee ?
+ \CF@compound@cnt\z@
+ \fi
+ \edef\CF@current@nodename{c\number\CF@compound@cnt}%
+ \let\CF@next@nodename\@empty
+ \let\CF@next@nodestyle\@empty
+ \let\CF@direct@arrow@list\@empty
+ \ifCF@reac@debug
+ \node[fill,green](\CF@current@nodename){};%
+ \else
+ \node(\CF@current@nodename){};%
+ \fi
+ \def\CF@next@nodeanchor{#2}%
+ \ifx\CF@next@nodeanchor\@empty\def\CF@next@nodeanchor{text}\fi
+ \let\CF@compound\@empty
+ \CF@schemestart@iii
+}
+
+\CF@def\CF@schemestart@iii{%
+ \futurelet\CF@toks@a\CF@schemestart@v% va sentir le prochain token...
+}
+
+{\def\:{\CF@schemestart@iv}\expandafter}\expandafter\CF@def\: {\futurelet\CF@toks@a\CF@schemestart@v}
+
+\CF@def\CF@schemestart@v{% ... et l'examine :
+ \CF@if@firsttokin@i{\arrow\schemestop\merge}%
+ \relax
+ {\ifx\CF@toks@a\bgroup
+ \let\CF@next@action\CF@add@nextarg
+ \else
+ \ifx\CF@toks@a\@sptoken
+ \CF@add@tocs\CF@compound{ }%
+ \let\CF@next@action\CF@schemestart@iv
+ \else
+ \def\CF@next@action{\CF@add@tocs\CF@compound}%
+ \afterassignment\CF@schemestart@iii
+ \fi
+ \fi
+ \CF@next@action}%
+}
+
+\CF@def\CF@add@nextarg#1{\CF@add@tocs\CF@compound{{#1}}\CF@schemestart@iii}
+
+\CF@def\CF@display@compound#1#2{% #1 = nom et #2 = style
+ \unless\ifx\@empty\CF@compound
+ \global\advance\CF@compound@cnt\@ne
+ \ifx\CF@default@compound@style\@empty
+ \let\CF@current@nodestyle\@empty
+ \else
+ \expandafter\def\expandafter\CF@current@nodestyle\expandafter{\CF@default@compound@style,}%
+ \fi
+ \CF@add@tocs\CF@current@nodestyle{anchor=\CF@next@nodeanchor,at=(\CF@current@nodename)}%
+ \ifx\@empty#2\@empty
+ \unless\ifx\CF@next@nodestyle\@empty
+ \CF@expadd@tocs\CF@current@nodestyle{\expandafter,\CF@next@nodestyle}%
+ \fi
+ \else
+ \unless\ifx\CF@next@nodestyle\@empty
+ \immediate\write\CF@unused{Package \CF@package@name\space Warning: two styles for the same node, first style "\CF@next@nodestyle" ignored^^J}%
+ \fi
+ \CF@add@tocs\CF@current@nodestyle{,#2}%
+ \fi
+ \ifx\@empty#1\@empty
+ \edef\CF@tmp@str{\ifx\CF@next@nodename\@empty c\number\CF@compound@cnt\else\CF@next@nodename\fi}%
+ \else
+ \unless\ifx\CF@next@nodename\@empty
+ \immediate\write\CF@unused{Package \CF@package@name\space Warning: two names for the same node, first name "\CF@next@nodename" ignored^^J}%
+ \fi
+ \edef\CF@tmp@str{#1}%
+ \fi
+ \expandafter\node\expandafter[\CF@current@nodestyle](\CF@tmp@str){\CF@compound};%
+ \ifCF@reac@debug
+ \node[draw=none,anchor=270,at=(\CF@tmp@str.90),fill=green!60,overlay,opacity=0.5]{\scriptsize\bfseries\CF@tmp@str};%
+ \fi
+ \let\CF@current@nodename\CF@tmp@str
+ \fi
+}
+
+\CF@def\CF@schemestop{%
+ \CF@display@compound{}{}%
+ \CF@direct@arrow@list
+ \endtikzpicture
+ \xdef\CF@scheme@nest{\number\numexpr\CF@scheme@nest-\@ne}%
+}
+
+\CF@def\CF@analyse@arrowarg#1{\CF@analyse@arrowarg@i#1[]\@nil}
+
+\CF@def\CF@analyse@arrowarg@i#1[#2]#3\@nil{%
+ \CF@if@instr{#1}.{\CF@add@tocs\CF@tmp@str{#1[#2]}}{\CF@add@tocs\CF@tmp@str{#1.[#2]}}%
+}
+
+\CF@def\CF@arrow{%
+ \@ifnextchar(%
+ \CF@arrow@i
+ {\@ifnextchar\bgroup{\CF@arrow@ii(.[]--.[])}{\CF@arrow@ii(.[]--.[]){}}}%
+}
+
+\CF@def\CF@arrow@i(#1--#2){%
+ \def\CF@tmp@str{(}%
+ \CF@analyse@arrowarg{#1}%
+ \CF@add@tocs\CF@tmp@str{--}%
+ \CF@analyse@arrowarg{#2}%
+ \CF@add@tocs\CF@tmp@str)%
+ \@ifnextchar\bgroup{\expandafter\CF@arrow@ii\CF@tmp@str}{\expandafter\CF@arrow@ii\CF@tmp@str{}}%
+}
+
+\CF@def\CF@arrow@ii(#1.#2[#3]--#4.#5[#6])#7{%
+ \def\CF@current@arrowtype{#7}%
+ \ifx\CF@current@arrowtype\@empty\def\CF@current@arrowtype{->}\fi
+ \@testopt{\CF@arrow@iii(#1.#2[#3]--#4.#5[#6])}{}%
+}
+
+\CF@def\CF@arrow@iii(#1.#2[#3]--#4.#5[#6])[#7]{%
+ \def\CF@tmp@str{\CF@arrow@v(#1.#2[#3]--#4.#5[#6])}%
+ \CF@arrow@iv#7,\@empty,\@empty\@nil
+}
+
+\CF@def\CF@arrow@iv#1,#2,#3\@nil{%
+ \CF@add@tocs\CF@tmp@str{{#1}}%
+ \CF@expadd@tocs\CF@tmp@str{\expandafter{#2}}%
+ \expandafter\CF@expadd@tocs\expandafter\CF@tmp@str\expandafter{\expandafter\expandafter\expandafter{\expandafter\CF@sanitize@lastitem#3,\@empty\@nil}}%
+ \CF@tmp@str
+}
+
+% #1, #4 : nom des nodes #2, #5 : ancres des nodes #3, #6 : stryles des nodes
+% #7 : angle fl\`eche #8 : longueur fl\`eche #9 : style tikz de la fl\`eche
+\CF@def\CF@arrow@v(#1.#2[#3]--#4.#5[#6])#7#8#9{%
+ \let\CF@arrow@current@style\CF@arrow@style
+ \if\string @\expandafter\@car\detokenize{#1.}\@nil% "." au cas o\`u #1 est vide
+ \if\string @\expandafter\@car\detokenize{#4.}\@nil
+ \CF@expadd@tocs\CF@direct@arrow@list{\expandafter\CF@direct@arrow\expandafter{\CF@current@arrowtype}{#1}{#2}{#4}{#5}{#9}}%
+ \let\CF@next@action\CF@schemestart@iii
+ \else
+ \unless\ifx\CF@arrow@current@style\@empty\CF@add@tocs\CF@arrow@current@style,\fi
+ \ifx\@empty#9\@empty\else\CF@add@tocs\CF@arrow@current@style{#9,}\fi
+ \CF@display@compound{}{#3}%
+ \def\CF@next@nodename{#4}%
+ \expandafter\def\expandafter\CF@current@nodename\expandafter{\@gobble#1}%
+ \let\CF@arrow@start@name\CF@current@nodename
+ \let\CF@arrow@end@name\CF@next@nodename
+ \CF@arrow@vi{#7}{#8}{#2}{#5}%
+ \def\CF@next@nodestyle{#6}%
+ \fi
+ \else
+ \unless\ifx\CF@arrow@current@style\@empty\CF@add@tocs\CF@arrow@current@style,\fi
+ \ifx\@empty#9\@empty\else\CF@add@tocs\CF@arrow@current@style{#9,}\fi
+ \if\string @\expandafter\@car\detokenize{#2.}\@nil
+ \errmessage{Package \CF@package@name\space Error: syntax "(<name>--@<name>)" is not allowed}%
+ \else
+ \CF@display@compound{#1}{#3}%
+ \edef\CF@arrow@start@name{\ifx\@empty#1\@empty\CF@current@nodename\else#1\fi\ifx\@empty#2\@empty\else.#2\fi}%
+ \CF@arrow@vi{#7}{#8}{#2}{#5}%
+ \def\CF@next@nodename{#4}%
+ \def\CF@next@nodestyle{#6}%
+ \fi
+ \fi
+ \CF@arrow@gobspaces% mange les espaces puis ex\'ecute \CF@next@action
+}
+
+\CF@def\CF@arrow@gobspaces{\futurelet\CF@toks@a\CF@arrow@gobspaces@i}
+
+\CF@def\CF@arrow@gobspaces@i{%
+ \ifx\@sptoken\CF@toks@a
+ \expandafter\CF@arrow@gobspaces@ii
+ \else
+ \expandafter\CF@next@action
+ \fi
+}
+
+{\def\:{\CF@arrow@gobspaces@ii}\expandafter}\expandafter
+\def\: {\futurelet\CF@toks@a\CF@arrow@gobspaces@i}
+
+\CF@def\CF@arrow@vi#1#2#3#4{% #1=angle #2=longueur #3=ancre d\'epart #4=ancre arriv\'ee
+ \def\CF@next@action{\let\CF@compound\@empty\CF@schemestart@iii}%
+ \def\CF@arrow@current@angle{#1}\ifx\@empty\CF@arrow@current@angle\let\CF@arrow@current@angle\CF@arrow@angle\fi
+ \def\CF@current@arrow@length{#2}\ifx\@empty\CF@current@arrow@length\let\CF@current@arrow@length\CF@arrow@length\fi
+ \node[at=(\CF@current@nodename.\ifx\@empty#3\@empty\CF@arrow@current@angle\else#3\fi),shift=(\CF@arrow@current@angle:\CF@current@arrow@length*\CF@compound@sep),cyan,fill](end@arrow@i){};%
+ \edef\CF@arrow@end@name{end@arrow@i\ifx\@empty#4\@empty\else.4\fi}%
+ \ifCF@reac@debug
+ \node[at=(\CF@current@nodename.\ifx\@empty#3\@empty\CF@arrow@current@angle\else#3\fi),shift=(\CF@arrow@current@angle:\CF@arrow@offset),red,fill](start@arrow){};%
+ \node[at=(\CF@current@nodename.\ifx\@empty#3\@empty\CF@arrow@current@angle\else#3\fi),shift=(\CF@arrow@current@angle:\CF@current@arrow@length*\CF@compound@sep-\CF@arrow@offset),red,fill](end@arrow){};%
+ \else
+ \node[at=(\CF@current@nodename.\ifx\@empty#3\@empty\CF@arrow@current@angle\else#3\fi),shift=(\CF@arrow@current@angle:\CF@arrow@offset)](start@arrow){};%
+ \node[at=(\CF@current@nodename.\ifx\@empty#3\@empty\CF@arrow@current@angle\else#3\fi),shift=(\CF@arrow@current@angle:\CF@current@arrow@length*\CF@compound@sep-\CF@arrow@offset)](end@arrow){};%
+ \fi
+ \def\CF@arrow@start@node{start@arrow}\def\CF@arrow@end@node{end@arrow}%
+ \csname\expandafter\CF@grab@arrow@name\CF@current@arrowtype[\@nil\expandafter\expandafter\expandafter\endcsname
+ \expandafter\CF@grab@arrow@args\CF@current@arrowtype[]\@nil[][][][][][][][]\@nil
+ \def\CF@current@nodename{end@arrow@i}%
+ \edef\CF@next@nodeanchor{\ifx\@empty#4\@empty180+\CF@arrow@current@angle\else#4\fi}%
+}
+
+% trace un fl\`eche initi\'ee par (@nom--@nom)
+% #1=type de fl\`eche #2=nom depart #3=ancre d\'epart #4=nom arriv\'ee #5=ancre arriv\'ee #6=style fl\`eche
+\CF@def\CF@direct@arrow#1#2#3#4#5#6{%
+ \path[sloped,allow upside down](\@gobble#2\ifx\@empty#3\@empty\else.#3\fi)--(\@gobble#4\ifx\@empty#5\@empty\else.#5\fi)%
+ coordinate[pos=0,xshift=\CF@arrow@offset](start@direct@arrow)%
+ coordinate[pos=1,xshift=-\CF@arrow@offset](end@direct@arrow);%
+ \def\CF@arrow@start@node{start@direct@arrow}%
+ \def\CF@arrow@end@node{end@direct@arrow}%
+ \expandafter\def\expandafter\CF@arrow@start@name\expandafter{\@gobble#2}%
+ \expandafter\def\expandafter\CF@arrow@end@name\expandafter{\@gobble#4}%
+ \def\CF@arrow@current@style{#6}%
+ \csname\CF@grab@arrow@name#1[]\@nil\expandafter\endcsname\CF@grab@arrow@args#1[]\@nil[][][][][][][][]\@nil
+}
+
+\CF@def\CF@merge@grab@chardir#1[#2][#3]#4\@nil{%
+ \expandafter\futurelet\expandafter\CF@toks@a\expandafter\CF@gobble@tonil\@car#1>\@nil\@nil
+ \ifx>\CF@toks@a\def\CF@merge@angle{0}\def\CF@merge@extreme{xmax}\def\CF@merge@sign{+}\else
+ \ifx<\CF@toks@a\def\CF@merge@angle{180}\def\CF@merge@extreme{xmin}\def\CF@merge@sign{-}\else
+ \ifx^\CF@toks@a\def\CF@merge@angle{90}\def\CF@merge@extreme{ymax}\def\CF@merge@sign{+}\else
+ \ifx v\CF@toks@a\def\CF@merge@angle{-90}\def\CF@merge@extreme{ymin}\def\CF@merge@sign{-}%
+ \fi\fi\fi\fi
+ \def\CF@merge@labelup{#2}\def\CF@merge@labeldo{#3}%
+}
+
+\CF@def\merge#1({%
+ \CF@merge@grab@chardir#1[][]\@nil
+ \CF@merge@i(}
+
+\CF@def\CF@merge@i#1--(#2){\@testopt{\CF@merge@ii#1--(#2)}{}}
+
+\CF@def\CF@merge@ii#1--(#2)[#3]{%
+ \CF@display@compound{}{}%
+ \CF@parse@mergeopt#3,\@empty,\@empty,\@empty\@nil
+ \def\CF@merge@xmax{-16383.99999pt}\let\CF@merge@ymax\CF@merge@xmax
+ \def\CF@merge@xmin{16383.99999pt}\let\CF@merge@ymin\CF@merge@xmin
+ \CF@merge@parse@nodelist#1(\relax)% calcule les maxi des positions
+ \pgfmathparse{\csname CF@merge@\CF@merge@extreme\endcsname\CF@merge@sign\CF@merge@fromcoeff*\CF@compound@sep}%
+ \let\CF@merge@extreme@result\pgfmathresult
+ \CF@merge@iii#1(\relax)% trace les lignes entre les noeuds pr\'ec\'edents et la ligne de jonction
+ \expandafter\def\expandafter\CF@tmp@str\expandafter{\expandafter[\CF@merge@style,shorten <=0,shorten >=0]}%
+ \if x\expandafter\@car\CF@merge@extreme\@nil
+ \CF@add@tocs\CF@tmp@str{(\CF@merge@extreme@result pt,\CF@merge@ymax)--(\CF@merge@extreme@result pt,\CF@merge@ymin)}%
+ \else
+ \CF@add@tocs\CF@tmp@str{(\CF@merge@xmin,\CF@merge@extreme@result pt)--(\CF@merge@xmax,\CF@merge@extreme@result pt)}%
+ \fi
+ \expandafter\draw\CF@tmp@str node[pos=\CF@merge@splitcoeff](merge@point){}% trace la ligne de jonction
+ node[at=(merge@point),shift=(\CF@merge@angle:\CF@compound@sep*\CF@merge@tocoeff-\CF@arrow@offset)](end@merge){}%
+ node[at=(merge@point),shift=(\CF@merge@angle:\CF@compound@sep*\CF@merge@tocoeff)](end@merge@i){};%
+ \let\CF@arrow@current@angle\CF@merge@angle
+ \expandafter\draw\expandafter[\CF@merge@style,shorten <=0,-CF@full](merge@point)--(end@merge)%
+ \expandafter\CF@arrow@display@label@i\expandafter{\CF@merge@labelup}{.5}+\expandafter\CF@arrow@display@label@i\expandafter{\CF@merge@labeldo}{.5}-;%
+ \def\CF@current@nodename{end@merge@i}%
+ \let\CF@tmp@str\@empty
+ \CF@analyse@arrowarg{#2}%
+ \expandafter\CF@merge@iv\CF@tmp@str\@nil
+}
+
+\CF@def\CF@merge@iii(#1){%
+ \if\relax\expandafter\noexpand\@car#1\@nil
+ \else
+ \CF@if@stop{#1}%
+ {\edef\merge@current@nodename{\CF@before@stop#1\@nil}\edef\merge@current@anchor{\CF@after@stop#1\@nil}}%
+ {\def\merge@current@nodename{#1}\let\merge@current@anchor\CF@merge@angle}%
+ \if x\expandafter\@car\CF@merge@extreme\@nil
+ \pgfextracty\CF@dim{\pgfpointanchor\merge@current@nodename\merge@current@anchor}%
+ \expandafter\draw\expandafter[\CF@merge@style,shorten >=0]([shift=(\CF@merge@angle:\CF@arrow@offset)]\merge@current@nodename.\merge@current@anchor)--(\CF@merge@extreme@result pt,\CF@dim);%
+ \else
+ \pgfextractx\CF@dim{\pgfpointanchor\merge@current@nodename\merge@current@anchor}%
+ \expandafter\draw\expandafter[\CF@merge@style,shorten >=0]([shift=(\CF@merge@angle:\CF@arrow@offset)]\merge@current@nodename.\merge@current@anchor)--(\CF@dim,\CF@merge@extreme@result pt);%
+ \fi
+ \expandafter\CF@merge@iii
+ \fi
+}
+
+\CF@def\CF@merge@iv#1.#2[#3]\@nil{%
+ \def\CF@next@nodename{#1}%
+ \edef\CF@next@nodeanchor{\ifx\@empty#2\@empty180+\CF@merge@angle\else#2\fi}%
+ \def\CF@next@nodestyle{#3}%
+ \let\CF@compound\@empty
+ \CF@schemestart@iii
+}
+
+\CF@def\CF@parse@mergeopt#1,#2,#3,#4\@nil{%
+ \def\CF@merge@fromcoeff{#1}\ifx\@empty\CF@merge@fromcoeff\def\CF@merge@fromcoeff{0.5}\fi
+ \expandafter\def\expandafter\CF@merge@tocoeff\expandafter{#2}\ifx\@empty\CF@merge@tocoeff\def\CF@merge@tocoeff{0.5}\fi
+ \expandafter\def\expandafter\CF@merge@splitcoeff\expandafter{#3}\ifx\@empty\CF@merge@splitcoeff\def\CF@merge@splitcoeff{0.5}\fi
+ \expandafter\expandafter\expandafter\def\expandafter\expandafter\expandafter\CF@merge@style\expandafter\expandafter\expandafter{\expandafter\CF@sanitize@lastitem#4,\@empty\@nil}%
+}
+
+\CF@def\CF@merge@parse@nodelist(#1){%
+ \if\relax\expandafter\noexpand\@car#1\@nil
+ \else
+ \CF@if@stop{#1}%
+ {\edef\merge@current@nodename{\CF@before@stop#1\@nil}\edef\merge@current@anchor{\CF@after@stop#1\@nil}}%
+ {\def\merge@current@nodename{#1}\let\merge@current@anchor\CF@merge@angle}%
+ \pgfextractx\CF@dim{\pgfpointanchor\merge@current@nodename\merge@current@anchor}%
+ \ifdim\CF@dim>\CF@merge@xmax\edef\CF@merge@xmax{\the\CF@dim}\fi
+ \ifdim\CF@dim<\CF@merge@xmin\edef\CF@merge@xmin{\the\CF@dim}\fi
+ \pgfextracty\CF@dim{\pgfpointanchor\merge@current@nodename\merge@current@anchor}%
+ \ifdim\CF@dim>\CF@merge@ymax\edef\CF@merge@ymax{\the\CF@dim}\fi
+ \ifdim\CF@dim<\CF@merge@ymin\edef\CF@merge@ymin{\the\CF@dim}\fi
+ \expandafter\CF@merge@parse@nodelist
+ \fi
+}
+
+\CF@def\CF@grab@arrow@name#1[#2\@nil{#1}
+\CF@def\CF@grab@arrow@args#1[#2\@nil{[#2}
+
+\CF@def\CF@make@parameter@text#1{%
+ \toks\z@{}%
+ \CF@cnt@groupnumber#1\relax
+ \CF@make@parameter@text@i1%
+}
+
+\CF@def\CF@make@parameter@text@i#1{%
+ \unless\ifnum#1>\CF@cnt@groupnumber
+ \toks\z@\expandafter{\the\toks\z@[###1]}%
+ \expandafter\CF@make@parameter@text@i\expandafter{\number\numexpr#1+1\expandafter}%
+ \fi
+}
+
+% #1 est le nombre d'arguments optionnels, #2 est le nom et #3 le code
+\CF@def\definearrow#1#2#3{%
+ \begingroup
+ \CF@make@parameter@text{#1}%
+ \expandafter\endgroup
+ \expandafter\def\csname\detokenize{#2}\expandafter\endcsname\the\toks\z@{#3\CF@gobble@tonil}%
+}
+
+\CF@def\CF@if@stop#1{\CF@if@stop@i#1.\@nil}
+\CF@def\CF@if@stop@i#1.#2\@nil{\ifx\@empty#2\@empty\expandafter\@secondoftwo\else\expandafter\@firstoftwo\fi}
+\CF@def\CF@before@stop#1.#2\@nil{#1}
+\CF@def\CF@after@stop#1.#2\@nil{#2}
+
+\CF@def\CF@rotate@node*#1#2\@nil{\CF@if@stop{#1}{\CF@before@stop#1\@nil}{#1}}
+\CF@def\CF@anchor@node*#1#2\@nil#3{\CF@if@stop{#1}{\CF@after@stop#1\@nil}{\CF@arrow@current@angle-#390-#1}}
+
+% #1 = label #2 = position #3 = + ou - (au dessus ou au dessous) #4 : nom du noeud de d\'epart
+% #5 = label #6 = position #7 = + ou - (au dessus ou au dessous) #8 : nom du noeud de fin
+\CF@def\CF@arrow@display@label#1#2#3#4#5#6#7#8{%
+ \ifx\@empty#1#5\@empty\else
+ \path(#4)--(#8)\CF@arrow@display@label@i{#1}{#2}{#3}\CF@arrow@display@label@i{#5}{#6}{#7};%
+ \fi
+}
+
+\CF@def\CF@arrow@display@label@i#1#2#3{%
+ \ifx\@empty#1\@empty\else
+ \if*\expandafter\@car\detokenize{#1}\@nil
+ \ifCF@reac@debug
+ node[pos=#2,sloped,yshift=#3\CF@arrow@labelsep,draw,fill,cyan](shifted@node){}%
+ node[draw,rotate=\CF@rotate@node#1\@nil,anchor=\CF@anchor@node#1\@nil#3,at=(shifted@node)]{\expandafter\@gobble\@gobble#1}%
+ \else
+ node[pos=#2,sloped,yshift=#3\CF@arrow@labelsep](shifted@node){}%
+ node[rotate=\CF@rotate@node#1\@nil,anchor=\CF@anchor@node#1\@nil#3,at=(shifted@node)]{\expandafter\@gobble\@gobble#1}%
+ \fi
+ \else
+ \ifCF@reac@debug
+ node[pos=#2,sloped,yshift=#3\CF@arrow@labelsep,draw,fill,cyan](shifted@node){}%
+ node[draw,pos=#2,anchor=-#390,sloped,yshift=#3\CF@arrow@labelsep]{#1}%
+ \else
+ node[pos=#2,anchor=-#390,sloped,yshift=#3\CF@arrow@labelsep]{#1}%
+ \fi
+ \fi
+ \fi
+}
+
+% pose des noeuds d\'ecal\'es de la dimension #1 \`a (\CF@arrow@start@node) et (\CF@arrow@end@node)
+\CF@def\CF@arrow@shift@nodes#1{%
+ \unless\ifdim\ifx\@empty#1\@empty\z@\else#1\fi=\z@
+ \edef\CF@tmp@str{%
+ \noexpand\path(\CF@arrow@start@node)--(\CF@arrow@end@node)%
+ node[pos=0,sloped,yshift=#1](\CF@arrow@start@node1){}node[pos=1,sloped,yshift=#1](\CF@arrow@end@node1){};}%
+ \CF@tmp@str
+ \edef\CF@arrow@start@node{\CF@arrow@start@node1}\edef\CF@arrow@end@node{\CF@arrow@end@node1}%
+ \fi
+}
+
+\definearrow3{->}{%
+ \CF@arrow@shift@nodes{#3}%
+ \expandafter\draw\expandafter[\CF@arrow@current@style,-CF@full](\CF@arrow@start@node)--(\CF@arrow@end@node);%
+ \CF@arrow@display@label{#1}{0.5}+\CF@arrow@start@node{#2}{0.5}-\CF@arrow@end@node
+}
+
+\definearrow3{<-}{%
+ \CF@arrow@shift@nodes{#3}%
+ \expandafter\draw\expandafter[\CF@arrow@current@style,CF@full-](\CF@arrow@start@node)--(\CF@arrow@end@node);%
+ \CF@arrow@display@label{#1}{0.5}+\CF@arrow@start@node{#2}{0.5}-\CF@arrow@end@node
+}
+
+\definearrow5{-/>}{%
+ \CF@arrow@shift@nodes{#3}%
+ \expandafter\draw\expandafter[\CF@arrow@current@style,-CF@full](\CF@arrow@start@node)--(\CF@arrow@end@node)%
+ coordinate[midway,shift=(\CF@arrow@current@angle:-1pt)](midway@i)%
+ coordinate[midway,shift=(\CF@arrow@current@angle:1pt)](midway@ii)%
+ coordinate[at=(midway@i),shift=(\ifx\@empty#4\@empty225\else#4+180\fi+\CF@arrow@current@angle:\ifx\@empty#5\@empty5pt\else#5\fi)](line@start)%
+ coordinate[at=(midway@i),shift=(\ifx\@empty#4\@empty45\else#4\fi+\CF@arrow@current@angle:\ifx\@empty#5\@empty5pt\else#5\fi)](line@end)%
+ coordinate[at=(midway@ii),shift=(\ifx\@empty#4\@empty225\else#4+180\fi+\CF@arrow@current@angle:\ifx\@empty#5\@empty5pt\else#5\fi)](line@start@i)%
+ coordinate[at=(midway@ii),shift=(\ifx\@empty#4\@empty45\else#4\fi+\CF@arrow@current@angle:\ifx\@empty#5\@empty5pt\else#5\fi)](line@end@i);
+ \draw(line@start)--(line@end);%
+ \draw(line@start@i)--(line@end@i);%
+ \CF@arrow@display@label{#1}{0.5}+\CF@arrow@start@node{#2}{0.5}-\CF@arrow@end@node
+}
+
+\definearrow3{<->}{%
+ \CF@arrow@shift@nodes{#3}%
+ \expandafter\draw\expandafter[\CF@arrow@current@style,CF@full-CF@full](\CF@arrow@start@node)--(\CF@arrow@end@node);%
+ \CF@arrow@display@label{#1}{0.5}+\CF@arrow@start@node{#2}{0.5}-\CF@arrow@end@node
+}
+
+\definearrow3{<=>}{%
+ \CF@arrow@shift@nodes{#3}%
+ \edef\CF@tmp@str{%
+ \noexpand\path[allow upside down](\CF@arrow@start@node)--(\CF@arrow@end@node)%
+ node[pos=0,sloped,yshift=1pt](\CF@arrow@start@node @u0){}%
+ node[pos=0,sloped,yshift=-1pt](\CF@arrow@start@node @d0){}%
+ node[pos=1,sloped,yshift=1pt](\CF@arrow@start@node @u1){}%
+ node[pos=1,sloped,yshift=-1pt](\CF@arrow@start@node @d1){};%
+ }%
+ \CF@tmp@str
+ \expandafter\draw\expandafter[\CF@arrow@current@style,-CF@half](\CF@arrow@start@node @u0)--(\CF@arrow@start@node @u1);%
+ \expandafter\draw\expandafter[\CF@arrow@current@style,CF@half-](\CF@arrow@start@node @d0)--(\CF@arrow@start@node @d1);%
+ \CF@arrow@display@label{#1}{0.5}+\CF@arrow@start@node{#2}{0.5}-\CF@arrow@end@node%
+}
+
+\definearrow3{<->>}{%
+ \CF@arrow@shift@nodes{#3}%
+ \edef\CF@tmp@str{%
+ \noexpand\path[allow upside down](\CF@arrow@start@node)--(\CF@arrow@end@node)%
+ node[pos=0,sloped,yshift=1pt](\CF@arrow@start@node @u0){}%
+ node[pos=0.2,sloped,yshift=-1pt](\CF@arrow@start@node @d0){}%
+ node[pos=1,sloped,yshift=1pt](\CF@arrow@start@node @u1){}%
+ node[pos=0.8,sloped,yshift=-1pt](\CF@arrow@start@node @d1){};%
+ }%
+ \CF@tmp@str
+ \expandafter\draw\expandafter[\CF@arrow@current@style,-CF@half](\CF@arrow@start@node @u0)--(\CF@arrow@start@node @u1);%
+ \expandafter\draw\expandafter[\CF@arrow@current@style,CF@half-](\CF@arrow@start@node @d0)--(\CF@arrow@start@node @d1);%
+ \CF@arrow@display@label{#1}{0.5}+\CF@arrow@start@node{#2}{0.5}-\CF@arrow@end@node%
+}
+
+\definearrow3{<<->}{%
+ \edef\CF@tmp@str{%
+ \noexpand\path[allow upside down](\CF@arrow@start@node)--(\CF@arrow@end@node)%
+ node[pos=0.2,sloped,yshift=1pt](\CF@arrow@start@node @u0){}%
+ node[pos=0,sloped,yshift=-1pt](\CF@arrow@start@node @d0){}%
+ node[pos=0.8,sloped,yshift=1pt](\CF@arrow@start@node @u1){}%
+ node[pos=1,sloped,yshift=-1pt](\CF@arrow@start@node @d1){};%
+ }%
+ \CF@tmp@str
+ \expandafter\draw\expandafter[\CF@arrow@current@style,-CF@half](\CF@arrow@start@node @u0)--(\CF@arrow@start@node @u1);%
+ \expandafter\draw\expandafter[\CF@arrow@current@style,CF@half-](\CF@arrow@start@node @d0)--(\CF@arrow@start@node @d1);%
+ \CF@arrow@display@label{#1}{0.5}+\CF@arrow@start@node{#2}{0.5}-\CF@arrow@end@node
+}
+
+\definearrow30{%
+ \CF@arrow@shift@nodes{#3}%
+ \CF@arrow@display@label{#1}{0.5}+\CF@arrow@start@node{#2}{0.5}-\CF@arrow@end@node}
+
+\definearrow5{-U>}{% #4=coeff du rayon de l'arc de cercle #5=1/2 angle
+ \CF@arrow@shift@nodes{#3}%
+ \expandafter\draw\expandafter[\CF@arrow@current@style,-CF@full](\CF@arrow@start@node)--(\CF@arrow@end@node)node[midway](Uarrow@arctangent){};%
+ \edef\CF@tmp@str{\ifx\@empty#1\@empty[draw=none]\fi}%
+ \expandafter\draw\CF@tmp@str (Uarrow@arctangent)%
+ arc[radius=\CF@compound@sep*\CF@current@arrow@length*\ifx\@empty#4\@empty0.333\else#4\fi,start angle=\CF@arrow@current@angle-90,%
+ delta angle=-\ifx\@empty#5\@empty60\else#5\fi]node(Uarrow@start){};
+ \edef\CF@tmp@str{[\ifx\@empty#2\@empty draw=none,\fi-CF@full]}%
+ \expandafter\draw\CF@tmp@str (Uarrow@arctangent)%
+ arc[radius=\CF@compound@sep*\CF@current@arrow@length*\ifx\@empty#4\@empty0.333\else#4\fi,start angle=\CF@arrow@current@angle-90,%
+ delta angle=\ifx\@empty#5\@empty60\else#5\fi]node(Uarrow@end){};
+ \edef\CF@tmp@str{\if\string-\expandafter\@car\detokenize{#4.}\@nil-\else+\fi}%
+ \CF@arrow@display@label{#1}{0}\CF@tmp@str{Uarrow@start}{#2}{1}\CF@tmp@str{Uarrow@end}%
+}
+
+\pgfarrowsdeclare{CF@half}{CF@half}%
+ {\CF@arrow@size\dimexpr2.5pt+2.5\pgflinewidth\relax
+ \pgfarrowsleftextend{-\CF@arrow@size}\pgfarrowsrightextend{.5\pgflinewidth}}%
+ {\CF@arrow@size\dimexpr2.5pt+2.5\pgflinewidth\relax
+ \pgfsetdash{}\z@\pgfsetroundjoin\pgfsetroundcap
+ \pgfpathmoveto{\pgfpoint\z@\z@}%
+ \pgfpathlineto{\pgfpoint{-\CF@arrow@size}{.5\CF@arrow@size}}%
+ \pgfpathlineto{\pgfpoint{-.5\CF@arrow@size}\z@}%
+ \pgfpathlineto{\pgfpoint\z@\z@}%
+ \pgfusepathqfillstroke}
+
+\pgfarrowsdeclare{CF@full}{CF@full}%
+ {\CF@arrow@size\dimexpr2.5pt+2.5\pgflinewidth\relax
+ \pgfarrowsleftextend{-\CF@arrow@size}\pgfarrowsrightextend{.5\pgflinewidth}}%
+ {\CF@arrow@size\dimexpr2.5pt+2.5\pgflinewidth\relax
+ \pgfsetdash{}\z@\pgfsetroundjoin\pgfsetroundcap
+ \pgfpathmoveto{\pgfpoint\z@\z@}%
+ \pgfpathlineto{\pgfpoint{-\CF@arrow@size}{.5\CF@arrow@size}}%
+ \pgfpathlineto{\pgfpoint{-.5\CF@arrow@size}\z@}%
+ \pgfpathlineto{\pgfpoint{-\CF@arrow@size}{-.5\CF@arrow@size}}%
+ \pgfpathlineto{\pgfpoint\z@\z@}%
+ \pgfusepathqfillstroke}
+
\CF@savedcatcode
\endinput
@@ -1492,4 +2111,12 @@ v0.4b 2011/04/24
liaisons.
- correction de l'affichage incorrect des doubles liaisons dans
les cycles apr\`es les commandes \hflipnext et \vflipnext
- - correction d'un bug lorsqu'un alias commence une mol\'ecule \ No newline at end of file
+ - correction d'un bug lorsqu'un alias commence une mol\'ecule
+----------------------------------------------------------------------
+v1.0 2011/06/15
+ - les sch\'emas r\'eactionnels sont d\'esormais disponibles.
+ - \Chemabove et \Chembelow modifient la boite englobante.
+ - \Lewis modifie la boite englobante
+ - les macros \chemleft, \chemright, \chemup et \chemdown
+ affichent des d\'elimiteurs extensibles \`a gauche, \`a droite,
+ au dessus et au dessous d'un mat\'eriel. \ No newline at end of file
diff --git a/Master/texmf-dist/tex/generic/chemfig/t-chemfig.tex b/Master/texmf-dist/tex/generic/chemfig/t-chemfig.tex
index 8f7d11e5ad7..f0299a0abde 100644
--- a/Master/texmf-dist/tex/generic/chemfig/t-chemfig.tex
+++ b/Master/texmf-dist/tex/generic/chemfig/t-chemfig.tex
@@ -1,9 +1,9 @@
% __________________________________________________________________
% | |
% | |
-% | chemfig v0.4b |
+% | chemfig v1.0 |
% | |
-% | April 24, 2011 |
+% | June 15, 2011 |
% | |
% |__________________________________________________________________|
%