ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: "Rogers, Michael K" <mroge02@emory.edu>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Re: Formatting Indexed Words Within the Text
Date: Fri, 23 Mar 2012 11:30:12 +0000	[thread overview]
Message-ID: <714DE07B-4260-48DF-AB96-6D8F1DB27EF5@emory.edu> (raw)
In-Reply-To: <67926749-1A4E-4701-BCDC-86C2979590C0@stien.de>

On Mar 23, 2012, at 6:57 AM, Malte Stien wrote:

> 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.

One way is to use your own macro:

\def\MyIndex#1{\index{#1}{\sc #1}}
\starttext
There are some \MyIndex{ducks} in the zoo.
\stoptext

By the way, your \index[ducks] didn't work for me the way I thought you wanted; I changed the [] to {} and added the word to the text body.  As far as I can tell, \index only adds entries to the index register and not to the text.

________________________________

This e-mail message (including any attachments) is for the sole use of
the intended recipient(s) and may contain confidential and privileged
information. If the reader of this message is not the intended
recipient, you are hereby notified that any dissemination, distribution
or copying of this message (including any attachments) is strictly
prohibited.

If you have received this message in error, please contact
the sender by reply e-mail message and destroy all copies of the
original message (including attachments).
___________________________________________________________________________________
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
___________________________________________________________________________________


  reply	other threads:[~2012-03-23 11:30 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-03-23 10:57 Malte Stien
2012-03-23 11:30 ` Rogers, Michael K [this message]
2012-03-23 13:04 ` Alan BRASLAU
2012-03-23 18:42 ` Hans Hagen
2012-03-24 10:20   ` Alan Braslau
2012-03-24 10:28     ` Hans Hagen
     [not found] <mailman.204.1332507708.3819.ntg-context@ntg.nl>
2012-03-24  4:19 ` Malte Stien

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=714DE07B-4260-48DF-AB96-6D8F1DB27EF5@emory.edu \
    --to=mroge02@emory.edu \
    --cc=ntg-context@ntg.nl \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).