Tables and figures produced by code cells are not numbered and tables don't have captions
Describe the bug
According to the Jupyterbook documentation it is possible to make code cell outputs appear as images. However, these images do not receive numbers when the books is compiled.
Though the documentation doesn't say this, it seems logical that tables produced by code cells should also be rendered in this way also.
To Reproduce
An example of this can be seen here. The first figure is an image and is rendered properly and with a caption and number. The second figure is basically the same content but generated by R code cell. It has a caption but no number.
Below is an R code cell generating a table, but that has neither a number or a caption.
Expected behavior
Since a major benefit of jupyter is code executability, it is important to generate figures and tables using code and refer to them in the text.
Environment
- Python Version [e.g. 3.7.1]: Python 3.8.2
- Package versions or output of
jupyter-book --version: Jupyter Book: 0.9.1 MyST-NB: 0.10.2 Sphinx Book Theme: 0.0.39 MyST-Parser: 0.12.10 Jupyter-Cache: 0.4.1 NbClient: 0.5.1 - Operating System: Mac OS
Plus: "figclass: margin-caption" does not work.