From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/74786 Path: news.gmane.org!not-for-mail From: Charles Newsgroups: gmane.comp.tex.context Subject: Re: Linebreak in a framed for a chapter setuphead Date: Wed, 29 Feb 2012 16:28:36 +0100 Message-ID: <4F4E4424.20903@vejnar.org> References: <4F4E09BE.5070608@vejnar.org> <4F4E3E9C.4030407@vejnar.org> <26500510-46A7-4A14-98E4-F122BAC16923@googlemail.com> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="windows-1252"; Format="flowed" Content-Transfer-Encoding: quoted-printable X-Trace: dough.gmane.org 1330529344 323 80.91.229.3 (29 Feb 2012 15:29:04 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Wed, 29 Feb 2012 15:29:04 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Wed Feb 29 16:29:03 2012 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from balder.ntg.nl ([195.12.62.10]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1S2lSg-0001Pc-8P for gctc-ntg-context-518@m.gmane.org; Wed, 29 Feb 2012 16:29:02 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 40B2ECB26E; Wed, 29 Feb 2012 16:28:59 +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 IT+v56Bm3GbV; Wed, 29 Feb 2012 16:28:44 +0100 (CET) Original-Received: from balder.ntg.nl (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 433CDCB23F; Wed, 29 Feb 2012 16:28:44 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 6161FCB23F for ; Wed, 29 Feb 2012 16:28: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 4ViHEhbRfPsG for ; Wed, 29 Feb 2012 16:28:37 +0100 (CET) Original-Received: from filter1-ams.mf.surf.net (filter1-ams.mf.surf.net [192.87.102.69]) by balder.ntg.nl (Postfix) with ESMTP id CB239CB20F for ; Wed, 29 Feb 2012 16:28:37 +0100 (CET) Original-Received: from unige.ch (mc1.unige.ch [129.194.9.214]) by filter1-ams.mf.surf.net (8.14.3/8.14.3/Debian-9.4) with ESMTP id q1TFSaPY024834 for ; Wed, 29 Feb 2012 16:28:37 +0100 Original-Received: from mmp3.unige.ch ([129.194.7.203]) by unige.ch stage1 with esmtp (Exim MailCleaner) id 1S2lSG-0006CA-4R for from ; Wed, 29 Feb 2012 16:28:36 +0100 X-MailCleaner-SPF: none Original-Received: from [129.194.101.63] (sancy.unige.ch [129.194.101.63]) by mmp3.unige.ch (Oracle Communications Messaging Server 7u4-23.01(7.0.4.23.0) 64bit (built Aug 10 2011)) with ESMTPSA id <0M0500F07UZOHRH0@mmp3.unige.ch> for ntg-context@ntg.nl; Wed, 29 Feb 2012 16:28:36 +0100 (MET) User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:10.0) Gecko/20120131 Thunderbird/10.0 In-reply-to: <26500510-46A7-4A14-98E4-F122BAC16923@googlemail.com> X-Bayes-Prob: 0.0001 (Score 0, tokens from: @@RPTN) X-CanIt-Geo: ip=129.194.9.214; country=CH; region=07; city=Geneva; latitude=46.2000; longitude=6.1667; http://maps.google.com/maps?q=46.2000,6.1667&z=6 X-CanItPRO-Stream: uu:ntg-context@ntg.nl (inherits from uu:default, base:default) X-Canit-Stats-ID: 0NGDPsAjC - 4e4b490c8819 - 20120229 (trained as not-spam) X-Scanned-By: CanIt (www . roaringpenguin . com) on 192.87.102.69 X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.12 Precedence: list List-Id: mailing list for ConTeXt users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: ntg-context-bounces@ntg.nl Errors-To: ntg-context-bounces@ntg.nl Xref: news.gmane.org gmane.comp.tex.context:74786 Archived-At: Le 29/02/2012 16:18, Wolfgang Schuster a =E9crit : > > Am 29.02.2012 um 16:05 schrieb Charles: > >> Le 29/02/2012 12:42, Wolfgang Schuster a =E9crit : >>> >>> Am 29.02.2012 um 12:19 schrieb Charles: >>> >>>> Hi, >>>> >>>> I have a problem with the following definition of chapter header. I wo= uld like to have the chapter title on the left side and the number, with hi= gher size, on the right side. >>>> >>>> The \mychap seems to work while used directly. >>>> >>>> Any solution? >>> >>> \define[2]\mychap >>> {\framed >>> [frame=3Doff,width=3Dbroad,align=3Dflushleft,bottomframe=3Don,off= set=3D0pt] >>> {\setbox\scratchbox\hbox{#1}% >>> \vtop{\hsize\dimexpr\hsize-\wd\scratchbox\relax#2}% >>> \box\scratchbox}} >>> >>> \setuphead[chapter][command=3D\mychap,textstyle=3D\tfa,numberstyle=3D\t= fd] >>> >>> \starttext >>> >>> \chapter{INTRODUCTION} >>> >>> \chapter{Text and more text and even more text and still more text till= it stops} >>> >>> \stoptext >>> >>> Wolfgang >> >> Thanks Wolfgang. >> >> How is the position of the text controled inside the framed? I would lik= e it to be closer to the line (when I increase the font size the space betw= een the text and the line increases too much). > > You can set =93strut=3Dno=94 and use the =93depth=94 parameter. > > \define[2]\mychap > {\framed > %[frame=3Doff,width=3Dbroad,align=3Dflushleft,bottomframe=3Don,offset= =3D0pt] > [frame=3Doff,width=3Dbroad,align=3Dflushleft,bottomframe=3Don,offset= =3D0pt,strut=3Dno,depth=3D0.4ex] > {\startlocalheadsetup > \setbox\scratchbox\hbox{\setnostrut#1}% > \vtop{\hsize\dimexpr\hsize-\wd\scratchbox\relax#2}% > \box\scratchbox > \stoplocalheadsetup}} > > \setuphead[chapter][command=3D\mychap,textstyle=3D\tfa,numberstyle=3D\tfd= ,strut=3Dno] > > \starttext > > \chapter{INTRODUCTION} > > \chapter{Text and more text and even more text and still more text till i= t stops} > > \stoptext > > Wolfgang Perfect! Thank you very much Charles ___________________________________________________________________________= ________ If your question is of interest to others as well, please add an entry to t= he Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-cont= ext webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________= ________