ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Taco Hoekwater <taco@elvenkind.com>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Re: indices
Date: Sun, 24 May 2009 09:45:47 +0200	[thread overview]
Message-ID: <4A18FB2B.1090106@elvenkind.com> (raw)
In-Reply-To: <CC04F810-C285-47EC-82A8-7859115D7DC4@upcmail.ie>

Charles Doherty wrote:
> Dear all,
> 
> I have a bibliography created in BibDesk. I insert it in my .tex file 
> using \setupbibtex[database={IndexHag},sort=author] and with the other 
> commands I get my bibliography printed beautifully. I assign keywords in 
> BibDesk and they appear in a list in the .bbl file for example as 
> \keywords{Anderson, Columba, Colum Cille, Adamn{\'a}n, hagiography, 
> hagiographer, saints lives}
> In the bibmod.pdf guide it says that
>  \keyword KEYWORD Just text (for use in indices)
>  \keywords KEYWORDS Just text (for use in indices)
> 
> I have a very long bibliography and it would be great to automatically 
> generate indices based on the keywords that do not appear in the 
> bibliography itself. If this can be done can someone show me how to go 
> about that.

That should be possible, using two stages.

First you have to make sure that there is an \insertkeywords in
each of the \setuppublicationlayout definitions that you are
using (look into the bibl-xxx files for examples).

Second you have to redefine \insertkeywords so that it does a bit
more work than normal. Here is what it normally does:

\unprotect
\def\insertkeywords#1#2#3%
   {\bibdoifelse
      {\@@pb@keywords}
      {% keywords present
       #1\@@pb@keywords #2%
      }
      {#3}% no keywords
   }
\protect

If you change that to

\unprotect
\def\insertkeywords#1#2#3%
   {\bibdoifelse{\@@pb@keywords}
      {%
       #1\@@pb@keywords #2%
       \processcommacommand[\@@pb@keywords]\index
      }
      {#3}%
   }
\protect

it should create the indices you want, besides.

This is untested, if it does not work you should send me a test file.

Best wishes,
Taco

___________________________________________________________________________________
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  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


  reply	other threads:[~2009-05-24  7:45 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-05-23 15:40 indices Charles Doherty
2009-05-24  7:45 ` Taco Hoekwater [this message]
2009-05-24 14:09   ` indices Charles Doherty
2009-05-24 16:05     ` indices Taco Hoekwater
2009-05-25  8:44       ` indices Charles Doherty

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=4A18FB2B.1090106@elvenkind.com \
    --to=taco@elvenkind.com \
    --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).