Hello dear community,

excuse me if this is a very basic question. But I googled to no avail. I also checked the manual of chemmacros, which gives no information. I am using "scheme" environments from chemmacros. The problem is, that those are not numbered like figures or tables, i.e. including the chapter (4.1, 4.2,..., 5.1, 5.2, ...), but rather get a simple number n (1, 2, ...) over the whole document. I am using Koma script's scrbook. \numberwithin{scheme}{chapter} does not work, I get the error that "no counter 'scheme' [is] defined". As I am in a hurry right now and this is a very basic question, I am omitting the MWE, if it is needed, I will give it ASAP. But maybe somebody alsready knows of that problem?

With best regards

  • 1
    MWE is not "needed" but enormously increases the chance of people answering.
    – campa
    Nov 24 '20 at 12:37
  • 4
    Try \numberwithin{scheme}{chapter} after \begin{document}
    – cgnieder
    Nov 24 '20 at 12:47
  • 1
    See also: github.com/cgnieder/chemmacros/issues/42
    – leandriis
    Nov 24 '20 at 14:15
  • 1
    @cgnieder Thank you so much, that solved the problem. I would never have thought that it has to go outside the preamble, sorry.
    – bfalk
    Nov 24 '20 at 14:29
  • 4
    I’m voting to close this question because it has been solved by comments.
    – Sebastiano
    Nov 25 '20 at 22:53