Skip to content

Commit 5b922b4

Browse files
authored
Fix sphinx-doc#14059 (PDF build crash with French since August 2025 LaTeX) (sphinx-doc#14060)
1 parent 62619bd commit 5b922b4

File tree

2 files changed

+12
-4
lines changed

2 files changed

+12
-4
lines changed

CHANGES.rst

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,9 @@ Bugs fixed
137137
* #14004: Fix :confval:`autodoc_type_aliases` when they appear in PEP 604
138138
union syntax (``Alias | Type``).
139139
Patch by Tamika Nomara.
140+
* #14059: LaTeX: Footnotes cause pdflatex error with French language
141+
(since August 2025 upstream change to LaTeX French support).
142+
Patch by Jean-François B.
140143

141144

142145
Testing

sphinx/texinputs/sphinxpackagefootnote.sty

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
\NeedsTeXFormat{LaTeX2e}
22
\ProvidesPackage{sphinxpackagefootnote}%
3-
[2024/05/17 v7.3.x Sphinx custom footnotehyper package (Sphinx team)]
3+
[2025/11/15 v8.3.0 Sphinx custom footnotehyper package (Sphinx team)]
44
%%
55
%% Package: sphinxpackagefootnote
66
%% Version: based on footnotehyper.sty 2021/02/04 v1.1d
@@ -19,11 +19,13 @@
1919
% - \sphinxfootnotemark[N]
2020
% where N is a number.
2121
%
22-
%% Some small differences from upstream footnotehyper.sty:
22+
%% Some small differences from footnotehyper.sty 2021/02/04 v1.1d:
2323
%% - a tabulary compatibility layer (partial but enough for Sphinx),
2424
%% - usage of \spx@opt@BeforeFootnote
2525
%% - usage of \sphinxunactivateextrasandspace from sphinx.sty,
2626
%% - \sphinxlongtablepatch
27+
%% - fix for a change of babel-french at its version 3.7e 2025-08-15
28+
%% (\localleftbox undefined with pdflatex/xelatex, issue #14059)
2729
%%
2830
%% Starting with Sphinx v4.5.0, inherited footnotehyper macros for
2931
%% footnote/footnotetext receive some Sphinx specific extras to
@@ -274,8 +276,11 @@
274276
\fi
275277
}%
276278
\def\FNH@check{%
277-
\ifx\@makefntextFB\@undefined\expandafter\FNH@check@
278-
\else\expandafter\FNH@frenchb@
279+
\ifx\@makefntextFB\@undefined
280+
\expandafter\FNH@check@
281+
\else
282+
\providecommand\localleftbox[1]{}%
283+
\expandafter\FNH@frenchb@
279284
\fi
280285
}%
281286
\def\FNH@frenchb@{%

0 commit comments

Comments
 (0)