summaryrefslogtreecommitdiff
path: root/tex/context/base/strc-sec.mkiv
diff options
context:
space:
mode:
authorMarius <mariausol@gmail.com>2010-09-22 11:03:47 +0300
committerMarius <mariausol@gmail.com>2010-09-22 11:03:47 +0300
commit9d17a4bc572f48289b6d188684a7bbf8c46839fe (patch)
treeb80a082a5d00cd7ee84a8c51c6a5b13d574f2447 /tex/context/base/strc-sec.mkiv
parentf986a332f76934300807a66702e402cc57c4b776 (diff)
downloadcontext-9d17a4bc572f48289b6d188684a7bbf8c46839fe.tar.gz
beta 2010.09.22 09:35
Diffstat (limited to 'tex/context/base/strc-sec.mkiv')
-rw-r--r--tex/context/base/strc-sec.mkiv33
1 files changed, 23 insertions, 10 deletions
diff --git a/tex/context/base/strc-sec.mkiv b/tex/context/base/strc-sec.mkiv
index b2b962183..2a6d25631 100644
--- a/tex/context/base/strc-sec.mkiv
+++ b/tex/context/base/strc-sec.mkiv
@@ -287,22 +287,35 @@
\let\structureheadprefix\empty \def\structureheadprefixplus{+}
% When do we reset the referenceprefix? This needs to be checked. Does it work
-% at all?
+% at all? Todo: pushpop.
+
+% \def\setstructureheadreference
+% {\edef\structureheadreference {\structureheadparameter\c!reference}%
+% \edef\structureheadreferenceprefix{\structureheadparameter\c!prefix}%
+% \ifx\structureheadreferenceprefix\empty
+% \ifx\currentrefenceprefix\structureheadreferenceprefixplus
+% \setupreferenceprefix[]% yes or no? only when set by structure
+% \fi
+% \else\ifx\structureheadreferenceprefix\structureheadreferenceprefixplus
+% \ifx\structureheadreference\empty
+% \expanded{\setupreferenceprefix[\structureheadreferenceprefixplus]}%
+% \else
+% \expanded{\setupreferenceprefix[\structureheadreference]}% we assume just one reference
+% \fi
+% \else
+% \expanded{\setupreferenceprefix[\structureheadreferenceprefix]}%
+% \fi\fi}
+
+% pop in stopsection commands unless empty
\def\setstructureheadreference
{\edef\structureheadreference {\structureheadparameter\c!reference}%
\edef\structureheadreferenceprefix{\structureheadparameter\c!prefix}%
\ifx\structureheadreferenceprefix\empty
- \setupreferenceprefix[]% yes or no?
- \else\ifx\structureheadreferenceprefix\structureheadreferenceprefixplus
- \ifx\structureheadreference\empty
- \expanded{\setupreferenceprefix[\structureheadreferenceprefixplus]}%
- \else
- \expanded{\setupreferenceprefix[\structureheadreference]}% we assume just one reference
- \fi
+ \let\structureheadreferenceprefix\referenceprefix
\else
- \expanded{\setupreferenceprefix[\structureheadreferenceprefix]}%
- \fi\fi}
+ \setupreferenceprefix[\structureheadreferenceprefix]% currenty no pop
+ \fi}
\setvalue{\??nh:\c!incrementnumber:\v!yes }{\settrue \structureheaddoincrement\settrue \structureheadtolist}
\setvalue{\??nh:\c!incrementnumber:\v!no }{\setfalse\structureheaddoincrement\setfalse\structureheadtolist}