From 51d9d5fd2716b73ae6ab6ce10d90e756ffe4c632 Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Fri, 13 Jul 2012 23:19:39 +0000 Subject: new latex package footnotebackref (1jul12) git-svn-id: svn://tug.org/texlive/trunk@27034 c570f23f-e606-0410-a88d-b1316a301751 --- Master/texmf-dist/doc/latex/footnotebackref/README | 11 +++ .../doc/latex/footnotebackref/footnotebackref.pdf | Bin 0 -> 119384 bytes .../doc/latex/footnotebackref/footnotebackref.tex | 35 ++++++++++ .../tex/latex/footnotebackref/footnotebackref.sty | 77 +++++++++++++++++++++ Master/tlpkg/bin/tlpkg-ctan-check | 3 +- Master/tlpkg/libexec/ctan2tds | 1 + Master/tlpkg/tlpsrc/collection-latexextra.tlpsrc | 1 + Master/tlpkg/tlpsrc/footnotebackref.tlpsrc | 0 8 files changed, 127 insertions(+), 1 deletion(-) create mode 100644 Master/texmf-dist/doc/latex/footnotebackref/README create mode 100644 Master/texmf-dist/doc/latex/footnotebackref/footnotebackref.pdf create mode 100644 Master/texmf-dist/doc/latex/footnotebackref/footnotebackref.tex create mode 100644 Master/texmf-dist/tex/latex/footnotebackref/footnotebackref.sty create mode 100644 Master/tlpkg/tlpsrc/footnotebackref.tlpsrc (limited to 'Master') diff --git a/Master/texmf-dist/doc/latex/footnotebackref/README b/Master/texmf-dist/doc/latex/footnotebackref/README new file mode 100644 index 00000000000..25497f21697 --- /dev/null +++ b/Master/texmf-dist/doc/latex/footnotebackref/README @@ -0,0 +1,11 @@ +README for footnotebackref, 2012/07/01 + +This work may be distributed and/or modified under the +conditions of the LaTeX Project Public License, either version 1.3 +of this license or (at your option) any later version. +The latest version of this license is in + http://www.latex-project.org/lppl.txt +and version 1.3 or later is part of all distributions of LaTeX +version 2005/12/01 or later. + +The footnotebackref package allows the creation of hyperlinks from the footnote at the bottom of the page back to the occurence of the footnote in the main text. The references and hyperlinks are created by the hyperref package. diff --git a/Master/texmf-dist/doc/latex/footnotebackref/footnotebackref.pdf b/Master/texmf-dist/doc/latex/footnotebackref/footnotebackref.pdf new file mode 100644 index 00000000000..8520b89857e Binary files /dev/null and b/Master/texmf-dist/doc/latex/footnotebackref/footnotebackref.pdf differ diff --git a/Master/texmf-dist/doc/latex/footnotebackref/footnotebackref.tex b/Master/texmf-dist/doc/latex/footnotebackref/footnotebackref.tex new file mode 100644 index 00000000000..e90485181a1 --- /dev/null +++ b/Master/texmf-dist/doc/latex/footnotebackref/footnotebackref.tex @@ -0,0 +1,35 @@ +\documentclass{article} +\usepackage{footnotebackref} + +\begin{document} + +\title{The \texttt{footnotebackref} package\\\large Back referencing from footnotes}% +\author{Holger Lange}% +\date{\today}% +\maketitle + +\section{Introduction} +The \texttt{footnotebackref} package allows the creation of hyperlinks from the footnote at the bottom of the page back to the occurence of the footnote in the main text. The references and hyperlinks are created by the \texttt{hyperref} package. + +\section{Usage and Options} +To use the package just type \verb+\usepackage{footnotebackref}+ in the preamble of the document. +There are two options to format the links: +\begin{quote} + \begin{tabular}{lp{0.33\paperwidth}} + \texttt{symbol} & Hyperlinked symbol between the footnotenumber and the footnotetext (e.\,g. $\uparrow$, $\bigtriangleup$ or $\wedge$).\newline Default: \emph{no symbol}\\ + \texttt{numberlinked} & This boolean indicates whether the footnotenumber is also a hyperlink or not.\newline Default: true + \end{tabular} +\end{quote} +The package options are specified as key value pairs (\texttt{optionname=value}). If they are omitted the default values are used.\footnote{The default behaviour is like this footnote: There is no additionally symbol and the footnotenumber is a hyperlink to the occurence of the footnote in the main text.} + +\section{Example} +The example shows an included symbol as hyperlink. +\begin{verbatim} +\documentclass{article} +\usepackage[symbol=$\wedge$,numberlinked=false]{footnotebackref} +\begin{document} +Some text with a footnote\footnote{The first footnote.}\\ +Text with the second footnote\footnote[4]{The second footnote.} +\end{document} +\end{verbatim} +\end{document} diff --git a/Master/texmf-dist/tex/latex/footnotebackref/footnotebackref.sty b/Master/texmf-dist/tex/latex/footnotebackref/footnotebackref.sty new file mode 100644 index 00000000000..9f2a7be5f91 --- /dev/null +++ b/Master/texmf-dist/tex/latex/footnotebackref/footnotebackref.sty @@ -0,0 +1,77 @@ +%File: footnotebackref.sty +% Copyright (C) 2012 Holger Lange +% +% +% This work may be distributed and/or modified under the +% conditions of the LaTeX Project Public License, either version 1.3 +% of this license or (at your option) any later version. +% The latest version of this license is in +% http://www.latex-project.org/lppl.txt +% and version 1.3 or later is part of all distributions of LaTeX +% version 2005/12/01 or later. + +\NeedsTeXFormat{LaTeX2e}[2011/06/27] +\ProvidesPackage{footnotebackref}% + [2012/07/01 v1.0 Backreferences for footnotes (Holger Lange)] + +% This package was inspired by http://tex.stackexchange.com/a/40282 + +\RequirePackage{letltxmacro} +\RequirePackage{hyperref} +\RequirePackage{kvoptions}[2010/12/23]% v3.10 + +\SetupKeyvalOptions{family=FootnoteBackref, prefix=FootnoteBackref@} + +% The symbol between the footnotenumber and the footnotetext +% If empty no symbol will be printed +\DeclareStringOption{symbol} + +% Option to hyperlink the footnotenumber +\DeclareBoolOption[true]{numberlinked} +\ProcessKeyvalOptions* + +% A new counter to create an unambiguous label-tag for all hyperfootnotes +\newcounter{BackrefHyperFootnoteCounter} + +% Store the original LaTeX footnote macros to separate macros +\LetLtxMacro{\BHFN@OldFootnote}{\footnote} +\LetLtxMacro{\BHFN@OldMakefntext}{\@makefntext} + +% Redefine the original footnote macro to +% branch between the footnote with/without optional argument +\renewcommand*\footnote{% + \refstepcounter{BackrefHyperFootnoteCounter}% + \edef\BackrefFootnoteTag{bhfn:\theBackrefHyperFootnoteCounter}% + \label{\BackrefFootnoteTag}% + \@ifnextchar[\Backref@OptHyperFootnote\Backref@HyperFootnote} + +% Define an new footnote without optional argument +\newcommand\Backref@HyperFootnote[1]{% + \BHFN@OldFootnote{\Backref@HyperSymbol#1}} + +% Define an new footnote with optional argument +\newcommand\Backref@OptHyperFootnote[2][\empty]{% + \BHFN@OldFootnote[#1]{\Backref@HyperSymbol#2}} + +% Definition of the hyperlinked symbol ... +\newcommand\Backref@HyperSymbol{% + \hyperref[\BackrefFootnoteTag]{\FootnoteBackref@symbol}} + +% ...but if the symbol is empty it is deleted straightaway +\ifx\FootnoteBackref@symbol\empty + \renewcommand\Backref@HyperSymbol\relax\fi + +% If the footnote number should be the reference +% than redefine the \@makefntext and \@makefnmark +% The \@makefnmark macro is redefined in the space of +% the \@makefntext macro +% So the footnote numbers in the main text are not influenced +\ifFootnoteBackref@numberlinked + \renewcommand\@makefntext[1]{% + \renewcommand\@makefnmark{% + \mbox{\textsuperscript{\normalfont% + \hyperref[\BackrefFootnoteTag]{\@thefnmark}}}\,}% + \BHFN@OldMakefntext{#1}}% +\fi + +\endinput diff --git a/Master/tlpkg/bin/tlpkg-ctan-check b/Master/tlpkg/bin/tlpkg-ctan-check index 86bd9d85569..dcc638b825d 100755 --- a/Master/tlpkg/bin/tlpkg-ctan-check +++ b/Master/tlpkg/bin/tlpkg-ctan-check @@ -175,7 +175,8 @@ my @TLP_working = qw( foekfont foilhtml fonetika font-change fontaxes fontbook fontch fontinst fontools fonts-tlwg fontspec fonttable fontwrap - footbib footmisc footnoterange footnpag forarray forloop formlett formular + footbib footmisc footnotebackref footnoterange footnpag + forarray forloop formlett formular fouridx fourier fouriernc fp fpl fragmaster fragments frame framed frankenstein frcursive diff --git a/Master/tlpkg/libexec/ctan2tds b/Master/tlpkg/libexec/ctan2tds index a88f8e3db1c..c2bb4b6a5a7 100755 --- a/Master/tlpkg/libexec/ctan2tds +++ b/Master/tlpkg/libexec/ctan2tds @@ -606,6 +606,7 @@ chomp ($Build = `cd $Master/../Build/source && pwd`); 'mimetex', "die 'skipping, CGI'", 'miniltx', "die 'skipping, use graphics-pln'", 'minionpro', "die 'skipping, requires nonfree minion'", + 'minion2newtx',"die 'skipping, requires nonfree minion'", 'misc', "&MAKEmisc", 'mk', "die 'skipping, not self-locating, must not usurp two-character cmd name'", 'mkbangtex', "die 'skipping, no copyright (and python)'", diff --git a/Master/tlpkg/tlpsrc/collection-latexextra.tlpsrc b/Master/tlpkg/tlpsrc/collection-latexextra.tlpsrc index 397007234ae..ad14827ddac 100644 --- a/Master/tlpkg/tlpsrc/collection-latexextra.tlpsrc +++ b/Master/tlpkg/tlpsrc/collection-latexextra.tlpsrc @@ -280,6 +280,7 @@ depend foilhtml depend fontaxes depend fonttable depend footmisc +depend footnotebackref depend footnoterange depend footnpag depend forarray diff --git a/Master/tlpkg/tlpsrc/footnotebackref.tlpsrc b/Master/tlpkg/tlpsrc/footnotebackref.tlpsrc new file mode 100644 index 00000000000..e69de29bb2d -- cgit v1.2.3