LaTeX: the \label
in a figure should be immediately after \caption
, not after legend.
#3704
Labels
\label
in a figure should be immediately after \caption
, not after legend.
#3704
Subject: a figure may have a legend. This consists of arbitrary body elements after the caption.
Currently the LaTeX writer inserts the
\label
right before the end of thefigure
environment (orwrapfigure
,sphinxfigure-in-table
). But, theoretically, the legend contents could contain for example a table having itself a caption. Then the\label
inserted after it will result to document hyperlinks inserted by Sphinx to point to the table in the legend not to the image at top of figure environment.Proof of concept:
edit: the screenshot was taken with #3702 applied. Without it the very last words
caption code
are slightly shifted down, because the interline spacing is not correct for the last paragraph.Source:
The text was updated successfully, but these errors were encountered: