ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Problem with buffers in combination with textreference
@ 1999-11-15 15:30 Marc van Dongen
  1999-11-15 17:12 ` Hans Hagen
  0 siblings, 1 reply; 2+ messages in thread
From: Marc van Dongen @ 1999-11-15 15:30 UTC (permalink / raw)


Hello again,

Below there is one macro (no arguments) which if used at
a certain position in the text causes a problem. When
replacing the macro call by its definition, will resolve
the problem.....

I have managed to reduce the problem to the odd 23
lines which are appended together with the error message
below.

Replacing \beginanswer in tmp.tex by its definition resolves
the problem.

It should be noted that changing the line:
    \textreference[Answer]{Answer}%
in m-tmp.tex to some ordinary text also gets rid of the
error.

I cannot see what's causing the problem below.
Is this a bug?

Thanks in advance.

Marc van Dongen

BTW Should I post such questions to this forum or
    is there a more appropriate way of doing things?
_______________________________________________________
     Marc van Dongen, CS Dept | phone:   +353 21 903578
University College Cork, NUIC | Fax:     +353 21 903113
  College Road, Cork, Ireland | Email: dongen@cs.ucc.ie
_______________________________________________________
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Main source: tmp.tex                  %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\usemodule[tmp]
\starttext
   \beginquestion
        \beginanswer % !! Replace by definition of
                     % \beginanswer and it's fine !!
\stopbuffer % !! !! !! has to be fixed !! !! !!
\endgroup   % !! !! !! has to be fixed !! !! !!
%           % !! !! !! Because I would !! !! !!
%           % !! !! !! like to use \endanswer here. !!
   \endquestion
\stoptext
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Module: m-tmp.tex                     %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\def\beginanswer{%
  \begingroup
  \startbuffer[Answerbuffer]
    \textreference[Answer]{Answer}
}
%\endanswer{\endbuffer\endgroup\page[yes]}
\def\beginquestion{%
  \begingroup
  Blah.
}
\def\endquestion{\endgroup}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Error message                         %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
! Argument of \dodostartbuffer has an extra }.
<inserted text> 
                \par 
<to be read again> 
                   }
\doifnot ...f \!!stringa {#1}\edef \!!stringb {#2}
                                                  \unless \ifx \!!stringa \!...

\writetmpblock ... \write \tmpblocks {\string #1}}
                                                  \fi 
\next ...mpblock {\textreference [Answer]{Answer}}
                                                  \copyblockline 
l.6         \beginanswer


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~1999-11-15 17:12 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1999-11-15 15:30 Problem with buffers in combination with textreference Marc van Dongen
1999-11-15 17:12 ` Hans Hagen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).