File: Rnews.dtx

package info (click to toggle)
gregmisc 2.1.5-4
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye, forky, sid, trixie
  • size: 204 kB
  • sloc: makefile: 2
file content (574 lines) | stat: -rw-r--r-- 19,469 bytes parent folder | download | duplicates (9)
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
\def\fileversion{v0.3.1}
\def\filename{Rnews}
\def\filedate{2001/09/04}
\def\docdate {2001/09/04}
%
% \iffalse
%
%%
%% Package `Rnews' to use with LaTeX2e
%% Copyright (C) 2001 by the R Core Development Team
%% Please report errors to KH or FL
%%
%% -*- LaTeX -*-
%
% \fi
%
% \iffalse
% \changes{v0.1}{2001/01/05}{First draft.}
% \changes{v0.2}{2001/07/01}
%   {Added macros \cmd\P, \cmd\E, \cmd\VAR, \cmd\COV, \cmd\COR, and
%    \cmd\operatorname.  Require \pkg{amsfonts} to produce symbols for
%    sets of positive integers etc.}
% \changes{v0.3}{2001/08/02}
%   {Add package option `driver' for typesetting the driver.
%    Change article environment to use chapters.
%    Ensure unique figure labels.}
% \changes{v0.3.1}{2001/09/04}
%   {Remove redefinition of |\caption|, which had figures hard-wired.
%    Instead, have our |figure| environment set |\@captype|.}
% \fi
%
% \MakeShortVerb{\|}
%
% \newcommand{\AmS}{$${\protect\the\textfont2 A}\kern-.1667em\lower
%   .5ex\hbox{\protect\the\textfont2 M}\kern
%   -.125em{\protect\the\textfont2 S}}
% \newcommand{\AmSLaTeX}{\mbox{\AmS-\LaTeX}}
%
% \title{The package \pkg{\filename}}
% \author{Kurt Hornik \and Friedrich Leisch}
%
% \maketitle
%
% \section{Introduction}
%
% The \LaTeXe{} package \pkg{\filename} provides commands for formatting
% the R Newsletter.
%
% \section{Documentation}
%
% \subsection{Marking Words and Phrases}
%
% The \pkg{Rnews} package provides roughly the same commands for marking
% words and phrases as does Texinfo (but note that the \LaTeX special
% characters still need special treatment).  These commands are
% \begin{description}
%  \item[\code{\cmd{\code}\{\var{sample-code}\}}]
%   Indicate text that is a literal example of a piece of a program.
%  \item[\code{\cmd{\kbd}\{\var{keyboard-characters}\}}]
%   Indicate keyboard input.
%  \item[\code{\cmd{\key}\{\var{key-name}\}}]
%   Indicate the conventional name for a key on a keyboard.
%  \item[\code{\cmd{\samp}\{\var{text}\}}]
%   Indicate text that is a literal example of a sequence of
%   characters.
%  \item[\code{\cmd{\var}\{\var{metasyntactic-variable}\}}]
%   Indicate a metasyntactic variable.
%  \item[\code{\cmd{\env}\{\var{environment-variable}\}}]
%   Indicate an environment variable.
%  \item[\code{\cmd{\file}\{\var{file-name}\}}]
%   Indicate the name of a file.
%  \item[\code{\cmd{\command}\{\var{command-name}\}}]
%   Indicate a command name (such as \samp{ls}).
%  \item[\code{\cmd{\option}\{\var{option-name}\}}]
%   Indicate a command line option.
%  \item[\code{\cmd{\dfn}\{\var{term}\}}]
%   Indicate the introductory or defining use of a term.
%  \item[\code{\cmd{\acronym}\{\var{acronym}\}}]
%   Use for abbreviattions written in all capital letters, such as
%   \samp{NASA}.
% \end{description}
% If this sounds rather confusing, please see the Texinfo documentation
% for more details.
%
% \DescribeMacro{\strong}
% There is also a |\strong| command for emphasizing text more strongly
% than with |\emph|.  For example, |\strong{Note:}| gives \strong{Note:}.
%
% \DescribeMacro{\pkg}
% Finally, use |\pkg| for indicating R packages.
%
% \subsection{Quotations and Examples}
%
% In addition to the standard \LaTeX{} for quotations and examples (such
% as |quote|, |quotation|, |flushleft|, |center| and |flushright|), the
% \pkg{\filename} package provides the following environments.
% \begin{description}
%  \item[\code{example}]
%    Illustrate code, commands, and the like.  The text is printed in a
%    fixed-width font, and indented but not filled.
%  \item[\code{smallexample}]
%    Similar to \code{example}, except that text is typeset in a smaller
%    font.
% \end{description}
%
% \subsection{Mathematics}
%
% \DescribeMacro{\P}
% \DescribeMacro{\E}
% \DescribeMacro{\VAR}
% \DescribeMacro{\COV}
% \DescribeMacro{\COR}
% The commands |\P|, |\E|, |\VAR|, |\COV|, and |\COR| produce symbols
% for probability, expectation, variance, covariance and correlation.
% For example, Chebyshev's inequality
% \DeleteShortVerb{\|}
% \begin{displaymath}
%   \P(|\xi-\E\xi|>\lambda) \le \frac{\VAR(\xi)}{\lambda^2}.
% \end{displaymath}
% can be coded as
% \MakeShortVerb{\|}
% \begin{quote}
%   \verb+\P(|\xi-\E\xi|>\lambda) \le \frac{\VAR(\xi)}{\lambda^2}+.
% \end{quote}
%
% \DescribeMacro{\mathbb}
% The symbols
% \begin{displaymath}
%   \mathbb{N}\quad\mathbb{Z}\quad\mathbb{Q}\quad\mathbb{R}\quad\mathbb{C}
% \end{displaymath}
% for the positive integers, the integers, and the rational, real and
% complex numbers, respectively, can be obtained using |\mathbb| from
% package \pkg{amsfonts} as
% \begin{quote}
%   |\mathbb{N}| |\mathbb{Z}| |\mathbb{Q}| |\mathbb{R}| |\mathbb{C}|
% \end{quote}
%
% \section{The Code}
%
% \subsection{The Batch File}
%
% First comes the code for creating the batch file \file{\filename.ins}
% which in turn can be used for producing the package and driver files.
%
%    \begin{macrocode}
%<*install>
\begin{filecontents}{\filename.ins}
% Simply TeX or LaTeX this file to extract various files from the source
% file `Rnews.dtx'.
  \def\filedate{2001/01/05} \def\batchfile{Rnews.ins} \input
  docstrip.tex \preamble
\endpreamble
\generateFile{Rnews.drv}{t}{\from{Rnews.dtx}{driver}}
\generateFile{Rnews.sty}{t}{\from{Rnews.dtx}{package}}
\Msg{***********************************************************}
\Msg{* For documentation, run LaTeX on Rnews.dtx or Rnews.drv. *}
\Msg{***********************************************************}
\end{filecontents}
%</install>
%    \end{macrocode}
%
% \subsection{The Driver}
%
% Next comes the documentation driver file for \TeX{}, i.e., the file
% that will produce the documentation you are currently reading.  It
% will be extracted from this file by the \texttt{docstrip} program.
% Since it is the first code in the file one can alternatively process
% this file directly with \LaTeXe{} to obtain the documentation.
%
%    \begin{macrocode}
%<*driver>
\documentclass[fleqn]{ltxdoc}
\usepackage[driver]{\filename}
\renewcommand{\pkg}[1]{\textsf{#1}}
\begin{document}
  \DocInput{\filename.dtx}
\end{document}
%</driver>
%    \end{macrocode}
%
% \subsection{The Code}
%
% Now comes the code for the package.
%
% It the current format is not \LaTeXe{}, we abort immediately.
% Otherwise, we provide ourselves and show the current version of the
% package on the screen and in the transscript file.
%    \begin{macrocode}
%<*package>
\NeedsTeXFormat{LaTeX2e}[1995/12/01]
\ProvidesPackage{\filename}[\filedate\space\fileversion\space
                        Rnews package]
\typeout{Package: `\filename\space\fileversion \@spaces <\filedate>'}
\typeout{English documentation as of <\docdate>}
%    \end{macrocode}
%
% Next, we set up a more or less trivial option handler.  We use option
% `driver' for conditionalizing package code we do not want executed
% when typesetting the driver file.
%    \begin{macrocode}
\RequirePackage{ifthen}
\newboolean{Rnews@driver}
\DeclareOption{driver}{\setboolean{Rnews@driver}{true}}
\DeclareOption*{\PackageWarning{\filename}{Unknown option
    `\CurrentOption'}}
\ProcessOptions\relax
%    \end{macrocode}
%
% Now comes the real code.
%
%    \begin{macrocode}
\ifthenelse{\boolean{Rnews@driver}}{}{
%    \end{macrocode}
%
% First we load some utility packages.
%    \begin{macrocode}
\RequirePackage{multicol,graphicx,color,fancyhdr,hyperref}
%    \end{macrocode}
%
% \subsubsection{Basic Structure}
%
% Issues of of \emph{R News} are created from the standard \LaTeX{}
% document class \pkg{report}.  Individual articles correspond to
% chapters, and are contained in |article| environments.  This makes it
% easy to have figures counted within articles and hence hyperlinked
% correctly.
%
% Basic front matter information about the issue: volume, number, and
% date.
%    \begin{macrocode}
\newcommand{\volume}[1]{\def\Rnews@volume{#1}}
\newcommand{\volnumber}[1]{\def\Rnews@number{#1}}
\renewcommand{\date}[1]{\def\Rnews@date{#1}}
%    \end{macrocode}
%
% We do not want numbered sections.
%    \begin{macrocode}
\setcounter{secnumdepth}{-1}
%    \end{macrocode}
%
% \begin{macro}{\author}
% \begin{macro}{\title}
% \begin{macro}{\subtitle}
% An article has an author, a title, and optionally a subtitle.  We use
% the obvious commands for specifying these.
%    \begin{macrocode}
\renewcommand{\author}[1]{\def\Rnews@author{#1}}
\renewcommand{\title}[1]{\def\Rnews@title{#1}}
\newcommand{\subtitle}[1]{\def\Rnews@subtitle{#1}}
%    \end{macrocode}
% \end{macro}
% \end{macro}
% \end{macro}
%
% \begin{environment}{article}
% Environment |article| clears the article header information its begin
% and restores single column mode at its end.
%    \begin{macrocode}
\newenvironment{article}{%
  \author{}\title{}\subtitle{}}{\end{multicols}}
%    \end{macrocode}
% \end{environment}
%
% \begin{macro}{\maketitle}
% The real work is done by a redefined version of |\maketitle|, which
% also switches to double column mode.  Note that even though we do not
% want chapters (articles) numbered, we need to increment the chapter
% counter, so that figures get correct labelling.
%    \begin{macrocode}
\renewcommand{\maketitle}{
  \chapter{\Rnews@title}
  \refstepcounter{chapter}
  \begin{multicols}{2}
    \ifx\empty\Rnews@subtitle\else\par\addvspace{\baselineskip}
    \noindent\textbf{\Rnews@subtitle}\fi
    \ifx\empty\Rnews@author\else\par\addvspace{\baselineskip}
    \noindent\textit{\Rnews@author}\fi}
%    \end{macrocode}
% \end{macro}
%
% Now for some ugly redefinitions.  We do not want articles to start a
% new page.
%    \begin{macrocode}
\renewcommand\chapter{\secdef\@chapter\@schapter}
%    \end{macrocode}
% TOC entries for articles (chapters) should really look like sections.
%    \begin{macrocode}
\renewcommand*\l@chapter{\@dottedtocline{0}{0pt}{1em}}
%    \end{macrocode}
% We need to adjust vertical spacing in |\@makechapterhead|: extra space
% before the title only if not at the beginning, no extra space after
% it.
%    \begin{macrocode}
\def\@makechapterhead#1{%
  \addvspace{2\baselineskip}%
  {\parindent \z@ \raggedright \normalfont
    \ifnum \c@secnumdepth >\m@ne
        \huge\bfseries \@chapapp\space \thechapter
        \par\nobreak
        \vskip 20\p@
    \fi
    \interlinepenalty\@M
    \Huge \bfseries #1\par\nobreak}}
%    \end{macrocode}
% We want bibliographies as starred sections within articles.  As the
% standard |thebibliography| environment uses |chapter*|, we simply
% redefine the latter according to our needs.
%    \begin{macrocode}
\def\@schapter#1{\section*#1}
%    \end{macrocode}
%
% Package \pkg{multicol}, which is used for producing two-column output,
% only allows for starred (single-column) floats (figures and tables).
% Therefore, we provide a simple non-floating |figure| environment
% ourselves.
%    \begin{macrocode}
\renewenvironment{figure}[1][]{%
  \def\@captype{figure}
  \begin{minipage}{0.9\columnwidth}}{
  \end{minipage}\par\addvspace{\baselineskip}}
%    \end{macrocode}
% Equations, figures and tables are counted within articles, but we do
% not show the article number.
%    \begin{macrocode}
\renewcommand{\theequation}{\@arabic\c@equation}
\renewcommand{\thefigure}{\@arabic\c@figure}
\renewcommand{\thetable}{\@arabic\c@table}
%    \end{macrocode}
%
% \begin{macro}{\tableofcontents}
% Need to provide our own version of |\tableofcontents| (no fiddling
% with the number of columns).  Note that |\section*| is really the same
% as |\chapter*|).
%    \begin{macrocode}
\renewcommand{\contentsname}{Contents of this issue:}
\renewcommand\tableofcontents{%
  \section*{\contentsname
    \@mkboth{%
      \MakeUppercase\contentsname}{\MakeUppercase\contentsname}}%
  \@starttoc{toc}}
%    \end{macrocode}
% \end{macro}
% \begin{macro}{\titlepage}
% The title page of each issue features logo et al at the top and the
% TOC.  We start with the top.
%    \begin{macrocode}
\renewcommand{\titlepage}{%
  \noindent
  \rule{\textwidth}{1pt}\\[-.8\baselineskip]
  \rule{\textwidth}{.5pt}
  \begin{center}
    \includegraphics[height=2cm]{Rlogo}\hspace{7mm}
    \fontsize{2cm}{2cm}\selectfont
    News
  \end{center}
  The Newsletter of the R Project\hfill
  Volume \Rnews@volume/\Rnews@number, \Rnews@date\\[-.5\baselineskip]
  \rule{\textwidth}{.5pt}\\[-.8\baselineskip]
  \rule{\textwidth}{1pt}
  \vspace{1cm}
%    \end{macrocode}
% Now set up the header and footer information for the rest of the
% document.
%    \begin{macrocode}  
  \fancyhf{}
  \fancyhead[L]{Vol.~\Rnews@volume/\Rnews@number, \Rnews@date}
  \fancyhead[R]{\thepage}
  \fancyfoot[L]{R News}
  \fancyfoot[R]{ISSN 1609-3631}
  \thispagestyle{empty}
%    \end{macrocode}
% And finally, put the TOC at the bottom in a framed box.  Note the way
% |tocdepth| is adjusted before and after producing the TOC: thus, we
% can ensure that only articles show up in the printed TOC, but that in
% the PDF version, bookmarks are created for sections and subsections as
% well (provided that the non-starred forms are used).
%    \begin{macrocode}  
  \begin{bottombox}
    \begin{multicols}{2}
      \setcounter{tocdepth}{0}
      \tableofcontents
      \setcounter{tocdepth}{2}
    \end{multicols}
  \end{bottombox}}
%    \end{macrocode}
% \end{macro}
%
% \subsubsection{Layout, Fonts and Color}
%
% \paragraph{Layout.}
% We set the basic layout parameters in a way that printouts should be
% fine for both A4 and Letter paper.
%    \begin{macrocode}
\setlength{\textheight}{250mm}
\setlength{\topmargin}{-10mm}
\setlength{\textwidth}{17cm}
\setlength{\oddsidemargin}{-6mm}
\setlength{\columnseprule}{.1pt}
\setlength{\columnsep}{20pt}
%    \end{macrocode}
%
% \paragraph{Fonts.}
% We use the following fonts (all with T1 encoding):
% \begin{center}
% \begin{tabular}{lp{0.8\textwidth}}
%   rm &  palatino \\
%   tt &  almost european (computer modern working with T1) \\
%      &  Reason for aett: uses less horizontal space than courier,
%      which is better for example code \\
%   sf &  almost european \\
%   math & palatino
% \end{tabular}
% \end{center}
%
%    \begin{macrocode}
\RequirePackage{ae,mathpple}
\RequirePackage[T1]{fontenc}
\renewcommand{\rmdefault}{ppl}
\renewcommand{\sfdefault}{aess}
\renewcommand{\ttdefault}{aett}
%    \end{macrocode}
%
% \paragraph{Colors.}  These are actually used for |\hypersetup| but we
% do not call this here, although we should.
% \marginpar{FIXME}
%    \begin{macrocode}
\definecolor{Red}{rgb}{0.7,0,0}
\definecolor{Blue}{rgb}{0,0,0.8}
\definecolor{hellgrau}{rgb}{0.55,0.55,0.55}
%    \end{macrocode}
%
% \subsubsection{Miscellania}
%
%    \begin{macrocode}
\newcommand{\R}{R}
\newcommand{\address}[1]{\addvspace{\baselineskip}\noindent\emph{#1}}
\newcommand{\email}[1]{\href{mailto:#1}{\normalfont\texttt{#1}}}
%    \end{macrocode}
%
% \begin{environment}{bottombox}
% Used for creating the TOC and the back matter editorial information.
%    \begin{macrocode}
\newsavebox{\Rnews@box}
\newlength{\Rnews@len}
\newenvironment{bottombox}{%
  \begin{figure*}[b]
    \begin{center}
      \noindent
      \begin{lrbox}{\Rnews@box}
        \begin{minipage}{0.99\textwidth}}{%
        \end{minipage}
      \end{lrbox}
      \addtolength{\Rnews@len}{\fboxsep}
      \addtolength{\Rnews@len}{\fboxrule}
      \hspace*{-\Rnews@len}\fbox{\usebox{\Rnews@box}}
    \end{center}
  \end{figure*}}
%    \end{macrocode}
% \end{environment}
%
% \begin{environment}{boxedverbatim}
% This does not seem to be used any more.
% \marginpar{FIXME}
%    \begin{macrocode}
\newenvironment{boxedverbatim}{%
  \begin{lrbox}{\Rnews@box}
    \begin{smallverbatim}}{%
    \end{smallverbatim}
  \end{lrbox}
  \hspace*{-\fboxsep}\fbox{\usebox{\Rnews@box}}}
%    \end{macrocode}
% \end{environment}
%
% Finally, we turn on fancy page style.
%    \begin{macrocode}
\pagestyle{fancy}
} % \ifthenelse{\boolean{Rnews@driver}}
%    \end{macrocode}
%
% \subsubsection{Marking Words and Phrases}
%
% Simple font selection is not good enough.  For example, |\texttt{--}|
% gives `\texttt{--}', i.e., an endash in typewriter font.  Hence, we
% need to turn off ligatures, which currently only happens for commands
% |\code| and |\samp| and the ones derived from them.  Hyphenation is
% another issue; it should really be turned off inside |\samp|.  And
% most importantly, \LaTeX{} special characters are a nightmare.  E.g.,
% one needs |\~{}| to produce a tilde in a file name marked by |\file|.
% Perhaps a few years ago, most users would have agreed that this may be
% unfortunate but should not be changed to ensure consistency.  But with
% the advent of the WWW and the need for getting `|~|' and `|#|' into
% URLs, commands which only treat the escape and grouping characters
% specially have gained acceptance (in fact, this is also what
% \pkg{alltt} does, and hence environments based on it such as our
% |smallexample|).  Hence, in the long run we should implement the same
% for |\code|, |\kbd|, |\samp|, |\var|, and |\file|.  (The other
% Texinfo-style commands do not need this.)
%
%    \begin{macrocode}
%\newcommand\code{\bgroup\@noligs\@codex}
\newcommand\code{\bgroup\@codex}
\def\@codex#1{{\normalfont\ttfamily\hyphenchar\font=-1 #1}\egroup}
\newcommand{\kbd}[1]{{\normalfont\texttt{#1}}}
\newcommand{\key}[1]{{\normalfont\texttt{\uppercase{#1}}}}
\newcommand\samp{`\bgroup\@noligs\@sampx}
\def\@sampx#1{{\normalfont\texttt{#1}}\egroup'}
\newcommand{\var}[1]{{\normalfont\textsl{#1}}}
\let\env=\code
\newcommand{\file}[1]{{`\normalfont\textsf{#1}'}}
\let\command=\code
\let\option=\samp
\newcommand{\dfn}[1]{{\normalfont\textsl{#1}}}
\newcommand{\acronym}[1]{{\normalfont\textsc{\lowercase{#1}}}}
\newcommand{\strong}[1]{{\normalfont\fontseries{b}\selectfont #1}}
\let\pkg=\strong
%    \end{macrocode}
%
% \subsubsection{Quotations and Examples}
%
%    \begin{macrocode}
\RequirePackage{alltt}
\newenvironment{example}{\begin{alltt}}{\end{alltt}}
\newenvironment{smallexample}{\begin{alltt}\small}{\end{alltt}}
\newenvironment{display}{\list{}{}\item\relax}{\endlist}
%    \end{macrocode}
%
% \subsubsection{Mathematics}
%
% \begin{macro}{\operatorname}
% The implementation of |\operatorname| is similar to the mechanism
% \LaTeXe{} uses for functions like sin and cos, and simpler than the
% one of \AmSLaTeX{}.  We use |\providecommand| for the definition in
% order to keep the one of the \pkg{amstex} if this package has
% already been loaded.
%    \begin{macrocode}
\providecommand{\operatorname}[1]{%
  \mathop{\operator@font#1}\nolimits}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\P}
% \begin{macro}{\E}
% \begin{macro}{\VAR}
% \begin{macro}{\COV}
% \begin{macro}{\COR}
% Next, we provide commands for probability, expectation, variance,
% covariance and correlation which are obviously useful in probability
% theory and statistics.
% (Of course, originally |\P| gives \mathhexbox27B.)
%    \begin{macrocode}
\renewcommand{\P}{%
  \mathop{\operator@font I\hspace{-1.5pt}P\hspace{.13pt}}}
\newcommand{\E}{%
  \mathop{\operator@font I\hspace{-1.5pt}E\hspace{.13pt}}}
\newcommand{\VAR}{\operatorname{var}}
\newcommand{\COV}{\operatorname{cov}}
\newcommand{\COR}{\operatorname{cor}}
%    \end{macrocode}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
%
% Finally, we load package \pkg{amsfonts} so that |\mathbb| is available
% for producing the symbols for positive integers etc.
%    \begin{macrocode}
\RequirePackage{amsfonts}
%    \end{macrocode}
%
% This ends the implementation of the \pkg{\filename} package.
%    \begin{macrocode}
%</package>
%    \end{macrocode}