From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/74729 Path: news.gmane.org!not-for-mail From: Wolfgang Schuster Newsgroups: gmane.comp.tex.context Subject: Re: Linebreak between Chapter Number and Name Date: Mon, 27 Feb 2012 08:39:41 +0100 Message-ID: References: <4F4ACA8E.3010608@riseup.net> <03DBDC96-1641-40B5-ABA5-8CF792E7D0F0@emory.edu> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 (Apple Message framework v1257) Content-Type: multipart/mixed; boundary="===============1888399498==" X-Trace: dough.gmane.org 1330328407 16360 80.91.229.3 (27 Feb 2012 07:40:07 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Mon, 27 Feb 2012 07:40:07 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Mon Feb 27 08:40:05 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 1S1vBk-0007cJ-I4 for gctc-ntg-context-518@m.gmane.org; Mon, 27 Feb 2012 08:40:04 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 9CCAACB265; Mon, 27 Feb 2012 08:40:03 +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 j2PDQmJjDUsa; Mon, 27 Feb 2012 08:39:56 +0100 (CET) Original-Received: from balder.ntg.nl (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id B12B6CB251; Mon, 27 Feb 2012 08:39:56 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 57605CB251 for ; Mon, 27 Feb 2012 08:39:55 +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 hApI59CzxlOR for ; Mon, 27 Feb 2012 08:39:43 +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 38ACFCB20F for ; Mon, 27 Feb 2012 08:39:43 +0100 (CET) Original-Received: from mail-ey0-f169.google.com (mail-ey0-f169.google.com [209.85.215.169]) by filter1-ams.mf.surf.net (8.14.3/8.14.3/Debian-9.4) with ESMTP id q1R7dgkQ019463 for ; Mon, 27 Feb 2012 08:39:42 +0100 Original-Received: by eaag11 with SMTP id g11so3180069eaa.14 for ; Sun, 26 Feb 2012 23:39:42 -0800 (PST) Received-SPF: pass (google.com: domain of schuster.wolfgang@googlemail.com designates 10.14.48.65 as permitted sender) client-ip=10.14.48.65; Authentication-Results: mr.google.com; spf=pass (google.com: domain of schuster.wolfgang@googlemail.com designates 10.14.48.65 as permitted sender) smtp.mail=schuster.wolfgang@googlemail.com; dkim=pass header.i=schuster.wolfgang@googlemail.com Original-Received: from mr.google.com ([10.14.48.65]) by 10.14.48.65 with SMTP id u41mr7497440eeb.39.1330328382524 (num_hops = 1); Sun, 26 Feb 2012 23:39:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=from:mime-version:content-type:subject:date:in-reply-to:to :references:message-id:x-mailer; bh=wZtPdxzzSiMrFZpYEtPLq049BgenBUgJ2Mubq3byN3A=; b=SmHGjQJMyN0v9SbITwWlX3hpAkzjtfWo5FW51x194wlCRijCIt66nUr620ITbkjVaY ug7FIhb8YjVKnqFUrGHMIrvqV6/+eqTkdXhCUnBLuuumK9pBBjAR2wRuZdpHGMkT6ShE xPAta0hAzb5H/p+o32+j1LSbIUqng1t6WCdXE= Original-Received: by 10.14.48.65 with SMTP id u41mr5647109eeb.39.1330328382433; Sun, 26 Feb 2012 23:39:42 -0800 (PST) Original-Received: from [192.168.2.36] (p57AFB8C5.dip.t-dialin.net. [87.175.184.197]) by mx.google.com with ESMTPS id y14sm55038634eef.10.2012.02.26.23.39.39 (version=TLSv1/SSLv3 cipher=OTHER); Sun, 26 Feb 2012 23:39:41 -0800 (PST) In-Reply-To: <03DBDC96-1641-40B5-ABA5-8CF792E7D0F0@emory.edu> 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: 0NGCTDGcU - 56c2533331d8 - 20120227 (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:74729 Archived-At: --===============1888399498== Content-Type: multipart/alternative; boundary="Apple-Mail=_C5FD4EF2-F24B-4D2B-81A6-F9E0803DF9A5" --Apple-Mail=_C5FD4EF2-F24B-4D2B-81A6-F9E0803DF9A5 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=windows-1252 Am 27.02.2012 um 02:47 schrieb Rogers, Michael K: >=20 > On Feb 26, 2012, at 7:13 PM, Marc Trius wrote: >=20 >> Hi, >> I am trying to format a chapter heading so that there is a linebreak = between the number and the name. The only way I managed to do this is = this: >>=20 >>=20 >> \setuphead[ >> chapter][command=3D\ChapTitle] >> \def\ChapTitle#1#2% >> {\framed[height=3D2cm,width=3Dbroad]{#1\\#2} >> } >=20 >=20 > This worked for me: >=20 > = \def\ChapTitle#1#2{\framed{\vbox{\startalignment[center]#1\par#2\stopalign= ment}}} \define[2]\ChapTitle {\framed[width=3Dbroad,align=3Dmiddle]{#1\\#2}} > I don't know if \vbox's are frowned on in ConTeXt, but my fix doesn't = work if you remove it. I've just started migrating from Plain Tex to = ConTeXt, so please excuse a naive response.=20 Special layouts for the headings requires sometimes \vbox and \hbox but = in this case you don=92t need it. Wolfgang --Apple-Mail=_C5FD4EF2-F24B-4D2B-81A6-F9E0803DF9A5 Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=windows-1252
=

On Feb 26, 2012, at 7:13 PM, Marc Trius wrote:

Hi,
I am trying to format a chapter heading so that there is a linebreak = between the number and the name. The only way I managed to do this is = this:


\setuphead[
chapter][command=3D\ChapTitle]
\def\ChapTitle#1#2%
{\framed[height=3D2cm,width=3Dbroad]{#1\\#2}
}

This worked for me:

=
\def\ChapTitle#1#2{\framed{\vbox{\startalignment[center]#1\par#2\stop= alignment}}}

\defi= ne[2]\ChapTitle
  = {\framed[width=3Dbroad,align=3Dmiddle]{#1\\#2}}

I don't know if \vbox's are frowned on in ConTeXt, but my fix = doesn't work if you remove it.  I've just started migrating from = Plain Tex to ConTeXt, so please excuse a naive = response. 

Special = layouts for the headings requires sometimes \vbox and \hbox but in this = case you don=92t need = it.

Wolfgang

= --Apple-Mail=_C5FD4EF2-F24B-4D2B-81A6-F9E0803DF9A5-- --===============1888399498== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline ___________________________________________________________________________________ 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 ___________________________________________________________________________________ --===============1888399498==--