summaryrefslogtreecommitdiff
path: root/tex
diff options
context:
space:
mode:
Diffstat (limited to 'tex')
-rw-r--r--tex/context/base/cont-new.mkii2
-rw-r--r--tex/context/base/cont-new.mkiv2
-rw-r--r--tex/context/base/context-version.pdfbin4073 -> 4075 bytes
-rw-r--r--tex/context/base/context-version.pngbin105724 -> 105867 bytes
-rw-r--r--tex/context/base/context.mkii2
-rw-r--r--tex/context/base/context.mkiv2
-rw-r--r--tex/context/base/status-files.pdfbin24355 -> 24331 bytes
-rw-r--r--tex/context/base/status-lua.pdfbin172398 -> 172398 bytes
-rw-r--r--tex/context/base/strc-con.mkvi3
-rw-r--r--tex/context/base/strc-doc.lua36
-rw-r--r--tex/context/base/strc-not.mkvi3
-rw-r--r--tex/context/base/strc-num.lua3
-rw-r--r--tex/context/base/strc-num.mkiv23
-rw-r--r--tex/context/base/syst-aux.mkiv51
-rw-r--r--tex/generic/context/luatex/luatex-fonts-merged.lua2
15 files changed, 94 insertions, 35 deletions
diff --git a/tex/context/base/cont-new.mkii b/tex/context/base/cont-new.mkii
index d611cb458..c4d6fe725 100644
--- a/tex/context/base/cont-new.mkii
+++ b/tex/context/base/cont-new.mkii
@@ -11,7 +11,7 @@
%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
%C details.
-\newcontextversion{2012.03.13 00:17}
+\newcontextversion{2012.03.13 21:26}
%D This file is loaded at runtime, thereby providing an
%D excellent place for hacks, patches, extensions and new
diff --git a/tex/context/base/cont-new.mkiv b/tex/context/base/cont-new.mkiv
index 8ee0fa4be..c6058851d 100644
--- a/tex/context/base/cont-new.mkiv
+++ b/tex/context/base/cont-new.mkiv
@@ -11,7 +11,7 @@
%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
%C details.
-\newcontextversion{2012.03.13 00:17}
+\newcontextversion{2012.03.13 21:26}
%D This file is loaded at runtime, thereby providing an
%D excellent place for hacks, patches, extensions and new
diff --git a/tex/context/base/context-version.pdf b/tex/context/base/context-version.pdf
index f16ee70cf..14ce6560d 100644
--- a/tex/context/base/context-version.pdf
+++ b/tex/context/base/context-version.pdf
Binary files differ
diff --git a/tex/context/base/context-version.png b/tex/context/base/context-version.png
index 0d34083f6..8dfdcbfd8 100644
--- a/tex/context/base/context-version.png
+++ b/tex/context/base/context-version.png
Binary files differ
diff --git a/tex/context/base/context.mkii b/tex/context/base/context.mkii
index bc330439d..57c839be7 100644
--- a/tex/context/base/context.mkii
+++ b/tex/context/base/context.mkii
@@ -20,7 +20,7 @@
%D your styles an modules.
\edef\contextformat {\jobname}
-\edef\contextversion{2012.03.13 00:17}
+\edef\contextversion{2012.03.13 21:26}
%D For those who want to use this:
diff --git a/tex/context/base/context.mkiv b/tex/context/base/context.mkiv
index 902346efe..189a9e1aa 100644
--- a/tex/context/base/context.mkiv
+++ b/tex/context/base/context.mkiv
@@ -23,7 +23,7 @@
%D up and the dependencies are more consistent.
\edef\contextformat {\jobname}
-\edef\contextversion{2012.03.13 00:17}
+\edef\contextversion{2012.03.13 21:26}
%D For those who want to use this:
diff --git a/tex/context/base/status-files.pdf b/tex/context/base/status-files.pdf
index df537b46c..51a11cf22 100644
--- a/tex/context/base/status-files.pdf
+++ b/tex/context/base/status-files.pdf
Binary files differ
diff --git a/tex/context/base/status-lua.pdf b/tex/context/base/status-lua.pdf
index 6439fdd9f..70dc87d79 100644
--- a/tex/context/base/status-lua.pdf
+++ b/tex/context/base/status-lua.pdf
Binary files differ
diff --git a/tex/context/base/strc-con.mkvi b/tex/context/base/strc-con.mkvi
index 84b551711..63b8d393f 100644
--- a/tex/context/base/strc-con.mkvi
+++ b/tex/context/base/strc-con.mkvi
@@ -154,6 +154,7 @@
\unexpanded\def\strc_constructions_initialize#1% class instance
{\edef\currentconstruction{#1}%
+\let\currentconstructionlistentry\!!zerocount
\expandafter\let\expandafter\currentconstructionmain \csname\??constructionmain \currentconstruction\endcsname
\expandafter\let\expandafter\currentconstructionlevel \csname\??constructionlevel\currentconstruction\endcsname
\expandafter\let\expandafter\currentconstructionhandler\csname\??constructionclass\currentconstruction\endcsname
@@ -231,6 +232,7 @@
\dotagsetconstruction
\constructionparameter\c!before
\begingroup
+ \edef\currentconstructionalternative{\constructionparameter\c!alternative}%
\doadaptleftskip{\constructionparameter\c!margin}%
\setlocalhsize % so we can use \localhsize in width assignments
\constructionsheaddistance\constructionalternativeparameter\c!distance\relax
@@ -274,7 +276,6 @@
\fi
\strc_constructions_close_symbol_reset
%
- \edef\currentconstructionalternative{\constructionparameter\c!alternative}%
\doifnotsetups {\constructionalternativeparameter\c!renderingsetup}
{\let\currentconstructionalternative\v!left}%
\directsetup{\constructionalternativeparameter\c!renderingsetup}\relax
diff --git a/tex/context/base/strc-doc.lua b/tex/context/base/strc-doc.lua
index 793f1a2fd..f10b175a4 100644
--- a/tex/context/base/strc-doc.lua
+++ b/tex/context/base/strc-doc.lua
@@ -25,6 +25,16 @@ local catcodenumbers = catcodes.numbers
local ctxcatcodes = tex.ctxcatcodes
local variables = interfaces.variables
+local v_last = variables.last
+local v_first = variables.first
+local v_previous = variables.previous
+local v_next = variables.next
+local v_auto = variables.auto
+local v_strict = variables.strict
+local v_all = variables.all
+local v_positive = variables.positive
+local v_by = variables.by
+
local trace_sectioning = false trackers.register("structures.sectioning", function(v) trace_sectioning = v end)
local trace_detail = false trackers.register("structures.detail", function(v) trace_detail = v end)
@@ -185,8 +195,10 @@ function sections.getlevel(name)
return levelmap[name] or 0
end
-function sections.way(way,by)
- context((gsub(way,"^"..by,"")))
+local byway = "^" .. v_by
+
+function sections.way(way)
+ context((gsub(way,byway,"")))
end
function sections.setblock(name)
@@ -450,7 +462,7 @@ function sections.structuredata(depth,key,default,honorcatcodetable) -- todo: sp
end
end
if d and type(d) ~= "table" then
- if honorcatcodetable == true or honorcatcodetable == variables.auto then
+ if honorcatcodetable == true or honorcatcodetable == v_auto then
local metadata = data.metadata
local catcodes = metadata and metadata.catcodes
if catcodes then
@@ -615,11 +627,11 @@ function sections.typesetnumber(entry,kind,...) -- kind='section','number','pref
if set == "" then set = "default" end
if segments == "" then segments = nil end
--
- if criterium == variables.strict then
+ if criterium == v_strict then
criterium = 0
- elseif criterium == variables.positive then
+ elseif criterium == v_positive then
criterium = -1
- elseif criterium == variables.all then
+ elseif criterium == v_all then
criterium = -1000000
else
criterium = 0
@@ -751,8 +763,8 @@ function sections.findnumber(depth,what) -- needs checking (looks wrong and slow
local collected = sections.collected
local sectiondata = collected[index]
if sectiondata and sectiondata.hidenumber ~= true then -- can be nil
- local quit = what == variables.previous or what == variables.next
- if what == variables.first or what == variables.previous then
+ local quit = what == v_previous or what == v_next
+ if what == v_first or what == v_previous then
for i=index,1,-1 do
local s = collected[i]
local n = s.numbers
@@ -765,7 +777,7 @@ function sections.findnumber(depth,what) -- needs checking (looks wrong and slow
break
end
end
- elseif what == variables.last or what == variables.next then
+ elseif what == v_last or what == v_next then
for i=index,#collected do
local s = collected[i]
local n = s.numbers
@@ -791,8 +803,8 @@ function sections.finddata(depth,what)
local index = data.references.listindex
if index then
local collected = structures.lists.collected
- local quit = what == variables.previous or what == variables.next
- if what == variables.first or what == variables.previous then
+ local quit = what == v_previous or what == v_next
+ if what == v_first or what == v_previous then
for i=index-1,1,-1 do
local s = collected[i]
if not s then
@@ -809,7 +821,7 @@ function sections.finddata(depth,what)
end
end
end
- elseif what == variables.last or what == variables.next then
+ elseif what == v_last or what == v_next then
for i=index+1,#collected do
local s = collected[i]
if not s then
diff --git a/tex/context/base/strc-not.mkvi b/tex/context/base/strc-not.mkvi
index a6face067..8002f7002 100644
--- a/tex/context/base/strc-not.mkvi
+++ b/tex/context/base/strc-not.mkvi
@@ -617,9 +617,10 @@
\noteparameter\c!textcommand{\ctxcommand{noteprefixednumber("\currentnote",\currentnotenumber)}}%
% the next one can cycle so we need to make sure it has no advance width
\doif{\noteparameter\c!indicator}\v!yes\strc_notes_inject_pointer
+ \dostoptagged
\egroup
\endgroup
- \dostoptagged
+ \dostoptagged % check
\globallet\lastnotesymbol\relax}
\unexpanded\def\strc_notes_inject_dummy % temp hack
diff --git a/tex/context/base/strc-num.lua b/tex/context/base/strc-num.lua
index 09b51d29d..3b18ae1d5 100644
--- a/tex/context/base/strc-num.lua
+++ b/tex/context/base/strc-num.lua
@@ -66,7 +66,7 @@ end
job.register('structures.counters.collected', tobesaved, initializer, finalizer)
-local function constructor(t,s,name,i)
+local function constructor(t,s,name,i) -- variables ?
if s == "last" then
local cc = collected[name]
t.stop = (cc and cc[i] and cc[i][t.range]) or 0 -- stop is available for diagnostics purposes only
@@ -385,6 +385,7 @@ function counters.add(name,n,delta)
d.number = (d.number or d.start or 0) + delta*(d.step or 0)
-- d.own = nil
local level = cd.level
+-- print(name,n,delta,level)
if not level or level == -1 then
-- -1 is signal that we reset manually
elseif level == -2 then
diff --git a/tex/context/base/strc-num.mkiv b/tex/context/base/strc-num.mkiv
index e19e0b10b..2351389cd 100644
--- a/tex/context/base/strc-num.mkiv
+++ b/tex/context/base/strc-num.mkiv
@@ -44,7 +44,7 @@
\fi}
\def\autostructureprefixsegments#1% todo: \c!prefixsegments=\v!auto
- {2:\thenamedheadlevel{\ctxlua{structures.sections.way("#1\c!way","\v!by")}}}
+ {2:\thenamedheadlevel{\ctxlua{structures.sections.way("#1\c!way")}}}
\def\structurecounterparameter#1#2% this will become \named....
{\csname
@@ -108,10 +108,27 @@
% % % %
\def\structurecounterway#1% slow, we need to store it at the tex end
- {\ctxlua{structures.sections.way("\structurecounterparameter{#1}\c!way","\v!by")}}
+ {\ctxlua{structures.sections.way("\structurecounterparameter{#1}\c!way")}}
+
+% \def\thenamedstructurecounterlevel#1%
+% {\thenamedheadlevel{\structurecounterway{#1}}}
\def\thenamedstructurecounterlevel#1%
- {\thenamedheadlevel{\structurecounterway{#1}}}
+ {\xthenamedheadlevel{\structurecounterway{#1}}}
+
+\def\xthenamedheadlevel#1%
+ {\xsectionlevel{#1}{\sectionheadsection{\sectionheadcoupling{#1}}}}
+
+\def\xsectionlevel#1#2% direct indirect
+ {\csname\??headlevel
+ \ifcsname\??headlevel#1\endcsname
+ #1%
+ \else\ifcsname\??headlevel#2\endcsname
+ #2%
+ \else
+ \v!none
+ \fi\fi
+ \endcsname}
\def\docheckstructurecountersetup#1% does it have to happen here?
{% this can be done at the lua end / a bit messy here ... todo ...
diff --git a/tex/context/base/syst-aux.mkiv b/tex/context/base/syst-aux.mkiv
index 5f00960e0..1fbf98296 100644
--- a/tex/context/base/syst-aux.mkiv
+++ b/tex/context/base/syst-aux.mkiv
@@ -5130,21 +5130,48 @@
%D These examples show us that an optional can be used. The
%D value provided is added to \type{\localhsize}.
-\newdimen\localhsize
+% todo: a fast non argument variant
-\def\complexsetlocalhsize[#1]% don't change !
- {\localhsize\hsize
- \ifnum\hangafter<\zerocount
- \advance\localhsize\ifdim\hangindent>\zeropoint-\fi\hangindent
- \fi
- \advance\localhsize -\leftskip
- \advance\localhsize -\rightskip
- \advance\localhsize #1\relax}
+\newdimen\localhsize
-\def\simplesetlocalhsize
- {\complexsetlocalhsize[\zeropoint]}
+% \def\complexsetlocalhsize[#1]% don't change !
+% {\localhsize\hsize
+% \ifnum\hangafter<\zerocount
+% \advance\localhsize\ifdim\hangindent>\zeropoint-\fi\hangindent
+% \fi
+% \advance\localhsize -\leftskip
+% \advance\localhsize -\rightskip
+% \advance\localhsize #1\relax}
+%
+% \def\simplesetlocalhsize
+% {\complexsetlocalhsize[\zeropoint]}
+%
+% \definecomplexorsimple\setlocalhsize
+
+\unexpanded\def\setlocalhsize % don't change !
+ {\doifnextoptionalelse
+ \syst_helpers_set_local_hsize_yes
+ \syst_helpers_set_local_hsize_nop}
+
+% \def\syst_helpers_set_local_hsize_nop
+% {\localhsize\hsize
+% \ifnum\hangafter<\zerocount
+% \advance\localhsize\ifdim\hangindent>\zeropoint-\fi\hangindent
+% \fi
+% \advance\localhsize -\leftskip
+% \advance\localhsize -\rightskip}
+
+\def\syst_helpers_set_local_hsize_nop
+ {\localhsize\dimexpr
+ \hsize -\leftskip -\rightskip
+ \ifnum\hangafter<\zerocount
+ \ifdim\hangindent>\zeropoint-\else+\fi\hangindent
+ \fi
+ \relax}
-\definecomplexorsimple\setlocalhsize
+\def\syst_helpers_set_local_hsize_yes[#1]%
+ {\syst_helpers_set_local_hsize_nop
+ \advance\localhsize#1\relax}
%D \macros
%D {doifvalue,doifnotvalue,doifelsevalue,
diff --git a/tex/generic/context/luatex/luatex-fonts-merged.lua b/tex/generic/context/luatex/luatex-fonts-merged.lua
index 5b0c2ebd9..34443c8bc 100644
--- a/tex/generic/context/luatex/luatex-fonts-merged.lua
+++ b/tex/generic/context/luatex/luatex-fonts-merged.lua
@@ -1,6 +1,6 @@
-- merged file : luatex-fonts-merged.lua
-- parent file : luatex-fonts.lua
--- merge date : 03/13/12 00:17:36
+-- merge date : 03/13/12 21:26:51
do -- begin closure to overcome local limits and interference