summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/latex/nicetext/run/substr.tex
blob: 371045696a66e951cbe32cedd9fe51f47ec8cc12 (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
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
\typeout{substr.tex 2010/03/30 documentation for substr.sty}

\title{\textsf{substr.sty}\thanks{See 

       \url{http://ctan.org/pkg/substr} for more about 

       \textsf{substr.sty}.}---Substring 

       Functions with \LaTeX}

\author{Harald Harders\thanks{Joint work with Heiko Oberdiek, 

                              one line + documentation tool

                              by Uwe L\"uck.}}

% \listfiles



%% Preprocessing 'substr.sty':

\RequirePackage{makedoc}



%% Replacements:

\SetPatternCodes{\MakeOther\\}

\MakeExpandableAllReplacer{Cmds} 

                          {Commands:}{\SECT{Commands:}}{LEAVE}

\PrependExpandableAllReplacer{Change}{ChangeLog}{\SECT{ChangeLog}}

\PrependExpandableAllReplacer{CR}{Copyright}{\COPYRIGHT}

\PrependExpandableAllReplacer{LaTeX}

               [\MakeOther\ ]{LaTeX }{\LaTeX{} }

\PrependExpandableAllReplacer{HH@}

                             {h.harders@tu-bs.de}

                             {`h.harders@tu-bs.de'\MEDSK}

\PrependExpandableAllReplacer{COMP}

                             {de.comp.text.tex}

                             {`de.comp.text.tex'}

\PrependExpandableAllReplacer{LPPL}

                             {macros/latex/base/lppl.txt}

                             {`macros/latex/base/lppl.txt'}

\PrependExpandableAllReplacer{Hist}[\MakeOther\ ]%

{History of this package:}{\SECT{History of this package:}}

\ResetPatternCodes

\SetCorrectHookJobLast



\HeaderLines{3}

\MainDocParser{\ProcessInputWith{comment}}

\LaTeXresultFile{substr.doc}

\MakeCloseDoc{substr.sty}



\documentclass{article}



\usepackage{hyperref,makedoc,niceverb} %% niceverb after hyperref!

\AddToNoVerbList{\MEDSK\SECT\textbf\COPYRIGHT,\LaTeX}

\newcommand*{\MEDSK}{\par\medskip}

\newcommand*{\SECT}[1]{\MEDSK\textbf{#1}\nopagebreak\par}

\newcommand*{\COPYRIGHT}{\MEDSK\textbf{Copyright} }

\usepackage[utf8]{inputenc}            %% for v1.2



\pagestyle{myheadings}

\markboth{\textsf{substr.sty}}{\textsf{substr.sty}}

\usepackage{parskip}



\begin{document}

\maketitle



\begin{abstract}\noindent

  This documentation of 'substr.sty' has been typeset 

  by automatical ASCII\slash UTF\hbox{-}8~$\to$ \LaTeX\ 

  enhancement provided by 'makedoc.sty' and 'niceverb.sty''s 

  ``auto mode."\footnote{See 

                         \url{http://ctan.org/pkg/nicetext} 

                         for more on these packages.}

  Some extended formatting---kind of sectioning, 

  switches to `\tt'---have been achieved by string replacements 

  specific to the comment text of the package file 

  (see source file 'substr.tex').



  'substr.sty' especially demonstrates the rather rare 

  \lq`%% '\rq\ style of package comments that is somewhat 

  favoured by 'makedoc' because this way ``true comments" 

  are easily distinguishable from mere ``commenting out."

% 

%   The idea to use 'parskip.sty' for formatting the documentation 

%   (as opposed to the version of the present file of one week ago) 

%   is due to the quite recent 

%   'import.tex'\footnote{\url{http://ctan.org/pkg/import}} 

%   that 

%% ???

\end{abstract}

\sloppy 

% \MakeJobDoc{3}{\ProcessInputWith{comment}}

\AutoCmdInput{substr.doc}

\end{document}



%% HISTORY

2010/03/18   sent to CTAN

2010/03/27   removed `\usepackage{substr}'

2010/03/28   extended formatting by replacing words

2010/03/29   \SetPatternCodes etc.

2010/03/30   import -> substr; see source file