summaryrefslogtreecommitdiff
path: root/tex
diff options
context:
space:
mode:
authorMarius <mariausol@gmail.com>2012-04-18 00:00:15 +0300
committerMarius <mariausol@gmail.com>2012-04-18 00:00:15 +0300
commit0756a263c41de5279fef717c5b9cca9909308c3a (patch)
tree567d2b2851ff4be9bcc8b23386d2cb0b9e115600 /tex
parentd30dc77c610b72db7e7bc53f2a10e18756cfe437 (diff)
downloadcontext-0756a263c41de5279fef717c5b9cca9909308c3a.tar.gz
beta 2012.04.17 22:37
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.pdfbin4070 -> 4073 bytes
-rw-r--r--tex/context/base/context-version.pngbin105445 -> 106054 bytes
-rw-r--r--tex/context/base/context.mkii2
-rw-r--r--tex/context/base/context.mkiv3
-rw-r--r--tex/context/base/core-dat.lua197
-rw-r--r--tex/context/base/core-dat.mkiv98
-rw-r--r--tex/context/base/core-uti.lua2
-rw-r--r--tex/context/base/lpdf-ini.lua14
-rw-r--r--tex/context/base/m-steps.mkvi10
-rw-r--r--tex/context/base/spac-pag.mkiv251
-rw-r--r--tex/context/base/status-files.pdfbin24326 -> 24323 bytes
-rw-r--r--tex/context/base/status-lua.pdfbin172421 -> 173014 bytes
-rw-r--r--tex/context/base/status-mkiv.lua5
-rw-r--r--tex/context/base/strc-flt.mkvi74
-rw-r--r--tex/context/base/strc-not.mkvi25
-rw-r--r--tex/context/base/trac-log.lua8
-rw-r--r--tex/generic/context/luatex/luatex-fonts-merged.lua2
19 files changed, 573 insertions, 122 deletions
diff --git a/tex/context/base/cont-new.mkii b/tex/context/base/cont-new.mkii
index 408e920a0..bd6a20f7a 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.04.14 00:10}
+\newcontextversion{2012.04.17 22:37}
%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 0ffdc5a33..8ea0045c6 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.04.14 00:10}
+\newcontextversion{2012.04.17 22:37}
%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 d6185843b..7d6dac649 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 cce844c07..47f40fdc4 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 207c507e2..cf3bd5467 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.04.14 00:10}
+\edef\contextversion{2012.04.17 22:37}
%D For those who want to use this:
diff --git a/tex/context/base/context.mkiv b/tex/context/base/context.mkiv
index 0d9be0155..2c6813941 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.04.14 00:10}
+\edef\contextversion{2012.04.17 22:37}
%D For those who want to use this:
@@ -178,6 +178,7 @@
\loadmarkfile{core-uti}
\loadmarkfile{core-two}
+\loadmarkfile{core-dat}
\loadmarkfile{colo-ini}
\loadmarkfile{colo-grp} % optional
diff --git a/tex/context/base/core-dat.lua b/tex/context/base/core-dat.lua
new file mode 100644
index 000000000..eab238704
--- /dev/null
+++ b/tex/context/base/core-dat.lua
@@ -0,0 +1,197 @@
+if not modules then modules = { } end modules ['core-dat'] = {
+ version = 1.001,
+ comment = "companion to core-dat.mkiv",
+ author = "Hans Hagen, PRAGMA-ADE, Hasselt NL",
+ copyright = "PRAGMA ADE / ConTeXt Development Team",
+ license = "see context related readme files"
+}
+
+--[[ldx--
+<p>This module provides a (multipass) container for arbitrary data. It
+replaces the twopass data mechanism.</p>
+--ldx]]--
+
+local tonumber = tonumber
+
+local context, commands = context, commands
+
+local allocate = utilities.storage.allocate
+local settings_to_hash = utilities.parsers.settings_to_hash
+local format = string.format
+local texcount = tex.count
+
+local v_yes = interfaces.variables.yes
+
+local new_latelua = nodes.pool.latelua
+
+local collected = allocate()
+local tobesaved = allocate()
+
+local datasets = {
+ collected = collected,
+ tobesaved = tobesaved,
+}
+
+job.datasets = datasets
+
+local function initializer()
+ collected = datasets.collected
+ tobesaved = datasets.tobesaved
+end
+
+job.register('job.datasets.collected', tobesaved, initializer, nil)
+
+local sets = { }
+
+table.setmetatableindex(tobesaved, function(t,k)
+ local v = { }
+ t[k] = v
+ return v
+end)
+
+table.setmetatableindex(sets, function(t,k)
+ local v = {
+ index = 0,
+ order = 0,
+ }
+ t[k] = v
+ return v
+end)
+
+local function setdata(settings)
+ local name = settings.name
+ local tag = settings.tag
+ local data = settings.data
+ local list = tobesaved[name]
+ data = settings_to_hash(data) or { }
+ if not tag then
+ tag = #list + 1
+ else
+ tag = tonumber(tag) or tag -- autonumber saves keys
+ end
+ list[tag] = data
+ if settings.delay == v_yes then
+ local set = sets[name]
+ local index = set.index + 1
+ set.index = index
+ data.index = index
+ data.order = index
+ data.realpage = texcount.realpageno
+ end
+ return name, tag, data
+end
+
+datasets.setdata = setdata
+
+function datasets.extend(name,tag)
+ local set = sets[name]
+ local order = set.order + 1
+ set.order = order
+ local t = tobesaved[name][tag]
+ t.realpage = texcount.realpageno
+ t.order = order
+end
+
+function datasets.getdata(name,tag,key,default)
+ local t = collected[name]
+ t = t and (t[tag] or t[tonumber(tag)])
+ if not t then
+ -- back luck
+ elseif key then
+ return t[key] or default
+ else
+ return t
+ end
+end
+
+function commands.setdataset(settings)
+ local name, tag, data = setdata(settings)
+ if settings.delay ~= v_yes then
+ --
+ elseif type(tag) == "number" then
+ context(new_latelua(format("job.datasets.extend(%q,%i)",name,tag)))
+ else
+ context(new_latelua(format("job.datasets.extend(%q,%q)",name,tag)))
+ end
+end
+
+function commands.datasetvariable(name,tag,key)
+ local t = collected[name]
+ t = t and (t[tag] or t[tonumber(tag)])
+ if t then
+ local s = t[key]
+ if s then
+ context(s)
+ end
+ end
+end
+
+--[[ldx--
+<p>We also provide an efficient variant for page states.</p>
+--ldx]]--
+
+local collected = allocate()
+local tobesaved = allocate()
+
+local pagestates = {
+ collected = collected,
+ tobesaved = tobesaved,
+}
+
+job.pagestates = pagestates
+
+local function initializer()
+ collected = pagestates.collected
+ tobesaved = pagestates.tobesaved
+end
+
+job.register('job.pagestates.collected', tobesaved, initializer, nil)
+
+table.setmetatableindex(tobesaved, function(t,k)
+ local v = { }
+ t[k] = v
+ return v
+end)
+
+local function setstate(settings)
+ local name = settings.name
+ local tag = settings.tag
+ local list = tobesaved[name]
+ if not tag then
+ tag = #list + 1
+ else
+ tag = tonumber(tag) or tag -- autonumber saves keys
+ end
+ local data = texcount.realpageno
+ list[tag] = data
+ return name, tag, data
+end
+
+pagestates.setstate = setstate
+
+function pagestates.extend(name,tag)
+ tobesaved[name][tag] = texcount.realpageno
+end
+
+function pagestates.realpage(name,tag,default)
+ local t = collected[name]
+ t = t and (t[tag] or t[tonumber(tag)])
+ return tonumber(t or default)
+end
+
+function commands.setpagestate(settings)
+ local name, tag, data = setstate(settings)
+ if type(tag) == "number" then
+ context(new_latelua(format("job.pagestates.extend(%q,%i)",name,tag)))
+ else
+ context(new_latelua(format("job.pagestates.extend(%q,%q)",name,tag)))
+ end
+end
+
+function commands.pagestaterealpage(name,tag)
+ local t = collected[name]
+ t = t and (t[tag] or t[tonumber(tag)])
+ if t then
+ context(t)
+ end
+end
diff --git a/tex/context/base/core-dat.mkiv b/tex/context/base/core-dat.mkiv
new file mode 100644
index 000000000..f1d2a52cb
--- /dev/null
+++ b/tex/context/base/core-dat.mkiv
@@ -0,0 +1,98 @@
+%D \module
+%D [ file=core-dat,
+%D version=20122.04.17, % replaces core-two from 1997.03.31,
+%D title=\CONTEXT\ Core Macros,
+%D subtitle=Multipass Datasets,
+%D author=Hans Hagen,
+%D date=\currentdate,
+%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
+%C details.
+
+\writestatus{loading}{ConTeXt Core Macros / Multipass Datasets}
+
+%D \starttyping
+%D \definedataset[test-1]
+%D \definedataset[test-2][delay=yes]
+%D
+%D \startlines
+%D set 1: \setdataset[test-1][whatever=this-or-that-1]
+%D set 2: \setdataset[test-2][whatever=this-or-that-2]
+%D set 3: \setdataset[test-2][whatever=this-or-that-3]
+%D \stoplines
+%D
+%D \startlines
+%D get 1: \datasetvariable{test-1}{1}{whatever} / \datasetvariable{test-1}{1}{realpage}
+%D get 2: \datasetvariable{test-2}{1}{whatever} / \datasetvariable{test-2}{1}{realpage}
+%D get 3: \datasetvariable{test-2}{2}{whatever} / \datasetvariable{test-2}{2}{realpage}
+%D \stoplines
+%D \stoptyping
+
+\unprotect
+
+\registerctxluafile{core-dat}{1.001}
+
+\installcorenamespace{dataset}
+
+\installcommandhandler \??dataset {dataset} \??dataset
+
+\unexpanded\def\setdataset
+ {\dotripleempty\syst_datasets_set}
+
+\def\syst_datasets_set
+ {\ifthirdargument
+ \expandafter\syst_datasets_set_named
+ \else
+ \expandafter\syst_datasets_set_indexed
+ \fi}
+
+\def\syst_datasets_set_named[#1][#2][#3]%
+ {\begingroup
+ \edef\currentdataset{#1}%
+ \ctxcommand{setdataset{
+ name = "\currentdataset",
+ tag = \!!bs#2\!!es,
+ delay = "\datasetparameter\c!delay",
+ data = \!!bs#3\!!es
+ }}%
+ \endgroup}
+
+\def\syst_datasets_set_indexed[#1][#2][#3]%
+ {\begingroup
+ \edef\currentdataset{#1}%
+ \ctxcommand{setdataset{
+ name = "\currentdataset",
+ delay = "\datasetparameter\c!delay",
+ data = \!!bs#2\!!es
+ }}%
+ \endgroup}
+
+\def\datasetvariable#1#2#3%
+ {\ctxcommand{datasetvariable("#1","#2","#3")}}
+
+\installcorenamespace{pagestate}
+
+\installcommandhandler \??pagestate {pagestate} \??pagestate
+
+\setuppagestate
+ [\c!delay=\v!yes]
+
+\unexpanded\def\setpagestate
+ {\dodoubleempty\syst_pagestates_set}
+
+\def\syst_pagestates_set[#1][#2]%
+ {\begingroup
+ \edef\currentpagestate{#1}%
+ \ctxcommand{setpagestate{
+ name = "\currentpagestate",
+ tag = \!!bs#2\!!es,
+ delay = "\pagestateparameter\c!delay",
+ }}%
+ \endgroup}
+
+\def\pagestaterealpage#1#2%
+ {\ctxcommand{pagestaterealpage("#1","#2")}}
+
+\protect
diff --git a/tex/context/base/core-uti.lua b/tex/context/base/core-uti.lua
index cfe95a6bb..1657a75e2 100644
--- a/tex/context/base/core-uti.lua
+++ b/tex/context/base/core-uti.lua
@@ -34,7 +34,7 @@ local report_jobcontrol = logs.reporter("jobcontrol")
job = job or { }
local job = job
-job.version = 1.18
+job.version = 1.19
-- some day we will implement loading of other jobs and then we need
-- job.jobs
diff --git a/tex/context/base/lpdf-ini.lua b/tex/context/base/lpdf-ini.lua
index 88999358c..8e54666be 100644
--- a/tex/context/base/lpdf-ini.lua
+++ b/tex/context/base/lpdf-ini.lua
@@ -806,3 +806,17 @@ if not pdfreferenceobject then
end
end
+
+-- -- Maybe this will be an option (suggested on the mailing list by Peter Rolf):
+--
+-- function backends.codeinjections.rgbtransparencygroup()
+-- local d = lpdf.dictionary {
+-- S = lpdf.constant("Transparency"),
+-- CS = lpdf.constant("DeviceRGB"),
+-- I = true
+-- }
+-- lpdf.registerpagefinalizer(function()
+-- lpdf.addtopageattributes("Group",d) end)
+-- end
+--
+-- backends.codeinjections.rgbtransparencygroup()
diff --git a/tex/context/base/m-steps.mkvi b/tex/context/base/m-steps.mkvi
index de861e619..a07ece3ae 100644
--- a/tex/context/base/m-steps.mkvi
+++ b/tex/context/base/m-steps.mkvi
@@ -17,11 +17,11 @@
\unprotect
-\definecorenamespace {stepcharts}
-\definecorenamespace {steptables}
-\definecorenamespace {stepcells}
-\definecorenamespace {steptexts}
-\definecorenamespace {steplines}
+\installcorenamespace {stepcharts}
+\installcorenamespace {steptables}
+\installcorenamespace {stepcells}
+\installcorenamespace {steptexts}
+\installcorenamespace {steplines}
\installsimplecommandhandler \??stepcharts {STEPchart} \??stepcharts
\installsimplecommandhandler \??steptables {STEPtable} \??steptables
diff --git a/tex/context/base/spac-pag.mkiv b/tex/context/base/spac-pag.mkiv
index e44411fba..10b5d1acd 100644
--- a/tex/context/base/spac-pag.mkiv
+++ b/tex/context/base/spac-pag.mkiv
@@ -18,6 +18,8 @@
%D The code here has evolved over time and might not be the best
%D around. Maybe much will be gone a some point.
+%D The pagestate code will be redone.
+
\installcorenamespace {alignswitch}
\letvalue{\??alignswitch\v!left }\zerocount
@@ -27,7 +29,6 @@
\def\setalignmentswitch#1%
{\chardef\alignmentswitch\csname\??alignswitch\ifcsname\??alignswitch#1\endcsname#1\else\v!left\fi\endcsname}
-\newcount \noftrackedpagestates
\newif \ifpagestatemismatch
\newcount \realpagestateno
\newconstant\frozenpagestate
@@ -37,14 +38,106 @@
\doforcedtrackpagestate{#1}{#2}%
\fi \fi}
+% \def\doforcedtrackpagestate#1#2%
+% {\ifcase\frozenpagestate
+% \global\advance#2\plusone
+% \lazysavetaggedtwopassdata{#1}{0}{\number#2}{\noexpand\realfolio}%
+% \fi}
+
\def\doforcedtrackpagestate#1#2%
{\ifcase\frozenpagestate
- \global\advance\noftrackedpagestates\plusone
\global\advance#2\plusone
- \lazysavetaggedtwopassdata{#1}{\number\noftrackedpagestates}{\number#2}{\noexpand\realfolio}%
- %\llap{\infofont\number\noftrackedpagestates/\number#2}% tracing
+ \setpagestate[#1][\number#2]%
\fi}
+% \def\doifrightpagestateelse#1#2% not expandable !
+% {\ifcase\frozenpagestate
+% \pagestatemismatchfalse
+% \realpagestateno\realfolio
+% \ifinpagebody
+% \ifdoublesided
+% \ifodd\realpageno\relax
+% \syst_twopass_set_found
+% \else
+% \syst_twopass_set_not_found
+% \fi
+% \else
+% \syst_twopass_set_found
+% \fi
+% \else\ifdoublesided
+% \findtwopassdata{#1}{\number#2}%
+% \ifconditional\twopassdatafound
+% \realpagestateno\twopassdata\relax
+% \ifnum\twopassdata=\realpageno \else
+% \pagestatemismatchtrue
+% \fi
+% \ifodd\twopassdata\relax
+% \syst_twopass_set_found
+% \else
+% \syst_twopass_set_not_found
+% \fi
+% \else
+% \ifodd\realpageno\relax
+% \syst_twopass_set_found
+% \else
+% \syst_twopass_set_not_found
+% \fi
+% \fi
+% \else
+% \syst_twopass_set_found
+% \fi\fi
+% \else
+% \ifodd\realpagestateno\relax
+% \syst_twopass_set_found
+% \else
+% \syst_twopass_set_not_found
+% \fi
+% \fi
+% \ifconditional\twopassdatafound
+% \expandafter\firstoftwoarguments
+% \else
+% \expandafter\secondoftwoarguments
+% \fi}
+
+% \def\doifforcedrightpagestateelse#1#2%
+% {\ifcase\frozenpagestate
+% \pagestatemismatchfalse
+% \realpagestateno\realfolio
+% \findtwopassdata{#1}{\number#2}%
+% \ifconditional\twopassdatafound
+% \realpagestateno\twopassdata\relax
+% \ifnum\twopassdata=\realpageno \else
+% \pagestatemismatchtrue
+% \fi
+% \ifodd\twopassdata\relax
+% \syst_twopass_set_found
+% \else
+% \syst_twopass_set_not_found
+% \fi
+% \else
+% \ifodd\realpageno\relax
+% \syst_twopass_set_found
+% \else
+% \syst_twopass_set_not_found
+% \fi
+% \fi
+% \else
+% \ifodd\realpagestateno\relax
+% \syst_twopass_set_found
+% \else
+% \syst_twopass_set_not_found
+% \fi
+% \fi
+% \ifconditional\twopassdatafound
+% \expandafter\firstoftwoarguments
+% \else
+% \expandafter\secondoftwoarguments
+% \fi}
+
+\let\m_spac_pagestates_realpage\empty
+
+\newconditional\c_spac_pagestates_found
+
\def\doifrightpagestateelse#1#2% not expandable !
{\ifcase\frozenpagestate
\pagestatemismatchfalse
@@ -52,43 +145,43 @@
\ifinpagebody
\ifdoublesided
\ifodd\realpageno\relax
- \syst_twopass_set_found
+ \settrue\c_spac_pagestates_found
\else
- \syst_twopass_set_not_found
+ \setfalse\c_spac_pagestates_found
\fi
\else
- \syst_twopass_set_found
+ \settrue\c_spac_pagestates_found
\fi
\else\ifdoublesided
- \findtwopassdata{#1}{\number#2}%
- \ifconditional\twopassdatafound
- \realpagestateno\twopassdata\relax
- \ifnum\twopassdata=\realpageno \else
- \pagestatemismatchtrue
- \fi
- \ifodd\twopassdata\relax
- \syst_twopass_set_found
+ \edef\m_spac_pagestates_realpage{\pagestaterealpage{#1}{\number#2}}%
+ \ifx\m_spac_pagestates_realpage\empty
+ \ifodd\realpageno\relax
+ \settrue\c_spac_pagestates_found
\else
- \syst_twopass_set_not_found
+ \setfalse\c_spac_pagestates_found
\fi
\else
- \ifodd\realpageno\relax
- \syst_twopass_set_found
+ \realpagestateno\m_spac_pagestates_realpage\relax
+ \ifnum\realpagestateno=\realpageno \else
+ \pagestatemismatchtrue
+ \fi
+ \ifodd\realpagestateno\relax
+ \settrue\c_spac_pagestates_found
\else
- \syst_twopass_set_not_found
+ \setfalse\c_spac_pagestates_found
\fi
\fi
\else
- \syst_twopass_set_found
+ \settrue\c_spac_pagestates_found
\fi\fi
\else
\ifodd\realpagestateno\relax
- \syst_twopass_set_found
+ \settrue\c_spac_pagestates_found
\else
- \syst_twopass_set_not_found
+ \setfalse\c_spac_pagestates_found
\fi
\fi
- \ifconditional\twopassdatafound
+ \ifconditional\c_spac_pagestates_found
\expandafter\firstoftwoarguments
\else
\expandafter\secondoftwoarguments
@@ -98,32 +191,32 @@
{\ifcase\frozenpagestate
\pagestatemismatchfalse
\realpagestateno\realfolio
- \findtwopassdata{#1}{\number#2}%
- \ifconditional\twopassdatafound
- \realpagestateno\twopassdata\relax
- \ifnum\twopassdata=\realpageno \else
- \pagestatemismatchtrue
- \fi
- \ifodd\twopassdata\relax
- \syst_twopass_set_found
+ \edef\m_spac_pagestates_realpage{\pagestaterealpage{#1}{\number#2}}%
+ \ifx\m_spac_pagestates_realpage\empty
+ \ifodd\realpageno\relax
+ \settrue\c_spac_pagestates_found
\else
- \syst_twopass_set_not_found
+ \setfalse\c_spac_pagestates_found
\fi
\else
- \ifodd\realpageno\relax
- \syst_twopass_set_found
+ \realpagestateno\m_spac_pagestates_realpage\relax
+ \ifnum\realpagestateno=\realpageno \else
+ \pagestatemismatchtrue
+ \fi
+ \ifodd\realpagestateno\relax
+ \settrue\c_spac_pagestates_found
\else
- \syst_twopass_set_not_found
+ \setfalse\c_spac_pagestates_found
\fi
\fi
\else
\ifodd\realpagestateno\relax
- \syst_twopass_set_found
+ \settrue\c_spac_pagestates_found
\else
- \syst_twopass_set_not_found
+ \setfalse\c_spac_pagestates_found
\fi
\fi
- \ifconditional\twopassdatafound
+ \ifconditional\c_spac_pagestates_found
\expandafter\firstoftwoarguments
\else
\expandafter\secondoftwoarguments
@@ -134,73 +227,49 @@
% we can make more of these on top, but how to deal with mixed frozen states
-\definetwopasslist\s!paragraph \newcount\nofraggedparagraphs
+% \dorecurse{500}{\dontleavehmode\signalrightpage\doifrightpageelse{right}{left}\par} % given doublesided
-\def\signalrightpage {\dotrackpagestate \s!paragraph\nofraggedparagraphs}
-\def\doifrightpageelse{\doifrightpagestateelse\s!paragraph\nofraggedparagraphs}
+% \definetwopasslist\s!paragraph
+
+\newcount\nofraggedparagraphs
-% no longer used
-%
-% \newcount\pagesignallevel
-%
-% \unexpanded\def\startsignalrightpage % one may do a \postsignalrightplace
-% {\advance\pagesignallevel\plusone
-% \presignalrightpage
-% \let\signalrightpage\relax
-% \let\presignalrightpage\relax
-% \let\startsignalrightpage\relax
-% \doifrightpageelse\donothing\donothing
-% \freezepagestate}
-%
-% \unexpanded\def\stopsignalrightpage
-% {\ifcase\pagesignallevel\or\postsignalrightpage\fi
-% \advance\pagesignallevel\minusone}
-%
-% \ifx\swapmargins\undefined \let\swapmargins\undefined \fi % todo
-%
-% \def\doifswappedrightpageelse#1#2% alleen in box construction !
-% {\doifrightpageelse
-% {#1}
-% {\scratchcounter\realpageno
-% \realpageno\realpagestateno\relax
-% \swapmargins
-% \realpageno\scratchcounter
-% #2}}
-%
-% \newbox\signaledrightpage % this way we can avoid interference, i.e. postpone placement
-%
-% \def\presignalrightpage {\global\setbox\signaledrightpage\hbox{\signalrightpage}}
-% \def\postsignalrightpage{\ifvoid\signaledrightpage\else\box\signaledrightpage\fi}
-%
-% % The next feature is is used in:
-% %
-% % \definenumber[test][way=bypage]
-% %
-% % \def\Test
-% % {\incrementnumber[test]\rawnumber[test]/%
-% % \incrementnumber[test]\rawnumber[test]/%
-% % \incrementnumber[test]\rawnumber[test]\space
-% % \checkpagechange{oeps}\changedpage{oeps}\space
-% % \ifpagechanged TRUE\else FALSE\fi}
-% %
-% % \Test\page \Test\par \Test\page \Test\par \Test\page \Test\page
+\definepagestate[\s!paragraph]
+
+\def\signalrightpage {\dotrackpagestate \s!paragraph\nofraggedparagraphs} % use \dontleavehmode if needed
+\def\doifrightpageelse{\doifrightpagestateelse\s!paragraph\nofraggedparagraphs}
\installcorenamespace{pagechanges}
\newif\ifpagechanged \let\lastchangedpage\empty
+% \def\spac_pagechanges_check#1#2#3%
+% {\pagechangedfalse
+% \doforcedtrackpagestate{#2}{#3}%
+% \findtwopassdata{#2}{\number#3}%
+% \ifconditional\twopassdatafound
+% \ifnum\twopassdata>0\getvalue{\??pagechanges#2:#1}\relax
+% \pagechangedtrue
+% \fi
+% \fi
+% \ifpagechanged
+% \letgvalue{\??pagechanges#2:#1}\twopassdata
+% \globallet\lastchangedpage\twopassdata
+% \else
+% \globallet\lastchangedpage\realfolio
+% \fi}
+
\def\spac_pagechanges_check#1#2#3%
{\pagechangedfalse
\doforcedtrackpagestate{#2}{#3}%
- \findtwopassdata{#2}{\number#3}%
- \ifconditional\twopassdatafound
- \ifnum\twopassdata>0\getvalue{\??pagechanges#2:#1}\relax
+ \edef\m_spac_pagestates_realpage{\pagestaterealpage{#2}{\number#3}}%
+ \ifx\m_spac_pagestates_realpage\empty \else
+ \ifnum\m_spac_pagestates_realpage>0\getvalue{\??pagechanges#2:#1}\relax
\pagechangedtrue
\fi
\fi
\ifpagechanged
- \letgvalue{\??pagechanges#2:#1}\twopassdata
- \globallet\lastchangedpage\twopassdata
+ \letgvalue{\??pagechanges#2:#1}\m_spac_pagestates_realpage
+ \globallet\lastchangedpage\m_spac_pagestates_realpage
\else
\globallet\lastchangedpage\realfolio
\fi}
diff --git a/tex/context/base/status-files.pdf b/tex/context/base/status-files.pdf
index ff117e85e..c022049d5 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 e15816a17..850e11e23 100644
--- a/tex/context/base/status-lua.pdf
+++ b/tex/context/base/status-lua.pdf
Binary files differ
diff --git a/tex/context/base/status-mkiv.lua b/tex/context/base/status-mkiv.lua
index 86af98fbd..5c54b079f 100644
--- a/tex/context/base/status-mkiv.lua
+++ b/tex/context/base/status-mkiv.lua
@@ -385,6 +385,11 @@ return {
comment = "maybe rename to core-two",
},
{
+ filename = "core-dat",
+ marktype = "mkiv",
+ status = "okay",
+ },
+ {
filename = "colo-ini",
marktype = "mkiv",
status = "okay",
diff --git a/tex/context/base/strc-flt.mkvi b/tex/context/base/strc-flt.mkvi
index ba1f4e29c..05cfa40e3 100644
--- a/tex/context/base/strc-flt.mkvi
+++ b/tex/context/base/strc-flt.mkvi
@@ -355,26 +355,66 @@
\fi
\fi}
-% the tricky part of getting float related two pass data is
+% The tricky part of getting float related two pass data is
% that we should fetch is early but can only save it with
% the composed float box; this determines the order: get it
-% before saving it
+% before saving it.
-\definetwopasslist{\s!float\s!data} \newcounter\noffloatdata
+% We had this:
+%
+% \definetwopasslist{\s!float\s!data} \newcounter\noffloatdata
+%
+% \let\strc_float_realpage\realpageno % used for odd/even determination, can be combined with nodelocation
+%
+% \def\strc_float_save_data % \expanded ... will change in mkiv
+% {\doglobal\increment\noffloatdata
+% \lazysavetaggedtwopassdata{\s!float\s!data}{\noffloatdata}{\noffloatpages}{\noexpand\realfolio}}% later {}{}{}{} and \getfirst...
+%
+% \def\strc_float_load_data % precedes save !
+% {\doglobal\increment\noffloatpages
+% \findtwopassdata{\s!float\s!data}{\noffloatpages}%
+% \ifconditional\twopassdatafound
+% \globallet\strc_float_realpage\twopassdata
+% \else
+% \globallet\strc_float_realpage\realpageno % \realfolio
+% \fi}
+
+%D We can do this ...
+%D
+%D \starttyping
+%D \newcount\c_strc_floats_n
+%D
+%D \definedataset[\s!float][\c!delay=\v!yes]
+%D
+%D \let\strc_float_realpage\realpageno
+%D
+%D \def\strc_float_save_data
+%D {\setdataset[\s!float][\number\c_strc_floats_n][]}
+%D
+%D \def\strc_float_load_data % precedes save !
+%D {\global\advance\c_strc_floats_n\plusone
+%D \xdef\strc_float_realpage{\datasetvariable\s!float{\number\c_strc_floats_n}\s!page}%
+%D \ifx\strc_float_realpage\empty
+%D \globallet\strc_float_realpage\realpageno % \realfolio
+%D \fi}
+%D \stoptyping
+%D
+%D ... but this is more efficient:
-\let\twopassfloatdata\realpageno % used for odd/even determination, can be combined with nodelocation
+\definepagestate[\s!float][\c!delay=\v!yes]
-\def\dosavefloatdata % \expanded ... will change in mkiv
- {\doglobal\increment\noffloatdata
- \lazysavetaggedtwopassdata{\s!float\s!data}{\noffloatdata}{\noffloatpages}{\noexpand\realfolio}}% later {}{}{}{} and \getfirst...
+\newcount\c_strc_floats_n
-\def\dogetfloatdata % precedes save !
- {\doglobal\increment\noffloatpages
- \findtwopassdata{\s!float\s!data}{\noffloatpages}%
- \ifconditional\twopassdatafound
- \globallet\twopassfloatdata\twopassdata
- \else
- \globallet\twopassfloatdata\realpageno % \realfolio
+\let\strc_float_realpage\realpageno
+
+\def\strc_float_save_data
+ {\setpagestate[\s!float][\number\c_strc_floats_n]}
+
+\def\strc_float_load_data % precedes save !
+ {\global\advance\c_strc_floats_n\plusone
+ \xdef\strc_float_realpage{\pagestaterealpage\s!float{\number\c_strc_floats_n}}%
+ \ifx\strc_float_realpage\empty
+ \globallet\strc_float_realpage\realpageno % \realfolio
\fi}
%D test case:
@@ -807,7 +847,7 @@
\appendtoks
\everyinsidefloat\emptytoks % in case it's called earlier
- \dogetfloatdata
+ \strc_float_load_data
\to \everyinsidefloat
\def\doifrightpagefloatelse
@@ -822,7 +862,7 @@
\fi}
\def\doifoddfloatpageelse
- {\ifodd\purenumber\twopassfloatdata\space
+ {\ifodd\purenumber\strc_float_realpage\space
\expandafter\firstoftwoarguments
\else
\expandafter\secondoftwoarguments
@@ -1816,7 +1856,7 @@
\fi
\strc_floats_set_local_dimensions
\global\advance\totalnoffloats\plusone
- \setbox\floatbox\hbox{\dosavefloatdata\box\floatbox}% still needed? we will do renumbering differently
+ \setbox\floatbox\hbox{\strc_float_save_data\box\floatbox}% still needed? we will do renumbering differently
\global\floatheight\htdp\floatbox
\global\floatwidth\wd\floatbox
\doifnotinset\v!margin\floatlocation % gaat namelijk nog fout
diff --git a/tex/context/base/strc-not.mkvi b/tex/context/base/strc-not.mkvi
index f8f25900f..5f1f041e3 100644
--- a/tex/context/base/strc-not.mkvi
+++ b/tex/context/base/strc-not.mkvi
@@ -332,8 +332,9 @@
\c!rulethickness=\linewidth,
\c!frame=\v!off,
\c!distance=.125em, % in the text between symbols
+ % \c!textseparator={,}, % optional separator
\c!columndistance=1em,
-% \c!margindistance=.5em,
+ % \c!margindistance=.5em,
\c!align=, % also use instead of \c!tolerance
\c!split=\v!tolerant,
\c!width=\makeupwidth, % \ifdim\hsize<\makeupwidth\hsize\else\makeupwidth\fi
@@ -608,7 +609,8 @@
{\removeunwantedspaces
\doifitalicelse\/\donothing % Charles IV \footnote{the fourth}
\ifdim\lastkern=\notesignal
- \kern\noteparameter\c!distance % yes or no note font? or main text
+ % \kern\noteparameter\c!distance % yes or no note font? or main text
+ \strc_notes_inject_separator
\fi
\nobreak
\begingroup
@@ -632,12 +634,29 @@
{\removeunwantedspaces
\doifitalicelse\/\donothing % Charles IV \footnote{the fourth}
\ifdim\lastkern=\notesignal
- \kern\noteparameter\c!distance % yes or no note font? or main text
+ % \kern\noteparameter\c!distance % yes or no note font? or main text
+ \strc_notes_inject_separator
\fi
\nobreak
\hbox to .5em{}%
\globallet\lastnotesymbol\relax}
+\unexpanded\def\strc_notes_inject_separator % patch by WS due to request on list
+ {\edef\p_textseparator{\noteparameter\c!textseparator}%
+ \ifx\p_textseparator\empty
+ \kern\noteparameter\c!distance
+ \else
+ % skip or kern
+ \nobreak
+ \hbox\bgroup
+ \strc_notes_interaction_check_inline
+ \strc_notes_set_style_color_inline\c!textstyle\c!textcolor
+ \noteparameter\c!textcommand{\p_textseparator}%
+ \kern\noteparameter\c!distance
+ \egroup
+ \nobreak
+ \fi}
+
% this needs a further cleanup ... soon as it's a slow mechanism
%
% -- set breakpoint in descriptions
diff --git a/tex/context/base/trac-log.lua b/tex/context/base/trac-log.lua
index c1d890276..44de8ebe6 100644
--- a/tex/context/base/trac-log.lua
+++ b/tex/context/base/trac-log.lua
@@ -536,6 +536,13 @@ local function reportbanner(t)
end
end
+local function reportversion(t)
+ local banner = t.banner
+ if banner then
+ t.report(banner)
+ end
+end
+
local function reporthelp(t,...)
local helpinfo = t.helpinfo
if type(helpinfo) == "string" then
@@ -562,6 +569,7 @@ function logs.application(t)
t.report = logs.reporter(t.name)
t.help = function(...) reportbanner(t) ; reporthelp(t,...) ; reportinfo(t) end
t.identify = function() reportbanner(t) end
+ t.version = function() reportversion(t) end
return t
end
diff --git a/tex/generic/context/luatex/luatex-fonts-merged.lua b/tex/generic/context/luatex/luatex-fonts-merged.lua
index df477dd17..7808e2cea 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 : 04/14/12 00:10:51
+-- merge date : 04/17/12 22:37:22
do -- begin closure to overcome local limits and interference