Skip to content

Commit

Permalink
Merge pull request #8765 from jfbu/latex_memoir_french_footnote
Browse files Browse the repository at this point in the history
LaTeX: sync with upstream footnotehyper
  • Loading branch information
tk0miya authored Jan 27, 2021
2 parents fb4dde3 + 9d706b6 commit 62dad2f
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 6 deletions.
2 changes: 2 additions & 0 deletions CHANGES
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,8 @@ Bugs fixed
* #8683: :confval:`html_last_updated_fmt` generates wrong time zone for %Z
* #1112: ``download`` role creates duplicated copies when relative path is
specified
* #7576: LaTeX with French babel and memoir crash: "Illegal parameter number
in definition of ``\FNH@prefntext``"
* #8214: LaTeX: The :rst:role:`index` role and the glossary generate duplicate
entries in the LaTeX index (if both used for same term)
* #8735: LaTeX: wrong internal links in pdf to captioned code-blocks when
Expand Down
23 changes: 17 additions & 6 deletions sphinx/texinputs/footnotehyper-sphinx.sty
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{footnotehyper-sphinx}%
[2017/10/27 v1.7 hyperref aware footnote.sty for sphinx (JFB)]
[2021/01/26 v1.1b hyperref aware footnote.sty for sphinx (JFB)]
%%
%% Package: footnotehyper-sphinx
%% Version: based on footnotehyper.sty 2017/03/07 v1.0
%% Version: based on footnotehyper.sty 2021/01/26 v1.1b
%% as available at https://www.ctan.org/pkg/footnotehyper
%% License: the one applying to Sphinx
%%
Expand All @@ -16,7 +16,7 @@
%% 3. use of \sphinxunactivateextrasandspace from sphinx.sty,
%% 4. macro definition \sphinxfootnotemark,
%% 5. macro definition \sphinxlongtablepatch
%% 6. replaced an \undefined by \@undefined
%% 6. replaced some \undefined by \@undefined
\DeclareOption*{\PackageWarning{footnotehyper-sphinx}{Option `\CurrentOption' is unknown}}%
\ProcessOptions\relax
\newbox\FNH@notes
Expand Down Expand Up @@ -206,9 +206,20 @@
\FNH@@@1.2!3?4,\FNH@@@\relax
}%
\long\def\FNH@check@a #11.2!3?4,#2\FNH@@@#3{%
\ifx\relax#3\expandafter\@firstoftwo\else\expandafter\@secondoftwo\fi
\FNH@bad@makefntext@alert
{\def\FNH@prefntext{#1}\def\FNH@postfntext{#2}\FNH@check@b}%
\ifx\relax#3\FNH@bad@makefntext@alert
\else
\edef\FNH@restore@{\catcode`\noexpand\@\the\catcode`\@\relax}%
\makeatletter
\ifx\@makefntextFB\@undefined
\expandafter\@gobble\else\expandafter\@firstofone\fi
{\@ifclassloaded{memoir}%
{\ifFBFrenchFootnotes\expandafter\@gobble\fi}%
{}}%
\@secondoftwo
\scantokens{\def\FNH@prefntext{#1}\def\FNH@postfntext{#2}}%
\FNH@restore@
\expandafter\FNH@check@b
\fi
}%
\def\FNH@check@b #1\relax{%
\expandafter\expandafter\expandafter\FNH@check@c
Expand Down

0 comments on commit 62dad2f

Please sign in to comment.