forked from kcbanner/uw-wkrpt
-
Notifications
You must be signed in to change notification settings - Fork 11
/
uw-wkrpt.dtx
1986 lines (1979 loc) · 73.2 KB
/
uw-wkrpt.dtx
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
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
% \iffalse meta-comment
% uw-wkrpt.dtx - DocStrip source code for the uw-wkrpt package
% Copyright (C) 2003 Simon Law
%
% This program is free software; you can redistribute it and/or modify
% it under the terms of the GNU General Public License as published by
% the Free Software Foundation; either version 2 of the License, or
% (at your option) any later version.
%
% This program is distributed in the hope that it will be useful,
% but WITHOUT ANY WARRANTY; without even the implied warranty of
% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
% GNU General Public License for more details.
%
% You should have received a copy of the GNU General Public License
% along with this program; if not, write to the Free Software
% Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
%
% \fi
% \def\fileversion{v2.8.3}
% \def\filedate{2012/09/16}
% \iffalse
%<class>\NeedsTeXFormat{LaTeX2e}
%<class>\ProvidesPackage{uw-wkrpt}[2012/09/09 v2.8.2 UWaterloo work reports]
%<*driver>
\NeedsTeXFormat{LaTeX2e}[1995/12/01]
\documentclass[letterpaper]{ltxdoc}
\usepackage{calc}
\usepackage{url} \urlstyle{sf}
\usepackage{textcomp}
\usepackage{fancyvrb}
\usepackage{multicol}
\newlength{\ExampleWidth}
\setlength{\ExampleWidth}{3.5cm}
\fvset{gobble=6,numbersep=3pt,frame=single,
numbers=left,xleftmargin=5mm,xrightmargin=0pt}
\fvset{xrightmargin=\ExampleWidth}
\EnableCrossrefs
%\DisableCrossrefs % Say \DisableCrossrefs if index is ready
\CodelineIndex
\RecordChanges % Gather update information
%\OnlyDescription % comment out for implementation details
\OldMakeindex % use if your MakeIndex is pre-v2.9
%\setlength\hfuzz{15pt} % don't make so many
%\hbadness=7000 % over and under full box warnings
\begin{document}
\DocInput{uw-wkrpt.dtx}
\end{document}
%</driver>
% \fi
%
% \StopEventually{\PrintIndex \PrintChanges}
% \CheckSum{1135}
%
% \DoNotIndex{\#,\$,\#,\&,\@,\\,\{,\},\^,\_,\~,\ }
% \DoNotIndex{\addcontentsline, \addpenalty, \addtolength, \advance, \and}
% \DoNotIndex{\begin, \begingroup, \bfseries, \bibliographystyle, \boolean}
% \DoNotIndex{\ClassError, \ClassWarning, \clearpage, \columnwidth,
% \contentsname, \csname, \c@secnumdepth, \c@tocdepth,
% \CurrentOption}
% \DoNotIndex{\DeclareRobustCommand, \DeclareOption, \def, \@dotsep}
% \DoNotIndex{\@empty, \else, \end, \endcsname, \endgroup, \equal,
% \evensidemargin, \everyvbox}
% \DoNotIndex{\fi, \footnoterule, \footnotesize, \footskip}
% \DoNotIndex{\gdef, \global, \@gobble}
% \DoNotIndex{\@hangfrom, \hb@xt@, \hbox, \headheight, \headsep,
% \@highpenalty, \hfil, \hskip, \hss, \huge}
% \DoNotIndex{\ifdim, \ifnum, \ifthenelse, \ifx, \interlinepenalty}
% \DoNotIndex{\large, \leaders, \leavemode, \leavevmode, \lengthtest,
% \leftskip, \let, \LoadClass, \lowercase, \l@section}
% \DoNotIndex{\@M, \m@ne, \m@th, \makebox, \MakeTextUppercase,
% \medskipamount, \mkern}
% \DoNotIndex{\newcommand, \newenvironment, \newif, \newlength, \nobreak,
% \noexpand, \noindent, \null, \numberline}
% \DoNotIndex{\oddsidemargin, \or}
% \DoNotIndex{\p@, \paperheight, \paperwidth, \@@par, \par, \parbox,
% \parfillskip, \parindent, \PassOptionsToClass, \penalty,
% \@plus, \@pnumwidth, \ProcessOptions, \protect,
% \protected@edef, \providecommand}
% \DoNotIndex{\relax, \refstepcounter, \renewcommand, \renewenvironment,
% \RequirePackage, \rightskip, \rule}
% \DoNotIndex{\@svsec, \@svsechd, \@seccntformat, \@sect, \setcounter,
% \setlength, \settowidth, \small, \string}
% \DoNotIndex{\@tempdima, \@tempskipa, \textbf, \textheight, \textit,
% \textsc, \textwidth, \thanks, \thesection, \thispagestyle,
% \today, \topmargin}
% \DoNotIndex{\undefined, \urlstyle, \usepackage,
% \UWECEWorkReportVersion, \uwwkrpt@ecefalse,
% \uwwkrpt@ecetrue, \uwwkrpt@mathfalse, \uwwkrpt@mathtrue,
% \uwwkrpt@sefalse, \uwwkrpt@setrue}
% \DoNotIndex{\vfill, \vskip, \vspace}
% \DoNotIndex{\write}
% \DoNotIndex{\@xsect}
% \DoNotIndex{\z@}
% \setcounter{IndexColumns}{2}
%
% \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 \~}
%
% \changes{v1.0}{2002/08/02}{First public release of
% \textsf{\mbox{uw-ece-workreport}}.}
% \changes{v1.1}{2003/01/11}{Minor bug fixes.}
% \changes{v2.0}{2003/04/26}{First \textsf{docstrip} release.}
% \changes{v2.0}{2003/04/21}{Renamed the class to \textsf{uw-wkrpt}.}
%
%^^A Define hanging footnotes.
% \makeatletter
% \let\footnote@rig\footnote
% \newlength{\footnoteh@ngindent}
% \renewcommand{\footnote}[1]{^^A
% \setlength{\footnoteh@ngindent}{\parindent}^^A
% \footnote@rig{\setlength{\hangindent}{\footnoteh@ngindent}#1}}
% \makeatother
%
%^^A This doesn't work
%^^A \GetFileInfo{uw-wkrpt.cls}
%
% \title{The \textsf{uw-wkrpt} document class\thanks{Version \fileversion,
% last revised \filedate}}
% \author{Simon Law\thanks{\textsf{[email protected]}}}
% \def\today{\number\day \space\ifcase\month\or
% January\or February\or March\or April\or May\or June\or
% July\or August\or September\or October\or November\or December\fi
% \space\number\year}
% \maketitle
% \begin{multicols}{2}
% \tableofcontents
% \end{multicols}
%
% \section{Introduction}
%
% At the University of Waterloo,^^A
% \footnote{\url{http://www.uwaterloo.ca/}}
% thousands of undergraduate students participate
% in the co-operative education program: a partnership between the
% University and businesses world-wide to provide first-hand experience
% for students.
%
% As part of this program, students write work reports---both to enrich
% their own literary skills, and also to provide employers with
% research that is professional, analytical, and useful.
%
% \section{Justification}
%
% The Co-operative Education and Career Services (CECS) department
% mandates certain formatting and stylistic conventions. In addition,
% each department may impose their own conventions above and beyond
% the general CECS conventions. Work reports are checked to ensure
% that they conform.
%
% Human beings are fallable, however, and are liable to misinterpret
% the required conventions. Formatting a document according to fixed
% rules is something a computer should be apt at doing. Indeed, this
% \LaTeX{} document class implements the formatting so that is done
% automatically.
%
% The inquiring mind may wonder, ``why choose \LaTeX{}?'' We must
% consider that it is not a common application with which undergraduate
% students are familiar. Indeed, a word processor is more comfortable
% to most students. However, implementing the requirements of each
% style in a word processor is far from simple. Templates and styles
% are available to the student, but they are neither transparent to use
% nor easy to implement. \LaTeX{} is a simple, macro based language
% that can format text without great user effort. It can parse plain
% text with some sparse semantic tags to provide a decent report. Since
% it is coupled with the world-renowned \TeX{} typesetting engine, the
% resulting report is \ae{}sthetically pleasing and typeset tastefully.
%
% A simple \LaTeX{} document can be constructed
% easily~\cite{ref:lamport}, with the knowledge
% of just a few commands. In the example on the following page, it is
% plain to see that the majority of the document is entered as
% plain text.
% \begingroup\center
% \begin{minipage}[c]{\ExampleWidth-5mm}
%^^A We must manually hint the hyphenation here, as the English
%^^A hyphenation module knows nothing about Latin.
% Lorem ip\-sum do\-lor sit amet, con\-sec\-te\-tur
% adipi\-sicing elit, sed do eius\-mod tem\-por
% in\-ci\-di\-dunt ut labore et do\-lore magna ali\-qua.
% Ut enim ad mi\-nim ven\-iam, quis nos\-trud
% exer\-cita\-tion ullam\-co labo\-ris ni\-si ut
% ali\-quip ex ea commodo con\-se\-quat.
% \end{minipage}
% \begin{minipage}{\textwidth-\ExampleWidth}
% \fvset{xrightmargin=0pt}
% \begin{Verbatim}
% \documentclass{article}
% \begin{document}
%
% Lorem ipsum dolor sit amet, consectetur
% adipisicing elit, sed do eiusmod tempor
% incididunt ut labore et dolore magna aliqua.
% Ut enim ad minim veniam, quis nostrud
% exercitation ullamco laboris nisi ut
% aliquip ex ea commodo consequat.
%
% \end{document}
% \end{Verbatim}
% \end{minipage}
% \endcenter\endgroup
% \noindent
% Each macro is prefixed by a backslash, and is followed by an
% alphabetic identifier. Parameters to these macros are encased within
% curly braces. On line 1, we declare that this document uses the
% \textsf{article} document class, which determines certain formatting
% options. The rest of the document is created with a |\begin{document}|
% command, and finished with an |\end{document}|.
%
% Although the layout of the final text is not immediately obvious
% from the input that is keyed in, the input language is rather legible.
% One can argue that using a plain text interface allows the author
% to concentrate on the content of his message, and not the formatting.
% Since the computer does most of the formatting work, it is only
% necessary to proofread the document and tweak minor details.
%
% \section{A simple document}
%
% Sample documents that show the recommended layout are available.
% You can use these samples as a basis for your own report by removing
% the generic text, and replacing it with your own. As well, they
% provide examples for how to typeset common forms.
% These documents are stored as
% \texttt{uw-wkrpt-\textsl{faculty}.tex}, where
% \texttt{\textsl{faculty}} is one of:
% \begin{description}
% \item[\texttt{ece}] for Electrical and Computer Engineering (E\&CE)
% students, this implements the ``E\&CE work term
% report guidelines''~\cite{ref:ecewrg};
% \item[\texttt{math}] for Mathematics (Math) students, this implements
% the ``Faculty of mathematics work report
% guidelines''~\cite{ref:mwrg};
% \item[\texttt{se}] for Software Engineering (SE) students, this
% implements the ``Software engineering work report
% guidelines''~\cite{ref:sewrg}; or
% \item[\texttt{cecs}] for those students without special guidelines,
% see section \ref{sec:documentclass}
% \end{description}
%
% \subsection{The document class} \label{sec:documentclass}
%
% \begin{DescribeEnv}{\textsf{uw-wkrpt}}
% Every document needs to have a document class, so it must be
% specified. The simplest work report format is the one required by
% CECS and specified by Chapter 9 of the ``Co-operative education
% student reference manual.''~(CESRM)~\cite{ref:cesrm}. These
% guidelines are used by the majority of programs and can be used like
% so:
% \begin{verbatim}\documentclass{uw-wkrpt}\end{verbatim}
%
% However, some programs have their own special requirements. Although
% there are a number of such programs, I have only implemented the
% guidelines for E\&CE~\cite{ref:ecewrg}, Math~\cite{ref:mwrg}, and
% SE~\cite{ref:sewrg}. To specify these special
% requirements, we provide an optional argument to the |\documentclass|
% command. For example, a Math student would use:
% \begin{verbatim}\documentclass[math]{uw-wkrpt}\end{verbatim}
% Notice how |[math]| is enclosed by square brackets. Other valid
% options are |[ece]| and |[se]|.
%
% Note that no text may appear before the |\documentclass| command.
% \end{DescribeEnv}
%
% \subsection{The preamble} \label{sec:preamble}
%
% \newsavebox{\missingbegindocument}
% \begin{lrbox}{\missingbegindocument}^^A
% \verb'! LaTeX Error: Missing \begin{document}.'^^A
% \end{lrbox}
% Between the |\documentclass{uw-wkrpt}| command and the
% |\begin{document}| command is the section known as the preamble.
% No text may occur here,^^A
% \footnote{In fact, if plain text does get put in the
% preamble \LaTeX{} will complain with the error:
% \usebox{\missingbegindocument}}
% but commands to set initial values and options
% are declared at this point.
%
% \subsubsection{Mandatory values} \label{sec:mandvalues}
%
% The following commands define initial values that must be set.
% These values are used to typeset the title page (see Section
% \ref{sec:document},) and the letter of submittal (see Section
% \ref{sec:prelim}.)
%
% \begin{DescribeMacro}{\title}
% The |\title|\marg{text} command defines the work report's title.
% This will be capitalised on the title page, and included in the
% letter of submittal.
%
% This command is analogous to the standard \LaTeXe{} command.
% \end{DescribeMacro}
%
% \begin{DescribeMacro}{\author}
% The |\author|\marg{text} command defines the author's name.
%
% This command is analogous to the standard \LaTeXe{} command.
% \end{DescribeMacro}
%
% \begin{DescribeMacro}{\uwid}
% The |\uwid|\marg{text} command defines the author's student
% identification number.
% \end{DescribeMacro}
%
% \begin{DescribeMacro}{\signature}
% The |\signature|\marg{text} command defines the name of the PNG file
% with the student's signature. Only required for SE reports.
% \end{DescribeMacro}
%
% \begin{DescribeMacro}{\address}
% The |\address|\marg{text} command defines the author's home address.
% Since an address can span multiple lines, each line is separated with
% a |\\*| command.
% \begin{verbatim}\address{200 University Ave. W.,\\*
% Waterloo, ON\ \ N2L 3G1}\end{verbatim}
% Also note the use of \verb*|\ \ | ^^A*
% to force a double-space between the province and the postal code.
% \end{DescribeMacro}
%
% \begin{DescribeMacro}{\employer}
% The |\employer|\marg{text} command defines the employer's name.
% Typically, this will be the company's business name.
% \end{DescribeMacro}
%
% \begin{DescribeMacro}{\employeraddress}
% The |\employeraddress|\marg{text} command defines the employer's
% short address, which should merely be the name of the city and province.
% For example, if the employer is located in Montr\'eal, Qu\'ebec:
% \begin{verbatim}\employeraddress{Montr\'eal, QC}\end{verbatim}
% or in New York, New York, USA:
% \begin{verbatim}\employeraddress{New York, NY}\end{verbatim}
% or in London, England:
% \begin{verbatim}\employeraddress{London, UK}\end{verbatim}
% \end{DescribeMacro}
%
% \begin{DescribeMacro}{\school}
% The |\school|\marg{text} command defines the name of the school
% the author attends. This should be
% \begin{verbatim}\school{University of Waterloo}\end{verbatim}
% for most students.
% \end{DescribeMacro}
%
% \begin{DescribeMacro}{\faculty}
% The |\faculty|\marg{text} command defines the faculty or program
% the author is in.
% \end{DescribeMacro}
%
% \begin{DescribeMacro}{\userid}
% The |\userid|\marg{text} command defines the author's student id (username).
% \end{DescribeMacro}
% \changes{v2.8}{2012/04/24}{Add \textbackslash userid command.}
%
% \begin{DescribeMacro}{\email}
% The |\email|\marg{text} command defines the author's e-mail address.
% \end{DescribeMacro}
%
% \begin{DescribeMacro}{\term}
% The |\term|\marg{text} command defines the previous academic term
% the author was enrolled in. For instance, if the author has only
% finished one school term, (\emph{i.e.} she is in stream four), then
% she would use
% \begin{verbatim}\term{1A}\end{verbatim}
% because she last attended school in her 1A term.
% \end{DescribeMacro}
%
% \begin{DescribeMacro}{\program}
% The |\program|\marg{text} command defines the author's current
% program. A student in Computer Science would write
% \begin{verbatim}\program{Computer Science}\end{verbatim}
% \end{DescribeMacro}
%
% \begin{DescribeMacro}{\chair}
% The |\chair|\marg{text} command defines the very important person to
% whom your letter of submittal is submitted.
% From Section 9.9.1 of the CESRM~\cite{ref:cesrm}:
% \begin{quote}
% If this is your first report (except if you are in Arts, Math, AHS,
% Geography or Science) address your letter to Mr. B. Lumsden,
% Director, Co-operative Education \& Career Services. If it is not
% your first report or if you are in Arts, Math, Geography or Science,
% direct your letter to the Department Chair. If you are in AHS, your
% letter should be addressed to the Associate Dean of your faculty.^^A
% \footnote{This statement was quoted on 24 April 2003.}
% \end{quote}
% In Software Engineering, the letter of submittal should be addressed to
% the Director of Software Engineering.
% \end{DescribeMacro}
%
% \begin{DescribeMacro}{\chairaddress}
% The |\chairaddress|\marg{text} command defines the address to which
% you will send your report. Like the |\address| command, you should
% break lines appropriately.
% \end{DescribeMacro}
%
% \subsubsection{Optional values} \label{sec:optvalues}
%
% Some commands are completely optional and do not have to be included
% in the preamble.
%
% \begin{DescribeMacro}{\date}
% The |\date|\marg{text} command defines an arbitrary date for the title
% page and the letter of submittal. By default, today's date is used.
%
% This is analogous to the standard \LaTeXe{} command.
% \end{DescribeMacro}
%
% \begin{DescribeMacro}{\confidential}
% The |\confidential|\marg{text} command defines the confidentiality of
% the report. Most reports do not require this command. Refer to
% Section 9.7 of the CESRM~\cite{ref:cesrm} for more information.
% As an example, if the report is rated as ``Confidential-1'':
% \begin{verbatim}\confidential{Confidential-1}\end{verbatim}
%
% Please be aware that there are certain restrictions for confidential
% reports. You must speak with your field co-ordinator or faculty
% before undertaking a confidential report. Most confidential reports
% are not marked until the following term. If you work for certain
% corporations, your work report cannot be confidential. If you are in
% certain faculties, your work report cannot be confidential. For more
% information, see section 9.7 of the CESRM~\cite{ref:cesrm} and Section
% 5 of the E\&CE~\cite{ref:ecewrg} and SE~\cite{ref:sewrg} guidelines.
%
% There are several levels of confidentiality:
% \begin{description}
% \item[Not confidential] These reports can be reviewed and evaluated by
% one or more markers.
% \item[Confidential-1] These reports must be stored safely, and may only
% be evaluated by one marker. No duplicates may be
% made.
% \item[Confidential-2] One particular aspect of the report may be subject
% to a non-disclosure agreement. This must be
% negotiated between the employer and a particular
% marker.
% \item[Confidential-3] Confidential data contained in the report has been
% altered to permit disclosure.
% \item[Confidential-4] The report cannot leave the employer and must be
% evaluated by a fellow employee.
% \item[SE-confidential] This is the only level of confidentiality for
% Software Engineering reports. The report is placed in
% an envelope marked ``SE-confidential'', and is treated
% with care by the markers. No duplicates may be made.
% \end{description}
% Confidential reports are not eligible for an Outstanding grade.
% For a detailed discussion of the levels of confidentiality, see
% ``Confidential work term reports''~\cite{ref:confwtr}.
% \end{DescribeMacro}
%
% \subsubsection{Accessing values}
%
% \begin{DescribeMacro}{\theauthor}
% \begin{DescribeMacro}{\thetitle}
% \begin{DescribeMacro}{\theuwid}
% \begin{DescribeMacro}{\thesignature}
% \begin{DescribeMacro}{\theaddress}
% \begin{DescribeMacro}{\theemployer}
% \begin{DescribeMacro}{\theemployeraddress}
% \begin{DescribeMacro}{\theschool}
% \begin{DescribeMacro}{\thefaculty}
% Each of these commands reproduce the text defined by the respective
% command defined in the previous sections. Although these macros
% can be used anywhere in the report, they are used primarily in the
% \textbf{letter} environment, see Section \ref{sec:prelim}.
% \end{DescribeMacro}
% \end{DescribeMacro}
% \end{DescribeMacro}
% \end{DescribeMacro}
% \end{DescribeMacro}
% \end{DescribeMacro}
% \end{DescribeMacro}
% \end{DescribeMacro}
% \end{DescribeMacro}
% \par^^A Insert a paragraph here to flush the floats.
% \begin{DescribeMacro}{\theuserid}
% \begin{DescribeMacro}{\theemail}
% \begin{DescribeMacro}{\theterm}
% \begin{DescribeMacro}{\theprogram}
% \begin{DescribeMacro}{\thechair}
% \begin{DescribeMacro}{\thechairaddress}
% \begin{DescribeMacro}{\thedate}
% \begin{DescribeMacro}{\theconfidential}
% Here is a more comprehensive example:
% \begingroup\center
% \begin{minipage}[c]{\ExampleWidth-5mm}
% Hello, my name is J. Doe, and the title
% of my report is ``My first work report.''
% \end{minipage}
% \begin{minipage}{\textwidth-\ExampleWidth}
% \fvset{xrightmargin=0pt}
% \begin{Verbatim}
% \documentclass{uw-wkrpt}
% \title{My first work report}
% \author{J. Doe}
% % ...more definitions ...
% \begin{document}
%
% Hello, my name is \theauthor, and the title
% of my report is ``\thetitle.''
%
% \end{document}
% \end{Verbatim}
% \end{minipage}
% \endcenter\endgroup
% \end{DescribeMacro}
% \end{DescribeMacro}
% \end{DescribeMacro}
% \end{DescribeMacro}
% \end{DescribeMacro}
% \end{DescribeMacro}
% \end{DescribeMacro}
% \end{DescribeMacro}
%
% \subsection{The document} \label{sec:document}
%
% \begin{DescribeEnv}{document}
% Any text within the |\begin{document}| and |\end{document}| commands
% are said to be within the \textbf{document} environment. This text
% will be typeset into the final output, and any text after the
% environment will be ignored.
% \end{DescribeEnv}
%
% \begin{DescribeMacro}{\maketitle}
% To create the title page, the |\maketitle| command is used. This
% command should be invoked before any other text. All the necessary
% information is contained upon this page. A clear cover should be used
% to let this show through.
%
% This command is analogous to the standard \LaTeXe{} command.
% \end{DescribeMacro}
%
% \subsubsection{Preliminary pages} \label{sec:prelim}
%
% \begin{DescribeMacro}{\frontmatter}
% The |\frontmatter| command is used to tell \LaTeX{} that the next
% sections should be typeset as preliminary pages. This typically
% involves lower-case roman page numbers.
%
% This command is analogous to the standard \LaTeXe{} command in the
% \textsf{book} document class.
% \end{DescribeMacro}
%
% \begin{DescribeEnv}{letter}
% The \textbf{letter} environment does most of the difficult work
% involved in writing the letter of submittal. When |\begin{letter}| is
% invoked, the headings and salutations are laid out. On the next line,
% the body of the message should be entered. The environment is closed
% with the |\end{letter}| command, which generates the boilerplate
% disclaimer required by the guidelines, and generates the signature
% block.
%
% The \textbf{letter} environment is able to get the information
% required to generate the address blocks, the date, the salutation and
% the signature because this information was defined in the preamble, see
% section \ref{sec:preamble}.
%
% The body of the report is required to contain certain information.
% According to Section 9.9.1 of the CESRM~\cite{ref:cesrm}, this includes:
% \begin{itemize}
% \item report title (use |\thetitle|)
% \item report number (first, second, etc.)
% \item employer (use |\theemployer|)
% \item previous academic term (use |\theterm|)
% \item supervisor(s)
% \item department(s) worked for
% \item main activity of employer and department
% \item purpose of report
% \item acknowledgements and explanation of assistance
% \item statement of confidentiality, if required
% \end{itemize}
%
% Section 3.3 of the Math~\cite{ref:mwrg} guidelines also require that
% you include:
% \begin{itemize}
% \item your role in the company
% \item brief description of your duties
% \end{itemize}
% As well, you must also left-justify your letter. Although the Math
% department allows for memorandums of submittal, I do not support their
% creation.
%
% Section 2 of the E\&CE~\cite{ref:ecewrg} and SE~\cite{ref:sewrg}
% guidelines also require that you:
% \begin{itemize}
% \item state who the report was written for
% \end{itemize}
%
% This environment is analogous to the standard \LaTeXe{} environment
% in the \textsf{letter} document class.
% \end{DescribeEnv}
%
% \begin{DescribeMacro}{\section}
% The |\section|\oarg{short}\marg{text} command is set to suppress any
% section numbering in the preliminary pages. The \meta{text} argument
% specifies the section heading, and \meta{short} specifies the optional
% short heading for inclusion in the ``Table of Contents''.
%
% Unlike |\section*|\marg{text}, these sections are mentioned
% in the Table of Contents. While Section 9.9.1 of the
% CESRM~\cite{ref:cesrm} states
% that preliminary pages do not appear in the Table of Contents, this is
% not an issue since their are nor proper |\section|s in a CESRM report.
% If there is a ``Summary'' section, it appears in the Body. For a Math
% report~\cite{ref:mwrg}, the ``Summary'' is the only section in the
% preliminary pages,
% and it should be listed in the Table of Contents. For
% E\&CE~\cite{ref:ecewrg} and SE~\cite{ref:sewrg} reports, all
% preliminary sections are listed.
%
% Section 9.9.3 of the CESRM recommends that section numbers appear only
% in the body of the report, see Section \ref{sec:body}. This
% recommendation becomes a requirement in other programs.
%
% As well, each |\section| is printed on a separate page. This is
% implied by the CESRM, and required for other programs. Since it does
% not hurt to put them on separate pages, it is always done.
%
% This command is analogous to the standard \LaTeXe{} command.
% \end{DescribeMacro}
%
% \begin{DescribeMacro}{\tableofcontents}
% \begin{DescribeMacro}{\listoffigures}
% \begin{DescribeMacro}{\listoftables}
% These commands generate a ``Table of Contents'', ``List of Figures''
% and ``List of Tables'' respectively. Each table is on a separate
% page, and contains the appropriate list.
%
% Following Section 9.9.1 of the CESRM~\cite{ref:cesrm}, the Table of
% Contents lists all sections, and subsections of a report. Each entry
% is connected by dotted tab leading to the page number, which is
% right-aligned.
%
% The ``List of Figures'' and ``List of Tables'' are not considered
% sections, and are in included in the ``Table of Contents.''
% For E\&CE~\cite{ref:ecewrg} and SE~\cite{ref:sewrg} reports, however,
% they are considered sections and are listed.
%
% These commands are analogous to the standard \LaTeXe{} commands.
% \end{DescribeMacro}
% \end{DescribeMacro}
% \end{DescribeMacro}
%
% \subsubsection{The body} \label{sec:body}
%
% \begin{DescribeMacro}{\mainmatter}
% The |\mainmatter| command is used to indicate the body of the report.
% This turns section numbering back on, and causes an arabic page number to
% appear on each page.
%
% This command is analogous to the standard \LaTeXe{} command.
% \end{DescribeMacro}
%
% \begin{DescribeMacro}{\section}
% \begin{DescribeMacro}{\subsection}
% \begin{DescribeMacro}{\subsubsection}
% The sectioning commands here will now provide numbered sections,
% labelled with the appropriate heading.
% \begingroup\center
% \newcounter{oldsection}
% \setcounter{oldsection}{\value{section}}
% \newcounter{oldsubsection}
% \setcounter{oldsubsection}{\value{subsection}}
% \newcounter{oldsubsubsection}
% \setcounter{oldsubsubsection}{\value{subsubsection}}
% \setcounter{section}{0}
% \renewcommand{\addcontentsline}[3]{}
% \begin{minipage}[c]{\ExampleWidth-5mm}
% \section{Primary}
% \subsection{Primier}
% \subsubsection{Primo}
% \section{Secondary}
% \subsection{Deuxi\`eme}
% \subsubsection{Secundo}
% \end{minipage}
% \setcounter{section}{\value{oldsection}}
% \setcounter{subsection}{\value{oldsubsection}}
% \setcounter{subsubsection}{\value{oldsubsubsection}}
% \begin{minipage}{\textwidth-\ExampleWidth}
% \fvset{xrightmargin=0pt}
% \begin{Verbatim}
% \begin{document}
%
% \section{Primary}
% \subsection{Primier}
% \subsubsection{Primo}
% \section{Secondary}
% \subsection{Deuxi\`eme}
% \subsubsection{Secundo}
%
% \end{document}
% \end{Verbatim}
% \end{minipage}
% \endcenter\endgroup
%
% These commands are analogous to the standard \LaTeXe{} commands.
% \end{DescribeMacro}
% \end{DescribeMacro}
% \end{DescribeMacro}
%
% \begin{DescribeEnv}{figure}
% \begin{DescribeEnv}{table}
% The \textbf{figure} and \textbf{table} environments are used to create
% a ``float'' which encapsulates a graphic or a \textbf{tabular}
% environment, respectively.
%
% By defaults, floats try to place themselves at the top of the current
% page, however, Section 9.9.3 of the CESRM~\cite{ref:cesrm} suggests
% that figures and tables appear only after they are referenced in the
% text. Other programs require this behaviour. Therefore, a float will
% now try to place itself immediately after the |\begin{figure}| or
% |\begin{table}| command. If this is not possible, the float tries to
% place itself at the end of the current page. If this is still not
% possible, it will center itself on a dedicated page.
%
% Figures must have their captions below, and tables must have their
% captions on top. Section 9.9.3 of the CESRM~\cite{ref:cesrm}.
% shows some examples.
%
% These environments are analogous to the standard \LaTeXe{}
% environments.
% \end{DescribeEnv}
% \end{DescribeEnv}
%
% \subsubsection{Back matter}
%
% \begin{DescribeMacro}{\appendix}
% The |\appendix| command indicates that section numbers should now be
% reset, and in uppercase letters. That is to say that the first
% |\section| command will be listed as appendix ``A''.
%
% Although appendices appear in the back matter, this command should be
% issues before the |\backmatter| command.
%
% This command is analogous to the standard \LaTeXe{} command.
% \end{DescribeMacro}
%
% \begin{DescribeMacro}{\backmatter}
% The |\backmatter| command is used to indicate the back of the report.
% This turns section numbering off once more.
%
% This command is analogous to the standard \LaTeXe{} command.
% \end{DescribeMacro}
%
% \begin{DescribeMacro}{\bibliography}
% The |\bibliography| command is used to insert the bibliography, or
% ``References'' section. This should come after the |\backmatter|
% command, and refer to a B\textsc{ib}\hspace{-0.1ex}\TeX{} database.
%
% This command is analogous to the standard \LaTeXe{} command.
% \end{DescribeMacro}
%
% \section{Implementation}
% \iffalse
%<*class>
% \fi
%
% To parse the required arguments, the \textsf{ifthen} package is loaded.
% This way, the standard \LaTeX{} facilities can be used instead of the
% \TeX{} |\if| primitives.
% \begin{macrocode}
\RequirePackage{ifthen}
% \end{macrocode}
%
% \subsection{Parsing options} \label{sec:parseopts}
% Since this is a document class, the first thing to do is parse out the
% options that were passed in. To specify which program this work
% report is written for, the author passes either \texttt{math},
% \texttt{ece} or \texttt{se} options. By default, we use the CESRM
% guidelines~\cite{ref:cesrm}.
%
% So, the options are declared, and boolean flags of the form
% |uwwkrpt@|\meta{program} are declared.
% \begin{macrocode}
\newif\ifuwwkrpt@math \uwwkrpt@mathfalse
\DeclareOption{math}{%
\uwwkrpt@mathtrue
\write10{([math] Mathematics report)}}
\newif\ifuwwkrpt@ece \uwwkrpt@ecefalse
\DeclareOption{ece}{%
\uwwkrpt@ecetrue
\write10{([ece] Electrical and Computer Engineering report)}}
\newif\ifuwwkrpt@se \uwwkrpt@sefalse
\DeclareOption{se}{%
\uwwkrpt@setrue
\write10{([se] Software Engineering report)}}
% \end{macrocode}
%
% \changes{v2.0}{2003/04/26}{Select between different programs'
% guidelines.}
%
% Work reports must always be set in 12 pt.\ type. Warn the author if
% he specifies smaller type, and use 12 pt.\ nevertheless.
%
% E\&CE guidelines requre work reports to be set in 11 pt.\ type.
%
% \begin{macrocode}
\ifthenelse{\boolean{uwwkrpt@ece}}{%
\def\uwwkrpt@textsize{11pt}}{%
\def\uwwkrpt@textsize{12pt}}
\DeclareOption{10pt}{\ClassWarning{uw-wkrpt}{%
You requested a 10pt font but reports must be \uwwkrpt@textsize}}
\ifthenelse{\boolean{uwwkrpt@ece}}{%
\DeclareOption{12pt}{\ClassWarning{uw-wkrpt}{%
You requested a 12pt font but reports must be \uwwkrpt@textsize}}}{%
\DeclareOption{11pt}{\ClassWarning{uw-wkrpt}{%
You requested a 11pt font but reports must be \uwwkrpt@textsize}}}
% \end{macrocode}
%
% \changes{v2.0}{2003/04/25}{Enforce 12 pt.\ type.}
% \changes{v2.7}{2011/09/16}{Enforce 11 pt.\ type for ECE reports.}
% \changes{v2.8}{2012/04/24}{Fix bug so letter format options work. Adjust the
% spacing for `blockletter' format.}
% \changes{v2.8.1}{2012/04/25}{Remove `blockletter' and `modifiedletter'
% options.}
%
% All of the options specific to this class are declared. The rest of
% the options will be passed to the standard \LaTeXe{} \textsf{article}
% document class, the options processed, and the \textsf{article} class
% loaded.
% \begin{macrocode}
\DeclareOption*{\PassOptionsToClass {\CurrentOption}{article}}
\ProcessOptions
\LoadClass[titlepage,\uwwkrpt@textsize]{article}
% \end{macrocode}
%
% \subsection{Page margins}
%
% The standard North American paper size is U.S. letter, sized 8.5 by 11
% inches. This is the default.
%
% The left and right margins will be set to 1.5 inches wide; the top
% and bottom margins will be set to 1.0 inches wide. This is required
% by Section 9.8.5 of the CESRM~\cite{ref:cesrm}.
%
% For ECE work reports, the left margin will be set to 1.5 inches wide;
% the other margins will be 1.0 inches wide.
%
% For SE work reports, all margins are set to 1.0 inches wide.
% \begin{macrocode}
\newlength{\marginl}
\newlength{\marginr}
\newlength{\margintb}
\setlength{\marginl}{1.5in}
\setlength{\marginr}{1.5in}
\setlength{\margintb}{1in}
\ifthenelse{\boolean{uwwkrpt@ece} \or \boolean{uwwkrpt@se}}
{\setlength{\marginr}{1in}}{}
\ifthenelse{\boolean{uwwkrpt@se}}
{\setlength{\marginl}{1in}}{}
\RequirePackage[top=\margintb, bottom=\margintb, left=\marginl, right=\marginr]{geometry}
% \end{macrocode}
% \changes{v2.0}{2003/04/21}{Set margins correctly.}
% \changes{v2.2}{2003/05/05}{Set top and bottom margins to 1 inch.}
% \changes{v2.7}{2011/09/16}{Set margins correctly for E\&CE reports.}
% \changes{v2.8}{2012/04/24}{Set margins correctly for SE reports.}
%
% \subsection{Spacing}
%
% Spacing is rather important in this document, as there are several
% requirements for line spacing.
%
% To facilitate changing from single-spaced to one-and-half-spaced
% or double-spaced throughout the document, the \textsf{setspace} package
% is loaded. See Section 9.8.5 of the CESRM~\cite{ref:cesrm}.
%
% For Mathematics students, their reports must be double-spaced (See Section
% 3.1 of the Math guidelines~\cite{ref:mwrg}.) For
% Software Engineering and ECE students, their reports must be one-and-half-spaced
% (See Section 2 of the SE guidelines~\cite{ref:sewrg}.)
% \changes{v2.4}{2003/05/10}{Fixed one-and-half-spacing vs. double-spacing.}
% \begin{macrocode}
\RequirePackage{setspace}
\newcommand{\uwwkrpt@spacing}{\doublespacing}
\ifthenelse{\boolean{uwwkrpt@se} \or \boolean{uwwkrpt@ece}}
{\renewcommand{\uwwkrpt@spacing}{\onehalfspacing}}{}
% \end{macrocode}
%
% Each paragraph must be followed by a blank line, see Section 9.8.5 of
% the CESRM~\cite{ref:cesrm}. Instead of introducing a completely blank
% line, which is hideous due to spacing issues, we space each paragraph
% apart by an ex-height.\footnote{This is the height of the lower-case
% letter `x'.}
% \begin{macrocode}
\newlength{\uwwkrpt@parskip}
\ifthenelse{\boolean{uwwkrpt@se}}
{\setlength{\uwwkrpt@parskip}{1em}}
{\setlength{\uwwkrpt@parskip}{1ex}}
\setlength{\parskip}{\uwwkrpt@parskip}
\ifthenelse{\boolean{uwwkrpt@se}}{\setlength{\parindent}{0.4in}}{}
% \end{macrocode}
% \changes{v2.0}{2003/04/21}{Set paragraph spacing correctly.}
% \changes{v2.1}{2003/05/02}{Set a standard paragraph skip.}
% \changes{v2.8}{2012/04/24}{Increase the paragraph indent for SE reports.}
% \changes{v2.8.3}{2012/09/16}{Increase the paragraph skip for SE reports.}
%
% \subsection{Miscellaneous packages}
%
% The \textsf{url} package is also loaded, since it breaks
% URLs\footnote{Uniform Resource Locators} and URIs\footnote{Uniforce
% Resource Identifiers} across lines. However, the default typewriter
% font is unappealing in plain text, so it has been switched to
% sans-serif.
% \begin{macrocode}
\RequirePackage{url}
\urlstyle{sf}
% \end{macrocode}
%
% \subsection{Manditory and optional values}
%
% We override the standard \LaTeX{} commands |\title|, |\author|, and
% |\date|.
%
% \begin{macro}{\title}
% The title must be defined, and is therefore enforced. See Section
% \ref{sec:mandvalues}.
% \begin{macrocode}
\renewcommand{\title}[1]{%
\renewcommand{\@title}{#1}%
\renewcommand{\@@title}{#1}}
\newcommand{\@@title}{\ClassError{uw-wkrpt}%
{No \noexpand\title given}{}}
% \end{macrocode}
% \changes{v2.0}{2003/04/26}{\LaTeXe{} style definitions.}
% \end{macro}
%
% \begin{macro}{\author}
% The author must be defined, and is therefore enforced. See Section
% \ref{sec:mandvalues}.
% \begin{macrocode}
\renewcommand{\author}[1]{%
\renewcommand{\@author}{#1}%
\renewcommand{\@@author}{#1}}
\newcommand{\@@author}{\ClassError{uw-wkrpt}%
{No \noexpand\author given}{}}
% \end{macrocode}
% \changes{v2.0}{2003/04/26}{\LaTeXe{} style definitions.}
% \end{macro}
%
% \begin{macro}{\date}
% The date defaults to today's date. This is still an optional command,
% see Section \ref{sec:optvalues}.
% \begin{macrocode}
\renewcommand{\date}[1]{%
\renewcommand{\@date}{#1}%
\renewcommand{\@@date}{#1}}
\newcommand{\@@date}{\today}
% \end{macrocode}
% \changes{v2.0}{2003/04/26}{\LaTeXe{} style definitions.}
% \end{macro}
%
% \begin{macro}{\uwid}
% \begin{macro}{\signature}
% \begin{macro}{\address}
% \begin{macro}{\employer}
% \begin{macro}{\employeraddress}
% \begin{macro}{\school}
% \begin{macro}{\faculty}
% \begin{macro}{\userid}
% \begin{macro}{\email}
% \begin{macro}{\term}
% \begin{macro}{\program}
% \begin{macro}{\chair}
% \begin{macro}{\chairaddress}
% New variables which are defined. These, like the ones
% above, are used to construct the title page. As well, they can be
% used to construct the letter of submittal.
%
% The following are manditory values, see Section \ref{sec:mandvalues}.
% \begin{macrocode}
\newcommand{\uwid}[1]{\renewcommand{\@uwid}{#1}}
\newcommand{\@uwid}{\ClassError{uw-wkrpt}%
{No \noexpand\uwid given}{}}
\newcommand{\signature}[1]{\renewcommand{\@signature}{#1}}
\newcommand{\@signature}{\ClassError{uw-wkrpt}%
{No \noexpand\signature given}{}}
\newcommand{\address}[1]{\renewcommand{\@address}{#1}}
\newcommand{\@address}{\ClassError{uw-wkrpt}%
{No \noexpand\address given}{}}
\newcommand{\employer}[1]{\renewcommand{\@employer}{#1}}
\newcommand{\@employer}{\ClassError{uw-wkrpt}%
{No \noexpand\employer given}{}}
\newcommand{\employeraddress}[1]{\renewcommand{\@employeraddress}{#1}}
\newcommand{\@employeraddress}{\ClassError{uw-wkrpt}%