summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/etaremune/etaremune.dtx
blob: efb39513fa6533b3fc24da43f6f85c222ae6ec17 (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
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
% \iffalse meta-comment
%
% etaremune package by Hendri Adriaens.
%
% Extract package files and examples and create documentation:
%    latex etaremune.dtx
%    latex etaremune.dtx
%    bibtex etaremune
%    makeindex -s gglo.ist -o etaremune.gls etaremune.glo
%    makeindex -s gind.ist -o etaremune.ind etaremune.idx
%    latex etaremune.dtx
%    latex etaremune.dtx
%
% To finish the installation you have to move the following
% file into a directory searched by LaTeX:
%    etaremune.sty
%
%% ----------------------------------
%% Copyright (C) 2005 Hendri Adriaens
%% ----------------------------------
%%
%% This work may be distributed and/or modified under the
%% conditions of the LaTeX Project Public License, either version 1.3
%% of this license or (at your option) any later version.
%% The latest version of this license is in
%%   http://www.latex-project.org/lppl.txt
%% and version 1.3 or later is part of all distributions of LaTeX
%% version 2003/12/01 or later.
%%
%% This work has the LPPL maintenance status "maintained".
%%
%% This Current Maintainer of this work is Hendri Adriaens.
%%
%% This work consists of the file etaremune.dtx and the
%% derived file etaremune.sty.
%%
%% The following files constitute the etaremune package and must be
%% distributed as a whole: readme, etaremune.dtx, etaremune.pdf and
%% etaremune.sty.
%%
% \fi
%
% \iffalse
%<*batchfile>
\begingroup
\input docstrip
\keepsilent
\preamble
\endpreamble
\askforoverwritefalse
\generate{
  \file{etaremune.sty}{\from{etaremune.dtx}{etaremune}}
  \file{empream.ble}{\from{etaremune.dtx}{preamble}}
  \file{etaremune.bib}{\from{etaremune.dtx}{bib}}
}
\endgroup
%</batchfile>
%<*driver>
\documentclass[a4paper]{ltxdoc}
\input{empream.ble}
\begin{document}
\DocInput{etaremune.dtx}
\let\Section\section\def\section*#1{\Section*{#1}\addcontentsline{toc}{section}{#1}}
\bibliographystyle{plain}
\bibliography{etaremune}
\PrintChangesX\PrintIndexX
\end{document}
%</driver>
% \fi
%
% \changes{v1.0}{2005/03/12}{Initial release}
% \changes{v1.1}{2005/04/15}{Simplified}
% \changes{v1.1}{2005/04/15}{Added check on negative labels}
% \changes{v1.2}{2005/06/01}{Added global and local style control for lists}
%
% \GetFileInfo{etaremune.sty}
%
% \CheckSum{141}
%
%\DoNotIndex{\@auxout,\@currentlabel,\@enumctr,\@enumdepth,\@ifundefined,
%\@latex@warning@no@line,\@ne,\@spaces,\@toodeep,\addtocounter,\advance,
%\AtEndDocument,\csname,\def,\edef,\else,\endcsname,\endlist,\expandafter,
%\fi,\gdef,\hss,\ifnum,\immediate,\let,\list,\llap,\makelabel,\NeedsTeXFormat,
%\newcounter,\newenvironment,\ProvidesPackage,\relax,\romannumeral,\setcounter,
%\space,\stepcounter,\string,\the,\thr@@,\write,\xdef,\z@,\m@ne,
%\define@key,\define@cmdkey,\ProcessOptionsX,\presetkeys,\DeclareOptionX,
%\@tempa,\@tempb,\CurrentOption,\noexpand,\PackageWarning,\RequirePackage,
%\setkeys,\setlength,\setrmkeys,\XKV@for@n,\c@EM@etaremunectr,\c@EM@itemctr}
%
% \CharacterTable
%  {Upper-case    \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z
%   Lower-case    \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z
%   Digits        \0\1\2\3\4\5\6\7\8\9
%   Exclamation   \!     Double quote  \"     Hash (number) \#
%   Dollar        \$     Percent       \%     Ampersand     \&
%   Acute accent  \'     Left paren    \(     Right paren   \)
%   Asterisk      \*     Plus          \+     Comma         \,
%   Minus         \-     Point         \.     Solidus       \/
%   Colon         \:     Semicolon     \;     Less than     \<
%   Equals        \=     Greater than  \>     Question mark \?
%   Commercial at \@     Left bracket  \[     Backslash     \\
%   Right bracket \]     Circumflex    \^     Underscore    \_
%   Grave accent  \`     Left brace    \{     Vertical bar  \|
%   Right brace   \}     Tilde         \~}
%
%\title{The \pf{etaremune} package
%\thanks{This package can be downloaded from CTAN mirrors:
%\texttt{/macros/latex/contrib/etaremune}. See \texttt{etaremune.dtx} for
%information on installing \pf{etaremune} into your \LaTeX\
%distribution and for the license of this package.}}
%\author{Hendri Adriaens\\\url{http://stuwww.uvt.nl/~hendri}}
%\date{\fileversion\ (\filedate)}
%\maketitle
%
%\begin{abstract}\noindent
%This package implements the |etaremune| environment which is similar
%to the |enumerate| environment, except that labels are decreasing
%instead of increasing. This package provides an alternative to the
%\pf{revnum} package which uses a lot of counters. The style of lists
%can be controlled locally and globally.
%\end{abstract}
%
%\begin{multicols}{2}
%[\section*{Contents}
%\setlength{\columnseprule}{.4pt}
%\setlength{\columnsep}{18pt}]
%\tableofcontents
%\end{multicols}
%
%\section{Introduction}
%This package implements the |etaremune| environment which labels
%items with decreasing numbers, starting from the number of items
%in the environment. Since this number is not known at the start of
%the environment, we use a two step procedure. On the first \LaTeX\
%run, we determine the number of items in each |etaremune|
%environment and number the items in a default way and on the second
%run, we number all items correctly.
%
%The \pf{revnum} package \cite{revnum} already implements this
%environment. It provides the |revnumerate| environment which labels
%the items with decreasing numbers. This package has as main drawback
%that it consumes numerous counters. It uses 4 counters plus 1 for
%every |revnumerate| environment in the document. In big documents,
%this can cause problems. The package at hand uses only 2 counters,
%irrespective of the number of |etaremune| environments used in the
%document.
%
%I created the first version of the main code of this package to solve
%a question on the
%\TeX-NL mailing list. I figured that it might be a good idea to put
%my code in a small package on CTAN as an alternative for \pf{revnum}.
%
%\section{The \texttt{etaremune} environment}
%\DescribeEnv{etaremune}
%The |etaremune| environment works just as the |enumerate| environment
%and has the same control possibilities using macros like |\labelenumi|,
%|\theenumi| and |\@listi|. See for a detailed description of customizing
%|enumerate| and |etaremune| environments a \LaTeX\ manual, for instance
%\cite{companion}, pages 128--131 and 144--151.
%
%The |etaremune| environment is different from the |enumerate| environment
%in labeling the items. This environment labels items with decreasing
%numbers.
%\begin{command}
% `\cs{begin\char`\{etaremune\char`\}}\oarg{options}'
% `\meta{items}'
% `\cs{end\char`\{etaremune\char`\}}'
%\end{command}
%
%As \LaTeX\ cannot know at the beginning of the environment how many
%items it will have to typeset, this environment computes the
%starting point of the list in two \LaTeX\ runs, using the auxiliary
%file. On the first run, the number of items is counted and the items
%will be numbered with increasing numbers (as in the |enumerate|
%environment) and on the second run, the item labels will be set
%correctly. See an example below.
%
%\vspace*{.2cm}\noindent
%\begin{minipage}{.33\linewidth}
%\begin{etaremune}
%\item Not important.
%\item Quite relevant.
%\item Paramount.
%\end{etaremune}
%\end{minipage}
%\begin{minipage}{.666\linewidth}
%\begin{example}
% \begin{etaremune}
%  \item Not important.
%  \item Quite relevant.
%  \item Paramount.
% \end{etaremune}
%\end{example}
%\end{minipage}
%\vspace*{.2cm}
%
%The |etaremune| environment will avoid creating labels with negative
%numbers as this can cause problems when using alphabets for
%labels.\footnote{Positions -1, -2,\dots\ in an alphabet are not
%defined by the \LaTeX\ macro \cs{@alph} and friends.} So when
%adding items to an existing list, these will be numbered with 0 on
%the next run. Another \LaTeX\ run will settle the item labels again.
%
%The optional argument \meta{options} can be used to control the
%style of the environment (see below) and the starting point (if one
%wants to replace the starting point computed by \pf{etaremune}).
%
%\vspace*{.2cm}\noindent
%\begin{minipage}{.33\linewidth}
%\begin{etaremune}[start=5]
%\item First.
%\item Second.
%\item Third.
%\end{etaremune}
%\end{minipage}
%\begin{minipage}{.666\linewidth}
%\begin{example}
% \begin{etaremune}[start=5]
%  \item First.
%  \item Second.
%  \item Third.
% \end{etaremune}
%\end{example}
%\end{minipage}
%\vspace*{.2cm}
%
%The |etaremune| environment can be nested up to four levels deep,
%like the standard |enumerate| environment. The example below also
%shows an example of customizing item labels and referring to items.
%Notice that it takes three \LaTeX\ runs for references to items in
%the |etaremune| environment to settle.
%
%\vspace*{.2cm}\noindent
%\begin{minipage}{.33\linewidth}
%\renewcommand{\labelenumi}{\theenumi)}
%\renewcommand{\theenumii}{\roman{enumii}}
%\begin{enumerate}
%\item First.
%\begin{etaremune}
%\item third.\label{notice}
%\item second.
%\item first.
%\end{etaremune}
%\item Second.
%\item Third.
%\end{enumerate}
%Notice item~\ref{notice}.
%\end{minipage}
%\begin{minipage}{.666\linewidth}
%\begin{example}
% \renewcommand{\labelenumi}{\theenumi)}
% \renewcommand{\theenumii}{\roman{enumii}}
% \begin{enumerate}
%  \item First.
%   \begin{etaremune}
%    \item third.\label{notice}
%    \item second.
%    \item first.
%   \end{etaremune}
%  \item Second.
%  \item Third.
% \end{enumerate}
% Notice item~\ref{notice}.
%\end{example}
%\end{minipage}
%\vspace*{.2cm}
%
%\DescribeOptions{topsep,partopsep,itemsep,parsep,leftmargin,rightmargin,%
%  listparindent,itemindent,labelwidth,labelsep}
%The \pf{etaremune} package allows for specifying some style
%parameters to control the markup of lists. These are the vertical
%lengths |\topsep|, |\partopsep|, |\itemsep| and |\parsep| and the
%horizontal lengths |\leftmargin|, |\rightmargin|, |\listparindent|,
%|\itemindent|, |\labelwidth| and |\labelsep|.\footnote{See for
%instance \cite{companion}, pages 144--151, for more information.}
%When set through the optional argument \meta{options}, these lengths
%are set locally (so holding only for the environment at hand).
%
%\vspace*{.2cm}\noindent
%\begin{minipage}{.33\linewidth}
%\begin{etaremune}[itemsep=0pt,parsep=0pt]
%\item third.
%\item second.
%\begin{etaremune}
%\item second.
%\item first.
%\end{etaremune}
%\item first.
%\end{etaremune}
%\end{minipage}
%\begin{minipage}{.666\linewidth}
%\begin{example}
% \begin{etaremune}[itemsep=0pt,parsep=0pt]
%  \item third.
%  \item second.
%   \begin{etaremune}
%    \item second.
%    \item first.
%   \end{etaremune}
%  \item first.
% \end{etaremune}
%\end{example}
%\end{minipage}
%\vspace*{.2cm}
%
%One can also change the style of all |etaremune| environments
%throughout the document by specifying these options in the
%|\usepackage| command.
%
%\vspace*{.2cm}\noindent
%\begin{minipage}{.33\linewidth}
%\begin{etaremune}[leftmargin=0pt,labelsep=20pt]
%\item third.
%\item second.
%\begin{etaremune}[leftmargin=0pt,labelsep=20pt]
%\item second.
%\item first.
%\end{etaremune}
%\item first.
%\end{etaremune}
%\end{minipage}
%\begin{minipage}{.666\linewidth}
%\begin{example}
% \usepackage[leftmargin=0pt,labelsep=20pt]{etaremune}
% ...
% \begin{etaremune}
% \item third.
% \item second.
%  \begin{etaremune}
%   \item second.
%   \item first.
%  \end{etaremune}
% \item first.
% \end{etaremune}
%\end{example}
%\end{minipage}
%\vspace*{.2cm}
%
%\StopEventually{}
%
% \section{Implementation}
%    \begin{macrocode}
%<*etaremune>
\NeedsTeXFormat{LaTeX2e}[1995/12/01]
\ProvidesPackage{etaremune}[2005/06/01 v1.2 Reversed enumerate (HA)]
%    \end{macrocode}
% Build global and local options. We need some delicate work with
% presets here as \LaTeX\ resets dimens locally in each environment.
% So setting lengths globally couldn't be done without presets.
%    \begin{macrocode}
\RequirePackage{xkeyval}
\def\@tempa#1#2{%
  \DeclareOptionX{#1}{\presetkeys[EM]{template}{#1=##1}{}}%
  \define@key[EM]{template}{#1}{\setlength#2{##1}}%
}
\XKV@for@n{topsep,partopsep,itemsep,parsep,leftmargin,rightmargin,%
  listparindent,itemindent,labelwidth,labelsep}\@tempb{%
  \edef\@tempb{%
    {\@tempb}\expandafter\noexpand\csname\@tempb\endcsname
  }%
  \expandafter\@tempa\@tempb
}
\DeclareOptionX*{%
  \PackageWarning{etaremune}{Unknown option `\CurrentOption'}%
}
\ProcessOptionsX
\define@cmdkey[EM]{etaremune}[EM@]{start}{}
\presetkeys[EM]{etaremune}{start=-1}{}
%    \end{macrocode}
% Two counters needed in the package.
%    \begin{macrocode}
\newcounter{EM@itemctr}
\newcounter{EM@etaremunectr}
%    \end{macrocode}
% \begin{environment}{etaremune}
% The main code.
%    \begin{macrocode}
\newenvironment{etaremune}[1][]{%
%    \end{macrocode}
% There is a (usual) maximum to nesting.
%    \begin{macrocode}
  \ifnum\@enumdepth>\thr@@\@toodeep\else
    \setkeys*[EM]{etaremune}{#1}%
    \advance\@enumdepth\@ne
%    \end{macrocode}
% Count the environments. Each environment gets a unique identification
% to be used to define macros containing the number of items and
% to set starting points on the second run.
%    \begin{macrocode}
    \stepcounter{EM@etaremunectr}%
%    \end{macrocode}
% Backup the number of items that we have seen so far in a higher
% level. We reinitialize the items counter when we get back from
% the nested environment. Unfortunately, locally counting items is
% not possible as \LaTeX\ uses a box to typeset the item label.
% Otherwise, this macros would not be necessary.
%    \begin{macrocode}
    \edef\EM@currnum{\the\c@EM@itemctr}%
%    \end{macrocode}
% This is a backup of the current level list number. This is used to
% be able to identify the current list at the end of the list taking
% into account possibly nested lists in this list.
%    \begin{macrocode}
    \edef\EM@currlist{\romannumeral\c@EM@etaremunectr}%
%    \end{macrocode}
% Define the current level list counter.
%    \begin{macrocode}
    \edef\@enumctr{enum\romannumeral\the\@enumdepth}%
%    \end{macrocode}
% Start counting items.
%    \begin{macrocode}
    \setcounter{EM@itemctr}\z@
%    \end{macrocode}
% Initialize the step size to count backwards.
%    \begin{macrocode}
    \let\EM@step\m@ne
    \ifnum\EM@start<\z@
%    \end{macrocode}
% If we have no optional input, check whether the macro for the
% current list has been defined.
%    \begin{macrocode}
      \@ifundefined{etaremune@\EM@currlist}{%
%    \end{macrocode}
% If the macro is not defined, we count forwards (like |enumerate|).
% Define the macro to produce a warning. This warning will
% be issued |\AtEndDocument| to notify the user that the document
% should be rerun.
%    \begin{macrocode}
        \let\EM@step\@ne
        \setcounter\@enumctr\m@ne
        \gdef\EM@rerun{%
          \@latex@warning@no@line{Etaremune labels have changed.^^J
          \@spaces\@spaces\@spaces\space\space Rerun to get them right}%
        }%
      }{%
%    \end{macrocode}
% If the macro is defined, it contains the number of items of the
% current list at this depth. Use that to initiate the label counter.
%    \begin{macrocode}
        \setcounter\@enumctr{\csname etaremune@\EM@currlist\endcsname}%
      }%
%    \end{macrocode}
% If there was input, use that to set the starting point.
%    \begin{macrocode}
    \else\setcounter\@enumctr\EM@start\fi
    \stepcounter\@enumctr
%    \end{macrocode}
% Start the list.
%    \begin{macrocode}
    \list{%
%    \end{macrocode}
% At every item, step the label counter, check whether it is smaller
% than 0, increase the items
% counter by 1 and define the current label for referring to items.
%    \begin{macrocode}
      \addtocounter\@enumctr\EM@step
      \ifnum\csname c@\@enumctr\endcsname<\z@\setcounter\@enumctr\z@\fi
      \stepcounter{EM@itemctr}%
      \xdef\@currentlabel{%
        \csname p@\@enumctr\endcsname\csname the\@enumctr\endcsname
      }%
%    \end{macrocode}
% Typesets the item label.
%    \begin{macrocode}
      \csname label\@enumctr\endcsname
%    \end{macrocode}
% Define how to align the label. This is the same as for the |enumerate|
% environment.
%    \begin{macrocode}
    }{\def\makelabel##1{\hss\llap{##1}}\setrmkeys[EM]{template}}%
  \fi
}{%
%    \end{macrocode}
% The end of the environment. End the list.
%    \begin{macrocode}
  \endlist
%    \end{macrocode}
% Write the number of items of the current list to the auxiliary file.
%    \begin{macrocode}
  \immediate\write\@auxout{\string\gdef\expandafter\string
    \csname etaremune@\EM@currlist\endcsname{\the\c@EM@itemctr}%
  }%
%    \end{macrocode}
% Restore the items counter to continue counting the number of items
% in the environment at this level. This is needed when lists were
% nested.
%    \begin{macrocode}
  \setcounter{EM@itemctr}\EM@currnum
}
%    \end{macrocode}
% \end{environment}
% Issue a warning when item labels haven't settled yet.
%    \begin{macrocode}
\AtEndDocument{\EM@rerun}
\let\EM@rerun\relax
%</etaremune>
%    \end{macrocode}
% \Finale
% \endinput
% \iffalse
%<*preamble>
\usepackage{url}
\usepackage{footmisc}
\usepackage{filecontents}
\usepackage{fourier}
\usepackage{etaremune}
\usepackage{xkeyval}
\usepackage{xcolor}
\usepackage{listings}
\lstnewenvironment{command}{%
  \lstset{columns=flexible,frame=single,backgroundcolor=\color{blue!20},
    xleftmargin=\fboxsep,xrightmargin=\fboxsep,escapeinside=`',gobble=1}}{}
\lstnewenvironment{example}{%
  \lstset{basicstyle=\footnotesize\ttfamily,columns=flexible,frame=single,
    backgroundcolor=\color{yellow!20},xleftmargin=\fboxsep,
    xrightmargin=\fboxsep,gobble=1}}{}
\makeatletter
\def\tableofcontents{\@starttoc{toc}}
\def\changes@#1#2#3{%
  \protected@edef\@tempa{%
    \noexpand\glossary{\textbf{#1}\hfill\emph{(#2)}%
      \levelchar
      \ifx\saved@macroname\@empty
        \space\actualchar\generalname
      \else
        \expandafter\@gobble\saved@macroname
        \actualchar\string\verb\quotechar*%
        \verbatimchar\saved@macroname\verbatimchar
      \fi
      :\levelchar #3}%
    }%
  \@tempa\endgroup\@esphack
}
\def\eTeX{$\m@th\varepsilon$-\TeX}
\renewenvironment{theglossary}{%
  \section*{Version history}%
  \GlossaryParms \let\item\@idxitem \ignorespaces
  }{}%
\def\DescribeEnv#1{\leavevmode\@bsphack
              \marginpar{\raggedleft\PrintDescribeEnv{#1}}%
              \SpecialEnvIndex{#1}\@esphack\ignorespaces}
\def\PrintDescribeEnv#1{\strut\emph{environment}\\\MacroFont #1\ }
\def\SpecialEnvIndex#1{\@bsphack
    \index{#1\actualchar{\protect\ttfamily#1}
           (environment)\encapchar usage}%
    \index{environments:\levelchar#1\actualchar{\protect\ttfamily#1}\encapchar
           usage}\@esphack}
\def\SpecialMainEnvIndex#1{\@bsphack\special@index{%
                                      #1\actualchar
                                      {\string\ttfamily\space#1}
                                      \encapchar main}%
    \special@index{environments:\levelchar#1\actualchar{%
                   \string\ttfamily\space#1}\encapchar
           main}\@esphack}
\def\SpecialOptionIndex#1{\@bsphack
    \index{#1\actualchar{\protect\ttfamily#1}
           (option)\encapchar usage}%
    \index{options:\levelchar#1\actualchar{\protect\ttfamily#1}\encapchar
           usage}\@esphack}
\def\DescribeOptions#1{\leavevmode\@bsphack
  \marginpar{\raggedleft\strut\emph{options}%
  \@for\@tempa:=#1\do{%
    \\\strut\MacroFont\@tempa\SpecialOptionIndex\@tempa
  }}\@esphack\ignorespaces}
\makeatother
\def\PrintChangesX{%
  \begingroup
    \let\efill\relax
    \PrintChanges
  \endgroup
}
\def\PrintIndexX{%
  \begingroup
    \setcounter{IndexColumns}{2}
    \setlength{\columnsep}{18pt}%
    \setlength{\columnseprule}{.4pt}%
    \PrintIndex
  \endgroup
}
\def\larg#1{{\ttfamily\char`\<}\meta{#1}{\ttfamily\char`\>}}
\def\pf#1{\textsf{#1}}
\EnableCrossrefs
\RecordChanges
\CodelineIndex
%</preamble>
%
%<*bib>
@BOOK{companion,
  author       = {Frank Mittelbach and Michel Goossens and Johannes Braams and David Carlisle and Chris Rowley},
  title        = {The {\LaTeX} {C}ompanion, {S}econd {E}dition},
  year         = {2004},
  publisher    = {{Addison-Wesley}}
}

@MISC{revnum,
  author       = {J\"orn Wilms},
  title        = {\pf{revnum} package, v1.0, 1997/05/10},
  howpublished = {\url{CTAN:/macros/latex/contrib/revnum}}
}
%</bib>
%
% \fi