From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/34102 Path: news.gmane.org!not-for-mail From: Mari Voipio Newsgroups: gmane.comp.tex.context Subject: Re: Section title font define Date: Tue, 3 Apr 2007 13:15:34 +0300 (EEST) Message-ID: References: Reply-To: Mari Voipio , mailing list for ConTeXt users NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1175595358 25103 80.91.229.12 (3 Apr 2007 10:15:58 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 3 Apr 2007 10:15:58 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Tue Apr 03 12:15:55 2007 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 1HYg3N-0002Oc-Sh for gctc-ntg-context-518@m.gmane.org; Tue, 03 Apr 2007 12:15:53 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 4F929200F8; Tue, 3 Apr 2007 12:15:53 +0200 (CEST) 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 27624-04-29; Tue, 3 Apr 2007 12:15:48 +0200 (CEST) Original-Received: from ronja.vet.uu.nl (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id C97761FC71; Tue, 3 Apr 2007 12:15:47 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 6D0941FC71 for ; Tue, 3 Apr 2007 12:15:45 +0200 (CEST) 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 27624-04-28 for ; Tue, 3 Apr 2007 12:15:40 +0200 (CEST) Original-Received: from lagavulin.sappho.net (lagavulin.sappho.net [194.100.59.12]) by ronja.ntg.nl (Postfix) with ESMTP id CF2E81FBC6 for ; Tue, 3 Apr 2007 12:15:39 +0200 (CEST) Original-Received: from lagavulin.sappho.net (localhost.localdomain [127.0.0.1]) by lagavulin.sappho.net (8.13.5.20060308/8.13.5/Debian-3ubuntu1.1) with ESMTP id l33AFYVL011167 for ; Tue, 3 Apr 2007 13:15:34 +0300 Original-Received: from localhost (mari@localhost) by lagavulin.sappho.net (8.13.5.20060308/8.13.5/Submit) with ESMTP id l33AFYhR011164 for ; Tue, 3 Apr 2007 13:15:34 +0300 X-Authentication-Warning: lagavulin.sappho.net: mari owned process doing -bs X-X-Sender: mari@lagavulin.sappho.net In-Reply-To: X-Lagavulin-MailScanner: Found to be clean X-MailScanner-From: mari.voipio@iki.fi X-Virus-Scanned: amavisd-new at ntg.nl X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.9 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:34102 Archived-At: On Tue, 3 Apr 2007, Roy Zuo wrote: > I do not want to use \switchtobodyfont every time I type a chapter > title, but I have no idea how to make it a style in the setup area. Good news is that this is fairly easily done. The Hello World document on ConTextwiki (ConTeXtGarden) has one solution where the common nominators are given in one go and then more stuff is added separately; see http://wiki.contextgarden.net/Hello_world and the stuff starting with \setuphead Now, my solution has been to define each heading level separately: % This sets the look of the first level headings \setuphead [chapter] [style=\sstfc, prefix=+] % This sets the look of the second level headings \setuphead [section] [style=\sstfb, before={\blank[2*big]}] \setuphead [subject] [style=\sstfb, before={\blank[2*big]}] % Third level headings \setuphead [subsection] [style=\ssbf] Note: "section" and "subject" are of same level, but section is numbered (1.2 etc.) while subject is not. You can find this information and more 1) In the wiki on page http://wiki.contextgarden.net/Titles 2) In the beginner's manual ("Excursion") at http://www.pragma-ade.com/general/manuals/ms-cb-en.pdf under "5 Headers" (!) 3) In the big manual at http://www.pragma-ade.com/general/manuals/cont-eni.pdf (this is the interactive on-screen version) under "8 Text Elements" Now, interestingly, I cannot find any direct examples how to give point size to chapter heading, I'm used to doing just \tfa, \tfb and \tfc (somewhat bigger than standard, quite a bit bigger, huge). However, judging from the Hello World document, this might work out: \setuphead [chapter] [style={\switchtobodyfont[18pt]}] %is {} needed here? If the text should also be sans serif (Arial etc), this might be the way: \setuphead [chapter] [style={\ss\switchtobodyfont[18pt]}] Yep, both of the above work at least in my ConTeXt. So I learned something new today! (Mostly thanks to Sanjoy's wonderful Hello World...) This should give you a reasonable starting point, the rest you can probably figure out with the documentation and some testing (been there, done that, got it right in the end....) Mari