Re: [NTG-context] indices

2009-05-25 Thread Charles Doherty

Dear Taco,

You are a genius. Works a treat!

Thank you very much.

Charlie
On 24 May 2009, at 17:05, Taco Hoekwater wrote:


Remember this:

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

Drop the #1 .. #2 line and it will no longer typeset anything:


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


Re: [NTG-context] indices

2009-05-24 Thread Taco Hoekwater

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
 {\@@p...@keywords}
 {% keywords present
  #1\@@p...@keywords #2%
 }
 {#3}% no keywords
  }
\protect

If you change that to

\unprotect
\def\insertkeywords#1#2#3%
  {\bibdoifelse{\@@p...@keywords}
 {%
  #1\@@p...@keywords #2%
  \processcommacommand[\@@p...@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
___


Re: [NTG-context] indices

2009-05-24 Thread Taco Hoekwater

Charles Doherty wrote:

Dear Taco,

I inserted the code as you suggested although perhaps not in the 
position you would yourself. I had to add the {} to 
\insertkeywords{}{}{}


I did this in the bibl.apa file and I get my index. Of course the 
keywords are now inserted in the bibliography. Is there a way to prevent 
that but still produce the index? Here are the test files that I am 
using. I really appreciate you taking the time to help me with this.


Remember this:

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

Drop the #1 .. #2 line and it will no longer typeset anything:


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

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
___


[NTG-context] indices

2009-05-23 Thread Charles Doherty

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.


Thank you in advance.
Charlie Doherty
***
Mr Charles Doherty,
Early Irish History,
Room K113,
School of History,
John Henry Newman Building,
University College Dublin,
Belfield,
Dublin 4

Tel: +353 1 716 8381

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