jbms / sphinx-immaterial

Adaptation of the popular mkdocs-material material design theme to the sphinx documentation system
https://jbms.github.io/sphinx-immaterial/
Other
177 stars 28 forks source link

Fixed double numfig statements for Figues and no listing number for code blocks #229

Closed glatosinski closed 1 year ago

glatosinski commented 1 year ago

The explicit add_fignumber adds rendering of another figure number, resulting in double Fig entries in rendered doc. In addition, for code listings the Listing appears as a raw text above the code block:

double-fig

This PR removes the excessive number for tables and figures (code blocks require it). In addition, the Listing number, as well as listing caption are wrapped in filename class so they appear as listing content above the code block. The result is following:

double-fig-removed

2bndy5 commented 1 year ago

I had noticed something similar to this (why the else: super_func() branch exists now). Is this specific to a certain version of sphinx?

2bndy5 commented 1 year ago

Is this specific to a certain version of sphinx?

I checked with the Sphinx source, and it doesn't seem effected by a particular version that this theme supports. And, the docutils release notes don't mention any changes to captions.

EDIT: same goes for figures

2bndy5 commented 1 year ago

Solution released in v0.11.4