summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/chemmacros/chemmacros.sty
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2013-08-24 22:39:08 +0000
committerKarl Berry <karl@freefriends.org>2013-08-24 22:39:08 +0000
commitc85fa36270547458332b4c790354729c2f3f3c9a (patch)
treecf1202280b0358de3a3b820b5782f1f4f7197511 /Master/texmf-dist/tex/latex/chemmacros/chemmacros.sty
parent8f202738ce363c80b55b8a2a9496340292a4b200 (diff)
chemmacros (24aug13)
git-svn-id: svn://tug.org/texlive/trunk@31513 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/chemmacros/chemmacros.sty')
-rw-r--r--Master/texmf-dist/tex/latex/chemmacros/chemmacros.sty84
1 files changed, 49 insertions, 35 deletions
diff --git a/Master/texmf-dist/tex/latex/chemmacros/chemmacros.sty b/Master/texmf-dist/tex/latex/chemmacros/chemmacros.sty
index a1c7aa6c46f..26cb76ea4ab 100644
--- a/Master/texmf-dist/tex/latex/chemmacros/chemmacros.sty
+++ b/Master/texmf-dist/tex/latex/chemmacros/chemmacros.sty
@@ -26,8 +26,8 @@
% - The Current Maintainer of this work is Clemens Niederberger.
% --------------------------------------------------------------------------
\RequirePackage{ expl3 , xparse , l3keys2e }
-\def\chemmacros@version{4.0}
-\def\chemmacros@date{2013/07/06}
+\def\chemmacros@version{4.1}
+\def\chemmacros@date{2013/08/24}
\ProvidesExplPackage
{chemmacros}
@@ -1037,20 +1037,24 @@
\ExplSyntaxOff
\protected\def\chemmacros@sconf#1%
{%
+ \begingroup
\tikz[baseline=(a.base),text height=1.5ex,text depth=.25ex]
{
\node(a) {#1} ;
\draw[->,thick,rotate=90] ($(a.center)+(20:.8em)$) arc (20:340:.8em);
}%
+ \endgroup
}
\protected\def\chemmacros@rconf#1%
{%
+ \begingroup
\tikz[baseline=(a.base),text height=1.5ex,text depth=.25ex]
{
\node(a) {#1} ;
\draw[<-,thick,rotate=90] ($(a.center)+(20:.8em)$) arc (20:340:.8em) ;
}%
+ \endgroup
}
\ExplSyntaxOn
@@ -1074,9 +1078,9 @@
\DeclareChemIUPAC \L { \textsc { l } }
% ortho/meta/para
-\DeclareChemIUPAC \ortho { \textsl { o } }
-\DeclareChemIUPAC \meta { \textsl { m } }
-\DeclareChemIUPAC \para { \textsl { p } }
+\DeclareChemIUPAC \ortho { \textit { o } }
+\DeclareChemIUPAC \meta { \textit { m } }
+\DeclareChemIUPAC \para { \textit { p } }
% syn/anti
\DeclareChemIUPAC \syn { \textit { syn } }
@@ -1758,8 +1762,10 @@
{
\chemformula_latex_if:nTF { measuring@ }
{
+ \group_begin:
\tikz[baseline=(#1.base)]
- { \node [inner~sep=0] (#1) { #2 } ; }
+ { \node [inner~sep=0pt] (#1) { #2 } ; }
+ \group_end:
}
{
\tl_if_blank:nT { #1 }
@@ -1767,7 +1773,7 @@
\tl_if_blank:nT { #2 }
{ \msg_error:nnx { chemmacros } { OX } { atom~missing } }
\tikz[baseline=(#1.base),remember~picture]
- { \node [inner~sep=0] (#1) { #2 } ; }
+ { \node [inner~sep=0pt] (#1) { #2 } ; }
}
}
@@ -2311,7 +2317,7 @@
{
\exp_not:N \chemmacros_translate:nn
{ phase-\l__chemmacros_tmpa_tl }
- { #2 }
+ { \exp_not:n { #2 } }
}
}
@@ -2326,7 +2332,7 @@
{
\exp_not:N \chemmacros_translate:nn
{ phase-\l__chemmacros_tmpa_tl }
- { #2 }
+ { \exp_not:n { #2 } }
}
}
@@ -2594,7 +2600,7 @@
% the `chemstyle' provides it with \providecommand so it doesn't matter which
% package defines it first
\ProvideDocumentCommand \standardstate {}
- { \ensuremath { \chemmacros_standardstate: } }
+ { { \ensuremath { \chemmacros_standardstate: } } }
\cs_new_protected:Npn \chemmacros_standardstate:
{ \mathpalette \chemmacros_standardstate_aux: \circ }
@@ -2970,14 +2976,14 @@
scale = \fp_to_tl:N \l__chemmacros_newman_scale_fp ,
chemmacros_newman_atom_front / .style =
{
- inner~sep=0,
- outer~sep=0,
+ inner~sep=0pt,
+ outer~sep=0pt,
\tl_use:N \l__chemmacros_newman_tikz_front_tl
},
chemmacros_newman_atom_back / .style =
{
- inner~sep=0,
- outer~sep=0,
+ inner~sep=0pt,
+ outer~sep=0pt,
\bool_if:NTF \l__chemmacros_newman_tikz_back_bool
{ \tl_use:N \l__chemmacros_newman_tikz_back_tl }
{ \tl_use:N \l__chemmacros_newman_tikz_front_tl }
@@ -2986,7 +2992,7 @@
{
\chemmacros_tikz_draw:f
{ \tl_use:N \l__chemmacros_newman_tikz_ring_tl }
- (0,0) circle (\fp_to_dim:N \l__chemmacros_newman_scale_fp * 15) ;
+ (0pt,0pt) circle (\fp_to_dim:N \l__chemmacros_newman_scale_fp * 15) ;
\chemmacros_newman_back_node:nn
{ 30 }
{ \IfNoValueF { #6 } { #6 } }
@@ -3070,7 +3076,7 @@
{ \l__chemmacros_newman_scale_fp }
\chemmacros_tikz_draw:f
{ \tl_use:N \l__chemmacros_newman_tikz_ring_tl }
- (0,0) -- ++
+ (0pt,0pt) -- ++
(
30 * \fp_to_dim:N \l__chemmacros_newman_x_fp ,
30 * \fp_to_dim:N \l__chemmacros_newman_y_fp
@@ -3211,7 +3217,7 @@
{
\chemmacros_tikz_shade:f
{ ball~color = \l__chemmacros_orbital_s_phase_color_tl }
- (0,0) circle (\l__chemmacros_orbital_s_scale_tl * .6em) ;
+ (0pt,0pt) circle (\l__chemmacros_orbital_s_scale_tl * .6em) ;
}
}
@@ -3278,7 +3284,7 @@
draw = \l__chemmacros_orbital_p_pphase_color_tl ,
ball~color = \l__chemmacros_orbital_p_pphase_color_tl
}
- (0,0) .. controls ++
+ (0pt,0pt) .. controls ++
(
- \l__chemmacros_orbital_p_scale_tl * 2em ,
\l__chemmacros_orbital_p_scale_tl * 2em
@@ -3288,7 +3294,7 @@
\l__chemmacros_orbital_p_scale_tl * 2em ,
\l__chemmacros_orbital_p_scale_tl * 2em
)
- .. (0,0);
+ .. (0pt,0pt);
\bool_if:NF \l__chemmacros_orbital_p_half_bool
{
\chemmacros_tikz_shadedraw:f
@@ -3296,7 +3302,7 @@
draw = \l__chemmacros_orbital_p_mphase_color_tl ,
ball~color = \l__chemmacros_orbital_p_mphase_color_tl
}
- (0,0) .. controls ++
+ (0pt,0pt) .. controls ++
(
- \l__chemmacros_orbital_p_scale_tl * 2em ,
- \l__chemmacros_orbital_p_scale_tl * 2em
@@ -3306,7 +3312,7 @@
\l__chemmacros_orbital_p_scale_tl * 2em ,
- \l__chemmacros_orbital_p_scale_tl * 2em
)
- .. (0,0);
+ .. (0pt,0pt);
}
}
}
@@ -3372,7 +3378,7 @@
draw = \l__chemmacros_orbital_sp_pphase_color_tl ,
ball~color = \l__chemmacros_orbital_sp_pphase_color_tl
}
- (0,0) .. controls ++
+ (0pt,0pt) .. controls ++
(
- \l__chemmacros_orbital_sp_scale_tl * 2em ,
\l__chemmacros_orbital_sp_scale_tl * 2em
@@ -3382,13 +3388,13 @@
\l__chemmacros_orbital_sp_scale_tl * 2em ,
\l__chemmacros_orbital_sp_scale_tl * 2em
)
- .. (0,0);
+ .. (0pt,0pt);
\chemmacros_tikz_shadedraw:f
{
draw = \l__chemmacros_orbital_sp_mphase_color_tl ,
ball~color = \l__chemmacros_orbital_sp_mphase_color_tl
}
- (0,0) .. controls ++
+ (0pt,0pt) .. controls ++
(
- \l__chemmacros_orbital_sp_scale_tl * .6em ,
- \l__chemmacros_orbital_sp_scale_tl * .6em
@@ -3398,7 +3404,7 @@
\l__chemmacros_orbital_sp_scale_tl * .6em ,
- \l__chemmacros_orbital_sp_scale_tl * .6em
)
- .. (0,0);
+ .. (0pt,0pt);
}
}
@@ -3463,7 +3469,7 @@
draw = \l__chemmacros_orbital_sptwo_pphase_color_tl ,
ball~color = \l__chemmacros_orbital_sptwo_pphase_color_tl
}
- (0,0) .. controls ++
+ (0pt,0pt) .. controls ++
(
- \l__chemmacros_orbital_sptwo_scale_tl * 2em ,
\l__chemmacros_orbital_sptwo_scale_tl * 2em
@@ -3473,13 +3479,13 @@
\l__chemmacros_orbital_sptwo_scale_tl * 2em ,
\l__chemmacros_orbital_sptwo_scale_tl * 2em
)
- .. (0,0);
+ .. (0pt,0pt);
\chemmacros_tikz_shadedraw:f
{
draw = \l__chemmacros_orbital_sptwo_mphase_color_tl ,
ball~color = \l__chemmacros_orbital_sptwo_mphase_color_tl
}
- (0,0) .. controls ++
+ (0pt,0pt) .. controls ++
(
- \l__chemmacros_orbital_sptwo_scale_tl * .8em ,
- \l__chemmacros_orbital_sptwo_scale_tl * .8em
@@ -3489,7 +3495,7 @@
\l__chemmacros_orbital_sptwo_scale_tl * .8em ,
- \l__chemmacros_orbital_sptwo_scale_tl * .8em
)
- .. (0,0);
+ .. (0pt,0pt);
}
}
@@ -3554,7 +3560,7 @@
draw = \l__chemmacros_orbital_spthree_pphase_color_tl ,
ball~color = \l__chemmacros_orbital_spthree_pphase_color_tl
}
- (0,0) .. controls ++
+ (0pt,0pt) .. controls ++
(
- \l__chemmacros_orbital_spthree_scale_tl * 2em ,
\l__chemmacros_orbital_spthree_scale_tl * 2em
@@ -3564,13 +3570,13 @@
\l__chemmacros_orbital_spthree_scale_tl * 2em ,
\l__chemmacros_orbital_spthree_scale_tl * 2em
)
- .. (0,0);
+ .. (0pt,0pt);
\chemmacros_tikz_shadedraw:f
{
draw = \l__chemmacros_orbital_spthree_mphase_color_tl ,
ball~color = \l__chemmacros_orbital_spthree_mphase_color_tl
}
- (0,0) .. controls ++
+ (0pt,0pt) .. controls ++
(
- \l__chemmacros_orbital_spthree_scale_tl * 1em ,
- \l__chemmacros_orbital_spthree_scale_tl * 1em
@@ -3580,7 +3586,7 @@
\l__chemmacros_orbital_spthree_scale_tl * 1em ,
- \l__chemmacros_orbital_spthree_scale_tl * 1em
)
- .. (0,0);
+ .. (0pt,0pt);
}
}
@@ -4006,9 +4012,17 @@ Version history
used together with `hyperref'
- new option `reaction/list-heading'
- option `charges/append' deprecated
-
+2013/08/07 - version 4.0a - extra pair of braces in definition of
+ \standardstate
+ - added missing \exp_not:n to the definitions of
+ \chemmacros_declare_phase:Nn and kin
+2013/08/24 - version 4.1 - changed `0' values in TikZ coordinates into `0pt'
+ see http://tex.stackexchange.com/q/128792/5049 and
+ http://tex.stackexchange.com/q/118467/5049 for
+ reference
% --------------------------------------------------------------------------- %
-% TODO: fuer version 4
+% TODO:
- add d-orbitals
- make electron movement arrow tips (`el', `left el' and `right el') public
+