summaryrefslogtreecommitdiff
path: root/tex/context/base/strc-sec.mkiv
diff options
context:
space:
mode:
authorHans Hagen <pragma@wxs.nl>2009-09-28 09:02:00 +0200
committerHans Hagen <pragma@wxs.nl>2009-09-28 09:02:00 +0200
commit29d92dfd14d30d1f304175d0abffb46fc86f5471 (patch)
tree62943c93911c0713181c5678fc169c1ddb01fa7d /tex/context/base/strc-sec.mkiv
parentd83bd4e8a89d96bd9dfabf4427d02efb9623e5a2 (diff)
downloadcontext-29d92dfd14d30d1f304175d0abffb46fc86f5471.tar.gz
beta 2009.09.28 09:02
Diffstat (limited to 'tex/context/base/strc-sec.mkiv')
-rw-r--r--tex/context/base/strc-sec.mkiv14
1 files changed, 12 insertions, 2 deletions
diff --git a/tex/context/base/strc-sec.mkiv b/tex/context/base/strc-sec.mkiv
index aa1d4721f..7510934fd 100644
--- a/tex/context/base/strc-sec.mkiv
+++ b/tex/context/base/strc-sec.mkiv
@@ -59,6 +59,8 @@
\def\dostructureheadparentparameter #1#2{\ifx#1\relax\s!empty\else\dostructureheadparameter #1#2\fi}
\def\dostructureheadparentparameterhash#1#2{\ifx#1\relax \else\dostructureheadparameterhash#1#2\fi}
+\def\structureheadparameterstrict#1{\csname\ifcsname\??nh\currentstructurehead#1\endcsname\??nh\currentstructurehead#1\else\s!empty\fi\endcsname}
+
\def\dosetstructureheadattributes#1#2% style color
{\edef\fontattributehash {\structureheadparameterhash#1}%
\edef\colorattributehash{\structureheadparameterhash#2}%
@@ -76,12 +78,20 @@
{\global\advance\maxstructuredepth\plusone
\setevalue{\??nh#1\c!level}{\the\maxstructuredepth}%
\setstructurelevel{#1}{\the\maxstructuredepth}%
-% \letvalue{\??nh#1\c!marking}\empty % ?
+% \letvalue{\??nh#1\c!marking}\empty % ?
%\writestatus{structure}{#1\ifx\laststructuresectionname\empty\else\space->\space\laststructuresectionname\fi}%
\normalexpanded{\noexpand\getparameters[\??nh#1][\s!parent=\??nh\laststructuresectionname]}%
+ % this is a rather practical default that we don't want to be part of the parent chain
+ % lookup mechanism; it's also mkii compativle; this might become \everystructureheaddefine
+ \getparameters[\??nh#1]
+ [ \c!textstyle=\structureheadparameterstrict\c!style,
+ \c!textcolor=\structureheadparameterstrict\c!color,
+ \c!numberstyle=\structureheadparameterstrict\c!style,
+ \c!numbercolor=\structureheadparameterstrict\c!color]%
+ % so far for these default inheritances
\definemarking[#1]%
\ifnum\maxstructuredepth>\plusone
-% \normalexpanded{\noexpand\couplemarking[#1][\laststructuresectionname]}% so, the child inherits settings from the parent
+% \normalexpanded{\noexpand\couplemarking[#1][\laststructuresectionname]}% so, the child inherits settings from the parent
\normalexpanded{\noexpand\relatemarking[#1][\laststructuresectionname]}% so, the parent will reset the child
\fi
\xdef\laststructuresectionname{#1}}}