Re: buffer question

Jim via ntg-context <[email protected]> Fri, 17 Apr 2026 14:24:04 -0300
Newsgroups gmane.comp.tex.context
Message-ID <[email protected]>
On Fri, Apr 17, 2026 at 18:40 (+0200), Wolfgang Schuster wrote:

> Am 17.04.2026 um 16:32 schrieb Jim via ntg-context:
>> On Thu, Apr 16, 2026 at 23:41 (+0200), Hans Hagen via ntg-context wrote:

>>> - hang my plain-hat on the wall
>>> - stay curious

>> While thee first comment is itself a bit curious, today I am curious about
>> something else.   I do use a buffer, but that isn't the main focus.

>> A while back I was given some advice to use the paragraph environment,
>> rather than the columns environment.  That seemed like a good idea at the
>> time, so I rewrote some macros.

>> Consider the following document, which has had the macros removed, in the
>> spirit of minimalness:

>> [...]

>> Attached is the output, the last bit of which I find curious.

>> Can someone tell me why, inside th \startparagraphs ... \stopparagraphs
>> section, \getbuffer treats the content as if the person was from Verdun?

>> Thanks.

>> (The behaviour is not curious if I use \crlf instead of \\.  While that is
>> a work-around, it doesn't satisfy the curiosity aspect.)

> You used \\ in your example and expected it to result in a line break

I did indeed.

> but this is wrong because \\ has different effects dependant on the
> current scope.

In this particular case, that is unfortunate.

> Example 1:

> \starttext
> \placelist[section]
> \section{two\\words}
> \stoptext

> Example 2:

> \starttext
> \framed{two\\words}
> \framed[align=flushleft]{two\\words}
> \stoptext

> In your case with the paragraphs environment \\ ends the current columns
> and puts the following content in a new column (which doesn't exist in
> your example).

Wolfgang,

thanks for the concise explanation.

If you don't mind a follow-on question:

Supposing, for the moment, that in a certain "paragraphs" situation I will
never ever want to use
        \\
to start a new paragraph; do you foresee me having problems down the line
if I insert
        \let\\=\crlf
as follows:

\defineparagraphs[paras]
                 [n=2, rule=on, distance=0.7cm]
\startparagraphs[paras]
    \typebuffer[lim]
    \nextparas
    \let\\=\crlf 
    \switchtobodyfont[small]
    \getbuffer[lim]
\stopparagraphs

Incidentally(?), I first tried
        before={\let\\=\crlf}
in the second [] group of the \defineparagraphs command, but that had no
observable effect.

Thanks.
                                Jim
___________________________________________________________________________________
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
___________________________________________________________________________________