texlive[57527] Master/texmf-dist: footnotehyper (26jan21)

commits+karl at tug.org commits+karl at tug.org
Tue Jan 26 22:45:42 CET 2021


Revision: 57527
          http://tug.org/svn/texlive?view=revision&revision=57527
Author:   karl
Date:     2021-01-26 22:45:42 +0100 (Tue, 26 Jan 2021)
Log Message:
-----------
footnotehyper (26jan21)

Modified Paths:
--------------
    trunk/Master/texmf-dist/doc/latex/footnotehyper/README.md
    trunk/Master/texmf-dist/doc/latex/footnotehyper/footnotehyper.pdf
    trunk/Master/texmf-dist/doc/latex/footnotehyper/footnotehyper.tex
    trunk/Master/texmf-dist/source/latex/footnotehyper/footnotehyper.dtx
    trunk/Master/texmf-dist/tex/latex/footnotehyper/footnotehyper.sty

Modified: trunk/Master/texmf-dist/doc/latex/footnotehyper/README.md
===================================================================
--- trunk/Master/texmf-dist/doc/latex/footnotehyper/README.md	2021-01-26 00:57:35 UTC (rev 57526)
+++ trunk/Master/texmf-dist/doc/latex/footnotehyper/README.md	2021-01-26 21:45:42 UTC (rev 57527)
@@ -1,10 +1,10 @@
 <!-- -->
 
-    Source:  footnotehyper.dtx (v1.1a 2019/11/07)
+    Source:  footnotehyper.dtx (v1.1b 2021/01/26)
     Author:  Jean-Francois Burnol
     Info:    hyperref aware footnote.sty
     License: LPPL 1.3c
-    Copyright (C) 2016-2019 Jean-Francois Burnol <jfbu at free dot fr>.
+    Copyright (C) 2016-2021 Jean-Francois Burnol <jfbu at free dot fr>.
 
 ABSTRACT
 ========

Modified: trunk/Master/texmf-dist/doc/latex/footnotehyper/footnotehyper.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/footnotehyper/footnotehyper.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/footnotehyper/footnotehyper.tex	2021-01-26 00:57:35 UTC (rev 57526)
+++ trunk/Master/texmf-dist/doc/latex/footnotehyper/footnotehyper.tex	2021-01-26 21:45:42 UTC (rev 57527)
@@ -1,13 +1,13 @@
 %%
 %% Package: footnotehyper
-%% Version: 1.1a (2019/11/07)
+%% Version: 1.1b (2021/01/26)
 %% License: LPPL 1.3c
-%% Copyright (C) 2016-2019 Jean-Francois Burnol <jfbu at free dot fr>.
+%% Copyright (C) 2016-2021 Jean-Francois Burnol <jfbu at free dot fr>.
 %%
 \def\pkgname        {footnotehyper}
-\def\pkgdate        {2019/11/07}
-\def\docdate        {2019/11/07}
-\def\pkgversion     {v1.1a}
+\def\pkgdate        {2021/01/26}
+\def\docdate        {2021/01/26}
+\def\pkgversion     {v1.1b}
 \def\pkgdescription {hyperref aware footnote.sty (JFB)}
 %%
 %% run latex twice on this file footnotehyper.tex then dvipdfmx on

Modified: trunk/Master/texmf-dist/source/latex/footnotehyper/footnotehyper.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/footnotehyper/footnotehyper.dtx	2021-01-26 00:57:35 UTC (rev 57526)
+++ trunk/Master/texmf-dist/source/latex/footnotehyper/footnotehyper.dtx	2021-01-26 21:45:42 UTC (rev 57527)
@@ -1,20 +1,20 @@
 % -*- coding: utf-8; time-stamp-format: "%02d-%02m-%:y at %02H:%02M:%02S %Z" -*-
 %<*none>
-\def\dtxtimestamp {Time-stamp: <07-11-2019 at 17:09:56 CET>}
+\def\dtxtimestamp {Time-stamp: <26-01-2021 at 15:33:03 CET>}
 %</none>
 %<*!readme>
 %%
 %% Package: footnotehyper
-%% Version: 1.1a (2019/11/07)
+%% Version: 1.1b (2021/01/26)
 %% License: LPPL 1.3c
-%% Copyright (C) 2016-2019 Jean-Francois Burnol <jfbu at free dot fr>.
+%% Copyright (C) 2016-2021 Jean-Francois Burnol <jfbu at free dot fr>.
 %%
 %</!readme>
 %<*tex>
 \def\pkgname        {footnotehyper}
-\def\pkgdate        {2019/11/07}
-\def\docdate        {2019/11/07}
-\def\pkgversion     {v1.1a}
+\def\pkgdate        {2021/01/26}
+\def\docdate        {2021/01/26}
+\def\pkgversion     {v1.1b}
 \def\pkgdescription {hyperref aware footnote.sty (JFB)}
 %</tex>
 %<*none>
@@ -25,9 +25,9 @@
     \catcode32=13\catcode`\\=12^^Brelax^^A
 ^^Bfirstofone{^^Bendgroup^^Bdef^^BpkgLicense^^A
 {% Package: footnotehyper
-% Version: 1.1a (2019/11/07)
+% Version: 1.1b (2021/01/26)
 % License: LPPL 1.3c
-% Copyright (C) 2016-2019 Jean-Francois Burnol <jfbu at free dot fr>.
+% Copyright (C) 2016-2021 Jean-Francois Burnol <jfbu at free dot fr>.
 %
 % This Work may be distributed and/or modified under the conditions
 % of the LaTeX Project Public License, version 1.3c. This version of
@@ -54,11 +54,11 @@
 %<*readme>
 <!-- -->
 
-    Source:  footnotehyper.dtx (v1.1a 2019/11/07)
+    Source:  footnotehyper.dtx (v1.1b 2021/01/26)
     Author:  Jean-Francois Burnol
     Info:    hyperref aware footnote.sty
     License: LPPL 1.3c
-    Copyright (C) 2016-2019 Jean-Francois Burnol <jfbu at free dot fr>.
+    Copyright (C) 2016-2021 Jean-Francois Burnol <jfbu at free dot fr>.
 
 
 ABSTRACT
@@ -387,6 +387,31 @@
 warning is issued if the situation appears to be desperate.\footnote{original
   |footnote.sty| could end up in a low level \TeX\ error.}
 
+\begin{framed}
+  Some details: \fnh inherits from |footnote| original package the aim to
+  convert the macro |\@makefntext| into two parts, the first one to be inserted
+  at the start of a footnote in environment form, the second one at its end.
+  It thus hopes that the replacement text of |\@makefntext| contains only once
+  its parameter token |#1|, and that it is used unbraced.
+
+  \fnh has a more robust, but still naive, way of analysing this than the
+  original package. But even seemingly innocent redefinitions such as the one
+  of |beamer| which was last time I checked (that was in 2019):
+\begin{verbatim}
+macro:#1->\def \insertfootnotetext {#1}\def \insertfootnotemark
+{\@makefnmark }
+\usebeamertemplate ***{footnote}
+\end{verbatim}
+   is not compatible. Since |v1.1a|, \fnh simply aborts under |beamer| class.
+
+  The package could possibly be much improved here, but at update |v1.1b| it
+  simply adds a specific fix to handle a problem of another type arising with
+  |memoir| together with |babel-french|. This specific fix uses a bit daring
+  |\scantokens| so we have limited it to these exact circumstances. It has not
+  been thoroughly tested, please make bug reports if needed.
+\end{framed}
+
+
 It should be recalled that in case of |\footnotemark[N]| and
 |\footnotetext[N]{...}| mark-up |hyperref| creates no hyperlink. This is not
 changed by \fnh and applies also to the |\begin{footnotetext}[N]| case.
@@ -954,6 +979,10 @@
 %   of |\@makefntext| is not visible at top level in its meaning or is used
 %   there multiple times. We also insert here some code to handle especially
 %   the case of |babel-frenchb|.
+%
+%   As |\ifFBFrenchFootnotes| is not a \TeX\ boolean if |babel-frenchb| isn't
+%   loaded, we have to work around this for |\if..\fi| pairs.
+%
 %    \begin{macrocode}
 \AtBeginDocument{\let\FNH@@makefntext\@makefntext
    \ifx\@makefntextFB\undefined
@@ -963,10 +992,41 @@
    \expandafter\FNH at check@a\FNH@@makefntext{1.2!3?4,}%
                \FNH@@@1.2!3?4,\FNH@@@\relax
 }%
+%    \end{macrocode}
+%   ``Daring analysis'' is un understatement. At |v1.1b| we add a dangerous
+%   twist to fix a memoir + frenchb triggered issue: if the
+%   |\@makefntext|, as in memoir + frenchb situation, uses |\def| syntax to
+%   define a macro with parameter we had a problem with the |#| token not
+%   being doubled in the replacement fetched by
+%   |\FNH at check@a|. As expedient work-around we fix this by adding a
+%   |\scantokens| wrapper. The induced end of line space will only be from
+%   loading of \fnh itself, so we can ignore. Problem is we
+%   assume here |\@makefntext| does not rely on weird catcodes. Very
+%   problematic if LaTeX3 syntax is used. So I add a layer a security to do
+%   this \emph{only} under memoir + frenchb situation. Which is a pity
+%   as it could be more generally useful. But let's wait for bug reports if
+%   really needed.
+%
+%   Maybe I should add some user interface to customize directly what
+%   |\FNH at prefntext| and |\FNH at postfntext| do, but I am aiming today for a
+%   quick bug fix, as we are |2021/01/26| and first heard of the bug on
+%   |2020/06/15|.
+%    \begin{macrocode}
 \long\def\FNH at check@a #11.2!3?4,#2\FNH@@@#3{%
-    \ifx\relax#3\expandafter\@firstoftwo\else\expandafter\@secondoftwo\fi
-    \FNH at bad@makefntext at alert
-    {\def\FNH at prefntext{#1}\def\FNH at postfntext{#2}\FNH at check@b}%
+    \ifx\relax#3\FNH at bad@makefntext at alert
+    \else
+      \edef\FNH at 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 at prefntext{#1}\def\FNH at postfntext{#2}}%
+      \FNH at restore@
+      \expandafter\FNH at check@b
+    \fi
 }%
 \def\FNH at check@b #1\relax{%
     \expandafter\expandafter\expandafter\FNH at check@c

Modified: trunk/Master/texmf-dist/tex/latex/footnotehyper/footnotehyper.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/footnotehyper/footnotehyper.sty	2021-01-26 00:57:35 UTC (rev 57526)
+++ trunk/Master/texmf-dist/tex/latex/footnotehyper/footnotehyper.sty	2021-01-26 21:45:42 UTC (rev 57527)
@@ -23,12 +23,12 @@
 %%
 \NeedsTeXFormat{LaTeX2e}
 \ProvidesPackage{footnotehyper}%
- [2019/11/07 v1.1a hyperref aware footnote.sty (JFB)]
+ [2021/01/26 v1.1b hyperref aware footnote.sty (JFB)]
 %%
 %% Package: footnotehyper
-%% Version: 1.1a (2019/11/07)
+%% Version: 1.1b (2021/01/26)
 %% License: LPPL 1.3c
-%% Copyright (C) 2016-2019 Jean-Francois Burnol <jfbu at free dot fr>.
+%% Copyright (C) 2016-2021 Jean-Francois Burnol <jfbu at free dot fr>.
 %%
 \DeclareOption*%
     {\PackageWarning{footnotehyper}{Option `\CurrentOption' is unknown}}%
@@ -223,9 +223,20 @@
                \FNH@@@1.2!3?4,\FNH@@@\relax
 }%
 \long\def\FNH at check@a #11.2!3?4,#2\FNH@@@#3{%
-    \ifx\relax#3\expandafter\@firstoftwo\else\expandafter\@secondoftwo\fi
-    \FNH at bad@makefntext at alert
-    {\def\FNH at prefntext{#1}\def\FNH at postfntext{#2}\FNH at check@b}%
+    \ifx\relax#3\FNH at bad@makefntext at alert
+    \else
+      \edef\FNH at 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 at prefntext{#1}\def\FNH at postfntext{#2}}%
+      \FNH at restore@
+      \expandafter\FNH at check@b
+    \fi
 }%
 \def\FNH at check@b #1\relax{%
     \expandafter\expandafter\expandafter\FNH at check@c



More information about the tex-live-commits mailing list.