summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorContext Git Mirror Bot <phg42.2a@gmail.com>2016-01-13 16:15:06 +0100
committerContext Git Mirror Bot <phg42.2a@gmail.com>2016-01-13 16:15:06 +0100
commiteb827e1f7e0b7c69fb4f5ac106be63e346f06de5 (patch)
tree6096ea095185477f83f4c53aefe7fc471c68a7bf
parentc813b4d16dd51bd181736729517ad422980e3fc6 (diff)
downloadcontext-eb827e1f7e0b7c69fb4f5ac106be63e346f06de5.tar.gz
2016-01-13 15:12:00
-rw-r--r--scripts/context/lua/mtx-context.lua6
-rw-r--r--tex/context/base/context-version.pdfbin4170 -> 4168 bytes
-rw-r--r--tex/context/base/mkiv/cont-new.mkiv2
-rw-r--r--tex/context/base/mkiv/context.mkiv2
-rw-r--r--tex/context/base/mkiv/font-map.lua10
-rw-r--r--tex/context/base/mkiv/grph-inc.lua26
-rw-r--r--tex/context/base/mkiv/grph-inc.mkiv17
-rw-r--r--tex/context/base/mkiv/pack-obj.lua11
-rw-r--r--tex/context/base/mkiv/pack-obj.mkiv2
-rw-r--r--tex/context/base/mkiv/status-files.pdfbin9084 -> 9080 bytes
-rw-r--r--tex/context/base/mkiv/status-lua.pdfbin258685 -> 258716 bytes
-rw-r--r--tex/generic/context/luatex/luatex-fonts-merged.lua10
12 files changed, 57 insertions, 29 deletions
diff --git a/scripts/context/lua/mtx-context.lua b/scripts/context/lua/mtx-context.lua
index 41c7d95f2..c43e5a98c 100644
--- a/scripts/context/lua/mtx-context.lua
+++ b/scripts/context/lua/mtx-context.lua
@@ -284,7 +284,7 @@ end
local f_tempfile = formatters["%s-%s-%02d.tmp"]
-local function backup(run,kind,filename)
+local function backup(jobname,run,kind,filename)
if run == 1 then
for i=1,10 do
local tmpname = f_tempfile(jobname,kind,i)
@@ -307,7 +307,7 @@ local function multipass_copyluafile(jobname,run)
local tuaname, tucname = jobname..".tua", jobname..".tuc"
if validfile(tuaname) then
if run then
- backup(run,"tuc",tucname)
+ backup(jobname,run,"tuc",tucname)
report("copying %a into %a",tuaname,tucname)
report()
end
@@ -320,7 +320,7 @@ local function multipass_copylogfile(jobname,run)
local logname = jobname..".log"
if validfile(logname) then
if run then
- backup(run,"log",logname)
+ backup(jobname,run,"log",logname)
report()
end
end
diff --git a/tex/context/base/context-version.pdf b/tex/context/base/context-version.pdf
index 88adbe0e3..9a9ee1f36 100644
--- a/tex/context/base/context-version.pdf
+++ b/tex/context/base/context-version.pdf
Binary files differ
diff --git a/tex/context/base/mkiv/cont-new.mkiv b/tex/context/base/mkiv/cont-new.mkiv
index 4e779764e..b1cd92589 100644
--- a/tex/context/base/mkiv/cont-new.mkiv
+++ b/tex/context/base/mkiv/cont-new.mkiv
@@ -11,7 +11,7 @@
%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
%C details.
-\newcontextversion{2016.01.13 09:42}
+\newcontextversion{2016.01.13 15:10}
%D This file is loaded at runtime, thereby providing an excellent place for
%D hacks, patches, extensions and new features.
diff --git a/tex/context/base/mkiv/context.mkiv b/tex/context/base/mkiv/context.mkiv
index 36cd352e7..98172700f 100644
--- a/tex/context/base/mkiv/context.mkiv
+++ b/tex/context/base/mkiv/context.mkiv
@@ -39,7 +39,7 @@
%D up and the dependencies are more consistent.
\edef\contextformat {\jobname}
-\edef\contextversion{2016.01.13 09:42}
+\edef\contextversion{2016.01.13 15:10}
\edef\contextkind {beta}
%D For those who want to use this:
diff --git a/tex/context/base/mkiv/font-map.lua b/tex/context/base/mkiv/font-map.lua
index dc3f499ab..78e5435a5 100644
--- a/tex/context/base/mkiv/font-map.lua
+++ b/tex/context/base/mkiv/font-map.lua
@@ -82,7 +82,7 @@ local f_double = formatters["%04X%04X"]
-- local s
-- if unicode < 0x10000 then
-- s = f_single(unicode)
--- elseif unicode < 0x1FFFFFFFFF then
+-- elseif unicode < 0x1FFFFFFF then
-- s = f_double(floor(unicode/1024),unicode%1024+0xDC00)
-- else
-- s = false
@@ -142,7 +142,7 @@ local f_double = formatters["%04X%04X"]
local function tounicode16(unicode,name)
if unicode < 0x10000 then
return f_single(unicode)
- elseif unicode < 0x1FFFFFFFFF then
+ elseif unicode < 0x1FFFFFFFF then
return f_double(floor(unicode/1024),unicode%1024+0xDC00)
else
report_fonts("can't convert %a in %a into tounicode",unicode,name)
@@ -155,7 +155,7 @@ local function tounicode16sequence(unicodes,name)
local u = unicodes[l]
if u < 0x10000 then
t[l] = f_single(u)
- elseif unicode < 0x1FFFFFFFFF then
+ elseif unicode < 0x1FFFFFFFF then
t[l] = f_double(floor(u/1024),u%1024+0xDC00)
else
report_fonts ("can't convert %a in %a into tounicode",u,name)
@@ -172,7 +172,7 @@ local function tounicode(unicode,name)
local u = unicode[l]
if u < 0x10000 then
t[l] = f_single(u)
- elseif u < 0x1FFFFFFFFF then
+ elseif u < 0x1FFFFFFFF then
t[l] = f_double(floor(u/1024),u%1024+0xDC00)
else
report_fonts ("can't convert %a in %a into tounicode",u,name)
@@ -183,7 +183,7 @@ local function tounicode(unicode,name)
else
if unicode < 0x10000 then
return f_single(unicode)
- elseif unicode < 0x1FFFFFFFFF then
+ elseif unicode < 0x1FFFFFFFF then
return f_double(floor(unicode/1024),unicode%1024+0xDC00)
else
report_fonts("can't convert %a in %a into tounicode",unicode,name)
diff --git a/tex/context/base/mkiv/grph-inc.lua b/tex/context/base/mkiv/grph-inc.lua
index 03557e370..af74efbfa 100644
--- a/tex/context/base/mkiv/grph-inc.lua
+++ b/tex/context/base/mkiv/grph-inc.lua
@@ -132,7 +132,7 @@ function images.check(figure)
report_inclusion("limiting natural dimensions of %a, old %p * %p, new %p * %p",
figure.filename,width,height,figure.width,figure.height)
end
- if width >=maxdimen or height >= maxdimen then
+ if width >= maxdimen or height >= maxdimen then
report_inclusion("image %a is too large (%p,%p), discarding",
figure.filename,width,height)
return false, "dimensions too large"
@@ -582,7 +582,23 @@ local function get(category,tag,default)
end
end
+local function setdimensions(box)
+ local status = lastfiguredata and lastfiguredata.status
+ local used = lastfiguredata and lastfiguredata.used
+ if status and used then
+ local b = texgetbox(box)
+ local w = b.width
+ local h = b.height + b.depth
+ status.width = w
+ status.height = h
+ used.width = w
+ used.height = h
+ status.status = 10
+ end
+end
+
figures.get = get
+figures.set = setdimensions
implement { name = "figurestatus", actions = { get, context }, arguments = { "'status'", "string", "string" } }
implement { name = "figurerequest", actions = { get, context }, arguments = { "'request'", "string", "string" } }
@@ -592,6 +608,8 @@ implement { name = "figurefilepath", actions = { get, file.dirname, context },
implement { name = "figurefilename", actions = { get, file.nameonly, context }, arguments = { "'used'", "'fullname'" } }
implement { name = "figurefiletype", actions = { get, file.extname, context }, arguments = { "'used'", "'fullname'" } }
+implement { name = "figuresetdimensions", actions = setdimensions, arguments = { "integer" } }
+
-- todo: local path or cache path
local function forbiddenname(filename)
@@ -1345,13 +1363,13 @@ local function checkers_nongeneric(data,command) -- todo: macros and context.*
local hash = name
if dr.object then
-- hm, bugged ... waiting for an xform interface
- if not job.objects.get("FIG::"..hash) then
+ if not objects.data["FIG"][hash] then
if type(command) == "function" then
command()
end
- context.dosetfigureobject(hash)
+ context.dosetfigureobject("FIG",hash)
end
- context.doboxfigureobject(hash)
+ context.doboxfigureobject("FIG",hash)
elseif type(command) == "function" then
command()
end
diff --git a/tex/context/base/mkiv/grph-inc.mkiv b/tex/context/base/mkiv/grph-inc.mkiv
index 47274a64e..b7923d16e 100644
--- a/tex/context/base/mkiv/grph-inc.mkiv
+++ b/tex/context/base/mkiv/grph-inc.mkiv
@@ -543,15 +543,15 @@
%D Internal graphics are handled at the \TEX\ end:
\def\grph_include_process_tex#1%
- {\global\setbox\foundexternalfigure\vbox\framed % no \vpack
+ {\framed
[\c!strut=\v!no,\c!align=\v!normal,\c!frame=\v!off,
\c!offset=\v!overlay,\c!width=\v!fit,\c!height=\v!fit]
{\blank[\v!disable]#1\endgraf\removelastskip}} % disable should stay here!
% used al lua end:
-\unexpanded\def\docheckfigurebuffer #1{\grph_include_process_tex{\getbuffer[#1]}}
-\unexpanded\def\docheckfiguretex #1{\grph_include_process_tex{\input{#1}}}
+\unexpanded\def\docheckfigurebuffer #1{\global\setbox\foundexternalfigure\vpack{\grph_include_process_tex{\getbuffer[#1]}}}
+\unexpanded\def\docheckfiguretex #1{\global\setbox\foundexternalfigure\vpack{\grph_include_process_tex{\input{#1}}}}
\unexpanded\def\docheckfigurecld #1{\global\setbox\foundexternalfigure\vbox {\cldprocessfile{#1}}}
\unexpanded\def\docheckfiguremps #1{\global\setbox\foundexternalfigure\vpack{\convertMPtoPDF{#1}11}}
\unexpanded\def\docheckfiguremprun #1#2{\global\setbox\foundexternalfigure\vpack{\useMPrun{#1}{#2}}}
@@ -664,13 +664,14 @@
\externalfigure[#1][#2,\c!display=,\c!mask=,\c!object=\v!no]%
\stopnointerference}
-% Helpers (will be replaced when xforms are accessible at the lua end)
+% Helpers will be replaced when xforms are accessible at the lua end but then
+% we need to do the object offset there too.
-\unexpanded\def\dosetfigureobject#1%
- {\setobject{FIG}{#1}\vpack{\box\foundexternalfigure}}
+\unexpanded\def\dosetfigureobject#1#2%
+ {\setobject{#1}{#2}\vpack{\box\foundexternalfigure}}
-\unexpanded\def\doboxfigureobject#1%
- {\global\setbox\foundexternalfigure\vpack{\getobject{FIG}{#1}}} % probably one vbox too many
+\unexpanded\def\doboxfigureobject#1#2%
+ {\global\setbox\foundexternalfigure\vpack{\getobject{#1}{#2}}} % probably one vbox too many
% Figure bases
diff --git a/tex/context/base/mkiv/pack-obj.lua b/tex/context/base/mkiv/pack-obj.lua
index e056cb85a..8a1af2b70 100644
--- a/tex/context/base/mkiv/pack-obj.lua
+++ b/tex/context/base/mkiv/pack-obj.lua
@@ -206,7 +206,16 @@ implement {
arguments = { "string", "string" },
actions = function(ns,id)
ctx_doifelse(data[ns][id])
--- ctx_doifelse(objects.reference(ns,id))
+ -- ctx_doifelse(objects.reference(ns,id))
+ end,
+}
+
+implement {
+ name = "doifelseobjectreference",
+ arguments = { "string", "string" },
+ actions = function(ns,id)
+ -- ctx_doifelse(data[ns][id])
+ ctx_doifelse(objects.reference(ns,id))
end,
}
diff --git a/tex/context/base/mkiv/pack-obj.mkiv b/tex/context/base/mkiv/pack-obj.mkiv
index 6a73d1387..23608846d 100644
--- a/tex/context/base/mkiv/pack-obj.mkiv
+++ b/tex/context/base/mkiv/pack-obj.mkiv
@@ -142,7 +142,7 @@
\unexpanded\def\dogetobjectreferencepage {\clf_getobjectreferencepage}
\unexpanded\def\doifelseobjectfound {\clf_doifelseobject}
-\unexpanded\def\doifelseobjectreferencefound{\clf_doifelseobject}
+\unexpanded\def\doifelseobjectreferencefound{\clf_doifelseobjectreference}
\let\doifobjectfoundelse \doifelseobjectfound
\let\doifobjectreferencefoundelse\doifelseobjectreferencefound
diff --git a/tex/context/base/mkiv/status-files.pdf b/tex/context/base/mkiv/status-files.pdf
index 3e70489b1..d3b1d9571 100644
--- a/tex/context/base/mkiv/status-files.pdf
+++ b/tex/context/base/mkiv/status-files.pdf
Binary files differ
diff --git a/tex/context/base/mkiv/status-lua.pdf b/tex/context/base/mkiv/status-lua.pdf
index 1933879fd..a5fac22ed 100644
--- a/tex/context/base/mkiv/status-lua.pdf
+++ b/tex/context/base/mkiv/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 ba5fbc8fc..5f138d407 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 : c:/data/develop/context/sources/luatex-fonts-merged.lua
-- parent file : c:/data/develop/context/sources/luatex-fonts.lua
--- merge date : 01/13/16 09:42:02
+-- merge date : 01/13/16 15:10:24
do -- begin closure to overcome local limits and interference
@@ -5491,7 +5491,7 @@ local f_double=formatters["%04X%04X"]
local function tounicode16(unicode,name)
if unicode<0x10000 then
return f_single(unicode)
- elseif unicode<0x1FFFFFFFFF then
+ elseif unicode<0x1FFFFFFFF then
return f_double(floor(unicode/1024),unicode%1024+0xDC00)
else
report_fonts("can't convert %a in %a into tounicode",unicode,name)
@@ -5503,7 +5503,7 @@ local function tounicode16sequence(unicodes,name)
local u=unicodes[l]
if u<0x10000 then
t[l]=f_single(u)
- elseif unicode<0x1FFFFFFFFF then
+ elseif unicode<0x1FFFFFFFF then
t[l]=f_double(floor(u/1024),u%1024+0xDC00)
else
report_fonts ("can't convert %a in %a into tounicode",u,name)
@@ -5519,7 +5519,7 @@ local function tounicode(unicode,name)
local u=unicode[l]
if u<0x10000 then
t[l]=f_single(u)
- elseif u<0x1FFFFFFFFF then
+ elseif u<0x1FFFFFFFF then
t[l]=f_double(floor(u/1024),u%1024+0xDC00)
else
report_fonts ("can't convert %a in %a into tounicode",u,name)
@@ -5530,7 +5530,7 @@ local function tounicode(unicode,name)
else
if unicode<0x10000 then
return f_single(unicode)
- elseif unicode<0x1FFFFFFFFF then
+ elseif unicode<0x1FFFFFFFF then
return f_double(floor(unicode/1024),unicode%1024+0xDC00)
else
report_fonts("can't convert %a in %a into tounicode",unicode,name)