Re: [NTG-context] bib in mkiv

2010-01-26 Thread Hans Hagen

On 26-1-2010 19:25, Aditya Mahajan wrote:

On Tue, 26 Jan 2010, Thomas A. Schmitz wrote:



On Jan 26, 2010, at 3:50 PM, Hans Hagen wrote:


so it looks like it's interpreting the \nocite[*] literally. Any
thoughts on this?


not that many as you forgot to tell what the * is supposed to do -)


:-) It's supposed to include everything, i.e. all the references in
the bbl.


\nocite is a bibtex kludge. Could we implement this feature in MkIV
using a different syntax, maybe

\placepublications[critirium=database]

or some key in \setuppublications.


makes sense; an alternative is to map rendering on the newer methods

as thomas likes to use xml  here's a test file


\dontcomplain

\def\MF {MF} \def\MP {MP} \def\TUB{TUGboat} \def\Mc {Mac}
\def\sltt{\tt} \def\acro#1{#1}

\usemodule[abr-01]

\startxmlsetups bibtex
% todo: messy
\xmlregistereddocumentsetups{#1}{}
\xmlsetsetup{#1}{bibtex|c|e|v}{bibtex:*}
\xmlmain{#1}
\stopxmlsetups

% \xmlregisterdocumentsetup{bibtex:somebibtex}{bibtex:main}

\startxmlsetups bibtex:bibtex
\xmlfilter{#1}{e/v...@n=='author' and find(text(),'Hans Hagen') or 
find(text(),'Taco Hoekwater')]/../command(bibtex:one)}

\stopxmlsetups

\startxmlsetups bibtex:c
\stopxmlsetups

\startxmlsetups bibtex:e
\stopxmlsetups

% \startxmlsetups bibtex:v
%\xmlflushcontext{#1}
% \stopxmlsetups

\startxmlsetups xml:bibtex:sorter
\xmlresetsorter{bibtex}
\xmlfilter{#1}{e/command(bibtex:entry:getkeys)}
\blank sortkeys: \blank\xmlshowsorter{bibtex}\blank
\xmlsortentries{bibtex}
\xmlflushsorter{bibtex}{bibtex:entry:flush}
\stopxmlsetups

\startxmlsetups bibtex:entry:getkeys
\xmladdsortentry{bibtex}{#1}{\xmlfilter{#1}{/v...@n=='author']/text()}}
\xmladdsortentry{bibtex}{#1}{\xmlfilter{#1}{/v...@n=='year']/text()}}
\xmladdsortentry{bibtex}{#1}{\xmlatt{#1}{n}}
\stopxmlsetups

\startxmlsetups bibtex:one
\starttabulate
\NC id \NC \xmlatt{#1}{n} \NC \NR
\NC author \NC \xmlfilter{#1}{/v...@n=='author']/context()} \NC \NR
\NC title  \NC \xmlfilter{#1}{/v...@n=='title']/context()} \NC \NR
\stoptabulate
\stopxmlsetups

\startxmlsetups bibtex:entry:flush
\xmlfilter{#1}{/v...@n=='author']/context()} / %
\xmlfilter{#1}{/v...@n=='year']/context()}   / %
\xmlatt{#1}{n}\par
\stopxmlsetups


\starttext

\definebibtexsession [somebibtex]
% \registerbibtexentry [somebibtex][Hagen:TB26-2-152]
\registerbibtexfile  [somebibtex][tugboat.bib]
\registerbibtexfile  [somebibtex][komoedie.bib]
% \registerbibtexentry [somebibtex][Hagen:TB26-2-152]
\preparebibtexsession[somebibtex]
\applytobibtexsession[somebibtex][bibtex]

\xmlsetup{bibtex:somebibtex}{xml:bibtex:sorter}

\stoptext





-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
 tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
 | www.pragma-pod.nl
-
___
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
___


Re: [NTG-context] bib in mkiv

2010-01-26 Thread Aditya Mahajan

On Tue, 26 Jan 2010, Thomas A. Schmitz wrote:



On Jan 26, 2010, at 3:50 PM, Hans Hagen wrote:


so it looks like it's interpreting the \nocite[*] literally. Any
thoughts on this?


not that many as you forgot to tell what the * is supposed to do -)


:-) It's supposed to include everything, i.e. all the references in the bbl.


\nocite is a bibtex kludge. Could we implement this feature in MkIV using 
a different syntax, maybe


\placepublications[critirium=database]

or some key in \setuppublications.

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


Re: [NTG-context] bib in mkiv

2010-01-26 Thread Thomas A. Schmitz


On Jan 26, 2010, at 3:50 PM, Hans Hagen wrote:


so it looks like it's interpreting the \nocite[*] literally. Any
thoughts on this?


not that many as you forgot to tell what the * is supposed to do -)


:-) It's supposed to include everything, i.e. all the references in  
the bbl.

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


Re: [NTG-context] bib in mkiv

2010-01-26 Thread Hans Hagen

On 26-1-2010 15:34, Thomas A. Schmitz wrote:

Hi all,

shouldn't this work in mkiv as well? It does work in mkii. In mkiv, I
see in the log file

publications : warning: cite argument * is unknown on line 175

so it looks like it's interpreting the \nocite[*] literally. Any
thoughts on this?


not that many as you forgot to tell what the * is supposed to do -)

-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
 tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
 | www.pragma-pod.nl
-
___
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
___


[NTG-context] bib in mkiv

2010-01-26 Thread Thomas A. Schmitz

Hi all,

shouldn't this work in mkiv as well? It does work in mkii. In mkiv, I  
see in the log file


publications: warning: cite argument * is unknown on line 175

so it looks like it's interpreting the \nocite[*] literally. Any  
thoughts on this?


All best

Thomas

\setuppublicationlist[samplesize={vdORW06},totalnumber=2]

\startpublication[k=arafatpausanias,t=book,
a={{Arafat}},y=1996,
n=1,s=Ara96]
\author[]{Karim~W.}[K.~W.]{}{Arafat}
\pubyear{1996}
\title{Pausanias' Greece: Ancient Artists and Roman Rulers}
\city{Cambridge (Engl.)}
\pubname{Cambridge UP}
\stoppublication

\startpublication[k=sidebottompausanias,t=article,
a={{Sidebottom}},y=2002,
n=8,s=Sid02]
\artauthor[]{Harry}[H.]{}{Sidebottom}
\pubyear{2002}
\arttitle{Pausanias: Past, Present, and Closure}
\journal{Classical Quarterly}
\volume{52}
\pages{494--499}
\stoppublication

\setuppublications
[state=start,
 sorttype=bbl,
 criterium=all,
 numbering=yes]

\setuppublicationlist[criterium=all]


\starttext

\section{References}

\nocite[*]

\placepublications[criterium=all]

\stoptext


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