diff options
author | Karl Berry <karl@freefriends.org> | 2011-11-04 23:17:17 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2011-11-04 23:17:17 +0000 |
commit | 963f84feffa4aced809934a4c59f4c2bfdcb8d65 (patch) | |
tree | 3f02d185530ac37e8ed15ea900742360abc752dc /Master/texmf-dist/tex/latex | |
parent | cb33be94e6d58477c394350360dc7b482612c18c (diff) |
chemnum (4nov11)
git-svn-id: svn://tug.org/texlive/trunk@24495 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex')
-rw-r--r-- | Master/texmf-dist/tex/latex/chemnum/chemnum.sty | 30 |
1 files changed, 21 insertions, 9 deletions
diff --git a/Master/texmf-dist/tex/latex/chemnum/chemnum.sty b/Master/texmf-dist/tex/latex/chemnum/chemnum.sty index 8030717e8c3..da85bea4b3b 100644 --- a/Master/texmf-dist/tex/latex/chemnum/chemnum.sty +++ b/Master/texmf-dist/tex/latex/chemnum/chemnum.sty @@ -3,7 +3,7 @@ % - a comprehensive numbering method for chemical compounds - % % --------------------------------------------------------------------------- % % - Clemens NIEDERBERGER - % -% - 2011/09/03 - % +% - 2011/11/03 - % % --------------------------------------------------------------------------- % % - http://www.mychemistry.eu/ - % % - contact@mychemistry.eu - % @@ -31,7 +31,7 @@ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \RequirePackage { expl3 , xparse , etoolbox , psfrag } -\ProvidesExplPackage {chemnum} {2011/09/03} {0.3a} {Numbering chemical compounds} +\ProvidesExplPackage {chemnum} {2011/11/03} {0.3b} {Numbering chemical compounds} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % CHECK FOR SUPPORT @@ -453,6 +453,9 @@ \tl_new:N \l_chemnum_sub_range_sep_tl \tl_set:Nn \l_chemnum_sub_range_sep_tl { - } +\bool_new:N \l_chemnum_sub_label_only_bool +\bool_set_false:N \l_chemnum_sub_label_only_bool + %-----------------------------------------------------------------------------% % property keys for compounds \keys_define:nn { chemnum } { @@ -498,11 +501,13 @@ sub-range-marker .default:n = { .. } , sub-range-sep .tl_set:N = \l_chemnum_sub_range_sep_tl , sub-range-sep .default:n = { - } , - sub-list .code:n = + sub-list .code:n = { \tl_set:Nn \l_chemnum_cmpd_sublabel_list_tl { #1 } \bool_set_true:N \l_chemnum_sublabel_list_bool - } + } , + sub-only .bool_set:N = \l_chemnum_sub_label_only_bool , + sub-only .default:n = true } %-----------------------------------------------------------------------------% @@ -809,9 +814,12 @@ } \chemnum_cmpd_print:n { - \bool_if:NTF \l_chemnum_cmpd_ref_bool - { \use:c { chemnum_cmpd_ #1 _ref: } } - { \use:c { chemnum_cmpd_ #1 : } } + \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 { \tl_use:N \l_chemnum_cmpd_separator_tl @@ -1183,12 +1191,16 @@ HISTORY: - made sure code has no more than 80 tokens per line to improve readability on small screens - bug (unwanted whitespace) in \cmpdsetup fixed + 2011/11/03 version 0.3b - key "sub-only" added, see schema 23 at + http://www.arkat-usa.org/get-file/29257/ or scheme 4 + at http://www.arkat-usa.org/get-file/27301/ for + reasons, why %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -TODO: +% TODO: - Bug: wenn als "sub-marker" ":" von einer anderen Datei gesetzt wird, wird der Key nicht erkannt -> catcode Problem: entweder temporär catcode von ":" wieder auf 12 setzen oder den Marker prinzipiell auf 11? - - einen Key "hide-main" oder "sub-only" hinzufügen? + - alphabetische Sortierung für sub-list - Bug: Key "cmpd-style" wenn zB \color{<farbe>} eingegeben: Fehler beim Test auf Makro; Test entfernen? - \cmpdref: Reihenfolge der optionalen Argumente vertauschen?
\ No newline at end of file |