ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Tim Steenvoorden <tim.steenvoorden@gmail.com>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Same counter for figures as theorems
Date: Tue, 11 Aug 2020 11:41:18 +0200	[thread overview]
Message-ID: <ab161706-d92b-42cf-8c5d-b6b720040268@Spark> (raw)
In-Reply-To: <1697c9e5-a649-4569-a35e-071bf1594300@Spark>


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

Hi all,

I’ve a text where chapters are numbered 1, 2, 3, … and sections 1.1, 1.2, 1.3, …
Now I’d like all elements (figures, tables, examples, definitions, theorems, …) to be numbered consecutively prefixed by the chapter and section number, so 1.1.1, 1.1.2, 1.2.1, ...

I’ve managed to change figure/table captions to do this by:

\setupcaptions[
  way=bysection,
  prefixsegments=chapter:section,
]

And I’ve setup my enumerations by:

\setupenumerations[
  way=bysection,
  prefix=yes,
  prefixsegments=chapter:section,
]

But how do I use the same counter for figures, tables, and all enumerations?
Trying to share a counter with:

\definecounter[object][
  way=bysection,
  prefix=yes,
  prefixsegments=chapter:section,
]
\setupenumerations[
  counter=object,
]
\setupcaptions[
  counter=object,
]

Results in enumerations numbered 1, 2, 3, ... instead of 1.1.1, 1.1.2, 1.1.3, … And figures and tables are still numbered in the default way.

Cheers,
Tim

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

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

___________________________________________________________________________________
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

       reply	other threads:[~2020-08-11  9:41 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1697c9e5-a649-4569-a35e-071bf1594300@Spark>
2020-08-11  9:41 ` Tim Steenvoorden [this message]
2020-08-13  8:06   ` Tim Steenvoorden
2020-08-13 11:11     ` Taco Hoekwater
2020-08-14  7:49       ` Tim Steenvoorden
2020-08-14 21:11         ` Taco Hoekwater
2020-08-18  8:30           ` Tim Steenvoorden

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ab161706-d92b-42cf-8c5d-b6b720040268@Spark \
    --to=tim.steenvoorden@gmail.com \
    --cc=ntg-context@ntg.nl \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).