Am 12.09.2025 um 20:03 schrieb Henning Hraban Ramm:
Am 12.09.25 um 19:14 schrieb Aditya Mahajan:
On Fri, 12 Sep 2025, Henning Hraban Ramm wrote:
Apparently, \startlines … \stoplines doesn’t work within a setup.
Is this to be expected?
Yes. When \startsetups is encountered, you are in "normal catcode"
regime, so newline is same as space. So, when you call \setup{...} the
newlines have already been lost.
In principle it is possible to get it work by using some variation of
\obeylines\startsetups, but it is simpler to just use buffers
Thank you (also Wolfgang)!
In case of \startdocument I need the document:stop setup, but I can use
a buffer within a setup:
\startbuffer[b:imprint]
\startlines
© \currentdate[year] Publisher
foo bar baz
blah blah
\stoplines
\stopbuffer
\startsetups imprint
\dontleavehmode\vfill
\subject{Imprint}
\getbuffer[b:imprint]
\stopsetups
Only the lines content has to be in a buffer (or external file)
while the environment itself can remain in the setups block.
\startbuffer[b:imprint]
© \currentdate[year] Publisher
foo bar baz
blah blah
\stopbuffer
\startsetups imprint
\dontleavehmode\vfill
\subject{Imprint}
\startlines
\getbuffer[b:imprint]
\stoplines
\stopsetups
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
___________________________________________________________________________________