summaryrefslogtreecommitdiff
path: root/tex/context/base/core-sec.tex
diff options
context:
space:
mode:
Diffstat (limited to 'tex/context/base/core-sec.tex')
-rw-r--r--tex/context/base/core-sec.tex18
1 files changed, 17 insertions, 1 deletions
diff --git a/tex/context/base/core-sec.tex b/tex/context/base/core-sec.tex
index 35ae5db7a..30ceeed2e 100644
--- a/tex/context/base/core-sec.tex
+++ b/tex/context/base/core-sec.tex
@@ -219,13 +219,29 @@
{\precedingsectionnumber\convertednumber[#1]}%
\egroup}
+% \def\preparethenumber#1#2#3% {\??id#1} \number \result
+% {\doifelsevaluenothing{#1\c!separator}
+% {\let\numberseparator\empty
+% \let#3#2}
+% {% was \unexpanded \edef, but we need it unexpanded !
+% \edef\numberseparator{\getvalue{#1\c!separator}}%
+% \edef#3{\@EA\separatednumber\@EA{#2}\getvalue{#1\c!stopper}}}} % hm, etex
+
\def\preparethenumber#1#2#3% {\??id#1} \number \result
{\doifelsevaluenothing{#1\c!separator}
{\let\numberseparator\empty
\let#3#2}
{% was \unexpanded \edef, but we need it unexpanded !
\edef\numberseparator{\getvalue{#1\c!separator}}%
- \edef#3{\@EA\separatednumber\@EA{#2}\getvalue{#1\c!stopper}}}} % hm, etex
+ \doifelsenothing{\executeifdefined{#1\c!suffix}\empty}
+ {\edef#3%
+ {\@EA\separatednumber\@EA{#2}%
+ \getvalue{#1\c!stopper}}}
+ {\edef#3%
+ {\@EA\separatednumber\@EA{#2}%
+ \getvalue{#1\c!separator}%
+ \getvalue{#1\c!suffix}%
+ \getvalue{#1\c!stopper}}}}}
\def\sectionnumberonly[#1]%
{\makesectionnumber[#1]%