diff options
author | Karl Berry <karl@freefriends.org> | 2017-03-07 22:42:39 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2017-03-07 22:42:39 +0000 |
commit | 5a673be1e4c328c044a8bd4f2fe3ca81ed571a34 (patch) | |
tree | 45db09b47c7fd2d74189903993094529399a4f7d /Master/texmf-dist/source/latex/footnotehyper/footnotehyper.dtx | |
parent | f99cc5a22fe69fa6f1b3f864c9185ec424fd2e49 (diff) |
footnotehyper (7mar17)
git-svn-id: svn://tug.org/texlive/trunk@43424 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source/latex/footnotehyper/footnotehyper.dtx')
-rw-r--r-- | Master/texmf-dist/source/latex/footnotehyper/footnotehyper.dtx | 88 |
1 files changed, 42 insertions, 46 deletions
diff --git a/Master/texmf-dist/source/latex/footnotehyper/footnotehyper.dtx b/Master/texmf-dist/source/latex/footnotehyper/footnotehyper.dtx index 7be238bfe42..30ef0d93035 100644 --- a/Master/texmf-dist/source/latex/footnotehyper/footnotehyper.dtx +++ b/Master/texmf-dist/source/latex/footnotehyper/footnotehyper.dtx @@ -1,20 +1,20 @@ % -*- coding: utf-8; time-stamp-format: "%02d-%02m-%:y at %02H:%02M:%02S %Z" -*- %<*none> -\def\dtxtimestamp {Time-stamp: <16-02-2017 at 20:01:27 CET>} +\def\dtxtimestamp {Time-stamp: <07-03-2017 at 11:11:11 CET>} %</none> %<*!readme> %% %% Package: footnotehyper -%% Version: 0.99 (2017/02/16) +%% Version: 1.0 (2017/03/07) %% License: LPPL 1.3c %% Copyright (C) 2016-2017 Jean-Francois Burnol <jfbu at free dot fr>. %% %</!readme> %<*insfile|tex> \def\pkgname {footnotehyper} -\def\pkgdate {2017/02/16} -\def\docdate {2017/02/16} -\def\pkgversion {v0.99} +\def\pkgdate {2017/03/07} +\def\docdate {2017/03/07} +\def\pkgversion {v1.0} \def\pkgdescription {hyperref aware footnote.sty (JFB)} %</insfile|tex> %<*none> @@ -25,7 +25,7 @@ \catcode32=13\catcode`\\=12^^Brelax^^A ^^Bfirstofone{^^Bendgroup^^Bdef^^BpkgLicense^^A {% Package: footnotehyper -% Version: 0.99 (2017/02/16) +% Version: 1.0 (2017/03/07) % License: LPPL 1.3c % Copyright (C) 2016-2017 Jean-Francois Burnol <jfbu at free dot fr>. % @@ -54,7 +54,7 @@ %<*readme> <!-- --> - Source: footnotehyper.dtx (v0.99 2017/02/16) + Source: footnotehyper.dtx (v1.0 2017/03/07) Author: Jean-Francois Burnol Info: hyperref aware footnote.sty License: LPPL 1.3c @@ -81,11 +81,10 @@ in particular the incompatibility with `color/xcolor`, and with optional argument `[NUM]`. Since `v0.99` all macros are defined internally and the `footnote` package is not loaded at all. -The same user interface is kept. In case `hyperref` is absent, or -is loaded with `hyperfootnotes=false` option, `footnotehyper` -deactivates itself. The order of loading of `footnotehyper` -and `hyperref` is inconsequential. - +The same user interface is kept. Since `v1.0` it is possible to +use `footnotehyper` also in absence of `hyperref` or when the latter is +loaded with its `hyperfootnotes=false` option. The order of loading of +`footnotehyper` and `hyperref` is inconsequential. INSTALLATION ============ @@ -368,10 +367,10 @@ in particular the incompatibility with `color/xcolor`, and with optional argument `[NUM]`. Since `v0.99` all macros are defined internally and the `footnote` package is not loaded at all. -The same user interface is kept. In case `hyperref` is absent, or -is loaded with `hyperfootnotes=false` option, \fnh -deactivates itself. The order of loading of \fnh -and `hyperref` is inconsequential. +The same user interface is kept. Since `v1.0` it is possible to +use \fnh also in absence of `hyperref` or when the latter is +loaded with its `hyperfootnotes=false` option. The order of loading of +\fnh and `hyperref` is inconsequential. \end{abstract} \DeleteShortVerb{\`} @@ -384,15 +383,15 @@ and `hyperref` is inconsequential. \section{Usage} -You \emph{must} load |hyperref|\footnote{Since |v0.9e| \fnh - deactivates itself gracefully if |hyperref| is not loaded, or - under |hyperref| option |hyperfootnotes=false|.}, but it does -not matter if before or after \fnh. Since |v0.99|, \fnh does not +Since |v0.99|, \fnh does not load package |footnote.sty|\footnote{\url{http://ctan.org/pkg/footnote}} anymore, and is even incompatible with it at it uses the same user interface. +Since |v1.0|, \fnh is usable also in absence of |hyperref| or when +the latter was passed |hyperfootnotes=false| option. + The package thus provides: \begin{itemize} \item a |savenotes| environment which re-routes footnotes and delivers them at @@ -549,8 +548,8 @@ And a final footnote, done with |\begin{footnote}[57]|% \begin{footnote}[57]\csname @minipagetrue\endcsname % to reduce % framed inserted vertical spacing \begin{framed} - \noindent\fnh deactivates itself if |hyperfootnotes=false| option to - |hyperref| is detected, or if |hyperref| is not loaded at all. + \noindent\fnh works since |v1.0| also in absence of |hyperref| or when the + latter was passed |hyperfootnotes=false| option. \end{framed} \end{footnote}. There is no problem with the hyperlink, then. @@ -594,13 +593,6 @@ A few items worth of mention: |amsmath| measuring step. \end{itemize} -% During this I realized (this is unrelated to |footnote| package or -% \fnh) that there is a typesetting interference of |hyperref| with -% |babel+frenchb| in the case of the |\footnotemark[N]| syntax. \fnh -% does not fix that. I reported the problem and perhaps an upstream -% fix will come at a later date (tested with |hyperref 6.83q| and -% |frenchb 3.2c|). - \StopEventually{\end{document}\endinput} \makeatletter \let\check@percent\original@check@percent @@ -669,16 +661,18 @@ A few items worth of mention: % \item the footnote environment from |footnote.sty| does not work if used with % optional argument |[N]|. % \end{itemize} +% +% \noindent Starting with |v1.0|, \fnh may be used also in absence +% of |hyperref|. % \begin{macrocode} \newbox\FNH@notes \newdimen\FNH@width \let\FNH@colwidth\columnwidth \newif\ifFNH@savingnotes \AtBeginDocument {% - \@ifpackageloaded{hyperref} - {\ifHy@hyperfootnotes \let\FNH@latex@footnote \footnote \let\FNH@latex@footnotetext\footnotetext + \let\FNH@H@@footnotetext \@footnotetext \newenvironment{savenotes} {\FNH@savenotes\ignorespaces}{\FNH@spewnotes\ignorespacesafterend}% \let\spewnotes \FNH@spewnotes @@ -686,12 +680,13 @@ A few items worth of mention: \let\footnotetext \FNH@footnotetext \let\endfootnote \FNH@endfntext \let\endfootnotetext\FNH@endfntext - \else - \PackageInfo{footnotehyper}% - {inactive due to hyperfootnotes=false option}% - \fi}% - {\PackageWarning{footnotehyper}{^^J\@spaces\@spaces*************^^J% - \space deactivating myself as hyperref is not detected !^^J}}% + \@ifpackageloaded{hyperref} + {\ifHy@hyperfootnotes + \let\FNH@H@@footnotetext\H@@footnotetext + \else + \let\FNH@hyper@fntext\FNH@nohyp@fntext + \fi}% + {\let\FNH@hyper@fntext\FNH@nohyp@fntext}% }% % \end{macrocode} % \begin{macro}{\FNH@hyper@fntext} @@ -804,7 +799,8 @@ A few items worth of mention: % \end{macrocode} % \end{macro} % \begin{macro}{\FNH@spewnotes} -% This uses \cs{H@@footnotetext} which is the preserved original +% This uses \cs{FNH@H@@footnotetext} which is the +% \cs{H@@footnotetext} |hyperref|'s preserved original % meaning of \cs{@footnotetext} not creating a link target. % \begin{macrocode} \def\FNH@spewnotes {% @@ -815,7 +811,7 @@ A few items worth of mention: \let\@makefntext\@empty \let\@finalstrut\@gobble \let\rule\@gobbletwo - \H@@footnotetext{\unvbox\FNH@notes}% + \FNH@H@@footnotetext{\unvbox\FNH@notes}% \endgroup \fi \fi @@ -897,7 +893,7 @@ A few items worth of mention: \ifFNH@savingnotes \def\FNH@endfntext@fntext{\FNH@nohyp@fntext}% \else - \def\FNH@endfntext@fntext{\H@@footnotetext}% + \def\FNH@endfntext@fntext{\FNH@H@@footnotetext}% \fi \FNH@startfntext }% @@ -913,8 +909,8 @@ A few items worth of mention: % \cs{FNH@endfntext}. % % The \cs{FNH@endfntext@fntext} may be \cs{@footnotetext} (which will be -% \cs{FNH@hyper@fntext} in |savingnotes| environment), or -% \cs{H@@footnotetext}, or \cs{FNH@nohyp@fntext} if in |savingnotes| scope. +% \cs{FNH@hyper@fntext} in |savenotes| environment), or +% \cs{FNH@H@@footnotetext}, or \cs{FNH@nohyp@fntext} if in |savenotes| scope. % \begin{macrocode} \def\FNH@startfntext{% \setbox\z@\vbox\bgroup @@ -937,12 +933,12 @@ A few items worth of mention: % \begin{macro}{\@makefntext} % \begin{macro}{\FNH@prefntext} % \begin{macro}{\FNH@postfntext} -% The definitions of |\FNH@prefntext| and |\FNH@prefntext| (which are needed +% The definitions of |\FNH@prefntext| and |\FNH@postfntext| (which are needed % for the |footnote| environment, |\FNH@startfntext| and |\FNH@endfntext|) % are extracted from a somewhat daring analysis of |\@makefntext|. -% Contrarily to |footnote.sty|'s original code (which may cause low level -% \TeX\ -% errors in bad cases) the method here will alert the user if the argument +% Contrarily to |footnote.sty|'s original code (which may result in low level +% \TeX\ errors when the |footnote| environment is executed) +% the method here will alert the user if the argument % 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|. |