Include chapter number in figure numbering
Hi, how do I include the chapter number in the figure numbering? The following example used to produce (as of November 2011) “Figure 1.1”. A current beta yields merely “Figure 1”. \starttext \startchapter [title=Foo] \startplacefigure [title=Bar] \stopplacefigure \stopchapter \stoptext Marco
Marco Patzer wrote:
how do I include the chapter number in the figure numbering?
Untested: \setupcaptions[prefixsegment=chapter] or \setupcaption[figure][prefixsegment=chapter] should both work. (The former should affect table captions, too.) Slightly more at http://wiki.contextgarden.net/Command/setupcaptions Which is not the first place one would look, admittedly, although it's logical once you realize it. This requires some crosslinks from some pages describing \placefigure-related things, I think. Cheers, Sietse
The following example used to produce (as of November 2011) “Figure 1.1”. A current beta yields merely “Figure 1”.
\starttext \startchapter [title=Foo] \startplacefigure [title=Bar] \stopplacefigure \stopchapter \stoptext
Marco
___________________________________________________________________________________ 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 ___________________________________________________________________________________
how do I include the chapter number in the figure numbering?
Untested: \setupcaptions[prefixsegment=chapter]
This works with beta 2011-11-29, but unfortunately not in a current one. Does it work for you?
You're right: it doesn't work for me, either. A bug, then, or possibly an unannounced interface change. --Sietse
On Sep 4, 2012, at 4:00 AM, Sietse Brouwer wrote:
how do I include the chapter number in the figure numbering?
Untested: \setupcaptions[prefixsegment=chapter]
This works with beta 2011-11-29, but unfortunately not in a current one. Does it work for you?
You're right: it doesn't work for me, either. A bug, then, or possibly an unannounced interface change. --Sietse
I think the key name is plural, and you need to turn on prefixes. Try \setupcaptions[prefix=yes,prefixsegments=chapter] \starttext \chapter{One} \section{Cow} \placefigure{Caption}{\externalfigure[cow][width=2cm]} Text. \section{Cow revisited} \placefigure{Caption}{\externalfigure[cow][width=2cm]} Text. \chapter{Two} \placefigure{Caption}{\externalfigure[cow][width=2cm]} Text. \stoptext ________________________________ This e-mail message (including any attachments) is for the sole use of the intended recipient(s) and may contain confidential and privileged information. If the reader of this message is not the intended recipient, you are hereby notified that any dissemination, distribution or copying of this message (including any attachments) is strictly prohibited. If you have received this message in error, please contact the sender by reply e-mail message and destroy all copies of the original message (including attachments).
participants (3)
-
Marco Patzer
-
Rogers, Michael K
-
Sietse Brouwer