[dev-context] \startbuffer

Wolfgang Schuster wolfgang.schuster at gmail.com
Thu Jan 3 00:52:05 CET 2013


Hi Hans,

can you add a second (dummy) argument to \startbuffer.

\setuvalue{\e!start\v!buffer}%
  {\begingroup % (3)
   \obeylines
-  \dosingleempty\buff_start}
+  \dodoubleempty\buff_start}

-\def\buff_start[#1]%
+\def\buff_start[#1][#2]%
  {\buff_start_indeed{}{#1}{\e!start\v!buffer}{\e!stop\v!buffer}}


In the following example the space after the right bracket in “\startbuffer[test]” results in a empty first line in the buffer content and with a optional second argument this wouldn’t happen.

\starttext

\def\starttest{\grabbufferdata[test][starttest][stoptest]}

\startbuffer[test]
Text in a normal buffer.
\stopbuffer

“\getbufferdata[test]\removeunwantedspaces”

\starttest
Text in a customized buffer.
\stoptest

“\getbufferdata[test]\removeunwantedspaces”

\stoptext

Wolfgang


More information about the dev-context mailing list