From: Mehdi Omidali <mehdioa@gmail.com>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Re: Numbered enumerations in MK-IV (howto) ?
Date: Tue, 16 Mar 2010 18:01:03 +0330 [thread overview]
Message-ID: <4B9F9627.7070506@gmail.com> (raw)
In-Reply-To: <2c7b6d221003160622p5113bd77x83d79ef0078b3e19@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 1794 bytes --]
On 3/16/2010 4:52 PM, gummybears wrote:
> Hi,
>
> In MK-II the following enumeration worked, sadly in MK-IV they don't.
> I browsed the internet,
> tried the proclaim "solution" and searched the mailing list for an
> solution, found
> that several people experiencing the same problem with different
> numbering schemes.
> Tried several of the proposed solution but no success.
>
> I hope someone can help to fix this.
>
> Test file
>
> \defineenumeration[artikel][location=left,text=Artikel,headstyle=bold,stopper=.,distance=5pt,width=broad,before=\blank,after=\blank]
> \setupenumerations[subartikel][text=,location=left,stopper=.,width=broad,distance=5pt,before=,after=]
> \setupenumerations[subsubartikel][text=,location=left,stopper=.,width=broad,distance=5pt,before=,after=]
> \starttext
> %\startcolumns[n=2]
> \startartikel Number should be 1. \stopartikel
> \startsubartikel Number should be 1.1. \stopsubartikel
> \startsubartikel Number should be 1.2. \stopsubartikel
> \startsubsubartikel Number should be 1.2.1. \stopsubsubartikel
> \startsubsubartikel Number should be 1.2.2. \stopsubsubartikel
>
> \startartikel Number should be 2. \stopartikel
> \startsubartikel Number should be 2.1. \stopsubartikel
> \startsubartikel Number should be 2.2. \stopsubartikel
> \startsubsubartikel Number should be 2.2.1. \stopsubsubartikel
> \startsubsubartikel Number should be 2.2.2. \stopsubsubartikel
>
> \startartikel Number should be 3. \stopartikel
> \startsubartikel Number should be 3.1. \stopsubartikel
> \startsubartikel Number should be 3.2. \stopsubartikel
> \startsubsubartikel Number should be 3.2.1. \stopsubsubartikel
> \startsubsubartikel Number should be 3.2.2. \stopsubsubartikel
> %\stopcolumns
> \stoptext
>
I use the attached file in MKIV and it works for me.
Mehdi
[-- Attachment #2: test.tex --]
[-- Type: text/plain, Size: 2728 bytes --]
%% Defining \proclaim style Remark, Lemmas, Theorem, Corollary, etc
\defineenumeration[remark]
[text=Remark,
location=serried,
width=fit,
headstyle=bold,
headcolor=darkgreen,
prefix=yes,
prefixsegments=chapter:section,
right={.~}]
\setupnumber[remark][way=bysection]
\defineenumeration[lemma]
[text=Lemma,
location=serried,
width=fit,
counter=remark, % only use counter of remark
prefix=yes,
prefixsegments=chapter:section,
style=slanted,
headstyle=bold,
headcolor=red,
right={.~}]
\defineenumeration[theorem]
[text=Theorem,
location=serried,
width=fit,
counter=remark,
style=slanted,
headstyle=bold,
headcolor=darkred,
prefix=yes,
prefixsegments=chapter:section,
right={.~}]
\defineenumeration[definition]
[text=Definition,
location=serried,
width=fit,
counter=remark,
style=normal,
headstyle=bold,
headcolor=darkblue,
prefix=yes,
prefixsegments=chapter:section,
right={.~}]
\defineenumeration[corollary]
[text=Corollary,
location=serried,
width=fit,
counter=remark,
style=italic,
headstyle=bold,
headcolor=red,
prefix=yes,
prefixsegments=chapter:section,
right={.~}]
\definecolor [blue:7] [r=0.40, g=0.40, b=1.00]
\definecolor [blue:8] [r=0.30, g=0.30, b=1.00]
\defineenumeration[example]
[text=Example,
location=serried,
width=fit,
counter=remark,
style=normal,
headstyle=bold,
headcolor=blue:7,
prefix=yes,
prefixsegments=chapter:section,
right={.~}]
\defineenumeration[exercise]
[text=Exercise,
location=serried,
width=fit,
counter=remark,
style=normal,
headstyle=bold,
headcolor=green,
prefix=yes,
prefixsegments=chapter:section,
right={.~}]
\defineenumeration[proposition]
[text=Proposition,
location=serried,
width=fit,
counter=remark,
style=slanted,
headstyle=bold,
headcolor=orange,
prefix=yes,
prefixsegments=chapter:section,
right={.~}]
\defineenumeration[fact]
[text=Fact,
location=serried,
width=fit,
counter=remark,
style=normal,
headstyle=bold,
headcolor=green:7,
prefix=yes,
prefixsegments=chapter:section,
right={.~}]
\definedescription
[proof]
[
location=serried,
width=broad,
text=Proof.,
headcolor=black,
headstyle=cap,
titlestyle=italic,
distance=1ex,
style=normal,
titleleft=,
titleright=,
stopper=.,
closesymbol=\math{\square},
]
\definedescription
[solution]
[
location=serried,
width=broad,
text=Solution.,
headcolor=black,
headstyle=cap,
titlestyle=italic,
distance=1ex,
style=normal,
titleleft=,
titleright=,
stopper=.,
closesymbol=\math{\square},
]
\starttext
\chapter{One}
\section{One-One}
\starttheorem
This is a theorem.
\stoptheorem
\stoptext
[-- Attachment #3: Type: text/plain, Size: 486 bytes --]
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage : http://www.pragma-ade.nl / http://tex.aanhet.net
archive : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___________________________________________________________________________________
next prev parent reply other threads:[~2010-03-16 14:31 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-03-16 13:22 gummybears
2010-03-16 13:56 ` Bernhard Rosensteiner
2010-03-16 14:31 ` Mehdi Omidali [this message]
2010-03-16 15:17 gummybears
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4B9F9627.7070506@gmail.com \
--to=mehdioa@gmail.com \
--cc=ntg-context@ntg.nl \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).