# Bibliography in ConTeXt

I have two problems with bibliography using ConTeXt ver: 2013.01.10 01:04 MKIV.

1. I would like to get \citet like behaviour Author name [1]. However, presently the MWE produces only the numbers.

2. Secondly, a list of publications is not being produced at all either \placepublications or \completepublications.

MWE

\setupbibtex[database={bib}]
%\setuppublications[alternative=]

\starttext
I am refering to \cite{me13}.
\placepublications[criterium=text]
\stoptext

bib.bib

@article{me13,
title = {This bibliography in context},
author = {Convert, Recent},
journal = {Tex SX},
volume = {1},
number = {1},
pages = {1-11},
year = {2013},
}
-
The scheme Author [number] is not supported by default. But alternative=apa is quite close. It displays the author name(s) and the year. I get a list of publications with \placepublications[criterium=text] and with \completepublications[criterium=text] –  Marco Jan 14 '13 at 11:53
@Marco Did you get the list of publications for this MWE? The workflow is: context main.tex. As I understand it, I do not have to run bibtex. –  devendra Jan 14 '13 at 13:16
@Marco Issue resolved. However, could you point me a direction on how to go about writing a new bibliography style? –  devendra Jan 14 '13 at 13:27

You need to change the refcommand to authornum, i.e.,

\setuppublications[alternative=num, refcommand=authornum]

A complete MWE:

\setupbibtex[database={bib}]
\setuppublications[alternative=num, refcommand=authornum]

\starttext
I am refering to \cite{me13}.

\placepublications[criterium=text]
\stoptext

gives

EDIT: There is a bug with authornum due to which it does not work when the citation contains more than three authors. Here is a bug fix.

\setupbibtex[database={bib}]
\setuppublications[alternative=num, refcommand=authornum]

\unprotected\def\dobibauthornumref#1%
{\bibinsertrefsep
\doifbibreferencefoundelse{#1}
{\begingroup
\cite[left=,right=,alternative=author][#1]%
\bibalternative\c!inbetween
\cite[num][#1]%
\endgroup}
{}}

\starttext
\startTEXpage[offset=3mm]
I am refering to \cite[me13]. I can also refer to \cite[me13a,me13b].

\placepublications[criterium=text]
\stopTEXpage
\stoptext

where the bib.bib file is

@article{me13,
title = {This bibliography in context},
author = {Convert, Recent and User, Latex and Guru, Old},
journal = {Tex SX},
volume = {1},
number = {1},
pages = {1-11},
year = {2013},
}

@article{me13a,
title = {This bibliography in context},
author = {Convert, Recent and Guru, Old},
journal = {Tex SX},
volume = {1},
number = {2},
pages = {12-16},
year = {2013},
}

@article{me13b,
title = {This bibliography in context},
author = {Convert, Recent},
journal = {Tex SX},
volume = {1},
number = {3},
pages = {17-32},
year = {2013},
}

which gives

-
If you add two more authors to the example, then et al. should be added in the citation. But it only gives Convert, [1]. –  devendra Jan 14 '13 at 13:45
I thought that the solution would involve some use of \setupcite. –  devendra Jan 14 '13 at 17:35