strc-flt.lua /size: 1298 b    last modification: 2021-10-28 13:50
1
if
not
modules
then
modules
=
{
}
end
modules
[
'
strc-flt
'
]
=
{
2
version
=
1
.
001
,
3
comment
=
"
companion to strc-flt.mkiv
"
,
4
author
=
"
Hans Hagen, PRAGMA-ADE, Hasselt NL
"
,
5
copyright
=
"
PRAGMA ADE / ConTeXt Development Team
"
,
6
license
=
"
see context related readme files
"
7
}
8 9
-- nothing
10 11
local
sequencers
=
utilities
.
sequencers
12
local
appendaction
=
sequencers
.
appendaction
13
local
enableaction
=
sequencers
.
enableaction
14
local
disableaction
=
sequencers
.
disableaction
15 16
local
texgetdimen
=
tex
.
getdimen
17 18
local
trace
=
trackers
.
register
(
"
structure.sidefloats.pageflush
"
)
19
local
report
=
logs
.
reporter
(
"
structure
"
,
"
floats
"
)
20 21
local
forcepageflush
=
builders
.
vspacing
.
forcepageflush
22 23
function
builders
.
checksidefloat
(
mode
,
indented
)
24
local
s
=
texgetdimen
(
"
d_page_sides_vsize
"
)
25
if
s
>
0
then
26
if
trace
then
27
report
(
"
force flushing page state, height %p
"
,
s
)
28
end
29
forcepageflush
(
)
30
end
31
return
indented
32
end
33 34
appendaction
(
"
paragraph
"
,
"
system
"
,
"
builders.checksidefloat
"
)
35
disableaction
(
"
paragraph
"
,
"
builders.checksidefloat
"
)
36 37
interfaces
.
implement
{
38
name
=
"
enablesidefloatchecker
"
,
39
onlyonce
=
true
,
40
actions
=
function
(
)
41
enableaction
(
"
paragraph
"
,
"
builders.checksidefloat
"
)
42
end
,
43
}
44