diff options
author | Karl Berry <karl@freefriends.org> | 2011-09-05 23:29:01 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2011-09-05 23:29:01 +0000 |
commit | 9f0b84a2f5a8abb83327701668f335049ad287cb (patch) | |
tree | 5699debd04bb9ffa6d6fc6d9a2ee6188023c5466 /Master/texmf-dist/source | |
parent | b75ddb92b4bc5135cdf583ff71bd1dc29ba48ba6 (diff) |
filehook (5sep11)
git-svn-id: svn://tug.org/texlive/trunk@23832 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source')
-rw-r--r-- | Master/texmf-dist/source/latex/filehook/filehook.dtx | 61 |
1 files changed, 25 insertions, 36 deletions
diff --git a/Master/texmf-dist/source/latex/filehook/filehook.dtx b/Master/texmf-dist/source/latex/filehook/filehook.dtx index 25b7fdebe91..2feb5425f91 100644 --- a/Master/texmf-dist/source/latex/filehook/filehook.dtx +++ b/Master/texmf-dist/source/latex/filehook/filehook.dtx @@ -19,7 +19,7 @@ %% This work consists of the files filehook.dtx, filehook.ins %% and the derived file filehook.sty. %% -%% $Id: filehook.dtx 2252 2011-03-09 19:21:15Z martin $ +%% $Id: filehook.dtx 2504 2011-07-18 17:22:50Z martin $ % \fi % % \iffalse @@ -29,20 +29,15 @@ %<package>\NeedsTeXFormat{LaTeX2e}[1999/12/01] %<package>\ProvidesPackage{filehook} %<*package> - [2011/03/09 v0.5a Hooks for input files] + [2011/07/18 v0.5b Hooks for input files] %</package> % %<*driver> -\documentclass{ydoc}[2011/01/09] -\usepackage{filehook}[2011/01/09] -\usepackage{ifpdf} -\usepackage{hyperref} -\usepackage{array} -\usepackage{booktabs} +\documentclass{ydoc}[2011/03/19] +\usepackage{filehook}[2011/07/18] \EnableCrossrefs \CodelineIndex \RecordChanges -\providecommand*\pkg{\texttt} \makeatletter \providecommand*\tablecaption{% \@tempdima=\abovecaptionskip @@ -60,7 +55,7 @@ %</driver> % \fi % -% \CheckSum{977} +% \CheckSum{989} % % \CharacterTable % {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z @@ -97,30 +92,15 @@ % } % \changes{v0.5}{2011/01/09}{Added PGF key interface for hooks. Added macro to clear hooks.} % \changes{v0.5a}{2011/03/09}{Added required \string\long\space to an internal macro.} +% \changes{v0.5b}{2011/07/18}{Replaced \cs{@nameuse} for use with eTeX code to avoid the definition of non-existing hooks to \cs{relax}.} % % \GetFileInfo{filehook.dtx} % % \DoNotIndex{\newcommand,\newenvironment} % -% \ifpdf -% \hypersetup{% -% pdfauthor = {Martin Scharrer <martin@scharrer-online.de>}, -% pdftitle = {The filehook package}, -% pdfsubject = {Documentation of LaTeX package 'filehook'}, -% pdfkeywords = {current filename, filename, file, name, LaTeX, TeX} -% }% -% \fi -% \clearpage -% \null -% \vspace*{-2em} -% \begin{center} -% {\LARGE\sffamily The \emph{filehook} Package\\[\medskipamount]} -% {\large Martin Scharrer \\[\medskipamount]\normalsize -% \url{martin@scharrer-online.de}\\[.8ex] -% \url{http://www.ctan.org/pkg/filehook/}\\[\bigskipamount]} -% {\large Version \fileversion\ -- \filedate}\\ -% \end{center} -% \vspace{1.2em}% +% \author{Martin Scharrer} +% \email{martin@scharrer-online.de} +% \maketitle % % \begin{abstract} % This package provides hooks for input files. Document and package authors can use these hooks to @@ -539,11 +519,20 @@ % \subsection{Initialisation of Hooks} % The general hooks are initialised to call the file specific hooks. % +% +% \begin{macrocode} +\@ifpackageloaded{etoolbox}{% + \let\filehook@csuse\csuse +}{% + \def\filehook@csuse#1{\ifcsname #1\endcsname\csname #1\expandafter\endcsname\fi} +} +% \end{macrocode} +% % \begin{macro}{\filehook@include@atbegin} % \begin{macrocode} \def\filehook@include@atbegin#1{% \let\InputIfFileExists\filehook@@InputIfFileExists - \@nameuse{\filehook@include@atbegin@#1}% + \filehook@csuse{\filehook@include@atbegin@#1}% \filehook@include@@atbegin } % \end{macrocode} @@ -559,7 +548,7 @@ % \begin{macrocode} \def\filehook@include@atend#1{% \filehook@include@@atend - \@nameuse{\filehook@include@atend@#1}% + \filehook@csuse{\filehook@include@atend@#1}% } % \end{macrocode} % \end{macro} @@ -574,7 +563,7 @@ % \begin{macrocode} \def\filehook@include@after#1{% \filehook@include@@after - \@nameuse{\filehook@include@after@#1}% + \filehook@csuse{\filehook@include@after@#1}% } % \end{macrocode} % \end{macro} @@ -589,7 +578,7 @@ % \begin{macrocode} \def\filehook@input@atbegin#1{% \let\InputIfFileExists\filehook@@InputIfFileExists - \@nameuse{\filehook@input@atbegin@\filehook@ensureext{#1}}% + \filehook@csuse{\filehook@input@atbegin@\filehook@ensureext{#1}}% \filehook@input@@atbegin } % \end{macrocode} @@ -605,7 +594,7 @@ % \begin{macrocode} \def\filehook@input@atend#1{% \filehook@input@@atend - \@nameuse{\filehook@input@atend@\filehook@ensureext{#1}}% + \filehook@csuse{\filehook@input@atend@\filehook@ensureext{#1}}% } % \end{macrocode} % \end{macro} @@ -619,7 +608,7 @@ % \begin{macro}{\filehook@atbegin} % \begin{macrocode} \def\filehook@atbegin#1{% - \@nameuse{\filehook@atbegin@\filehook@ensureext{#1}}% + \filehook@csuse{\filehook@atbegin@\filehook@ensureext{#1}}% \filehook@@atbegin } % \end{macrocode} @@ -635,7 +624,7 @@ % \begin{macrocode} \def\filehook@atend#1{% \filehook@@atend - \@nameuse{\filehook@atend@\filehook@ensureext{#1}}% + \filehook@csuse{\filehook@atend@\filehook@ensureext{#1}}% } % \end{macrocode} % \end{macro} |