%% setting up for bibliography in maths papers

\startsetups paper:Biblio

\setuppublications[
	numbering=yes,
	alternative=num,
	sorttype=bbl,
	autohang=yes,
	criterium=cite]

\setuppublicationlist[
	author=\invertedauthor, %\invertedshortauthor
	surnamesep={, },
	namesep={; }
	]

\setuppublicationlayout[manual]{% 
	\insertauthors{}{: }{\insertthekey{}{. }{}}% 
%	\insertpubyear{(}{): }{}% 
	\inserttitle{\bgroup \it }{\/. \egroup}{}% 
	\insertseries{(}{). }{}%
	\insertpublisher{}{. }{}% 
	\insertpubyear{(}{): }{}% 
	\insertpages{}{~pages. }{}% 
	\inserturl{\bgroup \tt }{\egroup}{}% ADDED 
%	\insertnote{ }{.}{}% 
} 

\setuppublicationlayout[article]{% 
	\insertauthors{}{: }{\insertthekey{}{. }{}}% 
%	\insertpubyear{(}{): }{}% 
	\inserttitle{\bgroup \it }{\/. \egroup}{}% 
	\insertseries{(}{). }{}%
	\insertjournal{}{, }{}% 
	\insertissue{n${}^\circ$ }{, }{}%
	\insertvolume{\bgroup \bf }{\egroup, }{}%
	\insertpubyear{(}{), }{}% 
	\insertpages{pp. }{. }{}% 
	\inserturl{\bgroup \tt }{\egroup}{}% ADDED 
%	\insertnote{ }{.}{}% 
} 

\setuppublicationlayout[book]{% 
	\insertauthors{}{: }{\insertthekey{}{. }{}}% 
%	\insertpubyear{(}{): }{}% 
	\inserttitle{\bgroup \ss\it }{\/. \egroup}{}% 
	\insertseries{(}{). }{}%
	\insertpages{}{~pages, }{}% 
	\insertpublisher{}{, }{}%
	\insertpubyear{(}{). }{}%  
	\inserturl{\bgroup \tt }{\egroup}{}% ADDED 
%	\insertnote{ }{.}{}% 
} 

\setuppublicationlayout[misc]{% 
	\insertauthors{}{ }{\insertthekey{}{. }{}}% 
%	\insertpubyear{(}{): }{}% 
	\inserttitle{\bgroup \it }{\/. \egroup}{}% 
	\insertseries{(}{). }{} %
	\insertpublisher{}{, }{}% 
	\insertpubyear{(}{), }{}% 
	\insertpages{}{~pages }{}% 
	\inserturl{\bgroup \tt }{\egroup}{}% ADDED 
	\insertnote{ }{.}{}% 
} 

\setupcite[interaction=start]
\stopsetups
%% end setups for Bibliography
%% we use the setups as follows:
\setups[paper:Biblio]

%\endinput

\startbuffer[bibexample]

\startpublication[
	k=Galileo:1612,
	t=article,
	a=Galilei]
	\author{Galileo}[G. ]{}{Galilei}
	\title{Discorso intorno alle cose che stanno in su l'acqua}
	\pubyear{1612}
	\pages{1--25}
	\journal{Inverse Problems}
	\issue{3}
	\volume{57}
\stoppublication


\startpublication[
	k=Galileo:1616,
	t=book,
	a=Galilei]
   \author{Galileo}[G. ]{}{Galilei}
   \title{Discorso sul flusso e il reflusso del mare}
   \pubyear{1616}
   \pubname{Rizzoli}
   \city{Firenze (Italia)}
   \pages{vii + 315}
\stoppublication

\startpublication[
	k=THoekwater,
	t=manual,
	a=Hoekwater,
	y=2006,
	s=TH2006,
	n=1,
	u=http://contextgarden.net/Bibliography
	]
	\author{Taco}[T.]{}{Hoekwater}
	\title{\CONTEXT\ Publication Module, The user documententation}
	\pubyear{2006}
	\note{In case you didn't know: this is the main manual wriiten on bib-module}
	\pages{14}
	\biburl{http://contextgarden.net/Bibliography}
\stoppublication

\stopbuffer

\getbuffer[bibexample]
\starttext

\startsection[title={Introduction}]

This is an example of an article with bibliography, using the bibliography features of \ConTeXt\ which takes care of references to publications and the typesetting of publication lists in  \CONTEXT. For more information see T.~Hoekwater~\cite[THoekwater].
If Galileo Galilei knew about this, then \cite[Galileo:1616] would have been written differently.
\nocite[Galileo:1612]

\stopsection

\startsection[title={A short list of references}]

\placepublications[criterirum=all]

\stopsection

\completepublications

\stoptext
