summaryrefslogtreecommitdiff
path: root/tex
diff options
context:
space:
mode:
Diffstat (limited to 'tex')
-rw-r--r--tex/context/base/context-version.pdfbin4165 -> 4155 bytes
-rw-r--r--tex/context/base/mkiv/cont-new.mkiv2
-rw-r--r--tex/context/base/mkiv/context-todo.tex3
-rw-r--r--tex/context/base/mkiv/context.mkiv2
-rw-r--r--tex/context/base/mkiv/font-ots.lua12
-rw-r--r--tex/context/base/mkiv/font-pre.mkiv4
-rw-r--r--tex/context/base/mkiv/grph-inc.mkiv10
-rw-r--r--tex/context/base/mkiv/node-met.lua4
-rw-r--r--tex/context/base/mkiv/node-nut.lua101
-rw-r--r--tex/context/base/mkiv/node-res.lua17
-rw-r--r--tex/context/base/mkiv/pack-mrl.mkiv47
-rw-r--r--tex/context/base/mkiv/spac-prf.lua6
-rw-r--r--tex/context/base/mkiv/status-files.pdfbin9121 -> 9122 bytes
-rw-r--r--tex/context/base/mkiv/status-lua.pdfbin267198 -> 267228 bytes
-rw-r--r--tex/context/base/mkiv/typo-krn.lua4
-rw-r--r--tex/context/base/mkiv/typo-tal.lua5
-rw-r--r--tex/generic/context/luatex/luatex-fonts-merged.lua14
17 files changed, 105 insertions, 126 deletions
diff --git a/tex/context/base/context-version.pdf b/tex/context/base/context-version.pdf
index fb8f7e3eb..a1aeca783 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 8fe6401f1..1148bb842 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.03.30 11:59}
+\newcontextversion{2016.03.31 09:08}
%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-todo.tex b/tex/context/base/mkiv/context-todo.tex
index 933b15e6f..86a5f82ce 100644
--- a/tex/context/base/mkiv/context-todo.tex
+++ b/tex/context/base/mkiv/context-todo.tex
@@ -15,9 +15,6 @@
\startitem
optimize some callback resolution (more direct)
\stopitem
- \startitem
- move glue specs into glue nodes
- \stopitem
\stopitemize
\subsubject{\CONTEXT}
diff --git a/tex/context/base/mkiv/context.mkiv b/tex/context/base/mkiv/context.mkiv
index 50f23ec32..10c935822 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.03.30 11:59}
+\edef\contextversion{2016.03.31 09:08}
\edef\contextkind {beta}
%D For those who want to use this:
diff --git a/tex/context/base/mkiv/font-ots.lua b/tex/context/base/mkiv/font-ots.lua
index 15de12867..879a1ffc7 100644
--- a/tex/context/base/mkiv/font-ots.lua
+++ b/tex/context/base/mkiv/font-ots.lua
@@ -3648,13 +3648,21 @@ local function spaceinitializer(tfmdata,value) -- attr
local kerns = coverage[32]
if kerns then
for k, v in next, kerns do
- right[k] = v
+ if type(v) == "table" then
+ right[k] = v[3] -- needs checking
+ else
+ right[k] = v
+ end
end
end
for k, v in next, coverage do
local kern = v[32]
if kern then
- left[k] = kern
+ if type(v) == "table" then
+ left[k] = kern[3] -- needs checking
+ else
+ left[k] = kern
+ end
end
end
end
diff --git a/tex/context/base/mkiv/font-pre.mkiv b/tex/context/base/mkiv/font-pre.mkiv
index 584bd1779..3b3a76d9c 100644
--- a/tex/context/base/mkiv/font-pre.mkiv
+++ b/tex/context/base/mkiv/font-pre.mkiv
@@ -56,13 +56,13 @@
\definefontfeature
[inlinenumbers]
- [lnum=yes,
+ [pnum=yes,
tnum=no]
\definefontfeature
[tabularnumbers]
[tnum=yes,
- lnum=no]
+ pnum=no]
\definefontfeature
[oldstylenumbers]
diff --git a/tex/context/base/mkiv/grph-inc.mkiv b/tex/context/base/mkiv/grph-inc.mkiv
index b7923d16e..deba82c58 100644
--- a/tex/context/base/mkiv/grph-inc.mkiv
+++ b/tex/context/base/mkiv/grph-inc.mkiv
@@ -782,8 +782,16 @@
% Bonus:
\useexternalfigure
- [buffer]
+ [\v!buffer]
[\jobname.buffer]
[\c!object=\v!no]
+% Another one:
+
+\defineexternalfigure
+ [\v!inline]
+ [\c!height=\lineheight]
+
+\unexpanded\def\inlinefigure[#1]{\dontleavehmode\sbox{\externalfigure[#1][\v!inline]}}
+
\protect \endinput
diff --git a/tex/context/base/mkiv/node-met.lua b/tex/context/base/mkiv/node-met.lua
index a2398da90..272b1d176 100644
--- a/tex/context/base/mkiv/node-met.lua
+++ b/tex/context/base/mkiv/node-met.lua
@@ -116,6 +116,10 @@ nodes.mlist_to_hlist = node.mlist_to_hlist
nodes.effective_glue = node.effective_glue
+nodes.is_zero_glue = node.is_zero_glue
+nodes.getglue = node.getglue
+nodes.getglue = node.getglue
+
-- if not gonuts or not node.getfield then
-- node.getfield = metatable.__index
-- node.setfield = metatable.__newindex
diff --git a/tex/context/base/mkiv/node-nut.lua b/tex/context/base/mkiv/node-nut.lua
index 6fe2e0f33..1465a6680 100644
--- a/tex/context/base/mkiv/node-nut.lua
+++ b/tex/context/base/mkiv/node-nut.lua
@@ -200,29 +200,7 @@ nuts.ligaturing = direct.ligaturing
nuts.kerning = direct.kerning
nuts.effective_glue = direct.effective_glue
--- placeholders
-
-if not nuts.kerning then
-
- local n_kerning = node.kerning
-
- function nuts.kerning(head)
- return tonode(n_kerning(tonut(head)))
- end
-
-end
-
-if not nuts.ligaturing then
-
- local n_ligaturing = node.ligaturing
-
- function nuts.ligaturing(head)
- return tonode(n_ligaturing(tonut(head)))
- end
-
-end
-
-if not direct.mlist_to_hlist then
+if not direct.mlist_to_hlist then -- needed
local n_mlist_to_hlist = node.mlist_to_hlist
@@ -232,15 +210,36 @@ if not direct.mlist_to_hlist then
end
-if not direct.setlist then
-
- local setfield = nuts.setfield
+local is_zero_glue = direct.is_zero_glue
+local setglue = direct.setglue
+local getglue = direct.getglue
+
+if not is_zero_glue then
+ is_zero_glue = function(n)
+ return not n or (
+ getfield(n,"width") == 0 and
+ getfield(n,"stretch") == 0 and
+ getfield(n,"shrink") == 0
+ )
+ end
+ setglue = function(n,width,stretch,shrink,stretch_order,shrink_order)
+ setfield(n,"width", width or 0)
+ setfield(n,"stretch", stretch or 0)
+ setfield(n,"shrink", shrink or 0)
+ setfield(n,"stretch_order",stretch_order or 0)
+ setfield(n,"shrink_order", shrink_order or 0)
+ end
+ getglue = function(n)
+ return
+ getfield(n,"width"), getfield(n,"stretch"), getfield(n,"shrink"),
+ getfield(n,"stretch_order"), getfield(n,"shrink_order")
+ end
+end
- function direct.setlist (n,l) setfield(n,"list",l) end
- function direct.setleader (n,l) setfield(n,"leader",l) end
- function direct.setsubtype(n,s) setfield(n,"subtype",s) end
+nuts.is_zero_glue = is_zero_glue
+nuts.setglue = setglue
+nuts.getglue = getglue
-end
-- if not direct.getpre then
--
@@ -252,10 +251,11 @@ end
--
-- end
-nuts.getdisc = direct.getdisc
----.getpre = direct.getpre
----.getpost = direct.getpost
----.getreplace = direct.getreplace
+
+nuts.getdisc = direct.getdisc
nuts.setdisc = direct.setdisc
nuts.setchar = direct.setchar
nuts.setnext = direct.setnext
@@ -267,45 +267,6 @@ nuts.setlist = direct.setlist
nuts.setleader = direct.setleader
nuts.setsubtype = direct.setsubtype
-if not direct.is_glyph then
-
- local getchar = direct.getchar
- local getid = direct.getid
- local getfont = direct.getfont
- local getsubtype = direct.getsubtype
-
- local glyph_code = nodes.nodecodes.glyph
-
- function direct.is_glyph(n,f)
- local id = getid(n)
- if id == glyph_code then
- if f and getfont(n) == f then
- return getchar(n)
- else
- return false
- end
- else
- return nil, id
- end
- end
-
- function direct.is_char(n,f)
- local id = getid(n)
- if id == glyph_code then
- if getsubtype(n) >= 256 then
- return false
- elseif f and getfont(n) == f then
- return getchar(n)
- else
- return false
- end
- else
- return nil, id
- end
- end
-
-end
-
nuts.is_char = direct.is_char
nuts.ischar = direct.is_char
nuts.is_glyph = direct.is_glyph
diff --git a/tex/context/base/mkiv/node-res.lua b/tex/context/base/mkiv/node-res.lua
index b74929a81..d87f40df7 100644
--- a/tex/context/base/mkiv/node-res.lua
+++ b/tex/context/base/mkiv/node-res.lua
@@ -82,23 +82,6 @@ local free_nut = nuts.free
local copy_node = nodes.copy
local new_node = nodes.new
-local reset_glue = nuts.reset_glue
-
-if not reset_glue then
- reset_glue = function(n,width,stretch,shrink,stretch_order,shrink_order)
- setfield(n,"width",width or 0)
- setfield(n,"stretch",stretch or 0)
- setfield(n,"shrink",shrink or 0)
- setfield(n,"stretch_order",stretch_order or 0)
- setfield(n,"shrink_order",shrink_order or 0)
- end
- nuts.reset_glue = reset_glue
-end
-
-nuts.resetglue = reset_glue
-
--- todo: nodes.reset_glue
-
-- at some point we could have a dual set (the overhead of tonut is not much larger than
-- metatable associations at the lua/c end esp if we also take assignments into account
diff --git a/tex/context/base/mkiv/pack-mrl.mkiv b/tex/context/base/mkiv/pack-mrl.mkiv
index 39e1f4086..649b29fa6 100644
--- a/tex/context/base/mkiv/pack-mrl.mkiv
+++ b/tex/context/base/mkiv/pack-mrl.mkiv
@@ -346,26 +346,35 @@
\def\pack_thinrules[#1]%
{\bgroup
\setupcurrentthinrules[#1]%
- \assignvalue{\directthinrulesparameter\c!interlinespace}\m_pack_thinrules_interlinespace{1.0}{1.5}{2.0}%
- \spacing\m_pack_thinrules_interlinespace
- \edef\p_after {\directthinrulesparameter\c!after}%
- \edef\p_inbetween{\directthinrulesparameter\c!inbetween}%
- \directthinrulesparameter\c!before
\scratchcounter\directthinrulesparameter\c!n\relax
- \dorecurse\scratchcounter
- {\ifnum\recurselevel=\scratchcounter \directvspacing\v!samepage \else % \penalty500
- \ifnum\recurselevel=\plustwo \directvspacing\v!samepage \fi\fi % \penalty500
- \thinrule
- \ifnum\recurselevel<\scratchcounter\relax
- % test needed, else messed up whitespace
- \ifx\p_inbetween\empty
- \softbreak % \ifhmode \hskip \parfillskip \break \fi
- \else
- \endgraf
- \nowhitespace
- \p_inbetween
- \fi
- \fi}%
+ \ifcase\scratchcounter
+ % nothing, not even before/after
+ \let\p_after\relax
+ \else
+ \assignvalue{\directthinrulesparameter\c!interlinespace}\m_pack_thinrules_interlinespace{1.0}{1.5}{2.0}%
+ \spacing\m_pack_thinrules_interlinespace
+ \edef\p_after {\directthinrulesparameter\c!after}%
+ \edef\p_inbetween{\directthinrulesparameter\c!inbetween}%
+ \directthinrulesparameter\c!before
+ \ifcase\scratchcounter\or
+ \thinrule
+ \else
+ \dorecurse\scratchcounter
+ {\ifnum\recurselevel=\scratchcounter \directvspacing\v!samepage \else % \penalty500
+ \ifnum\recurselevel=\plustwo \directvspacing\v!samepage \fi\fi % \penalty500
+ \thinrule
+ \ifnum\recurselevel<\scratchcounter\relax
+ % test needed, else messed up whitespace
+ \ifx\p_inbetween\empty
+ \softbreak % \ifhmode \hskip \parfillskip \break \fi
+ \else
+ \endgraf
+ \nowhitespace
+ \p_inbetween
+ \fi
+ \fi}%
+ \fi
+ \fi
\ifx\p_after\empty
\carryoverpar\egroup
\else
diff --git a/tex/context/base/mkiv/spac-prf.lua b/tex/context/base/mkiv/spac-prf.lua
index 3bfd89f2e..39d90794c 100644
--- a/tex/context/base/mkiv/spac-prf.lua
+++ b/tex/context/base/mkiv/spac-prf.lua
@@ -71,7 +71,7 @@ local new_kern = nuts.pool.kern
local hpack_nodes = nuts.hpack
local link_nodes = nuts.link
local find_node_tail = nuts.tail
-local reset_glue = nuts.reset_glue
+local setglue = nuts.setglue
local properties = nodes.properties.data
@@ -720,7 +720,7 @@ local function profilelist(line,mvl)
if action then
local ok = action(top,bot,t_profile,b_profile,specification)
if ok and lastglue and distance ~= 0 then
- resetglue(lastglue)
+ setglue(lastglue)
end
end
t_profile.done = true
@@ -826,7 +826,7 @@ function profiling.profilebox(specification)
if action then
local ok = action(top,bot,t_profile,b_profile,specification)
if ok and lastglue and distance ~= 0 then
- reset_glue(lastglue)
+ setglue(lastglue)
end
end
t_profile.done = true
diff --git a/tex/context/base/mkiv/status-files.pdf b/tex/context/base/mkiv/status-files.pdf
index 0af031181..0885f937d 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 11167c0ca..710b5e838 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/typo-krn.lua b/tex/context/base/mkiv/typo-krn.lua
index bb9061c56..7607fc5f5 100644
--- a/tex/context/base/mkiv/typo-krn.lua
+++ b/tex/context/base/mkiv/typo-krn.lua
@@ -50,7 +50,7 @@ local setsubtype = nuts.setsubtype
local texsetattribute = tex.setattribute
local unsetvalue = attributes.unsetvalue
-local resetglue = nuts.resetglue
+local setglue = nuts.setglue -- todo
local new_kern = nodepool.kern
local new_glue = nodepool.glue
@@ -554,13 +554,13 @@ function kerns.handler(head)
local width = w + gluefactor * w * krn
local stretch = getfield(start,"stretch") * width / w
local shrink = getfield(start,"shrink") * width / w
- setfield(start,"width",width)
if fillup then
stretch = 2 * stretch
shrink = 2 * shrink
setfield(start,"stretch_order",1)
-- shrink_order ?
end
+ setfield(start,"width",width)
setfield(start,"stretch",stretch)
setfield(start,"shrink", shrink)
--
diff --git a/tex/context/base/mkiv/typo-tal.lua b/tex/context/base/mkiv/typo-tal.lua
index f76a69a26..a67cd0a4b 100644
--- a/tex/context/base/mkiv/typo-tal.lua
+++ b/tex/context/base/mkiv/typo-tal.lua
@@ -54,7 +54,8 @@ local insert_node_after = nuts.insert_after
local traverse_list_by_id = nuts.traverse_id
local dimensions_of_list = nuts.dimensions
local first_glyph = nuts.first_glyph
-local reset_glue = nuts.reset_glue
+
+local setglue = nuts.setglue
local nodepool = nuts.pool
local new_kern = nodepool.kern
@@ -260,7 +261,7 @@ function characteralign.handler(originalhead,where)
local prev = getprev(current)
if next and prev and getid(next) == glyph_code and getid(prev) == glyph_code then -- too much checking
local width = fontcharacters[getfont(b_start)][separator or period].width
- reset_glue(current,width)
+ setglue(current,width)
setattr(current,a_character,punctuationspace)
if a_start then
a_stop = current
diff --git a/tex/generic/context/luatex/luatex-fonts-merged.lua b/tex/generic/context/luatex/luatex-fonts-merged.lua
index c1d06ea0e..f354a246f 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 : 03/30/16 11:59:12
+-- merge date : 03/31/16 09:08:01
do -- begin closure to overcome local limits and interference
@@ -20938,13 +20938,21 @@ local function spaceinitializer(tfmdata,value)
local kerns=coverage[32]
if kerns then
for k,v in next,kerns do
- right[k]=v
+ if type(v)=="table" then
+ right[k]=v[3]
+ else
+ right[k]=v
+ end
end
end
for k,v in next,coverage do
local kern=v[32]
if kern then
- left[k]=kern
+ if type(v)=="table" then
+ left[k]=kern[3]
+ else
+ left[k]=kern
+ end
end
end
end