PreTeXtBook / pretext

PreTeXt: an authoring and publishing system for scholarly documents
https://pretextbook.org
Other
266 stars 208 forks source link

Number figures separate from theorems #148

Closed rbeezer closed 7 years ago

rbeezer commented 9 years ago

Request to (optionally) have figures (et al) on their own numbering scheme:

https://groups.google.com/d/msg/mathbook-xml-support/whOWNaoxrrk/XsOVktKeEDMJ

rbeezer commented 9 years ago

One solution:

Two schemes (theorems and figures), two switches with levels for each. One switch to control if they are independent or combined (experiment putting this in docinfo).

When independent just use them. When combined, decide which level switch has priority and set the two identically internally. Then compute a serial number for any item in the combination as the sum of the serial numbers of the item in the two schemes. "Everything else" may just carry along gracefully.

rbeezer commented 9 years ago

Better solution. Make three preliminary routines - two independent, one combined. Then make two of the usual routines for the independent parts and then observe the switch to decide which to use.

ghost commented 8 years ago

+1, including separating table numbering.

rbeezer commented 7 years ago

I've got some ideas about how to do this, now that the numbering code has improved with sidebyside split out from captioned items.

rbeezer commented 7 years ago

I've not publicized this much yet, but you can now put all four captioned items (figure, table, listing, list) together on their own independent numbering scheme. Add

docinfo/numbering/figures/@level

with a (not too-large, see #125) integer value. This general technique can be used to split out other similar groups.

Work at 93582740fa20