summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2012-11-18 00:44:15 +0000
committerKarl Berry <karl@freefriends.org>2012-11-18 00:44:15 +0000
commit38f5841b2d128e31223c2cbace56b0416b3e806f (patch)
tree0e05bf119adf8cb6a0102d660b21da8092070d07
parent9b2ec3de746b2f8e8e9f3f6fc3fddcdadf9ed565 (diff)
chemfig (17nov12)
git-svn-id: svn://tug.org/texlive/trunk@28287 c570f23f-e606-0410-a88d-b1316a301751
-rw-r--r--Master/texmf-dist/doc/generic/chemfig/README4
-rw-r--r--Master/texmf-dist/doc/generic/chemfig/chemfig_doc_en.pdfbin1288975 -> 1260591 bytes
-rw-r--r--Master/texmf-dist/doc/generic/chemfig/chemfig_doc_en.tex184
-rw-r--r--Master/texmf-dist/doc/generic/chemfig/chemfig_doc_fr.pdfbin1309130 -> 1278987 bytes
-rw-r--r--Master/texmf-dist/doc/generic/chemfig/chemfig_doc_fr.tex188
-rw-r--r--Master/texmf-dist/tex/generic/chemfig/chemfig.sty4
-rw-r--r--Master/texmf-dist/tex/generic/chemfig/chemfig.tex67
-rw-r--r--Master/texmf-dist/tex/generic/chemfig/t-chemfig.tex4
8 files changed, 90 insertions, 361 deletions
diff --git a/Master/texmf-dist/doc/generic/chemfig/README b/Master/texmf-dist/doc/generic/chemfig/README
index 44b3807a3da..3659a363209 100644
--- a/Master/texmf-dist/doc/generic/chemfig/README
+++ b/Master/texmf-dist/doc/generic/chemfig/README
@@ -2,9 +2,9 @@ ___________________________________
The
ChemFig package
- v1.0f
+ v1.0g
- 2012/02/24
+ 2012/11/16
___________________________________
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 0f7947af293..7f085baa675 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 b878c81c67d..1d8af66fb9f 100644
--- a/Master/texmf-dist/doc/generic/chemfig/chemfig_doc_en.tex
+++ b/Master/texmf-dist/doc/generic/chemfig/chemfig_doc_en.tex
@@ -1,9 +1,9 @@
% __________________________________________________________________
% | |
% | |
-% | ChemFig Documentation |
+% | Chemfig manual |
% | |
-% | February 24, 2012 |
+% | November 16, 2012 |
% | |
% |__________________________________________________________________|
%
@@ -327,26 +327,24 @@ The command \verb|\chemfig| draws a molecule using the commands provided by the
\end{itemize}
\newpage
-\part{\protect\CF for the impatient}
-This part is a non-exhaustive overview of the features of \CF. The goal is to introduce the basic ideas, allowing the user to get started drawing molecules as quickly as possible. This part does not go into detail; advanced use and a more formal approach to \CF commands will be discussed in the following parts.
+\part{Operation of \protect\CF}
+This part is devoted to describing the most common features of \CF. The user will find here explanations sufficient to draw most molecules. The presentation of features is done from a theoretical angle, and the goal of this part is not to draw real molecules but to give the user a formal description of the functionality of \CF. The ``Advanced usage'', page~\pageref{utilisation.avancee}, will be more practical and will illustrate advanced features for the most demanding uses. It will also highlight methods of building real molecules, page~\pageref{exemples.commentes}. Finally, the last part will give examples of molecules and the code used to draw them.
-\section{Syntax}
-The command \verb|\chemfig|\idx*{\chemfig} is used in the following way:
-\centerverb/\chemfig{<atom1><bond type>[<angle>,<coeff>,<n1>,<n2>,<tikz code>]<atom2>}/
+\section{Groups of atoms}
+Drawing a molecule consists inherently of connecting groups of atoms with lines. Thus, in the molecule \chemfig{O=O}, there are two groups of atoms, each consisting of a single atom ``O''.
-\begin{itemize}
-\item \verb-<angle>- is the bond angle\idx*{bond!angle} between the two atoms;
-\item \verb-<coeff>- is a coefficient multiplying the default bond length\idx*{bond!length};
-\item \verb-<n1>- and \verb-<n2>- are the numbers of the departure and arrival atoms of the bond\idx*{bond!departure and arrival atoms};
-\item \verb-<tikz code>- is additional options concerning the colour or style of a bond\idx*{bond!customization}.
-\end{itemize}
-\medskip
-Each bond takes optional arguments\idx*{bond!optional argument} which are placed in square brackets. These arguments can adjust everything one needs for the bond. Each argument has a default value, so one can simply write:
-\exemple{The water molecule}|\chemfig{H-O-H}|
+{\fboxsep1pt
+However, in this molecule
+\molht{H_3C-C(-[:-30]OH)=[:30]O}
+there are four groups of atoms: ``$\mathrm{H_3C}$'', ``C'', ``O'' and ``OH''. For reasons which we shall see later, \CF splits each group into single atoms. Each atom extends up to the next capital letter or one of these special characters: {\ttfamily \boxedfalseverb{-} \boxedfalseverb{=} \boxedfalseverb{~} \boxedfalseverb{(} \boxedfalseverb{!} \boxedfalseverb{*} \boxedfalseverb{<} \boxedfalseverb{>} \boxedfalseverb{@}}. \CF ignores all characters inside braces when splitting groups into atoms\idx*{separating atom mechanism}.
-In all the examples, the grey line represents the \idx{baseline}.
+Therefore the first group of atoms ``$\mathrm{H_3C}$'' is split into two atoms: $\boxednode{H_3}{}$ and $\boxednode C{}$. In terms of chemistry, of course, these are not real atoms; $\mathrm{H_3}$, for example, consists of three hydrogen atoms. In what follows the word atom refers to \CF's definition. Thus \CF sees the preceding molecule as follows:
+\renewcommand*\printatom[1]{\fbox{\ensuremath{\mathrm{#1}}}}
+\molht{H_3C-[,1.75]C(=[:30,1.5]O)(-[:-30,1.5]OH)}}
+
+A space is ignored when at the begining of a group of atoms.
-\section{The different types of bonds}
+\section{Different types of bonds}
\idx*{bond!types}For \CF, bonds between two atoms are one of nine types, represented by the characters \boxedfalseverb-, \boxedfalseverb=, \boxedfalseverb~, \boxedfalseverb>, \boxedfalseverb<, \boxedfalseverb{>:}, \boxedfalseverb{<:}, \boxedfalseverb{>|} and \boxedfalseverb{<|} :\label{types.liaisons}
\begin{center}
\begin{tabular}{>{\centering\arraybackslash}m{1.7cm}>{\centering\arraybackslash}m{3cm}>{\centering\arraybackslash}m{2cm}m{4cm}}
@@ -365,152 +363,6 @@ Bond \#&Code &Result &Bond type\\\hline
\end{center}
\label{setdoublesep}The command \verb-\setdoublesep{<dim>}-\idx*{\setdoublesep} adjusts the spacing between the lines in double or triple bonds. This spacing is 2pt by default.
-\section{Different types of diagrams}
-\subsection{Complete structural diagram}
-\exemple{Ethane}|\chemfig{C(-[2]H)(-[4]H)(-[6]H)-C(-[2]H)(-[6]H)-H}|
-
-Each bond takes several optional arguments\idx*{bond!optional argument}. The first optional argument defines the \verb-<angle>- of the bond\idx*{bond!angle}. Angles increase counterclockwise. If no angle is give then its default value is 0\degres.
-
-Note: the parentheses allow multiple bonds from the same atom; see ``Branched molecules''\idx*{branched molecule}, page~\pageref{molecules.ramifiees}.
-
-There are many ways of specifying the angle of a bond.
-\begin{description}
-\item[Predefined angles] \idx*{bond!angle!predefined}When the optional argument contains a whole number, this represents the angle that the bond makes with the horizontal, in multiples of 45\degres.
-
-\exemple{Predefined angles}|\chemfig{(-[1]1)(-[2]2)(-[3]3)(-[4]4)(-[5]5)(-[6]6)(-[7]7)-0}|
-
-\item[Absolute angle] \idx*{bond!angle!absolute}To give an angle in degrees relative to the horizontal, the optional argument must take this form: \verb-[:<absolute angle>]-. The \verb-<absolute angle>- may be positive or negative, and may have decimal places. It is reduced to the interval $[0,360)$.
-\item[Relative angle] \idx*{bond!angle!relative}It is often useful to give the bond angle relative to the preceding bond. In this case, the following syntax must be used:\verb-[::<relative angle>]-. The \verb-<relative angle>- may be positive or negative, and may have decimal places.
-\end{description}
-
-\subsection{Condensed structural diagram}
-\exemple{Hex-1-ene}|\chemfig{H_3C-{{(CH_2)}_3}-CH=CH_2}|
-
-It is sometimes useful to change the length of a bond\idx*{bond!length}. In the preceding example, the first two bonds need to be lengthened; they are too short compared to the double bond. To do this, the \verb|<coeff>| is needed in the optional arguments\idx*{bond!optional argument}.
-
-\exemple{Hex-1-ene}|\chemfig{H_3C-[,1.5]{{(CH_2)}_3}-[,1.5]CH=CH_2}|
-
-Notes:
-\begin{itemize}
- \item in the notation \verb|[,1.5]|, the comma indicates that the value placed in brackets corresponds to the second argument (\verb|coeff|). To give a value for the fourth argument one would write \verb|[,,,2]|;
- \item characters between braces are not interpreted by \CF, which allows (for example) groupings of atoms to be written inside parentheses without having them treated as part of a branched molecule (see page~\pageref{molecules.ramifiees}).
-\end{itemize}
-
-\subsection{Cram representation}
-\idx*{Cram representation}Another way of showing the bond angle between two atoms.
-\exemple{Methane}|\chemfig{C(-[5]H)(-[2]H)(<[:-70]H)(<:[:-20]H)}|
-
-\subsection{Skeleton diagram}
-\idx*{skeleton diagram}The simplest input, only covalent bonds are listed with their possible settings.
-\exemple{But-2-ene}|\chemfig{-[:30]=[:-30,,,,red]-[:30]}|
-
-The double bond lines are drawn on either side of where the single bond line would be. To keep graphical consistency between skeleton diagrams of various compounds it is useful to shift the second double bond line above or below the single bond line\idx*{bond!shifted}. Just follow the \verb-=- symbol with \verb-^- or \verb-_-, as shown below:
-\exemple{Comparison between double bonds and shifted double bonds}/\chemfig{-[:-30]=[:30]-[:-30]} \chemfig{-[:-30]=^[:30]-[:-30]}\par
-\chemfig{=[:-30]-[:30]=[:-30]} \chemfig{=_[:-30]-[:30]=^[:-30]}/
-
-\subsection{Lewis diagrams}
-\idx*{Lewis diagram}The syntax is as follows:
-\centerverb/\lewis{<position index><electron state>,<atom>}/
-\smallskip
-
-The electron states can be a lone pair, an empty electron slot, or a single electron. By default the electron state is a lone pair. A single electron is represented by the character \boxedfalseverb. and an empty slot by \boxedfalseverb|.
-
-\exemple{Chloromethane and water}|\chemfig{C(-[2]H)(-[4]H)(-[6]H)-\lewis{260,Cl}}\hspace{1cm}
-\chemfig{[:40]H-\lewis{13,O}-[::-80]H}|
-
-Note: the positions take whole number values between 0 and 7.
-\exemple{Positions}/\lewis{0.2.4.6.,C}\hspace{1cm}
-\lewis{0|2.46.,C}\hspace{1cm}
-\lewis{1357,Ar}/
-
-\section{Branched molecules}\label{molecules.ramifiees}
-\idx*{branched molecule}To indicate a branch, simply follow the atom holding the branch with a \verb-<code>- in parentheses. This \verb-<code>- is the code of the submolecule which will be attached to the atom. Multiple branches can be attached to the same atom, and these can be nested.
-
-\exemple{Alkanes}|\chemfig{H_3C-CH(-[2]CH_3)-CH_3}
-\hspace{.5cm}\chemfig{-(-[2])(-[6])-}|
-
-In this type of representation it is sometimes necessary to connect to distant atoms\idx*{bond!distant atoms}. To do this, the character \verb|?| is used, which creates a hook between two atoms. The function
-\centerverb/?[<name>,<bond>,<tikz>]/
-takes three arguments: the name of the hook, the bond type, and tikz code. The following example shows how to make two different hooks.
-
-\exemple*{Cocaine}|\chemfig{H_2C(-C?[a]H-[:-30]CH_2-[:30]C?[b]H-O-CO-C_6H_5)
--[2]CH_2-[,1.7]CH(-[3]N?[a]-[3]H_3C)(-[,1.35]C?[b]H-CO-OCH_3)}|
-
-\section{Rings}
-\idx*{ring}\CF can easily draw regular polygons. The syntax is the following:
-\centerverb/\chemfig{*n(<code for the molecule>)}/
-\smallskip
-
-\exemple{Some rings}|
-\chemfig{*3(---)}\hspace{.5cm}
-\chemfig{*5(-=-=-)}\hspace{.5cm}
-\chemfig{*6(-=-=-=)}|
-
-\idx*{ring!branch}Branches are used in the same way as before.
-
-\exemple{Rings and branches}|\chemfig{*4(-(--[1]*4(----))---)}|
-
-Note: a ring does not start or finish with the atom or group of atoms with which one wants to close the ring. The chemical entity on which the ring is based must be outside the ring definition.
-
-\exemple{Proper coding}|\chemfig{A*4(-B-C-D-)}|
-
-\exemple{Bad coding}|\chemfig{*4(A-B-C-D-)}\hspace{1cm}
- \chemfig{*4(-B-C-D-A)}|
-
-\section{Ions}
-The \verb|chemfig| commands enters the \idx{math mode}\footnote{There is a problem with the placement of groups of atoms containing exponents or subscripts. See page~\pageref{alignement.vertical}.} of \TeX, so it is very simple to write an ion. A negative charge ($-$) must always be enclosed in braces to avoid \CF confusing it with the symbol for a single bond.
-
-\exemple{Acetate ion}|\chemfig{-(-[1]O^{-})=[7]O}|
-
-For purists it is possible to circle the charge of an ion by using the commands \verb|\ominus| and \verb|\oplus|\idx*{charge!\protect\texttt{\protect\string\protect\oplus}}\idx*{charge!\protect\texttt{\protect\string\protect\ominus}}.
-
-To meet all requirements, there are two other commands \idx{\chemabove} and \idx{\chembelow} which allow placement of charges above or below the current atom\idx*\lewis.
-
-\exemple{Some ions}|\chemfig{-(-[1]O^{\ominus})=[7]O}
-\hspace{1cm}
-\chemfig{\lewis{35,O}=\lewis{26,Cl}-\chemabove
-{\lewis{026,O}}{\ominus}}
-\vskip5pt
-\chemfig{-\chemabove{N}{\scriptstyle\oplus}(=[1]O)-[7]O^{\ominus}}|
-
-For those who are extremely picky, the commands \idx{\chemabove} and \idx{\chembelow} accept an optional argument which sets the distance between the charge and the atom\idx*\lewis.
-\exemple{Charge position}|\chemfig{\lewis{35,O}=C-\chemabove
-[3pt]{\lewis{246,O}}{\hspace{.5cm}\ominus}}|
-
-\section{Chemical equations}
-Here is an example of a \idx{chemical reaction}:
-\exemple*{Chemical reaction}/\chemfig{**6(------)} \hspace{.5cm} + \hspace{.5cm} \chemfig{H_3C-Cl}
-\hspace{.5cm} $\xrightarrow{catalyst}$ \hspace{.5cm}
-\chemfig{**6(---(-)---)} \hspace{.5cm} + \hspace{.5cm} \chemfig{H-Cl}/
-
-\CF adds two new commands \idx{\chemsign} and \idx{\chemrel} which slightly simplify the preceding syntax.
-
-\exemple*{Using the \CF commands}|\setchemrel{0pt}{1.2em}{6em}
-\chemfig{**6(------)}\chemsign[0.5cm]+\chemfig{H_3C-Cl}
-\chemrel[\itshape\tiny Catalyst]{->}
-\chemfig{**6(---(-)---)}\chemsign[0.5cm]+\chemfig{H-Cl}|
-\newpage
-
-\part{Operation of \protect\CF}
-This part is devoted to describing the most common features of \CF. The outline of this description far exceeds that of ``\CF for the impatient``, but the user will find here explanations sufficient to draw most molecules. The presentation of features is done from a theoretical angle, and the goal of this part is not to draw real molecules but to give the user a formal description of the functionality of \CF. The ``Advanced usage'', page~\pageref{utilisation.avancee}, will be more practical and will illustrate advanced features for the most demanding uses. It will also highlight methods of building real molecules, page~\pageref{exemples.commentes}. Finally, the last part will give examples of molecules and the code used to draw them.
-
-\section{Groups of atoms}
-Drawing a molecule consists inherently of connecting groups of atoms with lines. Thus, in the molecule \chemfig{O=O}, there are two groups of atoms, each consisting of a single atom ``O''.
-
-{\fboxsep1pt
-However, in this molecule
-\molht{H_3C-C(-[:-30]OH)=[:30]O}
-there are four groups of atoms: ``$\mathrm{H_3C}$'', ``C'', ``O'' and ``OH''. For reasons which we shall see later, \CF splits each group into single atoms. Each atom extends up to the next capital letter or one of these special characters: {\ttfamily \boxedfalseverb{-} \boxedfalseverb{=} \boxedfalseverb{~} \boxedfalseverb{(} \boxedfalseverb{!} \boxedfalseverb{*} \boxedfalseverb{<} \boxedfalseverb{>} \boxedfalseverb{@}}. \CF ignores all characters inside braces when splitting groups into atoms\idx*{separating atom mechanism}.
-
-Therefore the first group of atoms ``$\mathrm{H_3C}$'' is split into two atoms: $\boxednode{H_3}{}$ and $\boxednode C{}$. In terms of chemistry, of course, these are not real atoms; $\mathrm{H_3}$, for example, consists of three hydrogen atoms. In what follows the word atom refers to \CF's definition. Thus \CF sees the preceding molecule as follows:
-\renewcommand*\printatom[1]{\fbox{\ensuremath{\mathrm{#1}}}}
-\molht{H_3C-[,1.75]C(=[:30,1.5]O)(-[:-30,1.5]OH)}}
-
-A space is ignored when at the begining of a group of atoms.
-
-\section{Different types of bonds}
-\idx*{bond!types}As we have already seen (see page~\pageref{types.liaisons}), bonds can be one of nine types, each corresponding to the characters \boxedfalseverb-, \boxedfalseverb=, \boxedfalseverb~, \boxedfalseverb>, \boxedfalseverb<, \boxedfalseverb{>:}, \boxedfalseverb{<:}, \boxedfalseverb{>|} and \boxedfalseverb{<|}.
-
\label{longueur.liaison}\idx*{bond!length}We must understand that when a bond is made between two atoms, these atoms are contained within invisible rectangular boxes. The centres of these two rectangles are separated by an adjustable distance $\Delta$ called the ``interatomic distance''. Furthermore, bonds do not connect to the exact edges of the rectangles: a length $\delta$, also adjustable, separates the edges of the rectangles and the beginning and end of the bond line. The rectangular boxes are made visible in the diagram below to help understanding.
\begin{center}
\begin{tikzpicture}[every node/.style={anchor=base,inner sep=1.5pt,outer sep=0pt,minimum size=0pt},baseline]
@@ -1287,7 +1139,9 @@ and\idx*{\chembelow}
\centerverb|\chembelow[<dim>]{<code>}{<stuff>}|
\smallskip
-place the \verb-<stuff>- above and below the \verb-<code>- respectively at a vertical distance \verb-<dim>-, without changing the \idx{bounding box} of \verb-<code>-. The length \verb-<dim>- is 1.5pt by default.
+place the \verb-<stuff>- above and below the \verb-<code>- respectively at a vertical distance \verb-<dim>-, without changing the \idx{bounding box} of \verb-<code>-. The optional argument allows, if written, to specify this dimension at each call. If the optional argument is not used, a default size will be taken: its value is 1.5pt but it can be modified with the macro \idx*{\setstacksep}
+
+\centerverb|\setstacksep{<dimension>}|
These commands are independent of the macro \verb-\chemfig- and can be used either inside or outside its argument.
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 a5c2a7459aa..952386e97c7 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 07350c24f6f..2cd9d2558e3 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 f\'evrier 2012 |
+% | 16 novembre 2012 |
% | |
% |__________________________________________________________________|
%
@@ -327,26 +327,24 @@ La commande \verb|\chemfig| dessine une molécule en se servant de commandes de
\end{itemize}
\newpage
-\part{\protect\CF pour l'impatient}
-Cette partie est un condensé non exhaustif des fonctionnalités de \CF. L'objectif est d'introduire les notions de base permettant au lecteur de dessiner ses premières molécules le plus vite possible. Cette partie ne donne pas de connaissance approfondie. Une utilisation plus avancée et une approche nettement plus formelle des commandes de \CF sera abordée dans les parties suivantes.
+\part{Fonctionnement de \protect\CF}
+Cette partie est consacrée à la description des fonctionnalités les plus courantes de \CF. L'utilisateur trouvera ici les explications suffisantes pour dessiner la plupart des molécules. La présentation des fonctionnalités est faite sous un angle théorique, et le but de cette partie n'est pas de dessiner de vraies molécules chimiques mais de donner à l'utilisateur une description formelle des fonctionnalités de \CF. La partie ``Utilisation avancée'', page~\pageref{utilisation.avancee}, sera plus pratique et dévoilera des fonctionnalités plus avancées pour les utilisations les plus pointues. On y mettra aussi en avant des méthodes pour construire de vraies molécules chimiques, page \pageref{exemples.commentes}. Enfin, la dernière partie présentera des molécules chimiques et le code utilisé pour les dessiner.
-\section{Syntaxe}
-La commande \idx{\chemfig} s'utilise de la manière suivante :
-\centerverb/\chemfig{<atome1><type de liaison>[<angle>,<coeff>,<n1>,<n2>,<code tikz>]<atome2>}/
+\section{Groupes d'atomes}
+Intrinsèquement, le dessin d'une molécule chimique consiste à relier par des traits de différents types des groupes d'atomes. Ainsi, dans la molécule \chemfig{O=O}, il y a 2 groupes d'atomes, chacun constitué d'un seul atome ``O''.
-\begin{itemize}
-\item \verb-<angle>- est l'angle de la liaison\idx*{liaison!angle} entre deux atomes;
-\item \verb-<coeff>- est le coefficient multiplicateur de la longueur de liaison\idx*{liaison!longueur} par défaut;
-\item \verb-<n1>- et \verb-<n2>- sont les numéros de l'atome de départ et de l'atome d'arrivée de la liaison\idx*{liaison!atome de départ et d'arrivée};
-\item \verb-<code tikz>- est l'option supplémentaire de couleurs ou de formes pour une liaison\idx*{liaison!personnalisation}.
-\end{itemize}
-\medskip
-Chaque liaison\idx*{liaison!argument optionnel} admet des arguments optionnels qui se mettent entre crochets. Ces arguments permettent de régler tout ce dont on a besoin pour la liaison. Chaque argument possède une valeur par défaut. On peut écrire très simplement :
-\exemple{La molécule d'eau}|\chemfig{H-O-H}|
+{\fboxsep1pt
+Mais dans cette molécule
+\molht{H_3C-C(-[:-30]OH)=[:30]O}
+on compte 4 groupes d'atomes : ``$\mathrm{H_3C}$'', ``C'', ``O'' et ``OH''. Pour des raisons que nous verrons plus tard, \CF examine chaque groupe d'atomes et le découpe en atomes. Chaque atome s'étend jusqu'à rencontrer une lettre majuscule ou un de ces caractères spéciaux : {\ttfamily \boxedfalseverb{-} \boxedfalseverb{=} \boxedfalseverb{~} \boxedfalseverb{(} \boxedfalseverb{!} \boxedfalseverb{*} \boxedfalseverb{<} \boxedfalseverb{>} \boxedfalseverb{@}}. Pour \CF, tous les caractères entre accolades sont ignorés pour le découpage en atomes\idx*{decoupage en atomes@découpage en atomes}.
-Pour cet exemple comme pour tous les autres, la ligne grise représente la \idx{ligne de base}.
+Par conséquent, le premier groupe d'atomes ``$\mathrm{H_3C}$'' est découpé en 2 atomes : $\boxednode{H_3}{}$ et $\boxednode C{}$. Chimiquement, il arrive que ce ne soient pas de vrais atomes puisque $\mathrm{H_3}$ par exemple, est constitué de 3 atomes d'hydrogène. Par abus de langage, on parlera d'atomes par la suite. Par conséquent, \CF voit la molécule précédente ainsi :
+\renewcommand*\printatom[1]{\fbox{\ensuremath{\mathrm{#1}}}}
+\molht{H_3C-[,1.75]C(=[:30,1.5]O)(-[:-30,1.5]OH)}}
+
+Un espace est ignoré s'il est au début d'un groupe d'atomes.
-\section{Les différents types de liaisons}
+\section{Différents types de liaisons}
\idx*{liaison!types}Pour \CF, les liaisons entre 2 atomes sont de 9 types, correspondant aux caractères \boxedfalseverb-, \boxedfalseverb=, \boxedfalseverb~, \boxedfalseverb>, \boxedfalseverb<, \boxedfalseverb{>:}, \boxedfalseverb{<:}, \boxedfalseverb{>|} et \boxedfalseverb{<|} :\label{types.liaisons}
\begin{center}
\begin{tabular}{>{\centering\arraybackslash}m{1.7cm}>{\centering\arraybackslash}m{3cm}>{\centering\arraybackslash}m{2cm}m{4cm}}
@@ -365,152 +363,6 @@ Pour cet exemple comme pour tous les autres, la ligne grise représente la \idx{
\end{center}
\label{setdoublesep}La commande \verb-\setdoublesep{<dim>}-\idx*{\setdoublesep} permet de régler l'espacement entre les traits des liaisons doubles ou triples. Cet espacement vaut 2pt par défaut.
-\section{Les différents types de formules}
-\subsection{Formule développée}
-\exemple{L'éthane}|\chemfig{C(-[2]H)(-[4]H)(-[6]H)-C(-[2]H)(-[6]H)-H}|
-
-Chaque liaison admet des arguments optionnels\idx*{liaison!argument optionnel}. Le premier des arguments optionnels définit l'\verb-<angle>- de la liaison\idx*{liaison!angle}. Les angles vont croissant dans le sens trigonométrique. Si l'angle n'est pas indiqué, alors sa valeur par défaut vaut 0\degres.
-
-Remarque : les parenthèses permettent d'autoriser plusieurs liaisons à partir d'un même atome, voir ``Molécules ramifiées''\idx*{ramification}, page~\pageref{molecules.ramifiees}.
-
-Il y a plusieurs façons de spécifier l'angle d'une liaison.
-\begin{description}
-\item[Angles prédéfinis] \idx*{liaison!angle!prédéfini}Lorsque l'argument optionnel contient un entier celui-ci représente l'angle que fait la liaison avec l'horizontale, en multiples de 45\degres.
-
-\exemple{Angles prédéfinis}|\chemfig{(-[1]1)(-[2]2)(-[3]3)(-[4]4)(-[5]5)(-[6]6)(-[7]7)-0}|
-
-\item[Angle absolu] \idx*{liaison!angle!absolu}Si on veut spécifier un angle en degrés avec l'horizontale, alors l'argument optionnel doit prendre cette forme : \verb-[:<angle absolu>]-. L'\verb-<angle absolu>- peut être positif, négatif, décimal. Il est ramené dans l'intervalle $[0\;;360]$.
-\item[Angle relatif]\idx*{liaison!angle!relatif}Il est souvent intéressant de spécifier pour une liaison l'angle qu'elle fera relativement à la précédente. On doit alors employer cette syntaxe pour l'argument optionnel : \verb-[::<angle relatif>]-. L'\verb-<angle relatif>- peut être positif, négatif, décimal.
-\end{description}
-
-\subsection{Formule semi-développée}
-\exemple{L'hex-1-ène}|\chemfig{H_3C-{{(CH_2)}_3}-CH=CH_2}|
-
-Il peut-être utile dans certains cas de pouvoir modifier la longueur d'une liaison\idx*{liaison!longueur}. Dans l'exemple précédent, il nécessaire d'allonger les deux premières liaisons, beaucoup trop courtes par rapport à la double liaison. Pour cela il faut utiliser l'argument \verb|<coeff>| des arguments optionnels\idx*{liaison!argument optionnel} :
-
-\exemple{L'hex-1-ène}|\chemfig{H_3C-[,1.5]{{(CH_2)}_3}-[,1.5]CH=CH_2}|
-
-Remarques :
-\begin{itemize}
- \item dans la notation \verb|[,1.5]|, la virgule sert à indiquer que la valeur placée entre crochet correspond au deuxième argument (\verb|coeff|). Pour donner une valeur au quatrième argument on écrira \verb|[,,,2]|;
- \item les caractères entre accolades ne sont pas interprétés par \CF, ce qui permet par exemple d'écrire des groupements d'atomes entre parenthèses sans que celles ci ne soient considérées comme une molécule ramifiée (voir page~\pageref{molecules.ramifiees}).
-\end{itemize}
-
-\subsection{Représentation de CRAM}
-\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}
-\idx*{formule topologique}Une saisie simplifiée à son maximum, seule les liaisons covalentes sont indiquées ainsi que leurs éventuels paramètres.
-\exemple{Le but-2-ène}|\chemfig{-[:30]=[:-30,,,,red]-[:30]}|
-
-La liaison double est tracée de part et d'autre de la ligne de liaison simple. Pour garder une cohérence graphique des formules topologiques de certains composés, il est intéressant de déporter\idx*{liaison!déportées} cette liaison double soit au dessus de cette ligne, soit au dessous. Il suffit alors de faire suivre le signe ``\verb-=-'' de ``\verb-^-'' ou ``\verb-_-'' :
-\exemple{Comparaison doubles liaisons/doubles liaisons déportées}/\chemfig{-[:-30]=[:30]-[:-30]} \chemfig{-[:-30]=^[:30]-[:-30]}\par
-\chemfig{=[:-30]-[:30]=[:-30]} \chemfig{=_[:-30]-[:30]=^[:-30]}/
-
-\subsection{Formule de Lewis}
-\idx*{Lewis (représentation)}La syntaxe est la suivante :
-\centerverb/\lewis{<indice de position><état électronique>,<atome>}/
-\smallskip
-
-Les états électroniques pouvant être un doublet non liant, une lacune électronique ou un électron célibataire. Par défaut l'état électronique est un doublet non liant. L'électron est représenté par le caractère \boxedfalseverb. et la lacune par \boxedfalseverb|.
-
-\exemple{Le chlorométhane et l'eau}|\chemfig{C(-[2]H)(-[4]H)(-[6]H)-\lewis{260,Cl}}\hspace{1cm}
-\chemfig{[:40]H-\lewis{13,O}-[::-80]H}|
-
-Remarque : les positions prennent des valeurs entières allant de 0 à 7.
-\exemple{Positions}/\lewis{0.2.4.6.,C}\hspace{1cm}
-\lewis{0|2.46.,C}\hspace{1cm}
-\lewis{1357,Ar}/
-
-\section{Molécules ramifiées}\label{molecules.ramifiees}
-Pour indiquer une \idx{ramification}, il suffit de faire suivre l'atome portant la ramification d'un \verb-<code>- entre parenthèses. Ce \verb-<code>- est le code de la sous molécule qui viendra s'attacher sur l'atome. Il peut bien sûr y avoir plusieurs ramifications sur un même atome. Celles-ci peuvent aussi être imbriquées.
-
-\exemple{Alcanes}|\chemfig{H_3C-CH(-[2]CH_3)-CH_3}
-\hspace{.5cm}\chemfig{-(-[2])(-[6])-}|
-
-Dans ce type de représentation il est parfois nécessaire de relier deux atomes distants. Pour cela on dispose du caractère \verb|?|\idx*{liaison!atomes éloignés} qui va servir de crochet entre deux atomes. La fonction
-\centerverb/?[<nom>,<liaison>,<tikz>]/
-accepte trois arguments, le nom du crochet, le type de liaison et du code tikz. L'exemple suivant indique comment poser deux crochets différents.
-
-\exemple*{Cocaïne}|\chemfig{H_2C(-C?[a]H-[:-30]CH_2-[:30]C?[b]H-O-CO-C_6H_5)
--[2]CH_2-[,1.7]CH(-[3]N?[a]-[3]H_3C)(-[,1.35]C?[b]H-CO-OCH_3)}|
-
-\section{Cycles}
-\idx*{cycle}\CF peut tracer des polygones réguliers facilement. La syntaxe est la suivante :
-\centerverb/\chemfig{*n(<code de la molécule>)}/
-\smallskip
-
-\exemple{Quelques cycles}|
-\chemfig{*3(---)}\hspace{.5cm}
-\chemfig{*5(-=-=-)}\hspace{.5cm}
-\chemfig{*6(-=-=-=)}|
-
-Les ramifications s'utilisent de la même façon\idx*{cycle!ramification}
-
-\exemple{Cycles et ramifications}|\chemfig{*4(-(--[1]*4(----))---)}|
-
-Remarque : un cycle ne pas commencer ou finir par l'atome ou le groupe d'atomes sur lequel on veut refermer le cycle. L'entité chimique sur laquelle on veut boucler doit impérativement se trouver en dehors du cycle.
-
-\exemple{Le bon codage}|\chemfig{A*4(-B-C-D-)}|
-
-\exemple{Les mauvais codages}|\chemfig{*4(A-B-C-D-)}\hspace{1cm}
-\chemfig{*4(-B-C-D-A)}|
-
-\section{Ions}
-La commande \verb|\chemfig| vous place directement dans le mode mathématique\idx*{mode mathematique@mode mathématique}\footnote{Il existe un problème de placement des groupes d'atomes contenant des exposants ou des indices. Voir page~\pageref{alignement.vertical}.} de \TeX, il est donc très simple d'écrire un ion. Il faut toutefois placer le signe $-$ entre accolades pour éviter à \CF qu'il le confonde avec le symbole d'une liaison covalente.
-
-\exemple{L'ion acétate}|\chemfig{-(-[1]O^{-})=[7]O}|
-
-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}}.
-
-\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}
-\chemfig{\lewis{35,O}=\lewis{26,Cl}-\chemabove
-{\lewis{026,O}}{\ominus}}
-\vskip5pt
-\chemfig{-\chemabove{N}{\scriptstyle\oplus}(=[1]O)-[7]O^{\ominus}}|
-
-Pour ceux qui font du zèle, les commandes \idx{\chemabove} et \idx{\chembelow} acceptent un argument optionnel qui règle la distance entre la charge et l'atome.\idx*\lewis
-\exemple{Position de la charge}|\chemfig{\lewis{35,O}=C-\chemabove
-[3pt]{\lewis{246,O}}{\hspace{.5cm}\ominus}}|
-
-\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}
-\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.
-
-\exemple*{Avec les commandes \CF}|\setchemrel{0pt}{1.2em}{6em}
-\chemfig{**6(------)}\chemsign[0.5cm]+\chemfig{H_3C-Cl}
-\chemrel[\itshape\tiny Catalyseur]{->}
-\chemfig{**6(---(-)---)}\chemsign[0.5cm]+\chemfig{H-Cl}|
-\newpage
-
-\part{Fonctionnement de \protect\CF}
-Cette partie est consacrée à la description des fonctionnalités les plus courantes de \CF. Le cadre de cette description dépasse largement celui de \og\CF pour l'impatient\fg{} mais l'utilisateur trouvera ici les explications suffisantes pour dessiner la plupart des molécules. La présentation des fonctionnalités est faite sous un angle théorique, et le but de cette partie n'est pas de dessiner de vraies molécules chimiques mais de donner à l'utilisateur une description formelle des fonctionnalités de \CF. La partie ``Utilisation avancée'', page~\pageref{utilisation.avancee}, sera plus pratique et dévoilera des fonctionnalités plus avancées pour les utilisations les plus pointues. On y mettra aussi en avant des méthodes pour construire de vraies molécules chimiques, page \pageref{exemples.commentes}. Enfin, la dernière partie présentera des molécules chimiques et le code utilisé pour les dessiner.
-
-\section{Groupes d'atomes}
-Intrinsèquement, le dessin d'une molécule chimique consiste à relier par des traits de différents types des groupes d'atomes. Ainsi, dans la molécule \chemfig{O=O}, il y a 2 groupes d'atomes, chacun constitué d'un seul atome ``O''.
-
-{\fboxsep1pt
-Mais dans cette molécule
-\molht{H_3C-C(-[:-30]OH)=[:30]O}
-on compte 4 groupes d'atomes : ``$\mathrm{H_3C}$'', ``C'', ``O'' et ``OH''. Pour des raisons que nous verrons plus tard, \CF examine chaque groupe d'atomes et le découpe en atomes. Chaque atome s'étend jusqu'à rencontrer une lettre majuscule ou un de ces caractères spéciaux : {\ttfamily \boxedfalseverb{-} \boxedfalseverb{=} \boxedfalseverb{~} \boxedfalseverb{(} \boxedfalseverb{!} \boxedfalseverb{*} \boxedfalseverb{<} \boxedfalseverb{>} \boxedfalseverb{@}}. Pour \CF, tous les caractères entre accolades sont ignorés pour le découpage en atomes\idx*{decoupage en atomes@découpage en atomes}.
-
-Par conséquent, le premier groupe d'atomes ``$\mathrm{H_3C}$'' est découpé en 2 atomes : $\boxednode{H_3}{}$ et $\boxednode C{}$. Chimiquement, il arrive que ce ne soient pas de vrais atomes puisque $\mathrm{H_3}$ par exemple, est constitué de 3 atomes d'hydrogène. Par abus de langage, on parlera d'atomes par la suite. Par conséquent, \CF voit la molécule précédente ainsi :
-\renewcommand*\printatom[1]{\fbox{\ensuremath{\mathrm{#1}}}}
-\molht{H_3C-[,1.75]C(=[:30,1.5]O)(-[:-30,1.5]OH)}}
-
-Un espace est ignoré s'il est au début d'un groupe d'atomes.
-
-\section{Différents types de liaisons}
-\idx*{liaison!types}Comme on l'a vu (voir page~\pageref{types.liaisons}), les liaisons peuvent être de 9 types, chacune correspondant aux caractères \boxedfalseverb-, \boxedfalseverb=, \boxedfalseverb~, \boxedfalseverb>, \boxedfalseverb<, \boxedfalseverb{>:}, \boxedfalseverb{<:}, \boxedfalseverb{>|} et \boxedfalseverb{<|}.
-
\label{longueur.liaison}\idx*{liaison!longueur}Lorsqu'une liaison est faite entre 2 atomes, il faut comprendre que ces atomes sont contenus dans des boîtes invisibles rectangulaires. Les centres des deux rectangles sont séparés par une distance réglable $\Delta$, appelée ``distance interatome''. De plus, les liaisons ne relient pas exactement les frontières des rectangles : une distance $\delta$, réglable elle aussi, sépare le bord des rectangles du début et de la fin de la liaison. Pour aider à la compréhension, les boîtes rectangulaires sont rendues visibles dans ce schéma :
\begin{center}
\begin{tikzpicture}[every node/.style={anchor=base,inner sep=1.5pt,outer sep=0pt,minimum size=0pt},baseline]
@@ -1283,11 +1135,13 @@ Pour rapprocher (ou éloigner) les décorations de lewis dans les directions imp
\subsection{Empilement de caractères}
Les macros\label{chemabove}\idx*{\chemabove}
\centerverb|\chemabove[<dim>]{<code>}{<matériel>}|
-et\idx*{\chembelow}
+et\label{chembelow}\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 boîte englobante\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>-. L'argument optionnel permet si on le souhaite, de spécifier cette dimension à chaque appel. Si l'argument optionnel n'est pas utilisé, une dimension par défaut sera prise : elle vaut 1.5pt mais peut être modifiée avec la macro \idx*{\setstacksep} :
+
+\centerverb|\setstacksep{<dimension>}|
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.
@@ -2440,8 +2294,8 @@ Les commandes créées par \CF sont :
&\\
\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\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{chembelow}\\
\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
&\\
diff --git a/Master/texmf-dist/tex/generic/chemfig/chemfig.sty b/Master/texmf-dist/tex/generic/chemfig/chemfig.sty
index 5a4c73b27d1..951745c8014 100644
--- a/Master/texmf-dist/tex/generic/chemfig/chemfig.sty
+++ b/Master/texmf-dist/tex/generic/chemfig/chemfig.sty
@@ -1,9 +1,9 @@
% __________________________________________________________________
% | |
% | |
-% | chemfig v1.0f |
+% | chemfig v1.0g |
% | |
-% | February 24, 2012 |
+% | November 16, 2012 |
% | |
% |__________________________________________________________________|
%
diff --git a/Master/texmf-dist/tex/generic/chemfig/chemfig.tex b/Master/texmf-dist/tex/generic/chemfig/chemfig.tex
index ee82b136586..7cc6e0b119d 100644
--- a/Master/texmf-dist/tex/generic/chemfig/chemfig.tex
+++ b/Master/texmf-dist/tex/generic/chemfig/chemfig.tex
@@ -1,9 +1,9 @@
% __________________________________________________________________
% | |
% | |
-% | chemfig v1.0f |
+% | chemfig v1.0g |
% | |
-% | February 24, 2012 |
+% | November 16, 2012 |
% | |
% |__________________________________________________________________|
%
@@ -74,10 +74,10 @@
\def#1%
}
-\CF@def\CF@ver {1.0f}
-\CF@def\CF@date {2012/02/24}
-\CF@def\CF@fr@date {24 f\'evrier 2012}
-\CF@def\CF@en@date {February 24, 2012}
+\CF@def\CF@ver {1.0g}
+\CF@def\CF@date {2012/11/16}
+\CF@def\CF@fr@date {16 novembre 2012}
+\CF@def\CF@en@date {November 16, 2012}
\CF@def\CF@package@name{chemfig}
\expandafter\ifx\csname @latexerr\endcsname\relax% on n'utilise pas LaTeX ?
@@ -469,7 +469,7 @@
\pgfmathparse{\CF@previous@angle+\expandafter\@gobble\@gobble#1}%
\let#2\pgfmathresult
\else
- \expandafter\def\expandafter#2\expandafter{\@gobble#1}
+ \expandafter\def\expandafter#2\expandafter{\@gobble#1}%
\fi% puis normalise l'angle entre 0 et 360
\ifdim\ifdim#2pt<\z@-\fi#2pt>360pt % si |#2|>360
\pgfmathparse{#2-360*floor(#2/360)}%
@@ -592,7 +592,6 @@
\ifnum\CF@last@action=\thr@@
\ifCF@incycle
\def\CF@default@angle{0}%
- \def\CF@default@length{1}%
\else
\ifnum\CF@cnt@cycle=\z@% si c'est le d\'ebut d'un cycle
\pgfmathparse{\CF@previous@angle+180+\CF@cycle@anglecorrection}% on met la liaison \`a +180° + correction
@@ -1251,9 +1250,9 @@
\CF@def\CF@lewis@ii#1#2{\CF@lewis@iii#2\@nil{#1}}
\CF@def\CF@lewis@iii#1,#2\@nil#3{%
+ \setbox\CF@lewis@box\hbox{\printatom{#2}}% mettre en dehors de tikzpicture (si \printatom ne passe pas en mode math)
\tikzpicture[every node/.style={anchor=base,inner sep=\z@,outer sep=\z@,minimum size=\z@},baseline]%
\@makeother;\@makeother:%
- \setbox\CF@lewis@box\hbox{\printatom{#2}}%
\node(CF@lewis@anchor){};
\def\CF@lewis@remainpos{#1}%
\let\CF@lewis@previouspos\@empty
@@ -1308,19 +1307,23 @@
\endtikzpicture
}
+\CF@def\setstacksep#1{\edef\CF@stacksep{\ifx\@empty#1\@empty1.5pt\else\the\dimexpr#1\relax\fi}}
+\setstacksep{1.5pt}
+
\CF@def\Chembelow{\begingroup\let\CF@tmp@str\@gobble\CF@chembelow@i}
\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@i{\@testopt\CF@chembelow@ii\CF@stacksep}
\CF@def\CF@chembelow@ii[#1]#2#3{%
- \setbox\CF@box@boxa\hbox{\printatom{#2}}\setbox\CF@box@boxb\hbox{\printatom{#3}}%
- \vtop{%
+ \setbox\CF@box@boxa\hbox{\printatom{#2}}%
+ \expandafter\vtop\CF@tmp@str{to\ht\CF@box@boxa}{%
+ \offinterlineskip
\hbox{\printatom{#2}}%
- \hrule width\z@ depth\z@ height#1
+ \kern#1\relax
\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}%
+ \CF@tmp@str\vss
}%
\endgroup
}
@@ -1329,14 +1332,15 @@
\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@i{\@testopt\CF@chemabove@ii\CF@stacksep}
\CF@def\CF@chemabove@ii[#1]#2#3{%
- \setbox\CF@box@boxa\hbox{\printatom{#2}}\setbox\CF@box@boxb\hbox{\printatom{#3}}%
- \vbox{%
- \CF@tmp@str{\hrule width\z@ depth\z@ height-\dimexpr\ht\CF@box@boxb+\dp\CF@box@boxb+#1\relax}%
+ \setbox\CF@box@boxa\hbox{\printatom{#2}}%
+ \expandafter\vbox\CF@tmp@str{to\ht\CF@box@boxa}{%
+ \offinterlineskip
+ \CF@tmp@str\vss
\hbox to\wd\CF@box@boxa{\hss\printatom{#3}\hss}%
- \hrule width\z@ depth\z@ height#1
+ \kern#1\relax
\hbox{\printatom{#2}}%
}%
\endgroup
@@ -1770,7 +1774,7 @@
\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}%
+ \ifx\@empty#6\@empty\else\CF@add@tocs\CF@arrow@current@style{#6,}\fi%
\csname\CF@grab@arrow@name#1[]\@nil\expandafter\endcsname\CF@grab@arrow@args#1[]\@nil[][][][][][][][]\@nil
}
@@ -2156,8 +2160,9 @@ v1.0a 2011/09/18
\'electrons
----------------------------------------------------------------------
v1.0b 2011/11/29
- - la commande \merge est d\'sormais protég\'ee entre \schemestart
- et \schemestop contre des d\'efinitions par d'autres packages.
+ - la commande \merge est d\'esormais prot\'eg\'ee entre
+ \schemestart et \schemestop contre des d\'efinitions par d'autres
+ packages.
- \box\z@ est utilis\'e au lieu du maladroit \unhbox\z@
----------------------------------------------------------------------
v1.0c 2011/11/30
@@ -2177,4 +2182,20 @@ v1.0e 2012/01/13
----------------------------------------------------------------------
v1.0f 2012/02/24
- correction d'un bug avec \definesubmol, les catcodes n'\'etaient
- pas correctement g\'e\'es. \ No newline at end of file
+ pas correctement g\'er\'es.
+----------------------------------------------------------------------
+v1.0g 2012/11/16
+ - correction d'un bug dans \CF@direct@arrow pour faire prendre en
+ compte le style des fl\`eche par d\'efaut
+ - correction d'un bug dans \CF@lewis@iii : la boite *doit* \^etre
+ compos\'ee en dehors de l'environnement tikzpicture pour
+ \'eviter nullfont si jamais \printatom ne passe pas en mode
+ math.
+ - correction d'un bug dans \CF@chemfig@iv : si une longueur par
+ d\'efaut est modifi\'ee par [,<l>] au d\'ebut d'une mol\'ecule
+ et si des cycles \'etaient emboit\'es, cette longueur n'\'etait
+ pas appliqu\'ee aux sous-cycles.
+ - r\'e-\'ecriture des macros \chemabove et \chembemow pour
+ prendre en compte le bug (d\'esormais corrig\'e) dans luatex.
+ - nouvelle macro \setstacksep qui d\'efinit l'espacement par
+ d\'efaut dans les macros \chemabove et \chembelow. \ 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 a7b44f9dd00..9b0cee38124 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 v1.0f |
+% | chemfig v1.0g |
% | |
-% | February 24, 2012 |
+% | November 16, 2012 |
% | |
% |__________________________________________________________________|
%