Proclaim

From Wiki
Revision as of 18:40, 30 November 2009 by 79.85.24.77 (talk)
Jump to navigation Jump to search

In Plain-TeX there is the command \proclaim which is very handy when writing mathematics and stating Theorems, Lemmas, Definitions and so on. Unfortunately it doesn't allow one to number automatically these statements in order to refer to them through cross referencing, and somehow it has disappeared from ConTeXt.

If one wishes to number in a sequential way all these « proclaims » here is a solution:


%% defining an enumeration environment replacing Plain-TeX's \proclaim
%
\defineenumeration[proclaim]
	[text=,
	style=slanted,
	title=yes,
	titleleft=,
	titleright=,
	location=serried,
	width=fit,
	right={. }]
\setupnumber[proclaim][way=bysection,numbersection=yes]
%
%% end definition \proclaim

After having defined this one can use it in the following way:


\starttext
When there is not a declared section the numbers have no prefix as in the following:

\startproclaim[def:test]{Definition}
This is a définition.
\stopproclaim

\startproclaim{Lemma}
This is a lemma.
\stopproclaim

\section{Here is a section}

When there is a declared section the numbers have as prefix the section number, as in the following:

\startproclaim{Lemme}
Here is another lemma.
\stopproclaim

\startproclaim[thm:result]{Theorem}
This is our main theorem.
\stopproclaim

\section{Here is another section}

When there is a declared section the numbers have as prefix the section number, as in the following:

\startproclaim[lem:resultB]{Lemma}
Here is an elementary lemma.
\stopproclaim

\startproclaim{Corollary}
This is a corollary.
\stopproclaim

Note that we can refer to our results in the following way: according to the definition \in[def:test] we see that theorem \in[thm:result] is
 an easy consequence  of  lemma \in[lem:resultB].

\stoptext