* Numbering
@ 2004-06-10 10:35 techw
2004-06-21 14:14 ` Numbering Hans Hagen
0 siblings, 1 reply; 8+ messages in thread
From: techw @ 2004-06-10 10:35 UTC (permalink / raw)
Hi All!
I need to supress the numbering in floating figures. I have used:
\definefloat[figure][figures]
\setupfloat[figure][location=middle]
\setupcaption
[figure]
[location=bottom,
style=\bfx,
number=no]
But this doesn't work. What do I need to change?
Thanks and regards,
-priya.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Numbering
2004-06-10 10:35 Numbering techw
@ 2004-06-21 14:14 ` Hans Hagen
0 siblings, 0 replies; 8+ messages in thread
From: Hans Hagen @ 2004-06-21 14:14 UTC (permalink / raw)
techw@siritech.com wrote:
>Hi All!
>I need to supress the numbering in floating figures. I have used:
>
>\definefloat[figure][figures]
>\setupfloat[figure][location=middle]
>\setupcaption
>[figure]
>[location=bottom,
>style=\bfx,
>number=no]
>
>But this doesn't work. What do I need to change?
>Thanks and regards,
>
>
hm, here it works: no "figure n"
Hans
-----------------------------------------------------------------
Hans Hagen | PRAGMA ADE
Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
| www.pragma-pod.nl
-----------------------------------------------------------------
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Numbering
2006-07-10 18:47 ` Numbering Hans Hagen
@ 2006-07-10 19:10 ` David Arnold
0 siblings, 0 replies; 8+ messages in thread
From: David Arnold @ 2006-07-10 19:10 UTC (permalink / raw)
OK,
Now, how can we get
\placeformula
\startformula
f(x)=x^2
\stopformula
To use the same number scheme.
On Jul 10, 2006, at 11:47 AM, Hans Hagen wrote:
> 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:
>>
>> 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?
>>
> \defineenumeration
> [remark]
> [location=serried,
> width=broad,
> text=Remark,
> headstyle=bold,
> inbetween=\blank,
> before=\blank,
> after=\blank,
> way=bysection]
>
> \defineenumeration
> [definition]
> [remark]
> [text=Definition]
>
> \starttext
> \startremark
> Foo
> \stopremark
> \startdefinition
> Foo
> \stopdefinition
> \startremark
> Foo
> \stopremark
> \startdefinition
> Foo
> \stopdefinition
> \stoptext
>
>
> -----------------------------------------------------------------
> Hans Hagen | PRAGMA ADE
> Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
> tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
> | www.pragma-pod.nl
> -----------------------------------------------------------------
>
> _______________________________________________
> ntg-context mailing list
> ntg-context@ntg.nl
> http://www.ntg.nl/mailman/listinfo/ntg-context
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Numbering
2006-07-07 21:00 ` Numbering Mojca Miklavec
@ 2006-07-10 18:49 ` Hans Hagen
0 siblings, 0 replies; 8+ messages in thread
From: Hans Hagen @ 2006-07-10 18:49 UTC (permalink / raw)
Mojca Miklavec wrote:
> 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.
>
>
\defineenumeration
[remark]
[text=Remark]
\defineenumeration
[definition]
[text=Definition]
\setupenumerations
[remark,definition]
[location=serried,
width=broad,
headstyle=bold,
inbetween=\blank,
before=\blank,
after=\blank,
way=bysection]
\starttext
\startremark
Foo
\stopremark
\startdefinition
Foo
\stopdefinition
\startremark
Foo
\stopremark
\startdefinition
Foo
\stopdefinition
\stoptext
-----------------------------------------------------------------
Hans Hagen | PRAGMA ADE
Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
| www.pragma-pod.nl
-----------------------------------------------------------------
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Numbering
2006-07-07 3:45 Numbering David Arnold
2006-07-07 8:55 ` Numbering Ulf Martin
2006-07-07 21:00 ` Numbering Mojca Miklavec
@ 2006-07-10 18:47 ` Hans Hagen
2006-07-10 19:10 ` Numbering David Arnold
2 siblings, 1 reply; 8+ messages in thread
From: Hans Hagen @ 2006-07-10 18:47 UTC (permalink / raw)
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:
>
> 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?
>
\defineenumeration
[remark]
[location=serried,
width=broad,
text=Remark,
headstyle=bold,
inbetween=\blank,
before=\blank,
after=\blank,
way=bysection]
\defineenumeration
[definition]
[remark]
[text=Definition]
\starttext
\startremark
Foo
\stopremark
\startdefinition
Foo
\stopdefinition
\startremark
Foo
\stopremark
\startdefinition
Foo
\stopdefinition
\stoptext
-----------------------------------------------------------------
Hans Hagen | PRAGMA ADE
Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
| www.pragma-pod.nl
-----------------------------------------------------------------
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Numbering
2006-07-07 3:45 Numbering David Arnold
2006-07-07 8:55 ` Numbering Ulf Martin
@ 2006-07-07 21:00 ` Mojca Miklavec
2006-07-10 18:49 ` Numbering Hans Hagen
2006-07-10 18:47 ` Numbering Hans Hagen
2 siblings, 1 reply; 8+ messages in thread
From: Mojca Miklavec @ 2006-07-07 21:00 UTC (permalink / raw)
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
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Numbering
2006-07-07 3:45 Numbering David Arnold
@ 2006-07-07 8:55 ` Ulf Martin
2006-07-07 21:00 ` Numbering Mojca Miklavec
2006-07-10 18:47 ` Numbering Hans Hagen
2 siblings, 0 replies; 8+ messages in thread
From: Ulf Martin @ 2006-07-07 8:55 UTC (permalink / raw)
Hi
David Arnold schrieb:
> 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:
Here is a possible solution.
Idea:
- Define own counters
- Use section type with "ownnumber" option
- Wrap them suitably
Lets call "Definition"s, "Example"s etc by the name "Topic" and assume
you want to reset the topic number with each section.
Here is the code:
<contextcode>
%%%<Topic>
\newcount\SectionNum
\def\resetSection{\SectionNum=0}
\def\stepSection{\advance\SectionNum by 1 \resetTopic}
\def\theSection{\the\SectionNum}
\resetSection
\newcount\TopicNum
\def\resetTopic{\TopicNum=0}
\def\stepTopic{\advance\TopicNum by 1}
\def\theTopic{\theSection.\the\TopicNum}
\resetTopic
\definehead[TopicHead][section=section-7]
\setuphead[TopicHead]
[ownnumber=yes, % use own counter TopicNum
% more setup
]
\def\Topic{\dotripleempty\doTopic}
% Usage: \Topic[topic type][topic text][label]
\def\doTopic[#1][#2][#3]{
\stepTopic
\ifthirdargument
\TopicHead[#3]{#1~\theTopic}{ #2}%
\else \ifsecondargument
\TopicHead{#1~\theTopic}{ #2}%
\else \iffirstargument
\TopicHead{#1~\theTopic}{}%
\else
\TopicHead{\theTopic}{}%
\fi \fi \fi}
%% Example for a convenient abbreviation:
%% \Def[...][...] instead of \Topic[Definition][...][...]
\def\Def{\dodoubleempty\doDef}
% Usage: \Def[title text][label]
\def\doDef[#1][#2]{
\ifsecondargument
\Topic[Definition][#1][#2]
\else\iffirstargument
\Topic[Definition][#1]
\else
\Topic[Definition]
\fi\fi}
%% I don't know if one can access section counters directly
%% So we need a wrapper for the section level that resets the
%% topic counter.
\setuphead[section]
[ownnumber=yes,
% more setup
]
\def\Section{\dosingleempty\doSection}
% Usage: \Section[label]{title text}
\def\doSection[#1]#2{
\stepSection
\iffirstargument
\section[#1]{\theSection}{#2}
\else
\section{\theSection}{#2}
\fi}
%%%</Topic>
%%% Example
\starttext
\Section{Things Going Wrong}
\Def[(Murphy's Law)][law:murphy]
Everything that can go wrong will go wrong sometime.
\Topic[Example][(Bread of Butter)]
An example for \in[law:murphy] is that a bread of butter falling off a
table universally lands with the buttered side on the carpet.
\Section{Motion}
\Def[(Silly Walk)][def:sillywalk]
Silly walking is a kind of walking made up of motions that do not
necessarily contribute to the advancement of the walker.
\Topic[Corollary][][cor:goosestep]
Goose-step is a type of silly walking as defined in \in[def:sillywalk].
\Topic[Remark]
Prussians and Bolshewists may not agree with \in[cor:goosestep].
\stoptext
</contextcode>
(I had a similar problem: I wanted a type of sections with a numbering
only affected by specified other structural elements.)
The solution is probably not the most ConTeXt-like -- I am still on my
way from LaTeX...
Question to TeX experts: in the context of the above, how would one
properly define a command like
\ProvideTopicType[Definition]{Def}
after which
\Def[(Murphy's Law)]
produces something like
Definition 1.2 (Murphy's Law)
Cheers!
Ulf
^ permalink raw reply [flat|nested] 8+ messages in thread
* Numbering
@ 2006-07-07 3:45 David Arnold
2006-07-07 8:55 ` Numbering Ulf Martin
` (2 more replies)
0 siblings, 3 replies; 8+ messages in thread
From: David Arnold @ 2006-07-07 3:45 UTC (permalink / raw)
Cc: Jacob Prystowsky
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:
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?
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2006-07-10 19:10 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-06-10 10:35 Numbering techw
2004-06-21 14:14 ` Numbering Hans Hagen
2006-07-07 3:45 Numbering David Arnold
2006-07-07 8:55 ` Numbering Ulf Martin
2006-07-07 21:00 ` Numbering Mojca Miklavec
2006-07-10 18:49 ` Numbering Hans Hagen
2006-07-10 18:47 ` Numbering Hans Hagen
2006-07-10 19:10 ` Numbering David Arnold
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).