From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/85836 Path: news.gmane.org!not-for-mail From: Jaroslav Hajtmar Newsgroups: gmane.comp.tex.context Subject: Re: setuphead for in-paragraph head ? Date: Thu, 09 Jan 2014 15:48:20 +0100 Message-ID: <52CEB6B4.7070308@gyza.cz> References: 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 1389278917 19823 80.91.229.3 (9 Jan 2014 14:48:37 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 9 Jan 2014 14:48:37 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Thu Jan 09 15:48:45 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 1W1Gua-0005IZ-FF for gctc-ntg-context-518@m.gmane.org; Thu, 09 Jan 2014 15:48:44 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id CAD63101E9; Thu, 9 Jan 2014 15:48:43 +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 ZYuMZX-NC-1w; Thu, 9 Jan 2014 15:48:41 +0100 (CET) Original-Received: from balder.ntg.nl (localhost [IPv6:::1]) by balder.ntg.nl (Postfix) with ESMTP id 9EE0B101E2; Thu, 9 Jan 2014 15:48:41 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 9976A101E2 for ; Thu, 9 Jan 2014 15:48:40 +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 ddz2HXn+F8-S for ; Thu, 9 Jan 2014 15:48:38 +0100 (CET) Original-Received: from filter3-utr.mf.surf.net (filter3-utr.mf.surf.net [195.169.124.154]) by balder.ntg.nl (Postfix) with ESMTP id B8C13101DE for ; Thu, 9 Jan 2014 15:48:38 +0100 (CET) Original-Received: from h1.cmg1.smtp.forpsi.com (h1.cmg1.smtp.forpsi.com [81.2.195.162]) by filter3-utr.mf.surf.net (8.14.3/8.14.3/Debian-9.4) with ESMTP id s09Embtk006033 for ; Thu, 9 Jan 2014 15:48:37 +0100 Original-Received: from [192.168.1.194] ([188.116.90.238]) by cmg1.smtp.forpsi.com with bizsmtp id Bqoc1n00258ZT5Y01qocVe; Thu, 09 Jan 2014 15:48:36 +0100 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:17.0) Gecko/20130107 Thunderbird/17.0.2 In-Reply-To: X-Bayes-Prob: 0.3198 (Score 0, tokens from: @@RPTN) X-CanIt-Geo: ip=81.2.195.162; 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: 08LbOMB8B - 18b458204a31 - 20140109 X-Scanned-By: CanIt (www . roaringpenguin . com) on 195.169.124.154 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:85836 Archived-At: Hello Otared. I will throw this one... Thanx. Once I was using exercise-answer package for LaTeX. Is there anything like this to use in ConTeXt? Thanx Jaroslav Hajtmar Dne 9.1.2014 15:19, Otared Kavian napsal(a): > %%% begin example-exercise.tex > %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% > % defining \startexo, \stopexo as an enumeration: > \startsetups style:simple > \defineenumeration[exo] > [alternative=hanging, > width=fit, > stopper={.}, > text=Exercise, > % between=, > before=, > after=\blank] > \stopsetups % style:simple > > \startsetups style:textrule > \definenumber[MyExoNumber][way=bysection,sectionumber=yes] > \setuptextrules[rulecolor=darkred] > \define\ExoCommand{\incrementnumber[MyExoNumber] > \textrule[top]{Exercise \getnumber[MyExoNumber]} > \startbackground[frame=off,leftframe=on,backgroundcolor=white, > framecolor=darkred]} > > \defineenumeration[exo] > [alternative=hanging, > width=fit, > text={}, > number=hide, > number=no, > before={\ExoCommand}, > after={\stopbackground\blank}] > \stopsetups % style:textrule > > % end defining \startexo, \stopexo as an enumeration > %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% > > %defining numbered questions > \defineconversion[exercise][\numbers] > %\setupitemize[packed] > \def\StartQuestions{% > \startitemize[exercise][width=2em,packed,style=bold,stopper=,right=)]} > \def\StopQuestions{\stopitemize} > \def\q{\item} > > % trye each of the following > \setups[style:simple] > %\setups[style:textrule] > > \starttext > \startexo > Prove that for all $a,b\in {\Bbb K}$, a field of characteristic 2, one has $(a+b)^2 = a^2 + b^2$. > \stopexo > > > \startexo > Prove that for all $a,b\in {\Bbb K}$, a field of characteristic 2, one has $(a+b)^4 = a^4 + b^4$. > \stopexo > > \startexo > \StartQuestions > \q Prove that > \startformula > \sum_{n=1}^\infty{1 \over n^2} = {\pi^2 \over 6}. > \stopformula > > \q Prove that for any $n \geq 1$ integer one has > \startformula > \sum_{k=1}^n k^3 = \left({n(n+1) \over 2}\right)^2. > \stopformula > \StopQuestions > \stopexo > > \stoptext > %%% end example-exercise.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 ___________________________________________________________________________________