From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/64547 Path: news.gmane.org!not-for-mail From: Wolfgang Schuster Newsgroups: gmane.comp.tex.context Subject: Re: \do(single|double|etc)empty behaviour Date: Wed, 15 Dec 2010 23:56:03 +0100 Message-ID: <37DA1975-1BCE-4922-A72E-4005474CC3CE@gmail.com> References: <87fwtyj2w4.fsf@universe.krase.net> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 (Apple Message framework v1082) Content-Type: text/plain; charset="windows-1252" Content-Transfer-Encoding: quoted-printable X-Trace: dough.gmane.org 1292453812 19889 80.91.229.12 (15 Dec 2010 22:56:52 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Wed, 15 Dec 2010 22:56:52 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Wed Dec 15 23:56:47 2010 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 1PT0H5-00030a-D5 for gctc-ntg-context-518@m.gmane.org; Wed, 15 Dec 2010 23:56:43 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id EBC6FCA904; Wed, 15 Dec 2010 23:56:41 +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 tLFua5Nh0cf5; Wed, 15 Dec 2010 23:56:41 +0100 (CET) Original-Received: from balder.ntg.nl (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 7653ACA8F6; Wed, 15 Dec 2010 23:56:38 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 6972ACA8F6 for ; Wed, 15 Dec 2010 23:56:37 +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 sNANhLcVnvJu for ; Wed, 15 Dec 2010 23:56:34 +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 ABBBBCA8B9 for ; Wed, 15 Dec 2010 23:56:34 +0100 (CET) Original-Received: from mail-fx0-f44.google.com (mail-fx0-f44.google.com [209.85.161.44]) by filter2-ams.mf.surf.net (8.14.3/8.14.3/Debian-5+lenny1) with ESMTP id oBFMuXP2021778 for ; Wed, 15 Dec 2010 23:56:34 +0100 Original-Received: by fxm9 with SMTP id 9so2630081fxm.3 for ; Wed, 15 Dec 2010 14:56:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:received:received:content-type:mime-version :subject:from:in-reply-to:date:content-transfer-encoding:message-id :references:to:x-mailer; bh=4CWwFB0YamSiVNxrJUt8nnAlx6Qb2MiPdTXrBWXCYJw=; b=knfFO45WUF1lITEaICmj93Ss4JAbd79S7My/2P1P7Cc+Z+uNyITMRahwbYQh7pUl4Y iCGwuWb/Cjilmf2YAqzVvA6hnu8knBGJKN2eA9usM7RTj4OaySD4W90ETB+OSdUvo9Qp gIcR6u7DW7IlnTdIEl7UcFNyZCavZLpy7VK5Q= DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=content-type:mime-version:subject:from:in-reply-to:date :content-transfer-encoding:message-id:references:to:x-mailer; b=oDeRAErVqas9y6DN6dmHF3dO97uEa1xPhcRiEKAJYzvAjqf5q/iCRm+puDVYCKkdyO o+x4eetJfwIdEOsGRCF2RbwuH0ib2WaLSvRCHusZLPl4IRT5dHzGlqdKeCX4E8y8pd1T EQRxBgxMmeuz1zY5xyTPaQ9/jp7ghFa47qyHM= Original-Received: by 10.223.83.197 with SMTP id g5mr5910095fal.52.1292453793710; Wed, 15 Dec 2010 14:56:33 -0800 (PST) Original-Received: from [192.168.2.23] (p5B294DF3.dip.t-dialin.net [91.41.77.243]) by mx.google.com with ESMTPS id n3sm659118fax.31.2010.12.15.14.56.30 (version=TLSv1/SSLv3 cipher=RC4-MD5); Wed, 15 Dec 2010 14:56:32 -0800 (PST) In-Reply-To: <87fwtyj2w4.fsf@universe.krase.net> X-Mailer: Apple Mail (2.1082) X-Bayes-Prob: 0.0001 (Score 0, tokens from: @@RPTN) X-CanIt-Geo: ip=209.85.161.44; 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: 0rDHyUybO - 9fb6cd4347b3 - 20101215 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:64547 Archived-At: Am 15.12.2010 um 19:40 schrieb Marco Pessotto: > = > Hello there. > = > I was writing a small macro to emulate a custom \part command, and I > broke my head against \dosingleempty (but finally I won). = > = > [=85] > = > It's unclear to me how the arguments are passed between macros. > Probably it's just a matter of knowledge of TeX macro programming (which > obviously I don't have). Your test with \iffirstargument fails because you perform it after \startal= ignment which has itself a argument which sets \iffirstargument to true, a better w= ay to check for content of the optional argument is \doifsomethingelse. \def\talpart {\dosingleempty\dotalpart} \def\dotalpart[#1]#2% {\page[right] \blank[force,2*big] \startalignment[center] \doifsomethingelse{#1} {{\bfc#1}\writetolist[talpart]{}{#1. #2}} {\writetolist[talpart]{}{#2}}% \blank[2*big] {\bfd#2} \stopalignment \page[left]} Wolfgang ___________________________________________________________________________= ________ 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 ___________________________________________________________________________= ________