From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/85894 Path: news.gmane.org!not-for-mail From: Jaroslav Hajtmar Newsgroups: gmane.comp.tex.context Subject: Re: setuphead for in-paragraph head ? Date: Sun, 12 Jan 2014 11:45:42 +0100 Message-ID: <52D27256.90000@gyza.cz> References: <52CEB6B4.7070308@gyza.cz> <133B935F-59FF-4C57-9A37-00B42BCAB67F@gmail.com> <3BA99063-FA3F-449B-B022-1A2109B25A59@gmail.com> <8E7ED7B8-29C0-4865-B7A8-DD1BD09709E3@gmail.com> <759FE779-328A-4726-8D77-779D83EA097E@gmail.com> <7528AB5C-EF48-4393-869C-8DD3AA6D8C38@gmail.com> <1CEEA7A0-3472-47A6-9AE9-C7D14CB379D4@gmail.com> Reply-To: hajtmar@gyza.cz, mailing list for ConTeXt users NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; Format="flowed" Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1389523557 19240 80.91.229.3 (12 Jan 2014 10:45:57 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 12 Jan 2014 10:45:57 +0000 (UTC) To: ntg-context@ntg.nl Original-X-From: ntg-context-bounces@ntg.nl Sun Jan 12 11:46:05 2014 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from balder.ntg.nl ([5.39.185.229]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1W2IYO-0003iq-S4 for gctc-ntg-context-518@m.gmane.org; Sun, 12 Jan 2014 11:46:04 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 0ADDD101DE; Sun, 12 Jan 2014 11:46:04 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at balder.ntg.nl Original-Received: from balder.ntg.nl ([127.0.0.1]) by localhost (balder.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id ZZZGeBLw32cp; Sun, 12 Jan 2014 11:46:02 +0100 (CET) Original-Received: from balder.ntg.nl (localhost [IPv6:::1]) by balder.ntg.nl (Postfix) with ESMTP id 209EA101E2; Sun, 12 Jan 2014 11:46:02 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 0E2A9101E2 for ; Sun, 12 Jan 2014 11:46:01 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at balder.ntg.nl Original-Received: from balder.ntg.nl ([127.0.0.1]) by localhost (balder.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id Cmx27l2e4SHZ for ; Sun, 12 Jan 2014 11:45:59 +0100 (CET) Original-Received: from filter3-ams.mf.surf.net (filter3-ams.mf.surf.net [192.87.102.71]) by balder.ntg.nl (Postfix) with ESMTP id C9FD2101DE for ; Sun, 12 Jan 2014 11:45:59 +0100 (CET) Original-Received: from h1.cmg2.smtp.forpsi.com (h1.cmg2.smtp.forpsi.com [81.2.195.188]) by filter3-ams.mf.surf.net (8.14.3/8.14.3/Debian-9.4) with ESMTP id s0CAjwIe001925 for ; Sun, 12 Jan 2014 11:45:59 +0100 Original-Received: from [192.168.20.100] ([88.103.230.14]) by cmg2.smtp.forpsi.com with bizsmtp id Cylx1n0030KHK6001ylxjs; Sun, 12 Jan 2014 11:45:58 +0100 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:17.0) Gecko/20130107 Thunderbird/17.0.2 In-Reply-To: <1CEEA7A0-3472-47A6-9AE9-C7D14CB379D4@gmail.com> X-Bayes-Prob: 0.9986 (Score 4.7, tokens from: @@RPTN) X-CanIt-Geo: ip=81.2.195.188; country=CZ; latitude=49.7500; longitude=15.5000; http://maps.google.com/maps?q=49.7500,15.5000&z=6 X-CanItPRO-Stream: uu:ntg-context@ntg.nl (inherits from uu:default, base:default) X-Canit-Stats-ID: 03LcWJWwU - b6298c249fc1 - 20140112 X-Scanned-By: CanIt (www . roaringpenguin . com) on 192.87.102.71 X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.14 Precedence: list List-Id: mailing list for ConTeXt users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: ntg-context-bounces@ntg.nl Original-Sender: ntg-context-bounces@ntg.nl Xref: news.gmane.org gmane.comp.tex.context:85894 Archived-At: 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 ___________________________________________________________________________________