summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/context/base/strc-doc.mkiv
diff options
context:
space:
mode:
authorTaco Hoekwater <taco@elvenkind.com>2010-05-24 14:05:02 +0000
committerTaco Hoekwater <taco@elvenkind.com>2010-05-24 14:05:02 +0000
commit57ea7dad48fbf2541c04e434c31bde655ada3ac4 (patch)
tree1f8b43bc7cb92939271e1f5bec610710be69097f /Master/texmf-dist/tex/context/base/strc-doc.mkiv
parent6ee41e1f1822657f7f23231ec56c0272de3855e3 (diff)
here is context 2010.05.24 13:05
git-svn-id: svn://tug.org/texlive/trunk@18445 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.mkiv84
1 files changed, 45 insertions, 39 deletions
diff --git a/Master/texmf-dist/tex/context/base/strc-doc.mkiv b/Master/texmf-dist/tex/context/base/strc-doc.mkiv
index 4ff87b742be..e10efb3f70d 100644
--- a/Master/texmf-dist/tex/context/base/strc-doc.mkiv
+++ b/Master/texmf-dist/tex/context/base/strc-doc.mkiv
@@ -17,6 +17,8 @@
\unprotect
+\def\c!xmlsetup{xmlsetup}
+
% 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
@@ -36,9 +38,10 @@
[\??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!sectionsegments=,
+ \c!sectionstopper=,\c!sectionstarter,\c!sectionsegments=,
\c!sectionresetset=,\c!reference=,
\c!expansion=\v!no,
+ \c!xmlsetup=,
\s!catcodes=,
\c!saveinlist=\v!yes,
\c!command=\showstructuredata]
@@ -50,28 +53,29 @@
\def\dostructurecomponent[#1][#2]% #1=interfaced-settings, #2=optional user data (not yet supported)
{\begingroup
\getparameters[\??ns][#1]%
- \xdef\currentstructurename {\structureparameter\c!name}%
- \xdef\currentstructurecoupling {\structureparameter\c!coupling}%
- \xdef\currentstructureownnumber{\structureparameter\c!ownnumber}% optional own number
- \xdef\currentstructurelevel {\structureparameter\c!level}%
-\ifnum\catcodetable=\xmlcatcodes
- \let\currentstructureexpansion\s!xml
-\else
- \edef\currentstructureexpansion{\structureparameter\c!expansion}
-\fi
+ \xdef\currentstructurename {\structureparameter\c!name}%
+ \xdef\currentstructurecoupling {\structureparameter\c!coupling}%
+ \xdef\currentstructureownnumber {\structureparameter\c!ownnumber}% optional own number
+ \xdef\currentstructurelevel {\structureparameter\c!level}%
+ \edef\currentstructureexpansion {\structureparameter\c!expansion}%
+ \xdef\currentstructurexmlsetup {\structureparameter\c!xmlsetup}%
+ \xdef\currentstructurecatcodes {\structureparameter\s!catcodes}%
+ \xdef\currentstructurelabel {\structureparameter\c!label}%
+ \xdef\currentstructurereference {\structureparameter\c!reference}%
+ \xdef\currentstructurereferenceprefix{\structureparameter\c!referenceprefix}%
+ \xdef\currentstructureshownumber {\structureparameter\c!number}%
+ \xdef\currentstructuresaveinlist {\structureparameter\c!saveinlist}%
+ \xdef\currentstructureincrementnumber{\structureparameter\c!incrementnumber}%
\ifx\currentstructureexpansion\s!xml
- % maybe just title xml and inherit xml then in which case we have to test
- % when typesetting marks, lists, refs etc (+specific env)
- \xdef\currentstructuretitle {\detokenizedstructureparameter\c!title}% maybe xml
- \xdef\currentstructurebookmark{\detokenizedstructureparameter\c!bookmark}% no xml
- \xdef\currentstructuremarking {\detokenizedstructureparameter\c!marking}% no xml
- \xdef\currentstructurelist {\detokenizedstructureparameter\c!list}% no xml
+ \xmlstartraw
+ \xdef\currentstructuretitle {\structureparameter\c!title}%
+ \xdef\currentstructurebookmark{\structureparameter\c!bookmark}%
+ \xdef\currentstructuremarking {\structureparameter\c!marking}%
+ \xdef\currentstructurelist {\structureparameter\c!list}%
+ \xmlstopraw
\ifx\currentstructurelist\empty
- \xmlstartraw
- \xdef\currentstructurelist{\structureparameter\c!title}%
- \xmlstopraw
+ \globallet\currentstructurelist\currentstructuretitle
\fi
- %
\globallet\currentstructurecoding\s!xml
\else
\ifx\currentstructureexpansion\v!yes
@@ -96,12 +100,6 @@
\fi
\globallet\currentstructurecoding\s!tex
\fi
- \xdef\currentstructurelabel {\structureparameter\c!label}%
- \xdef\currentstructurereference {\structureparameter\c!reference}%
- \xdef\currentstructurereferenceprefix{\structureparameter\c!referenceprefix}%
- \xdef\currentstructureshownumber {\structureparameter\c!number}%
- \xdef\currentstructuresaveinlist {\structureparameter\c!saveinlist}%
- \xdef\currentstructureincrementnumber{\structureparameter\c!incrementnumber}%
\setnextinternalreference
\xdef\currentstructurenumber{\ctxlua{ % todo: combine with next call, adapt marks accordingly
structure.sections.somelevel {
@@ -115,17 +113,22 @@
resetset = "\structureparameter\c!sectionresetset",
},
metadata = {
- kind = "section",
- name = "\currentstructurename",
- catcodes = \the\catcodetable,
- coding = "\currentstructurecoding",
- xmlroot = \ifx\currentstructurecoding\s!xml "\xmldocument" \else nil \fi,
- \ifx\currentstructuresaveinlist\v!no
- nolist = true,
- \fi
- \ifx\currentstructureincrementnumber\v!yes
- increment = "\currentstructureincrementnumber",
- \fi
+ kind = "section",
+ name = "\currentstructurename",
+ catcodes = \the\ifx\currentstructurecatcodes\empty\catcodetable\else\csname\currentstructurecatcodes\endcsname\fi,
+ coding = "\currentstructurecoding",
+ \ifx\currentstructurecoding\s!xml
+ xmlroot = "\xmldocument",
+ \fi
+ \ifx\currentstructurexmlsetup\empty \else
+ xmlsetup = "\currentstructurexmlsetup",
+ \fi
+ \ifx\currentstructuresaveinlist\v!no
+ nolist = true,
+ \fi
+ \ifx\currentstructureincrementnumber\v!yes
+ increment = "\currentstructureincrementnumber",
+ \fi
},
titledata = { % we can add mark and reference
label = \!!bs\detokenize\expandafter{\currentstructurelabel }\!!es,
@@ -143,11 +146,14 @@
\fi
},
numberdata = {
-block = "\currentstructureblock",
-hidenumber = \ifx\currentstructureshownumber\v!no true\else nil\fi, % titles
+ % needed ?
+ block = "\currentstructureblock",
+ hidenumber = \ifx\currentstructureshownumber\v!no true\else nil\fi, % titles
+ % so far
separatorset = "\structureparameter\c!sectionseparatorset",
conversion = "\structureparameter\c!sectionconversion", % for good old times sake
conversionset = "\structureparameter\c!sectionconversionset",
+ starter = \!!bs\structureparameter\c!sectionstarter\!!es,
stopper = \!!bs\structureparameter\c!sectionstopper\!!es,
set = "\structureparameter\c!sectionset",
segments = "\structureparameter\c!sectionsegments",