[Tex/LaTex] References in ConTeXt

bibliographiesbibtexcontext

I am new to ConTeXt. I've just been playing around with it to see if I can start using for my regular work.

My bibliography database is in the bibtex format. I can't seem to get the references to print properly when I use \completepublications. \placepublications seems to work fine though.

Here is my minimum working example:

\usemodule[bib]
\usemodule[bibltx]
\setupbibtex[database=xampl]
\setuppublications[numbering=yes] % Show reference numbers in the generated list.
\starttext
\chapter{One}
As \cite[lat2cont] already indicated, bibtex is a \LaTeX-centric program.
\completepublications
%\placepublications
\stoptext

Here is my bib file:

@article{lat2cont,
    title   = {Latex to context},
    author  = {Abc},
    journal = {Xyz},
    year    = 2003,
    pages   = {603-619},
}

My MWE is more or less the same as that on the ConTeXt wiki.

\completepublications doesn't generate the references and just prints [[error]] in place of the citations and nothing under the references heading. Am I missing something?

Best Answer

Substitute

\completepublications

with

\completepublications [criterium=all]

That will display all references. To display only the cited references use

\completepublications [criterium=text]

A side note: When you use MkIV (when you compile with context file instead of texexec file) you don't need the first two \usemodule lines. The code is integrated in the system core.

Another thing I stumbled upon is the use of \completepublications in combination with PDF bookmarks. The \completepublications produces the PDF bookmark pubs, which I almost always want to be replaced with References. In the following example I changed this.


\setupinteraction  [state=start]
\placebookmarks    [title, chapter] [force=yes]
\setupbibtex       [database=xampl]
\setuppublications [numbering=yes]

\starttext

\startchapter [title=One]
    As \cite[lat2cont] already indicated, bibtex is a \LaTeX-centric program.
\stopchapter

%\completepublications [criterium=text] % produces *pubs* as PDF bookmark
\starttitle [title=References]          % produces *References* as PDF bookmark
    \placepublications
\stoptitle

\stoptext
Related Question