New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
References to figures without captions: errors in both HTML and LaTeX #6914
Comments
…ref: To be clear the ambiguous warning for missing-reference :ref:, this separates the warning to missing-label and missing-caption. To emit a warning dynamically, this also adds a new event: `warn-missing-reference` to customize warning messages via event handlers.
…ref: To be clear the ambiguous warning for missing-reference :ref:, this separates the warning to missing-label and missing-caption. To emit a warning dynamically, this also adds a new event: `warn-missing-reference` to customize warning messages via event handlers.
…ref: To be clear the ambiguous warning for missing-reference :ref:, this separates the warning to missing-label and missing-caption. To emit a warning dynamically, this also adds a new event: `warn-missing-reference` to customize warning messages via event handlers.
Thank you for reporting.
Yes, it would be better to do that by disabling the broken hyperlinks.
I think this is a bug of the figure-number assignment logic. The figure having caption should have "Fig.1" in HTML output. And the
Agreed. I just posted #8075 to make the warning message meaningful. |
…ptioned items The figure numbers should be assigned to items only having captions or titles. This uses `get_numfig_title()` to ensures it on assign numbers.
…ref: To be clear the ambiguous warning for missing-reference :ref:, this separates the warning to missing-label and missing-caption. To emit a warning dynamically, this also adds a new event: `warn-missing-reference` to customize warning messages via event handlers.
…ptioned items The figure numbers should be assigned to items only having captions or titles. This uses `get_numfig_title()` to ensures it on assign numbers.
…ptioned items The figure numbers should be assigned to items only having captions or titles. This uses `get_numfig_title()` to ensures it on assign numbers.
…ref: To be clear the ambiguous warning for missing-reference :ref:, this separates the warning to missing-label and missing-caption. To emit a warning dynamically, this also adds a new event: `warn-missing-reference` to customize warning messages via event handlers.
Fix #6914: figure numbers are unexpectedly assigned to uncaptioned items
…ref: To be clear the ambiguous warning for missing-reference :ref:, this separates the warning to missing-label and missing-caption. To emit a warning dynamically, this also adds a new event: `warn-missing-reference` to customize warning messages via event handlers.
…ref: To be clear the ambiguous warning for missing-reference :ref:, this separates the warning to missing-label and missing-caption. To emit a warning dynamically, this also adds a new event: `warn-missing-reference` to customize warning messages via event handlers.
…ref: To be clear the ambiguous warning for missing-reference :ref:, this separates the warning to missing-label and missing-caption. To emit a warning dynamically, this also adds a new event: `warn-missing-reference` to customize warning messages via event handlers.
…ng_ref Fix #6914: Emit a detailed warning when failed to resolve :ref:
Describe the bug
Using figures without captions causes errors in both HTML (though these are properly reported when source is processed) and in LaTeX (they are not reported until LaTeX says there were undefined references).
This was the test document, compiled with sphinx 2.2.2 from pypi;
numfig=True
was added to conf.py, the project was otherwise generated with sphinx-build with no other changes. It is attached here: sphinx-captions.zipand these are the results:
Expected behavior
I expect
label
(as the label will not resolve to any text) but the warning is not pointing to how to fix the issue.Environment info
The text was updated successfully, but these errors were encountered: