Dear list members,

How can I prevent that a question block breaks across a page?

Kind regards,
Jan Willem Flamma


MWE

\defineblock[question]
\defineblock[answer]

\hideblocks[question] 
\hideblocks[answer]     
 

\defineenumeration
    [question]
    [text={Question},
     after={\blank[2*big]},
     inbetween={\blank[nowhite]},
     way=bychapter,
     prefixsegments=chapter,
     prefix=yes]
          
\defineenumeration
    [answer]
    [counter=answer,
     text=,
     width=,
     before={\blank[nowhite]},
     after={\blank[nowhite]},
     indenting=no,
     titledistance=1cm,
     location=inmargin,
     alternative=left,
     headstyle=,
     way=bychapter,
     prefixsegments=chapter,
     prefix=yes]

\starttext

\startchapter

\startbuffer[question]
\beginquestion
\startquestion
Question text
\startitemize[a,packed][stopper=,right=)]
\item Answer 1
\item Answer 2
\item Answer 3
\item Answer 4
\item Answer 5
\stopitemize
\stopquestion
\endquestion
\beginanswer
\startanswer
B
\stopanswer
\endanswer
\stopbuffer

\dorecurse{30}{\getbuffer[question]}

\startsection[title=Questions]
\useblocks[question][criterium=chapter]
\page
\startsubsubsection[title=Answers]
\useblocks[answer][criterium=chapter]
\stopsubsubsection

\stopsection

\stopchapter

\stoptext
___________________________________________________________________________________
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