From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/80745 Path: news.gmane.org!not-for-mail From: Wolfgang Schuster Newsgroups: gmane.comp.tex.context Subject: Re: Chapter headings macro Date: Fri, 8 Feb 2013 14:13:43 +0100 Message-ID: References: <51149BC1.6020603@gmail.com> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 (Mac OS X Mail 6.2 \(1499\)) Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1360329227 29490 80.91.229.3 (8 Feb 2013 13:13:47 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 8 Feb 2013 13:13:47 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Fri Feb 08 14:14:08 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 1U3nmI-0005wP-KY for gctc-ntg-context-518@m.gmane.org; Fri, 08 Feb 2013 14:14:06 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 8A97D101F8; Fri, 8 Feb 2013 14:13:47 +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 A3KK-4wo670V; Fri, 8 Feb 2013 14:13:46 +0100 (CET) Original-Received: from balder.ntg.nl (localhost [IPv6:::1]) by balder.ntg.nl (Postfix) with ESMTP id DA50F101E6; Fri, 8 Feb 2013 14:13:45 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 698A1101E6 for ; Fri, 8 Feb 2013 14:13:44 +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 kQhzQX+YQMU8 for ; Fri, 8 Feb 2013 14:13:43 +0100 (CET) Original-Received: from filter2-ams.mf.surf.net (filter2-ams.mf.surf.net [192.87.102.70]) by balder.ntg.nl (Postfix) with ESMTP id 90B15101E2 for ; Fri, 8 Feb 2013 14:13:43 +0100 (CET) Original-Received: from mail-bk0-f47.google.com (mail-bk0-f47.google.com [209.85.214.47]) by filter2-ams.mf.surf.net (8.14.3/8.14.3/Debian-9.4) with ESMTP id r18DDgbQ018320 for ; Fri, 8 Feb 2013 14:13:43 +0100 Original-Received: by mail-bk0-f47.google.com with SMTP id jc3so1625073bkc.6 for ; Fri, 08 Feb 2013 05:13:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:content-type:mime-version:subject:from:in-reply-to:date :content-transfer-encoding:message-id:references:to:x-mailer; bh=zOhJNpYvAkYAu9bzhHAo/iP2Vb1PY6HySwAxQjRZHFg=; b=rmGqsHVs4xQTr35QeKhvp3FtSpTcdLRaNaC5h+dSj5l/IuHowaehaJ/A17WXx32YqO 0fXG5c9AbEbQ9Fd4rgn8Ly7PtiIFuDId++z1GeNPnQhf5C03ByyoHXVsWyCHj07jNZJc VFHk0TCZZ6UbGLKkz6boxHDDxsWmxS14/TE1FZDXYRo1jIKW2pyh1M2cZvkrXhApubme R3N9sowIJtPIDe15KAeQG7fBt1vuYvfS5Vwu6FBNVwGr7s8ql8l4jKf4146Z7XiTbEuD 5UEI3SYPJ8m+O9yHKr2Q+v0962CDiAK4jLbRnEhCjXDQ3WggvGuw0ElcK7D7w8Xq1+nZ yHuw== X-Received: by 10.204.11.68 with SMTP id s4mr1444874bks.74.1360329222191; Fri, 08 Feb 2013 05:13:42 -0800 (PST) Original-Received: from keima.localdomain (nrbg-4dbe6143.pool.mediaWays.net. [77.190.97.67]) by mx.google.com with ESMTPS id u3sm10109108bkw.9.2013.02.08.05.13.40 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 08 Feb 2013 05:13:41 -0800 (PST) In-Reply-To: <51149BC1.6020603@gmail.com> X-Mailer: Apple Mail (2.1499) X-Bayes-Prob: 0.0001 (Score 0, tokens from: @@RPTN) X-CanIt-Geo: ip=209.85.214.47; 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: 0QIVNdGSi - 526f9165541e - 20130208 (trained as not-spam) X-Scanned-By: CanIt (www . roaringpenguin . com) on 192.87.102.70 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:80745 Archived-At: 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 ___________________________________________________________________________________ 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 ___________________________________________________________________________________