summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/chemmacros/chemformula.sty
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/latex/chemmacros/chemformula.sty')
-rw-r--r--Master/texmf-dist/tex/latex/chemmacros/chemformula.sty64
1 files changed, 62 insertions, 2 deletions
diff --git a/Master/texmf-dist/tex/latex/chemmacros/chemformula.sty b/Master/texmf-dist/tex/latex/chemmacros/chemformula.sty
index b88a3f8a315..e9c80e2027f 100644
--- a/Master/texmf-dist/tex/latex/chemmacros/chemformula.sty
+++ b/Master/texmf-dist/tex/latex/chemmacros/chemformula.sty
@@ -27,8 +27,8 @@
% --------------------------------------------------------------------------
\RequirePackage{ expl3 , xparse , l3keys2e , tikz , amsmath , xfrac , nicefrac , scrlfile }
\usetikzlibrary{arrows}
-\def\chemformula@version{4.5}
-\def\chemformula@date{2014/04/08}
+\def\chemformula@version{4.6}
+\def\chemformula@date{2014/06/30}
\ProvidesExplPackage
{chemformula}
@@ -494,6 +494,41 @@
{ \bool_set_true:N \l__chemformula_formal_charges_bool }
\bool_if:NF \l__chemmacros_circled_chem_bool
{ \bool_set_false:N \l__chemformula_formal_chem_bool }
+ \keys_define:nn { chemmacros / option }
+ {
+ circletype .choice: ,
+ circletype / math .code:n =
+ {
+ \bool_set_false:N \l__chemmacros_circled_chem_bool
+ \bool_set_false:N \l__chemformula_formal_chem_bool
+ } ,
+ circletype / chem .code:n =
+ {
+ \bool_set_true:N \l__chemmacros_circled_chem_bool
+ \bool_set_true:N \l__chemformula_formal_chem_bool
+ } ,
+ circletype .default:n = chem ,
+ circled .choice: ,
+ circled / none .code:n =
+ {
+ \bool_set_false:N \l__chemmacros_circled_bool
+ \bool_set_false:N \l__chemmacros_circled_formal_bool
+ \bool_set_false:N \l__chemformula_formal_charges_bool
+ } ,
+ circled / formal .code:n =
+ {
+ \bool_set_true:N \l__chemmacros_circled_bool
+ \bool_set_true:N \l__chemmacros_circled_formal_bool
+ \bool_set_false:N \l__chemformula_formal_charges_bool
+ } ,
+ circled / all .code:n =
+ {
+ \bool_set_true:N \l__chemmacros_circled_bool
+ \bool_set_false:N \l__chemmacros_circled_formal_bool
+ \bool_set_true:N \l__chemformula_formal_charges_bool
+ } ,
+ circled .default:n = all
+ }
}
{ }
}
@@ -1729,6 +1764,8 @@
{ \chemformula_star_adduct: } { * }
\tl_replace_all:Nnn \l__chemformula_superscript_tl
{ . } { \chemformula_radical_or_decimal: }
+ \tl_replace_all:Nnn \l__chemformula_superscript_tl
+ { , } { \chemformula_decimal: }
}
}
@@ -2554,6 +2591,20 @@
% customization of output other than arrows
\keys_define:nn { chemmacros / chemformula }
{
+ circled .choice: ,
+ circled / none .code:n =
+ { \bool_set_false:N \l__chemformula_formal_charges_bool } ,
+ circled / formal .code:n =
+ { \bool_set_false:N \l__chemformula_formal_charges_bool } ,
+ circled / all .code:n =
+ { \bool_set_true:N \l__chemformula_formal_charges_bool } ,
+ circled .default:n = all ,
+ circletype .choice: ,
+ circletype / math .code:n =
+ { \bool_set_false:N \l__chemformula_formal_chem_bool } ,
+ circletype / chem .code:n =
+ { \bool_set_true:N \l__chemformula_formal_chem_bool } ,
+ circletype .default:n = chem ,
charge-hshift .code:n =
\tl_if_eq:nnTF { #1 } { full }
{ \bool_set_true:N \l__chemformula_charge_full_shift_bool }
@@ -3039,6 +3090,15 @@ VERSION HISTORY
environments
(credits: http://tex.stackexchange.com/a/166661/5049)
- support for Kröger-Vink notation
+2014/06/30 - version 4.6 - fix: a comma in a superscript is typeset according
+ to `decimal-marker' again
+ - fix charge type behaviour: option `circled' and
+ `circletype' are now obeyed if the option is
+ changed mid-document
+ - new option `chemformula/circled' similar to
+ `chemmacros/circled'
+ - new option `chemformula/circletype' similar to
+ `chemmacros/circletype'
% --------------------------------------------------------------------------
% TODO