summaryrefslogtreecommitdiff
path: root/tex/context/base/strc-lab.mkiv
diff options
context:
space:
mode:
Diffstat (limited to 'tex/context/base/strc-lab.mkiv')
-rw-r--r--tex/context/base/strc-lab.mkiv15
1 files changed, 11 insertions, 4 deletions
diff --git a/tex/context/base/strc-lab.mkiv b/tex/context/base/strc-lab.mkiv
index 407b74669..21588a743 100644
--- a/tex/context/base/strc-lab.mkiv
+++ b/tex/context/base/strc-lab.mkiv
@@ -49,16 +49,23 @@
\c!state=\v!start,
\c!levels=3]
+\settrue\c_str_define_commands_label
+
\unexpanded\def\strc_define_commands_label#1#2#3% current level parent
{\doifelsenothing{#3}
{\normalexpanded{\defineconstruction[#1][\s!handler=\v!label,\c!level=#2]}%
\setevalue{\??label#1:\s!parent}{\??label}}%
{\normalexpanded{\defineconstruction[#1][#3][\s!handler=\v!label,\c!level=#2]}%
\setevalue{\??label#1:\s!parent}{\??label#3}}%
- \setuevalue{\e!next #1}{\strc_labels_next }%
- \setuevalue{\c!reset#1}{\strc_labels_reset }%
- %setuevalue{\c!set #1}{\strc_labels_set }%
- \setuevalue {#1}{\strc_labels_command{#1}}}
+ \ifconditional\c_str_define_commands_label
+ \setuevalue{\e!next #1}{\strc_labels_next }%
+ \setuevalue{\c!reset#1}{\strc_labels_reset }%
+ %setuevalue{\c!set #1}{\strc_labels_set }%
+ \setuevalue {#1}{\strc_labels_command{#1}}%
+ \else
+ % used indirectly
+ \settrue\c_str_define_commands_label
+ \fi}
% todo: \strc_labels_command for user