diff options
Diffstat (limited to 'Master/texmf-dist/doc/generic/chemfig/chemfig_doc_en.tex')
-rw-r--r-- | Master/texmf-dist/doc/generic/chemfig/chemfig_doc_en.tex | 91 |
1 files changed, 83 insertions, 8 deletions
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 cba4c5d56ea..cfe76554a30 100644 --- a/Master/texmf-dist/doc/generic/chemfig/chemfig_doc_en.tex +++ b/Master/texmf-dist/doc/generic/chemfig/chemfig_doc_en.tex @@ -3,7 +3,7 @@ % | | % | Chemfig manual | % | | -% | November 28, 2013 | +% | 15 february 2015 | % | | % |__________________________________________________________________| % @@ -11,11 +11,11 @@ % documentation. Translation by Theo Hopman & Nikola Castillo % % Maintainer: Christian Tellechea -% E-mail : unbonpetit@gmail.com +% E-mail : unbonpetit@openmailbox.org % Comments, bug reports and suggestions are welcome. % Licence : Released under the LaTeX Project Public License v1.3c or % later, see http://www.latex-project.org/lppl.txt -% Copyright : Christian Tellechea 2010-2013 +% Copyright : Christian Tellechea 2010-2015 % % The "chemfig" package consists of the 8 following files: % chemfig.tex (the code of the package) @@ -306,6 +306,18 @@ Experience shows that is it has been difficult to combine drawing of molecules w Finally, I wish to warmly thank Theo \textsc{Hopman} and more recently Nikola \textsc{Castillo} for offering to translate this manual into English. +\section{New in v1.1} +For those who find it ``ugly\footnote{see \texttt{\detokenize{http://tex.stackexchange.com/questions/161796/ugly-bond-joints-in-chemfig}}}'', it is now possible to join simple bonds with a slightly increased compilation time. The macro \idx\enablebondjoin{} enables this feature and \idx\disablebondjoin{} disables it (better behaviour, set by default). + +\exemple{Bond join}/\setbondstyle{line width=3pt} +\chemfig{-[1]-[7]} and +\enablebondjoin\chemfig{-[1]-[7]}\disablefixedbondlength/ + +When a star follows the macro \verb|\ chemfig*|, the bonds have a fixed length and therefore, the distance between center to center atoms becomes variable. The macro \idx\enablefixedbondlength{} makes this behavior valid for all macros (starred or not) while \idx\disablefixedbondlength{} goes back to the default behavior. + +\exemple{Fixed length}/\chemfig{Cl-Cl}\par +\chemfig*{Cl-Cl}/ + \section{Presenting \protect\CF} To use this package, start by adding the following code to the preamble: \begin{itemize} @@ -340,7 +352,7 @@ there are four groups of atoms: ``$\mathrm{H_3C}$'', ``C'', ``O'' and ``OH''. Fo 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)}} +\molht{H_3C-C(=[:30]O)(-[:-30]OH)}} A space is ignored when at the begining of a group of atoms. @@ -467,8 +479,61 @@ This aspect of the size of atoms becomes particularly acute when the atom involv It is important to note that the exponent \verb+-+ is \emph{put inside braces}. If this were not done, \CF would stop the atom on this character, which is a bond character. The atom would then be ``\verb-B^-'', which would lead to unexpected results. -We see in the example above that is it sometimes necessary to increase (or perhaps reduce) the interatomic distance associated with a bond. For this, the optional argument to bonds is actually made up of several comma-separated fields. As we have seen, the first field specifies the angle. -The second field, if it is not empty, is a coefficient which multiplies the default interatomic distance $\Delta$. Thus, writing \verb+-[,2]+ asks that this bond have the default angle (first field is empty) and that the atoms it connects be separated by twice the default distance\idx*{bond!length}. +It is possible to change the behavior of \CF about the interatomic spacing. Indeed, when the \verb+\chemfig+ macro is immediately followed by a star, the macro \verb-\setatomsep{<dimension>}-\idx*{\setatomsep} no longer defines the distance between the centers of atoms, denoted $\Delta$, but \emph{length of the bonds}. Consequently, the bonds have fixed lengths while the distance between the centers of the atoms is variable and depends on their size. Here is the diagram on page~\pageref{longueur.liaison} and what becomes with the macro \verb|\ chemfig*|: + +\begin{center} +\begin{tabular}{c@{\kern2cm}c} + macro \verb|\chemfig|¯o \verb|\chemfig*|\\[2ex] + \begin{tikzpicture}[every node/.style={anchor=base,inner sep=1.5pt,outer sep=0pt,minimum size=0pt},baseline] + \node[draw] at(0,0)(aa){\huge A}; + \node[draw]at(4,0)(bb){\huge B}; + \path[shorten <=5pt,shorten >=5pt,draw](aa)--(bb)coordinate[pos=0](al) coordinate[pos=1](bl); + \node[draw,circle,fill,blue,minimum size=1.5pt,inner sep=0pt]at(al){}; + \node[draw,circle,fill,blue,minimum size=1.5pt,inner sep=0pt]at([xshift=5pt]al){}; + \node[draw,circle,fill,blue,minimum size=1.5pt,inner sep=0pt]at(bl){}; + \node[draw,circle,fill,blue,minimum size=1.5pt,inner sep=0pt]at([xshift=-5pt]bl){}; + \draw[blue,dash pattern=on 1pt off 1pt](bl)--([yshift=0.7cm]bl); + \draw[blue,dash pattern=on 1pt off 1pt]([xshift=-5pt]bl)--([xshift=-5pt,yshift=0.7cm]bl); + \draw[<->]([yshift=0.6cm]bl.center)--([xshift=-5pt,yshift=0.6cm]bl.center) node [midway,above,draw=none]{$\delta$}; + \draw[blue,dash pattern=on 1pt off 1pt](al)--([yshift=0.7cm]al); + \draw[blue,dash pattern=on 1pt off 1pt]([xshift=5pt]al)--([xshift=5pt,yshift=0.7cm]al); + \draw[<->]([yshift=0.6cm]al.center)--([xshift=5pt,yshift=0.6cm]al.center) node [midway,above,draw=none]{$\delta$}; + \node[draw,circle,fill,red,minimum size=2pt,inner sep=0pt]at(aa){}; + \node[draw,circle,fill,red,minimum size=2pt,inner sep=0pt]at(bb){}; + \draw[<->]([yshift=1cm]aa.center)--([yshift=1cm]bb.center) node [midway,above,draw=none] {$\Delta$} ; + \draw[red,dash pattern=on 2pt off2pt](aa.center)--([yshift=1.1cm]aa.center); + \draw[red,dash pattern=on 2pt off2pt](bb.center)--([yshift=1.1cm]bb.center); + \end{tikzpicture} + & + \begin{tikzpicture}[every node/.style={anchor=base,inner sep=1.5pt,outer sep=0pt,minimum size=0pt},baseline] + \node[draw] at(0,0)(aa){\huge A}; + \node[draw]at(5,0)(bb){\huge B}; + \path[shorten <=5pt,shorten >=5pt,draw](aa)--(bb)coordinate[pos=0](al) coordinate[pos=1](bl); + \node[draw,circle,fill,blue,minimum size=1.5pt,inner sep=0pt]at(al){}; + \node[draw,circle,fill,blue,minimum size=1.5pt,inner sep=0pt]at([xshift=5pt]al){}; + \node[draw,circle,fill,blue,minimum size=1.5pt,inner sep=0pt]at(bl){}; + \node[draw,circle,fill,blue,minimum size=1.5pt,inner sep=0pt]at([xshift=-5pt]bl){}; + \draw[blue,dash pattern=on 1pt off 1pt](bl)--([yshift=0.7cm]bl); + \draw[blue,dash pattern=on 1pt off 1pt]([xshift=-5pt]bl)--([xshift=-5pt,yshift=0.7cm]bl); + \draw[<->]([yshift=0.6cm]bl.center)--([xshift=-5pt,yshift=0.6cm]bl.center) node [midway,above,draw=none]{$\delta$}; + \draw[blue,dash pattern=on 1pt off 1pt](al)--([yshift=0.7cm]al); + \draw[blue,dash pattern=on 1pt off 1pt]([xshift=5pt]al)--([xshift=5pt,yshift=0.7cm]al); + \draw[<->]([yshift=0.6cm]al.center)--([xshift=5pt,yshift=0.6cm]al.center) node [midway,above,draw=none]{$\delta$}; + \draw[<->]([yshift=1cm]al)--([yshift=1cm]bl) node [midway,above,draw=none] {$\Delta$} ; + \draw[red,dash pattern=on 2pt off2pt](al)--([yshift=1.1cm]al); + \draw[red,dash pattern=on 2pt off2pt](bl)--([yshift=1.1cm]bl); + \end{tikzpicture} +\end{tabular} +\end{center} + +In rings, even with starred \verb|\chemfig*|, the default behaviour is restored in order to draw regular polygons. + +\exemple{Fixed length bonds}/\chemfig{Cl-Cl}\par +\chemfig*{Cl-Cl}/ + +The macro \idx\enablefixedbondlength{} enables the ``fixed bond length behaviour'', even for non starred \verb|\chemfig| while \idx\disablefixedbondlength{} goes back to the default behaviour (fixed interatomic distance). + +Especially with the default behavior, to avoid too short bonds, it is sometimes necessary to increase (or perhaps reduce) the interatomic distance. For this, the optional argument to bonds is actually made up of several comma-separated fields. As we have seen, the first field specifies the angle. The second field, if it is not empty, is a coefficient which multiplies the default interatomic distance $\Delta$. Thus, writing \verb+-[,2]+ asks that this bond have the default angle (first field is empty) and that the atoms it connects be separated by twice the default distance\idx*{bond!length}. \exemple{Modified bond length}/\chemfig{A^{++}_{2}-[,2]B^{-}_3}\par \chemfig{A-B-[,2]C=[,0.5]D}\par \chemfig{-=[,1.5]-[,0.75]=[:-20,2]}/ @@ -1156,6 +1221,8 @@ They are sometimes useful for placing pseudo-exponents\idx*{ring!charge} which d \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} +\textbf{warning}: macros in this section are no longer maintained and will be removed in a future version of \CF. Please, prefer a scheme construction with macros \verb|\schemestart| and \verb|\ schemestop| and between these two macros, use \verb|\arrow| and \verb|\+|.\bigskip + To write chemical reactions, \CF provides a command for the signs and a command for the arrows. \label{chemsign}The command \verb-\chemsign[<dim>]<sign>-\idx*{\chemsign} typesets the \verb-<sign>-, which is surrounded on both sides by an unbreakable horizontal space \verb-<dim>- defaulting to 0.5em. @@ -1851,7 +1918,11 @@ Although this is not clearly seen because of labels overlap, the box around the \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. +Note that since ``\idx\subscheme\verb-{<scheme>}-'' is only a convenient shortcut for +\begin{center} +\idx\schemestart\verb-<scheme>-\idx\schemestop +\end{center} +Consequently, 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>/ @@ -2270,6 +2341,10 @@ The commands created by \CF are: \begin{longtable}{>\footnotesize l>\footnotesize p{9cm}}\\\hline \hfill\normalsize Commands\hfill\null &\hfill\normalsize Description\hfill\null\\\hline \idx\chemfig\verb-<code>-& draws the molecule whose design is described by the \verb-<code>-\\ +\idx\chemfig\verb-*<code>-&same as above but bonds have fixed lengths\\ +\idx\enablefixedbondlength&enable fixed bonds lengths\\ +\idx\disablefixedbondlength&enable fixed interatomic distances\\ +\idx\enablebondjoin{} et \idx\disablebondjoin& enable ou disable simple bonds joining\\ \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}\\ @@ -2323,7 +2398,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. 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. +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@openmailbox.org}{\texttt{\textbf{email}}} to let me know of any malfunctions or suggestions for improvement. \hfill Christian \textsc{Tellechea} \bigskip |