diff options
Diffstat (limited to 'Master')
-rw-r--r-- | Master/texmf-dist/doc/generic/chemfig/README | 4 | ||||
-rw-r--r-- | Master/texmf-dist/doc/generic/chemfig/chemfig-en.pdf | bin | 1092263 -> 1091080 bytes | |||
-rw-r--r-- | Master/texmf-dist/doc/generic/chemfig/chemfig-en.tex | 83 | ||||
-rw-r--r-- | Master/texmf-dist/doc/generic/chemfig/chemfig-fr.pdf | bin | 1120059 -> 1118501 bytes | |||
-rw-r--r-- | Master/texmf-dist/doc/generic/chemfig/chemfig-fr.tex | 81 | ||||
-rw-r--r-- | Master/texmf-dist/tex/generic/chemfig/chemfig-lewis.tex | 129 | ||||
-rw-r--r-- | Master/texmf-dist/tex/generic/chemfig/chemfig.tex | 199 | ||||
-rwxr-xr-x | Master/tlpkg/bin/ctan2tl | 3 | ||||
-rwxr-xr-x | Master/tlpkg/bin/tlpkg-ctan-check | 2 | ||||
-rwxr-xr-x | Master/tlpkg/libexec/ctan2tds | 2 |
10 files changed, 246 insertions, 257 deletions
diff --git a/Master/texmf-dist/doc/generic/chemfig/README b/Master/texmf-dist/doc/generic/chemfig/README index de87a14c9b5..29671ba13ef 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.56 + v1.6a - 2020/07/13 + 2021/02/28 ___________________________________ Maintainer: Christian Tellechea diff --git a/Master/texmf-dist/doc/generic/chemfig/chemfig-en.pdf b/Master/texmf-dist/doc/generic/chemfig/chemfig-en.pdf Binary files differindex 990c8454ba6..a9ba585b85a 100644 --- a/Master/texmf-dist/doc/generic/chemfig/chemfig-en.pdf +++ b/Master/texmf-dist/doc/generic/chemfig/chemfig-en.pdf diff --git a/Master/texmf-dist/doc/generic/chemfig/chemfig-en.tex b/Master/texmf-dist/doc/generic/chemfig/chemfig-en.tex index 281530c1cdb..aded31ec95e 100644 --- a/Master/texmf-dist/doc/generic/chemfig/chemfig-en.tex +++ b/Master/texmf-dist/doc/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|chemfig-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 diff --git a/Master/texmf-dist/doc/generic/chemfig/chemfig-fr.pdf b/Master/texmf-dist/doc/generic/chemfig/chemfig-fr.pdf Binary files differindex 1777f6d5b99..57fa60fb01d 100644 --- a/Master/texmf-dist/doc/generic/chemfig/chemfig-fr.pdf +++ b/Master/texmf-dist/doc/generic/chemfig/chemfig-fr.pdf diff --git a/Master/texmf-dist/doc/generic/chemfig/chemfig-fr.tex b/Master/texmf-dist/doc/generic/chemfig/chemfig-fr.tex index d52bb1259e5..b9c25cc5f06 100644 --- a/Master/texmf-dist/doc/generic/chemfig/chemfig-fr.tex +++ b/Master/texmf-dist/doc/generic/chemfig/chemfig-fr.tex @@ -216,47 +216,22 @@ \setitemize{leftmargin=3em,topsep=0pt,parsep=0pt,itemsep=0pt,label=--} \part{Introduction} -\section{Nouveau dans la v1.5} -\subsection{Primitive \texttt{\protect\textbackslash expanded}} -À partir de la version 1.54, \CF nécessite un moteur \TeX{} fournissant la primitive \texttt{\string\expanded} et devient incompatible avec con\TeX t. Si \verb|\expanded| n'est pas disponible ou n'est pas une primitive, \CF ne sera pas chargé : il est donc vivement conseillé de mettre à jour sa distribution \LaTeX{} afin de profiter d'un moteur récent permettant l'utilisation de cette nouvelle primitive. - -\subsection{La macro \texttt{\protect\textbackslash charge}} -La version 1.5 met en place les macros \verb|\charge| et \verb|\Charge| (voir page~\pageref{charge}) dont le but est de placer atour d'un atome des éléments arbitraires avec une grande précision. Ces macros remplaceront, à terme, les macros \verb|\lewis| et \verb|\Lewis| car elles sont bien plus puissantes et configurables, même si plus verbeuses quant à leur emploi. Il est donc important de noter que les macros \verb|\lewis| et \verb|\Lewis| \textcolor{red}{\bfseries ne sont plus documentées et seront supprimées de l'extension \CF}. - -\exemple{La macro \string\charge}/Charges simples autour de A : -\Charge{0=\:, - 0:3pt[anchor=180]=$\color{red}\scriptstyle\delta^+$, - 120={\"["width=2pt,"style={draw=green,fill=gray}]}, - 210=\| - }{A} -\par -Charges complexes autour de "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{Liaisons jointives} -À partir de la version 1.5, deux liaisons sont jointives si l'atome qui se trouve entre-elles a toutes ses dimensions nulles (c'est-à -dire sa largeur, sa hauteur et sa profondeur au sens de \TeX). Auparavant, deux liaisons étaient jointives si l'atome était \emph{vide}, ce qui était plus restrictif. - -Conjointement à l'utilisation de la macro \verb|\charge|, cette nouvelle fonctionnalité rend possible de placer des charges dans une chaine sans avoir recours à des liaisons invisibles. -\exemple{Liaisons jointives}/\chemfig{[:30]-\charge{90=\:}{} --[:-30]\charge{-90=\"}{}-\charge{90:2pt=$\delta^+$}{}-[:-30]}/ +\section{Nouveau dans la v1.6} +\subsection{Formules de Lewis} +Comme annoncé depuis la version 1.5 du 5/3/2020, les macros dépréciées \verb|\lewis| et \verb|Lewis| ne sont plus disponibles dans le package \CF. La méthode recommandée pour tracer des formules de Lewis passe désormais par les macros \verb|\charge| et \verb|\Charge|, voir pages~\pageref{charge} et suivantes. -\subsection{Centre des cycles} -Le centre de chaque cycle est désormais accessible via un nœud de \TIKZ. Voir page~\pageref{centre_cycle}. +Si l'utilisation des macros \verb|\lewis| et \verb|Lewis| est indispensable, leur code a été placé dans le fichier \verb|chemfig-lewis.tex| qu'il est possible de charger à l'aide de \verb|\input|, après avoir chargé le package \CF. -\subsection{Mise à jour du manuel} -Des explications plus détaillées sont données sur: -\begin{itemize} - \item le rôle que joue le premier atome rencontré dans le placement de la molécule dans son ensemble (page~\pageref{premieratome1} et \pageref{premieratome}); - \item la façon dont \CF place les atomes dans un groupe d'atome (page~\pageref{placementatomes}); - \item comment une liaison joint deux atomes (page~\pageref{liaisonentreatomes}). -\end{itemize} +\subsection{Clé debug} +Une nouvelle clé booléenne \CFkey{debug} est disponible; elle est fausse par défaut. Lorsque sa valeur est \verb|true|, le contour (rectangulaire) de chaque groupe d'atomes est tracé en rouge et le contour de chaque atome est tracé en gris. Au-dessus du rectangle rouge se trouve le numéro du groupe d'atomes et de même, au-dessous de chaque atome figure son numéro (les atomes sont numérotés de gauche à droite, en partant de 1). Ces numéros permettent de connaitre le nom du nœud de chaque atome dont la syntaxe est \verb|n<a>-<b>| où \verb|<a>| est le numéro du groupe d'atome et \verb|<b>| celui de l'atome. + +Sur cet exemple, l'atome \verb|n1-3| qui est «C2» est relié par une flèche bleue à l'atome \verb|n2-4| qui est «Gz». +\exemple{Nom des nœuds}/\setchemfig{debug=true} +\chemfig{A1BC2-[:30]DxEyFGz-H3I} +\chemmove{\draw[blue](n1-3)to[out=75,in=90](n2-4);}/ + +\subsection{Token \texttt\# dans les schémas} +Dans un schéma réactionnel, le token \verb|#| est désormais permis lorsqu'il se trouve dans l'argument de la commande \verb|\chemfig|. Voir page~\pageref{modif.retrait}. \section{Présentation} Pour charger \CF, il faut écrire : @@ -312,13 +287,7 @@ Voici la liste exhaustive des paramètres ainsi que leurs valeurs par défaut\la \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} @@ -1350,12 +1319,6 @@ La clé \CFkey{lewisautorot}, qui est \CFval{true} par défaut agit sur {\setcha \exemple{Autorot}/\Charge{60=\:,150=\"}{A} et \Charge{[lewisautorot=false]60=\:,150=\"}{A}/ -Les macros \verb|\lewis| et \verb|\Lewis| sont encore fonctionnelles, mais ne sont plus maintenues ni documentées et \textcolor{red}{\bfseries seront retirées dans une future version}; il est donc conseillé de leur préférer les macros \verb|\charge| et \verb|\Charge| qui donnent des résultats comparables comme on le voit ci-dessous, tout en étant bien plus puissantes et configurables: - -\exemple{Comparaison avec \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)/ - La personnalisation des formules de Lewis s'effectue via la macro \verb|\setcharge| ou par l'intermédiaire de l'argument optionnel de \verb|\charge| en agissant sur les clés \CFkey{.radius}, \CFkey{:sep}, \CFkey{.style}, \CFkey{|style}, \CFkey{"length}, \CFkey{"width} et \CFkey{"style}. Il est également possible de modifier ces clés pour chaque formule avec leur argument optionnel qui reçoit une liste de \chevrons{clés}${}={}$\chevrons{valeurs}. \exemple{Personnalisation}/\Charge{[.radius=1.5pt,.style={draw=gray}] @@ -1368,11 +1331,9 @@ La personnalisation des formules de Lewis s'effectue via la macro \verb|\setchar 135=\"[{"width=3pt,"style={line width=.8pt,draw=blue,fill=cyan}}]}{A}/ \subsection{Intégration dans \CF} -Une macro \verb|\charge| peut tenir lieu d'atome, tout comme c'était le cas avec \verb|\lewis|. +Une macro \verb|\charge| peut tenir lieu d'atome. -\exemple{Charge dans \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 dans \CF}*\chemfig{H-\charge{45:1.5pt=$\scriptstyle+$,-45=\|,-135=\"}{O}(-[2]H)-H}* Cependant, \CF a été modifié pour que les liaisons soient \emph{jointives} lorsque l'encombrement d'un atome est nul, c'est-à -dire si sa largeur, hauteur et profondeur sont toutes nulles. Ce n'était le cas auparavant que si l'atome était vide. Cette nouvelle fonctionnalité permet de placer facilement des charges dans des chaines. @@ -2468,16 +2429,10 @@ Les commandes créées par \CF sont : \item \CFkv{angle increment} {45}: incrément de l'angle des liaisons \item \CFkv{node style} {{}}: style des atomes \item \CFkv{bond style} {{}}: style des liaisons - \item \CFkv{lewis | width} {0.3ex}: largeur du rectangle pour la formules | de Lewis - \item \CFkv{lewis sep} {0.4ex}: espacement entre l'atome et les formule de Lewis - \item \CFkv{lewis length} {1.5ex}: longueur des formule de Lewis - \item \CFkv{lewis style} {{}}: style des formules de Lewis - \item \CFkv{lewis dist} {0.3em}: espacement entre les disques pour la formule «\string:» - \item \CFkv{lewis radius} {0.15ex}: rayon des disques des formules de Lewis - \item \CFkv{lewis diag coeff} {1}: coefficient multiplicatif de la distance dans les directions impaires \item \CFkv{cycle radius coeff} {0.75}: coefficient du cercle ou de l'arc de cercle tracé dans les cycles \item \CFkv{stack sep} {1.5pt}: espacement vertical pour les arguments des macros \verb-\chemabove- et \verb-\chembelow- \item \CFkv{show cntcycle} {false}: affichage des numéros des cycles + \item \CFkv{debug} {false}: affichage des atomes et des groupes d'atomes \item \CFkv{autoreset cntcycle} {true}: remise à 0 du compteur de cycles à chaque exécution de \verb|\chemfig| \item \CFkv{compound style} {{}}: style des composés \item \CFkv{compound sep} {5em}: espacement entre 2 composés diff --git a/Master/texmf-dist/tex/generic/chemfig/chemfig-lewis.tex b/Master/texmf-dist/tex/generic/chemfig/chemfig-lewis.tex new file mode 100644 index 00000000000..d713eecf68b --- /dev/null +++ b/Master/texmf-dist/tex/generic/chemfig/chemfig-lewis.tex @@ -0,0 +1,129 @@ +\ifdefined\CFname\else + \errmessage{Chemfig is not loaded, lewis cannot work}% + \expandafter\endinput +\fi + +\csname lewisloadonce\endcsname +\let\lewisloadonce\endinput + +\begingroup + \def\X#1{\catcode\number`#1=\number\catcode`#1\relax} + \xdef\CFrestorecatcode{\X\[\X\]\X\:\X\(\X\)\X\,\X\-\X\=\X\~\X\!\X\?\X\<\X\>\X\;\X\*\X\|\X\@\X\ \X\_}% +\endgroup + +\catcode`\[12 \catcode`\]12 \catcode`\:12 \catcode`\(12 +\catcode`\)12 \catcode`\,12 \catcode`\-12 \catcode`\=12 +\catcode`\~12 \catcode`\!12 \catcode`\?12 \catcode`\<12 +\catcode`\>12 \catcode`\;12 \catcode`\*12 \catcode`\|12 +\catcode`\@12 \catcode`\#6 \catcode`\ 10 \catcode`\_11 + +\newif\ifCF_lewisoverlay +\newbox\CF_boxlewis + +\defKV[chemfig]{% + lewis | width = \CF_defifempty\CF_lewiswidthdouble {#1}{0.3ex}, + lewis sep = \CF_defifempty\CF_lewisoffset {#1}{0.4ex}, + lewis length = \CF_defifempty\CF_lewislength {#1}{1.5ex}, + lewis style = \def\CF_lewisstyle {#1}, + lewis dist = \CF_defifempty\CF_lewisdist {#1}{0.3em}, + lewis radius = \CF_defifempty\CF_lewisradius {#1}{0.15ex}, + lewis diag coeff = \CF_defifempty\CF_lewisdiagcoeff {#1}{1} + } +\setKVdefault[chemfig]{% + lewis | width = 0.3ex, + lewis sep = 0.4ex, + lewis length = 1.5ex, + lewis style = {}, + lewis dist = 0.3em, + lewis radius = 0.15ex, + lewis diag coeff = 1 + } + +\def\Lewis{% + \CF_lewisoverlayfalse + \CF_testopt\CF_lewisa{}% +} + +\def\lewis{% + \CF_lewisoverlaytrue + \CF_testopt\CF_lewisa{}% +} + +\def\CF_lewisa[#1]{% + \begingroup + \CF_doifnotempty{#1}{\setchemfig{#1}}% + \ifCF_lewisoverlay + \CF_addtomacro\CF_lewisstyle{,overlay}% + \fi + \CF_lewisb +} + +\def\CF_lewisb#1{% + \CF_lewisc#1\_nil + \endgroup +} + +\def\CF_lewisc#1,#2\_nil{% + \setbox\CF_boxlewis\hbox{\printatom{#2}}% mettre en dehors de tikzpicture (si \printatom ne passe pas en mode math) + \CF_ifinsidetikz + {\pgfinterruptpicture + \let\CF_atendoflewis\endpgfinterruptpicture + } + {\let\CF_atendoflewis\relax + }% + \tikzpicture[every node/.style={anchor=base,inner sep=0pt,outer sep=0pt,minimum size=0pt},baseline]% + \CF_makeother;\CF_makeother:% + \node(CF_lewis@anchor){}; + \def\CF_lewisremainpos{#1}% + \let\CF_lewispreviouspos\empty + \loop + \unless\ifx\CF_lewisremainpos\empty + \edef\CF_lewiscurrentpos{\expandafter\CF_firsttonil\CF_lewisremainpos\_nil}% + \edef\CF_lewisremainpos{\expandafter\CF_gobarg\CF_lewisremainpos}% + \pgfmathsetmacro\CF_lewisx{\wd\CF_boxlewis/2+\ifcase\CF_lewiscurrentpos\space1\or1\or0\or-1\or-1\or-1\or0\or1\fi*(\wd\CF_boxlewis/2)}% + \pgfmathsetmacro\CF_lewisy{\ht\CF_boxlewis/2+\ifcase\CF_lewiscurrentpos\space0\or1\or1\or1\or0\or-1\or-1\or-1\fi*(\ht\CF_boxlewis/2\ifnum\CF_lewiscurrentpos>4 +\dp\CF_boxlewis\fi)}% + \edef\CF_lewisxoffset{\ifcase\CF_lewiscurrentpos\space1\or0.70711\or0\or-0.70711\or-1\or-0.70711\or0\or0.70711\fi}% + \edef\CF_lewisyoffset{\ifcase\CF_lewiscurrentpos\space0\or0.70711\or1\or0.70711\or0\or-0.70711\or-1\or-0.70711\fi}% + \ifodd\CF_lewiscurrentpos\relax + \pgfmathsetmacro\CF_lewiscurrentoffset{\CF_lewisoffset*\CF_lewisdiagcoeff}%% + \else + \let\CF_lewiscurrentoffset\CF_lewisoffset + \fi + \if.\expandafter\CF_firsttonil\CF_lewisremainpos\relax\_nil + \edef\CF_lewisremainpos{\expandafter\CF_gobarg\CF_lewisremainpos}% + \CF_expafter{\draw[fill,black,}{\CF_lewisstyle]}% + (\CF_lewisx pt+\CF_lewisxoffset*\CF_lewiscurrentoffset,\CF_lewisy pt+\CF_lewisyoffset*\CF_lewiscurrentoffset)circle(\CF_lewisradius);% + \else + \if|\expandafter\CF_firsttonil\CF_lewisremainpos\relax\_nil + \edef\CF_lewisremainpos{\expandafter\CF_gobarg\CF_lewisremainpos}% + \pgfmathsetmacro\CF_lewisx{\CF_lewisx pt+\CF_lewisxoffset*\CF_lewiscurrentoffset}% + \pgfmathsetmacro\CF_lewisy{\CF_lewisy pt+\CF_lewisyoffset*\CF_lewiscurrentoffset}% + \CF_expafter{\draw[}\CF_lewisstyle]% + (\CF_lewisx pt+\CF_lewislength*\CF_lewisyoffset/2 pt,\CF_lewisy-\CF_lewislength*\CF_lewisxoffset/2 pt)-- + (\CF_lewisx pt+\CF_lewislength*\CF_lewisyoffset/2 pt+\CF_lewisxoffset*\CF_lewiswidthdouble,\CF_lewisy-\CF_lewislength*\CF_lewisxoffset/2 pt+\CF_lewisyoffset*\CF_lewiswidthdouble)-- + (\CF_lewisx pt-\CF_lewislength*\CF_lewisyoffset/2 pt+\CF_lewisxoffset*\CF_lewiswidthdouble,\CF_lewisy+\CF_lewislength*\CF_lewisxoffset/2 pt+\CF_lewisyoffset*\CF_lewiswidthdouble)-- + (\CF_lewisx pt-\CF_lewislength*\CF_lewisyoffset/2 pt,\CF_lewisy+\CF_lewislength*\CF_lewisxoffset/2 pt)--cycle;% + \else + \if:\expandafter\CF_firsttonil\CF_lewisremainpos\relax\_nil + \edef\CF_lewisremainpos{\expandafter\CF_gobarg\CF_lewisremainpos}% + \pgfmathsetmacro\CF_lewisx{\CF_lewisx pt+\CF_lewisxoffset*\CF_lewiscurrentoffset}% + \pgfmathsetmacro\CF_lewisy{\CF_lewisy pt+\CF_lewisyoffset*\CF_lewiscurrentoffset}% + \CF_expafter{\draw[fill,black,}{\CF_lewisstyle]}% + (\CF_lewisx pt+\CF_lewisdist*\CF_lewisyoffset/2 pt,\CF_lewisy-\CF_lewisdist*\CF_lewisxoffset/2 pt)circle(\CF_lewisradius)% + (\CF_lewisx pt-\CF_lewisdist*\CF_lewisyoffset/2 pt,\CF_lewisy+\CF_lewisdist*\CF_lewisxoffset/2 pt)circle(\CF_lewisradius);% + \else + \pgfmathsetmacro\CF_lewisx{\CF_lewisx pt+\CF_lewisxoffset*\CF_lewiscurrentoffset}% + \pgfmathsetmacro\CF_lewisy{\CF_lewisy pt+\CF_lewisyoffset*\CF_lewiscurrentoffset}% + \CF_expafter{\draw[}\CF_lewisstyle]% + (\CF_lewisx pt+\CF_lewislength*\CF_lewisyoffset/2 pt,\CF_lewisy-\CF_lewislength*\CF_lewisxoffset/2 pt)--% + (\CF_lewisx pt-\CF_lewislength*\CF_lewisyoffset/2 pt,\CF_lewisy+\CF_lewislength*\CF_lewisxoffset/2 pt);% + \fi + \fi + \fi + \repeat + \node[anchor=base west]at(CF_lewis@anchor){\box\CF_boxlewis};% + \endtikzpicture + \CF_atendoflewis +} +\CFrestorecatcode +\endinput
\ No newline at end of file diff --git a/Master/texmf-dist/tex/generic/chemfig/chemfig.tex b/Master/texmf-dist/tex/generic/chemfig/chemfig.tex index 6c743b24e36..576108ae287 100644 --- a/Master/texmf-dist/tex/generic/chemfig/chemfig.tex +++ b/Master/texmf-dist/tex/generic/chemfig/chemfig.tex @@ -4,9 +4,9 @@ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % \def\CFname {chemfig} % -\def\CFver {1.56} % +\def\CFver {1.6a} % % % -\def\CFdate {2020/07/13} % +\def\CFdate {2021/02/28} % % % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % @@ -17,17 +17,17 @@ % Package URL: https://www.ctan.org/pkg/chemfig | % Bug tracker: https://framagit.org/unbonpetit/chemfig/issues | % Repository : https://framagit.org/unbonpetit/chemfig/tree/master | -% Copyright : Christian Tellechea 2010-2020 | +% Copyright : Christian Tellechea 2010-2021 | % Licence : Released under the LaTeX Project Public License v1.3c | % or later, see http://www.latex-project.org/lppl.txt | % Files : 1) chemfig.tex | % 2) chemfig.sty | -% 3) t-chemfig.tex | -% 4) README | -% 5) chemfig_doc_fr.tex | -% 6) chemfig_doc_fr.pdf | -% 7) chemfig_doc_en.tex | -% 8) chemfig_doc_fr.pdf | +% 3) README | +% 4) chemfig_doc_fr.tex | +% 5) chemfig_doc_fr.pdf | +% 6) chemfig_doc_en.tex | +% 7) chemfig_doc_fr.pdf | +% 8) chemfig-lewis.tex | %-------------------------------------------------------------------- %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% @@ -92,13 +92,12 @@ \newif\ifCF_definesubmol \newif\ifCF_adjustnamedp \newif\ifCF_macrofixedbondlength -\newif\ifCF_lewisoverlay +\newif\ifCF_compound_is_chemfig \newdimen\CF_dim \newdimen\CF_arrowsize \newdimen\CF_zero \CF_zero=0pt -\newbox\CF_boxlewis \newbox\CF_box \newbox\CF_boxstuff \newbox\CF_testbox @@ -277,9 +276,11 @@ \let\CF_substnogroups\CF_substnogrouponly \CF_ifnum{#1>0 } {\let\CF_testifx\empty - \foreach\CF_x in {1,...,#1}{\xdef\CF_testifx{\unexpanded\expandafter{\CF_testifx}\unexpanded\expandafter{\expandafter\ifx\CF_x\CF_nexttok1\fi}}}% + \foreach\CF_x in {1,...,#1} + {\xdef\CF_testifx{\unexpanded\expandafter{\CF_testifx}\unexpanded\expandafter{\expandafter\ifx\CF_x\CF_nexttok1\fi}}}% \let\CF_testif\empty - \foreach\CF_x in {1,...,#1}{\xdef\CF_testif{\unexpanded\expandafter{\CF_testif}\unexpanded\expandafter{\expandafter\if\CF_x\CF_nexttok1\fi}}}% + \foreach\CF_x in {1,...,#1} + {\xdef\CF_testif{\unexpanded\expandafter{\CF_testif}\unexpanded\expandafter{\expandafter\if\CF_x\CF_nexttok1\fi}}}% \CF_expsecond\CF_substi#2% } {\CF_substall#2% @@ -368,13 +369,6 @@ angle increment = \CF_defifempty\CF_angleincrement {#1}{45}, node style = \def\CF_nodestyle {#1}, bond style = \def\CF_bondstyle {#1}, - lewis | width = \CF_defifempty\CF_lewiswidthdouble {#1}{0.3ex}, - lewis sep = \CF_defifempty\CF_lewisoffset {#1}{0.4ex}, - lewis length = \CF_defifempty\CF_lewislength {#1}{1.5ex}, - lewis style = \def\CF_lewisstyle {#1}, - lewis dist = \CF_defifempty\CF_lewisdist {#1}{0.3em}, - lewis radius = \CF_defifempty\CF_lewisradius {#1}{0.15ex}, - lewis diag coeff = \CF_defifempty\CF_lewisdiagcoeff {#1}{1}, cycle radius coeff = \CF_defifempty\CF_cycleradiuscoeff {#1}{0.75}, stack sep = \CF_defifempty\CF_stacksep {#1}{1.5pt}, compound style = \def\CF_defaultcompoundstyle {#1}, @@ -408,15 +402,11 @@ angle increment = 45, node style = {}, bond style = {}, - lewis | width = 0.3ex, - lewis sep = 0.4ex, - lewis length = 1.5ex, - lewis style = {}, - lewis dist = 0.3em, - lewis radius = 0.15ex, - lewis diag coeff = 1, cycle radius coeff = 0.75, stack sep = 1.5pt, + autoreset cntcycle = true, + show cntcycle = false, + debug =false, scheme debug = false, compound style = {}, compound sep = 5em, @@ -432,8 +422,6 @@ + sep left = 0.5em, + sep right = 0.5em, + vshift = 0pt, - autoreset cntcycle = true, - show cntcycle = false, }% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% @@ -1365,7 +1353,7 @@ \global\advance\CF_cntgroup1 \let\CF_currentatom\empty \global\let\CF_hookdrawlist\empty - \CF_cntatomgroup0 + \CF_cntatomgroup0 % est le nombre d'atome dans le groupe que va calculer \CF_drawatomgroupa \CF_iffirsttokmatch{#3}? {\CF_drawatomgroupa{{}#3}} {\CF_drawatomgroupa{#3}}% @@ -1422,7 +1410,12 @@ \let\CF_moveatomname\empty } {}% - \CF_expafter{\node[}\CF_optstring](n\number\CF_cntgroup-\number\CF_cntatom){\CF_nodecontent};% + \ifboolKV[chemfig]{debug} + {\CF_expafter{\node[}\CF_optstring,draw=gray](n\number\CF_cntgroup-\number\CF_cntatom){\CF_nodecontent};% + \CF_show_debug_atom + } + {\CF_expafter{\node[}\CF_optstring](n\number\CF_cntgroup-\number\CF_cntatom){\CF_nodecontent};% + }% \let\CF_nodestrut\empty \advance\CF_cntatom1 \edef\CF_optstring{anchor=base \ifnum\CF_flipstate=1 east\else west\fi,at=(n\number\CF_cntgroup-\number\numexpr\CF_cntatom-1.base \ifnum\CF_flipstate=1 west\else east\fi),\CF_nodestyle}% @@ -1446,13 +1439,31 @@ \let\CF_moveatomname\empty } {}% - \CF_expafter{\node[}\CF_optstring](n\number\CF_cntgroup-\number\CF_cntatom){\CF_nodecontent};% + \ifboolKV[chemfig]{debug} + {\CF_expafter{\node[}\CF_optstring,draw=gray](n\number\CF_cntgroup-\number\CF_cntatom){\CF_nodecontent};% + \CF_show_debug_atom + } + {\CF_expafter{\node[}\CF_optstring](n\number\CF_cntgroup-\number\CF_cntatom){\CF_nodecontent};% + }% \repeat + \ifboolKV[chemfig]{debug} + \CF_show_debug_atomgroup + {}% \CF_hookdrawall \edef\CF_lastgroupnumber{\number\CF_cntgroup}% \let\CF_previousatomgroup\CF_currentatomgroup } +\def\CF_show_debug_atom{% + \node[at=(n\number\CF_cntgroup-\number\CF_cntatom.south),anchor=north,outer sep=1pt,overlay]{$\scriptscriptstyle\color{gray}\number\CF_cntatom$};% +} + +\def\CF_show_debug_atomgroup{% + \draw[red,overlay] ([xshift=-.5pt,yshift=.5pt]n\number\CF_cntgroup-1.north west) rectangle ([xshift=.5pt,yshift=-.5pt]n\number\CF_cntgroup-\number\CF_cntatomgroup.south east);% + \path (n\number\CF_cntgroup-1.north west) -- (n\number\CF_cntgroup-\number\CF_cntatomgroup.north east) + node [midway,yshift=1pt,overlay] {$\scriptscriptstyle\color{red}\number\CF_cntgroup$}; +} + \def\CF_keepmovearg @#1#2\_nil{\def\CF_currentatom{@{#1}}} \def\CF_drawatomgroupa#1{% transforme #1 en un groupe d'atomes @@ -1785,95 +1796,6 @@ \charge_d } -\def\Lewis{% - \CF_warning{\string\Lewis\space is unmaintained and is likely to be removed in a near future. Please, use \string\Charge.}% - \CF_lewisoverlayfalse - \CF_testopt\CF_lewisa{}% -} - -\def\lewis{% - \CF_warning{\string\lewis\space is unmaintained and is likely to be removed in a near future. Please, use \string\charge.}% - \CF_lewisoverlaytrue - \CF_testopt\CF_lewisa{}% -} - -\def\CF_lewisa[#1]{% - \begingroup - \CF_doifnotempty{#1}{\setchemfig{#1}}% - \ifCF_lewisoverlay - \CF_addtomacro\CF_lewisstyle{,overlay}% - \fi - \CF_lewisb -} - -\def\CF_lewisb#1{% - \CF_lewisc#1\_nil - \endgroup -} - -\def\CF_lewisc#1,#2\_nil{% - \setbox\CF_boxlewis\hbox{\printatom{#2}}% mettre en dehors de tikzpicture (si \printatom ne passe pas en mode math) - \CF_ifinsidetikz - {\pgfinterruptpicture - \let\CF_atendoflewis\endpgfinterruptpicture - } - {\let\CF_atendoflewis\relax - }% - \tikzpicture[every node/.style={anchor=base,inner sep=0pt,outer sep=0pt,minimum size=0pt},baseline]% - \CF_makeother;\CF_makeother:% - \node(CF_lewis@anchor){}; - \def\CF_lewisremainpos{#1}% - \let\CF_lewispreviouspos\empty - \loop - \unless\ifx\CF_lewisremainpos\empty - \edef\CF_lewiscurrentpos{\expandafter\CF_firsttonil\CF_lewisremainpos\_nil}% - \edef\CF_lewisremainpos{\expandafter\CF_gobarg\CF_lewisremainpos}% - \pgfmathsetmacro\CF_lewisx{\wd\CF_boxlewis/2+\ifcase\CF_lewiscurrentpos\space1\or1\or0\or-1\or-1\or-1\or0\or1\fi*(\wd\CF_boxlewis/2)}% - \pgfmathsetmacro\CF_lewisy{\ht\CF_boxlewis/2+\ifcase\CF_lewiscurrentpos\space0\or1\or1\or1\or0\or-1\or-1\or-1\fi*(\ht\CF_boxlewis/2\ifnum\CF_lewiscurrentpos>4 +\dp\CF_boxlewis\fi)}% - \edef\CF_lewisxoffset{\ifcase\CF_lewiscurrentpos\space1\or0.70711\or0\or-0.70711\or-1\or-0.70711\or0\or0.70711\fi}% - \edef\CF_lewisyoffset{\ifcase\CF_lewiscurrentpos\space0\or0.70711\or1\or0.70711\or0\or-0.70711\or-1\or-0.70711\fi}% - \ifodd\CF_lewiscurrentpos\relax - \pgfmathsetmacro\CF_lewiscurrentoffset{\CF_lewisoffset*\CF_lewisdiagcoeff}%% - \else - \let\CF_lewiscurrentoffset\CF_lewisoffset - \fi - \if.\expandafter\CF_firsttonil\CF_lewisremainpos\relax\_nil - \edef\CF_lewisremainpos{\expandafter\CF_gobarg\CF_lewisremainpos}% - \CF_expafter{\draw[fill,black,}{\CF_lewisstyle]}% - (\CF_lewisx pt+\CF_lewisxoffset*\CF_lewiscurrentoffset,\CF_lewisy pt+\CF_lewisyoffset*\CF_lewiscurrentoffset)circle(\CF_lewisradius);% - \else - \if|\expandafter\CF_firsttonil\CF_lewisremainpos\relax\_nil - \edef\CF_lewisremainpos{\expandafter\CF_gobarg\CF_lewisremainpos}% - \pgfmathsetmacro\CF_lewisx{\CF_lewisx pt+\CF_lewisxoffset*\CF_lewiscurrentoffset}% - \pgfmathsetmacro\CF_lewisy{\CF_lewisy pt+\CF_lewisyoffset*\CF_lewiscurrentoffset}% - \CF_expafter{\draw[}\CF_lewisstyle]% - (\CF_lewisx pt+\CF_lewislength*\CF_lewisyoffset/2 pt,\CF_lewisy-\CF_lewislength*\CF_lewisxoffset/2 pt)-- - (\CF_lewisx pt+\CF_lewislength*\CF_lewisyoffset/2 pt+\CF_lewisxoffset*\CF_lewiswidthdouble,\CF_lewisy-\CF_lewislength*\CF_lewisxoffset/2 pt+\CF_lewisyoffset*\CF_lewiswidthdouble)-- - (\CF_lewisx pt-\CF_lewislength*\CF_lewisyoffset/2 pt+\CF_lewisxoffset*\CF_lewiswidthdouble,\CF_lewisy+\CF_lewislength*\CF_lewisxoffset/2 pt+\CF_lewisyoffset*\CF_lewiswidthdouble)-- - (\CF_lewisx pt-\CF_lewislength*\CF_lewisyoffset/2 pt,\CF_lewisy+\CF_lewislength*\CF_lewisxoffset/2 pt)--cycle;% - \else - \if:\expandafter\CF_firsttonil\CF_lewisremainpos\relax\_nil - \edef\CF_lewisremainpos{\expandafter\CF_gobarg\CF_lewisremainpos}% - \pgfmathsetmacro\CF_lewisx{\CF_lewisx pt+\CF_lewisxoffset*\CF_lewiscurrentoffset}% - \pgfmathsetmacro\CF_lewisy{\CF_lewisy pt+\CF_lewisyoffset*\CF_lewiscurrentoffset}% - \CF_expafter{\draw[fill,black,}{\CF_lewisstyle]}% - (\CF_lewisx pt+\CF_lewisdist*\CF_lewisyoffset/2 pt,\CF_lewisy-\CF_lewisdist*\CF_lewisxoffset/2 pt)circle(\CF_lewisradius)% - (\CF_lewisx pt-\CF_lewisdist*\CF_lewisyoffset/2 pt,\CF_lewisy+\CF_lewisdist*\CF_lewisxoffset/2 pt)circle(\CF_lewisradius);% - \else - \pgfmathsetmacro\CF_lewisx{\CF_lewisx pt+\CF_lewisxoffset*\CF_lewiscurrentoffset}% - \pgfmathsetmacro\CF_lewisy{\CF_lewisy pt+\CF_lewisyoffset*\CF_lewiscurrentoffset}% - \CF_expafter{\draw[}\CF_lewisstyle]% - (\CF_lewisx pt+\CF_lewislength*\CF_lewisyoffset/2 pt,\CF_lewisy-\CF_lewislength*\CF_lewisxoffset/2 pt)--% - (\CF_lewisx pt-\CF_lewislength*\CF_lewisyoffset/2 pt,\CF_lewisy+\CF_lewislength*\CF_lewisxoffset/2 pt);% - \fi - \fi - \fi - \repeat - \node[anchor=base west]at(CF_lewis@anchor){\box\CF_boxlewis};% - \endtikzpicture - \CF_atendoflewis -} - \def\Chembelow{\begingroup\let\CF_temp\CF_gobarg\CF_chembelowa} \def\chembelow{\begingroup\let\CF_temp\CF_id\CF_chembelowa} @@ -2074,20 +1996,34 @@ \CF_iffirsttokina{\arrow\schemestop\merge}% {} {\CF_ifx\CF_toksa\bgroup - {\CF_addnextarg + {\ifCF_compound_is_chemfig% bugfix 1.6 + \edef\CF_restore_hashcatcode{\catcode\number`\#=\number\catcode`\# \relax}% + \catcode`\#12 % TODO ou carrément mettre # à 12 dans tout l'environnement ? + \fi + \CF_addnextarg } {\CF_ifx\CF_toksa\CF_sptoken {\CF_addtomacro\CF_compound{ }% \CF_schemestartd } - {\afterassignment\CF_schemestartc + {\CF_ifx\CF_toksa\chemfig + \CF_compound_is_chemfigtrue% mettre le flag à vrai + {}% + \afterassignment\CF_schemestartc \CF_addtomacro\CF_compound }% }% }% } -\def\CF_addnextarg#1{\CF_addtomacro\CF_compound{{#1}}\CF_schemestartc} +\def\CF_addnextarg#1{% + \CF_addtomacro\CF_compound{{#1}}% + \ifCF_compound_is_chemfig% bugfix 1.6 + \CF_restore_hashcatcode + \CF_compound_is_chemfigfalse% mettre le flag à faux + \fi + \CF_schemestartc +} \def\CF_displaycompound#1#2{% #1 = nom et #2 = style \CF_doifnotempty\CF_compound @@ -3088,7 +3024,7 @@ v1.53 2020/04/27 v1.54 2020/05/21 - chemfig ne peut plus fonctionner sans \expanded - bug : un signe "=" laissé par erreur dans le flux - ---------------------------------------------------------------------- +---------------------------------------------------------------------- v1.55 2020/06/15 - chemfig est incompatible avec conTeXt, vu que ce moteur redéfinit des primitives telles que \expanded, \unexpanded et peut être @@ -3096,4 +3032,15 @@ v1.55 2020/06/15 ---------------------------------------------------------------------- v1.56 2020/07/13 - le centre des cycles est désormais accessible via un noeud - spécifique pour chacun d'eux.
\ No newline at end of file + spécifique pour chacun d'eux. +---------------------------------------------------------------------- +v1.6 2021/02/26 + - les macros des formules de Lewis sont retirées et placées dans + le fichier séparé "lewis.tex" que l'utilisateur peut charger + s'il le souhaite + - ajout d'une clé <debug> pour le trousseau [chemfig] + - à l'intérieur d'un schéma, le token '#' est permis dans + l'argument de \chemfig +---------------------------------------------------------------------- +v1.6a 2021/02/28 + - le fichier lewis.tex a été renommé chemfig-lewis.tex diff --git a/Master/tlpkg/bin/ctan2tl b/Master/tlpkg/bin/ctan2tl index 5aacb78fb5e..0f366a6a08c 100755 --- a/Master/tlpkg/bin/ctan2tl +++ b/Master/tlpkg/bin/ctan2tl @@ -171,6 +171,9 @@ fi # check for file names differing in case only. find $pkg \( -name .svn \) -prune -o -print | sort -f | uniq -i -d >&2 +# not group-writable; cron checks also. +chmod -R u+w,go-w,a+rX-st $pkg + # check for symlinks find $pkg -type l -ls | grep -v /Master/bin | sort >&2 diff --git a/Master/tlpkg/bin/tlpkg-ctan-check b/Master/tlpkg/bin/tlpkg-ctan-check index 06ba4ada462..2623490bb68 100755 --- a/Master/tlpkg/bin/tlpkg-ctan-check +++ b/Master/tlpkg/bin/tlpkg-ctan-check @@ -833,7 +833,7 @@ my @TLP_working = qw( xetexref xevlna xfakebold xfor xgreek xhfill xifthen xii xii-lat xindex xint xits xkcdcolors xkeyval xlop xltabular xltxtra - xmltex xmpincl xmuthesis xnewcommand + xml2pmx xmltex xmpincl xmuthesis xnewcommand xoptarg xpatch xpeek xpiano xpicture xpinyin xprintlen xpunctuate xq xsavebox xsim xskak xstring xtab xtuthesis xunicode xurl xwatermark xyling xymtex xypic xypic-tut-pt xytree diff --git a/Master/tlpkg/libexec/ctan2tds b/Master/tlpkg/libexec/ctan2tds index 176f8d50495..7eb6678ec2a 100755 --- a/Master/tlpkg/libexec/ctan2tds +++ b/Master/tlpkg/libexec/ctan2tds @@ -1857,7 +1857,7 @@ $standardtex 'captcont', '\.sty|[^c]\.cfg', # omit ltxdoc.cfg, would be system-wide 'captdef', '^..[^s].*\.sty', # not miscdoc.sty 'carlisle', '\.sty|\.ltx', - 'chemfig', '(t-)?chemfig.tex|' . $standardtex, + 'chemfig', '(t-)?chemfig(-lewis)?.tex|' . $standardtex, 'chemformula', '\.sty$', # not chemformula-manual.cls 'chemstyle', '\.jdf|' . $standardtex, 'chhaya', 'sankshep.tex|' . $standardtex, |