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
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
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. Thanks again, Charlie On 24 May 2009, at 08:45, Taco Hoekwater wrote:
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
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{\@@pb@keywords} {% #1\@@pb@keywords #2% \processcommacommand[\@@pb@keywords]\index } {#3}% } \protect Drop the #1 .. #2 line and it will no longer typeset anything: \unprotect \def\insertkeywords#1#2#3% {\bibdoifelse{\@@pb@keywords} {% \processcommacommand[\@@pb@keywords]\index } {#3}% } \protect Best wishes, Taco
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{\@@pb@keywords} {% #1\@@pb@keywords #2% \processcommacommand[\@@pb@keywords]\index } {#3}% } \protect
Drop the #1 .. #2 line and it will no longer typeset anything:
participants (2)
-
Charles Doherty
-
Taco Hoekwater