summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/context/base/strc-reg.mkiv
diff options
context:
space:
mode:
authorMojca Miklavec <mojca.miklavec@gmail.com>2012-05-14 17:38:55 +0000
committerMojca Miklavec <mojca.miklavec@gmail.com>2012-05-14 17:38:55 +0000
commit15995e10bfc68edf79970c4ea4fbb6678566c46e (patch)
tree2de7ca2a83f2d37ef043ad7429a5cb945bb79ddb /Master/texmf-dist/tex/context/base/strc-reg.mkiv
parentc9a39f716f1e5ec820ed3aab2c9aef25c5a9d730 (diff)
ConTeXt 2012.05.14 16:00
git-svn-id: svn://tug.org/texlive/trunk@26371 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/context/base/strc-reg.mkiv')
-rw-r--r--Master/texmf-dist/tex/context/base/strc-reg.mkiv39
1 files changed, 21 insertions, 18 deletions
diff --git a/Master/texmf-dist/tex/context/base/strc-reg.mkiv b/Master/texmf-dist/tex/context/base/strc-reg.mkiv
index 19634390dba..e36556949b2 100644
--- a/Master/texmf-dist/tex/context/base/strc-reg.mkiv
+++ b/Master/texmf-dist/tex/context/base/strc-reg.mkiv
@@ -5,7 +5,7 @@
%D subtitle=Registers,
%D author=Hans Hagen,
%D date=\currentdate,
-%D copyright=PRAGMA-ADE / Hans Hagen]
+%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
%C
%C This module is part of the \CONTEXT\ macro||package and is
%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
@@ -46,7 +46,9 @@
% \index[pageclass::] {textclass::entry}
% \index[pageclass::key]{textclass::entry}
-%D Parameters:
+%D Parameters ... we set up levels so we need a slightly different command handler here .. okay, we
+%D can use the childs for that ... but then we need to tweak the name in order to distinguis:
+%D register -> register:1 (i.e. prefix)
\let\currentregister\empty
@@ -63,11 +65,11 @@
\def\doregisterparentparameter #1#2{\ifx#1\relax\s!empty\else\doregisterparameter #1{#2}\fi}
\def\doregisterparentparameterhash#1#2{\ifx#1\relax \else\doregisterparameterhash#1{#2}\fi}
-\def\dosetregisterattributes#1#2% style color
- {\edef\fontattributehash {\registerparameterhash#1}%
- \edef\colorattributehash{\registerparameterhash#2}%
- \ifx\fontattributehash \empty\else\dosetfontattribute \fontattributehash #1\fi
- \ifx\colorattributehash\empty\else\dosetcolorattribute\colorattributehash#2\fi}
+\def\useregisterstyleandcolor#1#2% style color
+ {\edef\currentstyleparameter{\registerparameter#1}%
+ \edef\currentcolorparameter{\registerparameter#2}%
+ \ifx\currentstyleparameter\empty\else\dousestyleparameter\currentstyleparameter\fi
+ \ifx\currentcolorparameter\empty\else\dousecolorparameter\currentcolorparameter\fi}
%D Setup:
@@ -270,7 +272,7 @@
\currentregistersynchronize % here?
% needs thinking ... bla\index{bla}. will break before the . but adding a
% penalty is also no solution
- \attribute\destinationattribute\lastdestinationattribute \forcecolorhack % no \strut as it will be removed during cleanup
+ \attribute\destinationattribute\lastdestinationattribute \signalcharacter % no \strut as it will be removed during cleanup
\endgroup}
\def\doregister[#1][#2]%
@@ -538,10 +540,10 @@
{\iffirstargument
\begingroup
\edef\currentregister{#1}%
- % the expansion is needed because we don't want \v!'s in the tuo file (french)
- \normalexpanded{\systemsuppliedchapter[\currentregister]{\noexpand\headtext{\currentregister}}}%
+ \normalexpanded{\startnamedsection[\v!chapter][\c!title={\headtext{\currentregister}},reference=\currentregister]}%
\placeregister[\currentregister][#2]%
\page[\v!yes]%
+ \stopnamedsection
\endgroup
\fi}
@@ -597,7 +599,7 @@
{\registerparameter\c!before
% bugged, why does leftskip gets set: \vskip\lineheight\goodbreak\vskip-\lineheight
\begingroup
- \dosetregisterattributes\c!style\c!color
+ \useregisterstyleandcolor\c!style\c!color
\dontleavehmode
\strut
\iflocation
@@ -614,7 +616,7 @@
\setvalue{\??id:\c!indicator:b}#1% will be shared with a
{\registerparameter\c!before
\begingroup
- \dosetregisterattributes\c!style\c!color
+ \useregisterstyleandcolor\c!style\c!color
\dontleavehmode
\strut
\iflocation
@@ -639,6 +641,7 @@
{\endgraf
\begingroup
\dostarttagged\t!register\currentregister
+ \forgeteverypar
\forgetparindent
\forgetparskip}
@@ -651,7 +654,7 @@
{\endgraf
\begingroup
\dostarttagged\t!registerentries\empty
- \dosetregisterattributes\c!textstyle\c!textcolor
+ \useregisterstyleandcolor\c!textstyle\c!textcolor
\advance\leftskip\numexpr#1-1\relax\dimexpr\registerparameter\c!distance\relax
\hangindent\registerparameter\c!distance\hangafter\plusone}
@@ -676,7 +679,7 @@
{\begingroup
\dostarttagged\t!registerpages\empty
\setfalse\registerpagedone
- \dosetregisterattributes\c!pagestyle\c!pagecolor}
+ \useregisterstyleandcolor\c!pagestyle\c!pagecolor}
\unexpanded\def\stopregisterpages
{\dostoptagged
@@ -687,7 +690,7 @@
\begingroup
\setfalse\registerpagedone
\dostarttagged\t!registerpage\empty
- \dosetregisterattributes\c!pagestyle\c!pagecolor}
+ \useregisterstyleandcolor\c!pagestyle\c!pagecolor}
\unexpanded\def\stopregisterseewords
{\dostoptagged
@@ -706,9 +709,9 @@
\def\withregisterpagecommand#1#2#3#4%
{\def\currentregisterpageindex{#2}%
\iflocation
- \goto{\registerparameter\c!pagecommand{#4}}[internal(#2)]%
+ \goto{\applyprocessor{#1}{\registerparameter\c!pagecommand{#4}}}[internal(#2)]%
\else
- \registerparameter\c!pagecommand{#4}%
+ \applyprocessor{#1}{\registerparameter\c!pagecommand{#4}}%
\fi}
\def\registeronepage#1#2#3#4% #1:processor content
@@ -743,7 +746,7 @@
\iflocation
\def\currentregisterseeindex{#3}%
\doifelse{\registerparameter\c!interaction}\v!text
- {\directgoto{\setlocationcolor\??ia\doapplyregisterentrycommand{#1}{#4}}[internal(#2)]}
+ {\directgoto{\setlocationcolor\doapplyregisterentrycommand{#1}{#4}}[internal(#2)]}
{\doapplyregisterentrycommand{#1}{#4}}%
\else
\let\currentregisterseeindex\empty