Hi Jaroslav, Actually the formatting of what you put in the block determined for example by \beginanswer The answer is… \endanswer is independent of the block mechanism: you can use whatever structure you want. In the example we exchanged on, an enumeration such as \startanswer \stopanswer where this \start \stop has been defined by \defineenumeration[answer], but you can use your own compact formatting instead of this.
Best regards: OK On 12 janv. 2014, at 11:45, Jaroslav Hajtmar <hajt...@gyza.cz> wrote: > Hello Otared and Wolfgang. > > Thanks for launching this example. > Is there a possibility to write the answers into a more compact form (more > columns, one paragraph, etc) like in any textbooks? I tried experimenting, > but I was unable to put answers into a compact form. > Thanks Jaroslav Hajtmar > > Here is my modification of answer enumeration (not working): > > %%%% begin question-hint-answer-blocks.tex > \defineblock[question] > \defineblock[hint] > \defineblock[answer] > > \defineenumeration[question] > [alternative=hanging, > width=2.5cm, > text={Question}, > headstyle={\bi}, > stopper={.}] > > \defineenumeration[hint] > [alternative=hanging, > width=4cm, > text={Hint for question}, > headstyle={\bi}, > stopper={.}] > > \defineenumeration[answer] > [alternative=hanging, > beforehead=, > afterhead=, > before={\startcolumns[n=4]}, > after=\stopcolumns, > width=0.5em, > text={}, > headstyle={}, > stopper={.}] > > \setupblock[question][before={\startquestion},after={\stopquestion}] > \setupblock[hint][before={\starthint},after={\stophint}] > \setupblock[answer][before={\startanswer},after={\stopanswer}] > > \keepblocks[question] > \hideblocks[hint] > \hideblocks[answer] > > \starttext > > \section{Questions} > > \beginquestion > Compute $4\times 5$. > \endquestion > > \beginhint > Use the fact that $2\times 5 = 10$. > \endhint > > \beginanswer > $20$. > \endanswer > > \beginquestion > What is the value of $100 / 10$? > \endquestion > > \beginhint > Remember that $10\times 10 = 100$. > \endhint > > \beginanswer > $10$ > \endanswer > > \beginquestion > Compute $4\times 5$. > \endquestion > > \beginhint > Use the fact that $2\times 5 = 10$. > \endhint > > \beginanswer > $20$. > \endanswer > > \beginquestion > What is the value of $100 / 10$? > \endquestion > > \beginhint > Remember that $10\times 10 = 100$. > \endhint > > \beginanswer > $10$ > \endanswer > > \beginquestion > Compute $4\times 5$. > \endquestion > > \beginhint > Use the fact that $2\times 5 = 10$. > \endhint > > \beginanswer > $20$. > \endanswer > > \beginquestion > What is the value of $100 / 10$? > \endquestion > > \beginhint > Remember that $10\times 10 = 100$. > \endhint > > \beginanswer > $10$ > \endanswer > \beginquestion > Compute $4\times 5$. > \endquestion > > \beginhint > Use the fact that $2\times 5 = 10$. > \endhint > > \beginanswer > $20$. > \endanswer > > \beginquestion > What is the value of $100 / 10$? > \endquestion > > \beginhint > Remember that $10\times 10 = 100$. > \endhint > > \beginanswer > $10$ > \endanswer > > > \section{Hints to all questions} > > \useblocks[hint] > > \section{Answers to all questions} > > \useblocks[answer] > > \stoptext > %%%% end question-hint-answer-blocks.tex > > > > Dne 11.1.2014 20:01, Otared Kavian napsal(a): >> %%%% begin question-hint-answer-blocks.tex >> \defineblock[question] >> \defineblock[hint] >> \defineblock[answer] >> >> \defineenumeration[question] >> [alternative=hanging, >> width=2.5cm, >> text={Question}, >> headstyle={\bi}, >> stopper={.}] >> >> \defineenumeration[hint] >> [alternative=hanging, >> width=4cm, >> text={Hint for question}, >> headstyle={\bi}, >> stopper={.}] >> >> \defineenumeration[answer] >> [alternative=hanging, >> width=4.5cm, >> text={Answer to question}, >> headstyle={\bi}, >> stopper={.}] >> >> \setupblock[question][before={\startquestion},after={\stopquestion}] >> \setupblock[hint][before={\starthint},after={\stophint}] >> \setupblock[answer][before={\startanswer},after={\stopanswer}] >> >> \keepblocks[question] >> \hideblocks[hint] >> \hideblocks[answer] >> >> \starttext >> >> \section{Questions} >> >> \beginquestion >> Compute $4\times 5$. >> \endquestion >> >> \beginhint >> Use the fact that $2\times 5 = 10$. >> \endhint >> >> \beginanswer >> $20$. >> \endanswer >> >> \beginquestion >> What is the value of $100 / 10$? >> \endquestion >> >> \beginhint >> Remember that $10\times 10 = 100$. >> \endhint >> >> \beginanswer >> $10$ >> \endanswer >> >> \section{Hints to all questions} >> >> \useblocks[hint] >> >> \section{Answers to all questions} >> >> \useblocks[answer] >> >> \stoptext >> %%%% end question-hint-answer-blocks.tex > > ___________________________________________________________________________________ > 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://tex.aanhet.net > archive : http://foundry.supelec.fr/projects/contextrev/ > wiki : http://contextgarden.net > ___________________________________________________________________________________ ___________________________________________________________________________________ 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://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________________