diff options
author | Hans Hagen <pragma@wxs.nl> | 2014-06-01 13:44:00 +0200 |
---|---|---|
committer | Hans Hagen <pragma@wxs.nl> | 2014-06-01 13:44:00 +0200 |
commit | ca16b82275f15170ca269f77b9dd9b0e29bbd7f6 (patch) | |
tree | d5a68f87d7d5f27d123adb0944ffc00e75257ba4 /tex/context/base/spac-ver.lua | |
parent | 734668b53af40fe48edadf817b87acd5b2ccc3b3 (diff) | |
download | context-ca16b82275f15170ca269f77b9dd9b0e29bbd7f6.tar.gz |
beta 2014.06.01 13:44
Diffstat (limited to 'tex/context/base/spac-ver.lua')
-rw-r--r-- | tex/context/base/spac-ver.lua | 19 |
1 files changed, 16 insertions, 3 deletions
diff --git a/tex/context/base/spac-ver.lua b/tex/context/base/spac-ver.lua index 018881663..55c135cf6 100644 --- a/tex/context/base/spac-ver.lua +++ b/tex/context/base/spac-ver.lua @@ -879,6 +879,8 @@ local special_penalty_xxx = 0 -- header don't break but also make sure that we have at least a decent -- break when we have succesive ones (often when testing) +-- todo: mark headers as such so that we can recognize them + local specialmethods = { } local specialmethod = 1 @@ -927,10 +929,21 @@ specialmethods[1] = function(start,penalty) return end elseif trace_specials then - report_specials(" context %a, higher level, continue",p) + report_specials(" context penalty %a, higher level, continue",p) + end + else + local p = getfield(current,"penalty") + if p < 10000 then + -- assume some other mechanism kicks in so we seem to have content + if trace_specials then + report_specials(" regular penalty %a, quitting",p) + end + break + else + if trace_specials then + report_specials(" regular penalty %a, continue",p) + end end - elseif trace_specials then - report_specials(" regular penalty, continue") end end current = getprev(current) |