summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/currfile
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2013-02-02 22:45:57 +0000
committerKarl Berry <karl@freefriends.org>2013-02-02 22:45:57 +0000
commitd458d00175b906eac75243fcc99d8867115b7751 (patch)
tree60843d9cd14a2b24cd9cedb72c8d6d5e6cf49b0f /Master/texmf-dist/tex/latex/currfile
parent05feb8ba1f91b7ff8d584fcc7b8497e76b58be5c (diff)
currfile (2feb13)
git-svn-id: svn://tug.org/texlive/trunk@29012 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/currfile')
-rw-r--r--Master/texmf-dist/tex/latex/currfile/currfile-abspath.sty4
-rw-r--r--Master/texmf-dist/tex/latex/currfile/currfile.sty38
2 files changed, 29 insertions, 13 deletions
diff --git a/Master/texmf-dist/tex/latex/currfile/currfile-abspath.sty b/Master/texmf-dist/tex/latex/currfile/currfile-abspath.sty
index 01e37626b0c..df969069c26 100644
--- a/Master/texmf-dist/tex/latex/currfile/currfile-abspath.sty
+++ b/Master/texmf-dist/tex/latex/currfile/currfile-abspath.sty
@@ -1,7 +1,7 @@
\NeedsTeXFormat{LaTeX2e}[1999/12/01]
\ProvidesPackage{currfile-abspath}[%
- 2012/10/28
- v0.7a
+ 2013/02/01
+ v0.7b
Provides absolute file paths, the parent working directory and the main file name]
\newcommand*\thepwd{}
\newcommand*\theabspath{}
diff --git a/Master/texmf-dist/tex/latex/currfile/currfile.sty b/Master/texmf-dist/tex/latex/currfile/currfile.sty
index be5358989e5..904e57cd3cd 100644
--- a/Master/texmf-dist/tex/latex/currfile/currfile.sty
+++ b/Master/texmf-dist/tex/latex/currfile/currfile.sty
@@ -1,7 +1,7 @@
\NeedsTeXFormat{LaTeX2e}[1999/12/01]
\ProvidesPackage{currfile}[%
- 2012/10/28
- v0.7a
+ 2013/02/01
+ v0.7b
Provides the file path elements of the current input file]
\RequirePackage{kvoptions}
\SetupKeyvalOptions{family=currfile,prefix=currfile@}
@@ -108,18 +108,34 @@
\def\currfile@checkpath{%
\openin\@inputcheck\@filef@und\relax
\ifeof\@inputcheck
- \expandafter\@tfor
- \expandafter\@tempb
- \expandafter:\expandafter=\input@path\do{%
- \openin\@inputcheck\@tempb\@filef@und\relax
- \ifeof\@inputcheck\else
- \edef\@filef@und{\@tempb\@filef@und}%
- \@break@tfor
- \fi
- }%
+ \currfile@check@inputpath
\fi
\closein\@inputcheck
}
+\def\currfile@check@inputpath{%
+ \expandafter\@tfor
+ \expandafter\@tempb
+ \expandafter:\expandafter=\input@path\do{%
+ \openin\@inputcheck\@tempb\@filef@und\relax
+ \ifeof\@inputcheck\else
+ \edef\@filef@und{\@tempb\@filef@und}%
+ \@break@tfor
+ \fi
+ }%
+}
+\AtEndOfPackageFile*{import}{%
+\def\currfile@checkpath{%
+ \ifx\IfFileExists\@iffileonpath
+ \currfile@check@inputpath
+ \else
+ \openin\@inputcheck\@filef@und\relax
+ \ifeof\@inputcheck
+ \currfile@check@inputpath
+ \fi
+ \fi
+ \closein\@inputcheck
+}%
+}
\begingroup
\@makeother{.}
\gdef\currfile@parseext#1.#2\\{%