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{? }}\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


\starttexdefinition stopBufTest
  \startnarrower[left,right]
  \startparagraph
    \dontleavehmode\llap{? }%
    \blank[overlay]
    \inlinebuffer[TestBuffer]
  \stopparagraph
  \stopnarrower
  \egroup
\stoptexdefinition


Wolfgang

Thank you, Wolfgang. That does it. Note that the % escaping the line end is not needed (    although it might be needed outside a \starttexdefinition environment) – the following works as well:


    \starttexdefinition stopBufTest

      \startnarrower[left,right]

      \startparagraph

        \dontleavehmode{\llap{? }}

        \blank[overlay]

        \inlinebuffer[TestBuffer]

      \stopparagraph

      \stopnarrower

      \egroup

    \stoptexdefinition



Alas, this is not yet a workable solution. It does not work with a layout of grid=tolerant, which I am currently using (although it does work with some other grid settings). For now I will just add empty [] to the startBufTest invocations.

I really think, though, that a buffers.strip function would be the way to go, instead of futzing after the damage is done.

--
Rik
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

Reply via email to