summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex')
-rw-r--r--Master/texmf-dist/tex/latex/currfile/currfile.sty55
1 files changed, 49 insertions, 6 deletions
diff --git a/Master/texmf-dist/tex/latex/currfile/currfile.sty b/Master/texmf-dist/tex/latex/currfile/currfile.sty
index 4c0853abe79..cc8d3c63dfe 100644
--- a/Master/texmf-dist/tex/latex/currfile/currfile.sty
+++ b/Master/texmf-dist/tex/latex/currfile/currfile.sty
@@ -18,15 +18,36 @@
%% This work consists of the files currfile.dtx, currfile.ins
%% and the derived file currfile.sty.
%%
-%% $Id: standalone.dtx 1803 2010-04-03 13:59:44Z martin $
+%% $Id: currfile.dtx 1911 2010-12-08 19:29:13Z martin $
\NeedsTeXFormat{LaTeX2e}[1999/12/01]
\ProvidesPackage{currfile}
- [2010/04/08 v0.1 Current input file name and path]
+ [2010/12/08 v0.2 Current input file name and path]
\RequirePackage{kvoptions}
\SetupKeyvalOptions{family=currfile,prefix=currfile@}
-\DeclareStringOption[tex]{mainext}
-\DeclareStringOption[]{maindir}
+
+\@ifl@aded{\@pkgextension}{fink}{%
+ \DeclareStringOption[\fnk@mainext]{mainext}%
+ \DeclareStringOption[\fnk@maindir]{maindir}%
+ \DeclareBoolOption[true]{fink}%
+ \PackageWarning{currfile}{Package 'fink' detected. %
+ The 'fink' option will default to 'true'. %
+ If set to 'false' no 'fink' macros will be changed but they will stop
+ working correctly!}{}{}{}%
+}{%
+ \DeclareStringOption[tex]{mainext}%
+ \DeclareStringOption[\@currdir]{maindir}%
+ \DeclareBoolOption[false]{fink}%
+}%
\ProcessKeyvalOptions*\relax
+
+\begingroup
+\xdef\currfile@mainext{\currfile@mainext}%
+\xdef\currfile@maindir{\currfile@maindir}%
+\def\@tempa{./}%
+\ifx\@tempa\currfile@maindir
+ \global\let\currfile@maindir\empty
+\fi
+\endgroup
\RequirePackage{filehook}
\filehook@prefixwarg\filehook@include@atbegin{%
\currfile@push
@@ -35,11 +56,11 @@
\filehook@appendwarg\filehook@include@after{%
\currfile@pop
}
-\filehook@prefixwarg\filehook@input@atbegin{%
+\filehook@prefixwarg\filehook@atbegin{%
\currfile@push
\currfile@set{#1}%
}
-\filehook@appendwarg\filehook@input@atend{%
+\filehook@appendwarg\filehook@atend{%
\currfile@pop
}
\def\currfile@set#1{%
@@ -80,6 +101,28 @@
\currfile@set{\currfile@maindir\jobname.\currfile@mainext}
\currfile@push
\let\currfile@stackinit\currfile@stack
+\ifcurrfile@fink
+ \def\finkfile{\currfilename}%
+ \def\finkdir{\currfiledir}%
+ \def\finkpath{\currfilepath}%
+ \def\finkbase{\currfilebase}%
+ \def\finkext{\currfileext}%
+ \@ifl@aded{\@pkgextension}{fink}{%
+ \def\fink@restore#1{}%
+ }{%
+ \@namedef{ver@fink.sty}{2010/12/06}%
+ \expandafter\edef\csname opt@fink.sty\endcsname{%
+ maindir=\currfile@maindir,mainext=\currfile@mainext
+ }%
+ }%
+\else
+ \@ifl@aded{\@pkgextension}{fink}{}{%
+ \AtBeginOfFile{fink.sty}{%
+ \PackageError{currfile}{Package class with deprecated 'fink'. %
+ Load 'currfile' with the 'fink' option or see the upgrade guide in the manual}{}{}{}%
+ }%
+ }%
+\fi
\endinput
%%
%% End of file `currfile.sty'.