Thomas Meyer schrieb am 22.01.2024 um 13:04:
Am 22.01.24 um 12:06 schrieb Henning Hraban Ramm:
Am 22.01.24 um 11:46 schrieb Thomas Meyer:
I might get a bit impatient if I have the impression that others get
an answer faster. Sorry for that.
It’s not unusual to get that impression. It depends on the current
attention, capacity and mood of the few who can answer your questions.
So the problem is still \hfill that the last paragraph is not on grid
in the new and the old version (and comma).
Grid is not as easy as it looks first. Low level tricks like fills or
skips can mess it up.
Maybe \startlinecorrection helps… (No, it doesn’t.)
It also doesn’t help to add a \blank or \par after \vfill.
I know it, i tried it. And I tried \snaptogrid \vbox {}, it doesn't work
too.
Only counting empty rows and set the number in \blank[ *big] works!
You need a fixed space (multiple of the line distance) between the text
blocks and \vfill is a variable space which isn't what you want here.
TO get the desired space between the blocks you have to measure the
height of the text at the bottom and calculate the number of lines which
have to be added in the gap. Below is a simple solution which adds the
required number of \blank lines.
\def\PlaceAtBottom
{\par
\dowithnextbox
{\scratchdimen\dimexpr\pagegoal-\pagetotal\relax
\ifdim\nextboxht>\scratchdimen
\page
\getnoflines{\dimexpr\textheight-\nextboxht\relax}%
\dontleavehmode\blank[\number\numexpr\noflines-2\relax*line]%
\unvbox\nextbox
\else
\getnoflines{\dimexpr\scratchdimen-\nextboxht\relax}%
\blank[\number\numexpr\noflines-1\relax*line]%
\unvbox\nextbox
\fi}
\vbox}
\let\stopPlaceAtBottom\egroup
\def\startPlaceAtBottom
{\PlaceAtBottom\bgroup}
\mainlanguage[de]
\setupbodyfont[libertinus, 12pt]
\setuppagenumbering
[location={footer,middle}]
\setuplayout
[grid=yes]
\showgrid
\starttext
\samplefile{lorem}
\startPlaceAtBottom
{\sl\samplefile{lorem}}
\stopPlaceAtBottom
\page
\dorecurse{4}{\samplefile{lorem}}
\startPlaceAtBottom
{\sl\samplefile{lorem}}
\stopPlaceAtBottom
\stoptext
Wolfgang
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the
Wiki!
maillist : ntg-context@ntg.nl /
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
___________________________________________________________________________________