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

Rik Kabel context at rik.users.panix.com
Mon Aug 13 20:27:53 CEST 2018


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 buffers 
created by \grabbufferdata:

    \setupwhitespace[none]
    \setupindenting[none]
    \starttexdefinition unexpanded startBufTest
       \bgroup
       \dosingleempty\dostartBufTest
    \stoptexdefinition
    \starttexdefinition dostartBufTest [#SETUPS]
       \getrawparameters[BufTest][xx=yy,#SETUPS]
       \grabbufferdata[TestBuffer][startBufTest][stopBufTest]
    \stoptexdefinition
    \starttexdefinition stopBufTest
       \startnarrower[left,right]
       \startparagraph
         \BeforePar{\dontleavehmode\llap{? }}\GotoPar
         \inlinebuffer[TestBuffer]
       \stopparagraph
       \stopnarrower
       \egroup
    \stoptexdefinition

    \starttext

    \startBufTest
       Buffer without blank lines.
    \stopBufTest

    \startBufTest

       Buffer with blank lines.

    \stopBufTest

    \startBufTest[key=value]

       Buffer with \type{[key=value]}.

    \stopBufTest

    \stoptext

-- 

Rik

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.ntg.nl/pipermail/ntg-context/attachments/20180813/3047dc9f/attachment.html>


More information about the ntg-context mailing list