From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/47008 Path: news.gmane.org!not-for-mail From: Wolfgang Schuster Newsgroups: gmane.comp.tex.context Subject: Re: Customizing chapter heads Date: Sun, 25 Jan 2009 10:43:47 +0100 Message-ID: <9E3CEA74-669D-486D-AA00-190CDAD3802F@gmail.com> References: Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 (Apple Message framework v930.3) Content-Type: text/plain; charset="us-ascii"; Format="flowed"; DelSp="yes" Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1232876791 30187 80.91.229.12 (25 Jan 2009 09:46:31 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 25 Jan 2009 09:46:31 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Sun Jan 25 10:47:43 2009 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from ronja.vet.uu.nl ([131.211.172.88] helo=ronja.ntg.nl) by lo.gmane.org with esmtp (Exim 4.50) id 1LR1ag-0003C0-TX for gctc-ntg-context-518@m.gmane.org; Sun, 25 Jan 2009 10:47:42 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 7FCBC1FDCF; Sun, 25 Jan 2009 10:46:21 +0100 (CET) Original-Received: from ronja.ntg.nl ([127.0.0.1]) by localhost (smtp.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 29474-02-3; Sun, 25 Jan 2009 10:45:13 +0100 (CET) Original-Received: from ronja.vet.uu.nl (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 6B1051FD54; Sun, 25 Jan 2009 10:45:13 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id EE12B1FD54 for ; Sun, 25 Jan 2009 10:45:11 +0100 (CET) Original-Received: from ronja.ntg.nl ([127.0.0.1]) by localhost (smtp.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 29474-02-2 for ; Sun, 25 Jan 2009 10:44:33 +0100 (CET) Original-Received: from filter3-til.mf.surf.net (filter3-til.mf.surf.net [194.171.167.219]) by ronja.ntg.nl (Postfix) with ESMTP id 52AF61FC91 for ; Sun, 25 Jan 2009 10:44:33 +0100 (CET) Original-Received: from nf-out-0910.google.com (nf-out-0910.google.com [64.233.182.189]) by filter3-til.mf.surf.net (8.13.8/8.13.8/Debian-3) with ESMTP id n0P9iWCY023910 for ; Sun, 25 Jan 2009 10:44:32 +0100 Original-Received: by nf-out-0910.google.com with SMTP id c10so805303nfd.44 for ; Sun, 25 Jan 2009 01:44:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:received:received:message-id:from:to :in-reply-to:content-type:content-transfer-encoding:mime-version :subject:date:references:x-mailer; bh=iTQ1HUF2S5d0KINFtHG8GG9Zgdm0EO983nPN4JpNGrY=; b=TeZ7Wwru1qS/SFIu2xlsD+gTjSSzb5MoT63qnNEE3otbSl7l5XsbVLSfYQYj6c0RH1 SLWl657kVp/XVCR4fdaWRdkO6Qe48RKjEY4VULfESrqGbaaYSY+bgYsxPdOdaexDIk0q EbXkmQ5FtteHDRGB7qCj8yHnzBXBIdxuTyr0k= DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=message-id:from:to:in-reply-to:content-type :content-transfer-encoding:mime-version:subject:date:references :x-mailer; b=Itv4NApRwC3Gr0gpw+nbHAkCmmBVFiVVhMTv2XqOwnw6XKMOvPfkvUmv1m8jN6meEi e8WBSk0zX10dbXVMHf1UtOVXJkkOXKbF1EWJqI6eRumJNgB8BzqJ3be6JzJcNsRz1mzL wlB2/PX6w6n3fZaG2kT7TYN86UX4oe0iu5epc= Original-Received: by 10.210.90.10 with SMTP id n10mr2439584ebb.147.1232876672346; Sun, 25 Jan 2009 01:44:32 -0800 (PST) Original-Received: from ?192.168.2.23? (p5B295E9D.dip.t-dialin.net [91.41.94.157]) by mx.google.com with ESMTPS id 7sm5513747eyg.32.2009.01.25.01.44.31 (version=TLSv1/SSLv3 cipher=RC4-MD5); Sun, 25 Jan 2009 01:44:31 -0800 (PST) In-Reply-To: X-Mailer: Apple Mail (2.930.3) X-Bayes-Prob: 0.0001 (Score 0, tokens from: @@RPTN) X-CanIt-Geo: ip=64.233.182.189; 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: 170124099 - 701885a0ccf8 X-Scanned-By: CanIt (www . roaringpenguin . com) on 194.171.167.219 X-Virus-Scanned: amavisd-new at ntg.nl X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.11 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 X-Virus-Scanned: amavisd-new at ntg.nl Xref: news.gmane.org gmane.comp.tex.context:47008 Archived-At: Am 25.01.2009 um 00:49 schrieb Alfredo Catalina: > I am new to ConTeXt. I am trying to define a customized head for > chapters but I am finding some problems. The sentences below are > based on the chapter Text Elements which may be found in the ConTeXt > manual. > > Prior to setting up the title, a new Head command is defined by \def > \HeadTitle#1#2%. It takes two arguments, the chapter number and the > chapter title. The Head so defined will show the word "C h a p t e > r" in capitals, then the chapter number at 80pt, then a horizontal > line, and finally the title. > > The definition works quite well except that both, the chapter number > and the chapter title, are not show at the specified font size. > > \definebodyfont[10pt,11pt,12pt][rm][tff=Regular at 80pt] > \definebodyfont[10pt,11pt,12pt][rm][tfe=Regular at 42pt] \definebodyfont[10pt,11pt,12pt][ss][tfe=Sans at 42pt] > \def\HeadTitle#1#2% > {\hbox to \hsize \bgroup > {\hfill % > \setupframed[height=7cm,offset=.5em,frame=off] > \framed[width=9cm,align=left] > { > {\tfc \sc {C~h~a~p~t~e~r}} ~~ {\tff #1}\\ > \hairline > {\ss \tfe #2} > {\tfc \sc {C~h~a~p~t~e~r}} ~~ {#1}\\ \hairline {#2} > } > } > \egroup > } > > \starttext > \setuphead[chapter] [command=\HeadTitle] \setuphead[chapter] [command=\HeadTitle,numberstyle=\tff,textstyle=\ss \tfe] > \chapter{An Insight\\Into Fred's Design} > \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 : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________________