ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* indices
@ 2009-05-23 15:40 Charles Doherty
  2009-05-24  7:45 ` indices Taco Hoekwater
  0 siblings, 1 reply; 5+ messages in thread
From: Charles Doherty @ 2009-05-23 15:40 UTC (permalink / raw)
  To: mailing list for ConTeXt users

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
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: indices
  2009-05-23 15:40 indices Charles Doherty
@ 2009-05-24  7:45 ` Taco Hoekwater
  2009-05-24 14:09   ` indices Charles Doherty
  0 siblings, 1 reply; 5+ messages in thread
From: Taco Hoekwater @ 2009-05-24  7:45 UTC (permalink / raw)
  To: mailing list for ConTeXt users

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
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: indices
  2009-05-24  7:45 ` indices Taco Hoekwater
@ 2009-05-24 14:09   ` Charles Doherty
  2009-05-24 16:05     ` indices Taco Hoekwater
  0 siblings, 1 reply; 5+ messages in thread
From: Charles Doherty @ 2009-05-24 14:09 UTC (permalink / raw)
  To: mailing list for ConTeXt users

[-- Attachment #1: Type: text/plain, Size: 467 bytes --]

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


[-- Attachment #2: IndexHag.bbl --]
[-- Type: application/octet-stream, Size: 5282 bytes --]

\setuppublicationlist[samplesize={Bie87b},totalnumber=10]

\startpublication[k=Aitchison:Armagh,t=book,
a={{Aitchison}},y=1994,
n=1,s=Ait94]
\author[]{N.B.}[N.]{}{Aitchison}
\pubyear{1994}
\title{Armagh and the Royal Centres in Early Medieval Ireland. Monuments,
  Cosmology, and the Past}
\city{Woodbridge}
\note{\lib{941.66}\\ I have written a review of this book in Irish Historical
  Studies. It is an interesing view of the material and is thought-provoking.
  But there are wild leaps of the imagination and much speculation stretches
  the evidence}
\keywords{Aitchison, Armagh, royal centres, monuments, cosmology}
\stoppublication

\startpublication[k=Anderson:Adomnan,t=book,
a={{Anderson},{Anderson}},y=1991,
n=2,s=AA91]
\editor[]{Alan~Orr}[A.~O.]{}{Anderson}
\editor[]{Marjorie~Ogilvie}[M.~O.]{}{Anderson}
\pubyear{1991}
\title{Adomn{\'a}n's Life of Columba}
\city{Oxford}
\pubname{[Thomas Nelson and Sons Ltd., Edinburgh and London 1961] revised by
  Marjorie Ogilvie Anderson, Clarendon Press}
\note{\lib{282}\\ This is an edition and translation of the earliest `life' of
  St Colum Cille. This `life' is one of the most important for history and
  archaeology. It {\em must} be read}
\keywords{Anderson, Columba, Colum Cille, Adamn{\'a}n, hagiography,
  hagiographer, saints' lives}
\stoppublication

\startpublication[k=Bammesberger-Wollmann:Britain,t=book,
a={{Bammesberger},{Wollmann}},y=1990,
n=3,s=BW90]
\editor[]{A.}[A.]{}{Bammesberger}
\editor[]{A.}[A.]{}{Wollmann}
\pubyear{1990}
\title{Britain 400--600: Language and History}
\city{Heidelberg}
\note{\lib{420.9}\\ An important collection of essays. providing a context for
  the Christianisation of Early Ireland}
\keywords{Bammesberger, Wollmann, Britain, language, Early Christian Ireland}
\stoppublication

\startpublication[k=Bhreathnach:Tara,t=book,
a={{Bhreathnach}},y=1993,
n=4,s=Bhr93]
\author[]{E.}[E.]{}{Bhreathnach}
\pubyear{1993}
\title{Tara: The literary and historical perspective}
\series{Discovery Programme Reports 1. Project Results 1992 (Pages 94--97)}
\city{Dublin}
\pubname{Royal Irish Academy / Discovery Programme}
\note{\lib{Store LD95.8930}\\ The material gathered here will provide the basis
  for a deeper understanding of the role of Tara in the biography of Patrick.
  What was its symbolical significance for seventh-century Churchmen? Why
  should they be concerned with such a {\em pagan} site?}
\keywords{Bhreathnach, Tara, literature}
\stoppublication

\startpublication[k=Bhreathnach:TaraBibliography,t=incollection,
a={{Bhreathnach}},y=1995,
n=5,s=Bhr95]
\artauthor[]{E.}[E.]{}{Bhreathnach}
\pubyear{1995}
\arttitle{Introduction}
\title{Tara. A Select Bibliography}
\city{Dublin}
\chapter{1}
\pubname{Royal Irish Academy / Discovery Programme}
\note{\lib{941.5/DIS}\\ The introduction to this Select Bibliography provides a
  useful summary and guide to the sources referring to Tara. In particular pp
  21--26 extract and comment on the references in the hagiography}
\keywords{Bhreathnach, Tara, bibliography, hagiography}
\stoppublication

\startpublication[k=BhreathnachNewmann:Tara,t=book,
a={{Bhreathnach},{Newman}},y=1995,
n=6,s=BN95]
\author[]{E.}[E.]{}{Bhreathnach}
\author[]{C.}[C.]{}{Newman}
\pubyear{1995}
\title{Tara}
\city{Dublin}
\pubname{Stationery Office}
\note{\lib{W77}\\A beautifully illustrated guide to Tara. Well worth buying}
\keywords{Bhreathnach, Newmann, Tara}
\stoppublication

\startpublication[k=Bieler:LifeLegend,t=book,
a={{Bieler}},y=1949,
n=10,s=Bie49]
\author[]{Ludwig}[L.]{}{Bieler}
\pubyear{1949}
\title{The Life and Legend of St Patrick: Problems of Modern Scholarship}
\city{Dublin}
\note{\lib{274.15/S}\\ Although dated, Professor Bieler's work was fundamental
  in furthering Patrician studies during the middle decades of the last
  century}
\keywords{Bieler, Patrick, legends, Muirch{\'u}, T{\'\i}rech{\'a}n,
  hagiography, saints lives}
\stoppublication

\startpublication[k=Bieler:harbinger,t=book,
a={{Bieler}},y=1966,
n=9,s=Bie66]
\author[]{Ludwig}[L.]{}{Bieler}
\pubyear{1966}
\title{Ireland, Harbinger of the Middle Ages}
\city{London}
\note{\lib{274.15}\\ This is a great work of cultural history of Early Ireland.
  It is rich in textual and visual material. It is a joy to read. It {\em
  should} be read}
\keywords{Bieler, harbinger, Middle Ages, Early Christian Ireland}
\stoppublication

\startpublication[k=Bieler:CelticHagiographer,t=incollection,
a={{Bieler}},y=1987a,
n=7,s=Bie87a]
\artauthor[]{Ludwig}[L.]{}{Bieler}
\pubyear{1987\maybeyear{a}}
\arttitle{The {C}eltic hagiographer}
\crossref{Bieler:culture}
\chapter{X}
\pubname{Variorum Reprints}
\note{\lib{189~BIE}\\ A short but fundamentally important article on the
  origins of hagiography in Early Ireland}
\keywords{Bieler, Celtic hagiographer, Latin, hagiography, hagiographer}
\stoppublication

\startpublication[k=Bieler:culture,t=book,
a={{Bieler}},y=1987b,
n=8,s=Bie87b]
\author[]{Ludwig}[L.]{}{Bieler}
\pubyear{1987\maybeyear{b}}
\title{Ireland and the Culture of Early Medieval Europe. \rm Edited by Richard
  Sharpe}
\city{London}
\pubname{Variorum Reprints}
\note{\lib{189~BIE}\\ A collection of the important contributions of Bieler to
  the history of our early Church history}
\keywords{Bieler, culture, Ireland and Europe}
\stoppublication


[-- Attachment #3: IndexHag.bib --]
[-- Type: application/octet-stream, Size: 6082 bytes --]

%% This BibTeX bibliography file was created using BibDesk.
%% http://bibdesk.sourceforge.net/


%% Created for Charles Doherty at 2009-05-24 14:56:17 +0100 


%% Saved with string encoding Unicode (UTF-8) 



@book{Aitchison:Armagh,
	Address = {Woodbridge},
	Author = {Aitchison, N.B.},
	Booktitle = {Armagh and the Royal Centres in Early Medieval Ireland. Monuments, Cosmology, and the Past},
	Date-Added = {2009-05-23 15:06:27 +0100},
	Date-Modified = {2009-05-24 14:47:01 +0100},
	Keywords = {Aitchison, Armagh, royal centres, monuments, cosmology},
	Note = {\lib{941.66}\\ I have written a review of this book in Irish Historical Studies. It is an interesing view of the material and is thought-provoking. But there are wild leaps of the imagination and much speculation stretches the evidence},
	Title = {Armagh and the Royal Centres in Early Medieval Ireland. Monuments, Cosmology, and the Past},
	Year = 1994}

@book{Anderson:Adomnan,
	Address = {Oxford},
	Booktitle = {Adomn{\'a}n's Life of Columba},
	Date-Added = {2009-05-23 15:06:27 +0100},
	Date-Modified = {2009-05-24 14:47:11 +0100},
	Editor = {Anderson, Alan Orr and Anderson, Marjorie Ogilvie},
	Keywords = {Anderson, Columba, Colum Cille, Adamn{\'a}n, hagiography, hagiographer, saints' lives},
	Note = {\lib{282}\\ This is an edition and translation of the earliest `life' of St Colum Cille. This `life' is one of the most important for history and archaeology. It {\em must} be read},
	Publisher = {[Thomas Nelson and Sons Ltd., Edinburgh and London 1961] revised by Marjorie Ogilvie Anderson, Clarendon Press},
	Title = {Adomn{\'a}n's Life of Columba},
	Year = 1991}

@book{Bammesberger-Wollmann:Britain,
	Address = {Heidelberg},
	Booktitle = {Britain 400--600: Language and History},
	Date-Added = {2009-05-23 15:06:27 +0100},
	Date-Modified = {2009-05-24 14:47:20 +0100},
	Editor = {Bammesberger, A. and Wollmann, A.},
	Keywords = {Bammesberger, Wollmann, Britain, language, Early Christian Ireland},
	Note = {\lib{420.9}\\ An important collection of essays. providing a context for the Christianisation of Early Ireland},
	Title = {Britain 400--600: Language and History},
	Year = 1990}

@book{Bhreathnach:Tara,
	Address = {Dublin},
	Author = {Bhreathnach, E.},
	Date-Added = {2009-05-23 15:06:27 +0100},
	Date-Modified = {2009-05-24 14:23:13 +0100},
	Keywords = {Bhreathnach, Tara, literature},
	Note = {\lib{Store LD95.8930}\\ The material gathered here will provide the basis for a deeper understanding of                  the role of Tara in the biography of Patrick. What was its symbolical significance for seventh-century Churchmen? Why should they be concerned with such a {\em pagan} site?},
	Publisher = {Royal Irish Academy / Discovery Programme},
	Series = {Discovery Programme Reports 1. Project Results 1992  (Pages 94--97)},
	Title = {Tara: The literary and historical perspective},
	Year = 1993}

@incollection{Bhreathnach:TaraBibliography,
	Address = {Dublin},
	Author = {Bhreathnach, E.},
	Booktitle = {Tara. A Select Bibliography},
	Chapter = 1,
	Date-Added = {2009-05-23 15:06:27 +0100},
	Date-Modified = {2009-05-24 14:47:57 +0100},
	Keywords = {Bhreathnach, Tara, bibliography, hagiography},
	Note = {\lib{941.5/DIS}\\ The introduction to this Select Bibliography provides a useful summary and guide to the sources referring to Tara. In particular pp 21--26 extract and comment on the references in the hagiography},
	Publisher = {Royal Irish Academy / Discovery Programme},
	Title = {Introduction},
	Year = 1995}

@book{BhreathnachNewmann:Tara,
	Address = {Dublin},
	Author = {Bhreathnach, E. and Newman, C.},
	Date-Added = {2009-05-23 15:06:27 +0100},
	Date-Modified = {2009-05-24 14:52:52 +0100},
	Keywords = {Bhreathnach, Newmann, Tara},
	Note = {\lib{W77}\\A beautifully illustrated guide to Tara. Well worth buying},
	Publisher = {Stationery Office},
	Title = {Tara},
	Year = 1995}

@incollection{Bieler:CelticHagiographer,
	Author = {Bieler, Ludwig},
	Booktitle = {Ireland and the Culture of Early Medieval Europe},
	Chapter = {X},
	Crossref = {Bieler:culture},
	Date-Added = {2009-05-23 15:06:27 +0100},
	Date-Modified = {2009-05-24 14:48:16 +0100},
	Keywords = {Bieler, Celtic hagiographer, Latin, hagiography, hagiographer},
	Note = {\lib{189~BIE}\\ A short but fundamentally important article on the origins of hagiography in Early Ireland},
	Title = {The {C}eltic hagiographer}}

@book{Bieler:culture,
	Address = {London},
	Author = {Bieler, Ludwig},
	Booktitle = {Ireland and the Culture of Early Medieval Europe. \rm Edited by Richard Sharpe},
	Date-Added = {2009-05-23 15:06:27 +0100},
	Date-Modified = {2009-05-24 14:55:41 +0100},
	Keywords = {Bieler, culture, Ireland and Europe},
	Note = {\lib{189~BIE}\\  A collection of the important contributions of Bieler to the history of our early Church history},
	Publisher = {Variorum Reprints},
	Title = {Ireland and the Culture of Early Medieval Europe. \rm Edited by Richard Sharpe},
	Year = 1987}

@book{Bieler:harbinger,
	Address = {London},
	Author = {Bieler, Ludwig},
	Booktitle = {Ireland, Harbinger of the Middle Ages},
	Date-Added = {2009-05-23 15:06:27 +0100},
	Date-Modified = {2009-05-24 14:55:50 +0100},
	Keywords = {Bieler, harbinger, Middle Ages, Early Christian Ireland},
	Note = {\lib{274.15}\\ This is a great work of cultural history of Early Ireland. It is rich in textual and visual material. It is a joy to read. It {\em should} be read},
	Title = {Ireland, Harbinger of the Middle Ages},
	Year = 1966}

@book{Bieler:LifeLegend,
	Address = {Dublin},
	Author = {Bieler, Ludwig},
	Booktitle = {The Life and Legend of St Patrick: Problems of Modern Scholarship},
	Date-Added = {2009-05-23 15:06:27 +0100},
	Date-Modified = {2009-05-24 14:48:46 +0100},
	Keywords = {Bieler, Patrick, legends, Muirch{\'u}, T{\'\i}rech{\'a}n, hagiography, saints lives},
	Note = {\lib{274.15/S}\\ Although dated, Professor Bieler's work was fundamental in furthering Patrician studies during the middle decades of the last century},
	Title = {The Life and Legend of St Patrick: Problems of Modern Scholarship},
	Year = 1949}

[-- Attachment #4: IndexHag.pdf --]
[-- Type: application/pdf, Size: 46683 bytes --]

[-- Attachment #5: IndexHag.tex --]
[-- Type: application/x-tex, Size: 773 bytes --]

[-- Attachment #6: Type: text/plain, Size: 201 bytes --]




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


[-- Attachment #7: Type: text/plain, Size: 487 bytes --]

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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: indices
  2009-05-24 14:09   ` indices Charles Doherty
@ 2009-05-24 16:05     ` Taco Hoekwater
  2009-05-25  8:44       ` indices Charles Doherty
  0 siblings, 1 reply; 5+ messages in thread
From: Taco Hoekwater @ 2009-05-24 16:05 UTC (permalink / raw)
  To: mailing list for ConTeXt users

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


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: indices
  2009-05-24 16:05     ` indices Taco Hoekwater
@ 2009-05-25  8:44       ` Charles Doherty
  0 siblings, 0 replies; 5+ messages in thread
From: Charles Doherty @ 2009-05-25  8:44 UTC (permalink / raw)
  To: mailing list for ConTeXt users

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:

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


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2009-05-25  8:44 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-05-23 15:40 indices Charles Doherty
2009-05-24  7:45 ` indices Taco Hoekwater
2009-05-24 14:09   ` indices Charles Doherty
2009-05-24 16:05     ` indices Taco Hoekwater
2009-05-25  8:44       ` indices Charles Doherty

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