diff options
author | Karl Berry <karl@freefriends.org> | 2011-04-25 23:53:11 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2011-04-25 23:53:11 +0000 |
commit | fa970c2346fbb2a938fc0cbddf2aeec1e111c993 (patch) | |
tree | b3d58fd5e9d7bcf8a66ec61b0e634e3a8a9c1591 /Master/texmf-dist/doc/generic | |
parent | 634ddfa7204fe5e21548eda9e1e2f7cbd0238fe3 (diff) |
chemfig (25apr11)
git-svn-id: svn://tug.org/texlive/trunk@22205 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/doc/generic')
-rw-r--r-- | Master/texmf-dist/doc/generic/chemfig/chemfig_doc_en.pdf | bin | 1116388 -> 1117107 bytes | |||
-rw-r--r-- | Master/texmf-dist/doc/generic/chemfig/chemfig_doc_en.tex | 35 | ||||
-rw-r--r-- | Master/texmf-dist/doc/generic/chemfig/chemfig_doc_fr.pdf | bin | 1138953 -> 1140438 bytes | |||
-rw-r--r-- | Master/texmf-dist/doc/generic/chemfig/chemfig_doc_fr.tex | 35 |
4 files changed, 42 insertions, 28 deletions
diff --git a/Master/texmf-dist/doc/generic/chemfig/chemfig_doc_en.pdf b/Master/texmf-dist/doc/generic/chemfig/chemfig_doc_en.pdf Binary files differindex 46963d23523..f7fa601944b 100644 --- a/Master/texmf-dist/doc/generic/chemfig/chemfig_doc_en.pdf +++ b/Master/texmf-dist/doc/generic/chemfig/chemfig_doc_en.pdf 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 b83578545d2..c02a4121e69 100644 --- a/Master/texmf-dist/doc/generic/chemfig/chemfig_doc_en.tex +++ b/Master/texmf-dist/doc/generic/chemfig/chemfig_doc_en.tex @@ -1,11 +1,11 @@ -% _________________________________________________________________ -% | | -% | | -% | ChemFig Documentation | -% | | -% | April 10, 2011 | -% | | -% |_________________________________________________________________| +% __________________________________________________________________ +% | | +% | | +% | ChemFig Documentation | +% | | +% | April 24, 2011 | +% | | +% |__________________________________________________________________| % % This is chemfig_doc_en.tex, the LaTeX code of the chemfig English % documentation. Translation by Theo Hopman (hopman.theo@gmail.com). @@ -286,11 +286,13 @@ delim_2 "\\dotfill" \setitemize{leftmargin=3em,topsep=0pt,parsep=0pt,itemsep=0pt} \part{Introduction} -\section{New in version 0.3} -Here's what's new in version 0.4: +\section{New in version 0.4b} +Here's what's new in version 0.4b: \begin{enumerate} - \item The code is now written in plain $\varepsilon$\TeX\idx*{etex@$\protect\varepsilon$\protect\TeX}. Therefore, the package may be used with \LaTeX{}\idx*{Latex@\protect\LaTeX} or Con\TeX{}t\idx*{ConTeXt@Con\protect\TeX{}t}. - \item Bugfixes. + \item the argument of the \verb-\chemfig- command is no longer dependent of the \idx{catcode} regime. Therefore, the \verb-\chemfig- command can be put inside arguments of macros, even if the molecule code contains characters with an active catcode like ``\verb-~-''. It is now possible to write\footnote{The \texttt{\string\protect} command makes \texttt{\string\chemfig} robust, i.e. able to be stored without being altered by \texttt{\string\section} and reused later, especially in the table of content.} in a \LaTeX{} document something like:\par\verb-\section{The molecule \protect\chemfig{N~N}}-. + + ``\verb-#-'' is the exception to this rule. In order to put in an argument of a macro the command \verb-\chemfig- with a molecule code containing \verb-# -, you must wrap it between ``\verb-\catcode`\#=12-'' and ``\verb-\catcode`\#=6-''. + \item The new \idx{\setbondstyle} command sets the style of the bonds, see page~\pageref{setbondstyle}. \end{enumerate} \section{Foreword} @@ -548,6 +550,10 @@ Therefore the first group of atoms ``$\mathrm{H_3C}$'' is split into two atoms: If one bond is followed immediately by another, then \CF inserts an empty group \verb-{}-. Around this empty group the separation $\delta$ is zero: \exemple{Empty groups}/\chemfig{A-B=-=C}/ +\label{setbondstyle}\idx*{\setbondstyle}The \verb-\setbondstyle{<tikz code>}- command sets the style for all the bonds drawn thereafter. The \verb-<tikz code>- is empty by default. To custom a single bond, see page~\pageref{perso-liaisons}. +\exemple{Style of bonds}/\setbondstyle{line width=1pt,red} +\chemfig{A-B=C>|D<E>:F}/ + \label{modif.retrait} The spacing $\delta$ for just one bond can be specified with the character \verb-#-\idx*{\protect\symbol{'043}@\protect\texttt{\protect\symbol{'043}}}. This character must be placed \emph{immediately} after the bond symbol and has one required argument between parentheses of the form ``\verb-#(<dim1>,<dim2>)-'', where \verb-<dim1>- is the spacing $\delta$ at the beginning of the bond and \verb-<dim2>- is the that at the end. If \verb-<dim2>- is omitted, the spacing at the end of the bond takes the value of $\delta$ in effect at that time. One can see in the example how the shortening, set to 4pt to be more visible, is nullified for the bond arriving at ``B'', then for the one leaving ``B'', and finally for both: \begingroup \catcode`\#12 @@ -648,7 +654,7 @@ where \verb-<integer 1>- and \verb-<integer 2>- are the numbers of the desired d \chemfig{ABCD-[:75,,,2]EFG}\qquad \chemfig{ABCD-[:75,,3,2]EFG}| -\section{Customization of bonds} +\section{Customization of bonds}\label{perso-liaisons} \idx*{bond!customization}There is a fifth and last optional argument for bonds which is found after the fourth comma: \centerverb/[,,,,<tikz code>]/ \smallskip @@ -1675,6 +1681,7 @@ The commands created by \CF are: \verb-\chemfig<code>-\idx*\chemfig& draws the molecule whose design is described by the \verb-<code>-\\ \verb-\printatom-\idx*\printatom& displays the atoms within the molecules. It can be redefined to customize the output. See page~\pageref{perso.affichage}\\ \verb-\setnodestyle{<style tikz>}-\idx*\setnodestyle& using \TIKZ syntax, this macro defines the style of nodes containing the atoms. See page~\pageref{style.noeuds}\\ +\verb-\setbondestyle{<style tikz>}-\idx*\setbondstyle& with the \TIKZ syntax, this macro defines the style of the bonds. See~\pageref{setbondstyle}\\ \idx\hflipnext&the next molecule will be horizontally flipped\\ \idx\vflipnext&the next molecule will be vertically flipped\\ \verb-\definesubmol{<name>}[code1]{<code2>}-\idx*\definesubmol& creates an alias \verb-!<nom>- which can be put in the code of molecules to be drawn, and which will be replaced with \verb-<code1>- or \verb-<code2>- depending on the angle of the last bond. See page~\pageref{definesubmol}\\ @@ -1731,7 +1738,7 @@ $\star\quad\star$ \idx*\definesubmol \exemple*{Stearine, skeleton diagram}/\definesubmol{x}{-[:+30,.6]-[:-30,.6]} \definesubmol{y}{-O-(=[2,.6]O)-!x!x!x!x!x!x!x!x} -\chemfig{[2](!y)-[,1.5](!y)-[,1.5](!y)}/ +\chemfig{[2]([0]!y)-[,1.5]([0]!y)-[,1.5]([0]!y)}/ \exemple*{Methyl 2-methylpropanoate}/\chemfig{H_3C-CH_2(-[2]CH_3)-C(=[1]O)-[7]O-CH_3}/ diff --git a/Master/texmf-dist/doc/generic/chemfig/chemfig_doc_fr.pdf b/Master/texmf-dist/doc/generic/chemfig/chemfig_doc_fr.pdf Binary files differindex 14a81b35887..88cbaffa998 100644 --- a/Master/texmf-dist/doc/generic/chemfig/chemfig_doc_fr.pdf +++ b/Master/texmf-dist/doc/generic/chemfig/chemfig_doc_fr.pdf 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 e6d29a6564b..c92c6990af9 100644 --- a/Master/texmf-dist/doc/generic/chemfig/chemfig_doc_fr.tex +++ b/Master/texmf-dist/doc/generic/chemfig/chemfig_doc_fr.tex @@ -1,11 +1,11 @@ -% _________________________________________________________________ -% | | -% | | -% | Documentation de ChemFig | -% | | -% | 10 avril 2011 | -% | | -% |_________________________________________________________________| +% __________________________________________________________________ +% | | +% | | +% | Documentation de ChemFig | +% | | +% | 24 avril 2011 | +% | | +% |__________________________________________________________________| % % Ceci est chemfig_doc_fr.tex, le code LaTeX de la documentation en % français de chemfig. @@ -286,11 +286,13 @@ delim_2 "\\dotfill" \setitemize{leftmargin=3em,topsep=0pt,parsep=0pt,itemsep=0pt,label=--} \part{Introduction} -\section{Nouveautés de la version 0.4} -Voici les nouveautés de la version 0.4 : +\section{Nouveautés de la version 0.4b} +Voici les nouveautés de la version 0.4b : \begin{enumerate} - \item Le code a été ré-écrit en plain $\varepsilon$\TeX\idx*{etex@$\protect\varepsilon$\protect\TeX}. L'extention est donc utilisable avec \LaTeX{}\idx*{Latex@\protect\LaTeX} et avec Con\TeX{}t\idx*{ConTeXt@Con\protect\TeX{}t}.; - \item Corrections de bugs. + \item l'argument de la commande \verb-\chemfig- n'est plus sensible au régime courant des \idx{codes de catégories}. Par conséquent, la commande \verb-\chemfig- peut se trouver dans l'argument d'autres macros, même lorsque le code de la molécule contient des caractères ayant des codes de catégorie non inoffensifs : \verb-~-, \verb-!- ou \verb-?-. On peut donc sans problème écrire\footnote{La commande \texttt{\string\protect} ne sert ici qu'à rendre la commande \texttt{\string\chemfig} \emph{robuste}, c'est-à-dire capable d'être sauvegardée et conservée intacte par \texttt{\string\section} pour être réutilisée plus tard, dans la table des matières notamment.} dans un document \LaTeX : \verb-\section{La molécule \protect\chemfig{N~N}}-. + + Seul \og\verb-#-\fg{} est l'exception à cette règle. Pour mettre dans l'argument d'une macro la commande \texttt{\string\chemfig} dont le code de la molécule contient le caractère \verb-#-, il faut faire précéder le tout de \og\verb-\catcode`\#=12-\fg{} et le faire suivre de \og\verb-\catcode`\#=6-\fg. + \item La commande \idx{\setbondstyle} permet de régler le style des liaisons, voir page~\pageref{setbondstyle}. \end{enumerate} \section{Avant propos} @@ -548,6 +550,10 @@ Par conséquent, le premier groupe d'atomes ``$\mathrm{H_3C}$'' est découpé en Si deux liaisons se suivent, alors \CF insère un groupe vide \verb-{}-, et autour de ce groupe vide, l'espacement $\delta$ est nul : \exemple{Groupes vides}/\chemfig{A-B=-=C}/ +\label{setbondstyle}\idx*{\setbondstyle}La commande \verb-\setbondstyle{<code tikz>}- définit le style de toutes les liaisons qui seront dessinées par la suite. Le \verb-<code tikz>- est vide par défaut. Pour personnaliser les liaisons une par une, voir page~\pageref{perso-liaisons}. +\exemple{Style des liaisons}/\setbondstyle{line width=1pt,red} +\chemfig{A-B=C>|D<E>:F}/ + \label{modif.retrait}On peut spécifier l'espacement $\delta$ pour une seule liaison avec le caractère \verb-#-\idx*{\protect\symbol{'043}@\protect\texttt{\protect\symbol{'043}}}. Ce caractère doit se situer \emph{immédiatement} après le signe de liaison et dispose d'un argument obligatoire entre parenthèses de la forme ``\verb-#(<dim1>,<dim2>)-'', où \verb-<dim1>- représente l'espacement $\delta$ au début de la liaison et \verb-<dim2>- celui de la fin. Si \verb-<dim2>- est omis, l'espacement en fin de liaison prend la valeur de $\delta$ en vigueur à ce moment. On peut observer sur cet exemple comment le retrait, réglé à 4pt pour être plus visible, est rendu nul pour la liaison arrivant sur ``B'', puis partant de ``B'' et enfin pour les deux à la fois : \begingroup \catcode`\#12 @@ -648,7 +654,7 @@ où \verb-<entier 1>- et \verb-<entier 2>- sont les numéros des atomes de dépa \chemfig{ABCD-[:75,,,2]EFG}\qquad \chemfig{ABCD-[:75,,3,2]EFG}| -\section{Personnalisation des liaisons} +\section{Personnalisation des liaisons}\label{perso-liaisons} \idx*{liaison!personnalisation}Il existe un 5\ieme{} et dernier argument optionnel pour les liaisons qui se trouve à droite de la 4\ieme{} virgule : \centerverb/[,,,,<code tikz>]/ \smallskip @@ -1675,6 +1681,7 @@ Les commandes créées par \CF sont : \verb-\chemfig<code>-\idx*\chemfig&dessine la molécule dont le dessin est décrit par le \verb-<code>-\\ \verb-\printatom-\idx*\printatom & cette macro affiche les atomes dans les molécules. Elle peut être redéfinie pour personnaliser l'affichage, voir~\pageref{perso.affichage}\\ \verb-\setnodestyle{<style tikz>}-\idx*\setnodestyle& à l'aide de la syntaxe de \TIKZ, cette macro définit le style de nœuds contenant les atomes, voir~\pageref{style.noeuds}\\ +\verb-\setbondestyle{<style tikz>}-\idx*\setbondstyle& à l'aide de la syntaxe de \TIKZ, cette macro définit le style des liaisons voir~\pageref{setbondstyle}\\ \verb-\hflipnext-\idx*\hflipnext&la prochaine molécule sera inversée horizontalement\\ \verb-\vflipnext-\idx*\vflipnext&la prochaine molécule sera inversée verticalement\\ \verb-\definesubmol{<nom>}[code1]{<code2>}-\idx*\definesubmol & créé un alias \verb-!<nom>- que l'on peut placer dans le code des molécules à dessiner qui remplace le \verb-<code1>- ou le \verb-<code2>- selon l'inclinaison de la dernière liaison. Voir page~\pageref{definesubmol}\\ @@ -1731,7 +1738,7 @@ $\star\quad\star$ \idx*\definesubmol \exemple*{Stéarine, formule topologique}/\definesubmol{x}{-[:+30,.6]-[:-30,.6]} \definesubmol{y}{-O-(=[2,.6]O)-!x!x!x!x!x!x!x!x} -\chemfig{[2](!y)-[,1.5](!y)-[,1.5](!y)}/ +\chemfig{[2]([0]!y)-[,1.5]([0]!y)-[,1.5]([0]!y)}/ \exemple*{2-méthylpropanoate de méthyl}/\chemfig{H_3C-CH_2(-[2]CH_3)-C(=[1]O)-[7]O-CH_3}/ |