[NTG-context] First letter lost possible cause: \grabbfferdata

Rik Kabel context at rik.users.panix.com
Wed Jun 25 21:51:57 CEST 2014

Recently there have been reports of the first letter of a line of text 
being lost in the database and letter modules.

I tracked down what appears to be the same problem and developed a 

The problem appears to be with the \grabbufferdata command. Something 
has changed in the way it works, and it now swallows the first token of 
the buffer that it grabs. It may also show up with other commands, but 
this is the only one I have found in my projects.

If you have code with this command, a workaround is to insert 
\ignorespaces after it. I have no idea why this helps. If you do not 
have the code (if it is in somebody else's module), then using a blank 
line or dummy argument or \relax after the command that calls the code 
with \grabbufferdata may help.

The following code shows the issues and these workarounds.

    % macros=mkvi

    \starttexdefinition unexpanded startNoIgnore
    \starttexdefinition dostartNoIgnore

    \starttexdefinition unexpanded startWithIgnore
    \starttexdefinition dostartWithIgnore

    \starttexdefinition stopTest

      {\qquad If you can read this the first token was not swallowed.}


    \subject{Test without \tex{ignorespaces}}

    First, the problem:


    And the same with \type{{}}


    Workaround with \tex{relax}


    Workaround with blank line



    \subject{Test with \tex{ignorespaces}}

    This now works:


    And the same with \type{{}}


    And the same with \tex{relax}


    And the same with a blank line after the opening



Rik Kabel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.ntg.nl/pipermail/ntg-context/attachments/20140625/900939bf/attachment.html>

More information about the ntg-context mailing list