On 15-8-2011 4:31, Willi Egger wrote:
Hoi Hans,

in het erste mail hierover waren er twee attachments.

Hier dit mail voor jou.

Groet!

Willi

Begin forwarded message:

From: Willi Egger<w.eg...@boede.nl>
Date: 14 August 2011 20:53:47 CEST
To: NTG-Context ConTeXt users<ntg-context@ntg.nl>
Subject: Bib-module

Hi bib-module gurus!

I think I need some hints how to get enclosed example working...

The log sys:
(/Users/willi/Documents/TEXdata/Hufbeschlag/test/publist-test.tex

ConTeXt  ver: 2011.08.08 23:54 MKIV  fmt: 2011.8.12  int: english/english
...

(/Applications/lua-experimental/tex/texmf-context/tex/context/bib/bibl-apa..tex)
 (publist-test.bbl)
publications>  loading database from publist-test.bbl
(publist-test.bbl)
publications>  warning: unknown cite argument Hess1968 on line \the\inputlineno
publications>  file criterium=text.bbl not found, waiting for bibtex
publications>  placing all entries, use 'text' to be more selective
backend>  xmp>  using file 
'/Applications/lua-experimental/tex/texmf-context/tex/context/base/lpdf-pdx.xml'
LuaTeX warning (ext4): destination with the same identifier (name{1:unknown}) 
has been already used, duplicate ignored

Two issues:

(1) Don't include the bbl files as it already gets included (and you will get duplicate entries). This is a more minumal test file:

\setuppublications
  [alternative=apa,
   refcommand=authornum,
   numbering=yes,
   sorttype=bbl]

\starttext

    blabla (\cite[author][Hess1968])

    \placepublications[criterium=all]

\stoptext

(2) The fact that you get the same entries n times is due to the fact that % is no comment:

%D Now prohibits comments, so % can be used for urls

However, you can patch the bibl-tra.mkiv file:

\def\dostartpublication[#1]%
  {\begingroup
   \doifassignmentelse{#1}%
     {\getparameters[\??pb][k=\s!unknown,t=article,n=,s=,a=,y=,o=,u=,#1]}%
     {\getparameters[\??pb][k=#1,t=article,n=,s=,a=,y=,o=,u=]}%
   \ctxlua{bibtex.hacks.register("\@@pbk")}%
   \catcode\commentasciicode\othercatcode
   \dodostartpublication}

\def\dodostartpublication#1\stoppublication
  {\setxvalue{pbd:\@@pbk}##1{\noexpand\ifcase##1\noexpand\or
     \@@pbk\noexpand\or
     \@@pba\noexpand\or
     \@@pby\noexpand\or
     \@@pbs\noexpand\or
     \@@pbn\noexpand\or
     \@@pbt\noexpand\or
     \@@pbo\noexpand\or
     \@@pbu\noexpand\or
     \normalunexpanded{#1}\noexpand\fi}%
   \endgroup
   \ignorespaces}

so that comments in the [] argument keep their meaning.

Hans

-----------------------------------------------------------------
                                          Hans Hagen | PRAGMA ADE
              Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
    tel: 038 477 53 69 | voip: 087 875 68 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
___________________________________________________________________________________

Reply via email to