diff options
Diffstat (limited to 'tex/context/base/strc-lev.mkiv')
-rw-r--r-- | tex/context/base/strc-lev.mkiv | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/tex/context/base/strc-lev.mkiv b/tex/context/base/strc-lev.mkiv index 4f4745e9b..4c4605bcd 100644 --- a/tex/context/base/strc-lev.mkiv +++ b/tex/context/base/strc-lev.mkiv @@ -24,7 +24,7 @@ \unprotect \unexpanded\def\definestructurelevels{\dodoubleargument\dodefinestructurelevels} -\unexpanded\def\startstructurelevel {\dosingleargument\dostartstructurelevel} +\unexpanded\def\startstructurelevel {\dosingleempty\dostartstructurelevel} \unexpanded\def\dodefinestructurelevels[#1][#2]{\ctxlua{structures.sections.defineautolevels("#1","#2")}} \unexpanded\def\dostartstructurelevel [#1]{\ctxlua{structures.sections.startautolevel("#1")}} @@ -33,6 +33,11 @@ \unexpanded\def\nostartstructurehead{\dotripleargument\nonostartstructurehead} \unexpanded\def\nostopstructurehead {\dosingleargument\nonostopstructurehead } +\unexpanded\def\dostartstructurelevel[#1]% + {\doifassignmentelse{#1} + {\ctxlua{structures.sections.startautolevel("\v!default")}[#1]} + {\ctxlua{structures.sections.startautolevel("#1")}}} + \unexpanded\def\nonostartstructurehead[#1][#2][#3]% {\blank \noindentation{\tttf[start missing structure level #1]} @@ -43,6 +48,15 @@ \noindentation{\tttf[stop missing structure level #1]} \blank} +\definestructurelevels + [\v!default] + [\v!chapter, + \v!section, + \v!subsection, + \v!subsubsection, + \v!subsubsubsection, + \v!subsubsubsubsection] + \protect \endinput % \starttext |