diff options
author | Hans Hagen <pragma@wxs.nl> | 2013-11-04 20:03:00 +0100 |
---|---|---|
committer | Hans Hagen <pragma@wxs.nl> | 2013-11-04 20:03:00 +0100 |
commit | 62e4761be06b97b55b53920387f958831e1e41bb (patch) | |
tree | 6975e8e4a9c9cb75a02ab39f4906cb4dd3315505 /tex/context/base/strc-sbe.mkiv | |
parent | 3d13a5b42d3ea3d2935738ef29d2f08694064257 (diff) | |
download | context-62e4761be06b97b55b53920387f958831e1e41bb.tar.gz |
beta 2013.11.04 20:03
Diffstat (limited to 'tex/context/base/strc-sbe.mkiv')
-rw-r--r-- | tex/context/base/strc-sbe.mkiv | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/tex/context/base/strc-sbe.mkiv b/tex/context/base/strc-sbe.mkiv index 4ea08b30c..fc48307ec 100644 --- a/tex/context/base/strc-sbe.mkiv +++ b/tex/context/base/strc-sbe.mkiv @@ -76,17 +76,24 @@ \to \everyaftersectionblock \unexpanded\def\setsectionblock - {\dosingleargument\strc_sectionblock_set} + {\dodoubleempty\strc_sectionblock_set} -\def\strc_sectionblock_set[#1]% used to set the default - {\edef\currentsectionblock{\ctxcommand{setsectionblock("#1")}}} +\def\strc_sectionblock_set[#1][#2]% used to set the default + {\edef\currentsectionblock{#1}% from now on we assume a value + \setupcurrentsectionblock[#2]% + \ctxcommand{setsectionblock("#1", { bookmark = "\sectionblockparameter\c!bookmark" })}} \let\currentsectionblock\empty % was \s!unknown -\unexpanded\def\startsectionblock[#1]% +\unexpanded\def\startsectionblock + {\dodoubleempty\strc_sectionblock_start} + +\unexpanded\def\strc_sectionblock_start[#1][#2]% {%\ctxlua{structures.counters.check(0)}% we assume sane usage of \page, as this is the only workable place (in push) \begingroup - \edef\currentsectionblock{\ctxcommand{pushsectionblock("#1")}}% + \edef\currentsectionblock{#1}% from now on we assume a value + \setupcurrentsectionblock[#2]% + \ctxcommand{pushsectionblock("#1", { bookmark = "\sectionblockparameter\c!bookmark" })}% \csname #1true\endcsname % obsolete \setsystemmode\currentsectionblock \the\everybeforesectionblock\relax @@ -95,7 +102,7 @@ \unexpanded\def\stopsectionblock {\showmessage\m!structures2\currentsectionblock \the\everyaftersectionblock\relax - \edef\currentsectionblock{\ctxcommand{popsectionblock()}}% + \ctxcommand{popsectionblock()}% \endgroup} %D \starttyping |