summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/latex/nicetext/run/arseneau.tex
blob: 2a1874bf9125f27b8e963873554d2a17c2371590 (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
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
\typeout{arseneau.tex 2010/03/30 some packages by D. Arseneau}

\title{A Few (just Two) Packages by Donald Arseneau}

\author{Uwe L\"uck\thanks{applying \url{http://ctan.org/pkg/nicetext}}}

% \listfiles



%% Preprocessing:

\RequirePackage{makedoc}

% \CopyFDconditionFromTo{PScomment}{comment}

\MainDocParser{\ProcessInputWith{PScomment}}

%% nolbreaks:

%% Replacements:

\SetPatternCodes{\MakeOther\\\MakeOther\ }

\MakeExpandableAllReplacer{LaTeX}{LaTeX }{\LaTeX{} }{LEAVE}

% \MakeExpandableAllReplacer{TeX}{\TeX }{\TeX{} }{LEAVE}

\PrependExpandableAllReplacer{opt}{[ragged]}{`[ragged]'}

\PrependExpandableAllReplacer{braces}[\Delimiters<>]<{ }><`{ }'>

\SetCorrectHookJobLast



\HeaderLines{2}

\LaTeXresultFile{nolbreaks.doc}

\MakeCloseDoc{nolbreaks.sty}



%% notoccite:

\MakeExpandableAllReplacer{LaTeX}{LaTeX }{\LaTeX{} }{LEAVE}

\PrependExpandableAllReplacer{caption}%

{  \caption [}{\DISPLAY\caption[}

\PrependExpandableAllReplacer{unsrt}{unsrt}{`unsrt'}

\PrependExpandableAllReplacer{toc}{ toc}{ `.toc'}

\PrependExpandableAllReplacer{lof}{lof}{`.lof'}

\PrependExpandableAllReplacer{latex}{latex}{`latex'}

\PrependExpandableAllReplacer{NOTE}{*NOTE*}{\textbf{NOTE:\enspace}}

\PrependExpandableAllReplacer{does}{*does*}{\emph{does}}

\PrependExpandableAllReplacer{bibtex}{bibtex}{`bibtex'}

\ResetPatternCodes

\SetCorrectHookJobLast



\HeaderLines{3}

\LaTeXresultFile{notoccite.doc}

\MakeCloseDoc{notoccite.sty}



%% Typesetting:

\documentclass{article}

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

\AddToNoVerbList{\DISPLAY\textbf\enspace\emph\LaTeX}

\newcommand*{\DISPLAY}{%

    \\[\smallskipamount]\leavevmode\null\hfil}

\makeatletter \MakeLetter\_

% {\MakeActive\"\gdef\DQcode#1"{\dqtd{\texttt{#1}}}}

{\MakeActive\"\gdef\DQcode#1"{\texttt{#1}}}

%% weird problems:

% \newcommand*{\startDQcode}

%             {``\begingroup\MakeActiveLetHere\"\enddQcode\tt}

% \def\endDQcode{\endgroup"}

\pagestyle{headings}

\usepackage{parskip}

\begin{document}

\maketitle



\begin{abstract}\noindent

  This document demonstrates the present 

  (i.e., 'nicetext' bundle release v0.4)

  capabilities of 'makedoc' and 'niceverb' 

  to typeset \LaTeX\ quality documentation from 

  third-party package files having ASCII comments only, 

  without modifying such package files manually.\footnote{See 

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

                         for more on these packages.}

  Such packages usually mark comments by lines starting with 

  \lq`% '\rq. This is somewhat difficult when the ``comment mark" 

  \lq`%'\rq\

  may at the same time be used for ``commenting out" in place of 

  ``true commenting." As opposed to 'substr.sty' that conforms to the 

  easier \lq`%% '\rq\ style, the packages 'nolbreaks' and 'notoccite' 

  by Donald Arseneau exemplify the \lq`% '\rq\ commenting style. 



  The ASCII documentation of packages of this kind

  does not always clearly indicate when switching to `\tt' is appropriate. 

  This problem is solved here by string replacements very specific 

  to the package files. 

  The setup for these replacements 

  (in the source file 'arseneau.tex') 

  still may be simplified. 

  %% <- 2010/03/29



  Moreover, some similar packages cannot be properly typeset with 

  'nicetext' at present because 'makedoc''s loop is too rigid to deal with 

  (i)~ASCII indents, displays, lists and with (ii)~instructions 

  after `\endinput'.



  It should be clear that all the package desriptions are Donald Arseneau's, 

  'nicetext' just formats them.

\end{abstract}

\tableofcontents

\pagebreak



\sloppy 



\section{'nolbreaks'}

% \MakeActiveLet\_\textunderscore

% \MakeActive\*\def*{\texttt{\string*}}

% \MakeActiveLetHere\"\startDQcode

\MakeActiveLetHere\"\DQcode

%  \errorcontextlines=6

\AutoCmdInput{nolbreaks.doc}



\section{'notoccite'}

\ResetCodeLineNumbers

\AutoCmdInput{notoccite.doc}



\end{document}