ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Re: figurenumbering
       [not found] <mailman.1.1159524004.8643.ntg-context@ntg.nl>
@ 2006-09-29 18:53 ` Wolfgang Werners-Lucchini
  2006-10-01 12:42   ` figurenumbering Wolfgang Schuster
  0 siblings, 1 reply; 13+ messages in thread
From: Wolfgang Werners-Lucchini @ 2006-09-29 18:53 UTC (permalink / raw)


> > What ConTeXt Version is it where 
> > \checkfloatracer is defined?
> > 
> > Gru?, Wolfgang
> 
> Hi other Wolfgang
> 
> \checkfloatracer is defined in page-flt.tex as
> 
> \def\checkfloatracer#1%
>   {\newnodelocation{#1}}

I asked this, because in ConTeXt 2006.09.26,
which I use, there isn't a command with this name.

> All the \...nodelocation macros are defined in the core-pos modul.
> 
> Have you seen the whitespace between the figures where I put the
> flotcounter.

No!
On page 3 there should be a difference between figure 1/2 and 
figure 2/3, if I understand it right. But there is nothing. 

page-flt.tex is changed at 2006.09.24
There is also a file core-pos.tex and core-pos.mkii from 2006.09.24 
both. 
 
> Wolfgang (the younger one?)
passports are not allways up-to-date! :-) 

Wolfgang

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

* Re: figurenumbering
  2006-09-29 18:53 ` figurenumbering Wolfgang Werners-Lucchini
@ 2006-10-01 12:42   ` Wolfgang Schuster
  0 siblings, 0 replies; 13+ messages in thread
From: Wolfgang Schuster @ 2006-10-01 12:42 UTC (permalink / raw)


On Fri, 29 Sep 2006 20:53:50 +0200
"Wolfgang Werners-Lucchini" <wwl@musensturm.de> wrote:

> > > What ConTeXt Version is it where 
> > > \checkfloatracer is defined?
> > > 
> > > Gru?, Wolfgang
> > 
> > Hi other Wolfgang
> > 
> > \checkfloatracer is defined in page-flt.tex as
> > 
> > \def\checkfloatracer#1%
> >   {\newnodelocation{#1}}
> 
> I asked this, because in ConTeXt 2006.09.26,
> which I use, there isn't a command with this name.
> 
> > All the \...nodelocation macros are defined in the core-pos modul.
> > 
> > Have you seen the whitespace between the figures where I put the
> > flotcounter.
> 
> No!
> On page 3 there should be a difference between figure 1/2 and 
> figure 2/3, if I understand it right. But there is nothing. 
> 
> page-flt.tex is changed at 2006.09.24
> There is also a file core-pos.tex and core-pos.mkii from 2006.09.24 
> both. 
>  

I downloaded the latest beta and tested my patch, id did no longer work
but you should go back to the roots.

\starttext

\placefigure{}{\framed{Blub}}
\placefigure{}{\framed{Bautz}}
\placefigure{}{\framed{Bla}}

This were \rawnumber[figure] figures by now!

\setnumber[figure]{8}
We want to count on with \rawnumber[figure].

\placefigure{}{\framed{Plong}}

Figurenumber is incremented to \rawnumber[figure].

\placefigure{}{\framed{Plong}}

\incrementnumber[figure]

\placefigure{}{\framed{Plong}}

\stoptext

This was your example (not exactly the same) you posted as your first
example file and works now as expected. 

It is up to you to use setnumber directly in your source or to wrap it
into another macro like my \floatcounter.

> > Wolfgang (the younger one?)
> passports are not allways up-to-date! :-) 
> 
> Wolfgang

But your date of birth will never change.

Wolfgang

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

* Re: figurenumbering
       [not found] <mailman.858.1158597384.2039.ntg-context@ntg.nl>
@ 2006-10-10 19:22 ` Wolfgang Werners-Lucchini
  0 siblings, 0 replies; 13+ messages in thread
From: Wolfgang Werners-Lucchini @ 2006-10-10 19:22 UTC (permalink / raw)


Hallo!

With ConTeXt ver. 2006.09.26, figure numbering is working as
expected.

> > >> You need the option
> > >> \setupfloats[numbering=nocheck]

is not longer needed, but

> you can see a bad sideeffects by figurenumber=nocheck in my
> example

this sideeffect is visible both, with nocheck and without this option 
(numbering=yes resp.).
 
> <example>
> \setupfloats[numbering=nocheck]
> \starttext
> \placefigure{}{\framed{Blub}}
> \placefigure[page][]{}{\framed{Bautz}}
> \placefigure{}{\framed{Bla}}
> This were \rawnumber[figure] figures by now!
> \setnumber[figure]{8}
> We want to count on with \rawnumber[figure].
> \placefigure{}{\framed{Plong}}
> figurenumber is incremented to \rawnumber[figure].
> \stoptext
> </example>
> 
> The number of the figures are set as they appear in the text and
> this did not work well when one figure is set later as another one
> typed later in your code.

Wolfgang

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

* Re: figurenumbering
  2006-10-02 19:08 ` figurenumbering Wolfgang Werners-Lucchini
@ 2006-10-05 10:35   ` Wolfgang Schuster
  0 siblings, 0 replies; 13+ messages in thread
From: Wolfgang Schuster @ 2006-10-05 10:35 UTC (permalink / raw)



[-- Attachment #1.1: Type: text/plain, Size: 2082 bytes --]

2006/10/2, Wolfgang Werners-Lucchini <wwl@musensturm.de>:
>
> > This was your example (not exactly the same) you posted as your
> > first example file and works now as expected.
>
> Ahh! I should implement my own testsuit.
>
> Wolfgang


Hi Wolfgang

you should not only make a testsuit.

It is normaly better to work with highlevel macros in your document to
easily
replace the macrodefinition than replacing the macros in your document.

I made a first step for your document.

<example>

\unprotect

% increment the floatnumber

\def\incrementfloatnumber%
 {\dodoubleempty\doincrementfloatnumber}

\def\doincrementfloatnumber[#1][#2]%
 {\ifsecondargument
    \dodoincrementfloatnumber[#1][#2]%
  \else\iffirstargument
    \dodoincrementfloatnumber[#1][1]%
  \fi\fi}

\def\dodoincrementfloatnumber[#1][#2]%
  {\count1=0
   \loop
   \ifnum\count1<#2
     \advance\count1 by 1
     \incrementnumber[#1]
   \repeat}

% set the number

\def\setfloatnumber%
 {\dodoubleempty\dosetfloatnumber}

\def\dosetfloatnumber[#1][#2]%
  {\ifnum#2<\rawnumber[#1]
     \message{:::: Your number need to be higher than the current
counter-value ::::}
   \else
     \count2=#2
     \advance\count2 by -\rawnumber[#1]
     \incrementfloatnumber[#1][\count2]
   \fi}

% Todo:
%
% \definefloatnumber[#1]
%
% example:
% \definefloatnumber[figure]
% o \incrementfigurenumber[#1] --> \incrementfloatnumber[figure][#1]
% o \setfigurenumber[#1]       --> \setfloatnumber[figure][#1]

\protect

\starttext

\placefigure{}{\framed{Blub}}
\placefigure{}{\framed{Bautz}}
\placefigure{}{\framed{Bla}}

This were \rawnumber[figure] figures by now!

\setnumber[figure]{8}
We want to count on with \rawnumber[figure].

\placefigure{}{\framed{Plong}}

Figurenumber is incremented to \rawnumber[figure].

\placefigure{}{\framed{Plong}}

\incrementnumber[figure]

\placefigure{}{\framed{Plong}}

\incrementfloatnumber[figure][2]

\placefigure{}{\framed{Plong}}

\setfloatnumber[figure][25]

\placefigure{}{\framed{Plong}}

\setfloatnumber[figure][12]

\placefigure{}{\framed{Plong}}

\stoptext

</example>



Wolfgang

[-- Attachment #1.2: Type: text/html, Size: 3078 bytes --]

[-- Attachment #2: Type: text/plain, Size: 139 bytes --]

_______________________________________________
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context

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

* Re: figurenumbering
       [not found] <mailman.167.1159780405.16231.ntg-context@ntg.nl>
@ 2006-10-02 19:08 ` Wolfgang Werners-Lucchini
  2006-10-05 10:35   ` figurenumbering Wolfgang Schuster
  0 siblings, 1 reply; 13+ messages in thread
From: Wolfgang Werners-Lucchini @ 2006-10-02 19:08 UTC (permalink / raw)


> This was your example (not exactly the same) you posted as your
> first example file and works now as expected. 

Ahh! I should implement my own testsuit.

Wolfgang

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

* Re: figurenumbering
  2006-09-28 17:30 ` figurenumbering Wolfgang Werners-Lucchini
@ 2006-09-29  9:43   ` Wolfgang Schuster
  0 siblings, 0 replies; 13+ messages in thread
From: Wolfgang Schuster @ 2006-09-29  9:43 UTC (permalink / raw)


On Thu, 28 Sep 2006 19:30:57 +0200
"Wolfgang Werners-Lucchini" <wwl@musensturm.de> wrote:

> > \def\floatcounter[#1]%
> >   {\bgroup
> >      \checkfloatracer{\v!float#1}%

could be replaced by \newnodelocation{\v!float#1}

> >      \nextnodelocation{\v!float#1}%
> >      \analyzenodelocation{\v!float#1}%
> >      \tagnodelocation{\v!float#1}%
> >    \egroup}
> 
> Hallo Wolfgang!
> 
> What ConTeXt Version is it where 
> \checkfloatracer is defined?
> 
> Gruß, Wolfgang

Hi other Wolfgang

\checkfloatracer is defined in page-flt.tex as

\def\checkfloatracer#1%
  {\newnodelocation{#1}}

All the \...nodelocation macros are defined in the core-pos modul.

Have you seen the whitespace between the figures where I put the
flotcounter.


Happy TeXing,

Wolfgang (the younger one?)

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

* Re: figurenumbering
       [not found] <mailman.1.1159437602.22722.ntg-context@ntg.nl>
@ 2006-09-28 17:30 ` Wolfgang Werners-Lucchini
  2006-09-29  9:43   ` figurenumbering Wolfgang Schuster
  0 siblings, 1 reply; 13+ messages in thread
From: Wolfgang Werners-Lucchini @ 2006-09-28 17:30 UTC (permalink / raw)


> \def\floatcounter[#1]%
>   {\bgroup
>      \checkfloatracer{\v!float#1}%
>      \nextnodelocation{\v!float#1}%
>      \analyzenodelocation{\v!float#1}%
>      \tagnodelocation{\v!float#1}%
>    \egroup}

Hallo Wolfgang!

What ConTeXt Version is it where 
\checkfloatracer is defined?

Gruß, Wolfgang

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

* Re: figurenumbering
  2006-09-18 11:42     ` figurenumbering Wolfgang Schuster
@ 2006-09-28  6:33       ` Wolfgang Schuster
  0 siblings, 0 replies; 13+ messages in thread
From: Wolfgang Schuster @ 2006-09-28  6:33 UTC (permalink / raw)



[-- Attachment #1.1: Type: text/plain, Size: 1061 bytes --]

2006/9/18, Wolfgang Schuster <schuster.wolfgang@googlemail.com>:
>
> On Sun, 17 Sep 2006 16:10:05 +0200
> Hans Hagen <pragma@wxs.nl> wrote:
>
> > > It is obviously (my example shows this), that there must
> > > be a hidden number.
> > >
> > > What is its name?
> > > How can this number be influenzed?
>
> Hi Wolfgang

if where not able to find a o solution for your problem by yourself I give
you another
piece of code.


\unprotect

\def\floatcounter[#1]%
  {\bgroup
     \checkfloatracer{\v!float#1}%
     \nextnodelocation{\v!float#1}%
     \analyzenodelocation{\v!float#1}%
     \tagnodelocation{\v!float#1}%
   \egroup}

\protect

\starttext

\chapter{Bla}

\placefigure{}{\hrule width 6cm height 3cm}

\chapter{Bla}

\placefigure{}{\hrule width 6cm height 3cm}

\floatcounter[figure]

\placefigure{}{\hrule width 6cm height 3cm}

\chapter{Bla}

\placefigure{}{\hrule width 6cm height 3cm}

\placefigure{}{\hrule width 6cm height 3cm}

\floatcounter[figure]

\placefigure{}{\hrule width 6cm height 3cm}

\stoptext

Have fun with this example.



Wolfgang

[-- Attachment #1.2: Type: text/html, Size: 1730 bytes --]

[-- Attachment #2: Type: text/plain, Size: 139 bytes --]

_______________________________________________
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context

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

* Re: figurenumbering
  2006-09-17 14:10   ` figurenumbering Hans Hagen
@ 2006-09-18 11:42     ` Wolfgang Schuster
  2006-09-28  6:33       ` figurenumbering Wolfgang Schuster
  0 siblings, 1 reply; 13+ messages in thread
From: Wolfgang Schuster @ 2006-09-18 11:42 UTC (permalink / raw)


On Sun, 17 Sep 2006 16:10:05 +0200
Hans Hagen <pragma@wxs.nl> wrote:

> Wolfgang Werners-Lucchini wrote:
> >> You need the option
> >>
> >> \setupfloats[numbering=nocheck]
> >>
> >> in your document settings.
> >>
> >>     
> >
> > Hallo Wolfgang!
> >
> > This works.
> > How do you find your peaces of wisdom?
> >

Im not a TeXnician or a Texacker, more a TeX kiddie [1] and looked only
the ConTeXt module where \placefloat is defined and searched for the
command which is responsible for the numbermechanism.

> > But I have not understand the whole figurenumber thing.
> >

Me too.

> > It is obviously (my example shows this), that there must
> > be a hidden number.
> >
> > What is its name?
> > How can this number be influenzed?

Search for \preparefloatnumber in page-flt.tex

> > What is 'checked' or 'not checked' in the above option?

Try my example with checked and nochekced.

> > And why does this produce the effect I wanted?
> >   
> it's rather comples
> 
> - float numbers indeed use a number
> 
> - but when places, this number is checked against the order in which the  floats were flushed, for which their final position on the page is used 
> 
> - clone figures using the same number most be treated as well 
> 
> - when on everloads the low level number, this mechanisme is to be bypassed 
> 
> Hans 
> 

Hallo Wolfgang,

you can see a bad sideeffects by figurenumber=nocheck in my example

<example>

\setupfloats[numbering=nocheck]

\starttext

\placefigure{}{\framed{Blub}}

\placefigure[page][]{}{\framed{Bautz}}

\placefigure{}{\framed{Bla}}

This were \rawnumber[figure] figures by now!

\setnumber[figure]{8}

We want to count on with \rawnumber[figure].

\placefigure{}{\framed{Plong}}

figurenumber is incremented to \rawnumber[figure].

\stoptext

</example>

The number of the figures are set as they appear in the text and this
did not work well when one figure is set later as another one typed
later in your code.

[1] http://en.wikipedia.org/wiki/Script_kiddie

Hope you can find a solution for your problem before I send you one
when I have time too find one.

Wolfgang

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

* Re: figurenumbering
  2006-09-17 11:59 ` figurenumbering Wolfgang Werners-Lucchini
@ 2006-09-17 14:10   ` Hans Hagen
  2006-09-18 11:42     ` figurenumbering Wolfgang Schuster
  0 siblings, 1 reply; 13+ messages in thread
From: Hans Hagen @ 2006-09-17 14:10 UTC (permalink / raw)


Wolfgang Werners-Lucchini wrote:
>> You need the option
>>
>> \setupfloats[numbering=nocheck]
>>
>> in your document settings.
>>
>>     
>
> Hallo Wolfgang!
>
> This works.
> How do you find your peaces of wisdom?
>
> But I have not understand the whole figurenumber thing.
>
> It is obviously (my example shows this), that there must
> be a hidden number.
>
> What is its name?
> How can this number be influenzed?
> What is 'checked' or 'not checked' in the above option?
> And why does this produce the effect I wanted?
>   
it's rather comples

- float numbers indeed use a number

- but when places, this number is checked against the order in which the  floats were flushed, for which their final position on the page is used 

- clone figures using the same number most be treated as well 

- when on everloads the low level number, this mechanisme is to be bypassed 

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] 13+ messages in thread

* Re: figurenumbering
       [not found] <mailman.788.1158330124.2039.ntg-context@ntg.nl>
@ 2006-09-17 11:59 ` Wolfgang Werners-Lucchini
  2006-09-17 14:10   ` figurenumbering Hans Hagen
  0 siblings, 1 reply; 13+ messages in thread
From: Wolfgang Werners-Lucchini @ 2006-09-17 11:59 UTC (permalink / raw)


> You need the option
> 
> \setupfloats[numbering=nocheck]
> 
> in your document settings.
> 

Hallo Wolfgang!

This works.
How do you find your peaces of wisdom?

But I have not understand the whole figurenumber thing.

It is obviously (my example shows this), that there must
be a hidden number.

What is its name?
How can this number be influenzed?
What is 'checked' or 'not checked' in the above option?
And why does this produce the effect I wanted?

Gruß, Wolfgang

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

* Re: figurenumbering
  2006-09-07 20:03 ` figurenumbering Wolfgang Werners-Lucchini
@ 2006-09-15 11:05   ` Wolfgang Schuster
  0 siblings, 0 replies; 13+ messages in thread
From: Wolfgang Schuster @ 2006-09-15 11:05 UTC (permalink / raw)


On Thu, 07 Sep 2006 22:03:42 +0200
"Wolfgang Werners-Lucchini" <wwl@musensturm.de> wrote:

> Hallo!
> 
> Is this correct behaviour?
> -------------------------------------------------

You need the option

\setupfloats[numbering=nocheck]

in your document settings.

> \starttext
> \placefigure{}{\framed{Blub}}
> \placefigure{}{\framed{Bautz}}
> \placefigure{}{\framed{Bla}}
> 
> This were \rawnumber[figure] figures by now!
> 
> \setnumber[figure]{8}
> We want to count on with \rawnumber[figure].
> 
> \placefigure{}{\framed{Plong}}
> 
> figurenumber is correct incremented to \rawnumber[figure], 
> but caption shows 4.

the caption shows now the same value as \rawnumber.

> \stoptext
> -------------------------------------------------
> If this is not a bug,
> how can captionnumbering be influenzed?
> 
> Wolfgang

Wolfgang Schuster

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

* figurenumbering
       [not found] <mailman.694.1157608687.2039.ntg-context@ntg.nl>
@ 2006-09-07 20:03 ` Wolfgang Werners-Lucchini
  2006-09-15 11:05   ` figurenumbering Wolfgang Schuster
  0 siblings, 1 reply; 13+ messages in thread
From: Wolfgang Werners-Lucchini @ 2006-09-07 20:03 UTC (permalink / raw)


Hallo!

Is this correct behaviour?
-------------------------------------------------
\starttext
\placefigure{}{\framed{Blub}}
\placefigure{}{\framed{Bautz}}
\placefigure{}{\framed{Bla}}

This were \rawnumber[figure] figures by now!

\setnumber[figure]{8}
We want to count on with \rawnumber[figure].

\placefigure{}{\framed{Plong}}

figurenumber is correct incremented to \rawnumber[figure], 
but caption shows 4.
\stoptext
-------------------------------------------------
If this is not a bug,
how can captionnumbering be influenzed?

Wolfgang

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

end of thread, other threads:[~2006-10-10 19:22 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <mailman.1.1159524004.8643.ntg-context@ntg.nl>
2006-09-29 18:53 ` figurenumbering Wolfgang Werners-Lucchini
2006-10-01 12:42   ` figurenumbering Wolfgang Schuster
     [not found] <mailman.858.1158597384.2039.ntg-context@ntg.nl>
2006-10-10 19:22 ` figurenumbering Wolfgang Werners-Lucchini
     [not found] <mailman.167.1159780405.16231.ntg-context@ntg.nl>
2006-10-02 19:08 ` figurenumbering Wolfgang Werners-Lucchini
2006-10-05 10:35   ` figurenumbering Wolfgang Schuster
     [not found] <mailman.1.1159437602.22722.ntg-context@ntg.nl>
2006-09-28 17:30 ` figurenumbering Wolfgang Werners-Lucchini
2006-09-29  9:43   ` figurenumbering Wolfgang Schuster
     [not found] <mailman.788.1158330124.2039.ntg-context@ntg.nl>
2006-09-17 11:59 ` figurenumbering Wolfgang Werners-Lucchini
2006-09-17 14:10   ` figurenumbering Hans Hagen
2006-09-18 11:42     ` figurenumbering Wolfgang Schuster
2006-09-28  6:33       ` figurenumbering Wolfgang Schuster
     [not found] <mailman.694.1157608687.2039.ntg-context@ntg.nl>
2006-09-07 20:03 ` figurenumbering Wolfgang Werners-Lucchini
2006-09-15 11:05   ` figurenumbering Wolfgang Schuster

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