Hi, I don't want to sound like a whiner, but I was just wondering if there's any chance of having the bib module fixed. I have a paper to write within the next three weeks, and if bib doesn't work, I will have to use something else than ConTeXt. My problem is that numbered references do not produce any output. I attach a minimal example that gives the expected output in an older version of ConTeXt yet produces an empty citation in the most recent beta with the most recent bib module. All best Thomas \usemodule[bib] \setuppublications [refcommand=num, numbering=yes] \setuppublicationlayout[article]{% \insertartauthors{}{: }{\insertthekey{}{ }{}}% \insertarttitle{\quotation\bgroup}{,\egroup\ }{}% \insertjournal{\bgroup \it}{\egroup}{\insertcrossref{in }{}{}}% \insertvolume{ }{}{}% \insertpubyear{ (}{) }{\unskip.}% \insertpages{}{\insertnote{ [}{].}{.}}{.}% \insertcomment{[}{].}{}% } \startpublication[k=belfiorepleasure,t=article, a={{Belfiore}},y=1985, n=126,s=Bel85] \artauthor[]{Elizabeth}[E.]{}{Belfiore} \pubyear{1985} \arttitle{Pleasure, Tragedy and Aristotelian Psychology} \journal{Classical Quarterly} \volume{35} \pages{349--61} \stoppublication \starttext Citation: \cite[belfiorepleasure] List: \placepublications[criterium=all] \stoptext
Hi, I can't fix everything, but I believe I have made some progress. The new structure and referencing code is totally different from the old code and I understand less than half of it. What's worse: I seem to be really bad at explaining to Hans all the things that should happen wrt. references in the bib module. Anyway: Thomas A. Schmitz wrote:
\usemodule[bib]
At this point, please add these three (re)definitions: %%%%%%%%%%%%%%% \def\bibrefprefix{} \def\preparebibreflist#1{\edef\bibreflist{#1}} \def\docitation#1{% \iftrialtypesetting \else \ifdoinpututilities\else \doglobal\increment\citationnumber \expanded{\rawreference{}{cite-\jobname-\citationnumber}{#1}}% \fi \fi \expanded{\writedatatolist[pubs][bibref=#1]}} %%%%%%%%%%%%%%%%% If you turn cite compression off, it will now work (somewhat, at least). With compression on, there is backward compatibility problem in mkiv that I do not know how to deal with. Si here is the explanation and then I hope Hans can make sense out of it. In Thomas' example, in the first run the \placepublications[criterium=all] creates a reference 'belfiorepleasure' with value '1', like so: \reference[belfiorepleasure]{1} In the second run, the \cite[belfiorepleasure] uses this reference to typeset the number '1' at that spot. Because the argument to \cite is actually is a list of references, \cite (via \bibnumref) builds an internal commalist of references to resolve. If the citation compression is off, this is a direct list of refs, and the citation essentially expands into \def\processitem#1{\in[#1]} \processcommalist[belfiorepleasure]\processitem as said, that now works. But if cite compression is on (which it is by default) the to be typeset numbers need to be sorted, and this simple solution won't do. Instead, the citation is expanded into something more like this: \def\therefs{} \def\processitem#1% {\doifreferencefoundelse{#1} {\addtocommalist{\reftypet}\therefs } {}} \processcommalist[belfiorepleasure]\processitem This only works in mkii at the moment because in mkiv the \reftypet expands to nothing. It is defined (in strc-ref.tex) as: \def\reftypet{\currenttextreference} but it seems that the mkiv version of \doifreferencefoundelse does not set up the \currentxxxreference macros any more. That is where I got stuck, and I hope Hans can explain why that doesn't work, whether it is intentional, and if it is indeed on purpose, what the correct interface is to get at the 'text' field of a reference in mkiv. Best wishes, Taco
On May 14, 2009, at 10:08 AM, Taco Hoekwater wrote:
Hi,
I can't fix everything, but I believe I have made some progress.
Hi Taco, thanks a lot for looking into it! Your redefinitions make the minimal example work; I'll have to see how I can transfer them to my non- minimal files where I make extensive adaptations to the bib styles.
The new structure and referencing code is totally different from the old code and I understand less than half of it. What's worse: I seem to be really bad at explaining to Hans all the things that should happen wrt. references in the bib module.
Wow, that's very encouraging for us mere mortals :-) [lots of interesting information snipped]
Best wishes, Taco
Thanks, and best wishes! Thomas
Taco Hoekwater
The new structure and referencing code is totally different from the old code and I understand less than half of it. What's worse: I seem to be really bad at explaining to Hans all the things that should happen wrt. references in the bib module.
:-) FWIW, Frank Bennett has completely written the Zotero Javascript CSL engine to be faster and easier to maintain and extend. It's also now independently hosted and developed. http://bitbucket.org/fbennett/citeproc-js Bruce
participants (3)
-
Bruce D'Arcus
-
Taco Hoekwater
-
Thomas A. Schmitz