From: "Mojca Miklavec" <mojca.miklavec.lists@gmail.com>
Subject: Re: Numbering
Date: Fri, 7 Jul 2006 23:00:54 +0200 [thread overview]
Message-ID: <6faad9f00607071400v7097da76kf6ade7d030e74a0f@mail.gmail.com> (raw)
In-Reply-To: <2DDE0779-E922-4C59-8C55-F4798844EC58@cox.net>
On 7/7/06, David Arnold wrote:
> All,
>
> Let's say I have some enumerations that are numbered, for
> definitions, examples, theorems, etc. Let's say I want everything in
> a section numbered consecutively, except figures. So, numbering would
> proceed like this:
Grrr ... I have exactly the opposite problem: I need the
definitions/examples/problems/... to be numbered independent of each
other, but I cannot get rid of coupling between these numbers.
> Definition 1.1
>
> Where the first number is the section number.
>
> Now, by "consecutive," I mean:
>
> Definition 1.1
>
> f(x)=3x+2 (1.2)
>
> Example 1.3
>
> Definition 1.4
>
> Definition 1.5
>
> f(x)=x^2 (1.6)
>
> Figure 1
>
> Example 1.7
>
> Example 1.8
>
> Definition 1.9
>
> Figure 2
>
> etc.
>
> Hope this give the right idea.
>
> Question: What would be the "Context Way" to go about this?
I didn't know how to automatically increase the subsection number
after formulas, but the rest should be OK.
\setuphead
[subsection]
[after={\incrementnumber[formula]}]
\definehead
[definition]
[subsection]
\definehead
[example]
[subsection]
\setuplabeltext[en][definition=Definition ]
\setuplabeltext[en][example=Example ]
% or \setupfloat[figure][...]
\setupfloats
[way=bysection,
location=top,
align=right]
\setupformulas
[way=bysection]
% after={\setupheadnumber[subsection][+1]},
\starttext
\section{First section}
\definition{}
\placeformula
\startformula
f(x)=3x+2
\stopformula
\setupheadnumber[subsection][+1]
\example{}
\definition{}
\definition{}
\placeformula
\startformula
f(x)=x^2
\stopformula
\setupheadnumber[subsection][+1]
\placefigure[here]{}{abc}
\example{}
\placefigure[here]{}{def}
\example{}
\definition{}
\stoptext
Mojca
next prev parent reply other threads:[~2006-07-07 21:00 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-07-07 3:45 Numbering David Arnold
2006-07-07 8:55 ` Numbering Ulf Martin
2006-07-07 21:00 ` Mojca Miklavec [this message]
2006-07-10 18:49 ` Numbering Hans Hagen
2006-07-10 18:47 ` Numbering Hans Hagen
2006-07-10 19:10 ` Numbering David Arnold
-- strict thread matches above, loose matches on Subject: below --
2004-06-10 10:35 Numbering techw
2004-06-21 14:14 ` Numbering Hans Hagen
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=6faad9f00607071400v7097da76kf6ade7d030e74a0f@mail.gmail.com \
--to=mojca.miklavec.lists@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).