summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--doc/context/scripts/mkiv/context.html2
-rw-r--r--doc/context/scripts/mkiv/context.man2
-rw-r--r--doc/context/scripts/mkiv/context.xml2
-rw-r--r--doc/context/scripts/mkiv/mtx-context.html2
-rw-r--r--doc/context/scripts/mkiv/mtx-context.man2
-rw-r--r--doc/context/scripts/mkiv/mtx-context.xml2
-rw-r--r--scripts/context/lua/mtx-context.lua26
-rw-r--r--scripts/context/lua/mtx-context.xml2
-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
24 files changed, 125 insertions, 43 deletions
diff --git a/doc/context/scripts/mkiv/context.html b/doc/context/scripts/mkiv/context.html
index 40e479d30..ef05d3bb6 100644
--- a/doc/context/scripts/mkiv/context.html
+++ b/doc/context/scripts/mkiv/context.html
@@ -81,7 +81,7 @@
<tr><th>--nofile</th><td></td><td>use dummy file as jobname</td></tr>
<tr><th colspan="3">expert</th></tr>
<tr><th/><td/><td/></tr>
- <tr><th>--touch</th><td></td><td>update context version number (remake needed afterwards, also provide --expert)</td></tr>
+ <tr><th>--touch</th><td></td><td>update context version number (also provide --expert, optionally provide --basepath)</td></tr>
<tr><th>--nostatistics</th><td></td><td>omit runtime statistics at the end of the run</td></tr>
<tr><th>--update</th><td></td><td>update context from website (not to be confused with contextgarden)</td></tr>
<tr><th>--profile</th><td></td><td>profile job (use: mtxrun --script profile --analyze)</td></tr>
diff --git a/doc/context/scripts/mkiv/context.man b/doc/context/scripts/mkiv/context.man
index e1fb28a99..878691b59 100644
--- a/doc/context/scripts/mkiv/context.man
+++ b/doc/context/scripts/mkiv/context.man
@@ -121,7 +121,7 @@ use dummy file as jobname
.SH OPTIONS: EXPERT
.TP
.B --touch
-update context version number (remake needed afterwards, also provide --expert)
+update context version number (also provide --expert, optionally provide --basepath)
.TP
.B --nostatistics
omit runtime statistics at the end of the run
diff --git a/doc/context/scripts/mkiv/context.xml b/doc/context/scripts/mkiv/context.xml
index 6eb8afeb1..a3812288f 100644
--- a/doc/context/scripts/mkiv/context.xml
+++ b/doc/context/scripts/mkiv/context.xml
@@ -141,7 +141,7 @@
<category name="expert">
<subcategory>
<flag name="touch">
- <short>update context version number (remake needed afterwards, also provide <ref name="expert"/>)</short>
+ <short>update context version number (also provide <ref name="expert"/>, optionally provide <ref name="basepath"/>)</short>
</flag>
<flag name="nostatistics">
<short>omit runtime statistics at the end of the run</short>
diff --git a/doc/context/scripts/mkiv/mtx-context.html b/doc/context/scripts/mkiv/mtx-context.html
index 40e479d30..ef05d3bb6 100644
--- a/doc/context/scripts/mkiv/mtx-context.html
+++ b/doc/context/scripts/mkiv/mtx-context.html
@@ -81,7 +81,7 @@
<tr><th>--nofile</th><td></td><td>use dummy file as jobname</td></tr>
<tr><th colspan="3">expert</th></tr>
<tr><th/><td/><td/></tr>
- <tr><th>--touch</th><td></td><td>update context version number (remake needed afterwards, also provide --expert)</td></tr>
+ <tr><th>--touch</th><td></td><td>update context version number (also provide --expert, optionally provide --basepath)</td></tr>
<tr><th>--nostatistics</th><td></td><td>omit runtime statistics at the end of the run</td></tr>
<tr><th>--update</th><td></td><td>update context from website (not to be confused with contextgarden)</td></tr>
<tr><th>--profile</th><td></td><td>profile job (use: mtxrun --script profile --analyze)</td></tr>
diff --git a/doc/context/scripts/mkiv/mtx-context.man b/doc/context/scripts/mkiv/mtx-context.man
index e1fb28a99..878691b59 100644
--- a/doc/context/scripts/mkiv/mtx-context.man
+++ b/doc/context/scripts/mkiv/mtx-context.man
@@ -121,7 +121,7 @@ use dummy file as jobname
.SH OPTIONS: EXPERT
.TP
.B --touch
-update context version number (remake needed afterwards, also provide --expert)
+update context version number (also provide --expert, optionally provide --basepath)
.TP
.B --nostatistics
omit runtime statistics at the end of the run
diff --git a/doc/context/scripts/mkiv/mtx-context.xml b/doc/context/scripts/mkiv/mtx-context.xml
index 6eb8afeb1..a3812288f 100644
--- a/doc/context/scripts/mkiv/mtx-context.xml
+++ b/doc/context/scripts/mkiv/mtx-context.xml
@@ -141,7 +141,7 @@
<category name="expert">
<subcategory>
<flag name="touch">
- <short>update context version number (remake needed afterwards, also provide <ref name="expert"/>)</short>
+ <short>update context version number (also provide <ref name="expert"/>, optionally provide <ref name="basepath"/>)</short>
</flag>
<flag name="nostatistics">
<short>omit runtime statistics at the end of the run</short>
diff --git a/scripts/context/lua/mtx-context.lua b/scripts/context/lua/mtx-context.lua
index add21fc90..fd4fe8af3 100644
--- a/scripts/context/lua/mtx-context.lua
+++ b/scripts/context/lua/mtx-context.lua
@@ -1023,8 +1023,13 @@ end
-- touching files (signals regeneration of formats)
-local function touch(name,versionpattern,kind,kindpattern)
- local name = resolvers.findfile(name)
+local function touch(path,name,versionpattern,kind,kindpattern)
+ if path and path ~= "" then
+ name = file.join(path,name)
+print(name)
+ else
+ name = resolvers.findfile(name)
+ end
local olddata = io.loaddata(name)
if olddata then
local oldkind, newkind = "", kind or ""
@@ -1056,16 +1061,18 @@ local p_contextkind = "(\\edef\\contextkind%s*{)(.-)(})"
local p_contextversion = "(\\edef\\contextversion%s*{)(.-)(})"
local p_newcontextversion = "(\\newcontextversion%s*{)(.-)(})"
-local function touchfiles(suffix,kind)
- local foundname, oldversion, newversion, oldkind, newkind = touch(file.addsuffix("context",suffix),p_contextversion,kind,p_contextkind)
+local function touchfiles(suffix,kind,path)
+ local foundname, oldversion, newversion, oldkind, newkind = touch(path,file.addsuffix("context",suffix),p_contextversion,kind,p_contextkind)
if foundname then
report("old version : %s (%s)",oldversion,oldkind)
report("new version : %s (%s)",newversion,newkind)
report("touched file : %s",foundname)
- local foundname = touch(file.addsuffix("cont-new",suffix),p_newcontextversion)
+ local foundname = touch(path,file.addsuffix("cont-new",suffix),p_newcontextversion)
if foundname then
report("touched file : %s", foundname)
end
+ else
+ report("nothing touched")
end
end
@@ -1073,12 +1080,13 @@ function scripts.context.touch()
if getargument("expert") then
local touch = getargument("touch")
local kind = getargument("kind")
+ local path = getargument("basepath")
if touch == "mkii" or touch == "mkiv" or touch == "mkvi" then -- mkix mkxi
- touchfiles(touch,kind)
+ touchfiles(touch,kind,path)
else
- touchfiles("mkii",kind)
- touchfiles("mkiv",kind)
- touchfiles("mkvi",kind)
+ touchfiles("mkii",kind,path)
+ touchfiles("mkiv",kind,path)
+ touchfiles("mkvi",kind,path)
end
else
report("touching needs --expert")
diff --git a/scripts/context/lua/mtx-context.xml b/scripts/context/lua/mtx-context.xml
index 6eb8afeb1..a3812288f 100644
--- a/scripts/context/lua/mtx-context.xml
+++ b/scripts/context/lua/mtx-context.xml
@@ -141,7 +141,7 @@
<category name="expert">
<subcategory>
<flag name="touch">
- <short>update context version number (remake needed afterwards, also provide <ref name="expert"/>)</short>
+ <short>update context version number (also provide <ref name="expert"/>, optionally provide <ref name="basepath"/>)</short>
</flag>
<flag name="nostatistics">
<short>omit runtime statistics at the end of the run</short>
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