Open ncoghlan opened 2 years ago
Looking at https://www.sphinx-doc.org/en/master/extdev/appapi.html#extension-setup it seems the setup function certainly should be getting called, so I'm going to close as almost certainly indicating that there is something wrong with my build environment.
Reopening, as I had misunderstood which setup
functions Sphinx called automatically - it only calls the setup
hooks in the sphinxcontrib
submodules, not the ones in the directives
implementation modules.
Checking behaviour with and without the :caption:
directive, it's clear that without the caption specified, get_actual_width()
never gets called. Looking at the code then shows that the error is specific to the case where the figure width is set to the special value "image".
So my workaround is to avoid that dynamic sizing setting.
When I try to use the nwdiag
:caption:
directive in Sphinx, the associatedblockdiag
method throws an exception claiming thatfontpath
isn't defined, even thoughfontpath
,blockdiag_fontpath
, andnwdiag_fontpath
are all set.It looks like
global_options
is supposed to be set by calling thesetup
functions in the respective modules, but nothing ever seems to actually call those (adding asys.exit()
call didn't terminate the Sphinx run early)