Memo: this command produces a list of the code listings in the document
(with chosen title foo), analogous to ``\listoffigures``, and it comes
from LaTeX package float.sty.
This should not change anything for Sphinx produced documents without
extra custom use of float package by user, and is recommended by wrapfig
doc for good functioning.
This fixes only the case the label including both spaces and colons as
ad-hoc. There is still a bug if a label having spaces, colons and
numbers like "foo bar:baz 1234".
Note: To support the case, we have to improve the inventory format.
- new dimensions ``\sphinxverbatimsep`` and ``\sphinxverbatimborder``
configure the frame width and its separation from contents,
- new ``\ifsphinxverbatimwithframe`` and ``\ifsphinxverbatimwrapslines``
to customize behaviour of sphinxVerbatim or define wrapper
environments, such as sphinxVerbatimNoFrame and sphinxVerbatimintable,
- the latter is used in table cells, in place of OriginalVerbatim, thus
allowing to handle captions for code-blocks in tables (issue #2706).
On this occasion, a bit of refactoring in sphinx Verbatim code,
particularly the caption is typeset in advance to its insertion in
non-breakable from code location (this avoids using the amstext
``\iffirstchoice@`` conditional), and the sphinxVerbatim is usable
without any optional argument (but currently option is always present
and contains at least ``commandchars=\\\{\}`` to activate syntax
highlighting).
MEMO: the used formula is correct as long as package array is loaded.
Package array (which modifies how the width of vertical rules is counted
in the total width of the tabular) is a dependency of packages tabulary,
and eqparbox, and possibly others which are currently loaded by
sphinx.sty. Even if usage of package tabulary is dropped in future
version of sphinx.sty, there would still remain the dependency on array
via eqparbox, and the formula configured in latex.py will remain
correct.