diff options
author | Karl Berry <karl@freefriends.org> | 2020-02-04 22:14:53 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2020-02-04 22:14:53 +0000 |
commit | d70ad5795d2f31a375d4496f8d2c65389a741ae1 (patch) | |
tree | 9d7d725e21b20b634f165a18d93dacd8675c110f /Master/texmf-dist/tex/latex/chemmacros/chemmacros.module.scheme.code.tex | |
parent | 54c32ad3fede7208dd034d5278347a380315612c (diff) |
chemmacros (4feb20)
git-svn-id: svn://tug.org/texlive/trunk@53665 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/chemmacros/chemmacros.module.scheme.code.tex')
-rw-r--r-- | Master/texmf-dist/tex/latex/chemmacros/chemmacros.module.scheme.code.tex | 39 |
1 files changed, 21 insertions, 18 deletions
diff --git a/Master/texmf-dist/tex/latex/chemmacros/chemmacros.module.scheme.code.tex b/Master/texmf-dist/tex/latex/chemmacros/chemmacros.module.scheme.code.tex index 057acbf70cd..97e1a11cb01 100644 --- a/Master/texmf-dist/tex/latex/chemmacros/chemmacros.module.scheme.code.tex +++ b/Master/texmf-dist/tex/latex/chemmacros/chemmacros.module.scheme.code.tex @@ -25,7 +25,7 @@ % % The Current Maintainer of this work is Clemens Niederberger. % -------------------------------------------------------------------------- -\ChemModule{scheme}{2019/09/23 a scheme floating environment} +\ChemModule{scheme}{2020/02/02 a scheme floating environment} \RequirePackage {chemnum} @@ -80,7 +80,7 @@ \counterwithin {#1} {chapter} \setcounter {#1} {0} } - \chemmacros_tex_if:nnT {artopt} {} + \legacy_if:nT {artopt} { \counterwithout {#1} {chapter} } } @@ -136,12 +136,15 @@ { \prop_get:NnNT \l__chemmacros_float_methods_prop {#1} \l__chemmacros_tmpa_tl - \bool_if:nT - { !\l__chemmacros_float_def_bool && \l__chemmacros_tmpa_tl } { - \bool_set_true:N \l__chemmacros_float_def_bool - \tl_set:Nn \l__chemmacros_float_method_tl {#1} - \msg_info:nnn {chemmacros} {float-method} {#1} + \bool_lazy_and:nnT + { !\l__chemmacros_float_def_bool } + { \l__chemmacros_tmpa_tl } + { + \bool_set_true:N \l__chemmacros_float_def_bool + \tl_set:Nn \l__chemmacros_float_method_tl {#1} + \msg_info:nnn {chemmacros} {float-method} {#1} + } } } @@ -180,8 +183,9 @@ % #1: env name \cs_new_protected:Npn \chemmacros_define_float:nn #1#2 { - \bool_if:nT - { !\cs_if_exist_p:c {#1} && !\cs_if_exist_p:c {end#1} } + \bool_lazy_and:nnT + { !\cs_if_exist_p:c {#1} } + { !\cs_if_exist_p:c {end#1} } { \bool_if:NTF \l__chemmacros_float_def_bool { @@ -209,15 +213,13 @@ \newenvironment {#1*} {\@dblfloat{#1}} {\end@dblfloat} - \bool_if:nTF - { - \chemmacros_if_class_loaded_p:n {book} || - \chemmacros_if_class_loaded_p:n {report} - } + \bool_lazy_or:nnTF + { \chemmacros_if_class_loaded_p:n {book} } + { \chemmacros_if_class_loaded_p:n {report} } { \cs_new_protected:cpn {listof#1s} { - \chemmacros_tex_if:nnTF {@twocolumn} {} + \legacy_if:nTF {@twocolumn} { \@restonecoltrue\onecolumn } { \@restonecolfalse } \exp_args:NNx \chapter* {\exp_not:c {list#1name}} @@ -225,8 +227,7 @@ { \MakeUppercase \use:c {list#1name} } { \MakeUppercase \use:c {list#1name} } \@starttoc {#2} - \chemmacros_tex_if:nnT {@restonecol} {} - { \twocolumn } + \legacy_if:nT {@restonecol} { \twocolumn } } } { @@ -319,5 +320,7 @@ 2015/10/23 - add info message to float method detection 2016/01/23 - make the module compatible with chemscheme 2016/04/25 - cleveref and fancyref support -2016/12/28 - bug fix: typo in \chemmacros_tex_if:nnTF usage +2016/12/28 - bug fix: typo in \chemmacros_if_tex:nnTF usage 2019/03/23 - added Norwegian translations +2020/02/03 - lazy boolean evaluation + - prefer \legacy_if:nTF over \chemmacros_if_tex:nnTF |