Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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?

share|improve this question

1 Answer 1

up vote 12 down vote accepted

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
share|improve this answer
1  
The citerium=all option prints out all the entries in the bib file. I usually use a single large bib database for all my work, so this option is not really suitable for me. I know I'm nitpicking here, but is there a way to get only the cited references in the style \completepublications prints it out. –  Adi Jan 25 '12 at 11:33
    
It's not nitpicking, you're totally right. I changed my answer to only display the cited publications. –  Marco Jan 25 '12 at 11:53
1  
A quick follow-up question. How did you know about this option? Because I can't fin it in the documentation for the bib module. It only lists the options all and cite for criterium. –  Adi Jan 25 '12 at 15:17
2  
text is a valid value for lists like \placelist[<some_list] or \placecontent. Since publications are also just a list, it should take the same options. –  Marco Jan 26 '12 at 11:23
    
Thanks for the question and the answers; I pondered about the problem for some days 'till I found that you can use the "text" argument! –  JanD Jul 22 '12 at 10:28

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.