From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/74784 Path: news.gmane.org!not-for-mail From: Wolfgang Schuster Newsgroups: gmane.comp.tex.context Subject: Re: Linebreak in a framed for a chapter setuphead Date: Wed, 29 Feb 2012 16:18:21 +0100 Message-ID: <26500510-46A7-4A14-98E4-F122BAC16923@googlemail.com> References: <4F4E09BE.5070608@vejnar.org> <4F4E3E9C.4030407@vejnar.org> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 (Apple Message framework v1257) Content-Type: text/plain; charset="windows-1252" Content-Transfer-Encoding: quoted-printable X-Trace: dough.gmane.org 1330528737 27748 80.91.229.3 (29 Feb 2012 15:18:57 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Wed, 29 Feb 2012 15:18:57 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Wed Feb 29 16:18:55 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 1S2lIn-0001xg-PC for gctc-ntg-context-518@m.gmane.org; Wed, 29 Feb 2012 16:18:49 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 245A8CB260; Wed, 29 Feb 2012 16:18:49 +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 DZwh4OryjFix; Wed, 29 Feb 2012 16:18:43 +0100 (CET) Original-Received: from balder.ntg.nl (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 6EE2ECB23F; Wed, 29 Feb 2012 16:18:43 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id D7B0CCB23F for ; Wed, 29 Feb 2012 16:18:41 +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 oA4QJAeYTHNn for ; Wed, 29 Feb 2012 16:18:25 +0100 (CET) Original-Received: from filter2-nij.mf.surf.net (filter2-nij.mf.surf.net [195.169.124.153]) by balder.ntg.nl (Postfix) with ESMTP id E74B4CB20F for ; Wed, 29 Feb 2012 16:18:25 +0100 (CET) Original-Received: from mail-ey0-f169.google.com (mail-ey0-f169.google.com [209.85.215.169]) by filter2-nij.mf.surf.net (8.14.3/8.14.3/Debian-5+lenny1) with ESMTP id q1TFIOm4032420 for ; Wed, 29 Feb 2012 16:18:24 +0100 Original-Received: by eaal1 with SMTP id l1so988408eaa.14 for ; Wed, 29 Feb 2012 07:18:24 -0800 (PST) Received-SPF: pass (google.com: domain of schuster.wolfgang@googlemail.com designates 10.213.12.211 as permitted sender) client-ip=10.213.12.211; Authentication-Results: mr.google.com; spf=pass (google.com: domain of schuster.wolfgang@googlemail.com designates 10.213.12.211 as permitted sender) smtp.mail=schuster.wolfgang@googlemail.com; dkim=pass header.i=schuster.wolfgang@googlemail.com Original-Received: from mr.google.com ([10.213.12.211]) by 10.213.12.211 with SMTP id y19mr610706eby.130.1330528704559 (num_hops = 1); Wed, 29 Feb 2012 07:18:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=content-type:mime-version:subject:from:in-reply-to:date :content-transfer-encoding:message-id:references:to:x-mailer; bh=F0QFoatCX3Oga3oZULZzQS4WL7nVnQVVCstrB+7dKyI=; b=ftyDoElI33+7nuZtuOU2SAnAYJ8MbcuwLC45EShFVvHufQqeSs6mRe7rfBk6iKIqYy CRIO7Ib5dzi7A1PBXYDJXoIvbScnOrUcAjmyV4Zymnc3Z51a3+NOPp2QK6/LKTc7skyo bekSUrTWibASqWNVjkfcpZayZRA/Btjal8roo= Original-Received: by 10.213.12.211 with SMTP id y19mr482720eby.130.1330528704440; Wed, 29 Feb 2012 07:18:24 -0800 (PST) Original-Received: from [192.168.2.36] (p57AFB945.dip.t-dialin.net. [87.175.185.69]) by mx.google.com with ESMTPS id u9sm83809991eem.11.2012.02.29.07.18.22 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 29 Feb 2012 07:18:23 -0800 (PST) In-Reply-To: <4F4E3E9C.4030407@vejnar.org> X-Mailer: Apple Mail (2.1257) X-Bayes-Prob: 0.0001 (Score 0, tokens from: @@RPTN) X-CanIt-Geo: ip=209.85.215.169; country=US; region=CA; city=Mountain View; postalcode=94043; latitude=37.4192; longitude=-122.0574; metrocode=807; areacode=650; http://maps.google.com/maps?q=37.4192,-122.0574&z=6 X-CanItPRO-Stream: uu:ntg-context@ntg.nl (inherits from uu:default, base:default) X-Canit-Stats-ID: 0aGDPio3l - 151e8c57400e - 20120229 (trained as not-spam) X-Scanned-By: CanIt (www . roaringpenguin . com) on 195.169.124.153 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:74784 Archived-At: 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 wou= ld like to have the chapter title on the left side and the number, with hig= her 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,offse= t=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\tf= d] >> = >> \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 like= it to be closer to the line (when I increase the font size the space betwe= en 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=3D= 0pt] [frame=3Doff,width=3Dbroad,align=3Dflushleft,bottomframe=3Don,offset=3D= 0pt,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,s= trut=3Dno] \starttext \chapter{INTRODUCTION} \chapter{Text and more text and even more text and still more text till it = stops} \stoptext Wolfgang ___________________________________________________________________________= ________ 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 ___________________________________________________________________________= ________