0

I have problem about define numbered like theorem, definition, corrollary etc at ConTeXt ? You can see like this my screenshot and my code (sorry, i copy and paste from other document) : theorem

and my code :

% language=uk

% author  : Hans Hagen, PRAGMA ADE, NL
% license : Creative Commons, Attribution-NonCommercial-ShareAlike 3.0 Unported

\usemodule[art-01,abr-02]
\defineenumeration[definisi]
[text=Definisi,style=italic]
 \defineenumeration[teorema]
[text=Teorema,style=italic,
 after=\blank]
\definecolor[maincolor] [r=.4]
\definecolor[extracolor][b=.4]
\definereferenceformat[eqref][left=(,right=)]
\setupbodyfont
  [10pt]

\usesymbols
  [cc]

\setuptyping
  [color=extracolor]

\setuptype
  [color=extracolor]
\setuplabeltext[chapter=BAB~~]
\setuphead[chapter][header=empty,
    alternative=middle,
numbercommand=\groupedcommand{}{\blank[0.5cm]},
    after={\blank[0.5cm]},color=maincolor]
\setuphead
  [section]
  [color=maincolor]

\setupinteraction
  [hidden]

\startdocument
  [metadata:author=Hirwanto,
   metadata:title=Vector In ConTeXt,
   author=Hirwanto,
   affiliation=Universitas Gadjah Mada,
   location=Yogyakarta,
   title=Vector In ConTeXt,
   extra-1=VECTOR,
   extra-2=IN CONTEXT,
   extra-3=HIRWANTO,
   support=www.l-hirwanto.blogspot.com,
   website=www.ugm.ac.id]

\startMPpage

    StartPage;

    numeric n, m ; n := 3 * 4 ; m := 4 * 4 ;
    numeric w, h ; w := PaperWidth/n ; h := PaperHeight/m ;
    numeric max ; max := 20 ;

    for i=1 upto n :
        for j=1 upto m :
            fill
                unitsquare
                xysized (w,h)
                shifted ((i-1)*w,(j-1)*h)
                withcolor (.5[darkblue,white] randomized(.75,.75,.75))
            ;
        endfor ;
    endfor ;

    path p ; p := Page enlarged -5mm ;

    pair a[] ; % <

    a[1] := .80[lrcorner p,urcorner p] ;
    a[2] := .50[llcorner p,ulcorner p] ;
    a[3] := .20[lrcorner p,urcorner p] ;

    pair b[] ; %     
    b[1] := ulcorner p ;
    b[2] := center   p ;
    b[3] := lrcorner p ;

    path c[] ; % from < (xml) to \ (tex)

    c[1] := a[1] .. b[1] ;
    c[2] := a[2] .. b[2] ;
    c[3] := a[3] .. b[3] ;

    linecap := butt ;

    numeric fraction ;

    for i=1 step 1 until max :
        fraction := i/max ;
        draw
            ((point fraction along c[1]) -- (point fraction along c[2]) -- (point fraction along c[3]))
            withpen pencircle scaled 5mm
            withcolor .75[(max+1-i)*red/n,i*blue/max]
            withtransparency (1,.5)
            ;
    endfor ;

    draw
        textext.rt("\ssbf{\documentvariable{extra-1}}")
        xsized (7w)
        shifted (.8w,3h)
        withcolor white
    ;

    draw
        textext.rt("\ssbf{\documentvariable{extra-2}}")
        xsized (8w)
        shifted (w,h)
        withcolor white
    ;

    draw
        textext.ulft("\ssbf{\documentvariable{extra-3}}")
        rotated 90
        ysized (5.9h)
        shifted (PaperWidth-1.2w,PaperHeight/2+2.95h)
        withcolor white
    ;

    StopPage;

\stopMPpage

\startsubject[title={Contents}]

\placelist[chapter,section,subsection][alternative=c, criterium=all,interaction=all,color=maincolor]
\stopsubject
\chapter{Plase}
\section{FR}
Pada bab ini dibahas tentang konsep yang mendasari pembahasan di bab-bab berikutnya. Konsep dasar yang dibahas pada bab ini antara lain: sistem bilangan real, integral Riemann,
\subsection{LEon}
\chapter{LAet}
\startdefinisi
Saya belum berhasil
\stopdefinisi
\startsubdefinisi
Saya
\stopsubdefinisi
\startdefinisi
Sistem bilangan real merupakan salah satu sistem aljabar yang sering digunakan dalam teori integral. Oleh karena itu, sifat dai sistem bilangan real yang akan bermanfaat pada pembahasan selanjutnya. Untuk penotasian, yang dimaksud ${\mathbb R}$ tidak lain adalah himpunan bilangan real.
Pada subbab ini pembahasan mencakup beberapa sifat bilangan $\varepsilon$, nilai mutlak, persekitaran, dan partisi pada himpunan.
\stopdefinisi
\startteorema
Diberikan sebarang $\varepsilon >0$ dan $a\in {\mathbb R}$. Jika $0\leq a<\varepsilon$ maka $a=0$.
\stopteorema
Saya masih juga belum berhasil
\section{Sistem Bilangan Real}
Sistem bilangan real merupakan salah satu sistem aljabar yang sering digunakan dalam teori integral. Oleh karena itu, sifat dai sistem bilangan real yang akan bermanfaat pada pembahasan selanjutnya. Untuk penotasian, yang dimaksud ${\mathbb R}$ tidak lain adalah himpunan bilangan real.
Pada subbab ini pembahasan mencakup beberapa sifat bilangan $\varepsilon$, nilai mutlak, persekitaran, dan partisi pada himpunan.
Didalam \CONTEXT\ juga memiliki suatu perintah dalam menggunakan notasi  atau rumus matematika menggunakan suatu vektor atau panah berarah seperti ini \type{$(\vec{\imath}, \vec{\jmath}, \vec{k})$} ($(\vec{\imath}, \vec{\jmath}, \vec{k})$).


\startsubject[title={\CONTEXT\ Person}]

\starttabulate[|B|p|]
\NC author    \NC \getvariable{document}{author}, \getvariable{document}{affiliation}, \getvariable{document}{location} \NC \NR
\NC version   \NC \currentdate \NC \NR
\NC website   \NC \getvariable{document}{website} \endash\ \getvariable{document}{support} \NC \NR
\NC copyright \NC \symbol[cc][cc-by-sa-nc] \NC \NR
\stoptabulate

\stopsubject
\pdftexbanner
\stopdocument

I want numbered theorem, definition etc like this : after

1

For the space after the header, you can use "inbetween", for the chapter number in front of the numbering of the thing itself (and I suppose you want it to reset numbering every chapter as well?) you can use a combination of "prefix=chapter" and "way=bychapter".

\defineenumeration[definisi][text=Definisi,inbetween=,prefix=chapter,way=bychapter]

\starttext
\chapter{First}
\startdefinisi
Theorem text 
\startsubdefinisi
Subtheorem text
\stopsubdefinisi
\stopdefinisi

\chapter{Second}
\startdefinisi
Theorem text
\stopdefinisi
\stoptext

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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