Skip to content

Commit a7949d4

Browse files
committed
LaTeX: let mark-up for seealso directive use explicit colon (fix #11264)
1 parent 321f886 commit a7949d4

File tree

5 files changed

+11
-11
lines changed

5 files changed

+11
-11
lines changed

CHANGES

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,6 @@ Incompatible changes
2222
Deprecated
2323
----------
2424

25-
* LaTeX: some internals of the ``sphinxadmonition`` environment have been
26-
marked for removal at 7.0.0 in the :file:`sphinxlatexadmonitions.sty`.
27-
Custom re-definitions of ``sphinxlightbox`` or ``sphinxheavybox`` will have
28-
to be updated if they depended upon them.
2925
* #11247: Deprecate the legacy ``intersphinx_mapping`` format
3026

3127
Features added
@@ -62,6 +58,8 @@ Bugs fixed
6258
respective to contents (when using rounded corners)
6359
* #11235: LaTeX: added ``\color`` in topic (or admonition) contents may cause color
6460
leak to the shadow and border at a page break
61+
* #11264: LaTeX: missing space before colon after "Voir aussi" for :dudir:`seealso`
62+
directive in French (refs: #6744)
6563
* #11147: Fix source file/line number info in object description content and in
6664
other uses of ``nested_parse_with_titles``. Patch by Jeremy Maitin-Shepard.
6765
* #11192: Restore correct parallel search index building.

doc/latex.rst

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1689,12 +1689,14 @@ Environments
16891689
``warningBgColor``, ``warningBorderColor``, ``warningborder``, ...
16901690

16911691
- Environment for the :rst:dir:`seealso` directive: ``sphinxseealso``.
1692-
It takes one argument which will be the localized string ``See also``. Its
1693-
default definition maintains the legacy behavior: the localized ``See
1694-
also``, followed with a colon, will be rendered using ``\sphinxstrong``.
1695-
Nothing particular is done for the contents.
1692+
It takes one argument which will be the localized string ``See also``
1693+
followed with a colon.
16961694

16971695
.. versionadded:: 6.1.0
1696+
.. versionchanged:: 6.2.0
1697+
1698+
Colon made part of the mark-up rather than being inserted by the
1699+
environment for coherence with how admonitions are handled generally.
16981700

16991701
- The contents_ directive (with ``:local:`` option) and the
17001702
:dudir:`topic` directive are implemented by environment ``sphinxShadowBox``.

sphinx/texinputs/sphinxlatexadmonitions.sty

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
}
3535

3636
% Some are quite plain
37-
\newenvironment{sphinxseealso}[1]{\sphinxstrong{#1:}\par\nopagebreak}{}
37+
\newenvironment{sphinxseealso}[1]{\sphinxstrong{#1}\par\nopagebreak}{}
3838

3939
% This \dimen register is a legacy relic from Sphinx 1.5 which is used now
4040
% only for sphinxlightbox. It is set in the sphinxadmonition environment.

sphinx/writers/latex.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -820,7 +820,7 @@ def depart_desc_annotation(self, node: Element) -> None:
820820

821821
def visit_seealso(self, node: Element) -> None:
822822
self.body.append(BLANKLINE)
823-
self.body.append(r'\begin{sphinxseealso}{%s}' % admonitionlabels['seealso'] + CR)
823+
self.body.append(r'\begin{sphinxseealso}{%s:}' % admonitionlabels['seealso'] + CR)
824824

825825
def depart_seealso(self, node: Element) -> None:
826826
self.body.append(BLANKLINE)

tests/test_build_latex.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ def test_writer(app, status, warning):
144144

145145
assert 'Footnotes' not in result
146146

147-
assert ('\\begin{sphinxseealso}{See also}\n\n'
147+
assert ('\\begin{sphinxseealso}{See also:}\n\n'
148148
'\\sphinxAtStartPar\n'
149149
'something, something else, something more\n'
150150
'\\begin{description}\n'

0 commit comments

Comments
 (0)