Re: buffer question
Wolfgang Schuster <[email protected]> Fri, 17 Apr 2026 19:50:13 +0200
| Newsgroups | gmane.comp.tex.context |
|---|---|
| Message-ID | <[email protected]> |
Am 17.04.2026 um 19:24 schrieb Jim via ntg-context:
> 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:
There are no problems for the paragraph environment because you have
better ways to go to a new column.
> \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.
The argument of before is applied before \\ is redefined to change
columns, what you can use as hook is the inner key (but this apply the
change to each column).
%%%% begin example
\defineparagraphs
[Example]
%\setupparagraphs
% [Example]
% [inner=\let\\\crlf]
\startsetups[Example]
\aliased\let\\\crlf
\stopsetups
\setupparagraphs
[Example]
[inner=\texsetup{Example}]
\starttext
\startExample
line 1\crlf
line 2
\nextExample
line 3\\
line 4
\stopExample
%\startparagraphs[Example]
% \startparagraphscell
% line 1\crlf
% line 2
% \stopparagraphscell
% \startparagraphscell
% line 3\crlf
% line 4
% \stopparagraphscell
%\stopparagraphs
\stoptext
%%%% end example
Wolfgang
___________________________________________________________________________________
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
___________________________________________________________________________________