From 5b922b4ba99217b0ea66b210f9fb77a48071ab6d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jean-Fran=C3=A7ois=20B=2E?= <2589111+jfbu@users.noreply.github.com> Date: Sat, 15 Nov 2025 09:40:09 +0100 Subject: [PATCH] Fix #14059 (PDF build crash with French since August 2025 LaTeX) (#14060) --- CHANGES.rst | 3 +++ sphinx/texinputs/sphinxpackagefootnote.sty | 13 +++++++++---- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/CHANGES.rst b/CHANGES.rst index f0f94fda39..a269c087d0 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -137,6 +137,9 @@ Bugs fixed * #14004: Fix :confval:`autodoc_type_aliases` when they appear in PEP 604 union syntax (``Alias | Type``). Patch by Tamika Nomara. +* #14059: LaTeX: Footnotes cause pdflatex error with French language + (since August 2025 upstream change to LaTeX French support). + Patch by Jean-François B. Testing diff --git a/sphinx/texinputs/sphinxpackagefootnote.sty b/sphinx/texinputs/sphinxpackagefootnote.sty index 7f2e291387..817c45e43c 100644 --- a/sphinx/texinputs/sphinxpackagefootnote.sty +++ b/sphinx/texinputs/sphinxpackagefootnote.sty @@ -1,6 +1,6 @@ \NeedsTeXFormat{LaTeX2e} \ProvidesPackage{sphinxpackagefootnote}% - [2024/05/17 v7.3.x Sphinx custom footnotehyper package (Sphinx team)] + [2025/11/15 v8.3.0 Sphinx custom footnotehyper package (Sphinx team)] %% %% Package: sphinxpackagefootnote %% Version: based on footnotehyper.sty 2021/02/04 v1.1d @@ -19,11 +19,13 @@ % - \sphinxfootnotemark[N] % where N is a number. % -%% Some small differences from upstream footnotehyper.sty: +%% Some small differences from footnotehyper.sty 2021/02/04 v1.1d: %% - a tabulary compatibility layer (partial but enough for Sphinx), %% - usage of \spx@opt@BeforeFootnote %% - usage of \sphinxunactivateextrasandspace from sphinx.sty, %% - \sphinxlongtablepatch +%% - fix for a change of babel-french at its version 3.7e 2025-08-15 +%% (\localleftbox undefined with pdflatex/xelatex, issue #14059) %% %% Starting with Sphinx v4.5.0, inherited footnotehyper macros for %% footnote/footnotetext receive some Sphinx specific extras to @@ -274,8 +276,11 @@ \fi }% \def\FNH@check{% - \ifx\@makefntextFB\@undefined\expandafter\FNH@check@ - \else\expandafter\FNH@frenchb@ + \ifx\@makefntextFB\@undefined + \expandafter\FNH@check@ + \else + \providecommand\localleftbox[1]{}% + \expandafter\FNH@frenchb@ \fi }% \def\FNH@frenchb@{%