From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/45118 Path: news.gmane.org!not-for-mail From: "Zhichu Chen" Newsgroups: gmane.comp.tex.context Subject: Re: why does not this style work? Date: Sun, 26 Oct 2008 16:19:13 +0000 Message-ID: <769ba7780810260919t6609cf8alcc5562c40e121d0b@mail.gmail.com> References: Reply-To: 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: ger.gmane.org 1225038065 31233 80.91.229.12 (26 Oct 2008 16:21:05 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 26 Oct 2008 16:21:05 +0000 (UTC) To: "mailing list for ConTeXt users" Original-X-From: ntg-context-bounces@ntg.nl Sun Oct 26 17:22:04 2008 connect(): Connection refused 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 1Ku8NH-0002Oa-Q2 for gctc-ntg-context-518@m.gmane.org; Sun, 26 Oct 2008 17:21:55 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id EAB621FC0D; Sun, 26 Oct 2008 17:20:47 +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 14344-04-4; Sun, 26 Oct 2008 17:19:50 +0100 (CET) Original-Received: from ronja.vet.uu.nl (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 53A3D1FBBE; Sun, 26 Oct 2008 17:19:50 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 776861FBBE for ; Sun, 26 Oct 2008 17:19:48 +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 15819-01-5 for ; Sun, 26 Oct 2008 17:19:15 +0100 (CET) Original-Received: from wf-out-1314.google.com (wf-out-1314.google.com [209.85.200.172]) by ronja.ntg.nl (Postfix) with ESMTP id BC73F1FB5A for ; Sun, 26 Oct 2008 17:19:14 +0100 (CET) Original-Received: by wf-out-1314.google.com with SMTP id 27so1663007wfd.5 for ; Sun, 26 Oct 2008 09:19:13 -0700 (PDT) Original-Received: by 10.142.201.3 with SMTP id y3mr2146860wff.5.1225037953756; Sun, 26 Oct 2008 09:19:13 -0700 (PDT) Original-Received: by 10.142.90.20 with HTTP; Sun, 26 Oct 2008 09:19:13 -0700 (PDT) In-Reply-To: Content-Disposition: inline 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:45118 Archived-At: Hi Ruini, Since \dosanhao has nothing to do with it's argument, why not just define like \def\mybig {\switchtobodyfont[24pt]} On Sun, Oct 26, 2008 at 3:55 PM, Ruini Xue wrote: > I want to use a dedicated font size for the chapter title, so I wrote this > piece of code: > > %%%%%%%%%%%%%%%%%% > \def\mybig% > {\dosingleempty\dosanhao} > \def\dosanhao[#1]% > {\switchtobodyfont[24pt]} > > \setuphead > [chapter] > [style=\mybig] > > \starttext > \chapter{hello, world} > > \stoptext > %%%%%%%%%%%%%%%%% > > However, the error is: > %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% > ! Use of \dosanhao doesn't match its definition. > \doifnextcharelse ...token =#1\def \!!stringa {#2} > \def \!!stringb {#3}\futur... > \@@kochapterstyle ->\mybig > \bf > \doconvertfont #1->\edef \p!defined {#1 > }\ifx \p!defined \empty \else \@EA \d... > \dosetfontattribute ...me #1#2\@EA \endcsname \fi > \empty > \doplaceheadnumbertext ...bute {\??ko #1}\c!style > \dosetcolorattribute {\??k... > \dodododoconstructhead ...{\finalsectionnumber }}} > \writesection {#1}{#3}{#4}... > l.11 \chapter{hello, world} > %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% > > If I replace the \mybig with \switchtobodyfont in style=xx, it works fine. > What's the difference between them? and why the former does not work? > > -- ruini > > > > > > > > ___________________________________________________________________________________ > 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 > ___________________________________________________________________________________ > -- Best Regards Chen ---------------------------------------------------------------- Zhi-chu Chen | Shanghai Synchrotron Radiation Facility No. 2019 | Jialuo Rd. | Jiading | Shanghai | P.R. China tel: 086 21 5955 3405 | zhichu.chen.googlepages.com | www.sinap.ac.cn ---------------------------------------------------------------- ___________________________________________________________________________________ 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 ___________________________________________________________________________________