summaryrefslogtreecommitdiff
path: root/tex/context/base/mkiv/typo-bld.lua
diff options
context:
space:
mode:
authorContext Git Mirror Bot <phg42.2a@gmail.com>2016-04-21 22:44:47 +0200
committerContext Git Mirror Bot <phg42.2a@gmail.com>2016-04-21 22:44:47 +0200
commit01eb99bf60b6d94485a9deee54b4c259939ce3e8 (patch)
tree1ebbf95385adb3d49033536b4019772b6cba6626 /tex/context/base/mkiv/typo-bld.lua
parent726df97b4fd308f923fb1b4bf00ce533a7c88ebe (diff)
downloadcontext-01eb99bf60b6d94485a9deee54b4c259939ce3e8.tar.gz
2016-04-21 19:39:00
Diffstat (limited to 'tex/context/base/mkiv/typo-bld.lua')
-rw-r--r--tex/context/base/mkiv/typo-bld.lua86
1 files changed, 21 insertions, 65 deletions
diff --git a/tex/context/base/mkiv/typo-bld.lua b/tex/context/base/mkiv/typo-bld.lua
index 006576f88..ce6a65baf 100644
--- a/tex/context/base/mkiv/typo-bld.lua
+++ b/tex/context/base/mkiv/typo-bld.lua
@@ -231,74 +231,30 @@ end
-- this will be split into contribute_filter for these 4 so at some point
-- thecheck can go away
-if LUATEXVERSION >= 0.895 then
-
- function builders.buildpage_filter(groupcode)
- -- the next check saves 1% runtime on 1000 tufte pages
- local head = texlists.contrib_head
- local done = false
- if head then
- -- called quite often ... maybe time to remove timing
- starttiming(builders)
- if trace_page_builder then
- report(groupcode,head)
- end
- head, done = pageactions(head,groupcode)
- stoptiming(builders)
- -- -- doesn't work here (not passed on?)
- -- tex.pagegoal = tex.vsize - tex.dimen.d_page_floats_inserted_top - tex.dimen.d_page_floats_inserted_bottom
- texlists.contrib_head = head or nil -- needs checking
- -- tex.setlist("contrib_head",head,head and nodes.tail(head))
- return done and head or true -- no return value needed
- else
- -- happens quite often
- if trace_page_builder then
- report(groupcode)
- end
- return nil, false -- no return value needed
- end
- end
-
-else
-
- local build_par_codes = {
- pre_box = true,
- box = true,
- pre_adjust = true,
- adjust = true,
- }
-
- function builders.buildpage_filter(groupcode)
- -- the next check saves 1% runtime on 1000 tufte pages
- local head = texlists.contrib_head
- local done = false
- if build_par_codes[groupcode] then
- -- also called in vbox .. we really need another callback for these four
- normalize(head) -- a bit weird place
+function builders.buildpage_filter(groupcode)
+ -- the next check saves 1% runtime on 1000 tufte pages
+ local head = texlists.contrib_head
+ local done = false
+ if head then
+ -- called quite often ... maybe time to remove timing
+ starttiming(builders)
+ if trace_page_builder then
+ report(groupcode,head)
end
- --
- if head then
- -- called quite often ... maybe time to remove timing
- starttiming(builders)
- if trace_page_builder then
- report(groupcode,head)
- end
- head, done = pageactions(head,groupcode)
- stoptiming(builders)
- -- -- doesn't work here (not passed on?)
- -- tex.pagegoal = tex.vsize - tex.dimen.d_page_floats_inserted_top - tex.dimen.d_page_floats_inserted_bottom
- texlists.contrib_head = head or nil -- needs checking
- -- tex.setlist("contrib_head",head,head and nodes.tail(head))
- return done and head or true -- no return value needed
- else
- -- happens quite often
- if trace_page_builder then
- report(groupcode)
- end
- return nil, false -- no return value needed
+ head, done = pageactions(head,groupcode)
+ stoptiming(builders)
+ -- -- doesn't work here (not passed on?)
+ -- tex.pagegoal = tex.vsize - tex.dimen.d_page_floats_inserted_top - tex.dimen.d_page_floats_inserted_bottom
+ texlists.contrib_head = head or nil -- needs checking
+ -- tex.setlist("contrib_head",head,head and nodes.tail(head))
+ return done and head or true -- no return value needed
+ else
+ -- happens quite often
+ if trace_page_builder then
+ report(groupcode)
end
+ return nil, false -- no return value needed
end
-
end
callbacks.register('vpack_filter', builders.vpack_filter, "vertical spacing etc")