diff options
author | Karl Berry <karl@freefriends.org> | 2016-05-04 21:00:50 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2016-05-04 21:00:50 +0000 |
commit | 231ee51d8d56184431d4c5d9aed9119099e95fcd (patch) | |
tree | 2287b5ba10f9df5bd841c512a8e5f5be13dd4480 /Master/texmf-dist/tex/latex/chemmacros/chemmacros.module.reactions.code.tex | |
parent | be3c2a013156281b8ceae7259debb34bfb2f7f56 (diff) |
chemmacros (4may16)
git-svn-id: svn://tug.org/texlive/trunk@40887 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/chemmacros/chemmacros.module.reactions.code.tex')
-rw-r--r-- | Master/texmf-dist/tex/latex/chemmacros/chemmacros.module.reactions.code.tex | 34 |
1 files changed, 33 insertions, 1 deletions
diff --git a/Master/texmf-dist/tex/latex/chemmacros/chemmacros.module.reactions.code.tex b/Master/texmf-dist/tex/latex/chemmacros/chemmacros.module.reactions.code.tex index ed8f48cfd5c..652a300af86 100644 --- a/Master/texmf-dist/tex/latex/chemmacros/chemmacros.module.reactions.code.tex +++ b/Master/texmf-dist/tex/latex/chemmacros/chemmacros.module.reactions.code.tex @@ -151,8 +151,19 @@ \cs_if_exist:NT \KOMAClassName { \bool_set_true:N \l__chemmacros_reactions_tocbasic_bool } +\tl_new:N \l__chemmacros_reactions_tag_open_tl +\tl_new:N \l__chemmacros_reactions_tag_close_tl +\tl_new:N \l__chemmacros_reactions_before_tag_tl + \chemmacros_define_keys:nn {reactions} - { tocbasic .bool_set:N = \l__chemmacros_reactions_tocbasic_bool } + { + tocbasic .bool_set:N = \l__chemmacros_reactions_tocbasic_bool , + tag-open .tl_set:N = \l__chemmacros_reactions_tag_open_tl , + tag-open .initial:n = \{ , + tag-close .tl_set:N = \l__chemmacros_reactions_tag_close_tl , + tag-close .initial:n = \} , + before-tag .tl_set:N = \l__chemmacros_reactions_before_tag_tl + } \AtEndPreamble { @@ -175,13 +186,33 @@ { \chemmacros_translate:n {reactions} } [ \chemmacros_translate:n {Reactions} ] +\AfterPackage* {cleveref} + { + \creflabelformat {reaction} + { + #2 + \l__chemmacros_reactions_tag_open_tl + #1 + \l__chemmacros_reactions_tag_close_tl + #3 + } + } + \ChemFancyrefSupport {rct} { \chemmacros_translate:n {reaction} } [ \chemmacros_translate:n {Reaction} ] \EndChemCompatibility % create new tagform +\ChemCompatibilityTo{5.5} \newtagform {reaction} {\{} {\}} +\EndChemCompatibility +\ChemCompatibilityFrom{5.6} +\newtagform {reaction} + [\l__chemmacros_reactions_before_tag_tl] + {\l__chemmacros_reactions_tag_open_tl} + {\l__chemmacros_reactions_tag_close_tl} +\EndChemCompatibility \newcounter {chemmacros_save_reaction} \newcounter {reaction} @@ -399,3 +430,4 @@ - add cleveref support - add fancyref support - moved translations from lang module to reactions module +2016/05/04 - options `tag-open', `tag-close' and `before-tag' |