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.tex13
1 files changed, 11 insertions, 2 deletions
diff --git a/tex/context/base/core-sec.tex b/tex/context/base/core-sec.tex
index 1e8188ea0..50032edcd 100644
--- a/tex/context/base/core-sec.tex
+++ b/tex/context/base/core-sec.tex
@@ -1852,7 +1852,7 @@
%D [frame=off,offset=.5em,align=middle,width=broad]
%D {\sc\def\stretchedspaceamount{.3em}\stretchednormalcase{#1}}}
%D
-%D \definehead[MySubject]
+%D \definehead[MySubject][subject]
%D \setuphead [MySubject][deeptextcommand=\StretchedBox]
%D
%D \MySubject{feeling stretched feeling stretched feeling stretched feeling stretched}
@@ -2169,7 +2169,7 @@
\let\@@kolist=\empty
-\def\dodefinehead[#1][#2]% % don't preset prefix to much
+\def\dododefinehead#1#2% % don't preset prefix to much
{\presetlabeltext[#1=]%
\getparameters
[\??ko#1]
@@ -2265,6 +2265,15 @@
\setevalue{\??by\v!by#1}{\getvalue{\??ko#1\c!section}}%
\setvalue{#1}{\dodoubleempty\doconstructhead[#1]}}
+\def\dodefinehead[#1][#2]%
+ {\doifelsenothing{#2}
+ {% todo: message that it's an invalid definition
+ \setvalue{#1}{\endgraf[#1]\kern.5em}}
+ {\doifassignmentelse{#2}
+ {\dododefinehead{#1}{#2}}
+ {\doifdefined{\??ko#2\c!section}
+ {\dododefinehead{#1}{#2}}}}}
+
\def\definehead
{\dodoubleemptywithset\dodefinehead}