From: Thomas Meyer <thomasgmeyer@t-online.de>
To: ntg-context@ntg.nl
Subject: [NTG-context] Re: context version 20240118 ("Registerhaltigkeit")
Date: Tue, 23 Jan 2024 11:39:58 +0100 [thread overview]
Message-ID: <738a95ff-2213-42b9-9d03-a311cc7a078b@t-online.de> (raw)
In-Reply-To: <ffc74ad8-710b-536e-f6bb-2022fadc7df4@gmail.com>
[-- Attachment #1.1: Type: text/plain, Size: 3474 bytes --]
That's it! Many thanks to Hans, Hraban and especially Wolfgang for his
solution. This environment should become part of ConTeXt!
I have been a LaTeX/XeTeX/LuaLaTeX user for over 30 years and used it to
write my papers during my studies and use it for almost all my writing.
Now I wanted to try ConTeXt and will be glad if anyone can help me. As I
said, I am only a user.
Many thanks and best regards
Thomas
Am 22.01.24 um 20:24 schrieb Wolfgang Schuster:
> 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
> ___________________________________________________________________________________
>
[-- Attachment #1.2: Type: text/html, Size: 5903 bytes --]
[-- Attachment #2: Type: text/plain, Size: 511 bytes --]
___________________________________________________________________________________
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
___________________________________________________________________________________
next prev parent reply other threads:[~2024-01-23 10:43 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-14 9:30 [NTG-context] "Registerhaltigkeit" Thomas Meyer
2024-01-14 9:59 ` [NTG-context] "Registerhaltigkeit" Wolfgang Schuster
2024-01-14 10:02 ` Henning Hraban Ramm
2024-01-14 10:21 ` Thomas Meyer
2024-01-14 12:53 ` Wolfgang Schuster
2024-01-14 16:36 ` Thomas Meyer
2024-01-17 19:57 ` Thomas Meyer
2024-01-18 11:59 ` [NTG-context] context version 20240118 (was: "Registerhaltigkeit") Thomas Meyer
2024-01-18 12:06 ` [NTG-context] Re: context version 20240118 Hans Hagen via ntg-context
2024-01-18 12:30 ` Thomas Meyer
2024-01-22 9:47 ` [NTG-context] Re: context version 20240118 ("Registerhaltigkeit") Thomas Meyer
2024-01-22 9:56 ` Hans Hagen via ntg-context
2024-01-22 10:46 ` Thomas Meyer
2024-01-22 11:06 ` Henning Hraban Ramm
2024-01-22 12:04 ` Thomas Meyer
2024-01-22 19:24 ` Wolfgang Schuster
2024-01-23 10:39 ` Thomas Meyer [this message]
2024-01-18 12:51 ` [NTG-context] Re: context version 20240118 (was: "Registerhaltigkeit") luigi scarso
2024-01-18 14:01 ` [NTG-context] Re: context version 20240118 Thomas Meyer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=738a95ff-2213-42b9-9d03-a311cc7a078b@t-online.de \
--to=thomasgmeyer@t-online.de \
--cc=ntg-context@ntg.nl \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).