ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Re: Numbering of figures and tables changed?
       [not found] <mailman.1.1345975201.32620.ntg-context@ntg.nl>
@ 2012-08-26 11:31 ` Robert Blackstone
  2012-08-26 11:55   ` Wolfgang Schuster
  0 siblings, 1 reply; 4+ messages in thread
From: Robert Blackstone @ 2012-08-26 11:31 UTC (permalink / raw)
  To: ntg-context


On 26 Aug 2012, at 11:29,  Wolfgang Schuster <wolfgang.schuster@gmail.com> wrote
> 
> Am 26.08.2012 um 10:33 schrieb Robert Blackstone <blackstone.robert@gmail.com>:
> 
>> What can I do to give me back the numbering of the floats per chapter? Or, if it is a bug in the recent Minimals, can the numbering per chapter be restored somehow? 
> 
> 
> Setting the way how you want to be numbered resets only the figure counter, to show the chapter number you have to enable prefixes.
> 
> \setupcaption[figure][way=bychapter,prefix=yes]
> 
> \starttext
> 
> \completelistoffigures
> 
> \dorecurse{2}
>  {\chapter{Chapter #1}
>   \dorecurse{5}
>     {\dorecurse{4}{\input knuth\par}
>      \placefigure{Caption}{\externalfigure[dummy]}
>      \dorecurse{4}{\input knuth\par}}}
> 
> \stoptext
> 
> Wolfgang

Thank you, Wolfgang. 
Your advice solves one problem but adds another: now the section numbers are included as well. How do I get rid of these?

See example: 

\setupcaption[figure][way=bychapter,prefix=yes]

\starttext

\completelistoffigures

\dorecurse{2}
 {\chapter{Chapter #1}
 \input knuth\par
 \dorecurse{2}
 {\section{Section #1}
\input knuth\par
 \placefigure{Caption}{\externalfigure[dummy]}
 \input knuth\par}}  
\stoptext

(I'm sorry for the error in the nested \dorecurse with the section titles but the problem will be clear.)
Thanks in advance.

Kind regards,
Robert

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

* Re: Numbering of figures and tables changed?
  2012-08-26 11:31 ` Numbering of figures and tables changed? Robert Blackstone
@ 2012-08-26 11:55   ` Wolfgang Schuster
  0 siblings, 0 replies; 4+ messages in thread
From: Wolfgang Schuster @ 2012-08-26 11:55 UTC (permalink / raw)
  To: mailing list for ConTeXt users


Am 26.08.2012 um 13:31 schrieb Robert Blackstone <blackstone.robert@gmail.com>:

> 
> On 26 Aug 2012, at 11:29,  Wolfgang Schuster <wolfgang.schuster@gmail.com> wrote
>> 
>> Am 26.08.2012 um 10:33 schrieb Robert Blackstone <blackstone.robert@gmail.com>:
>> 
>>> What can I do to give me back the numbering of the floats per chapter? Or, if it is a bug in the recent Minimals, can the numbering per chapter be restored somehow? 
>> 
>> Setting the way how you want to be numbered resets only the figure counter, to show the chapter number you have to enable prefixes.
>> 
>> \setupcaption[figure][way=bychapter,prefix=yes]
>> 
>> \starttext
>> 
>> \completelistoffigures
>> 
>> \dorecurse{2}
>> {\chapter{Chapter #1}
>>  \dorecurse{5}
>>    {\dorecurse{4}{\input knuth\par}
>>     \placefigure{Caption}{\externalfigure[dummy]}
>>     \dorecurse{4}{\input knuth\par}}}
>> 
>> \stoptext
>> 
>> Wolfgang
> 
> Thank you, Wolfgang. 
> Your advice solves one problem but adds another: now the section numbers are included as well. How do I get rid of these?
> 
> See example: 
> 
> \setupcaption[figure][way=bychapter,prefix=yes]
> 
> \starttext
> 
> \completelistoffigures
> 
> \dorecurse{2}
> {\chapter{Chapter #1}
> \input knuth\par
> \dorecurse{2}
> {\section{Section #1}
> \input knuth\par
> \placefigure{Caption}{\externalfigure[dummy]}
> \input knuth\par}}  
> \stoptext

Add “prefixsegments=chapter” to the \setuphead settings.

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

* Re: Numbering of figures and tables changed?
  2012-08-26  8:33 Robert Blackstone
@ 2012-08-26  9:29 ` Wolfgang Schuster
  0 siblings, 0 replies; 4+ messages in thread
From: Wolfgang Schuster @ 2012-08-26  9:29 UTC (permalink / raw)
  To: mailing list for ConTeXt users


Am 26.08.2012 um 10:33 schrieb Robert Blackstone <blackstone.robert@gmail.com>:

> Dear list,
> 
> In the book/thesis I am typesetting the many figures (Examples) and the few tables must be numbered per chapter, (Ex. 1.3, Ex. 4.17 etc) and they should appear like this in the List of Examples.
> Up to around 27 july this worked perfectly, automatically I should say, but with a newer version of mkiv (25 august) they come out numbered for the book as a whole and without chapter numbers. I have not changed the setups, and I can reproduce the correct result with an older version of mkiv (may) with a slightly adapted environment file. Unfortunately I do need some recent features of mkiv. 
> The setups for the floats are:
> 
> \definefloat[Example][examples]
> \setupfloat[Example][spacebefore=medium,spaceafter=medium,sidespacebefore=medium,sidespaceafter=medium]
> \setupcaption[Example][location=top,number=yes,inbetween=\blank,bodyfont=10pt]	
> \setuplabeltext[en][Example=Ex.~]
> 
> \definefloat[table][tables]
> \setupfloat[table][spacebefore=medium,spaceafter=medium,sidespacebefore=medium,sidespaceafter=medium]
> \setupcaption[table][location=top,number=yes,inbetween=\blank,bodyfont=10pt]\setuplabeltext[en][table=Table~]
> 
> I tried  [way=bychapter] as an argument for the captions but that did not change anything'
> 
> What can I do to give me back the numbering of the floats per chapter? Or, if it is a bug in the recent Minimals, can the numbering per chapter be restored somehow? 


Setting the way how you want to be numbered resets only the figure counter, to show the chapter number you have to enable prefixes.

\setupcaption[figure][way=bychapter,prefix=yes]

\starttext

\completelistoffigures

\dorecurse{2}
  {\chapter{Chapter #1}
   \dorecurse{5}
     {\dorecurse{4}{\input knuth\par}
      \placefigure{Caption}{\externalfigure[dummy]}
      \dorecurse{4}{\input knuth\par}}}

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

* Numbering of figures and tables changed?
@ 2012-08-26  8:33 Robert Blackstone
  2012-08-26  9:29 ` Wolfgang Schuster
  0 siblings, 1 reply; 4+ messages in thread
From: Robert Blackstone @ 2012-08-26  8:33 UTC (permalink / raw)
  To: ntg-context

Dear list,

In the book/thesis I am typesetting the many figures (Examples) and the few tables must be numbered per chapter, (Ex. 1.3, Ex. 4.17 etc) and they should appear like this in the List of Examples.
Up to around 27 july this worked perfectly, automatically I should say, but with a newer version of mkiv (25 august) they come out numbered for the book as a whole and without chapter numbers. I have not changed the setups, and I can reproduce the correct result with an older version of mkiv (may) with a slightly adapted environment file. Unfortunately I do need some recent features of mkiv. 
The setups for the floats are:

\definefloat[Example][examples]
\setupfloat[Example][spacebefore=medium,spaceafter=medium,sidespacebefore=medium,sidespaceafter=medium]
\setupcaption[Example][location=top,number=yes,inbetween=\blank,bodyfont=10pt]	
\setuplabeltext[en][Example=Ex.~]

\definefloat[table][tables]
\setupfloat[table][spacebefore=medium,spaceafter=medium,sidespacebefore=medium,sidespaceafter=medium]
\setupcaption[table][location=top,number=yes,inbetween=\blank,bodyfont=10pt]\setuplabeltext[en][table=Table~]

I tried  [way=bychapter] as an argument for the captions but that did not change anything'

What can I do to give me back the numbering of the floats per chapter? Or, if it is a bug in the recent Minimals, can the numbering per chapter be restored somehow? 

Thanks in advance.

Best regards,
Robert
___________________________________________________________________________________
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] 4+ messages in thread

end of thread, other threads:[~2012-08-26 11:55 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <mailman.1.1345975201.32620.ntg-context@ntg.nl>
2012-08-26 11:31 ` Numbering of figures and tables changed? Robert Blackstone
2012-08-26 11:55   ` Wolfgang Schuster
2012-08-26  8:33 Robert Blackstone
2012-08-26  9:29 ` 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).