diff options
author | Hans Hagen <pragma@wxs.nl> | 2014-06-25 19:46:00 +0200 |
---|---|---|
committer | Hans Hagen <pragma@wxs.nl> | 2014-06-25 19:46:00 +0200 |
commit | 1b5137f5fffe265b044838d6ee87d27070902180 (patch) | |
tree | 1282944b13996aa6aad9bd2800fbbff1bdae9f86 /tex/context/base/typo-pag.lua | |
parent | a9c288d372917c485a2882593ed18c8044bf82f1 (diff) | |
download | context-1b5137f5fffe265b044838d6ee87d27070902180.tar.gz |
beta 2014.06.25 19:46
Diffstat (limited to 'tex/context/base/typo-pag.lua')
-rw-r--r-- | tex/context/base/typo-pag.lua | 23 |
1 files changed, 12 insertions, 11 deletions
diff --git a/tex/context/base/typo-pag.lua b/tex/context/base/typo-pag.lua index 5b96e9c21..53f79fcfc 100644 --- a/tex/context/base/typo-pag.lua +++ b/tex/context/base/typo-pag.lua @@ -52,6 +52,9 @@ trackers.register("parbuilders.keeptogether", function(v) trace_keeptogether = -- when no hlists are there ? ... maybe the local_par function parbuilders.registertogether(line,specification) -- might change + if not specification then + return + end if not enabled then nodes.tasks.enableaction("finalizers","builders.paragraphs.keeptogether") end @@ -87,18 +90,16 @@ function parbuilders.registertogether(line,specification) -- might change if trace_keeptogether then local a = a or last local c = cache[a] - if trace_keeptogether then - local noflines = specification.lineheight - local height = c.height - local depth = c.depth - local slack = c.slack - if not noflines or noflines == 0 then - noflines = "unknown" - else - noflines = math.round((height + depth - slack) / noflines) - end - report_keeptogether("registered, index %s, height %p, depth %p, slack %p, noflines %a",a,height,depth,slack,noflines) + local noflines = specification.lineheight + local height = c.height + local depth = c.depth + local slack = c.slack + if not noflines or noflines == 0 then + noflines = "unknown" + else + noflines = math.round((height + depth - slack) / noflines) end + report_keeptogether("registered, index %s, height %p, depth %p, slack %p, noflines %a",a,height,depth,slack,noflines) end end |