LaTeX: let mark-up for seealso directive use explicit colon (fix #11264)

This commit is contained in:
Jean-François B 2023-03-26 18:52:06 +02:00
parent 321f886097
commit a7949d4290
5 changed files with 11 additions and 11 deletions

View File

@ -22,10 +22,6 @@ Incompatible changes
Deprecated
----------
* LaTeX: some internals of the ``sphinxadmonition`` environment have been
marked for removal at 7.0.0 in the :file:`sphinxlatexadmonitions.sty`.
Custom re-definitions of ``sphinxlightbox`` or ``sphinxheavybox`` will have
to be updated if they depended upon them.
* #11247: Deprecate the legacy ``intersphinx_mapping`` format
Features added
@ -62,6 +58,8 @@ Bugs fixed
respective to contents (when using rounded corners)
* #11235: LaTeX: added ``\color`` in topic (or admonition) contents may cause color
leak to the shadow and border at a page break
* #11264: LaTeX: missing space before colon after "Voir aussi" for :dudir:`seealso`
directive in French (refs: #6744)
* #11147: Fix source file/line number info in object description content and in
other uses of ``nested_parse_with_titles``. Patch by Jeremy Maitin-Shepard.
* #11192: Restore correct parallel search index building.

View File

@ -1689,12 +1689,14 @@ Environments
``warningBgColor``, ``warningBorderColor``, ``warningborder``, ...
- Environment for the :rst:dir:`seealso` directive: ``sphinxseealso``.
It takes one argument which will be the localized string ``See also``. Its
default definition maintains the legacy behavior: the localized ``See
also``, followed with a colon, will be rendered using ``\sphinxstrong``.
Nothing particular is done for the contents.
It takes one argument which will be the localized string ``See also``
followed with a colon.
.. versionadded:: 6.1.0
.. versionchanged:: 6.2.0
Colon made part of the mark-up rather than being inserted by the
environment for coherence with how admonitions are handled generally.
- The contents_ directive (with ``:local:`` option) and the
:dudir:`topic` directive are implemented by environment ``sphinxShadowBox``.

View File

@ -34,7 +34,7 @@
}
% Some are quite plain
\newenvironment{sphinxseealso}[1]{\sphinxstrong{#1:}\par\nopagebreak}{}
\newenvironment{sphinxseealso}[1]{\sphinxstrong{#1}\par\nopagebreak}{}
% This \dimen register is a legacy relic from Sphinx 1.5 which is used now
% only for sphinxlightbox. It is set in the sphinxadmonition environment.

View File

@ -820,7 +820,7 @@ class LaTeXTranslator(SphinxTranslator):
def visit_seealso(self, node: Element) -> None:
self.body.append(BLANKLINE)
self.body.append(r'\begin{sphinxseealso}{%s}' % admonitionlabels['seealso'] + CR)
self.body.append(r'\begin{sphinxseealso}{%s:}' % admonitionlabels['seealso'] + CR)
def depart_seealso(self, node: Element) -> None:
self.body.append(BLANKLINE)

View File

@ -144,7 +144,7 @@ def test_writer(app, status, warning):
assert 'Footnotes' not in result
assert ('\\begin{sphinxseealso}{See also}\n\n'
assert ('\\begin{sphinxseealso}{See also:}\n\n'
'\\sphinxAtStartPar\n'
'something, something else, something more\n'
'\\begin{description}\n'