diff options
Diffstat (limited to 'Master/texmf-dist/tex/latex/chemmacros/chemformula.sty')
-rw-r--r-- | Master/texmf-dist/tex/latex/chemmacros/chemformula.sty | 57 |
1 files changed, 42 insertions, 15 deletions
diff --git a/Master/texmf-dist/tex/latex/chemmacros/chemformula.sty b/Master/texmf-dist/tex/latex/chemmacros/chemformula.sty index 14c5c4305ce..5f525e1cebc 100644 --- a/Master/texmf-dist/tex/latex/chemmacros/chemformula.sty +++ b/Master/texmf-dist/tex/latex/chemmacros/chemformula.sty @@ -5,7 +5,6 @@ % - macros and commands for chemists - % % --------------------------------------------------------------------------- % % - Clemens Niederberger - % -% - 2012/05/18 - % % --------------------------------------------------------------------------- % % - https://bitbucket.org/cgnieder/chemmacros/ - % % - contact@mychemistry.eu - % @@ -30,8 +29,8 @@ \RequirePackage{ expl3 } \ProvidesExplPackage {chemformula} - {2012/05/18} - {3.3b} + {2012/07/24} + {3.3d} {typeset chemical compounds and reactions} %-----------------------------------------------------------------------------% @@ -726,6 +725,8 @@ \tl_set:Nn \l_chemformula_name_format_tl { \scriptsize\centering } \tl_new:N \l_chemormula_sup_super_factor_tl +\tl_new:N \l_chemformula_bond_style_tl + % dimensions: \dim_new:N \l_chemformula_stoich_space_dim \dim_set:Nn \l_chemformula_stoich_space_dim { .1667em } @@ -756,9 +757,7 @@ \dim_new:N \l_chemformula_superscript_dim \dim_zero:N \l_chemformula_superscript_dim \dim_new:N \l_chemformula_bond_dim - \hbox_set:Nn \l_tmpa_box { \textendash } - \dim_set:Nn \l_chemformula_bond_dim { \box_wd:N \l_tmpa_box } - \box_clear:N \l_tmpa_box + \dim_set:Nn \l_chemformula_bond_dim { 1.1667ex } % integers: \int_new:N \l_chemformula_count_tokens_int @@ -845,7 +844,7 @@ %-----------------------------------------------------------------------------% % bonds: \dim_new:N \l_chemformula_bond_space_dim -\dim_zero:N \l_chemformula_bond_space_dim +\dim_set:Nn \l_chemformula_bond_space_dim { .07em } \cs_new:Npn \chemformula_single_bond: { @@ -853,12 +852,19 @@ { \chemformula_minus: } { \skip_horizontal:N \l_chemformula_bond_space_dim - \chemformula_tikz:nn { inner~sep=0, outer~sep=0 } + \chemformula_tikz:nn + { + inner~sep = 0 , + outer~sep = 0 , + text~height = 1em , + baseline = (chemformula-single-bond.base) + } { \draw node[draw=none,minimum~height=1em,minimum~width=0] (chemformula-single-bond) at (0,0) {} ; - \draw[butt~cap-butt~cap] (chemformula-single-bond) ++ (0,-.1716em) - -- ++( \l_chemformula_bond_dim ,0) ; + \draw[butt~cap-butt~cap,\l_chemformula_bond_style_tl] + (chemformula-single-bond) ++ (0,-.1716em) + -- ++( \l_chemformula_bond_dim ,0); } \skip_horizontal:N \l_chemformula_bond_space_dim } @@ -867,7 +873,13 @@ \cs_new:Npn \chemformula_double_bond: { \skip_horizontal:N \l_chemformula_bond_space_dim - \chemformula_tikz:nn { inner~sep=0, outer~sep=0 } + \chemformula_tikz:nn + { + inner~sep = 0 , + outer~sep = 0 , + text~height = 1em , + baseline = (chemformula-double-bond.base) + } { \draw node[draw=none,minimum~height=1em,minimum~width=0] (chemformula-double-bond) at (0,0) {} ; @@ -884,7 +896,13 @@ \cs_new:Npn \chemformula_triple_bond: { \skip_horizontal:N \l_chemformula_bond_space_dim - \chemformula_tikz:nn { inner~sep=0, outer~sep=0 } + \chemformula_tikz:nn + { + inner~sep = 0 , + outer~sep = 0 , + text~height = 1em , + baseline = (chemformula-triple-bond.base) + } { \draw node[draw=none,minimum~height=1em,minimum~width=0] (chemformula-triple-bond) at (0,0) {} ; @@ -1723,6 +1741,7 @@ } , bond-length .dim_set:N = \l_chemformula_bond_dim , bond-offset .dim_set:N = \l_chemformula_bond_space_dim , + bond-style .tl_set:N = \l_chemformula_bond_style_tl , font-family .code:n = \bool_set_true:N \l_chemformula_fss_bool \bool_set_false:N \l_chemformula_fontspec_bool @@ -1791,11 +1810,19 @@ VERSION HISTORY - fix of unexpected behaviour in the compound naming mechanism 2012/05/18 - version 3.3b - compatibility with MiKTeX +2012/05/18 - version 3.3c - fix in the `ghsystem/language' option +2012/07/24 - version 3.3d - additional picture file type `pdf' + - default bond length set to 1.1667ex + - bug fix in the bonds + - added kerning to cip commands, new option + `iupac/cip-kern' + - bug fix: messages needed to be defined before the + options %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % TODO -- Bug: \ch{ !(bla)( Fe(CO)6^3+ ) } ermöglichen -- Hoch- und Tiefstellungen mit \box_move_up:nn et.al. umschreiben. +- Option, die den Punkt . in \ch zum Radikal-Punkt macht, evtl \chemformula_radical: + an chemfigs \lewis anpassen - Bindungen nach einem Mechanismus ähnlich der Pfeile konstruieren => Möglichkeit, eigene Bindungen hinzuzufügen, Bindungen leichter um weitere Typen erweitern @@ -1803,6 +1830,6 @@ VERSION HISTORY => Makro \bond{<type>}? - Addukte: Zahlen nach * und . automatisch erkennen? - allow fractions in subscripts: _{$\frac{1}{2}$} ? -- optionale argumente von \\ nach außen weiterreichen? +- optionale Argumente von \\ nach außen weiterreichen? - vertikalen Shift der Hoch- und Tiefstellungen mit \mathchoice anpassen: \( K = \frac{[\ch{Na+}]^2[\ch{SO4^2-}]}{[\ch{Na2SO4}]} \)
\ No newline at end of file |