# [NTG-context] Question and Answer Iteration

Jeroen contextntg at gmail.com
Tue Mar 12 18:16:33 CET 2019

```Dear list

The configuration below is what I found for a question and answer section.
If would like the text to start immediately after "question 1",
"question2", etc. and not below it and the same for the answers. Is there
an easy way to achieve this?

Regards, Jeroen

\setupinteraction[state=start]

\define[1]\QuestionTextCommand
{\doglobal\increment\QuestionCounter
\pagereference[question:\QuestionCounter]%
{#1}}

{#1}}

\defineenumeration
[question]
[text=Question,

\defineenumeration

\startbuffer
%
\startquestion
\input knuth
\stopquestion
%
\input knuth
%
\stopbuffer

\starttext
\dorecurse{10}{\getbuffer}

\page