diff options
Diffstat (limited to 'Master/texmf-dist/tex/context/base/mkiv/spac-prf.lua')
-rw-r--r-- | Master/texmf-dist/tex/context/base/mkiv/spac-prf.lua | 27 |
1 files changed, 12 insertions, 15 deletions
diff --git a/Master/texmf-dist/tex/context/base/mkiv/spac-prf.lua b/Master/texmf-dist/tex/context/base/mkiv/spac-prf.lua index 32582c56fc5..a28f305932c 100644 --- a/Master/texmf-dist/tex/context/base/mkiv/spac-prf.lua +++ b/Master/texmf-dist/tex/context/base/mkiv/spac-prf.lua @@ -17,7 +17,6 @@ local formatters = string.formatters local nodecodes = nodes.nodecodes local gluecodes = nodes.gluecodes local listcodes = nodes.listcodes -local leadercodes = nodes.leadercodes local glyph_code = nodecodes.glyph local disc_code = nodecodes.disc @@ -31,12 +30,10 @@ local math_code = nodecodes.math local rule_code = nodecodes.rule local marginkern_code = nodecodes.marginkern -local leaders_code = leadercodes.leaders - +local leaders_code = gluecodes.leaders local lineskip_code = gluecodes.lineskip local baselineskip_code = gluecodes.baselineskip - -local linelist_code = listcodes.line +local line_code = listcodes.line local texlists = tex.lists local settexattribute = tex.setattribute @@ -131,9 +128,6 @@ local function getprofile(line,step) local margin = step / 4 local min = 0 local max = ceiling(getwidth(line)/step) + 1 - local wd = 0 - local ht = 0 - local dp = 0 for i=min,max do heights[i] = 0 @@ -142,6 +136,8 @@ local function getprofile(line,step) -- remember p + local wd, ht, dp = 0, 0, 0 + local function progress() position = width width = position + wd @@ -643,7 +639,7 @@ end local function profilelist(line,mvl) - local current = line + local current = tonut(line) local top = nil local bot = nil @@ -672,7 +668,7 @@ local function profilelist(line,mvl) local id = getid(current) if id == hlist_code then local subtype = getsubtype(current) - if subtype == linelist_code then + if subtype == line_code then t_profile = hasprofile(current) if t_profile then top = current @@ -714,7 +710,7 @@ local function profilelist(line,mvl) if id == hlist_code then -- check subtype local subtype = getsubtype(current) - if subtype == linelist_code then + if subtype == line_code then if top == current then -- skip bot = nil -- to be sure @@ -823,7 +819,7 @@ function profiling.profilebox(specification) local id = getid(current) if id == hlist_code then local subtype = getsubtype(current) - if subtype == linelist_code then + if subtype == line_code then if top then bot = current b_profile = setprofile(bot) @@ -903,8 +899,9 @@ end -- -- function profiling.vboxhandler(head,where) -- if head and not ignore[where] then --- if getnext(head) then --- profilelist(head) +-- local h = tonut(head) +-- if getnext(h) then +-- profilelist(h) -- end -- end -- return head @@ -914,7 +911,7 @@ function profiling.pagehandler(head) if head then profilelist(head,true) end - return head + return head, true end interfaces.implement { |