I wanted to compare the behavior of some float placement options and
recognized that sidefloats (incl. margin & edge) cause funny things in
grid mode:
The first line of the paragraph beside it begins one line too high,
moving into the header or the previous paragraph.
I also checked it without Lua.
"""
\setuppapersize[A6,landscape][A6,landscape,oversized]
\setuplayout[
marking=on,
location=middle,
grid=yes,
]
\setuppagenumbering[
alternative=doublesided,
location=margin,
]
\setupbodyfont[plex,11pt]
%\usemodule[visual]
\useMPlibrary[dum]
\showframe
\showgrid
\defineexternalfigure[zb][width=.4tw,height=5lh]
\starttext
\startluacode
local locations = lpeg.split(lpeg.patterns.spacer, "here force left
right inner outer top bottom bottom,always inleft inright inmargin
leftmargin rightmargin innermargin outermargin leftedge rightedge
inneredge outeredge P right right,high right,low right,height
right,depth right,fit right,reset P page opposite P nonumber none 90 180
270")
context.samplefile("ward")
for s = 1, #locations do
local loc = locations[s]
if loc == "P" then
context.page()
context.samplefile("ward")
else
context.startplacefigure{ location = loc, title = loc }
context.externalfigure({ loc },{ "zb" })
context.stopplacefigure()
context.samplefile("lorem")
end
context.par()
end
\stopluacode
\stoptext
"""
Hraban
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the
Wiki!
maillist : [email protected] /
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___________________________________________________________________________________