summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--doc/context/documents/general/manuals/luatex.pdfbin1025813 -> 992889 bytes
-rw-r--r--doc/context/sources/general/manuals/luatex/luatex-contents.tex6
-rw-r--r--doc/context/sources/general/manuals/luatex/luatex-fonts.tex20
-rw-r--r--doc/context/sources/general/manuals/luatex/luatex-introduction.tex6
-rw-r--r--doc/context/sources/general/manuals/luatex/luatex-libraries.tex44
-rw-r--r--doc/context/sources/general/manuals/luatex/luatex-lua.tex23
-rw-r--r--doc/context/sources/general/manuals/luatex/luatex-nodes.tex3
-rw-r--r--doc/context/sources/general/manuals/luatex/luatex-style.tex48
-rw-r--r--doc/context/sources/general/manuals/luatex/luatex.tex2
-rw-r--r--tex/context/base/context-version.pdfbin4248 -> 4244 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/file-job.lua9
-rw-r--r--tex/context/base/mkiv/scrn-pag.mkvi4
-rw-r--r--tex/context/base/mkiv/spac-ver.lua235
-rw-r--r--tex/context/base/mkiv/spac-ver.mkiv21
-rw-r--r--tex/context/base/mkiv/status-files.pdfbin9118 -> 9202 bytes
-rw-r--r--tex/context/base/mkiv/status-lua.pdfbin267492 -> 267502 bytes
-rw-r--r--tex/context/base/mkiv/tabl-tbl.mkiv19
-rw-r--r--tex/generic/context/luatex/luatex-fonts-merged.lua2
20 files changed, 293 insertions, 153 deletions
diff --git a/doc/context/documents/general/manuals/luatex.pdf b/doc/context/documents/general/manuals/luatex.pdf
index 64041ab40..69080d27d 100644
--- a/doc/context/documents/general/manuals/luatex.pdf
+++ b/doc/context/documents/general/manuals/luatex.pdf
Binary files differ
diff --git a/doc/context/sources/general/manuals/luatex/luatex-contents.tex b/doc/context/sources/general/manuals/luatex/luatex-contents.tex
index f002716b1..6d06b3ef0 100644
--- a/doc/context/sources/general/manuals/luatex/luatex-contents.tex
+++ b/doc/context/sources/general/manuals/luatex/luatex-contents.tex
@@ -9,9 +9,9 @@
\definecolor[maincolor][black]
- \placecontent
- [criterium=text,
- level=subsection]
+ \placelist
+ [chapter,section,subsection]
+ [criterium=text]
\stop
diff --git a/doc/context/sources/general/manuals/luatex/luatex-fonts.tex b/doc/context/sources/general/manuals/luatex/luatex-fonts.tex
index 745d28c74..150532ec2 100644
--- a/doc/context/sources/general/manuals/luatex/luatex-fonts.tex
+++ b/doc/context/sources/general/manuals/luatex/luatex-fonts.tex
@@ -334,19 +334,19 @@ forward one or two places. The glyph that ends up to the right of the insertion
point will become the next \quote {left}.
\starttabulate[|l|c|l|l|]
-\NC \bf textual (Knuth) \NC \bf number \NC \bf string \NC result \NC\NR
-\NC l + r =: n \NC 0 \NC \type {=:} \NC \|n \NC\NR
-\NC l + r =:\| n \NC 1 \NC \type {=:|} \NC \|nr \NC\NR
-\NC l + r \|=: n \NC 2 \NC \type {|=:} \NC \|ln \NC\NR
-\NC l + r \|=:\| n \NC 3 \NC \type {|=:|} \NC \|lnr \NC\NR
-\NC l + r =:\|\> n \NC 5 \NC \type {=:|>} \NC n\|r \NC\NR
-\NC l + r \|=:\> n \NC 6 \NC \type {|=:>} \NC l\|n \NC\NR
-\NC l + r \|=:\|\> n \NC 7 \NC \type {|=:|>} \NC l\|nr \NC\NR
-\NC l + r \|=:\|\>\> n \NC 11 \NC \type {|=:|>>} \NC ln\|r \NC\NR
+\NC \bf textual (Knuth) \NC \bf number \NC \bf string \NC result \NC\NR
+\NC \type{l + r =: n} \NC 0 \NC \type {=:} \NC \type{|n} \NC\NR
+\NC \type{l + r =:| n} \NC 1 \NC \type {=:|} \NC \type{|nr} \NC\NR
+\NC \type{l + r |=: n} \NC 2 \NC \type {|=:} \NC \type{|ln} \NC\NR
+\NC \type{l + r |=:| n} \NC 3 \NC \type {|=:|} \NC \type{|lnr} \NC\NR
+\NC \type{l + r =:|> n} \NC 5 \NC \type {=:|>} \NC \type{n|r} \NC\NR
+\NC \type{l + r |=:> n} \NC 6 \NC \type {|=:>} \NC \type{l|n} \NC\NR
+\NC \type{l + r |=:|> n} \NC 7 \NC \type {|=:|>} \NC \type{l|nr} \NC\NR
+\NC \type{l + r |=:|>> n} \NC 11 \NC \type {|=:|>>} \NC \type{ln|r} \NC\NR
\stoptabulate
The default value is~0, and can be left out. That signifies a \quote {normal}
-ligature where the ligature replaces both original glyphs. In this table the~\|
+ligature where the ligature replaces both original glyphs. In this table the~\type {|}
indicates the final insertion point.
The \type {commands} array is explained below.
diff --git a/doc/context/sources/general/manuals/luatex/luatex-introduction.tex b/doc/context/sources/general/manuals/luatex/luatex-introduction.tex
index ad03970a5..683be81b5 100644
--- a/doc/context/sources/general/manuals/luatex/luatex-introduction.tex
+++ b/doc/context/sources/general/manuals/luatex/luatex-introduction.tex
@@ -20,9 +20,9 @@ internals and experimental features evolved into stable ones or were dropped.
Already quite early \LUATEX\ could be used for production and it was used in
production by the authors. Successive versions sometimes demanded a adaption to
the \LUA\ interfacing, but the concepts were unchanged. The current version can
-be considered stable in functionality and there will be no fundamental changes
-between 0.90 and 1.00. Of course we then can decide to move towards version 2.00
-with different properties.
+be considered stable in functionality and there will be no fundamental changes.
+Of course we then can decide to move towards version 2.00 with different
+properties.
Don't expect \LUATEX\ to behave the same as \PDFTEX ! Although the core
functionality of that 8 bit engine was starting point, it has been combined with
diff --git a/doc/context/sources/general/manuals/luatex/luatex-libraries.tex b/doc/context/sources/general/manuals/luatex/luatex-libraries.tex
index 93ea85118..9adf352a0 100644
--- a/doc/context/sources/general/manuals/luatex/luatex-libraries.tex
+++ b/doc/context/sources/general/manuals/luatex/luatex-libraries.tex
@@ -415,7 +415,7 @@ what list you can give a treat.
\NC\type {adjust_tail} \NC \type {adjust_head} \NC \NR
\stoptabulate
-\subsubsection{\type {buildpage_filter}}
+\subsubsection{\type {buildpage_filter} and \type {contribute_filter}}
This callback is called whenever \LUATEX\ is ready to move stuff to the main
vertical list. You can use this callback to do specialized manipulation of the
@@ -427,15 +427,13 @@ end
\stopfunctioncall
The string \type {extrainfo} gives some additional information about what \TEX's
-state is with respect to the \quote {current page}. The possible values are:
+state is with respect to the \quote {current page}. The possible values for the
+\type {buildpage_filter} callback are:
\starttabulate[|lT|p|]
\NC \ssbf value \NC \bf explanation \NC \NR
\NC alignment \NC a (partial) alignment is being added \NC \NR
\NC after_output \NC an output routine has just finished \NC \NR
-\NC box \NC a typeset box is being added \NC \NR
-%NC pre_box \NC interline material is being added \NC \NR
-%NC adjust \NC \type {\vadjust} material is being added \NC \NR
\NC new_graf \NC the beginning of a new paragraph \NC \NR
\NC vmode_par \NC \type {\par} was found in vertical mode \NC \NR
\NC hmode_par \NC \type {\par} was found in horizontal mode \NC \NR
@@ -446,7 +444,23 @@ state is with respect to the \quote {current page}. The possible values are:
\NC end \NC \LUATEX\ is terminating (it's all over) \NC \NR
\stoptabulate
-This callback does not replace any internal code.
+And for the \type {contribute_filter} called in the post line break handler
+we have four cases (three are only called when there is a need for it).
+
+\starttabulate[|lT|p|]
+\NC \ssbf value \NC \bf explanation \NC \NR
+\NC pre_box \NC interline material is being added \NC \NR
+\NC pre_adjust \NC \type {\vadjust} material is being added \NC \NR
+\NC box \NC a typeset box is being added (always called) \NC \NR
+\NC adjust \NC \type {\vadjust} material is being added \NC \NR
+\stoptabulate
+
+Just before the \type {box} related call we have a callout to the \type
+{append_to_vlist_filter}.
+
+These callbacks do not replace any internal code.
+
+% pre_box pre_adjust box adjust
\subsubsection{\type {pre_linebreak_filter}}
@@ -488,7 +502,7 @@ three things:
\startitemize
\startitem
- boolean \type {true} signals succesfull processing
+ boolean \type {true} signals successful processing
\stopitem
\startitem
\type {<node>} signals that the \quote {head} node should be replaced by the
@@ -3964,17 +3978,17 @@ is also possible:
\startfunctioncall
<number> w, <number> h, <number> d =
- node.dimensions(<number> glue_set, <number> glue_sign,
- <number> glue_order, <node> n)
+ node.dimensions(<number> glue_set, <number> glue_sign,
+ <number> glue_order, <node> n)
<number> w, <number> h, <number> d =
- node.dimensions(<number> glue_set, <number> glue_sign,
- <number> glue_order, <node> n, <string> dir)
+ node.dimensions(<number> glue_set, <number> glue_sign,
+ <number> glue_order, <node> n, <string> dir)
<number> w, <number> h, <number> d =
- node.dimensions(<number> glue_set, <number> glue_sign,
- <number> glue_order, <node> n, <node> t)
+ node.dimensions(<number> glue_set, <number> glue_sign,
+ <number> glue_order, <node> n, <node> t)
<number> w, <number> h, <number> d =
- node.dimensions(<number> glue_set, <number> glue_sign,
- <number> glue_order, <node> n, <node> t, <string> dir)
+ node.dimensions(<number> glue_set, <number> glue_sign,
+ <number> glue_order, <node> n, <node> t, <string> dir)
\stopfunctioncall
This calling method takes glue settings into account and is especially useful for
diff --git a/doc/context/sources/general/manuals/luatex/luatex-lua.tex b/doc/context/sources/general/manuals/luatex/luatex-lua.tex
index 5bf4f3475..eb2af013e 100644
--- a/doc/context/sources/general/manuals/luatex/luatex-lua.tex
+++ b/doc/context/sources/general/manuals/luatex/luatex-lua.tex
@@ -71,7 +71,6 @@ but have no consequence. The following command|-|line options are understood:
\NC --version \NC display version and exit \NC \NR
\NC --credits \NC display credits and exit \NC \NR
\NC --recorder \NC enable filename recorder \NC \NR
-\NC --etex \NC ignored \NC \NR
\NC --output-comment=STRING \NC use \type {STRING} for \DVI\ file comment instead of
date (no effect for \PDF) \NC \NR
\NC --output-directory=DIR \NC use \type {DIR} as the directory to write files to \NC \NR
@@ -87,24 +86,26 @@ but have no consequence. The following command|-|line options are understood:
\NC --[no-]file-line-error \NC disable/enable \type {file:line:error} style messages \NC \NR
\NC --[no-]file-line-error-style \NC aliases of \type {--[no-]file-line-error} \NC \NR
\NC --jobname=STRING \NC set the job name to \type {STRING} \NC \NR
-\NC --[no-]parse-first-line \NC ignored \NC \NR
-\NC --translate-file= \NC ignored \NC \NR
-\NC --default-translate-file= \NC ignored \NC \NR
-\NC --8bit \NC ignored \NC \NR
\NC --[no-]mktex=FMT \NC disable/enable \type {mktexFMT} generation with \type {FMT}
is \type {tex} or \type {tfm} \NC \NR
\NC --synctex=NUMBER \NC enable \type {synctex} \NC \NR
\stoptabulate
-A note on the creation of the various temporary files and the \type {\jobname}.
+Some of the traditional flags are just ignored:
+\type {--etex},
+\type {--translate-file},
+\type {--8bit}.
+\type {--[no-]parse-first-line},
+\type {--default-translate-file},
+
The value to use for \type {\jobname} is decided as follows:
\startitemize
\startitem
- If \type {--jobname} is given on the command line, its argument will be the
- value for \type {\jobname}, without any changes. The argument will not be used
- for actual input so it need not exist. The \type {--jobname} switch only
- controls the \type {\jobname} setting.
+ If \type {--jobname} is given on the command line, its argument will be the
+ value for \type {\jobname}, without any changes. The argument will not be
+ used for actual input so it need not exist. The \type {--jobname} switch only
+ controls the \type {\jobname} setting.
\stopitem
\startitem
Otherwise, \type {\jobname} will be the name of the first file that is read
@@ -120,7 +121,7 @@ The value to use for \type {\jobname} is decided as follows:
\stopitemize
The file names for output files that are generated automatically are created by
-attaching the proper extension (\type {.log}, \type {.pdf}, etc.) to the found
+attaching the proper extension (\type {log}, \type {pdf}, etc.) to the found
\type {\jobname}. These files are created in the directory pointed to by \type
{--output-directory}, or in the current directory, if that switch is not present.
diff --git a/doc/context/sources/general/manuals/luatex/luatex-nodes.tex b/doc/context/sources/general/manuals/luatex/luatex-nodes.tex
index e77590369..440568be5 100644
--- a/doc/context/sources/general/manuals/luatex/luatex-nodes.tex
+++ b/doc/context/sources/general/manuals/luatex/luatex-nodes.tex
@@ -349,6 +349,9 @@ Id: \showid{glue}
\NC shrink_order \NC number \NC \NC \NR
\stoptabulate
+Note that we use the key \type {width} in both horizontal and vertical glue. This
+suits the \TEX\ internals well so we decided to stick to that naming.
+
The exact meanings of the subtypes are as follows:
\starttabulate[|rT|l|]
diff --git a/doc/context/sources/general/manuals/luatex/luatex-style.tex b/doc/context/sources/general/manuals/luatex/luatex-style.tex
index 1c79b7695..bb66dc00b 100644
--- a/doc/context/sources/general/manuals/luatex/luatex-style.tex
+++ b/doc/context/sources/general/manuals/luatex/luatex-style.tex
@@ -1,7 +1,5 @@
\startenvironment luatex-style
-% I'll clean this up some day.
-
\usemodule[abr-02]
\setuplayout
@@ -34,44 +32,37 @@
\setupwhitespace
[medium]
-\def\|{\string|}
-\def\>{\string>}
+\startluacode
+ local skipped = table.tohash { 'id', 'subtype', 'next', 'prev' }
-\def\showfields#1{\ctxlua
- {
- local t = string.split('#1',',')
+ function document.functions.showfields(s)
+ local t = string.split(s,',')
local r = { }
for _, a in pairs(node.fields(t[1],t[2])) do
- if not (a == 'id' or a == 'subtype' or a =='next' or a=='prev') then
+ if not skipped[a] then
table.insert(r,'\\type{'.. a .. '}')
end
end
tex.sprint(table.concat(r, ', '))
- }%
-}
+ end
-\def\showid#1{\ctxlua
- {
- local t = string.split('#1',',')
+ function document.functions.showid(s)
+ local t = string.split(s,',')
tex.sprint('\\type{'.. node.id(t[1]) .. '}')
if t[2] then
- tex.sprint(', \\type{'.. node.subtype(t[2]) .. '}')
+ tex.sprint(', \\type{'.. node.subtype(t[2]) .. '}')
end
- }%
-}
-
-\starttexdefinition unexpanded todo #1
- \dontleavehmode
- \startcolor[red]
- \bf<TODO: #1>
- \stopcolor
-\stoptexdefinition
+ end
+\stopluacode
-\definecolor[blue] [b=.5]
-\definecolor[red] [r=.5]
-\definecolor[green][g=.5]
+\unexpanded\def\showfields#1{\ctxlua{document.functions.showfields("#1")}}
+\unexpanded\def\showid #1{\ctxlua{document.functions.showid("#1")}}
+\definecolor[blue] [b=.5]
+\definecolor[red] [r=.5]
+\definecolor[green] [g=.5]
\definecolor[maincolor] [b=.5]
+\definecolor[keptcolor] [b=.5]
\definecolor[othercolor][r=.5,g=.5]
\setupbodyfont[modern] % we need this in examples so we predefine
@@ -319,12 +310,13 @@
\setuplist
[chapter,section,subsection,subsubsection]
- [interaction=all]
+ [interaction=all,
+ width=6em]
\setuplist
[chapter]
[style=bold,
- color=maincolor]
+ color=keptcolor]
% Hans doesn't like the bookmarks opening by default so we comment this:
%
diff --git a/doc/context/sources/general/manuals/luatex/luatex.tex b/doc/context/sources/general/manuals/luatex/luatex.tex
index dd5bfac7c..fc17fbedf 100644
--- a/doc/context/sources/general/manuals/luatex/luatex.tex
+++ b/doc/context/sources/general/manuals/luatex/luatex.tex
@@ -10,7 +10,7 @@
\startdocument
[version=0.95.0,
- status=Experimental]
+ status=Pre-release]
\component luatex-titlepage
diff --git a/tex/context/base/context-version.pdf b/tex/context/base/context-version.pdf
index 4e5d56b7b..4f0a9fe9c 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 c0ff11262..d553acc4c 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.04.01 13:01}
+\newcontextversion{2016.04.04 13:06}
%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 b85e16f7b..886ca1c63 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.04.01 13:01}
+\edef\contextversion{2016.04.04 13:06}
\edef\contextkind {beta}
%D For those who want to use this:
diff --git a/tex/context/base/mkiv/file-job.lua b/tex/context/base/mkiv/file-job.lua
index 19a02c477..602c41a11 100644
--- a/tex/context/base/mkiv/file-job.lua
+++ b/tex/context/base/mkiv/file-job.lua
@@ -9,6 +9,7 @@ if not modules then modules = { } end modules ['file-job'] = {
-- in retrospect dealing it's not that bad to deal with the nesting
-- and push/poppign at the tex end
+local rawget = rawget
local gsub, match, find = string.gsub, string.match, string.find
local insert, remove, concat = table.insert, table.remove, table.concat
local validstring, formatters = string.valid, string.formatters
@@ -25,6 +26,7 @@ local implement = interfaces.implement
local trace_jobfiles = false trackers.register("system.jobfiles", function(v) trace_jobfiles = v end)
local report_jobfiles = logs.reporter("system","jobfiles")
+local report_functions = logs.reporter("system","functions")
local texsetcount = tex.setcount
local elements = interfaces.elements
@@ -849,6 +851,13 @@ document = document or {
modes = allocate(),
},
},
+ functions = table.setmetatablenewindex(function(t,k,v)
+ if rawget(t,k) then
+ report_functions("overloading document function %a",k)
+ end
+ rawset(t,k,v)
+ return v
+ end),
}
function document.setargument(key,value)
diff --git a/tex/context/base/mkiv/scrn-pag.mkvi b/tex/context/base/mkiv/scrn-pag.mkvi
index 5624b9045..7a7effdc4 100644
--- a/tex/context/base/mkiv/scrn-pag.mkvi
+++ b/tex/context/base/mkiv/scrn-pag.mkvi
@@ -254,8 +254,8 @@
\c!option=\v!auto]
\appendtoks
- \global\let\scrn_canvas_synchronize_simple \scrn_canvas_synchronize_simple
- \global\let\scrn_canvas_synchronize_complex\scrn_canvas_synchronize_complex
+ \global\let\scrn_canvas_synchronize_simple \scrn_canvas_synchronize_simple_indeed
+ \global\let\scrn_canvas_synchronize_complex\scrn_canvas_synchronize_complex_indeed
\to \everysetupinteractionscreen
%D Conditional page breaks:
diff --git a/tex/context/base/mkiv/spac-ver.lua b/tex/context/base/mkiv/spac-ver.lua
index 637e469f3..e81e8b81d 100644
--- a/tex/context/base/mkiv/spac-ver.lua
+++ b/tex/context/base/mkiv/spac-ver.lua
@@ -133,6 +133,17 @@ local hlist_code = nodecodes.hlist
local vlist_code = nodecodes.vlist
local localpar_code = nodecodes.localpar
+local userskip_code = skipcodes.userskip
+local lineskip_code = skipcodes.lineskip
+local baselineskip_code = skipcodes.baselineskip
+local parskip_code = skipcodes.parskip
+local abovedisplayskip_code = skipcodes.abovedisplayskip
+local belowdisplayskip_code = skipcodes.belowdisplayskip
+local abovedisplayshortskip_code = skipcodes.abovedisplayshortskip
+local belowdisplayshortskip_code = skipcodes.belowdisplayshortskip
+local topskip_code = skipcodes.topskip
+local splittopskip_code = skipcodes.splittopskip
+
local vspacing = builders.vspacing or { }
builders.vspacing = vspacing
@@ -609,6 +620,7 @@ local categories = allocate {
[7] = 'goback',
[8] = 'together', -- not used (?)
[9] = 'overlay',
+ [10] = 'notopskip',
}
vspacing.categories = categories
@@ -869,8 +881,8 @@ local function nodes_to_string(head)
local ty = nodecodes[id]
if id == penalty_code then
t[#t+1] = formatters["%s:%s"](ty,getfield(current,"penalty"))
- elseif id == glue_code then -- or id == kern_code then -- to be tested
- t[#t+1] = formatters["%s:%p"](ty,current)
+ elseif id == glue_code then
+ t[#t+1] = formatters["%s:%s:%p"](ty,skipcodes[getsubtype(current)],getfield(current,"width"))
elseif id == kern_code then
t[#t+1] = formatters["%s:%p"](ty,getfield(current,"kern"))
else
@@ -886,12 +898,12 @@ local function reset_tracing(head)
end
local function trace_skip(str,sc,so,sp,data)
- trace_list[#trace_list+1] = { "skip", formatters["%s | %p | category %s | order %s | penalty %s"](str, data, sc or "-", so or "-", sp or "-") }
+ trace_list[#trace_list+1] = { "skip", formatters["%s | %p | category %s | order %s | penalty %s"](str, getfield(data,"width"), sc or "-", so or "-", sp or "-") }
tracing_info = true
end
local function trace_natural(str,data)
- trace_list[#trace_list+1] = { "skip", formatters["%s | %p"](str, data) }
+ trace_list[#trace_list+1] = { "skip", formatters["%s | %p"](str, getfield(data,"width")) }
tracing_info = true
end
@@ -913,7 +925,7 @@ local function trace_done(str,data)
if getid(data) == penalty_code then
trace_list[#trace_list+1] = { "penalty", formatters["%s | %s"](str,getfield(data,"penalty")) }
else
- trace_list[#trace_list+1] = { "glue", formatters["%s | %p"](str,data) }
+ trace_list[#trace_list+1] = { "glue", formatters["%s | %p"](str,getfield(data,"width")) }
end
tracing_info = true
end
@@ -936,19 +948,6 @@ end
-- alignment box begin_of_par vmode_par hmode_par insert penalty before_display after_display
-local skipcodes = nodes.skipcodes
-
-local userskip_code = skipcodes.userskip
-local lineskip_code = skipcodes.lineskip
-local baselineskip_code = skipcodes.baselineskip
-local parskip_code = skipcodes.parskip
-local abovedisplayskip_code = skipcodes.abovedisplayskip
-local belowdisplayskip_code = skipcodes.belowdisplayskip
-local abovedisplayshortskip_code = skipcodes.abovedisplayshortskip
-local belowdisplayshortskip_code = skipcodes.belowdisplayshortskip
-local topskip_code = skipcodes.topskip
-local splittopskip_code = skipcodes.splittopskip
-
function vspacing.snapbox(n,how)
local sv = snapmethods[how]
if sv then
@@ -1270,7 +1269,9 @@ local function collapser(head,where,what,trace,snap,a_snapmethod) -- maybe also
local function flush(why)
if penalty_data then
local p = new_penalty(penalty_data)
- if trace then trace_done("flushed due to " .. why,p) end
+ if trace then
+ trace_done("flushed due to " .. why,p)
+ end
if penalty_data >= 10000 then -- or whatever threshold?
local prev = getprev(current)
if getid(prev) == glue_code then -- maybe go back more, or maybe even push back before any glue
@@ -1295,16 +1296,22 @@ local function collapser(head,where,what,trace,snap,a_snapmethod) -- maybe also
end
if glue_data then
if force_glue then
- if trace then trace_done("flushed due to forced " .. why,glue_data) end
+ if trace then
+ trace_done("flushed due to forced " .. why,glue_data)
+ end
head = forced_skip(head,current,getfield(glue_data,"width") or 0,"before",trace)
free_node(glue_data)
else
local w = getfield(glue_data,"width")
if w ~= 0 then
- if trace then trace_done("flushed due to non zero " .. why,glue_data) end
+ if trace then
+ trace_done("flushed due to non zero " .. why,glue_data)
+ end
head = insert_node_before(head,current,glue_data)
elseif getfield(glue_data,"stretch") ~= 0 or getfield(glue_data,"shrink") ~= 0 then
- if trace then trace_done("flushed due to stretch/shrink in" .. why,glue_data) end
+ if trace then
+ trace_done("flushed due to stretch/shrink in" .. why,glue_data)
+ end
head = insert_node_before(head,current,glue_data)
else
-- report_vspacing("needs checking (%s): %p",skipcodes[getsubtype(glue_data)],w)
@@ -1313,7 +1320,9 @@ local function collapser(head,where,what,trace,snap,a_snapmethod) -- maybe also
end
end
- if trace then trace_node(current) end
+ if trace then
+ trace_node(current)
+ end
glue_order, glue_data, force_glue = 0, nil, false
penalty_order, penalty_data, natural_penalty = 0, nil, nil
parskip, ignore_parskip, ignore_following, ignore_whitespace = nil, false, false, false
@@ -1344,7 +1353,9 @@ local function collapser(head,where,what,trace,snap,a_snapmethod) -- maybe also
texgetdimen("bodyfontstrutheight"), texgetdimen("bodyfontstrutdepth")
)
end
- if trace then trace_info("start analyzing",where,what) end
+ if trace then
+ trace_info("start analyzing",where,what)
+ end
-- local headprev = getprev(head)
@@ -1397,7 +1408,9 @@ local function collapser(head,where,what,trace,snap,a_snapmethod) -- maybe also
current = getnext(current)
elseif id == penalty_code then
-- natural_penalty = getfield(current,"penalty")
- -- if trace then trace_done("removed penalty",current) end
+ -- if trace then
+ -- trace_done("removed penalty",current)
+ -- end
-- head, current = remove_node(head, current, true)
-- if nobreakfound == nil then
@@ -1428,9 +1441,11 @@ local function collapser(head,where,what,trace,snap,a_snapmethod) -- maybe also
getpagelist()
local p = specialmethods[specialmethod](pagehead,pagetail,current,sp)
if p then
- if trace then
- trace_skip("previous special penalty %a is changed to %a using method %a",sp,p,specialmethod)
- end
+ -- todo: other tracer
+ --
+ -- if trace then
+ -- trace_skip("previous special penalty %a is changed to %a using method %a",sp,p,specialmethod)
+ -- end
special_penalty = sp
sp = p
end
@@ -1448,7 +1463,9 @@ local function collapser(head,where,what,trace,snap,a_snapmethod) -- maybe also
elseif penalty_order == so and sp > penalty_data then
penalty_data = sp
end
- if trace then trace_skip("penalty in skip",sc,so,sp,current) end
+ if trace then
+ trace_skip("penalty in skip",sc,so,sp,current)
+ end
-- if nobreakfound then
-- penalty_data = 10000
@@ -1460,9 +1477,13 @@ local function collapser(head,where,what,trace,snap,a_snapmethod) -- maybe also
head, current = remove_node(head, current, true)
elseif not sc then -- if not sc then
if glue_data then
- if trace then trace_done("flush",glue_data) end
+ if trace then
+ trace_done("flush",glue_data)
+ end
head = insert_node_before(head,current,glue_data)
- if trace then trace_natural("natural",current) end
+ if trace then
+ trace_natural("natural",current)
+ end
current = getnext(current)
else
-- not look back across head
@@ -1474,15 +1495,23 @@ local function collapser(head,where,what,trace,snap,a_snapmethod) -- maybe also
setfield(previous,"width", (getfield(previous,"width") or 0) + (getfield(current,"width") or 0))
setfield(previous,"stretch",(getfield(previous,"stretch") or 0) + (getfield(current,"stretch") or 0))
setfield(previous,"shrink", (getfield(previous,"shrink") or 0) + (getfield(current,"shrink") or 0))
- if trace then trace_natural("removed",current) end
+ if trace then
+ trace_natural("removed",current)
+ end
head, current = remove_node(head, current, true)
- if trace then trace_natural("collapsed",previous) end
+ if trace then
+ trace_natural("collapsed",previous)
+ end
else
- if trace then trace_natural("filler",current) end
+ if trace then
+ trace_natural("filler",current)
+ end
current = getnext(current)
end
else
- if trace then trace_natural("natural (no prev)",current) end
+ if trace then
+ trace_natural("natural (no prev)",current)
+ end
current = getnext(current)
end
end
@@ -1491,7 +1520,9 @@ local function collapser(head,where,what,trace,snap,a_snapmethod) -- maybe also
local next = getnext(current)
if not experiment or next then
ignore_following = true
- if trace then trace_skip("disable",sc,so,sp,current) end
+ if trace then
+ trace_skip("disable",sc,so,sp,current)
+ end
head, current = remove_node(head, current, true)
else
current = next
@@ -1500,7 +1531,9 @@ end
local next = getnext(current)
if not experiment or next then
keep_together = true
- if trace then trace_skip("together",sc,so,sp,current) end
+ if trace then
+ trace_skip("together",sc,so,sp,current)
+ end
head, current = remove_node(head, current, true)
else
current = next
@@ -1514,23 +1547,33 @@ else
current = next
end
elseif sc == discard then
- if trace then trace_skip("discard",sc,so,sp,current) end
+ if trace then
+ trace_skip("discard",sc,so,sp,current)
+ end
head, current = remove_node(head, current, true)
elseif sc == overlay then
-- todo (overlay following line over previous
- if trace then trace_skip("overlay",sc,so,sp,current) end
+ if trace then
+ trace_skip("overlay",sc,so,sp,current)
+ end
-- beware: head can actually be after the affected nodes as
-- we look back ... some day head will the real head
head, current = check_experimental_overlay(head,current,a_snapmethod)
elseif ignore_following then
- if trace then trace_skip("disabled",sc,so,sp,current) end
+ if trace then
+ trace_skip("disabled",sc,so,sp,current)
+ end
head, current = remove_node(head, current, true)
elseif not glue_data then
- if trace then trace_skip("assign",sc,so,sp,current) end
+ if trace then
+ trace_skip("assign",sc,so,sp,current)
+ end
glue_order = so
head, current, glue_data = remove_node(head, current)
elseif glue_order < so then
- if trace then trace_skip("force",sc,so,sp,current) end
+ if trace then
+ trace_skip("force",sc,so,sp,current)
+ end
glue_order = so
free_node(glue_data)
head, current, glue_data = remove_node(head, current)
@@ -1540,41 +1583,57 @@ end
local cw = getfield(current,"width") or 0
local gw = getfield(glue_data,"width") or 0
if cw > gw then
- if trace then trace_skip("largest",sc,so,sp,current) end
+ if trace then
+ trace_skip("largest",sc,so,sp,current)
+ end
free_node(glue_data)
head, current, glue_data = remove_node(head,current)
else
- if trace then trace_skip("remove smallest",sc,so,sp,current) end
+ if trace then
+ trace_skip("remove smallest",sc,so,sp,current)
+ end
head, current = remove_node(head, current, true)
end
elseif sc == goback then
- if trace then trace_skip("goback",sc,so,sp,current) end
+ if trace then
+ trace_skip("goback",sc,so,sp,current)
+ end
free_node(glue_data)
head, current, glue_data = remove_node(head,current)
elseif sc == force then
-- last one counts, some day we can provide an accumulator and largest etc
-- but not now
- if trace then trace_skip("force",sc,so,sp,current) end
+ if trace then
+ trace_skip("force",sc,so,sp,current)
+ end
free_node(glue_data)
head, current, glue_data = remove_node(head, current)
elseif sc == penalty then
- if trace then trace_skip("penalty",sc,so,sp,current) end
+ if trace then
+ trace_skip("penalty",sc,so,sp,current)
+ end
free_node(glue_data)
glue_data = nil
head, current = remove_node(head, current, true)
elseif sc == add then
- if trace then trace_skip("add",sc,so,sp,current) end
+ if trace then
+ trace_skip("add",sc,so,sp,current)
+ end
setfield(old,"width", (getfield(glue_data,"width") or 0) + (getfield(current,"width") or 0))
setfield(old,"stretch",(getfield(glue_data,"stretch") or 0) + (getfield(current,"stretch") or 0))
setfield(old,"shrink", (getfield(glue_data,"shrink") or 0) + (getfield(current,"shrink") or 0))
-- toto: order
head, current = remove_node(head, current, true)
else
- if trace then trace_skip("unknown",sc,so,sp,current) end
+ if trace then
+ trace_skip("unknown",sc,so,sp,current)
+ end
head, current = remove_node(head, current, true)
end
else
- if trace then trace_skip("unknown",sc,so,sp,current) end
+ if trace then
+ trace_skip("unknown",sc,so,sp,current)
+ end
head, current = remove_node(head, current, true)
end
if sc == force then
@@ -1590,11 +1649,15 @@ end
report_snapper("lineskip set to zero")
end
else
- if trace then trace_skip("lineskip",sc,so,sp,current) end
+ if trace then
+ trace_skip("lineskip",sc,so,sp,current)
+ end
flush("lineskip")
end
else
- if trace then trace_skip("lineskip",sc,so,sp,current) end
+ if trace then
+ trace_skip("lineskip",sc,so,sp,current)
+ end
flush("lineskip")
end
current = getnext(current)
@@ -1608,34 +1671,50 @@ end
report_snapper("baselineskip set to zero")
end
else
- if trace then trace_skip("baselineskip",sc,so,sp,current) end
+ if trace then
+ trace_skip("baselineskip",sc,so,sp,current)
+ end
flush("baselineskip")
end
else
- if trace then trace_skip("baselineskip",sc,so,sp,current) end
+ if trace then
+ trace_skip("baselineskip",sc,so,sp,current)
+ end
flush("baselineskip")
end
current = getnext(current)
elseif subtype == parskip_code then
-- parskip always comes later
if ignore_whitespace then
- if trace then trace_natural("ignored parskip",current) end
+ if trace then
+ trace_natural("ignored parskip",current)
+ end
head, current = remove_node(head, current, true)
elseif glue_data then
local wp = getfield(current,"width") or 0
if ((w ~= 0) and (w > (getfield(glue_data,"width") or 0))) then
glue_data = current
head, current = remove_node(head, current)
- if trace then trace_natural("taking parskip",current) end
+ if trace then
+ trace_natural("taking parskip",current)
+ end
else
head, current = remove_node(head, current, true)
- if trace then trace_natural("removed parskip",current) end
+ if trace then
+ trace_natural("removed parskip",current)
+ end
end
else
- if trace then trace_natural("honored parskip",current) end
+ if trace then
+ trace_natural("honored parskip",current)
+ end
head, current, glue_data = remove_node(head, current)
end
elseif subtype == topskip_code or subtype == splittopskip_code then
+ local next = getnext(current)
+ if next and getattr(next,a_skipcategory) == 10 then -- no top skip
+ nuts.setglue(current) -- zero
+ end
if snap then
local s = getattr(current,a_snapmethod)
if s and s ~= 0 then
@@ -1646,35 +1725,47 @@ end
report_snapper("topskip snapped from %p to %p for %a",w,cw,where)
end
else
- if trace then trace_skip("topskip",sc,so,sp,current) end
+ if trace then
+ trace_skip("topskip",sc,so,sp,current)
+ end
flush("topskip")
end
else
- if trace then trace_skip("topskip",sc,so,sp,current) end
+ if trace then
+ trace_skip("topskip",sc,so,sp,current)
+ end
flush("topskip")
end
current = getnext(current)
elseif subtype == abovedisplayskip_code then
--
- if trace then trace_skip("above display skip (normal)",sc,so,sp,current) end
+ if trace then
+ trace_skip("above display skip (normal)",sc,so,sp,current)
+ end
flush("above display skip (normal)")
current = getnext(current)
--
elseif subtype == belowdisplayskip_code then
--
- if trace then trace_skip("below display skip (normal)",sc,so,sp,current) end
+ if trace then
+ trace_skip("below display skip (normal)",sc,so,sp,current)
+ end
flush("below display skip (normal)")
current = getnext(current)
--
elseif subtype == abovedisplayshortskip_code then
--
- if trace then trace_skip("above display skip (short)",sc,so,sp,current) end
+ if trace then
+ trace_skip("above display skip (short)",sc,so,sp,current)
+ end
flush("above display skip (short)")
current = getnext(current)
--
elseif subtype == belowdisplayshortskip_code then
--
- if trace then trace_skip("below display skip (short)",sc,so,sp,current) end
+ if trace then
+ trace_skip("below display skip (short)",sc,so,sp,current)
+ end
flush("below display skip (short)")
current = getnext(current)
--
@@ -1685,7 +1776,9 @@ end
report_snapper("glue %p of type %a kept",w,skipcodes[subtype])
end
end
- if trace then trace_skip(formatters["glue of type %a"](subtype),sc,so,sp,current) end
+ if trace then
+ trace_skip(formatters["glue of type %a"](subtype),sc,so,sp,current)
+ end
flush("some glue")
current = getnext(current)
end
@@ -1694,7 +1787,9 @@ end
current = getnext(current)
end
end
- if trace then trace_info("stop analyzing",where,what) end
+ if trace then
+ trace_info("stop analyzing",where,what)
+ end
-- if natural_penalty and (not penalty_data or natural_penalty > penalty_data) then
-- penalty_data = natural_penalty
-- end
@@ -1705,7 +1800,9 @@ end
if penalty_data then
tail = find_node_tail(head)
local p = new_penalty(penalty_data)
- if trace then trace_done("result",p) end
+ if trace then
+ trace_done("result",p)
+ end
head, tail = insert_node_after(head,tail,p)
-- if penalty_data > special_penalty_min and penalty_data < special_penalty_max then
local props = properties[p]
@@ -1720,7 +1817,9 @@ end
end
if glue_data then
if not tail then tail = find_node_tail(head) end
- if trace then trace_done("result",glue_data) end
+ if trace then
+ trace_done("result",glue_data)
+ end
if force_glue then
head, tail = forced_skip(head,tail,getfield(glue_data,"width") or 0,"after",trace)
free_node(glue_data)
diff --git a/tex/context/base/mkiv/spac-ver.mkiv b/tex/context/base/mkiv/spac-ver.mkiv
index 4fe1012e9..6ae96b7ec 100644
--- a/tex/context/base/mkiv/spac-ver.mkiv
+++ b/tex/context/base/mkiv/spac-ver.mkiv
@@ -1756,14 +1756,16 @@
% experimental code, not yet interfaced:
% category:
-% 0 == discard discard
-% 1 == only if larger largest
-% 2 == force even if smaller force
-% 3 == only take penalty component penalty
-% 4 == add to existing skip add
-% 5 == disable (ignore following) disable
-% 6 == kill whitespace nowhite
-% 7 == discard previous back
+%
+% 0 == discard discard
+% 1 == only if larger largest
+% 2 == force even if smaller force
+% 3 == only take penalty component penalty
+% 4 == add to existing skip add
+% 5 == disable (ignore following) disable
+% 6 == kill whitespace nowhite
+% 7 == discard previous back
+% 10 == no topskip
%
% penalty: larger wins
% order: larger wins
@@ -1790,6 +1792,9 @@
\fi\fi
\clf_vspacingsetamount{#1}}
+\def\spac_vspacing_no_topskip % use grouped
+ {\attribute\skipcategoryattribute\plusten}
+
% \installcorenamespace{vspacingamountnormal}
% \installcorenamespace{vspacingamountgrid}
diff --git a/tex/context/base/mkiv/status-files.pdf b/tex/context/base/mkiv/status-files.pdf
index 70ffa14c3..5b21c27a2 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 5739174e5..68a17780b 100644
--- a/tex/context/base/mkiv/status-lua.pdf
+++ b/tex/context/base/mkiv/status-lua.pdf
Binary files differ
diff --git a/tex/context/base/mkiv/tabl-tbl.mkiv b/tex/context/base/mkiv/tabl-tbl.mkiv
index 36254cf1f..c8d7d5aae 100644
--- a/tex/context/base/mkiv/tabl-tbl.mkiv
+++ b/tex/context/base/mkiv/tabl-tbl.mkiv
@@ -1917,11 +1917,28 @@
\tabl_tabulate_nobreak_inject
\stoptabulatenoalign}
+% \unexpanded\def\tabl_tabulate_ML_second_indeed
+% {\tabl_tabulate_column_rule_separator_inject
+% \tabl_tabulate_hrule_inject
+% \vskip-\p_rulethickness\relax
+% \tabl_tabulate_hrule_inject
+% \tabl_tabulate_break_no
+% \tabl_tabulate_column_rule_separator_inject
+% \stoptabulatenoalign}
+
+\def\spac_vspacing_no_topskip % use grouped
+ {\attribute\skipcategoryattribute\plusten}
+
\unexpanded\def\tabl_tabulate_ML_second_indeed
- {\tabl_tabulate_column_rule_separator_inject
+ {\tabl_tabulate_break_no
+ \tabl_tabulate_column_rule_separator_inject
+ \tabl_tabulate_break_no
\tabl_tabulate_hrule_inject
\vskip-\p_rulethickness\relax
+ \begingroup
+ \spac_vspacing_no_topskip
\tabl_tabulate_hrule_inject
+ \endgroup
\tabl_tabulate_break_no
\tabl_tabulate_column_rule_separator_inject
\stoptabulatenoalign}
diff --git a/tex/generic/context/luatex/luatex-fonts-merged.lua b/tex/generic/context/luatex/luatex-fonts-merged.lua
index c8cf3f626..e4ae182b7 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 : 04/01/16 13:01:46
+-- merge date : 04/04/16 13:06:24
do -- begin closure to overcome local limits and interference