summaryrefslogtreecommitdiff
path: root/macros/generic/chemfig/chemfig-en.tex
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2021-02-28 03:01:24 +0000
committerNorbert Preining <norbert@preining.info>2021-02-28 03:01:24 +0000
commit189140b53960215eec1626503040fb38360ab4ed (patch)
treee7551ffd51e263ef259dcd95668d5b35377590cd /macros/generic/chemfig/chemfig-en.tex
parent4e6fb7c03bc033485887a99d2ffeca70ef8c0644 (diff)
CTAN sync 202102280301
Diffstat (limited to 'macros/generic/chemfig/chemfig-en.tex')
-rw-r--r--macros/generic/chemfig/chemfig-en.tex83
1 files changed, 19 insertions, 64 deletions
diff --git a/macros/generic/chemfig/chemfig-en.tex b/macros/generic/chemfig/chemfig-en.tex
index 281530c1cd..d0cf711b11 100644
--- a/macros/generic/chemfig/chemfig-en.tex
+++ b/macros/generic/chemfig/chemfig-en.tex
@@ -216,47 +216,22 @@
\setitemize{leftmargin=3em,topsep=0pt,parsep=0pt,itemsep=0pt}
\part{Introduction}
-\section{New in v1.5}
-\subsection{The primitive \texttt{\protect\textbackslash expanded}}
-As of version 1.54, \CF requires a \TeX{} engine that provides the \verb|\expanded| primitive and becomes incompatible with con\TeX t. If \verb|\expanded| is not available or is not a primitive, \CF will not be loaded. It is strongly recommended that you update your \LaTeX{} distribution in order to take advantage of the newer engine that provide for the use of this new primitive.
-
-\subsection{The macro \texttt{\protect\textbackslash charge}}
-Version 1.5 implements the macros \verb|\charge| and \verb|\Charge| (see page~\pageref{charge}) whose purpose is to place arbitrary elements around an atom that can be placed with great precision. These macros will replace the \verb|\lewis| and \verb|\Lewis| macros because they are much more powerful and configurable, even if more verbose. It is therefore important to note that the macros \verb|\lewis| and \verb|\Lewis| \textcolor{red}{\bfseries are no longer documented and will be removed from the \CF package}.
-
-\exemple{La macro \string\charge}/Simple charges around A :
-\Charge{0=\:,
- 0:3pt[anchor=180]=$\color{red}\scriptstyle\delta^+$,
- 120={\"["width=2pt,"style={draw=green,fill=gray}]},
- 210=\|
- }{A}
-\par
-Complex charges aroud "B" :
-\Charge{%
- 30:10pt={\chemfig[atom sep=6pt,double bond sep=1.5pt]{[:20]*6(=-=-=-)}},
- 120:5pt[scale=0.4,rotate=30,anchor=center]=\chemfig{CH_2=CH_2},
- -45[anchor=west,rotate=\chargeangle]={%
- \begin{tikzpicture}
- \node[anchor=mid west](a){$\oplus$};\draw[-stealth](a)--(-.5,0);
- \end{tikzpicture}}%
- }{B}/
-
-\subsection{Consecutive bonds}
-As of version 1.5, two bonds are joined if the atom between them has all its dimensions equal to zero (i.e. width, height and depth in the sense of \TeX). Previously, two bonds were joined if the atom was \emph{empty}, which was more restrictive.
-
-Together with the use of the macro \verb|\charge|, this new feature makes it possible to place charges in a chain without using invisible bonds.
-\exemple{Consecutive bonds}/\chemfig{[:30]-\charge{90=\:}{}
--[:-30]\charge{-90=\"}{}-\charge{90:2pt=$\delta^+$}{}-[:-30]}/
+\section{New in v1.6}
+\subsection{Lewis decorations}
+As announced since version 1.5 of 5/3/2020, the deprecated macros \verb|lewis| and \verb|Lewis| are no longer available in the \CF package. The recommended method for drawing Lewis formulas is to use \verb|\charge| and \verb|\Charge|, see page~\pageref{charge}.
-\subsection{Center of rings}
-The center of each ring is reachable with a \TIKZ node. See page~\pageref{centre_cycle}.
+If the use of the macros \verb|lewis| and \verb|Lewis| is indispensable, their code is in the file \verb|lewis.tex| which it is possible to load using \verb|input|, after having loaded the package \CF.
-\subsection{Manual Update}
-More detailed explanations are given on:
-\begin{itemize}
- \item the role played by the first atom encountered in the placement of the whole molecule (page~\pageref{premieratome1} and \pageref{premieratome});
- \item how \CF places the atoms in a group of atoms (page~\pageref{placementatomes});
- \item how a bond joins two atoms (page~\pageref{liaisonatomes}).
-\end{itemize}
+\subsection{Key debug}
+A new boolean key \CFkey{debug}, false by default, is available. When set to \verb|true|, the (rectangular) outline of each group of atoms is drawn in red and the outline of each atom is drawn in gray. The number of the group of atoms is shown above the red rectangle, and similarly for the number of each atom (the atoms are numbered from left to right, starting from 1). These numbers allow to know the name of the node of each atom whose syntax is \verb|n<a>-<b>| where \verb|<a>| is the number of the atom group and \verb|<b>| is the number of the atom.
+
+In this example, a blue arrow starts at atom \verb|n1-3|, which is "C2", and goes to atom \verb|n2-4|, which is "Gz".
+\exemple{Name of nodes}/\setchemfig{debug=true}
+\chemfig{A1BC2-[:30]DxEyFGz-H3I}
+\chemmove{\draw[blue](n1-3)to[out=75,in=90](n2-4);}/
+
+\subsection{Token \texttt\# in schemes}
+In a scheme, the \verb|#| token is now allowed when in the argument of the \verb|\chemfig| macro. See page~\pageref{modif.retrait}.
\section{Presenting \protect\CF}
To use this package, start by adding the following code to the preamble:
@@ -312,13 +287,7 @@ Here is the complete list of parameters as well as their default values\label{li
\CFparam{angle increment}
\CFparam{node style}
\CFparam{bond style}
- \CFparam{lewis | width}
- \CFparam{lewis sep}
- \CFparam{lewis length}
- \CFparam{lewis style}
- \CFparam{lewis dist}
- \CFparam{lewis radius}
- \CFparam{lewis diag coeff}
+ \CFparam{debug}
\CFparam{cycle radius coeff}
\CFparam{stack sep}
\CFparam{show cntcycle}
@@ -1296,7 +1265,7 @@ The \chevrons{keys}${}={}$\chevrons{values} available in the \chevrons{general p
\Chargeparam{extra sep} & node size increment of the \chevrons{atom} to put the \chevrons{charges}: it is the value passed to the \CFkey{inner sep} of \TIKZ.\\
\Chargeparam{overlay} & boolean which, when \CFval{true}, draws the \chevrons{charges} "overlay", i.e. outside the final bounding box.\\
\Chargeparam{shortcuts}&boolean which, when \CFval{true}, activates the shortcuts"\verb-\.-," "\verb-\:-," "\verb-\|- and "\verb-\"-" to draw Lewis formuas.\\
- \Chargeparam{lewisautorot}&booleann which, when \CFval{true}, automatically rotates "\verb-\:-," "\verb-\|- and "\verb-\"-".\\
+ \Chargeparam{lewisautorot}&boolean which, when \CFval{true}, automatically rotates "\verb-\:-," "\verb-\|- and "\verb-\"-".\\
\Chargeparam{.radius}&radius of the point used to plot "\verb|\.|" and "\verb|\:|".\\
\Chargeparam{:sep} & separation between the two dots of "\verb|\:|".\\
\Chargeparam{.style}&\TIKZ style used to draw the "\verb|\.|" and "\verb|\:|" dots.\\
@@ -1350,12 +1319,6 @@ The key \CFkey{lewisautorot}, which is \CFval{true} by default, acts on {\setcha
\exemple{Autorot}/\Charge{60=\:,150=\"}{A} et
\Charge{[lewisautorot=false]60=\:,150=\"}{A}/
-The \verb|lewis| and \verb|Lewis| macros are still functional, but are no longer maintained or documented, and \textcolor{red}{\bfseries will be removed in a future version}, so it is advisable to prefer the \verb|\charge| and \verb|\Charge| macros, which give comparable results as shown below, while being much more powerful and configurable:
-
-\exemple{Comparison with \string\Lewis}/\Lewis{1:3.5|,X}\quad\Lewis{0:2.3|,X}\qquad(avec \string\Lewis)\par
-\Charge{45=\:,135=\.,225=\"}{X}\quad\Charge{0=\:,90=\.,135=\"}{X}%
-\qquad(avec \string\Charge)/
-
The customization of Lewis' formulas is done via the macro \verb|\setcharge| or via the optional argument of \verb|\charge| by acting on the keys \CFkey{.radius}, \CFkey{:sep}, \CFkey{.style}, \CFkey{|style}, \CFkey{"length}, \CFkey{"width} and \CFkey{"style}. It is also possible to modify these keys for each formula with their optional argument which receives a list of \CFkey{keys}${}={}$\chevrons{values}.
\exemple{Ccustomization}/\Charge{[.radius=1.5pt,.style={draw=gray}]
@@ -1368,11 +1331,9 @@ The customization of Lewis' formulas is done via the macro \verb|\setcharge| or
135=\"[{"width=3pt,"style={line width=.8pt,draw=blue,fill=cyan}}]}{A}/
\subsection{Integration in \CF}
-A macro \verb|\charge| can take the place of an atom, just like it did with \verb|\lewis|.
+A macro \verb|\charge| can take the place of an atom.
-\exemple{Charge in \CF}*\chemfig{H-\chemabove{\lewis{5|7,O}}{\quad\scriptstyle+}(-[2]H)-H}
-\qquad
-\chemfig{H-\charge{45:1.5pt=$\scriptstyle+$,-45=\|,-135=\"}{O}(-[2]H)-H}*
+\exemple{Charge in \CF}*\chemfig{H-\charge{45:1.5pt=$\scriptstyle+$,-45=\|,-135=\"}{O}(-[2]H)-H}*
However, \CF has been modified so that the bonds are \emph{joined} when the dimensions of an atom is zero, that is, if its width, height and depth are all \verb|0pt|. This was previously only the case if the atom was empty. This new feature makes it easy to place charges in carbon chains.
@@ -2468,16 +2429,10 @@ The commands created by \CF are:
\item \CFkv{angle increment} {45}: increment of the angle of bonds
\item \CFkv{node style} {{}}: style of atoms
\item \CFkv{bond style} {{}}: style of bonds
- \item \CFkv{lewis | width} {0.3ex}: width of the rectangle Lewis "|"
- \item \CFkv{lewis sep} {0.4ex}: space between atom and Lewis formulas
- \item \CFkv{lewis length} {1.5ex}: length of Lewis formulas
- \item \CFkv{lewis style} {{}}: style of Lewis formulas
- \item \CFkv{lewis dist} {0.3em}: space between discs of the ":" Lewis formulas
- \item \CFkv{lewis radius} {0.15ex}: radius of discs for Lewis formulas
- \item \CFkv{lewis diag coeff} {1}: factor that multiplies the distance to Lewis formulas in odd directions
\item \CFkv{cycle radius coeff} {0.75}: shrinkage ratio of the circle or arc inside cycles
\item \CFkv{stack sep} {1.5pt}: vertical gap between arguments of \verb-\chemabove- and \verb-\chembelow- macros
\item \CFkv{show cntcycle} {false}: show rings numbers
+ \item \CFkv{debug} {false}: show atoms ans groups of atoms
\item \CFkv{autoreset cntcycle} {true}: reset ring counter at \verb|\chemfig| execution
\item \CFkv{compound style} {{}}: style of compounds
\item \CFkv{compound sep} {5em}: space between compounds