Skip to content

numbering function does not get local counter for sub-equations #3

@hbierlee

Description

@hbierlee

Hi,

Great package!

I'm running into a specific issue where the numbering function does not get local counter for sub-equations, like it does for regular equations (which allows the user to create a CHAPTER.EQUATION_NUMBER type numbering).

I am trying to achieve a CHAPTER.EQUATION_NUMBER.SUB_EQUATION_NUMBER, but:

#import "@preview/equate:0.2.1": equate
#set heading(numbering: "1.1")
#show: equate.with(breakable: true, sub-numbering: true)
#set math.equation(
  numbering: (..nums) => numbering("(1.1)", counter(heading).get().first(), ..nums),
)

= Chp 1

= Chp 2

$
  1+1=2 #<eq:1:1>\
  1+2=3
$ <eq:1>

= Chp 3

- The ref to equation @eq:1 gets the local counter
- But a ref to a sub-equation does not: @eq:1:1 $!=$ (2.1.1), instead gets counter
  to _current_ chapter 3.

Link: playground

image

Cheers,

Henk

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions