From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/85834 Path: news.gmane.org!not-for-mail From: Otared Kavian Newsgroups: gmane.comp.tex.context Subject: Re: setuphead for in-paragraph head ? Date: Thu, 9 Jan 2014 15:19:33 +0100 Message-ID: References: Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 (Mac OS X Mail 7.1 \(1827\)) Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1389277193 30323 80.91.229.3 (9 Jan 2014 14:19:53 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 9 Jan 2014 14:19:53 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Thu Jan 09 15:20:01 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 1W1GSj-0004dz-Ej for gctc-ntg-context-518@m.gmane.org; Thu, 09 Jan 2014 15:19:57 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 858F0101EA; Thu, 9 Jan 2014 15:19:54 +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 DZqWIPT64ncx; Thu, 9 Jan 2014 15:19:52 +0100 (CET) Original-Received: from balder.ntg.nl (localhost [IPv6:::1]) by balder.ntg.nl (Postfix) with ESMTP id CCA8D101E2; Thu, 9 Jan 2014 15:19:52 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 8F0B7101E2 for ; Thu, 9 Jan 2014 15:19:51 +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 Xw2y6ENQNMU0 for ; Thu, 9 Jan 2014 15:19:38 +0100 (CET) Original-Received: from filter1-utr.mf.surf.net (filter1-utr.mf.surf.net [195.169.124.152]) by balder.ntg.nl (Postfix) with ESMTP id 3DA57101DE for ; Thu, 9 Jan 2014 15:19:38 +0100 (CET) Original-Received: from mail-wi0-x233.google.com (mail-wi0-x233.google.com [IPv6:2a00:1450:400c:c05::233]) by filter1-utr.mf.surf.net (8.14.3/8.14.3/Debian-9.4) with ESMTP id s09EJafg005251 (version=TLSv1/SSLv3 cipher=RC4-SHA bits=128 verify=NOT) for ; Thu, 9 Jan 2014 15:19:37 +0100 Original-Received: by mail-wi0-f179.google.com with SMTP id z2so3528000wiv.0 for ; Thu, 09 Jan 2014 06:19:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=content-type:mime-version:subject:from:in-reply-to:date :content-transfer-encoding:message-id:references:to; bh=RabCAykjvmpaYUuWfV6+GUbOGzviPsBTM6dVmGVcRp8=; b=v16tAY04RlT1uZJsD+Jn3BspgvJvNnRxnmfZKzya6Y/57U1GK25r6pOorZv0dnsNu1 j3aWjsVUxQVor4QAkW3wEvP0tSzZEnQMiRWS39fWF+IbK1jxhk4QihK9axF5jgYG7hlL FU2mjrzUOLnBHp3peJKZT5kGtsIR/YZvJTU88NmUVKpfo6p7QlaZZeRD6kxOrPa1qG4b wKuJmnT11XWyRsZZVVmde8BDFXnec9kfK50EivwQ+246KLL3vikxhmkyv5QYjARWfk7/ JRv1PblZFpljB5gvptvS5OXfEkumadDbz+fpb2yqfdSdQh98VZbdtXPXkzN0RgdgleCh 72Ag== X-Received: by 10.180.212.98 with SMTP id nj2mr3535705wic.52.1389277176914; Thu, 09 Jan 2014 06:19:36 -0800 (PST) Original-Received: from [192.168.1.35] (75.218.192.77.rev.sfr.net. [77.192.218.75]) by mx.google.com with ESMTPSA id j9sm1666730wjz.13.2014.01.09.06.19.35 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 09 Jan 2014 06:19:36 -0800 (PST) In-Reply-To: X-Mailer: Apple Mail (2.1827) X-Bayes-Prob: 0.0001 (Score 0, tokens from: @@RPTN) X-CanIt-Geo: ip=2a00:1450:400c:c05::233; country=IE X-CanItPRO-Stream: uu:ntg-context@ntg.nl (inherits from uu:default, base:default) X-Canit-Stats-ID: 07LbOjARu - b87349d010ef - 20140109 (trained as not-spam) X-Scanned-By: CanIt (www . roaringpenguin . com) 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:85834 Archived-At: Hi Jean Guillaume, I guess Marco Patzer and Wolfgang Schuster gave you already the appropriate answers. Nevertheless, I wanted to share with you the definitions I use for the kind of work you want to do: %%% 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 Best regards: OK On 9 janv. 2014, at 14:23, Jean-Guillaume wrote: > But this: > > \definehead > [Exercise] [subsection] > [after=] > \starttext > \startExercise [title=This is the exercise's title] > The exercise's content. > \stopExercise > \stoptext > > results to: > > 1 This is the exercise's title > The exercise's content. > > and I would like it to be: > > 1 This is the exercise's title The exercise's content. > > (When I can typeset that, I will see about formatting the number and so on.) > > I'm sorry it wasn't very clear. Now I understand that I misunderstood > \startExercise{...} for \startExercise[title=...] and that's why I was > confused about which newline I want to get rid of. > > Jean-Guillaume > ___________________________________________________________________________________ > 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 ___________________________________________________________________________________