diff options
author | Luigi Scarso <luigi.scarso@gmail.com> | 2019-02-22 23:11:47 +0000 |
---|---|---|
committer | Luigi Scarso <luigi.scarso@gmail.com> | 2019-02-22 23:11:47 +0000 |
commit | 5c6357cdb820b4f628d036ba7b2248f221d50c0b (patch) | |
tree | 6365552f2737faaffe63a395272da242ee2c4f03 /Master/texmf-dist/tex/context/base/mkiv/spac-prf.lua | |
parent | b4568bc71e054f3d1fd6404b45d2322631778284 (diff) |
ConTeXt version 2019.02.22 19:35
git-svn-id: svn://tug.org/texlive/trunk@50086 c570f23f-e606-0410-a88d-b1316a301751
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, 15 insertions, 12 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 a28f305932c..32582c56fc5 100644 --- a/Master/texmf-dist/tex/context/base/mkiv/spac-prf.lua +++ b/Master/texmf-dist/tex/context/base/mkiv/spac-prf.lua @@ -17,6 +17,7 @@ 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 @@ -30,10 +31,12 @@ local math_code = nodecodes.math local rule_code = nodecodes.rule local marginkern_code = nodecodes.marginkern -local leaders_code = gluecodes.leaders +local leaders_code = leadercodes.leaders + local lineskip_code = gluecodes.lineskip local baselineskip_code = gluecodes.baselineskip -local line_code = listcodes.line + +local linelist_code = listcodes.line local texlists = tex.lists local settexattribute = tex.setattribute @@ -128,6 +131,9 @@ 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 @@ -136,8 +142,6 @@ local function getprofile(line,step) -- remember p - local wd, ht, dp = 0, 0, 0 - local function progress() position = width width = position + wd @@ -639,7 +643,7 @@ end local function profilelist(line,mvl) - local current = tonut(line) + local current = line local top = nil local bot = nil @@ -668,7 +672,7 @@ local function profilelist(line,mvl) local id = getid(current) if id == hlist_code then local subtype = getsubtype(current) - if subtype == line_code then + if subtype == linelist_code then t_profile = hasprofile(current) if t_profile then top = current @@ -710,7 +714,7 @@ local function profilelist(line,mvl) if id == hlist_code then -- check subtype local subtype = getsubtype(current) - if subtype == line_code then + if subtype == linelist_code then if top == current then -- skip bot = nil -- to be sure @@ -819,7 +823,7 @@ function profiling.profilebox(specification) local id = getid(current) if id == hlist_code then local subtype = getsubtype(current) - if subtype == line_code then + if subtype == linelist_code then if top then bot = current b_profile = setprofile(bot) @@ -899,9 +903,8 @@ end -- -- function profiling.vboxhandler(head,where) -- if head and not ignore[where] then --- local h = tonut(head) --- if getnext(h) then --- profilelist(h) +-- if getnext(head) then +-- profilelist(head) -- end -- end -- return head @@ -911,7 +914,7 @@ function profiling.pagehandler(head) if head then profilelist(head,true) end - return head, true + return head end interfaces.implement { |