summaryrefslogtreecommitdiff
path: root/tex
diff options
context:
space:
mode:
authorMarius <mariausol@gmail.com>2012-04-20 00:40:13 +0300
committerMarius <mariausol@gmail.com>2012-04-20 00:40:13 +0300
commit959400a677b3eb6ff6513a750be6dde943e62c36 (patch)
tree91e6f0884f2b018acd879276f1c976440b7c835b /tex
parent0756a263c41de5279fef717c5b9cca9909308c3a (diff)
downloadcontext-959400a677b3eb6ff6513a750be6dde943e62c36.tar.gz
beta 2012.04.19 23:18
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 -> 4074 bytes
-rw-r--r--tex/context/base/context-version.pngbin106054 -> 105915 bytes
-rw-r--r--tex/context/base/context.mkii2
-rw-r--r--tex/context/base/context.mkiv2
-rw-r--r--tex/context/base/core-dat.lua63
-rw-r--r--tex/context/base/lxml-tab.lua14
-rw-r--r--tex/context/base/mult-sys.mkiv1
-rw-r--r--tex/context/base/page-imp.mkiv12
-rw-r--r--tex/context/base/status-files.pdfbin24323 -> 24321 bytes
-rw-r--r--tex/context/base/status-lua.pdfbin173014 -> 173036 bytes
-rw-r--r--tex/generic/context/luatex/luatex-fonts-merged.lua2
13 files changed, 77 insertions, 23 deletions
diff --git a/tex/context/base/cont-new.mkii b/tex/context/base/cont-new.mkii
index bd6a20f7a..494b78b13 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.17 22:37}
+\newcontextversion{2012.04.19 23:18}
%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 8ea0045c6..3cd207ede 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.17 22:37}
+\newcontextversion{2012.04.19 23:18}
%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 7d6dac649..14d3139ce 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 47f40fdc4..a150ec151 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 cf3bd5467..63c2dc542 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.17 22:37}
+\edef\contextversion{2012.04.19 23:18}
%D For those who want to use this:
diff --git a/tex/context/base/context.mkiv b/tex/context/base/context.mkiv
index 2c6813941..dd5905ab0 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.17 22:37}
+\edef\contextversion{2012.04.19 23:18}
%D For those who want to use this:
diff --git a/tex/context/base/core-dat.lua b/tex/context/base/core-dat.lua
index eab238704..2317eb759 100644
--- a/tex/context/base/core-dat.lua
+++ b/tex/context/base/core-dat.lua
@@ -15,6 +15,12 @@ local tonumber = tonumber
local context, commands = context, commands
+local trace_datasets = false trackers.register("job.datasets" , function(v) trace_datasets = v end)
+local trace_pagestates = false trackers.register("job.pagestates", function(v) trace_pagestates = v end)
+
+local report_dataset = logs.reporter("dataset")
+local report_pagestate = logs.reporter("pagestate")
+
local allocate = utilities.storage.allocate
local settings_to_hash = utilities.parsers.settings_to_hash
local format = string.format
@@ -77,6 +83,11 @@ local function setdata(settings)
data.index = index
data.order = index
data.realpage = texcount.realpageno
+ if trace_datasets then
+ report_dataset("delayed: name %s, tag %s, index %s",name,tag,index)
+ end
+ elseif trace_datasets then
+ report_dataset("immediate: name %s, tag %s",name,tag)
end
return name, tag, data
end
@@ -86,22 +97,33 @@ datasets.setdata = setdata
function datasets.extend(name,tag)
local set = sets[name]
local order = set.order + 1
+ local realpage = texcount.realpageno
set.order = order
local t = tobesaved[name][tag]
- t.realpage = texcount.realpageno
+ t.realpage = realpage
t.order = order
+ if trace_datasets then
+ report_dataset("flushed: name %s, tag %s, page %s, index %s, order",name,tag,t.index or 0,order,realpage)
+ end
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
+ if t then
+ t = t[tag] or t[tonumber(tag)]
+ if t then
+ if key then
+ return t[key] or default
+ else
+ return t
+ end
+ elseif trace_datasets then
+ report_dataset("unknown: name %s, tag %s",name,tag)
+ end
+ elseif trace_datasets then
+ report_dataset("unknown: name %s",name)
end
+ return default
end
function commands.setdataset(settings)
@@ -162,21 +184,38 @@ local function setstate(settings)
else
tag = tonumber(tag) or tag -- autonumber saves keys
end
- local data = texcount.realpageno
+ local realpage = texcount.realpageno
+ local data = realpage
list[tag] = data
+ if trace_pagestates then
+ report_pagestate("setting: name %s, tag %s, preset %s",name,tag,realpage)
+ end
return name, tag, data
end
pagestates.setstate = setstate
function pagestates.extend(name,tag)
- tobesaved[name][tag] = texcount.realpageno
+ local realpage = texcount.realpageno
+ if trace_pagestates then
+ report_pagestate("synchronizing: name %s, tag %s, preset %s",name,tag,realpage)
+ end
+ tobesaved[name][tag] = realpage
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)
+ if t then
+ t = t[tag] or t[tonumber(tag)]
+ if t then
+ return tonumber(t or default)
+ elseif trace_pagestates then
+ report_pagestate("unknown: name %s, tag %s",name,tag)
+ end
+ elseif trace_pagestates then
+ report_pagestate("unknown: name %s",name)
+ end
+ return default
end
function commands.setpagestate(settings)
diff --git a/tex/context/base/lxml-tab.lua b/tex/context/base/lxml-tab.lua
index 789f454ae..0a43f4352 100644
--- a/tex/context/base/lxml-tab.lua
+++ b/tex/context/base/lxml-tab.lua
@@ -675,7 +675,7 @@ local grammar_unparsed_text = P { "preamble",
-- maybe we will add settings to result as well
-local function xmlconvert(data, settings)
+local function _xmlconvert_(data, settings)
settings = settings or { } -- no_root strip_cm_and_dt given_entities parent_root error_handler
--
strip = settings.strip_cm_and_dt
@@ -772,6 +772,18 @@ local function xmlconvert(data, settings)
return result
end
+-- Because we can have a crash (stack issues) with faulty xml, we wrap this one
+-- in a protector:
+
+function xmlconvert(data,settings)
+ local ok, result = pcall(function() return _xmlconvert_(data,settings) end)
+ if ok then
+ return result
+ else
+ return _xmlconvert_("")
+ end
+end
+
xml.convert = xmlconvert
function xml.inheritedconvert(data,xmldata) -- xmldata is parent
diff --git a/tex/context/base/mult-sys.mkiv b/tex/context/base/mult-sys.mkiv
index 112a6c3d5..d3823ea57 100644
--- a/tex/context/base/mult-sys.mkiv
+++ b/tex/context/base/mult-sys.mkiv
@@ -531,7 +531,6 @@
\definesystemvariable {pn} % PaginaNummer
\definesystemvariable {pr} % PRogrammas
\definesystemvariable {ps} % PoSitioneren
-\definesystemvariable {pt} % PageshifT
\definesystemvariable {px} % Parallel
\definesystemvariable {py} % PropertYs
\definesystemvariable {pv} % PublicationVariable
diff --git a/tex/context/base/page-imp.mkiv b/tex/context/base/page-imp.mkiv
index 626d9042f..71c30a7e1 100644
--- a/tex/context/base/page-imp.mkiv
+++ b/tex/context/base/page-imp.mkiv
@@ -1193,11 +1193,15 @@
% #1=name #2=horizontal|vertical #3=shiftlist
+% this will move to lua
+
+\installcorenamespace {pageshift}
+
\unexpanded\def\definepageshift
{\dotripleargument\page_boxes_define_shift}
\def\page_boxes_define_shift[#1][#2][#3]%
- {\setvalue{\??pt#2:#1}{#3}}
+ {\setvalue{\??pageshift#2:#1}{#3}}
\let\page_boxes_h_shifts\empty
\let\page_boxes_v_shifts\empty
@@ -1221,7 +1225,7 @@
\getfromcommacommand[#2][#3]%
\fi
\ifx\commalistelement\empty \else
- #1\commalistelement
+ #1\commalistelement\relax % the relax is really needed as there is an \if later on
\fi
\fi}
@@ -1252,8 +1256,8 @@
\def\page_boxes_setup_shift[#1][#2][#3]% page|paper horizontal vertical
{\ifthirdargument % paper=arrange
- \edef\page_boxes_h_shifts{\ifcsname\??pt\v!horizontal:#2\endcsname\csname\??pt\v!horizontal:#2\endcsname\fi}%
- \edef\page_boxes_v_shifts{\ifcsname\??pt\v!vertical :#3\endcsname\csname\??pt\v!vertical :#3\endcsname\fi}%
+ \edef\page_boxes_h_shifts{\ifcsname\??pageshift\v!horizontal:#2\endcsname\csname\??pageshift\v!horizontal:#2\endcsname\fi}%
+ \edef\page_boxes_v_shifts{\ifcsname\??pageshift\v!vertical :#3\endcsname\csname\??pageshift\v!vertical :#3\endcsname\fi}%
\doifelse{#1}\v!page {\let\page_boxes_apply_shift_print\page_boxes_apply_shift}{\let\page_boxes_apply_shift_print\gobbleoneargument}%
\doifelse{#1}\v!paper{\let\page_boxes_apply_shift_paper\page_boxes_apply_shift}{\let\page_boxes_apply_shift_paper\gobbleoneargument}%
\else\ifsecondargument
diff --git a/tex/context/base/status-files.pdf b/tex/context/base/status-files.pdf
index c022049d5..060bb72f6 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 850e11e23..10850803d 100644
--- a/tex/context/base/status-lua.pdf
+++ b/tex/context/base/status-lua.pdf
Binary files differ
diff --git a/tex/generic/context/luatex/luatex-fonts-merged.lua b/tex/generic/context/luatex/luatex-fonts-merged.lua
index 7808e2cea..28b06e1dc 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/17/12 22:37:22
+-- merge date : 04/19/12 23:18:52
do -- begin closure to overcome local limits and interference