From 336e2e61d697ff9b25fb217f84225290fd9a369a Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Wed, 6 Aug 2008 23:39:25 +0000 Subject: inversepath update (6aug08) git-svn-id: svn://tug.org/texlive/trunk@10125 c570f23f-e606-0410-a88d-b1316a301751 --- Master/texmf-dist/doc/latex/inversepath/README | 4 +-- .../doc/latex/inversepath/inversepath.pdf | Bin 80304 -> 80693 bytes .../source/latex/inversepath/inversepath.dtx | 39 +++++++++++++-------- .../source/latex/inversepath/inversepath.ins | 12 +++---- .../tex/latex/inversepath/inversepath.sty | 18 ++++++---- 5 files changed, 43 insertions(+), 30 deletions(-) (limited to 'Master/texmf-dist') diff --git a/Master/texmf-dist/doc/latex/inversepath/README b/Master/texmf-dist/doc/latex/inversepath/README index 2db7a52f6a5..83be94658c2 100644 --- a/Master/texmf-dist/doc/latex/inversepath/README +++ b/Master/texmf-dist/doc/latex/inversepath/README @@ -1,6 +1,6 @@ _______________________ The INVERSEPATH package -v0.1 +v0.2 Calculate inverse relative paths in LaTeX. E.g., from "/one/two/three.tex" or "/one/two/" to "../../". @@ -8,4 +8,4 @@ Could be easily converted to Plain TeX if I wasn't lazy. ______________ Will Robertson -2007 +2007-2008 diff --git a/Master/texmf-dist/doc/latex/inversepath/inversepath.pdf b/Master/texmf-dist/doc/latex/inversepath/inversepath.pdf index 3fe424c946b..65abf57d733 100644 Binary files a/Master/texmf-dist/doc/latex/inversepath/inversepath.pdf and b/Master/texmf-dist/doc/latex/inversepath/inversepath.pdf differ diff --git a/Master/texmf-dist/source/latex/inversepath/inversepath.dtx b/Master/texmf-dist/source/latex/inversepath/inversepath.dtx index 61d617fe5dc..6bf047bccc2 100644 --- a/Master/texmf-dist/source/latex/inversepath/inversepath.dtx +++ b/Master/texmf-dist/source/latex/inversepath/inversepath.dtx @@ -1,6 +1,6 @@ % \iffalse meta-comment % -% Copyright 2007 by Will Robertson +% Copyright 2007-2008 by Will Robertson % % Distributable under the LaTeX Project Public License, % version 1.3c or higher (your choice). The latest version of @@ -21,8 +21,8 @@ \keepsilent \preamble - __________________________________ - Copyright (C) 2007 Will Robertson + _______________________________________ + Copyright (C) 2007-2008 Will Robertson License information appended. @@ -30,7 +30,7 @@ \endpreamble \postamble -Copyright (C) 2006 by Will Robertson +Copyright (C) 2007-2008 by Will Robertson Distributable under the LaTeX Project Public License, version 1.3c or higher (your choice). The latest version of @@ -73,7 +73,7 @@ This work consists of the file \jobname.dtx %<*readme> _______________________ The INVERSEPATH package -v0.1 +v0.2 Calculate inverse relative paths in LaTeX. E.g., from "/one/two/three.tex" or "/one/two/" to "../../". @@ -81,7 +81,7 @@ Could be easily converted to Plain TeX if I wasn't lazy. ______________ Will Robertson -2007 +2007-2008 % % % \fi @@ -108,7 +108,9 @@ Will Robertson % % \bigskip % {\centering\noindent -% \cmd\inversepath\marg{path} --- expands to the inverse of \meta{path}.\par} +% \cmd\inversepath\marg{path} --- prints the inverse of \meta{path}.\par} +% {\centering\noindent +% \cmd{\inversepath*}\marg{path} --- calculates the inverse of \meta{path}.\par} % % \bigskip % {\raggedleft\noindent @@ -117,14 +119,16 @@ Will Robertson % % \noindent Regular usage: % \begin{example}{} -% \inversepath{one/two/three/four.tex}\par +% \inversepath*{one/two/three/four.tex}\par +% \ip@inversepath\par % \ip@lastelement\par % \ip@directpath % \end{example} % % \noindent Expands to \meta{empty} if the relative path is the same directory: % \begin{example}{} -% [\inversepath{one.tex}]\par +% [\inversepath*{one.tex}]\par +% \ip@inversepath\par % \ip@lastelement\par % [\ip@directpath] % \end{example} @@ -133,12 +137,12 @@ Will Robertson % \begin{example}{} % \absolutepath{/xyz/here/there/everywhere/} % -% \inversepath{../../one/two/three.tex}\par +% \inversepath*{../../one/two/three.tex}\par +% \ip@inversepath\par % \ip@lastelement\par % \ip@directpath % \end{example} % -% \noindent That's it! % % \StopEventually{} % @@ -149,12 +153,14 @@ Will Robertson % This is the package. % \begin{macrocode} \ProvidesPackage{inversepath} - [26/04/2007 v0.1 Inverse relative paths] + [2008/07/31 v0.2 Inverse relative paths] % \end{macrocode} % \begin{macro}{\inversepath} % \darg{Path to invert} % \begin{macrocode} -\newcommand\inversepath[1]{% +\newcommand\inversepath{% + \@ifstar{\inversepath@star}{\inversepath@nostar}} +\newcommand\inversepath@star[1]{% % \end{macrocode} % \cmd\ip@jobpath\ is preserved to restore after truncation for % back-relative paths. @@ -163,9 +169,12 @@ Will Robertson \let\ip@directpath\@empty \let\ip@inversepath\@empty \ip@strippath#1/\@nil/% - \let\ip@jobpath\ip@origjobpath - \ip@inversepath} + \let\ip@jobpath\ip@origjobpath} +\newcommand\inversepath@nostar[1]{% + \inversepath@star{#1}% + \let\ip@jobpath\ip@origjobpath} % \end{macrocode} +% \changes{v0.2}{2008/07/31}{Starred form to not print the output. What was I thinking?} % \end{macro} % \begin{macro}{\absolutepath} % \darg{Absolute path used for calculating parent/sibling relative paths.} diff --git a/Master/texmf-dist/source/latex/inversepath/inversepath.ins b/Master/texmf-dist/source/latex/inversepath/inversepath.ins index 94f81096584..b07b233aa7f 100644 --- a/Master/texmf-dist/source/latex/inversepath/inversepath.ins +++ b/Master/texmf-dist/source/latex/inversepath/inversepath.ins @@ -6,8 +6,8 @@ %% %% inversepath.dtx (with options: `batchfile') %% -%% __________________________________ -%% Copyright (C) 2007 Will Robertson +%% _______________________________________ +%% Copyright (C) 2007-2008 Will Robertson %% %% License information appended. %% @@ -16,15 +16,15 @@ \keepsilent \preamble - __________________________________ - Copyright (C) 2007 Will Robertson + _______________________________________ + Copyright (C) 2007-2008 Will Robertson License information appended. \endpreamble \postamble -Copyright (C) 2006 by Will Robertson +Copyright (C) 2007-2008 by Will Robertson Distributable under the LaTeX Project Public License, version 1.3c or higher (your choice). The latest version of @@ -41,7 +41,7 @@ This work consists of the file \jobname.dtx \generate{\file{\jobname.sty}{\from{\jobname.dtx}{package}}} \endbatchfile %% -%% Copyright (C) 2006 by Will Robertson +%% Copyright (C) 2007-2008 by Will Robertson %% %% Distributable under the LaTeX Project Public License, %% version 1.3c or higher (your choice). The latest version of diff --git a/Master/texmf-dist/tex/latex/inversepath/inversepath.sty b/Master/texmf-dist/tex/latex/inversepath/inversepath.sty index 8f4720f66df..60d4ff0a1b0 100644 --- a/Master/texmf-dist/tex/latex/inversepath/inversepath.sty +++ b/Master/texmf-dist/tex/latex/inversepath/inversepath.sty @@ -6,21 +6,25 @@ %% %% inversepath.dtx (with options: `package') %% -%% __________________________________ -%% Copyright (C) 2007 Will Robertson +%% _______________________________________ +%% Copyright (C) 2007-2008 Will Robertson %% %% License information appended. %% %% \ProvidesPackage{inversepath} - [26/04/2007 v0.1 Inverse relative paths] -\newcommand\inversepath[1]{% + [2008/07/31 v0.2 Inverse relative paths] +\newcommand\inversepath{% + \@ifstar{\inversepath@star}{\inversepath@nostar}} +\newcommand\inversepath@star[1]{% \let\ip@origjobpath\ip@jobpath \let\ip@directpath\@empty \let\ip@inversepath\@empty \ip@strippath#1/\@nil/% - \let\ip@jobpath\ip@origjobpath - \ip@inversepath} + \let\ip@jobpath\ip@origjobpath} +\newcommand\inversepath@nostar[1]{% + \inversepath@star{#1}% + \let\ip@jobpath\ip@origjobpath} \newcommand\absolutepath[1]{\def\ip@jobpath{#1}} \def\ip@literaldotdot{..} \def\ip@strippath#1/#2/{% @@ -60,7 +64,7 @@ \expandafter\@tempa \fi} %% -%% Copyright (C) 2006 by Will Robertson +%% Copyright (C) 2007-2008 by Will Robertson %% %% Distributable under the LaTeX Project Public License, %% version 1.3c or higher (your choice). The latest version of -- cgit v1.2.3