summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/latex/fileinfo/readprov.tex
blob: 1ee52288a7ce076d4af0b374a3b7e5874c6de38a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
\ProvidesFile{readprov.tex}[2012/11/22 documenting readprov.sty]
% \ProvidesFile{readprov.tex}[2012/03/18 documenting readprov.sty]
% \ProvidesFile{readprov.tex}[2011/01/29 documenting readprov.sty]

\title{\textsf{readprov}\\---\\Get File Info without Loading%
%        \GetFileInfo{readprov.sty}%
%        \ReadFileInfos{readprov.sty}%  %% \NeedsTeXFormat
       \thanks{% 
       This file describes
%        \protect\GetFileInfo{readprov.sty}%    %% FAILS!
       version 
%        \textbf{\fileversion} of \textsf{\filename} as of \filedate.}%
       \textcolor{blue}{\UseVersionOf{readprov.sty}} 
       of \textsf{readprov.sty} as of \UseDateOf{readprov.sty}.}%
}      %% <- TODO macro in makedoc.cfg
% \listfiles

%% Preprocessing:
\RequirePackage{makedoc}
\CopyFDconditionFromTo{PScomment}{comment}
\MainDocParser{\ProcessInputWith{PScomment}}
%% Replacements:
\StartPrependingChain
\SetPatternCodes{\MakeOther\\\MakeOther\ } %% CARE!
% \PrependExpandableAllReplacer{tex}{ .tex}{ `.tex'}
\renewcommand*{\do}{\PrependExpandableAllReplacer}  %% 2012/11/22
\do{sty}{ .sty}{ `.sty'}
\do{cls}{.cls}{`.cls'}
\do{etc}{etc. }{etc.\ }
% \PrependExpandableAllReplacer{etc...}{etc. ...}{etc.\ $\dots$}
\SetPatternCodes{\MakeOther\\}             %% less care needed 
\do{LaTeX}{LaTeX}{\LaTeX}
\do{xpbl}{expandable}{\emph{expandable}}
\do{rob}{robust}{\emph{robust}}
\do{frag}{fragile}{\emph{fragile}}
\do{doc}{doc.sty}{'doc.sty'}
\do{myfilist}{myfilist.sty}{'myfilist.sty'}
\do{readprov}{readprov.sty}{'readprov.sty'}
% \do{provf}{\ProvidesFile}{`\ProvidesFile'}    %% rm. 2012/11/22
\do{NOTE}{NOTE:}{\paragraph{Note:}} 
% \PrependExpandableAllReplacer{Note}{Note:}{\emph{Note:} } 
\do{prov}{provided}{\emph{provided}} 
\do{*fail*}{*fail*}{\emph{fail}} 
\do{INSTALL}{INSTALL:}{\section{Installation}} 
\do{USAGE}{USAGE:}{\section{Usage}} 
\do{IMPLEM}{IMPLEMENTATION:}{\section{Implementation}} 
\do{LOAD}{LOADING:}{\paragraph{Loading:}} 
\do{INS}{INSERTING:}{\paragraph{Inserting:}} 
\do{READ}{EXTRACTING:}{\paragraph{Extracting:}} 
\do{TODO}{TODO}{\textcolor{blue}{TODO}} 
\SetPatternCodes{\MakeOther\\\MakeOther\$}
\do{dots}{...}{$\dots$}
\SetCorrectHookJobLast
\ResetPatternCodes

\LaTeXresultFile{readprov.doc}
\MakeCloseDoc*{readprov.sty}                        %% star 2012/03/18
  %% <- we must NOT read mdoccorr.cfg here! 
  %%    (or put the above setup into a new one!) ->
% \MakeJobDoc{0}{\ProcessInputWith{PScomment}}

%% Typesetting:
\documentclass{article}
\usepackage{color} %% for highlighting package version!? TODO
\input{makedoc.cfg}
\usepackage{readprov}
% \ReadFileInfos{report.cls} %% WORKS! 2010/11/27
\usepackage{wiki}
\begingroup \MakeActive\" 
 \gdef\fineDQ{``\begingroup
   \let\do\MakeOther \dospecials \tt
   \def"{\endgroup''}}%
\endgroup
% \makeatletter \MakeLetter\_

\pagestyle{headings}
% \usepackage{parskip}

\MDfinaldatechecks
\begin{document}

\maketitle 

\begin{abstract}\sloppy\noindent
  'readprov.sty' 
    renders `\GetFileInfo' from \LaTeX's 
    'doc.sty'\urlfoot{CtanPkgRef}{doc} 
    (without the latter being required)
    and new robust (expandable) variants of it, 
    usable with files that are not really loaded 
    (they are quit when their file info is found, cf. the 'zwgetfdate' 
    package\urlfoot{CtanPkgRef}{zwgetfdate}). 
    So, e.g., you can describe packages that are incompatible 
    with each other or with packages that your document uses.
    You even can report about various class files.

    Such packages then also appear with \LaTeX's `\listfiles'. 
    You may consider this a bug $\dots$ 
'myfilist.sty' 
    makes it a feature (see `myfilist.pdf'). 
\end{abstract}

% \pagebreak
\tableofcontents

\section{Installing}
The file '\jobname.sty' is provided ready, installation only requires 
putting it somewhere where \TeX\ finds it 
(which may need updating the filename data 
 base).\footnote{\url{http://www.tex.ac.uk/cgi-bin/texfaq2html?label=inst-wlcf}}

\section{File Info Header}

\sloppy 
\AddToNoVerbList{%
  \LaTeX\emph\dots\quad\paragraph\texttt\textcolor\\%
  \-}                                   %% 2012/11/11 
\MakeActiveLetHere\"\fineDQ 
\let\\\MDdocnewline                     %% MD 2012/11/12
%% CARE! from next line on, code line indents are special!
\wikiEnvironments %% TODO fails with "or" 2010/03/31
\AutoCmdInput{readprov.doc}
\nowikiEnvironments                     %% 2012/11/12

\end{document}