From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/67162 Path: news.gmane.org!not-for-mail From: Cecil Westerhof Newsgroups: gmane.comp.tex.context Subject: Re: Macro for acronyms Date: Sat, 19 Mar 2011 05:54:54 +0100 Message-ID: References: Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1981254666==" X-Trace: dough.gmane.org 1300510510 5173 80.91.229.12 (19 Mar 2011 04:55:10 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sat, 19 Mar 2011 04:55:10 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Sat Mar 19 05:55:06 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 1Q0oBs-0008Cp-90 for gctc-ntg-context-518@m.gmane.org; Sat, 19 Mar 2011 05:55:04 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 3F1CACAB28; Sat, 19 Mar 2011 05:54:58 +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 iRVcJ+Zgw37G; Sat, 19 Mar 2011 05:54:54 +0100 (CET) Original-Received: from balder.ntg.nl (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 955A1CAAF6; Sat, 19 Mar 2011 05:54:54 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 2C49ACAAF6 for ; Sat, 19 Mar 2011 05:54:53 +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 Tf08+DFDqk1D for ; Sat, 19 Mar 2011 05:54:51 +0100 (CET) Original-Received: from filter2-til.mf.surf.net (filter2-til.mf.surf.net [194.171.167.218]) by balder.ntg.nl (Postfix) with ESMTP id 0E2C9CAAD7 for ; Sat, 19 Mar 2011 05:54:51 +0100 (CET) Original-Received: from mail-fx0-f41.google.com (mail-fx0-f41.google.com [209.85.161.41]) by filter2-til.mf.surf.net (8.14.3/8.14.3/Debian-5+lenny1) with ESMTP id p2J4ssq2000920 for ; Sat, 19 Mar 2011 05:54:55 +0100 Original-Received: by fxm18 with SMTP id 18so5529930fxm.14 for ; Fri, 18 Mar 2011 21:54:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:in-reply-to:references:date :message-id:subject:from:to:content-type; bh=2/FNyzz0BNKf/XaK45AGk7cPBnO0I6EXVyPMSbDAS+s=; b=RBo4mpT+hUZqdLIvxhISt1pu1yAXtp773BCh5WfTmxMke48eRwiQ6V0EGgiOt+Nctq ulXn/yxa1avtZpcclHMEXD2THiD89i5tZ8qcY7k2FgsqTGWnSedNct61/J0y/+I0P4ZC hVmBOcAVUUHuL4JMTafNRmvOe7NDdy+OmHnRw= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; b=q6yXmxRw47kTx3YsJvbojog/BWwnuO+k8bwkSAJtPg5lugJ04ZaTbIjdj3mxT93qNb 5vrS0bp7OfGQmNbyW8A39sw5XBgruv3sNlcEm/CH0793dDw6N5FRDlFHIvnUNj6UctQY ChvN9ZHuHbegZ1R36ixg1vAAqBvvRtgfb7Z+w= Original-Received: by 10.223.103.72 with SMTP id j8mr2100447fao.145.1300510494718; Fri, 18 Mar 2011 21:54:54 -0700 (PDT) Original-Received: by 10.223.110.71 with HTTP; Fri, 18 Mar 2011 21:54:54 -0700 (PDT) In-Reply-To: X-Bayes-Prob: 0.0001 (Score 0, tokens from: @@RPTN) X-CanIt-Geo: ip=209.85.161.41; 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: 0bEkQSSWP - 376b3deed3d2 - 20110319 X-Scanned-By: CanIt (www . roaringpenguin . com) on 194.171.167.218 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:67162 Archived-At: --===============1981254666== Content-Type: multipart/alternative; boundary=001636c5bb74107a25049eceb2b7 --001636c5bb74107a25049eceb2b7 Content-Type: text/plain; charset=ISO-8859-1 2011/3/19 Aditya Mahajan > \definestartstop >>> [FancyFirstLetter] >>> [style={\switchtobodyfont[big]\bf}, >>> color=red] >>> >>> \def\FancyUppercase#1% >>> {\dostartFancyUppercase#1\dostopFancyUppercase} >>> >>> \def\dostartFancyUppercase#1#2\dostopFancyUppercase >>> {\FancyFirstLetter{#1}#2} >>> >>> >>> \def\Acronym#1% >>> {\dostartAcronym#1 \dostopAcronym} >>> >>> \def\dostartAcronym#1 #2\dostopAcronym >>> {\doifsomething{#1} >>> {\FancyUppercase{#1} %space >>> \dostartAcronym#2 \dostopAcronym}} >>> >> >> >> Almost. dostartAcronym needs a blanco line to put the words under >> each-other: >> > At the moment I have I my document: > > Better to use an explicit \blank (A blank space is equal to \par, and can > give funny results when you change indenting) Is not the same. With a blank line the next word begins on a new line. When using \blank there is also vertical whitespace between the words. But I think I like it. So that is good. ;-} -- Cecil Westerhof --001636c5bb74107a25049eceb2b7 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
2011/3/19 Aditya Mahajan <<= a href=3D"mailto:adityam@umich.edu">adityam@umich.edu>
\definestartstop
=A0[FancyFirstLetter]
=A0[style=3D{\switchtobodyfont[big]\bf},
=A0color=3Dred]

\def\FancyUppercase#1%
=A0{\dostartFancyUppercase#1\dostopFancyUppercase}

\def\dostartFancyUppercase#1#2\dostopFancyUppercase
=A0{\FancyFirstLetter{#1}#2}


\def\Acronym#1%
=A0{\dostartAcronym#1 \dostopAcronym}

\def\dostartAcronym#1 #2\dostopAcronym
=A0{\doifsomething{#1}
=A0 =A0 {\FancyUppercase{#1} %space
=A0 =A0 =A0\dostartAcronym#2 \dostopAcronym}}


Almost. dostartAcronym needs a blanco line to put the words under
each-other:
=A0At the moment I have I my document:

Better to use an explicit \blank (A blank space is equal to \par, and can g= ive funny results when you change indenting)

Is not th= e same. With a blank line the next word begins on a new line. When using \b= lank there is also vertical whitespace between the words. But I think I lik= e it. So that is good. ;-}

--
Cecil Westerhof
--001636c5bb74107a25049eceb2b7-- --===============1981254666== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline ___________________________________________________________________________________ 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 : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________________ --===============1981254666==--