Re: [NTG-context] How can I remove a blank leading line from a buffer

2018-08-16 Thread Rik
On 8/16/2018 10:55, Aditya Mahajan wrote: On Wed, 15 Aug 2018, Rik Kabel wrote: I suspect that the issue in the larger project has to do with quoting for the RE ("^\\relax") since compilation fails with:   %% \stopAttribution ...getcontent("Attribution"),"^\\   %%

Re: [NTG-context] How can I remove a blank leading line from a buffer

2018-08-16 Thread Aditya Mahajan
On Wed, 15 Aug 2018, Rik Kabel wrote: On 8/15/2018 03:07, Hans Hagen wrote: On 8/15/2018 5:31 AM, Aditya Mahajan wrote: On Tue, 14 Aug 2018, Rik Kabel wrote: I really think, though, that a buffers.strip function would be the way to go, instead of futzing after the damage is done. In lua,

Re: [NTG-context] How can I remove a blank leading line from a buffer

2018-08-15 Thread Rik Kabel
On 8/15/2018 03:07, Hans Hagen wrote: On 8/15/2018 5:31 AM, Aditya Mahajan wrote: On Tue, 14 Aug 2018, Rik Kabel wrote: I really think, though, that a buffers.strip function would be the way to go, instead of futzing after the damage is done. In lua, buffers.getcontent('name') gives the

Re: [NTG-context] How can I remove a blank leading line from a buffer

2018-08-15 Thread Hans Hagen
On 8/15/2018 5:31 AM, Aditya Mahajan wrote: On Tue, 14 Aug 2018, Rik Kabel wrote: I really think, though, that a buffers.strip function would be the way to go, instead of futzing after the damage is done. In lua, buffers.getcontent('name') gives the contents of the buffer labelled 'name'.

Re: [NTG-context] How can I remove a blank leading line from a buffer

2018-08-14 Thread Aditya Mahajan
On Tue, 14 Aug 2018, Rik Kabel wrote: I really think, though, that a buffers.strip function would be the way to go, instead of futzing after the damage is done. In lua, buffers.getcontent('name') gives the contents of the buffer labelled 'name'. You can post-process this in whatever way you

Re: [NTG-context] How can I remove a blank leading line from a buffer

2018-08-14 Thread Rik Kabel
On 8/13/2018 18:43, Rik Kabel wrote: On 8/13/2018 15:52, Wolfgang Schuster wrote: Rik Kabel schrieb am 13.08.18 um 20:27: On 8/13/2018 13:46, Wolfgang Schuster wrote: \starttext \BeforePar{\dontleavehmode\llap{? }}\GotoPar \input knuth \startnarrower \BeforePar{\dontleavehmode\llap{?

Re: [NTG-context] How can I remove a blank leading line from a buffer

2018-08-13 Thread Rik Kabel
On 8/13/2018 15:52, Wolfgang Schuster wrote: Rik Kabel schrieb am 13.08.18 um 20:27: On 8/13/2018 13:46, Wolfgang Schuster wrote: \starttext \BeforePar{\dontleavehmode\llap{? }}\GotoPar \input knuth \startnarrower \BeforePar{\dontleavehmode\llap{? }}\GotoPar \input knuth \stopnarrower

Re: [NTG-context] How can I remove a blank leading line from a buffer

2018-08-13 Thread Wolfgang Schuster
Rik Kabel schrieb am 13.08.18 um 20:27: On 8/13/2018 13:46, Wolfgang Schuster wrote: \starttext \BeforePar{\dontleavehmode\llap{? }}\GotoPar \input knuth \startnarrower \BeforePar{\dontleavehmode\llap{? }}\GotoPar \input knuth \stopnarrower \stoptext Wolfgang I am applying it

Re: [NTG-context] How can I remove a blank leading line from a buffer

2018-08-13 Thread Rik Kabel
On 8/13/2018 13:46, Wolfgang Schuster wrote: \starttext \BeforePar{\dontleavehmode\llap{? }}\GotoPar \input knuth \startnarrower \BeforePar{\dontleavehmode\llap{? }}\GotoPar \input knuth \stopnarrower \stoptext Wolfgang I am applying it incorrectly, or it does not work with the

Re: [NTG-context] How can I remove a blank leading line from a buffer

2018-08-13 Thread Rik Kabel
On 8/13/2018 10:28, Rik Kabel wrote: That works for the over-simplified case here, but fails in practice. For a \startnarrower[left] paragraph, the mark is still in the main margin, not the 'margin' of the narrowed paragraph. Also, the placement of the text in the margin is wrong and not

Re: [NTG-context] How can I remove a blank leading line from a buffer

2018-08-13 Thread Wolfgang Schuster
Rik Kabel schrieb am 13.08.18 um 19:09: On 8/13/2018 12:04, Wolfgang Schuster wrote: Hi Rik, what do you want to achieve and why do you need a buffer for it? Wolfgang Fair question. I have a document with many (400+) block quotations. Each consists of a text extract, which may be prose

Re: [NTG-context] How can I remove a blank leading line from a buffer

2018-08-13 Thread Rik Kabel
On 8/13/2018 12:04, Wolfgang Schuster wrote: Hi Rik, what do you want to achieve and why do you need a buffer for it? Wolfgang Fair question. I have a document with many (400+) block quotations. Each consists of a text extract, which may be prose or poetry, and additional optional

Re: [NTG-context] How can I remove a blank leading line from a buffer

2018-08-13 Thread Rik Kabel
On 8/13/2018 10:28, Rik Kabel wrote: On 8/13/2018 03:01, Hans Hagen wrote: On 8/13/2018 5:18 AM, Rik Kabel wrote:   \startparagraph % \dontleavehmode\llap{\Mark}\inlinebuffer[TestBuffer] % \ (first: \First, arg: \Arg)     \margintext{\Mark}     \setupparagraphintro[first][(first:

Re: [NTG-context] How can I remove a blank leading line from a buffer

2018-08-13 Thread Wolfgang Schuster
Rik Kabel schrieb am 13.08.18 um 16:28: Hans, That works for the over-simplified case here, but fails in practice. For a \startnarrower[left] paragraph, the mark is still in the main margin, not the 'margin' of the narrowed paragraph. Also, the placement of the text in the margin is wrong

Re: [NTG-context] How can I remove a blank leading line from a buffer

2018-08-13 Thread Rik Kabel
On 8/13/2018 03:01, Hans Hagen wrote: On 8/13/2018 5:18 AM, Rik Kabel wrote: %% How can one remove blank lines at the start of a buffer so that %%   commands that grab a buffer can be used in the same way as, for %%   example, \startparagraph...\stopparagraph, which allow blank %%   lines

Re: [NTG-context] How can I remove a blank leading line from a buffer

2018-08-13 Thread Hans Hagen
On 8/13/2018 5:46 AM, Henri Menke wrote: % Ignore first \par \def\par{\let\par\normalpar} Sort of dangerous ... redefining such core commands or primitives can have side effects as one never knows what explicit \par's are issued. Hans

Re: [NTG-context] How can I remove a blank leading line from a buffer

2018-08-13 Thread Hans Hagen
On 8/13/2018 5:18 AM, Rik Kabel wrote: %% How can one remove blank lines at the start of a buffer so that %%   commands that grab a buffer can be used in the same way as, for %%   example, \startparagraph...\stopparagraph, which allow blank %%   lines around the content? %% %% The problem

Re: [NTG-context] How can I remove a blank leading line from a buffer

2018-08-12 Thread Henri Menke
On 13/08/18 15:18, Rik Kabel wrote: %% How can one remove blank lines at the start of a buffer so that %%   commands that grab a buffer can be used in the same way as, for %%   example, \startparagraph...\stopparagraph, which allow blank %%   lines around the content? %% %% The problem appears

Re: [NTG-context] How can I remove a blank leading line from a buffer

2018-08-12 Thread Aditya Mahajan
On Sun, 12 Aug 2018, Rik Kabel wrote: %% How can one remove blank lines at the start of a buffer so that %% commands that grab a buffer can be used in the same way as, for %% example, \startparagraph...\stopparagraph, which allow blank %% lines around the content? %% %% The problem

[NTG-context] How can I remove a blank leading line from a buffer

2018-08-12 Thread Rik Kabel
%% How can one remove blank lines at the start of a buffer so that %% commands that grab a buffer can be used in the same way as, for %% example, \startparagraph...\stopparagraph, which allow blank %% lines around the content? %% %% The problem appears when an optional argument is allowed