summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/chemnum
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2013-06-29 00:20:35 +0000
committerKarl Berry <karl@freefriends.org>2013-06-29 00:20:35 +0000
commitc3543d4162f0c935de31c1c1198d9f6e04992485 (patch)
tree46982a08a7d8a6fac0ef88ed58073013e8c53258 /Master/texmf-dist/tex/latex/chemnum
parentec4fd129ad01f534716631faed103a0aab51eb94 (diff)
chemnum (5jun13)
git-svn-id: svn://tug.org/texlive/trunk@31025 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/chemnum')
-rw-r--r--Master/texmf-dist/tex/latex/chemnum/chemnum.sty263
1 files changed, 115 insertions, 148 deletions
diff --git a/Master/texmf-dist/tex/latex/chemnum/chemnum.sty b/Master/texmf-dist/tex/latex/chemnum/chemnum.sty
index 28e40a1dc3e..af6e6c07c8f 100644
--- a/Master/texmf-dist/tex/latex/chemnum/chemnum.sty
+++ b/Master/texmf-dist/tex/latex/chemnum/chemnum.sty
@@ -32,46 +32,25 @@
\ProvidesExplPackage
{chemnum}
- {2013/04/17}
- {0.6a}
+ {2013/06/05}
+ {0.6b}
{a comprehensive approach for the numbering of chemical compounds}
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-% CHECK FOR SUPPORT
-% this part of the code is based on the corresponding part of siunitx.sty
-% l3 support:
-\cs_if_exist:NTF \msg_set:nnnn
- {
- \msg_set:nnnn { chemnum } { support-outdated }
- { Support~package~#1~too~old. }
- {
- Please~install~an~up~to~date~version~of~#1. \\
- Best~would~be~to~update~both~l3kernel~and~l3packages~bundles. \\
- Loading~chemnum~will~abort!
- }
- }
+% --------------------------------------------------------------------------
+% check expl3 version:
+\@ifpackagelater { expl3 } { 2012/11/21 }
+ { }
{
- \PackageError { chemnum } { Support~bundle~l3kernel~too~old. }
+ \PackageError { chemnum } { Support~package~expl3~too~old }
{
- Please~install~an~up~to~date~version~of~the~l3kernel~bundle. \\
+ You~need~to~update~your~installation~of~the~bundles~'l3kernel'~and~
+ 'l3packages'.\MessageBreak
Loading~chemnum~will~abort!
}
\tex_endinput:D
}
-\@ifpackagelater { expl3 } { 2011/12/27 }
- { }
- {
- \msg_error:nnx { chemnum } { support-outdated } { expl3 }
- \tex_endinput:D
- }
-
-\@ifpackagelater { xparse } { 2011/12/27 }
- { }
- {
- \msg_error:nnx { chemnum } { support-outdated } { xparse }
- \tex_endinput:D
- }
+% --------------------------------------------------------------------------
% error for missing packages
\msg_set:nnnn { chemnum } { support-missing }
{ Support~package~#1~missing. }
@@ -100,7 +79,7 @@
{
\AtEndPreamble
{
- \exp_args:No \file_if_exist:nTF { textgreek . sty }
+ \file_if_exist:nTF { textgreek . sty }
{
\@ifpackageloaded { textgreek }
{ \msg_warning:nnx { chemnum } { textgreek-loaded } { #1 } }
@@ -245,15 +224,17 @@
\int_new:N \g__chemnum_cmpd_main_int
\prop_new:N \g__chemnum_label_prop
\int_new:N \g__chemnum_cmpd_int
+\int_new:N \l__chemnum_tmpa_int
\tl_new:N \l__chemnum_tmpa_tl
\tl_new:N \l__chemnum_tmpb_tl
-\clist_new:N \g__chemnum_cmpd_save_clist
+\tl_new:N \l__chemnum_tmpc_tl
+\seq_new:N \g__chemnum_cmpd_saved_seq
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% READ FROM PREVIOUS RUN, SAVE FOR NEXT RUN
% save all labels in a clist
-\cs_new_protected:Npn \__chemnum_cmpd_save:n #1
- { \clist_gput_right:Nn \g__chemnum_cmpd_save_clist { { #1 } } }
+\cs_new_protected:Npn \chemnum_cmpd_save:n #1
+ { \seq_gput_right:Nn \g__chemnum_cmpd_saved_seq { #1 } }
\msg_set:nnn { chemnum } { missing-cmpd-file }
{
@@ -271,7 +252,7 @@
{
\iow_new:N \__chemnum_aux_file:
\iow_open:Nn \__chemnum_aux_file: { ./ \c_job_name_tl . cmpd }
- \clist_map_inline:Nn \g__chemnum_cmpd_save_clist
+ \seq_map_inline:Nn \g__chemnum_cmpd_saved_seq
{
\iow_now:Nx \__chemnum_aux_file:
{
@@ -305,29 +286,11 @@
\bool_new:N \l__chemnum_cmpd_style_is_macro_bool
% default style
-\cs_new:Npn \__chemnum_cmpd_style_value:n { }
+\cs_new:Npn \chemnum_cmpd_style:n #1 { #1 }
-% error message
-\msg_set:nnn { chemnum } { cmpd-style }
- {
- The~value~of~"cmpd-style~=~<style>"~needs~to~be~a~(or~more)~macro~
- \msg_line_context: .
- }
-
-% set style %TODO
+% set style
\cs_new_protected:Npn \__chemnum_cmpd_set_style:n #1
-% {
-% \tl_clear:N \l__chemnum_style_tmp_tl
-% \tl_map_variable:nNn { #1 } \l__chemnum_style_tmp_tl
-% {
-% \exp_args:No \token_if_cs:NTF \l__chemnum_style_tmp_tl
-% { \bool_set_true:N \l__chemnum_cmpd_style_is_macro_bool }
-% { \bool_set_false:N \l__chemnum_cmpd_style_is_macro_bool }
-% }
-% \bool_if:NTF \l__chemnum_cmpd_style_is_macro_bool
- { \cs_set:Npn \__chemnum_cmpd_style_value:n { #1 } }
-% { \msg_error:nnx { chemnum } { cmpd-style } { #1 } }
-% }
+ { \cs_set:Npn \chemnum_cmpd_style:n { #1 } }
% use style
\bool_new:N \l__chemnum_cmpd_bold_bool
@@ -338,7 +301,7 @@
\group_begin:
\bool_if:NT \l__chemnum_cmpd_bold_bool
{ \bfseries }
- \__chemnum_cmpd_style_value:n { #1 }
+ \chemnum_cmpd_style:n { #1 }
\group_end:
}
@@ -515,7 +478,7 @@
\int_incr:N \l__chemnum_sublabel_list_current_int
\exp_after:wN \__chemnum_cmpd_sublabelsep:n \l__chemnum_tmpb_tl \q_stop
\use:c { chemnum_cmpd_#1_ \l__chemnum_cmpd_sub_one_label_tl _ref: }
- \exp_args:No \tl_if_blank:nF { \l__chemnum_cmpd_sub_two_label_tl }
+ \tl_if_blank:VF \l__chemnum_cmpd_sub_two_label_tl
{
\tl_use:N \l__chemnum_sub_range_sep_tl
\use:c { chemnum_cmpd_#1_ \l__chemnum_cmpd_sub_two_label_tl _ref: }
@@ -605,12 +568,12 @@
\int_compare:nT { \l__chemnum_cmpd_sublist_length_int < 2 }
{ % no sublabel list
\__chemnum_cmpd_subrange_separate:n { #2 }
- \tl_if_blank:VT \l_tmpb_tl
+ \tl_if_blank:VT \l__chemnum_tmpc_tl
{ % no sublabel range
\tl_set:Nn \l__chemnum_cmpd_hyper_name_tl
- { chemnum_cmpd_#1_\l_tmpa_tl }
+ { chemnum_cmpd_#1_ \l__chemnum_tmpb_tl }
\cs_if_exist:cTF
- { chemnum_cmpd_#1_ \l_tmpa_tl _hyper: }
+ { chemnum_cmpd_#1_ \l__chemnum_tmpb_tl _hyper: }
{
\bool_set_false:N \l__chemnum_hypertarget_bool
\cs_set_eq:NN \__chemnum_make_hyper:nn \hyperlink
@@ -623,7 +586,7 @@
{ \hypertarget { ##1 } { } } ##2
}
\cs_new:cpn
- { chemnum_cmpd_#1_ \l_tmpa_tl _hyper: } { }
+ { chemnum_cmpd_#1_ \l__chemnum_tmpb_tl _hyper: } { }
}
}
}
@@ -825,7 +788,7 @@
\prop_gput:Nnx \g__chemnum_label_prop
{ #1 }
{ \int_use:N \g__chemnum_cmpd_main_int }
- \__chemnum_cmpd_save:n { #1 }
+ \chemnum_cmpd_save:n { #1 }
\bool_if:NF \l__chemnum_cmpd_name_bool
{ \int_gincr:N \g__chemnum_cmpd_int }
\cs_new:cpx { chemnum_cmpd_#1: } {
@@ -844,7 +807,7 @@
{
\cs_if_exist:cF { chemnum_cmpd_#1_#2: }
{
- \__chemnum_cmpd_save:n { #1 _ #2 }
+ \chemnum_cmpd_save:n { #1 _ #2 }
\cs_new:cpx { chemnum_cmpd_#1_#2: } { }
\int_gincr:c { g_chemnum_cmpd_#1_int }
% why is the next line working when \cs_gset:cpx doesn't?
@@ -891,12 +854,12 @@
\tl_if_blank:nF { #2 }
{
\__chemnum_cmpd_sublist:n { #2 }
- \exp_args:No \tl_map_inline:nn { \l__chemnum_cmpd_sublist_tl }
+ \tl_map_inline:Nn \l__chemnum_cmpd_sublist_tl
{
\__chemnum_cmpd_subrange_separate:n { ##1 }
- \__chemnum_cmpd_sub_initiate:nn { #1 } { \l_tmpa_tl }
- \tl_if_blank:VF \l_tmpb_tl
- { \__chemnum_cmpd_sub_initiate:nn { #1 } { \l_tmpb_tl } }
+ \__chemnum_cmpd_sub_initiate:nn { #1 } { \l__chemnum_tmpb_tl }
+ \tl_if_blank:VF \l__chemnum_tmpc_tl
+ { \__chemnum_cmpd_sub_initiate:nn { #1 } { \l__chemnum_tmpc_tl } }
}
}
}
@@ -945,17 +908,19 @@
% actual separating
\cs_new_protected:Npn \__chemnum_cmpd_labelsep:n #1 \q_stop {
\tl_clear:N \l__chemnum_labelsep_tmp_tl
- \exp_args:Noo \tl_if_in:nnTF { #1 } { \l__chemnum_cmpd_labelsep_tl }
+ \tl_if_in:oVTF { #1 } \l__chemnum_cmpd_labelsep_tl
{
\tl_set:Nn \l__chemnum_labelsep_tmp_tl { #1 }
- \exp_args:NNo \tl_replace_once:Nnn \l__chemnum_labelsep_tmp_tl
- { \l__chemnum_cmpd_labelsep_tl }
+ \tl_replace_once:NVn \l__chemnum_labelsep_tmp_tl
+ \l__chemnum_cmpd_labelsep_tl
{ \q_nil }
\exp_after:wN \__chemnum_cmpd_labelsep_aux_ii:n
\l__chemnum_labelsep_tmp_tl \q_stop
}
{ \__chemnum_cmpd_labelsep_aux_i:n { #1 } }
}
+\cs_generate_variant:Nn \tl_if_in:nnTF { oV }
+\cs_generate_variant:Nn \tl_replace_once:Nnn { NV }
\cs_new_protected:Npn \__chemnum_cmpd_labelsep_aux_i:n #1
{
@@ -978,28 +943,29 @@
{
\tl_set:Nn \l__chemnum_cmpd_sublist_tl { #1 }
\int_zero:N \l__chemnum_cmpd_sublist_length_int
- \exp_args:No \tl_map_inline:nn { \l__chemnum_cmpd_sublist_tl }
+ \tl_map_inline:Nn \l__chemnum_cmpd_sublist_tl
{ \int_incr:N \l__chemnum_cmpd_sublist_length_int }
}
\cs_new_protected:Npn \__chemnum_cmpd_subrange_separate:n #1
{
- \tl_clear:N \l_tmpa_tl
- \tl_clear:N \l_tmpb_tl
+ \tl_clear:N \l__chemnum_tmpb_tl
+ \tl_clear:N \l__chemnum_tmpc_tl
\tl_if_in:noTF { #1 } { \l__chemnum_sublabel_range_marker_tl }
{
- \tl_set:Nn \l_tmpa_tl { #1 }
- \exp_args:NNo \tl_replace_once:Nnn \l_tmpa_tl
- { \l__chemnum_sublabel_range_marker_tl } { \q_nil }
- \exp_after:wN \__chemnum_cmpd_subrange_separate_aux:w \l_tmpa_tl \q_stop
+ \tl_set:Nn \l__chemnum_tmpb_tl { #1 }
+ \tl_replace_once:NVn \l__chemnum_tmpb_tl
+ \l__chemnum_sublabel_range_marker_tl
+ { \q_nil }
+ \exp_after:wN \__chemnum_cmpd_subrange_separate_aux:w \l__chemnum_tmpb_tl \q_stop
}
- { \tl_set:Nn \l_tmpa_tl { #1 } }
+ { \tl_set:Nn \l__chemnum_tmpb_tl { #1 } }
}
\cs_new_protected:Npn \__chemnum_cmpd_subrange_separate_aux:w #1 \q_nil #2 \q_stop
{
- \tl_set:Nn \l_tmpa_tl { #1 }
- \tl_set:Nn \l_tmpb_tl { #2 }
+ \tl_set:Nn \l__chemnum_tmpb_tl { #1 }
+ \tl_set:Nn \l__chemnum_tmpc_tl { #2 }
}
%-----------------------------------------------------------------------------%
@@ -1025,7 +991,7 @@
% main internal compound label command
% #1: <main label> #2: <sub label> #3: <invisible> #4: <no delim>
% #2 may be a list of sublabels
-\cs_new_protected:Npn \__chemnum_cmpd_aux_i:nnnn #1#2#3#4
+\cs_new_protected:Npn \__chemnum_cmpd_aux:nnnn #1#2#3#4
{
\bool_if:NT \l__chemnum_cmpd_initiated_bool
{ \__chemnum_cmpd_initiate:nn { #1 } { #2 } }
@@ -1039,12 +1005,12 @@
\__chemnum_cmpd_sublist:n { #2 }
\bool_if:NF \l__chemnum_cmpd_ref_bool
{
- \exp_args:No \tl_map_inline:nn { \l__chemnum_cmpd_sublist_tl }
+ \tl_map_inline:Nn \l__chemnum_cmpd_sublist_tl
{
\__chemnum_cmpd_subrange_separate:n { ##1 }
- \__chemnum_cmpd_sub_declare:no { #1 } { \l_tmpa_tl }
- \tl_if_blank:VF \l_tmpb_tl
- { \__chemnum_cmpd_sub_declare:no { #1 } { \l_tmpb_tl } }
+ \__chemnum_cmpd_sub_declare:no { #1 } { \l__chemnum_tmpb_tl }
+ \tl_if_blank:VF \l__chemnum_tmpc_tl
+ { \__chemnum_cmpd_sub_declare:no { #1 } { \l__chemnum_tmpc_tl } }
}
}
}
@@ -1057,65 +1023,65 @@
\tl_clear:N \l__chemnum_cmpd_cdelim_tl
}
\__chemnum_make_hyper:nn { \l__chemnum_cmpd_hyper_name_tl }
- {
- \__chemnum_cmpd_print:n
{
- \bool_if:NF \l__chemnum_sub_label_only_bool
- {
- \bool_if:NTF \l__chemnum_cmpd_ref_bool
- { \use:c { chemnum_cmpd_ #1 _ref: } }
- { \use:c { chemnum_cmpd_ #1 : } }
- }
- \bool_if:NTF \l__chemnum_cmpd_all_bool
+ \__chemnum_cmpd_print:n
{
- \tl_use:N \l__chemnum_cmpd_separator_tl
- \use:c { chemnum_cmpd_ #1 _min_ref: }
- \cs_if_eq:ccF
- { chemnum_cmpd_ #1 _min_ref: }
- { chemnum_cmpd_ #1 _max_ref: }
+ \bool_if:NF \l__chemnum_sub_label_only_bool
{
- \tl_use:N \l__chemnum_sub_range_sep_tl
- \use:c { chemnum_cmpd_ #1 _max_ref: }
+ \bool_if:NTF \l__chemnum_cmpd_ref_bool
+ { \use:c { chemnum_cmpd_ #1 _ref: } }
+ { \use:c { chemnum_cmpd_ #1 : } }
}
- }
- {
- \bool_if:NTF \l__chemnum_sublabel_list_bool
+ \bool_if:NTF \l__chemnum_cmpd_all_bool
{
- \__chemnum_cmpd_sublabel_list:nn { #1 }
- { \l__chemnum_cmpd_sublabel_list_tl }
+ \tl_use:N \l__chemnum_cmpd_separator_tl
+ \use:c { chemnum_cmpd_ #1 _min_ref: }
+ \cs_if_eq:ccF
+ { chemnum_cmpd_ #1 _min_ref: }
+ { chemnum_cmpd_ #1 _max_ref: }
+ {
+ \tl_use:N \l__chemnum_sub_range_sep_tl
+ \use:c { chemnum_cmpd_ #1 _max_ref: }
+ }
}
{
- \tl_if_blank:nF { #2 }
+ \bool_if:NTF \l__chemnum_sublabel_list_bool
{
- \tl_use:N \l__chemnum_cmpd_separator_tl
- \int_zero:N \l_tmpa_int
- \exp_args:No \tl_map_inline:nn
- { \l__chemnum_cmpd_sublist_tl }
+ \__chemnum_cmpd_sublabel_list:nn { #1 }
+ { \l__chemnum_cmpd_sublabel_list_tl }
+ }
+ {
+ \tl_if_blank:nF { #2 }
{
- \int_incr:N \l_tmpa_int
- \__chemnum_cmpd_subrange_separate:n { ##1 }
- \bool_if:NTF \l__chemnum_cmpd_ref_bool
- { \use:c { chemnum_cmpd_ #1 _ \l_tmpa_tl _ref: } }
- { \use:c { chemnum_cmpd_ #1 _ \l_tmpa_tl : } }
- \tl_if_blank:VF \l_tmpb_tl
+ \tl_use:N \l__chemnum_cmpd_separator_tl
+ \int_zero:N \l__chemnum_tmpa_int
+ \tl_map_inline:Nn \l__chemnum_cmpd_sublist_tl
{
- \tl_use:N \l__chemnum_sub_range_sep_tl
+ \int_incr:N \l__chemnum_tmpa_int
+ \__chemnum_cmpd_subrange_separate:n { ##1 }
\bool_if:NTF \l__chemnum_cmpd_ref_bool
- { \use:c { chemnum_cmpd_ #1 _ \l_tmpb_tl _ref: } }
- { \use:c { chemnum_cmpd_ #1 _ \l_tmpb_tl : } }
+ { \use:c { chemnum_cmpd_ #1 _ \l__chemnum_tmpb_tl _ref: } }
+ { \use:c { chemnum_cmpd_ #1 _ \l__chemnum_tmpb_tl : } }
+ \tl_if_blank:VF \l__chemnum_tmpc_tl
+ {
+ \tl_use:N \l__chemnum_sub_range_sep_tl
+ \bool_if:NTF \l__chemnum_cmpd_ref_bool
+ { \use:c { chemnum_cmpd_ #1 _ \l__chemnum_tmpc_tl _ref: } }
+ { \use:c { chemnum_cmpd_ #1 _ \l__chemnum_tmpc_tl : } }
+ }
+ \int_compare:nF
+ { \l__chemnum_tmpa_int = \l__chemnum_cmpd_sublist_length_int }
+ { \l__chemnum_sublist_output_separator_tl }
}
- \int_compare:nF
- { \l_tmpa_int = \l__chemnum_cmpd_sublist_length_int }
- { \l__chemnum_sublist_output_separator_tl }
}
}
}
}
- } }
+ }
}
}
-\cs_generate_variant:Nn \__chemnum_cmpd_aux_i:nnnn { oonn }
+\cs_generate_variant:Nn \__chemnum_cmpd_aux:nnnn { VV }
%-----------------------------------------------------------------------------%
% create compound label
@@ -1126,15 +1092,15 @@
\tl_clear:N \l__chemnum_cmpd_sub_label_tl
\__chemnum_cmpd_labelsep:n #1 \q_stop
\tl_remove_all:Nn \l__chemnum_cmpd_sub_label_tl { ~ }
- \__chemnum_cmpd_aux_i:oonn
- { \l__chemnum_cmpd_main_label_tl }
- { \l__chemnum_cmpd_sub_label_tl }
+ \__chemnum_cmpd_aux:VVnn
+ \l__chemnum_cmpd_main_label_tl
+ \l__chemnum_cmpd_sub_label_tl
{ #2 }
{ #3 }
\group_end:
}
-\cs_generate_variant:Nn \__chemnum_cmpd:nnn { onn }
+\cs_generate_variant:Nn \__chemnum_cmpd:nnn { V }
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% DOCUMENT COMMANDS
@@ -1164,7 +1130,7 @@
% label(s)>}
\NewDocumentCommand \__chemnum_input_separator:n
{ > { \exp_args:No \SplitList { \l__chemnum_list_input_separator_tl } } m }
- { \tl_set:Nn \l_tmpa_tl { #1 } }
+ { \tl_set:Nn \l__chemnum_tmpb_tl { #1 } }
\NewDocumentCommand \cmpd { s t+ t- o m }
{ \cmpd_main:nnnnn { #1 } { #2 } { #3 } { #4 } { #5 } }
@@ -1184,12 +1150,12 @@
\IfNoValueF { #4 }
{ \keys_set:nn { chemnum } { #4 } }
\__chemnum_input_separator:n { #5 }
- \tl_map_variable:NNn \l_tmpa_tl \l__chemnum_tmpa_tl
+ \tl_map_variable:NNn \l__chemnum_tmpb_tl \l__chemnum_tmpa_tl
{
\tl_if_blank:VF \l__chemnum_tmpa_tl
{ \int_incr:N \l__chemnum_list_items_int }
}
- \tl_map_variable:NNn \l_tmpa_tl \l__chemnum_tmpa_tl
+ \tl_map_variable:NNn \l__chemnum_tmpb_tl \l__chemnum_tmpa_tl
{
\tl_remove_all:Nn \l__chemnum_tmpa_tl { ~ }
\tl_if_blank:VF \l__chemnum_tmpa_tl
@@ -1209,8 +1175,8 @@
}
\IfBooleanTF #1
{
- \__chemnum_cmpd:onn
- { \l__chemnum_tmpa_tl }
+ \__chemnum_cmpd:Vnn
+ \l__chemnum_tmpa_tl
{ \BooleanTrue }
{ \BooleanFalse }
\IfBooleanT #3
@@ -1222,14 +1188,14 @@
{
\IfBooleanTF #3
{
- \__chemnum_cmpd:onn
- { \l__chemnum_tmpa_tl }
+ \__chemnum_cmpd:Vnn
+ \l__chemnum_tmpa_tl
{ \BooleanFalse }
{ \BooleanTrue }
}
{
- \__chemnum_cmpd:onn
- { \l__chemnum_tmpa_tl }
+ \__chemnum_cmpd:Vnn
+ \l__chemnum_tmpa_tl
{ \BooleanFalse }
{ \BooleanFalse }
}
@@ -1338,9 +1304,8 @@
{
\tl_if_blank:VF \l__chemnum_cmpd_sub_label_tl
{
- \exp_args:No \__chemnum_cmpd_sublist:n
- { \l__chemnum_cmpd_sub_label_tl }
- \exp_args:No \tl_map_inline:nn { \l__chemnum_cmpd_sublist_tl }
+ \__chemnum_cmpd_sublist:V \l__chemnum_cmpd_sub_label_tl
+ \tl_map_inline:Nn \l__chemnum_cmpd_sublist_tl
{
\cs_if_exist:cF
{
@@ -1366,12 +1331,13 @@
}
\bool_if:NT \l__chemnum_cmpd_init_declare_bool
{
- \__chemnum_cmpd:onn
- { \l__chemnum_tmpa_tl }
+ \__chemnum_cmpd:Vnn
+ \l__chemnum_tmpa_tl
{ \BooleanTrue }
{ \BooleanFalse }
}
}
+\cs_generate_variant:Nn \__chemnum_cmpd_sublist:n { V }
% \cmpdinit*[strict=<bool>]{<comma separated list of label names>}
\NewDocumentCommand \cmpdinit { s o m }
@@ -1382,7 +1348,7 @@
{ \bool_set_true:N \l__chemnum_cmpd_init_declare_bool }
\IfNoValueF { #2 } { \keys_set:nn { chemnum } { #2 } }
\__chemnum_input_separator:n { #3 }
- \tl_map_function:NN \l_tmpa_tl \__chemnum_cmpd_init:n
+ \tl_map_function:NN \l__chemnum_tmpb_tl \__chemnum_cmpd_init:n
}
%-----------------------------------------------------------------------------%
@@ -1654,10 +1620,11 @@ HISTORY:
- changed internal syntax
2013/04/17 version 0.6a - adapted to deprecated l3 functions
- protected functions that needed to be
-
+ 2013/06/05 version 0.6b - internal changes to the code
+
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% TODO:
- add a possibility to \ref{} the compounds
- (rudimentäre) Unterstützung für hyperref und pdfstrings
- provide expandable makro which gives the label and/or sublabel without any
- formatting \ No newline at end of file
+ formatting