From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/75313 Path: news.gmane.org!not-for-mail From: Alan BRASLAU Newsgroups: gmane.comp.tex.context Subject: Re: Formatting Indexed Words Within the Text Date: Fri, 23 Mar 2012 14:04:53 +0100 Organization: CEA DSM-IRAMIS-SPEC Message-ID: <20120323140453.744bae2f@sole.extra.cea.fr> References: <67926749-1A4E-4701-BCDC-86C2979590C0@stien.de> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1332507725 8134 80.91.229.3 (23 Mar 2012 13:02:05 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Fri, 23 Mar 2012 13:02:05 +0000 (UTC) To: ntg-context@ntg.nl Original-X-From: ntg-context-bounces@ntg.nl Fri Mar 23 14:01:59 2012 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from balder.ntg.nl ([195.12.62.10]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1SB47x-0006mY-2o for gctc-ntg-context-518@m.gmane.org; Fri, 23 Mar 2012 14:01:57 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 1A9FB1028D; Fri, 23 Mar 2012 14:01:54 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at balder.ntg.nl Original-Received: from balder.ntg.nl ([127.0.0.1]) by localhost (localhost [127.0.0.1]) (amavisd-new, port 10024) with LMTP id RAJIjdqV545X; Fri, 23 Mar 2012 14:01:49 +0100 (CET) Original-Received: from [127.0.0.1] (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id E8A51101E3; Fri, 23 Mar 2012 14:01:48 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 8BC88101E3 for ; Fri, 23 Mar 2012 14:01:47 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at balder.ntg.nl Original-Received: from balder.ntg.nl ([127.0.0.1]) by localhost (localhost [127.0.0.1]) (amavisd-new, port 10024) with LMTP id yUwN2voFwnNE for ; Fri, 23 Mar 2012 14:01:46 +0100 (CET) Original-Received: from filter3-ams.mf.surf.net (filter3-ams.mf.surf.net [192.87.102.71]) by balder.ntg.nl (Postfix) with ESMTP id C538910194 for ; Fri, 23 Mar 2012 14:01:46 +0100 (CET) Original-Received: from oxalide-out.extra.cea.fr (oxalide-out.extra.cea.fr [132.168.224.8]) by filter3-ams.mf.surf.net (8.14.3/8.14.3/Debian-9.4) with ESMTP id q2ND1jpE008690 for ; Fri, 23 Mar 2012 14:01:45 +0100 Original-Received: from epeire2.extra.cea.fr (epeire2.extra.cea.fr [132.167.198.32]) by oxalide.extra.cea.fr (8.14.2/8.14.2/CEAnet-Internet-out-2.3) with ESMTP id q2ND1igK020551 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT) for ; Fri, 23 Mar 2012 14:01:44 +0100 Original-Received: from orpin1.extra.cea.fr (orpin1.extra.cea.fr [132.167.198.4]) by epeire2.extra.cea.fr (8.14.4/8.14.4) with ESMTP id q2ND1ibI027021 for ; Fri, 23 Mar 2012 14:01:44 +0100 (envelope-from alan.braslau@cea.fr) Original-Received: from sole.extra.cea.fr (iram-ha-003840.extra.cea.fr [132.166.25.152]) by orpin1.extra.cea.fr (8.13.8/8.13.8/CEAnet-Extranet-out-1.2) with ESMTP id q2ND1iba025306 for ; Fri, 23 Mar 2012 14:01:44 +0100 In-Reply-To: <67926749-1A4E-4701-BCDC-86C2979590C0@stien.de> X-Mailer: Claws Mail 3.8.0 (GTK+ 2.24.6; amd64-portbld-freebsd9.0) X-Bayes-Prob: 0.0001 (Score 0, tokens from: @@RPTN) X-CanIt-Geo: ip=132.168.224.8; country=FR; latitude=46.0000; longitude=2.0000; http://maps.google.com/maps?q=46.0000,2.0000&z=6 X-CanItPRO-Stream: uu:ntg-context@ntg.nl (inherits from uu:default, base:default) X-Canit-Stats-ID: 0LGN11JSd - 9cf6a5964f39 - 20120323 (trained as not-spam) X-Scanned-By: CanIt (www . roaringpenguin . com) on 192.87.102.71 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:75313 Archived-At: On Fri, 23 Mar 2012 21:57:04 +1100 Malte Stien wrote: > Hi all, > > Is it possible to format indexed words in a particular style within > the text more or less automatically. For example, if I write > > There are some \index[ducks] in the zoo. > > ...I would like the term "ducks" to appear in small-capitals to > indicate the that term can be found in the index. Ideally, I'd like > to do that without explicit manual formatting. Is that possible? > > Thank you, > Malte. Your example above would not print the word "ducks" at all. I commonly use: \def\Index#1{\index{#1}#1} There are some \Index{ducks} in the zoo. In ConTeXt, text to be typeset typically appears within {}. Of course, you can then modify the definition to format the text as you wish: \def\Index#1{\index{#1}\sc #1} I'm sure that there is a more clever way. Note that the \index{} command appears *before* the word, not after. Otherwise, the word might get placed at the end of a page and the index point to the following page. I believe that the \index{} command takes care to avoid the opposite case. Alan ___________________________________________________________________________________ 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 ___________________________________________________________________________________