summaryrefslogtreecommitdiff
path: root/tex
diff options
context:
space:
mode:
authorMarius <mariausol@gmail.com>2013-04-09 12:00:15 +0300
committerMarius <mariausol@gmail.com>2013-04-09 12:00:15 +0300
commit251d12e210b11448060dbc337bf4a4020802d200 (patch)
tree0ab1a414eabc4ca6981b5df49b9dc2e7cf62956f /tex
parent0dba00ac9e85c9a82b8fc67bfd89cd993ff343fc (diff)
downloadcontext-251d12e210b11448060dbc337bf4a4020802d200.tar.gz
beta 2013.04.09 10:45
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.pdfbin4128 -> 4129 bytes
-rw-r--r--tex/context/base/context-version.pngbin40483 -> 40497 bytes
-rw-r--r--tex/context/base/context.mkii2
-rw-r--r--tex/context/base/context.mkiv2
-rw-r--r--tex/context/base/font-mat.mkvi5
-rw-r--r--tex/context/base/mlib-run.lua2
-rw-r--r--tex/context/base/node-pro.lua8
-rw-r--r--tex/context/base/pack-rul.lua74
-rw-r--r--tex/context/base/spac-ver.mkiv11
-rw-r--r--tex/context/base/status-files.pdfbin24752 -> 24750 bytes
-rw-r--r--tex/context/base/status-lua.pdfbin211622 -> 211782 bytes
-rw-r--r--tex/context/base/tabl-xtb.lua16
-rw-r--r--tex/context/base/trac-vis.lua2
-rw-r--r--tex/generic/context/luatex/luatex-fonts-merged.lua2
16 files changed, 101 insertions, 27 deletions
diff --git a/tex/context/base/cont-new.mkii b/tex/context/base/cont-new.mkii
index b2df7931a..544e5e537 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{2013.03.29 01:31}
+\newcontextversion{2013.04.09 10:38}
%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 85a3cf0a5..0fd3e2bbd 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{2013.04.08 17:52}
+\newcontextversion{2013.04.09 10:45}
%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/context-version.pdf b/tex/context/base/context-version.pdf
index 916ff06be..6b5387ed1 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 b32e53f50..d30d95242 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 1309ce1cb..97afd33df 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{2013.03.29 01:31}
+\edef\contextversion{2013.04.09 10:38}
%D For those who want to use this:
diff --git a/tex/context/base/context.mkiv b/tex/context/base/context.mkiv
index e11a57a4f..96f34e398 100644
--- a/tex/context/base/context.mkiv
+++ b/tex/context/base/context.mkiv
@@ -25,7 +25,7 @@
%D up and the dependencies are more consistent.
\edef\contextformat {\jobname}
-\edef\contextversion{2013.04.08 17:52}
+\edef\contextversion{2013.04.09 10:45}
\edef\contextkind {beta}
%D For those who want to use this:
diff --git a/tex/context/base/font-mat.mkvi b/tex/context/base/font-mat.mkvi
index 165b644d2..eb2225d20 100644
--- a/tex/context/base/font-mat.mkvi
+++ b/tex/context/base/font-mat.mkvi
@@ -194,13 +194,16 @@
\def\font_helpers_preset_math_family_indeed#fam#familytag%
{\expandafter\let\expandafter\v_font_math_one\csname\??fontinstanceclass\fontclass-\fontbody-\s!mm-#familytag-\fontsize-1\endcsname
\ifx\v_font_math_one\relax
- \writestatus{fonts}{math: unset for global bodyfont \fontclass\space at \fontbody}%
+ \font_helpers_preset_math_family_warning
\else
\scriptscriptfont#fam\csname\??fontinstanceclass\fontclass-\fontbody-\s!mm-#familytag-\fontsize-3\endcsname
\scriptfont #fam\csname\??fontinstanceclass\fontclass-\fontbody-\s!mm-#familytag-\fontsize-2\endcsname
\textfont #fam\v_font_math_one
\fi}
+\def\font_helpers_preset_math_family_warning
+ {\writestatus{fonts}{math: unset for global bodyfont \fontclass\space at \fontbody}}
+
\let\font_helpers_reset_fontclass_math_families\gobbleoneargument
% It would be nice if characters could be defined in a neutral way (say fam 255) and
diff --git a/tex/context/base/mlib-run.lua b/tex/context/base/mlib-run.lua
index 0d7b5aa6d..4ff16b18e 100644
--- a/tex/context/base/mlib-run.lua
+++ b/tex/context/base/mlib-run.lua
@@ -56,6 +56,8 @@ metapost.collapse = true -- currently mplib cannot deal with begingroup/endg
metapost.texerrors = false
metapost.exectime = metapost.exectime or { } -- hack
+-- metapost.collapse = false
+
directives.register("mplib.texerrors", function(v) metapost.texerrors = v end)
trackers.register ("metapost.showlog", function(v) metapost.showlog = v end)
diff --git a/tex/context/base/node-pro.lua b/tex/context/base/node-pro.lua
index ab5b77f90..24351b5b8 100644
--- a/tex/context/base/node-pro.lua
+++ b/tex/context/base/node-pro.lua
@@ -105,10 +105,10 @@ function processors.hpack_filter(head,groupcode,size,packtype,direction)
else
tracer("hpack","unchanged",head,groupcode,before,after,true)
end
- return (done and head) or true
+ return done and head or true
else
local head, done = actions(head,groupcode,size,packtype,direction)
- return (done and head) or true
+ return done and head or true
end
elseif trace_callbacks then
local n = nodes.count(head,false)
@@ -149,10 +149,10 @@ function processors.post_linebreak_filter(head,groupcode)
else
tracer("post_linebreak","unchanged",head,groupcode,before,after,true)
end
- return (done and head) or true
+ return done and head or true
else
local head, done = actions(head,groupcode)
- return (done and head) or true
+ return done and head or true
end
end
diff --git a/tex/context/base/pack-rul.lua b/tex/context/base/pack-rul.lua
index cd2e809e7..c91dec09c 100644
--- a/tex/context/base/pack-rul.lua
+++ b/tex/context/base/pack-rul.lua
@@ -14,7 +14,66 @@ local texsetdimen, texsetcount, texbox = tex.setdimen, tex.setcount, tex.box
local hpack, free, copy, traverse_id = node.hpack, node.free, node.copy_list, node.traverse_id
local texdimen, texcount = tex.dimen, tex.count
--- fastrepack
+local hlist_code = nodes.nodecodes.hlist
+local node_dimensions = node.dimensions
+
+-- function commands.doreshapeframedbox(n)
+-- local box = texbox[n]
+-- local noflines = 0
+-- local firstheight = nil
+-- local lastdepth = nil
+-- local lastlinelength = 0
+-- local minwidth = 0
+-- local maxwidth = 0
+-- local totalwidth = 0
+-- if box.width ~= 0 then
+-- local list = box.list
+-- if list then
+-- for h in traverse_id(hlist_code,list) do -- no dir etc needed
+-- if not firstheight then
+-- firstheight = h.height
+-- end
+-- lastdepth = h.depth
+-- noflines = noflines + 1
+-- local l = h.list
+-- if l then
+-- local p = hpack(copy(l))
+-- lastlinelength = p.width
+-- if lastlinelength > maxwidth then
+-- maxwidth = lastlinelength
+-- end
+-- if lastlinelength < minwidth or minwidth == 0 then
+-- minwidth = lastlinelength
+-- end
+-- totalwidth = totalwidth + lastlinelength
+-- free(p)
+-- end
+-- end
+-- if firstheight then
+-- if maxwidth ~= 0 then
+-- for h in traverse_id(hlist_code,list) do
+-- local l = h.list
+-- if l then
+-- -- if h.width ~= maxwidth then -- else no display math handling (uses shift)
+-- h.list = hpack(l,maxwidth,'exactly',h.dir)
+-- h.shift = 0 -- needed for display math
+-- h.width = maxwidth
+-- -- end
+-- end
+-- end
+-- end
+-- box.width = maxwidth
+-- end
+-- end
+-- end
+-- -- print("reshape", noflines, firstheight or 0, lastdepth or 0)
+-- texsetcount("global","framednoflines", noflines)
+-- texsetdimen("global","framedfirstheight", firstheight or 0)
+-- texsetdimen("global","framedlastdepth", lastdepth or 0)
+-- texsetdimen("global","framedminwidth", minwidth)
+-- texsetdimen("global","framedmaxwidth", maxwidth)
+-- texsetdimen("global","framedaveragewidth", noflines > 0 and totalwidth/noflines or 0)
+-- end
function commands.doreshapeframedbox(n)
local box = texbox[n]
@@ -28,7 +87,7 @@ function commands.doreshapeframedbox(n)
if box.width ~= 0 then
local list = box.list
if list then
- for h in traverse_id('hlist',list) do -- no dir etc needed
+ for h in traverse_id(hlist_code,list) do -- no dir etc needed
if not firstheight then
firstheight = h.height
end
@@ -36,8 +95,7 @@ function commands.doreshapeframedbox(n)
noflines = noflines + 1
local l = h.list
if l then
- local p = hpack(copy(l))
- lastlinelength = p.width
+ lastlinelength = node_dimensions(l)
if lastlinelength > maxwidth then
maxwidth = lastlinelength
end
@@ -45,15 +103,17 @@ function commands.doreshapeframedbox(n)
minwidth = lastlinelength
end
totalwidth = totalwidth + lastlinelength
- free(p)
end
end
if firstheight then
if maxwidth ~= 0 then
- for h in traverse_id('hlist',list) do
+ for h in traverse_id(hlist_code,list) do
local l = h.list
if l then
-- if h.width ~= maxwidth then -- else no display math handling (uses shift)
+ -- challenge: adapt glue_set
+ -- h.glue_set = h.glue_set * h.width/maxwidth -- interesting ... doesn't matter much
+ -- h.width = maxwidth
h.list = hpack(l,maxwidth,'exactly',h.dir)
h.shift = 0 -- needed for display math
h.width = maxwidth
@@ -82,7 +142,7 @@ function commands.doanalyzeframedbox(n)
if box.width ~= 0 then
local list = box.list
if list then
- for h in traverse_id('hlist',list) do
+ for h in traverse_id(hlist_code,list) do
if not firstheight then
firstheight = h.height
end
diff --git a/tex/context/base/spac-ver.mkiv b/tex/context/base/spac-ver.mkiv
index 7323230a7..ee78d8964 100644
--- a/tex/context/base/spac-ver.mkiv
+++ b/tex/context/base/spac-ver.mkiv
@@ -763,8 +763,15 @@
\setnormalbaselines
\setstrut}
-\unexpanded\def\forgetverticalstretch % \forgetspacing
- {\spacing\plusone}
+% \unexpanded\def\forgetverticalstretch % \forgetspacing
+% {\spacing\plusone}
+
+\unexpanded\def\forgetverticalstretch
+ {\let\spacingfactor \plusone
+ \let\systemtopskipfactor \topskipfactor
+ \let\systemmaxdepthfactor\maxdepthfactor
+ \setnormalbaselines
+ \setstrut}
\appendtoks
\forgetverticalstretch
diff --git a/tex/context/base/status-files.pdf b/tex/context/base/status-files.pdf
index f43bcdc4e..00b3f8ea2 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 f34d626b7..c9518b595 100644
--- a/tex/context/base/status-lua.pdf
+++ b/tex/context/base/status-lua.pdf
Binary files differ
diff --git a/tex/context/base/tabl-xtb.lua b/tex/context/base/tabl-xtb.lua
index 59cfadbf2..3ffe8a219 100644
--- a/tex/context/base/tabl-xtb.lua
+++ b/tex/context/base/tabl-xtb.lua
@@ -646,13 +646,15 @@ function xtables.construct()
local list = drc.list
if list then
list.shift = list.height + list.depth
--- list = hpack_node_list(list) -- is somehow needed
--- list.width = 0
--- list.height = 0
--- list.depth = 0
-local h = new_hlist()
-h.list = list
-list = h
+ -- list = hpack_node_list(list) -- is somehow needed
+ -- list.width = 0
+ -- list.height = 0
+ -- list.depth = 0
+ -- faster:
+ local h = new_hlist()
+ h.list = list
+ list = h
+ --
if start then
stop.next = list
list.prev = stop
diff --git a/tex/context/base/trac-vis.lua b/tex/context/base/trac-vis.lua
index 88d2c886e..f68da632f 100644
--- a/tex/context/base/trac-vis.lua
+++ b/tex/context/base/trac-vis.lua
@@ -300,7 +300,7 @@ local c_skip_a_d = "trace:dc"
local c_skip_b_d = "trace:dm"
local c_glyph_d = "trace:do"
-local function sometext(str,layer,color)
+local function sometext(str,layer,color) -- we can just paste verbatim together .. no typesteting needed
local text = fast_hpack_string(str,usedfont)
local size = text.width
local rule = new_rule(size,2*exheight,exheight/2)
diff --git a/tex/generic/context/luatex/luatex-fonts-merged.lua b/tex/generic/context/luatex/luatex-fonts-merged.lua
index dff2d3975..76d6b7fa7 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/08/13 17:52:17
+-- merge date : 04/09/13 10:45:16
do -- begin closure to overcome local limits and interference