jupyter-book / mystmd

Command line tools for working with MyST Markdown.
https://mystmd.org/guide
MIT License
206 stars 61 forks source link

🔢 Add enumeration options to common directives #1477

Closed rowanc1 closed 2 months ago

rowanc1 commented 2 months ago

This adds enumerated / enumerator (aliased as numbered / number) to all common directives (code, figures, etc.). This allows for things like turning off enumeration for a specific figure / equation as well as taking control of numbering completely.

In a recent example, we had to create a figure with a specific number S5 and then carry on numbering as usual.

This also introduces some places to centralize directive option logic - which we could extend to classes in the future.

changeset-bot[bot] commented 2 months ago

🦋 Changeset detected

Latest commit: a165d361f13dfc0ac47e858e57de2502b99ac06a

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 7 packages | Name | Type | | --------------- | ----- | | myst-directives | Patch | | myst-transforms | Patch | | myst-parser | Patch | | mystmd | Patch | | myst-roles | Patch | | myst-to-html | Patch | | myst-cli | Patch |

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

rowanc1 commented 2 months ago

Yes - I purposely left class out as there is some extra work to do on the UI side to actually make that possible. But I think the pattern is good (and easy) to follow!