From 83ea821e5153a6e36b35e799efb3ef833dd316a4 Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Mon, 21 May 2012 23:54:16 +0000 Subject: nicefilelist 0.4 (21may12) git-svn-id: svn://tug.org/texlive/trunk@26551 c570f23f-e606-0410-a88d-b1316a301751 --- Master/texmf-dist/doc/latex/nicefilelist/README | 11 +- .../texmf-dist/doc/latex/nicefilelist/SrcFILEs.txt | 9 +- .../doc/latex/nicefilelist/nicefilelist.pdf | Bin 338631 -> 343786 bytes .../source/latex/nicefilelist/nicefilelist.tex | 60 ++++++--- .../source/latex/nicefilelist/srcfiles.tex | 5 +- .../tex/latex/nicefilelist/nicefilelist.RLS | 5 + .../tex/latex/nicefilelist/nicefilelist.sty | 138 ++++++++++++--------- 7 files changed, 147 insertions(+), 81 deletions(-) create mode 100644 Master/texmf-dist/tex/latex/nicefilelist/nicefilelist.RLS (limited to 'Master') diff --git a/Master/texmf-dist/doc/latex/nicefilelist/README b/Master/texmf-dist/doc/latex/nicefilelist/README index 8629b2ff796..2eca8f9193b 100644 --- a/Master/texmf-dist/doc/latex/nicefilelist/README +++ b/Master/texmf-dist/doc/latex/nicefilelist/README @@ -1,7 +1,7 @@ README for the `nicefilelist' package "\listfiles Alignment for Connoisseurs" - (C) Uwe Lueck 2012/03/27 + (C) Uwe Lueck 2012/05/20 While `longnamefilelist.sty' improves LaTeX's \listfiles with respect @@ -16,6 +16,15 @@ Thus `nicefilelist' is more "powerful" than `longnamefilelist', the former however is an "extension" of the latter neither with respect to implementation nor with respect to user interface. +The package `latexfileinfo-pkgs' + + http://ctan.org/pkg/latexfileinfo-pkgs + +describes `nicefilelist' in a more general context. A file +`nicefilelist.RLS' provides release information accessible by +packages described there. + + LICENSE: The package file `nicefilelist.sty' and the documentation files diff --git a/Master/texmf-dist/doc/latex/nicefilelist/SrcFILEs.txt b/Master/texmf-dist/doc/latex/nicefilelist/SrcFILEs.txt index b1d99b8fade..7caa4482d79 100644 --- a/Master/texmf-dist/doc/latex/nicefilelist/SrcFILEs.txt +++ b/Master/texmf-dist/doc/latex/nicefilelist/SrcFILEs.txt @@ -1,16 +1,17 @@ *File List* -nicefilelist.sty 2012/03/29 v0.2 more file list alignment (UL) +nicefilelist.sty 2012/05/20 v0.4 more file list alignment (UL) monofill.sty 2012/03/29 v0.1a monospace alignment (UL) myfilist.sty 2011/01/30 v0.3a \listfiles -- mine only (UL) readprov.sty 2010/11/27 v0.3 file infos without loading (UL) -nicefilelist.tex 2012/03/23 -- documenting nicefilelist.sty +nicefilelist.tex 2012/05/20 -- documenting nicefilelist.sty provonly.fd -- -- -- -- such wrong.prv * NOT FOUND * empty.f * NOT FOUND * - srcfiles.tex 2012/03/23 -- file infos -> SrcFILEs.txt + srcfiles.tex 2012/05/20 -- file infos -> SrcFILEs.txt +nicefilelist.RLS 2012/05/20 r0.4 v0.4 Kabelschacht + [r] *********** - List made at 2012/03/29, 11:08 + List made at 2012/05/20, 23:40 from script file srcfiles.tex diff --git a/Master/texmf-dist/doc/latex/nicefilelist/nicefilelist.pdf b/Master/texmf-dist/doc/latex/nicefilelist/nicefilelist.pdf index fbd3c8ce4b0..938bfae21e2 100644 Binary files a/Master/texmf-dist/doc/latex/nicefilelist/nicefilelist.pdf and b/Master/texmf-dist/doc/latex/nicefilelist/nicefilelist.pdf differ diff --git a/Master/texmf-dist/source/latex/nicefilelist/nicefilelist.tex b/Master/texmf-dist/source/latex/nicefilelist/nicefilelist.tex index 1673621ac95..f1e97b911c5 100644 --- a/Master/texmf-dist/source/latex/nicefilelist/nicefilelist.tex +++ b/Master/texmf-dist/source/latex/nicefilelist/nicefilelist.tex @@ -1,4 +1,4 @@ -\ProvidesFile{nicefilelist.tex}[2012/03/23 documenting nicefilelist.sty] +\ProvidesFile{nicefilelist.tex}[2012/05/20 documenting nicefilelist.sty] \title{\pkg{\huge nicefilelist.sty }\\---\\\cs{listfiles} Alignment for Connoisseurs\thanks{This document describes version @@ -30,6 +30,9 @@ neither with respect to implementation nor with respect to user interface. \end{abstract} \tableofcontents \section{Features and Usage} +We are describing relations to, ahm, related packages---rather brief{}ly. +The \ctanpkgref{latexfileinfo-pkgs} package provides a more general overview. +%% <- 2012/05/18 \subsection{Relation to 'longnamefilelist.sty'} \CtanPkgRef{longnamefilelist}{longnamefilelist.sty} equips \cs{listfiles} with an optional argument for the maximum number of characters @@ -51,25 +54,30 @@ each other's behaviour of \cs{listfiles}. unless one finds that its version of \cs{listfiles} looks fine enough and it is easier to understand and to use than 'nicefilelist'. -\subsection{Installing and Calling} +\subsection{Installing} The file 'nicefilelist.sty' is provided ready, installation only requires putting it somewhere where \TeX\ finds it (which may need updating the filename data base).\urlfoot{ukfaqref}{inst-wlcf} +\subsection{Calling} Below the `\documentclass' line(s) and above `\begin{document}', you load 'nicefilelist.sty' (as usually) by -\begin{verbatim} - \usepackage{nicefilelist} -\end{verbatim} +\[`\usepackage{nicefilelist}'\] Alternatively---e.g., for use with \ctanpkgref{myfilist} from the \ctanpkgref{fileinfo} bundle, see~Sec.~\ref{sec:myfilist}, or in order to include the `.cls' file in the list---you may load it by -\begin{verbatim} - \RequirePackage{nicefilelist} -\end{verbatim} +\[`\RequirePackage{nicefilelist}'\] before `\documentclass' or when you don't use `\documentclass'. +As of v0.4, there is a package option `[r]' in order to place +strings like \qtd{`r0.4'} in the column reserved for version numbers. +You get this functionality by +\[`\usepackage[r]{nicefilelist}'\] +or +\[`\RequirePackage[r]{nicefilelist}'\] +See Section~\ref{sec:opt} for more information. + \subsection{Usage and Sample with 'myfilist.sty'} \label{sec:myfilist} In order to get a reduced and/or rearranged list of used files @@ -136,21 +144,35 @@ nicefilelist.tex 2012/03/23 -- \rlap{documenting nicefilelist.sty} ~List made at 2012/03/23, 10:31 ~from script file srcfiles.tex \end{small} +%% TODO update example!? - -% \section{Example} -% TODO \section{Implementation} -\subsection{Package File Header (Legalize)} +\subsection{Package File Header (Legalese)} \input{nicefilelist.doc} -\section{Credit} -It was \textsc{Martin Muench} who pointed out the shortcomings of 'longnamefilelist' -that the present package addresses---thanks! +\section{Credits} +\begin{enumerate} %% 2012/05/20 + \item It was \textsc{Martin Muench} who pointed out the shortcomings + of 'longnamefilelist' that the present package addresses---thanks! + %% 2012/05/20: + \item For \textsc{Alois Kabelschacht}---whose idea in + TUGboat~\textbf{8}~\#2\footnote{\tugbartref{tb08-2/tb18kabel}{% + ``&\expandafter\ vs. &\let\ and &\def\ in Conditionals + and a Generalization of PLAIN's &\loop,"} + TUGboat Vol.~8 (1987), No.~2, pp.~184f. + (\urlhttpref{tug.org/TUGboat/tb08-2/tb18kabel.pdf})} + is used for v0.3---cf.\ the \ctanpkgref{dowith} documentation. +\end{enumerate} \section{Missing} -The package once might provide \ctanpkgref{keyval}-style optional arguments for \cs{listfiles} -or even call \cs{listfiles} automatically with 'keyval' package options. +\begin{enumerate} + \item The package once might provide \ctanpkgref{keyval}-style + optional arguments for \cs{listfiles} or even call \cs{listfiles} + automatically with 'keyval' package options. + %% 2012/05/18: + \item Another idea from \textsc{Martin Muench}: wrapping inside caption column. + Can \ctanpkgref{hardwrap} help? +\end{enumerate} \end{document} @@ -159,3 +181,7 @@ VERSION HISTORY 2012/03/20 for v0.1 started 2012/03/22 trying something 2012/03/23 for v0.1a without "aligning the dots" etc. +2012/05/18 for v0.30 Legalize -> Legalese; add. TODO "wrapping"; + ref. to `latexfileinfo-pkgs' +2012/05/20 for v0.31 mention Kabelschacht +2012/05/20 for v0.4 on new package option [r] diff --git a/Master/texmf-dist/source/latex/nicefilelist/srcfiles.tex b/Master/texmf-dist/source/latex/nicefilelist/srcfiles.tex index fe4d6d2b878..1fdf591deb7 100644 --- a/Master/texmf-dist/source/latex/nicefilelist/srcfiles.tex +++ b/Master/texmf-dist/source/latex/nicefilelist/srcfiles.tex @@ -1,5 +1,5 @@ -\ProvidesFile{srcfiles.tex}[2012/03/23 file infos -> SrcFILEs.txt] -\RequirePackage{nicefilelist} +\ProvidesFile{srcfiles.tex}[2012/05/20 file infos -> SrcFILEs.txt] +\RequirePackage[r]{nicefilelist} \RequirePackage{myfilist} % \EmptyFileList[nicefilelist.sty] %%% [readprov.sty,myfilist.sty] %% packages: @@ -13,5 +13,6 @@ % \ReadPackageInfos{fifinddo,makedoc,niceverb} % \ReadFileInfos{makedoc.cfg,mdoccorr.cfg} \ReadFileInfos{srcfiles} +\ReadFileInfos{nicefilelist.RLS} %% 2012/05/18 \ListInfos[SrcFILEs.txt] diff --git a/Master/texmf-dist/tex/latex/nicefilelist/nicefilelist.RLS b/Master/texmf-dist/tex/latex/nicefilelist/nicefilelist.RLS new file mode 100644 index 00000000000..7fa50e33682 --- /dev/null +++ b/Master/texmf-dist/tex/latex/nicefilelist/nicefilelist.RLS @@ -0,0 +1,5 @@ +\ProvidesFile{nicefilelist.RLS} %% RELEASE INFO + [{2012/05/20 r0.4 v0.4 Kabelschacht + [r] }] +% [2012/05/20 v0.3 Kabelschacht reimplementation] +% [2012/03/29 v0.2 reimpl.: much within \string\typeout] +% [2012/03/23 v0.1(a) initial] diff --git a/Master/texmf-dist/tex/latex/nicefilelist/nicefilelist.sty b/Master/texmf-dist/tex/latex/nicefilelist/nicefilelist.sty index 9b28578966e..4cf70735873 100644 --- a/Master/texmf-dist/tex/latex/nicefilelist/nicefilelist.sty +++ b/Master/texmf-dist/tex/latex/nicefilelist/nicefilelist.sty @@ -1,5 +1,5 @@ \NeedsTeXFormat{LaTeX2e}[1994/12/01] -\ProvidesPackage{nicefilelist}[2012/03/29 v0.2 +\ProvidesPackage{nicefilelist}[2012/05/20 v0.4 more file list alignment (UL)] %% Copyright (C) 2012 Uwe Lueck, @@ -75,6 +75,26 @@ %% (text in \cs{Provides.\empty..} arguments) will never contain such a %% ``funny `Q'". %% +%% === Package Option `[r]' === +%% \label{sec:opt} +%% v0.4 offers package option `[r]' that allows strings with `r' +%% in place of `v', for ``release." `\NFL@v@digit''s definition +%% therefore depends ... we use |\@listfiles| for a ``message" +%% there. For the original restricted functionality, it expands +%% to |\NFL@false|. +\def\@listfiles{\noexpand\NFL@false} +%% Package option `[r]' carries out another test instead. +%% See the accompanying file `SrcFILEs.txt' to see the effect. +%% TODO: update example!? +\DeclareOption{r}{% + \def\@listfiles{% + {\noexpand\NFL@ifx@kbl##1r% + {\noexpand\NFL@digits##2\noexpand\@nnil}% + \noexpand\NFL@false}% + }% +} +\ProcessOptions +%% %% === Redefining \cs{listfiles} === %% Similarly to original \LaTeX, |\listfiles| carries almost everything %% that is needed for the file list only: @@ -82,9 +102,10 @@ \let\listfiles\relax %% ---this clears memory. Now \LaTeX\ doesn't collect file names for %% &\listfiles when &\@listfiles is undefined, therefore - \let\@listfiles\relax -%% although we don't use it. -%% (TODO use it in place of some `\NFL@'...?) +% \let\@listfiles\relax +%% % although we don't use it. +%% % (TODO use it in place of some `\NFL@'...?) +%% ... postponed for v0.4 ... %% \vskip\smallskipamount\noindent %% |\@dofilelist| is executed by the standard \LaTeX\ `\enddocument' %% macro or by `\ListInfos' from the \ctanpkgref{myfilist} package. @@ -111,14 +132,11 @@ \NFL@make@macro@arg\MFrightinfield\@tempa {f-base}.% \NFL@make@macro@arg\MFleftinfield \filename@ext{f-ext}% \NFLspaceI - \ifx\@tempb\relax - \NFLnotfound - \else + \NFL@ifx@kbl\@tempb\relax\NFLnotfound{% \NFL@make@macro@arg\NFL@space@split\@tempb \NFL@maybe@three \NFL@date@or@rest -%% TODO `\expandafter's? - \fi + }% }% }% %% The line of stars: @@ -136,17 +154,28 @@ %% passes prefix and suffix as arguments to %% if a space token is within , otherwise %% gets the original as single -%% argument:\footnote{The latter is useful here where -%% becomes visible only by an &\expandafter.} +%% argument. The latter is useful here where +%% becomes visible only by an &\expandafter. +%% The following construction is discussed more generally +%% in the \ctanpkgref{bitelist} package. \def\NFL@space@split##1{% \NFL@return@space@split##1\@nil: \NFL@criterion\@nil\@nil@{##1}}% +%% `\NFL@return@spaces@split' essentially has \emph{three} parameters +%% delimited by ` ', `\@nil', and `\@nil' again. \def\NFL@return@space@split##1 ##2\@nil##3\@nil@##4##5##6{% - \ifx\NFL@criterion##2\expandafter\@secondoftwo -%% If #2 is empty, \cs{ifx} fails, comparing &\NFL@criterion with -%% &\expandafter. This only happens when the space is the last thing -%% in . %% 2012/03/27 - \else \expandafter\@firstoftwo \fi - {##5{##1}{##2}}{##6{##4}}}% + \NFL@ifx@kbl\NFL@criterion{##2}% +%% If #2 is empty, `\NFL@ifx@kbl' (as of v0.3) compares +%% `\NFL@criterion' (criterion indicating ``unspaced") with +%% `\expandafter'. This only happens when the space is the last thing +%% in , and `' is chosen correctly. + {##6{##4}}{##5{##1}{##2}}}% +%% |\NFL@ifx@kbl{}{}{}{}| +%% as of v0.3 should save some tokens, in some longer run, +%% especially if we want to add nestings---cf. \file{source2e.pdf} +%% for ``Kabelschacht." + \def\NFL@ifx@kbl##1##2{% + \ifx##1##2\expandafter \@firstoftwo + \else \expandafter \@secondoftwo \fi}% %% Dealing with |\NFL@date@or@rest{}| before `\NFL@maybe@three': \def\NFL@date@or@rest##1{% \NFL@if@date{##1}{##1}{\NFL@no@date@version##1}}% @@ -154,50 +183,32 @@ \def\NFL@if@date##1{\NFL@slashes##1\NFL@xi xyzxyzxyzx\@nil}% %% |\NFL@slashes| checks that there are slashes at the expected places: \def\NFL@slashes##1##2##3##4##5##6##7##8{% - \ifx##5/% - \ifx##8/% - \NFL@xpxpxp \NFL@ten@only - \else - \expandafter\NFL@after@false - \fi - \else - \NFL@after@false + \NFL@ifx@kbl##5/% + {\NFL@ifx@kbl##8/\NFL@ten@only\NFL@false}% + \NFL@false %% This especially happens when is empty. - \fi %% Digit candidates back: {##1##2##3##4##6##7}}% - \def\NFL@xpxpxp{\expandafter\expandafter\expandafter}% %% If the word is a date, we now have taken 6 of the 8 digits. %% \[|\NFL@ten@only{}Q|\] %% takes the two remaining and then a thing that should be `Q' %% in the funny sense of Sec.~\ref{sec:safe}. \def\NFL@ten@only##1##2##3##4{% - \ifx\NFL@xi##4% - \expandafter\NFL@digits - \else - \NFL@after@false - \fi + \NFL@ifx@kbl\NFL@xi##4\NFL@digits\NFL@false %% Finally checking digits: ##1##2##3\@nnil}% %% |\NFL@digits| is a loop through single tokens: \def\NFL@digits##1{% - \ifx##1\@nnil - \expandafter \NFL@true - \else - \ifnum`##1<`0 - \expandafter \NFL@after@false - \else - \ifnum`##1>`9 - \NFL@xpxpxp \NFL@after@false - \else - \expandafter\NFL@xpxpxp\expandafter \NFL@digits - \fi - \fi - \fi + \NFL@ifx@kbl##1\@nnil\NFL@true{% + \NFL@if@digit@code##1<0\NFL@false{% + \NFL@if@digit@code##1>9\NFL@false\NFL@digits + }% + }% }% -%% |\NFL@after@false| calls `\NFL@false' \emph{after} closing one -%% conditional: - \def\NFL@after@false{\expandafter\NFL@false}% +%% |\NFL@if@digit@code|: + \def\NFL@if@digit@code##1##2##3{% + \ifnum`##1##2`##3 \expandafter \@firstoftwo + \else \expandafter \@secondoftwo \fi}% %% |\NFL@false| skips further candidates and dummies and chooses : \def\NFL@false##1\@nil{\@secondoftwo}% %% |\NFL@true| skips further candidates and dummies and chooses : @@ -206,7 +217,7 @@ %% |\NFL@no@date@version| as soon as we find that the file info %% does not start with a date: \def\NFL@no@date@version{% - \NFLnodate\NFLspaceII\NFLnoversion@\NFLspaceIII} + \NFLnodate\NFLspaceII\NFLnoversion@\NFLspaceIII}% %% |\NFLnoversion@| adds filler to &\NFLnoversion: \def\NFLnoversion@{% \NFL@make@macro@arg\NFL@place@version\NFLnoversion}% @@ -233,14 +244,16 @@ %% present way. %% \vskip\smallskipamount\noindent %% |\NFL@v@digit{}{}{}| checks whether the first thing -%% is a `v' and the second a digit: - \def\NFL@v@digit##1##2##3\@nil{% - \ifx##1v% - \expandafter \NFL@digits \expandafter ##2\expandafter \@nnil - \else - \NFL@after@false - \fi - \@nil}% +%% is a `v' and the second a digit---unless package option `[r]' +%% was chosen. v0.4 uses `\edef' for choosing: + \edef\NFL@v@digit##1##2##3\@nil{% + \noexpand\NFL@ifx@kbl##1v% + {\noexpand\NFL@digits##2\noexpand\@nnil}% +%% |\@listfiles| will either expand to the original `\NFL@false' +%% or to a test on `r': + \@listfiles + \noexpand\@nil}% + \let\@listfiles\relax %% |\NFL@place@version{}| adds filler to version id: \def\NFL@place@version##1{\MFleftinfield{##1}{f-version}}% %% |\NFL@maybe@version@rest{}{}|: @@ -266,3 +279,14 @@ v0.2 2012/03/24 file info processed by \typeout - start 2012/03/27 undone the latter, explained; improved remarks on \@listfiles 2012/03/29 alignment of title/stars with base<11 + +v0.30 2012/05/18f. \NFL@ifx@kbl in \NFL@return@space@split + 2012/05/20 all \ifx reimplemented, old code kept + STORED INTERNALLY +v0.31 2012/05/20 removing old code - STORED INTERNALLY +v0.32 2012/05/20 removing \NFL@xpxpxp; replacing \NFL@after@false + by \NFL@ifnum@kbl, keeping old code + STORED INTERNALLY +v0.33 2012/05/20 removing old code; added 3 %s + STORED INTERNALLY +v0.4 2012/05/20 option [r] -- cgit v1.2.3