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