* Figure numbering with parts
@ 2014-05-17 9:21 Pol Stra
2014-05-17 9:25 ` Wolfgang Schuster
0 siblings, 1 reply; 5+ messages in thread
From: Pol Stra @ 2014-05-17 9:21 UTC (permalink / raw)
To: ntg-context
Hello,
I want to number my figures like this:
partnumber.sectionnumber.figurenumber
I didn't find documentation on \setupnumber.
I tried:
\setupnumber[figure][way=bypart, numberpart=yes]
\setupnumber[figure][way=bypart, numberpart=yes, prefixsegments=part]
But when changing part, the numbering starts again at 1.
Thanks
___________________________________________________________________________________
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
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Figure numbering with parts
2014-05-17 9:21 Figure numbering with parts Pol Stra
@ 2014-05-17 9:25 ` Wolfgang Schuster
2014-05-17 10:28 ` Pol Stra
0 siblings, 1 reply; 5+ messages in thread
From: Wolfgang Schuster @ 2014-05-17 9:25 UTC (permalink / raw)
To: mailing list for ConTeXt users
Am 17.05.2014 um 11:21 schrieb Pol Stra <ryzz@hotmail.fr>:
> Hello,
>
> I want to number my figures like this:
> partnumber.sectionnumber.figurenumber
>
> I didn't find documentation on \setupnumber.
>
> I tried:
>
> \setupnumber[figure][way=bypart, numberpart=yes]
> \setupnumber[figure][way=bypart, numberpart=yes, prefixsegments=part]
>
> But when changing part, the numbering starts again at 1.
The counter setup for floats are controlled with the \setupcaption command.
When you set “way=bypart” you tell context to reset the counter with each new \part heading.
Wolfgang
___________________________________________________________________________________
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
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Figure numbering with parts
2014-05-17 9:25 ` Wolfgang Schuster
@ 2014-05-17 10:28 ` Pol Stra
2014-05-17 10:40 ` Wolfgang Schuster
0 siblings, 1 reply; 5+ messages in thread
From: Pol Stra @ 2014-05-17 10:28 UTC (permalink / raw)
To: ntg-context
Le samedi 17 mai 2014, 11:25:04 Wolfgang Schuster a écrit :
> Am 17.05.2014 um 11:21 schrieb Pol Stra <ryzz@hotmail.fr>:
> > Hello,
> >
> > I want to number my figures like this:
> > partnumber.sectionnumber.figurenumber
> >
> > I didn't find documentation on \setupnumber.
> >
> > I tried:
> >
> > \setupnumber[figure][way=bypart, numberpart=yes]
> > \setupnumber[figure][way=bypart, numberpart=yes, prefixsegments=part]
> >
> > But when changing part, the numbering starts again at 1.
>
> The counter setup for floats are controlled with the \setupcaption command.
>
> When you set “way=bypart” you tell context to reset the counter with each
> new \part heading.
>
> Wolfgang
Ok, I see: "way=bypart" is related to "figurenumber". But what about the
"numeberpart" attribute?
Let's say I have two parts with two sections in each. Currently, with
"\setupnumber[figure][way=bypart, numberpart=yes]" I have:
Part 1
Section 1
figure 1.1
figure 1.2
Section 2
figure 2.3
figure 2.4
Part 2
Section 1
figure 1.1 % here we start again at 1 instead of 2
figure 1.2 % the 2 is OK, but not the 1
Section 2
figure 2.3
figure 2.4
While I want:
Part 1
Section 1
figure 1.1.1
figure 1.1.2
Section 2
figure 1.2.3
figure 1.2.4
Part 2
Section 1
figure 2.1.1
figure 2.1.2
Section 2
figure 2.2.3
figure 2.2.4
I think you missed an example in my previous message. ;-)
___________________________________________________________________________________
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
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Figure numbering with parts
2014-05-17 10:28 ` Pol Stra
@ 2014-05-17 10:40 ` Wolfgang Schuster
2014-05-17 13:34 ` Pol Stra
0 siblings, 1 reply; 5+ messages in thread
From: Wolfgang Schuster @ 2014-05-17 10:40 UTC (permalink / raw)
To: Pol Stra; +Cc: ntg-context
Am 17.05.2014 um 12:28 schrieb Pol Stra <ryzz@hotmail.fr>:
> Le samedi 17 mai 2014, 11:25:04 Wolfgang Schuster a écrit :
>> Am 17.05.2014 um 11:21 schrieb Pol Stra <ryzz@hotmail.fr>:
>>> Hello,
>>>
>>> I want to number my figures like this:
>>> partnumber.sectionnumber.figurenumber
>>>
>>> I didn't find documentation on \setupnumber.
>>>
>>> I tried:
>>>
>>> \setupnumber[figure][way=bypart, numberpart=yes]
>>> \setupnumber[figure][way=bypart, numberpart=yes, prefixsegments=part]
>>>
>>> But when changing part, the numbering starts again at 1.
>>
>> The counter setup for floats are controlled with the \setupcaption command.
>>
>> When you set “way=bypart” you tell context to reset the counter with each
>> new \part heading.
>>
>> Wolfgang
>
> Ok, I see: "way=bypart" is related to "figurenumber". But what about the
> "numeberpart" attribute?
>
> Let's say I have two parts with two sections in each. Currently, with
> "\setupnumber[figure][way=bypart, numberpart=yes]" I have:
>
> Part 1
> Section 1
> figure 1.1
> figure 1.2
> Section 2
> figure 2.3
> figure 2.4
> Part 2
> Section 1
> figure 1.1 % here we start again at 1 instead of 2
> figure 1.2 % the 2 is OK, but not the 1
> Section 2
> figure 2.3
> figure 2.4
>
> While I want:
>
> Part 1
> Section 1
> figure 1.1.1
> figure 1.1.2
> Section 2
> figure 1.2.3
> figure 1.2.4
> Part 2
> Section 1
> figure 2.1.1
> figure 2.1.2
> Section 2
> figure 2.2.3
> figure 2.2.4
>
> I think you missed an example in my previous message. ;-)
I still miss some example code.
You want to do is not possible with this structure because you go from parts to section
without a chapter between them which leaves a gap in the prefix numbers.
To fix this you have to change your sections to chapters or replace your parts with chapters.
\useMPlibrary[dum]
\setupcaption
[figure]
[way=bypart,
prefixsegments=part:chapter]
\starttext
\dorecurse{2}
{\part{Part #1}
\dorecurse{2}
{\chapter{Chapter ##1}
\dorecurse{2}
{\placefigure[force]{Dummy Figure ####1}{\externalfigure[dummy]}}}}
\stoptext
Wolfgang
___________________________________________________________________________________
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
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Figure numbering with parts
2014-05-17 10:40 ` Wolfgang Schuster
@ 2014-05-17 13:34 ` Pol Stra
0 siblings, 0 replies; 5+ messages in thread
From: Pol Stra @ 2014-05-17 13:34 UTC (permalink / raw)
To: ntg-context
Le samedi 17 mai 2014, 12:40:35 Wolfgang Schuster a écrit :
> Am 17.05.2014 um 12:28 schrieb Pol Stra <ryzz@hotmail.fr>:
> > Le samedi 17 mai 2014, 11:25:04 Wolfgang Schuster a écrit :
> >> Am 17.05.2014 um 11:21 schrieb Pol Stra <ryzz@hotmail.fr>:
> >>> Hello,
> >>>
> >>> I want to number my figures like this:
> >>> partnumber.sectionnumber.figurenumber
> >>>
> >>> I didn't find documentation on \setupnumber.
> >>>
> >>> I tried:
> >>>
> >>> \setupnumber[figure][way=bypart, numberpart=yes]
> >>> \setupnumber[figure][way=bypart, numberpart=yes, prefixsegments=part]
> >>>
> >>> But when changing part, the numbering starts again at 1.
> >>
> >> The counter setup for floats are controlled with the \setupcaption
> >> command.
> >>
> >> When you set “way=bypart” you tell context to reset the counter with each
> >> new \part heading.
> >>
> >> Wolfgang
> >
> > Ok, I see: "way=bypart" is related to "figurenumber". But what about the
> > "numeberpart" attribute?
> >
> > Let's say I have two parts with two sections in each. Currently, with
> > "\setupnumber[figure][way=bypart, numberpart=yes]" I have:
> >
> > Part 1
> >
> > Section 1
> >
> > figure 1.1
> > figure 1.2
> >
> > Section 2
> >
> > figure 2.3
> > figure 2.4
> >
> > Part 2
> >
> > Section 1
> >
> > figure 1.1 % here we start again at 1 instead of 2
> > figure 1.2 % the 2 is OK, but not the 1
> >
> > Section 2
> >
> > figure 2.3
> > figure 2.4
> >
> > While I want:
> >
> > Part 1
> >
> > Section 1
> >
> > figure 1.1.1
> > figure 1.1.2
> >
> > Section 2
> >
> > figure 1.2.3
> > figure 1.2.4
> >
> > Part 2
> >
> > Section 1
> >
> > figure 2.1.1
> > figure 2.1.2
> >
> > Section 2
> >
> > figure 2.2.3
> > figure 2.2.4
> >
> > I think you missed an example in my previous message. ;-)
>
> I still miss some example code.
>
> You want to do is not possible with this structure because you go from parts
> to section without a chapter between them which leaves a gap in the prefix
> numbers.
>
> To fix this you have to change your sections to chapters or replace your
> parts with chapters.
>
> \useMPlibrary[dum]
>
> \setupcaption
> [figure]
> [way=bypart,
> prefixsegments=part:chapter]
>
> \starttext
>
> \dorecurse{2}
> {\part{Part #1}
> \dorecurse{2}
> {\chapter{Chapter ##1}
> \dorecurse{2}
> {\placefigure[force]{Dummy Figure ####1}{\externalfigure[dummy]}}}}
>
> \stoptext
>
> Wolfgang
Oops! Sorry, I over simplified my use case: there *are* chapters in my
documents.
Ok, with the sample of code you provided it works like I want. I shouldn't
have used `setupnumber` but `setupcaption`.
Thank you Wolfgang
___________________________________________________________________________________
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
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2014-05-17 13:34 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-05-17 9:21 Figure numbering with parts Pol Stra
2014-05-17 9:25 ` Wolfgang Schuster
2014-05-17 10:28 ` Pol Stra
2014-05-17 10:40 ` Wolfgang Schuster
2014-05-17 13:34 ` Pol Stra
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).