Hi, can you clarify what your expected result is? I’m trying to understand from your example code but I can’t quite figure out what you are looking for. Are you trying to automatically number <h2> elements within chapters?
I actually found a solution around this issues. I changed all the headers down a level since the counters worked for them.
I was trying to automatically number the <h2> elements within the chapters but nothing would appear. I applied a class also to ensure it only targeted the chapter <h2> but this did not work also.