From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/80753 Path: news.gmane.org!not-for-mail From: Devendra Ghate Newsgroups: gmane.comp.tex.context Subject: Re: Chapter headings macro Date: Sat, 09 Feb 2013 12:00:54 +0530 Message-ID: <5115ED1E.8030502@gmail.com> References: <51149BC1.6020603@gmail.com> Reply-To: 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 1360391463 26721 80.91.229.3 (9 Feb 2013 06:31:03 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 9 Feb 2013 06:31:03 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Sat Feb 09 07:31:24 2013 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 1U43y8-0007mv-KH for gctc-ntg-context-518@m.gmane.org; Sat, 09 Feb 2013 07:31:24 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 7AB601026A; Sat, 9 Feb 2013 07:31:05 +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 M0lxlvshkD+d; Sat, 9 Feb 2013 07:31:03 +0100 (CET) Original-Received: from balder.ntg.nl (localhost [IPv6:::1]) by balder.ntg.nl (Postfix) with ESMTP id C4792101E8; Sat, 9 Feb 2013 07:31:03 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 63042101E8 for ; Sat, 9 Feb 2013 07:31:02 +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 R7eUHPqXEmRD for ; Sat, 9 Feb 2013 07:31:01 +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 504AB101E6 for ; Sat, 9 Feb 2013 07:31:01 +0100 (CET) Original-Received: from mail-pb0-f50.google.com (mail-pb0-f50.google.com [209.85.160.50]) by filter1-utr.mf.surf.net (8.14.3/8.14.3/Debian-9.4) with ESMTP id r196UxfY025411 for ; Sat, 9 Feb 2013 07:31:00 +0100 Original-Received: by mail-pb0-f50.google.com with SMTP id up1so52088pbc.37 for ; Fri, 08 Feb 2013 22:30:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:message-id:date:from:user-agent:mime-version:to:subject :references:in-reply-to:content-type:content-transfer-encoding; bh=Cdt1TqQ9W6tpTHAAew+6OP8RdGnHi9QIs/x1tCtzotY=; b=Pd8RgFss8tUOjxyGHpYtntKTexg5DDNB8nxwZFKaoAFh8HgJKHq7SAdmSWl2X2tqMz WCW9lJrI8hrEsgFj8MpJl/UCXIX85uABsLlrSFVszMY5MrDBvU55nxLDRJ0E8KX9p9Gz 64dW9a6GDTFaRlM05nxgixZp1q0ekr9A8wRSXi5i2qnJ7eSSPeBK11PNUKdZme3wJOdP rbdhAw+S3RXzQ6EWMFbEdmxPwLDJDh1Ks1p39Ff3RVt81/0sA616bfmpiDe4ypKBp5+Q woUTWN4Ommwz78vffkgYmwHExCOrD353wyh3U/VsIRybADkCVab5cKrg0T0uJrbvQse1 Ogqg== X-Received: by 10.66.82.226 with SMTP id l2mr24554024pay.64.1360391458867; Fri, 08 Feb 2013 22:30:58 -0800 (PST) Original-Received: from [61.11.102.153] ([61.11.102.153]) by mx.google.com with ESMTPS id wz10sm609072pbc.43.2013.02.08.22.30.56 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 08 Feb 2013 22:30:57 -0800 (PST) User-Agent: Mozilla/5.0 (X11; Linux i686; rv:17.0) Gecko/20130106 Thunderbird/17.0.2 In-Reply-To: X-Bayes-Prob: 0.0001 (Score 0, tokens from: @@RPTN) X-CanIt-Geo: ip=209.85.160.50; 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: 07IW6uXeF - c2a3674eb40a - 20130209 (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:80753 Archived-At: On 02/08/2013 06:43 PM, Wolfgang Schuster wrote: > Am 08.02.2013 um 07:31 schrieb Devendra Ghate : > >> Hello everyone, >> >> I have defined a macro for the chapter layouts -- nothing fancy, but still it is giving me trouble. >> Essentially, I call this macro using *command=* in *\setuphead*. My philosophy was to add >> all the details in the macro, so that I don't have to call anyother keyvalue pairs in *\setuphead*. >> However, the macro gives two different results when called for typesetting a chapter heading >> by ConTeXt internals and explicitly by me in the document (see attached file). >> >> I don't know why the chapter number font style is not obeyed. If I add *numberstyle=dfont* in >> *\setuphead*, then the font size is increased but the frame size has spurious space at top and >> bottom. >> >> When I call the macro myself, there is a single whitespace before the chapter heading (as can be >> seen in the attached file). >> >> I have gone through the wiki as much as possible and I think that I could have easily copied >> *much better* heading styles from it. But I do not want to use code that I don't fully >> understand. >> >> Any suggestions/help will be most appreciated. > \definefont [ChaperNumberStyle][Serif at 60pt] > \definecolor[ChaperNumberColor][x=d8dcd6] > > \startsetups[head:devendra] > > \startlinealignment[left] > > \startframed > [frame=on, > rulethickness=3pt, > framecolor=ChaperNumberColor, > foregroundcolor=ChaperNumberColor, > corner=00] > \hspace[big]\headnumbercontent > \stopframed > > \hspace[big] > > \startframed > [width=.1\textwidth, > strut=no, > frame=on, > align={flushleft,nothyphenated,verytolerant}] > \headtextcontent > \stopframed > > \stoplinealignment > > \stopsetups > > > \defineheadalternative[devendra][renderingsetup=head:devendra] > > \setuphead > [chapter] > [alternative=devendra, > numberstyle=ChaperNumberStyle, > textstyle={\tfc\kap\kerncharacters[.5]}] > > \starttext > \chapter{Introduction to thesis} > \stoptext > > Wolfgang > _____ Thank you Wolfgang. I guess this is the proper ConTeXt way. Presumably I will have to define a plain set up for unnumbered chapters like bibliographies and call *\setuphead[chapter][alternative=plain]* for these chapters. Devendra > ______________________________________________________________________________ > 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 ___________________________________________________________________________________