ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Numbering of figures after defining a new float
@ 2023-03-30 15:09 Willi Egger via ntg-context
  2023-03-30 16:01 ` Henning Hraban Ramm via ntg-context
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Willi Egger via ntg-context @ 2023-03-30 15:09 UTC (permalink / raw)
  To: mailing list for ConTeXt users; +Cc: Willi Egger

[-- Attachment #1: Type: text/plain, Size: 2128 bytes --]

Hello everybody,


I am still working on the previously mentioned project, consisting out of different parts. There are about 25 chapters in each part and most of the chapters contain figures. When using the predefined figure environment, then all figures in the figure-list are placed correctly though at each part the numbering restarts.

Now I tried to implement for each part its own float environment, which enables me to produce a figure-list per part with subtitels. How ever in the newly defined floats there is no continuous numbering i.e. chapternumber.serialnumber. Instead each float get the chapter number only.

How to get the numbering right?

Kind regards
Willi

The following example shows what happens:

\useMPlibrary[dum]

\definefloat[Afigure][Afigures][figures]
\definefloat[Bfigure][Bfigures][figures]

\setuphead
	[part]
	[placehead=yes,
	 page=yes]

\setuphead
  [chapter]
	[page=no]	 

\starttext

\starttitle[title=List of figures]
  \startsubject[title=Figures (predefined figureenvironment)]
    \placelistoffigures
  \stopsubject

  \startsubject[title=Figures A]
  	\placelistofAfigures
  \stopsubject

  \startsubject[title=Figures B]
    \placelistofBfigures
  \stopsubject
\stoptitle

\startpart[title=Part ONE]
\startchapter[title={Chapter one in part one}] %les21

\startplaceAfigure
	[location=left,
	 reference=fig:dumA,
	 title={Dummy A}]
	{\externalfigure[dummy][width=0.6\textwidth]}
\stopplaceAfigure

\startplacefigure
	[location=left,
	 reference=fig:dumB,
	 title={Dummy B}]
	{\externalfigure[dummy][width=0.6\textwidth]}
\stopplacefigure

\startsection[title=Section A]

\startplaceAfigure
	[location=left,
	 reference=fig:dumC,
	 title={Dummy C}]
	{\externalfigure[dummy][width=0.6\textwidth]}
\stopplaceAfigure

\stopsection
\stopchapter
\stoppart

\startpart[title=Part TWO]
\startchapter[title=Chapter one in part two]

\startplaceBfigure
	[location=left,
	 reference=fig:dumD,
	 title={Dummy D}]
	{\externalfigure[dummy][width=0.6\textwidth]}
\stopplaceBfigure
\stopchapter
\stoppart
\stoptext

[-- Attachment #2: test.pdf --]
[-- Type: application/pdf, Size: 16324 bytes --]

[-- Attachment #3: Type: text/plain, Size: 496 bytes --]

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : https://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Numbering of figures after defining a new float
  2023-03-30 15:09 Numbering of figures after defining a new float Willi Egger via ntg-context
@ 2023-03-30 16:01 ` Henning Hraban Ramm via ntg-context
  2023-03-30 16:58   ` Willi Egger via ntg-context
  2023-03-30 17:05 ` Wolfgang Schuster via ntg-context
  2023-03-30 22:08 ` Alan Braslau via ntg-context
  2 siblings, 1 reply; 6+ messages in thread
From: Henning Hraban Ramm via ntg-context @ 2023-03-30 16:01 UTC (permalink / raw)
  To: Willi Egger via ntg-context; +Cc: Henning Hraban Ramm

Am 30.03.23 um 17:09 schrieb Willi Egger via ntg-context:
> I am still working on the previously mentioned project, consisting out of different parts. There are about 25 chapters in each part and most of the chapters contain figures. When using the predefined figure environment, then all figures in the figure-list are placed correctly though at each part the numbering restarts.
> 
> Now I tried to implement for each part its own float environment, which enables me to produce a figure-list per part with subtitels. How ever in the newly defined floats there is no continuous numbering i.e. chapternumber.serialnumber. Instead each float get the chapter number only.
> 
> How to get the numbering right?

You can define the resetting of numbering with 
\setupcaption[Afigure][way=bytext|bypart|bychapter].

For the list, \placelist[Afigure][criterium=chapter] (or local?) should 
work.

HTH,
Hraban
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : https://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Numbering of figures after defining a new float
  2023-03-30 16:01 ` Henning Hraban Ramm via ntg-context
@ 2023-03-30 16:58   ` Willi Egger via ntg-context
  0 siblings, 0 replies; 6+ messages in thread
From: Willi Egger via ntg-context @ 2023-03-30 16:58 UTC (permalink / raw)
  To: mailing list for ConTeXt users; +Cc: Willi Egger

Hi Hraban,

thanks for your answer, however this is not precisely what I am talking about. 

If you have 3 figures in chapter  1, you want  them to be numbered as 1.1 , 1.2 , 1.3. However with floats defined with \definefloat[Afigure][Afigures][figure] they all get solely the chapter number: 1.

Kind regards
Willi 

> On 30 Mar 2023, at 18:01, Henning Hraban Ramm via ntg-context <ntg-context@ntg.nl> wrote:
> 
> Am 30.03.23 um 17:09 schrieb Willi Egger via ntg-context:
>> I am still working on the previously mentioned project, consisting out of different parts. There are about 25 chapters in each part and most of the chapters contain figures. When using the predefined figure environment, then all figures in the figure-list are placed correctly though at each part the numbering restarts.
>> Now I tried to implement for each part its own float environment, which enables me to produce a figure-list per part with subtitels. How ever in the newly defined floats there is no continuous numbering i.e. chapternumber.serialnumber. Instead each float get the chapter number only.
>> How to get the numbering right?
> 
> You can define the resetting of numbering with \setupcaption[Afigure][way=bytext|bypart|bychapter].
> 
> For the list, \placelist[Afigure][criterium=chapter] (or local?) should work.
> 
> HTH,
> Hraban
> ___________________________________________________________________________________
> If your question is of interest to others as well, please add an entry to the Wiki!
> 
> maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context
> webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
> archive  : https://bitbucket.org/phg/context-mirror/commits/
> wiki     : https://contextgarden.net
> ___________________________________________________________________________________

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : https://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Numbering of figures after defining a new float
  2023-03-30 15:09 Numbering of figures after defining a new float Willi Egger via ntg-context
  2023-03-30 16:01 ` Henning Hraban Ramm via ntg-context
@ 2023-03-30 17:05 ` Wolfgang Schuster via ntg-context
  2023-03-30 22:08 ` Alan Braslau via ntg-context
  2 siblings, 0 replies; 6+ messages in thread
From: Wolfgang Schuster via ntg-context @ 2023-03-30 17:05 UTC (permalink / raw)
  To: mailing list for ConTeXt users, Willi Egger via ntg-context
  Cc: Wolfgang Schuster, Willi Egger

Willi Egger via ntg-context schrieb am 30.03.2023 um 17:09:
> Hello everybody,
>
>
> I am still working on the previously mentioned project, consisting out of different parts. There are about 25 chapters in each part and most of the chapters contain figures. When using the predefined figure environment, then all figures in the figure-list are placed correctly though at each part the numbering restarts.
>
> Now I tried to implement for each part its own float environment, which enables me to produce a figure-list per part with subtitels. How ever in the newly defined floats there is no continuous numbering i.e. chapternumber.serialnumber. Instead each float get the chapter number only.
>
> How to get the numbering right?
>
> Kind regards
> Willi
>
> The following example shows what happens:
>
> \useMPlibrary[dum]
>
> \definefloat[Afigure][Afigures][figures]
> \definefloat[Bfigure][Bfigures][figures]

The name of the existing float instance is figure (without s).

\definefloat[Afigure][Afigures][figure]
\definefloat[Bfigure][Bfigures][figure]

Wolfgang

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : https://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Numbering of figures after defining a new float
  2023-03-30 15:09 Numbering of figures after defining a new float Willi Egger via ntg-context
  2023-03-30 16:01 ` Henning Hraban Ramm via ntg-context
  2023-03-30 17:05 ` Wolfgang Schuster via ntg-context
@ 2023-03-30 22:08 ` Alan Braslau via ntg-context
  2023-03-31  7:41   ` Willi Egger via ntg-context
  2 siblings, 1 reply; 6+ messages in thread
From: Alan Braslau via ntg-context @ 2023-03-30 22:08 UTC (permalink / raw)
  To: Willi Egger via ntg-context; +Cc: Alan Braslau, Willi Egger

Have you tried:

\setuplist [figure] [partnumber=no]

...

\placelistoffigures [criterium=part]



Alan


On Thu, 30 Mar 2023 17:09:15 +0200
Willi Egger via ntg-context <ntg-context@ntg.nl> wrote:

> Hello everybody,
> 
> 
> I am still working on the previously mentioned project, consisting
> out of different parts. There are about 25 chapters in each part and
> most of the chapters contain figures. When using the predefined
> figure environment, then all figures in the figure-list are placed
> correctly though at each part the numbering restarts.
> 
> Now I tried to implement for each part its own float environment,
> which enables me to produce a figure-list per part with subtitels.
> How ever in the newly defined floats there is no continuous numbering
> i.e. chapternumber.serialnumber. Instead each float get the chapter
> number only.
> 
> How to get the numbering right?
> 
> Kind regards
> Willi
> 
> The following example shows what happens:
> 
> \useMPlibrary[dum]
> 
> \definefloat[Afigure][Afigures][figures]
> \definefloat[Bfigure][Bfigures][figures]
> 
> \setuphead
> 	[part]
> 	[placehead=yes,
> 	 page=yes]
> 
> \setuphead
>   [chapter]
> 	[page=no]	 
> 
> \starttext
> 
> \starttitle[title=List of figures]
>   \startsubject[title=Figures (predefined figureenvironment)]
>     \placelistoffigures
>   \stopsubject
> 
>   \startsubject[title=Figures A]
>   	\placelistofAfigures
>   \stopsubject
> 
>   \startsubject[title=Figures B]
>     \placelistofBfigures
>   \stopsubject
> \stoptitle
> 
> \startpart[title=Part ONE]
> \startchapter[title={Chapter one in part one}] %les21
> 
> \startplaceAfigure
> 	[location=left,
> 	 reference=fig:dumA,
> 	 title={Dummy A}]
> 	{\externalfigure[dummy][width=0.6\textwidth]}
> \stopplaceAfigure
> 
> \startplacefigure
> 	[location=left,
> 	 reference=fig:dumB,
> 	 title={Dummy B}]
> 	{\externalfigure[dummy][width=0.6\textwidth]}
> \stopplacefigure
> 
> \startsection[title=Section A]
> 
> \startplaceAfigure
> 	[location=left,
> 	 reference=fig:dumC,
> 	 title={Dummy C}]
> 	{\externalfigure[dummy][width=0.6\textwidth]}
> \stopplaceAfigure
> 
> \stopsection
> \stopchapter
> \stoppart
> 
> \startpart[title=Part TWO]
> \startchapter[title=Chapter one in part two]
> 
> \startplaceBfigure
> 	[location=left,
> 	 reference=fig:dumD,
> 	 title={Dummy D}]
> 	{\externalfigure[dummy][width=0.6\textwidth]}
> \stopplaceBfigure
> \stopchapter
> \stoppart
> \stoptext

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : https://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Numbering of figures after defining a new float
  2023-03-30 22:08 ` Alan Braslau via ntg-context
@ 2023-03-31  7:41   ` Willi Egger via ntg-context
  0 siblings, 0 replies; 6+ messages in thread
From: Willi Egger via ntg-context @ 2023-03-31  7:41 UTC (permalink / raw)
  To: mailing list for ConTeXt users; +Cc: Willi Egger

Thank you Alan, I tried many different things but as Wolfgang pointed out I had a mistake in the float definition!

Kind regards

WIlli

> On 31 Mar 2023, at 00:08, Alan Braslau via ntg-context <ntg-context@ntg.nl> wrote:
> 
> Have you tried:
> 
> \setuplist [figure] [partnumber=no]
> 
> ...
> 
> \placelistoffigures [criterium=part]
> 
> 
> 
> Alan
> 
> 
> On Thu, 30 Mar 2023 17:09:15 +0200
> Willi Egger via ntg-context <ntg-context@ntg.nl> wrote:
> 
>> Hello everybody,
>> 
>> 
>> I am still working on the previously mentioned project, consisting
>> out of different parts. There are about 25 chapters in each part and
>> most of the chapters contain figures. When using the predefined
>> figure environment, then all figures in the figure-list are placed
>> correctly though at each part the numbering restarts.
>> 
>> Now I tried to implement for each part its own float environment,
>> which enables me to produce a figure-list per part with subtitels.
>> How ever in the newly defined floats there is no continuous numbering
>> i.e. chapternumber.serialnumber. Instead each float get the chapter
>> number only.
>> 
>> How to get the numbering right?
>> 
>> Kind regards
>> Willi
>> 
>> The following example shows what happens:
>> 
>> \useMPlibrary[dum]
>> 
>> \definefloat[Afigure][Afigures][figures]
>> \definefloat[Bfigure][Bfigures][figures]
>> 
>> \setuphead
>> 	[part]
>> 	[placehead=yes,
>> 	 page=yes]
>> 
>> \setuphead
>>  [chapter]
>> 	[page=no]	 
>> 
>> \starttext
>> 
>> \starttitle[title=List of figures]
>>  \startsubject[title=Figures (predefined figureenvironment)]
>>    \placelistoffigures
>>  \stopsubject
>> 
>>  \startsubject[title=Figures A]
>>  	\placelistofAfigures
>>  \stopsubject
>> 
>>  \startsubject[title=Figures B]
>>    \placelistofBfigures
>>  \stopsubject
>> \stoptitle
>> 
>> \startpart[title=Part ONE]
>> \startchapter[title={Chapter one in part one}] %les21
>> 
>> \startplaceAfigure
>> 	[location=left,
>> 	 reference=fig:dumA,
>> 	 title={Dummy A}]
>> 	{\externalfigure[dummy][width=0.6\textwidth]}
>> \stopplaceAfigure
>> 
>> \startplacefigure
>> 	[location=left,
>> 	 reference=fig:dumB,
>> 	 title={Dummy B}]
>> 	{\externalfigure[dummy][width=0.6\textwidth]}
>> \stopplacefigure
>> 
>> \startsection[title=Section A]
>> 
>> \startplaceAfigure
>> 	[location=left,
>> 	 reference=fig:dumC,
>> 	 title={Dummy C}]
>> 	{\externalfigure[dummy][width=0.6\textwidth]}
>> \stopplaceAfigure
>> 
>> \stopsection
>> \stopchapter
>> \stoppart
>> 
>> \startpart[title=Part TWO]
>> \startchapter[title=Chapter one in part two]
>> 
>> \startplaceBfigure
>> 	[location=left,
>> 	 reference=fig:dumD,
>> 	 title={Dummy D}]
>> 	{\externalfigure[dummy][width=0.6\textwidth]}
>> \stopplaceBfigure
>> \stopchapter
>> \stoppart
>> \stoptext
> 
> ___________________________________________________________________________________
> If your question is of interest to others as well, please add an entry to the Wiki!
> 
> maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context
> webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
> archive  : https://bitbucket.org/phg/context-mirror/commits/
> wiki     : https://contextgarden.net
> ___________________________________________________________________________________

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : https://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2023-03-31  7:41 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-03-30 15:09 Numbering of figures after defining a new float Willi Egger via ntg-context
2023-03-30 16:01 ` Henning Hraban Ramm via ntg-context
2023-03-30 16:58   ` Willi Egger via ntg-context
2023-03-30 17:05 ` Wolfgang Schuster via ntg-context
2023-03-30 22:08 ` Alan Braslau via ntg-context
2023-03-31  7:41   ` Willi Egger via ntg-context

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).