diff options
author | Karl Berry <karl@freefriends.org> | 2008-08-06 23:39:25 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2008-08-06 23:39:25 +0000 |
commit | 336e2e61d697ff9b25fb217f84225290fd9a369a (patch) | |
tree | 90ef83389eaab25a3536d9b23949ff59b83a68f6 /Master/texmf-dist/source/latex/inversepath | |
parent | 9af6775c48f2c62549bce5974dbf4c13ba8396b2 (diff) |
inversepath update (6aug08)
git-svn-id: svn://tug.org/texlive/trunk@10125 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source/latex/inversepath')
-rw-r--r-- | Master/texmf-dist/source/latex/inversepath/inversepath.dtx | 39 | ||||
-rw-r--r-- | Master/texmf-dist/source/latex/inversepath/inversepath.ins | 12 |
2 files changed, 30 insertions, 21 deletions
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 <wspr81@gmail.com> +% Copyright 2007-2008 by Will Robertson <wspr81@gmail.com> % % 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 <wspr81@gmail.com> +Copyright (C) 2007-2008 by Will Robertson <wspr81@gmail.com> 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 %</readme> % % \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 <wspr81@gmail.com> +Copyright (C) 2007-2008 by Will Robertson <wspr81@gmail.com> 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 <wspr81@gmail.com> +%% Copyright (C) 2007-2008 by Will Robertson <wspr81@gmail.com> %% %% Distributable under the LaTeX Project Public License, %% version 1.3c or higher (your choice). The latest version of |