summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/context/base/strc-doc.mkiv
diff options
context:
space:
mode:
authorTaco Hoekwater <taco@elvenkind.com>2011-06-01 08:54:21 +0000
committerTaco Hoekwater <taco@elvenkind.com>2011-06-01 08:54:21 +0000
commitd7ccb42582f85acf30568913610ccf4d602023fb (patch)
tree7292e3545a420676878e7451b68892d360c62cb6 /Master/texmf-dist/tex/context/base/strc-doc.mkiv
parent2d62a6fe9b80def59c392268022f1f9a2d6e358f (diff)
commit context 2011.05.18
git-svn-id: svn://tug.org/texlive/trunk@22719 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/context/base/strc-doc.mkiv')
-rw-r--r--Master/texmf-dist/tex/context/base/strc-doc.mkiv50
1 files changed, 33 insertions, 17 deletions
diff --git a/Master/texmf-dist/tex/context/base/strc-doc.mkiv b/Master/texmf-dist/tex/context/base/strc-doc.mkiv
index e10efb3f70d..683d65d2f0f 100644
--- a/Master/texmf-dist/tex/context/base/strc-doc.mkiv
+++ b/Master/texmf-dist/tex/context/base/strc-doc.mkiv
@@ -22,7 +22,7 @@
% We operate in a \type {@@ns} namespace. All data is passed through
% variables. Of course we can built another interface on top of this
% that accepts multiple arguments. We might change this approach and
-% remove this layer.
+% remove this layer but it was needed for the transition.
\def\currentstructurecounter{0}
@@ -36,10 +36,23 @@
\getparameters % initialization, used not grouped anyway
[\??ns]
- [\c!number=,\c!level=,\c!name=,\c!title=,\c!bookmark=,\c!marking=,\c!list=,\c!label=,\c!coupling=,\c!ownnumber=,
- \c!sectionseparatorset=\s!default,\c!sectionconversionset=\s!default,
- \c!sectionstopper=,\c!sectionstarter,\c!sectionsegments=,
- \c!sectionresetset=,\c!reference=,
+ [\c!number=,
+ \c!level=,
+ \c!name=,
+ \c!title=,
+ \c!bookmark=,
+ \c!marking=,
+ \c!list=,
+ \c!label=,
+ \c!coupling=,
+ \c!ownnumber=,
+ \c!sectionseparatorset=\s!default,
+ \c!sectionconversionset=\s!default,
+ \c!sectionstopper=,
+ \c!sectionstarter=,
+ \c!sectionsegments=,
+ \c!sectionresetset=,
+ \c!reference=,
\c!expansion=\v!no,
\c!xmlsetup=,
\s!catcodes=,
@@ -63,6 +76,7 @@
\xdef\currentstructurelabel {\structureparameter\c!label}%
\xdef\currentstructurereference {\structureparameter\c!reference}%
\xdef\currentstructurereferenceprefix{\structureparameter\c!referenceprefix}%
+ \xdef\currentstructurebackreference {\structureparameter\c!backreference}%
\xdef\currentstructureshownumber {\structureparameter\c!number}%
\xdef\currentstructuresaveinlist {\structureparameter\c!saveinlist}%
\xdef\currentstructureincrementnumber{\structureparameter\c!incrementnumber}%
@@ -102,12 +116,13 @@
\fi
\setnextinternalreference
\xdef\currentstructurenumber{\ctxlua{ % todo: combine with next call, adapt marks accordingly
- structure.sections.somelevel {
+ structures.sections.somelevel {
references = {
internal = \nextinternalreference,
block = "\currentstructureblock",
reference = "\currentstructurereference",
referenceprefix = "\currentstructurereferenceprefix",
+ backreference = "\currentstructurebackreference",
},
directives = {
resetset = "\structureparameter\c!sectionresetset",
@@ -159,10 +174,10 @@
segments = "\structureparameter\c!sectionsegments",
ownnumber = "\currentstructureownnumber",
},
- userdata = structure.helpers.touserdata(\!!bs\detokenize{#2}\!!es)
+ userdata = structures.helpers.touserdata(\!!bs\detokenize{#2}\!!es)
}
}}%
- \xdef\currentstructurelistnumber{\ctxlua{structure.lists.push(structure.sections.current())}}%
+ \xdef\currentstructurelistnumber{\ctxlua{structures.lists.push(structures.sections.current())}}%
% \currentstructuresynchronize has to be called someplace, since it introduces a node
\setstructuresynchronization\currentstructurelistnumber
\structureparameter\c!command
@@ -173,10 +188,10 @@
\let\previousstructurecounter\!!zerocount
\def\setstructuresynchronization#1%
- {\xdef\currentstructureattribute {\ctxlua {tex.write(jobreferences.setinternalreference("\currentstructurereferenceprefix","\currentstructurereference",\nextinternalreference,"\@@iafocus"))}}%
- \xdef\currentstructuresynchronize{\ctxlatelua{structure.lists.enhance(#1)}}}
+ {\xdef\currentstructureattribute {\ctxlua {tex.write(structures.references.setinternalreference("\currentstructurereferenceprefix","\currentstructurereference",\nextinternalreference,"\interactionparameter\c!focus"))}}%
+ \xdef\currentstructuresynchronize{\ctxlatelua{structures.lists.enhance(#1)}}}
-\def\reportcurrentstructure{\ctxlua{structure.sections.writestatus()}}
+\def\reportcurrentstructure{\ctxlua{structures.sections.reportstructure()}}
% Beware: we need to flush the data to the list explicitly. This is because
% node in inserted and we may want control over when that happens.
@@ -206,11 +221,12 @@
% \stopchapter
% \stoptext
-\def\structurevariable #1{\ctxlua{structure.sections.structuredata(nil,"#1")}}
-\def\structureuservariable #1{\ctxlua{structure.sections.userdata(nil,"#1")}}
-\def\structurenumber {\ctxlua{structure.sections.fullnumber()}}
-\def\structurecatcodedget #1{\ctxlua{structure.sections.structuredata(nil,"#1",nil,true)}} % bad name
-\def\structuregivencatcodedget#1#2{\ctxlua{structure.sections.structuredata(nil,"#1",nil,\number#2)}} % bad name
-\def\structureautocatcodedget #1#2{\ctxlua{structure.sections.structuredata(nil,"#1",nil,"#2")}}
+\def\structurevariable #1{\ctxlua{structures.sections.structuredata(nil,"#1")}}
+\def\structureuservariable #1{\ctxlua{structures.sections.userdata(nil,"#1")}}
+\def\structurenumber {\ctxlua{structures.sections.fullnumber()}}
+\def\structuretitle {\ctxlua{structures.sections.title()}}
+\def\structurecatcodedget #1{\ctxlua{structures.sections.structuredata(nil,"#1",nil,true)}} % bad name
+\def\structuregivencatcodedget#1#2{\ctxlua{structures.sections.structuredata(nil,"#1",nil,\number#2)}} % bad name
+\def\structureautocatcodedget #1#2{\ctxlua{structures.sections.structuredata(nil,"#1",nil,"#2")}}
\protect \endinput