From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/64892 Path: news.gmane.org!not-for-mail From: =?ISO-8859-1?Q?Vianney_le_Cl=E9ment?= Newsgroups: gmane.comp.tex.context Subject: Re: Working with conditionals Date: Mon, 3 Jan 2011 10:57:45 +0100 Message-ID: References: Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable X-Trace: dough.gmane.org 1294048708 19220 80.91.229.12 (3 Jan 2011 09:58:28 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Mon, 3 Jan 2011 09:58:28 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Mon Jan 03 10:58:24 2011 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from balder.ntg.nl ([195.12.62.10]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1PZhBI-0000SD-0o for gctc-ntg-context-518@m.gmane.org; Mon, 03 Jan 2011 10:58:24 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id AC6ADCA988; Mon, 3 Jan 2011 10:58:23 +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 APUFC6szoP6O; Mon, 3 Jan 2011 10:58:20 +0100 (CET) Original-Received: from balder.ntg.nl (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 44ACCCA97F; Mon, 3 Jan 2011 10:58:20 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 981BFCA97F for ; Mon, 3 Jan 2011 10:58:18 +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 oLUQs+q5t4Tu for ; Mon, 3 Jan 2011 10:58:07 +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 6C81ECA979 for ; Mon, 3 Jan 2011 10:58:07 +0100 (CET) Original-Received: from mail-qy0-f169.google.com (mail-qy0-f169.google.com [209.85.216.169]) by filter2-ams.mf.surf.net (8.14.3/8.14.3/Debian-5+lenny1) with ESMTP id p039w6mq012367 for ; Mon, 3 Jan 2011 10:58:06 +0100 Original-Received: by qyk7 with SMTP id 7so14409124qyk.14 for ; Mon, 03 Jan 2011 01:58:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:mime-version:received:in-reply-to :references:from:date:message-id:subject:to:content-type :content-transfer-encoding; bh=uibF5QL8EYglPh8lMsRCIGau8DZb/hQ+WrTY9z6/Ayk=; b=IstggfdpO8l6HK5e+FLMH1Vit/+woCRbu6cTtwWx9BbeGrck5/1p3gSKjN6CEVqXWP VL0xMWj1AzGJ65CJDAOwtm1oaFuA8W5IjKbSoL/4u6jtpOQloTMxhmr0uZvJXPebK3UJ yHkgabgLOlPu4NIJtcjByoGBbnav76WVpNkao= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type:content-transfer-encoding; b=cioyO0q93SlhZ8f1q3uDZEGCDcHaJa6igxylsKOgyw+W40xFXf9oekZhWaQ9KbMTUs YnEteZwRXkWmfsW8/b2AUwN5CEhnaltFwD0Gchika06VVQOcWUnSZtTJBgnuzb+aghWS josmc7f2s57sj9Mr6//qLfWtq5QCl9537ZnV8= Original-Received: by 10.229.233.142 with SMTP id jy14mr17794205qcb.239.1294048686086; Mon, 03 Jan 2011 01:58:06 -0800 (PST) Original-Received: by 10.229.23.199 with HTTP; Mon, 3 Jan 2011 01:57:45 -0800 (PST) In-Reply-To: X-Bayes-Prob: 0.5 (Score 0, tokens from: ) X-CanIt-Geo: ip=209.85.216.169; 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: 0rDOVW6Vu - 52f9dc0ab242 - 20110103 X-Scanned-By: CanIt (www . roaringpenguin . com) on 192.87.102.70 X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.12 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 Xref: news.gmane.org gmane.comp.tex.context:64892 Archived-At: \def\Title{\dodoubleempty\doTitle} \def\doTitle[#1][#2]{ \ifsecondargument \testpage[#2] \else \testpage[10] \fi \startalignment[center] { \blank[2*big] \switchtobodyfont[1.5em] \bf\em#1 } \blank \stopalignment } Vianney On Mon, Jan 3, 2011 at 10:46, Cecil Westerhof wrot= e: > I have the folowing function for a title: > \def\Title[#1]{ > =A0\testpage[10] > =A0\startalignment[center] > =A0{ > =A0 =A0 =A0\blank[2*big] > =A0 =A0 =A0\switchtobodyfont[1.5em] > =A0 =A0 =A0\bf\em#1 > =A0} > =A0\blank > =A0\stopalignment > } > > What I would like is that there is an optional second parameter. When > it is there, it is used in the testpage command. Otherwise the default > value is used. How would I do this? > > -- > Cecil Westerhof > _________________________________________________________________________= __________ > 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-co= ntext > webpage =A0: http://www.pragma-ade.nl / http://tex.aanhet.net > archive =A0: http://foundry.supelec.fr/projects/contextrev/ > wiki =A0 =A0 : http://contextgarden.net > _________________________________________________________________________= __________ > ___________________________________________________________________________= ________ If your question is of interest to others as well, please add an entry to t= he Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-cont= ext webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________= ________