-
Notifications
You must be signed in to change notification settings - Fork 11
/
wmthesis.cls
653 lines (554 loc) · 20.4 KB
/
wmthesis.cls
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
\NeedsTeXFormat{LaTeX2e}
\ProvidesClass{wmthesis}
%%---------------------------------------------------
%%-- Helper. Credit to the sigplanconf.cls -- Shanhe
%%---------------------------------------------------
\def \@true {TT} % boolean - true
\def \@false {FL} % boolean - false
\def \@setflag #1=#2{\edef #1{#2}} % \flag = boolean
\def \@notp #1{\if #1\@false \else \@true \fi}
\def \@andp #1#2{\if #1%
\if #2\@true \else \@false \fi
\else
\@false
\fi}
\def \@orp #1#2{\if #1%
\@true
\else
\if #2\@true \else \@false \fi
\fi}
\def \@xorp #1#2{\if #1%
\if #2\@false \else \@true \fi
\else
\if #2\@true \else \@false \fi
\fi}
%%---------------------------------------------------
%%-- Options, fully customize the template -- Shanhe
%%---------------------------------------------------
\@setflag \@thesis = \@false
% \@setfalg \@dissertation = \@true
\@setflag \@proposal = \@true
\@setflag \@draft = \@true
\@setflag \@final = \@true
\DeclareOption{thesis}{\@setflag \@thesis = \@true}
\DeclareOption{dissertation}{\@setflag \@thesis = \@false}
\DeclareOption{proposal}{\@setflag \@proposal = \@true%
\@setflag \@draft = \@false%
\@setflag \@final = \@false}
\DeclareOption{draft}{\@setflag \@proposal = \@false%
\@setflag \@draft = \@true%
\@setflag \@final = \@false}
\DeclareOption{final}{\@setflag \@proposal = \@false%
\@setflag \@draft = \@false%
\@setflag \@final = \@true}
\DeclareOption*{\PassOptionsToClass{\CurrentOption}{report}}
\ProcessOptions\relax
\LoadClass{report}
%%---------------------------------------------------
%%-- Layout parameters
%%---------------------------------------------------
\setcounter{secnumdepth}{3}
\setcounter{tocdepth}{4}
\setcounter{page}{2}
%%--Create a vertical skip for the distance between the title and
%%--the first line of text on the prolog pages.
\newskip\thesisvskip
\thesisvskip 36pt
%%--Set the margins.
%\headheight6pt \headsep12pt
%\marginparwidth 1in
%\marginparsep 6pt
\oddsidemargin 0.5in%38pt %36pt
%\evensidemargin 38pt %36pt
\topmargin 0.25in
\rightmargin 0.25pt
\textwidth 5.9in
\textheight 8.4in
\footskip 24pt %%check this
%%---------------------------------------------------
%%-- Required pacakges
%%---------------------------------------------------
\PassOptionsToPackage{final}{graphicx} % make sure draft not affecting graphicx
\RequirePackage{amsmath}
\RequirePackage{amssymb}
\RequirePackage{setspace}
\RequirePackage{float}
\RequirePackage{titletoc}
\RequirePackage{import}
\RequirePackage{pdfpages}
% \renewcommand\cftchappresnum{Chapter~}
%%--Must change the margin above the Chapter heading to 2 inches
\RequirePackage{wmchapter} % defined in wmchapter.sty
\RequirePackage[T1]{fontenc}
% utility code to get the compiler type
\RequirePackage{ifxetex}
\RequirePackage{ifluatex}
\newif\ifxetexorluatex
\ifxetex
\xetexorluatextrue
\else
\ifluatex
\xetexorluatextrue
\else
\xetexorluatexfalse
\fi
\fi
%%----------------------------------------------------------------
% Set toc
%%----------------------------------------------------------------
\RequirePackage[titles]{tocloft}
\newlength\mylength
\renewcommand\cftchappresnum{\chaptername~}
\renewcommand\cftchapaftersnum{.}
\renewcommand{\cftdot}{}
\settowidth\mylength{\cftchappresnum\cftchapaftersnum\quad}
\addtolength\cftchapnumwidth{\mylength}
\renewcommand{\cftchapfont}{\normalfont } %no bold in toc
\renewcommand{\cftchappagefont}{\normalfont } %no bold in toc
%%--Set the pagestyle to headings.
\pagestyle{headings} % NOTE: need to check
%%---------------------------------------------------
%%--Change the marginpar.
%\reversemarginpar
%\let\old@marginpar=\marginpar
%\def\marginpar#1{
% \old@marginpar{\def\baselinestretch{1}\em\small #1}}
%%--------------------------------------------
%%-- Meta data.
%%--------------------------------------------
\newcommand{\thesisTitle}[1]{\gdef\thesis@title{#1}}
\newcommand{\thesisYear}[1]{\gdef\thesis@year{#1}}
\newcommand{\thesisMonth}[1]{\gdef\thesis@month{#1}}
\newcommand{\thesisAbstract}[1]{\gdef\thesis@abstract{#1}}
\newcommand{\thesisAcknowledge}[1]{\gdef\thesis@ack{#1}}
\newcommand{\thesisDedication}[1]{\gdef\thesis@dedication{#1}}
\newcommand{\thesisVita}[1]{\gdef\thesis@vita{#1}}
\newcommand{\thesisBib}[1]{\gdef\thesis@bib{#1}}
\newcommand{\thesisAdvisor}[1]{\gdef\thesis@advisor{#1}}
\newcommand{\thesisType}[1]{\gdef\ThesisType{#1}}
\newcommand{\thesisLocation}[1]{\gdef\thesis@location{#1}}
\newcommand{\thesisHometown}[1]{\gdef\ThesisHometown{#1}}
\newcommand{\thesisDegreeOne}[1]{\gdef\ThesisDegreeOne{#1}}
\newcommand{\thesisDegreeTwo}[1]{\gdef\ThesisDegreeTwo{#1}}
\newcommand{\thesisDegreeThree}[1]{\gdef\ThesisDegreeThree{#1}}
\newcommand{\thesisDepartment}[1]{\gdef\ThesisDepartment{#1}}
% \thesisAuthor macro
% defines two TeX variables (only usable in this file)
% \thesis@author is assumed to be a "short" version of the author's name
% used on the title page
% \thesis@authorx is assumed to be the full name of the author
% used on the approval, the UMI abstract, and the vita pages
% For example
% \thesisAuthor{A. Goode Student}
% sets both \thesis@author and \ thesis@authorx to
% "A. Goode Student"
% \thesisAuthor[Aloysius Goode Student]{A. Goode Student}
% sets \thesis@author to "A. Goode Student" and
% \thesis@authorx to "Aloysius Goode Student"
%
\newcommand{\thesisAuthor}[2][\empty]{
\gdef\thesis@author{#2}
\ifx#1\empty \let\thesis@authorx\thesis@author
\else \gdef\thesis@authorx{#1}\fi}
\newcounter{thesis@members}
\setcounter{thesis@members}{1}
\newcommand{\thesisCommittee}[3][\mbox{\hspace*{1ex}}]{
\edef\thesis@ctr{\romannumeral\value{thesis@members}}
\expandafter\def\csname thesis@org\thesis@ctr\endcsname{#3}
\expandafter\def\csname thesis@member\thesis@ctr\endcsname{#2}
\expandafter\def\csname thesis@dept\thesis@ctr\endcsname{#1}
\addtocounter{thesis@members}{1}}
%%----------------------------------------------------------------
% Set penalties
%%----------------------------------------------------------------
% Penalties are the main value that TeX tries to minimise when line or page breaking,
% They may be inserted explicitly (\penalty125 means that the penalty for breaking at that point is 125).
% Some penalties are built in to the TeX system and inserted automatically. Here we custom define a few.
\def\defaultpenalty{1000} \clubpenalty=\defaultpenalty
\widowpenalty=\defaultpenalty
%%--------------------------------------------
%%-- Prolog pages construction.
%%--------------------------------------------
\newcommand{\makeProlog}{
\bigskip
% \setcounter{page}{1}
% \renewcommand{\thepage}{\roman{page}}
\pagestyle{plain}
\thispagestyle{empty}
\maketitlepage % required
\if \@orp \@draft \@final
\makecopyrightpage
\if \@final
\IfFileExists{./signed_approval_page.pdf}{\includepdf{./signed_approval_page.pdf}}{\makeapprovalpage}
\else
\makeapprovalpage
\fi
\fi
\makeabstractpage % required
\maketocpage % required
\if \@orp \@draft \@final
\makeacknowledgepage
\makededicationpage
\fi
\maketablespage
\makefigurespage
% \newcommand{\makehalftitlepage}{
% \newpage
% % \setcounter{page}{1}
% \pagestyle{empty}
% \begin{center}
% \vspace*{3in}
% {\Large \thesis@title}
% \end{center}
% }
\newpage
\setcounter{page}{1}
\pagestyle{plain}
\renewcommand{\thepage}{\arabic{page}}
}
\def\acknowledgeName{ACKNOWLEDGMENTS}
\def\abstractName{ABSTRACT}
%%--------------------------------------------
%%--The title page.
\newcommand{\maketitlepage}{
\begin{titlepage}
\begin{singlespace}
\begin{center}{\large
\thesis@title \\
\hspace{.1in} \\
\hspace{.1in} \\
\hspace{.1in} \\
\hspace{.1in} \\
\hspace{.1in} \\
\hspace{.1in} \\
\hspace{.1in} \\
\hspace{.1in} \\ %8 lines between title and author name -- Ruth
\thesis@authorx \\
\hspace{.1in} \\ %1 line between name and hometown -- Ruth
\ifdefined\thesis@location \thesis@location \\ \else \ifdefined\ThesisHometown \ThesisHometown \\ \fi \fi % adding condition statements for flexibility -- Shanhe
\hspace{.1in} \\
\hspace{.1in} \\
\hspace{.1in} \\
\hspace{.1in} \\ % 4 lines between hometown and prior degrees -- Ruth
\ifdefined\ThesisDegreeOne \ThesisDegreeOne \\ \fi
\ifdefined\ThesisDegreeTwo \ThesisDegreeTwo \\ \fi
\ifdefined\ThesisDegreeThree \ThesisDegreeThree \\ \fi
% Support at most 3 previous degrees if there are more degrees, you have to manually add them. -- Shanhe
\hspace{.1in} \\
\hspace{.1in} \\
\hspace{.1in} \\
\hspace{.1in} \\ % 4 lines between prior degrees and purpose statement -- Ruth
{A \if \@thesis Thesis \else Dissertation \fi presented to the Graduate Faculty
of \\William \& Mary in Candidacy for the Degree of\\
\ifdefined\ThesisType \ThesisType \else Doctor of Philosophy \fi}\\
\hspace{.1in} \\
\hspace{.1in} \\
\hspace{.1in} \\
\hspace{.1in} \\
\hspace{.1in} \\
\hspace{.1in} \\
\hspace{.1in} \\ % 7 lines between purpose statement and department -- Ruth
{\ifdefined\ThesisDepartment \ThesisDepartment \else Department of Computer Science \fi}
\hspace{.1in} \\
\hspace{.1in} \\
\hspace{.1in} \\
\hspace{.1in} \\
\hspace{.1in} \\ % 5 lines between department and college -- Ruth
{William \& Mary\\
\thesis@month, \thesis@year}
}
\end{center}
\end{singlespace}
\end{titlepage}
}
%%--------------------------------------------
%%--The copyright page.
\newcommand{\makecopyrightpage}{
\newpage\pagestyle{empty}
\begin{center}
\begin{singlespace}
\vspace*{\fill}
\fontsize{12}{12}\selectfont
\textcopyright~Copyright by~\thesis@author~\thesis@year
\end{singlespace}
\end{center}
}
%%--------------------------------------------
%%--The approval page.
\newcommand{\thesisapprovalwidth}{3in}
\newcommand{\makeapprovalpage}{
\newpage
\pagestyle{empty}
\begin{singlespace}
\begin{center}
{\Large APPROVAL PAGE}\\
{\large \hspace{.1in} } \\
{\large \hspace{.1in} } \\
{\large \hspace{.1in} } \\ % 3 lines between title and statement -- Ruth
{\large This \if \@thesis Thesis \else Dissertation \fi is submitted in partial fulfillment of \\
the requirements for the degree of}\\
\hspace{.1in} \\ % 1 lines between statements
{\large \ifdefined\ThesisType \ThesisType \else Doctor of Philosophy \fi}\\
\hspace{.1in} \\
\hspace{.1in} \\
\hspace{.1in} \\ % 3 lines between statement and signature line -- Ruth
\underline{\hspace*{\thesisapprovalwidth}}\\
{\small \thesis@author}\\
\hspace{.1in} \\
\hspace{.1in} \\
\hspace{.1in} \\ % 3 lines between signature line and approved -- Ruth
{\large \if \@thesis Approved \else Reviewed \fi by the Committee, \thesis@month~\thesis@year}\\
\hspace{.1in} \\
\hspace{.1in} \\ % 2 lines between approved and signature line -- Ruth
\underline{\hspace*{\thesisapprovalwidth}}\\
{\small Committee Chair\\
\thesis@memberi, \thesis@depti\\
\thesis@orgi}
\hspace{.1in} \\
\hspace{.1in} \\
\hspace{.1in} \\ % 3 lines between signatures -- Ruth
\underline{\hspace*{\thesisapprovalwidth}}\\
{\small\thesis@memberii, \thesis@deptii\\
\thesis@orgii}
\hspace{.1in} \\
\hspace{.1in} \\
\hspace{.1in} \\ % 3 lines between signatures -- Ruth
\underline{\hspace*{\thesisapprovalwidth}}\\
{\small\thesis@memberiii, \thesis@deptiii\\
%-----------------
% uncomment / copy following section to add additional members to committee
%-----------------
% \thesis@orgiii}
% \hspace{.1in} \\
% \hspace{.1in} \\
% \hspace{.1in} \\ % 3 lines between signatures -- Ruth
% \underline{\hspace*{\thesisapprovalwidth}}\\
% {\small\thesis@memberiv, \thesis@deptiv\\
%-----------------
\thesis@orgiv}
\hspace{.1in} \\
\hspace{.1in} \\
\hspace{.1in} \\ % 3 lines between signatures -- Ruth
\if \@thesis
\else
\underline{\hspace*{\thesisapprovalwidth}}\\
{\small\thesis@memberv, \thesis@deptv\\
\thesis@orgv}
\fi
\end{center}
\end{singlespace}
}
%%--------------------------------------------
%%--The abstract page
%%--Title 14 and content 12, single space between
% title and content. -- Shanhe
%%-- @see https://en.wikibooks.org/wiki/LaTeX/Fonts
%%-- 11pt documentclass:
%%-- Large is 14.4pt and large is 12pt.
\newcommand{\makeabstractpage}{
\newpage
\pagestyle{empty}
\begin{singlespace}
\begin{center}
\Large\abstractName
\end{center}
\begin{flushleft}
\large{\parindent0pt \input{\thesis@abstract}}
\end{flushleft}
\end{singlespace}
}
%%--------------------------------------------
%%--The toc page
\newcommand{\maketocpage}{
\newpage
\pagestyle{plain}
\setcounter{page}{1}
\renewcommand{\thepage}{\roman{page}}
\begingroup%
\renewcommand{\bfseries}{\relax}% %prevent TOC from being bold
%%----------------------------------------------------------------
% Set the title that will be printed on the Contents page -- Ruth
%%----------------------------------------------------------------
% The negative vspace is used to make sure that only one line is
% between the title and the first line for each of these pages.
\renewcommand{\contentsname}{\begin{center}\Large\normalfont TABLE OF CONTENTS\vspace{-.75in}\end{center}}
{\large \tableofcontents }
\endgroup%
}
%%--------------------------------------------
%%--The acknowledgement page
\newcommand{\makeacknowledgepage}{
\newpage
\begin{center}
\addcontentsline{toc}{chapter}{Acknowledgments}
\Large\acknowledgeName
\end{center}
\begin{flushleft}
\begin{singlespace}
\input{\thesis@ack}
\end{singlespace}
\end{flushleft}
}
%%--------------------------------------------
%%--The dedication page
\newcommand{\makededicationpage}{
\newpage
\begin{center}
\addcontentsline{toc}{chapter}{Dedications}
\vspace*{3in}
\begin{singlespace}
{\large \thesis@dedication}
\end{singlespace}
\end{center}
}
%%--------------------------------------------
%%--The tables pages
\newcommand{\maketablespage}{%
\newpage
%\begin{singlespace}
\addcontentsline{toc}{chapter}{List of Tables}
\renewcommand\listtablename{\begin{center}\Large\normalfont LIST OF TABLES\vspace{-.6in}\end{center}}
{\large \listoftables }
%\end{singlespace}
}
%%--------------------------------------------
%%--The figures pages
\newcommand{\makefigurespage}{%
\newpage
%\begin{singlespace}
\addcontentsline{toc}{chapter}{List of Figures}
\renewcommand\listfigurename{\begin{center}\Large\normalfont LIST OF FIGURES\vspace{-.6in}\end{center}}
{\large \listoffigures }
%\end{singlespace}
}
% TODO: compliance page
% http://www.wm.edu/as/graduate/_forms/physicalstandardsforms/use-this-compliancepagetemplate-9-16-16.pdf
%%--------------------------------------------
%%-- Bibliography related commands.
%%--------------------------------------------
%%--Set the bib style
\def\thesisBibStyle{wmbib}
\renewcommand{\bibname}{References} %%--added by Zeke to change name to References
%%--Define a single command for making the bibliography.
\newcommand{\makeThesisBib}[1]{
\bibliographystyle{\thesisBibStyle}
\bibliography{#1}}
%%--Redefine the thebibliography environment
\let\wm@thebibliography\thebibliography
\let\wm@endthebibliography\endthebibliography
\def\thebibliography#1{\begin{spacing}{1}\wm@thebibliography{#1}
\addcontentsline{toc}{chapter}{Bibliography}
}
\def\endthebibliography{\wm@endthebibliography\end{spacing}}
%%--------------------------------------------
%%-- Vita
%%--------------------------------------------
\newcommand{\makeThesisVita}[1]{
\newpage
\pagestyle{headings}\markright{}
\begin{center}
\addcontentsline{toc}{chapter}{Vita}
\Large VITA
\vskip\thesisvskip
\thesis@authorx
\vskip\thesisvskip
\end{center}
\input{#1}
}
%%--------------------------------------------
%%-- Definition and Quotation commands.
%%--------------------------------------------
\newtheorem{define}{Definition}[chapter]
\newtheorem{theorem}{Theorem}[chapter]
\newtheorem{lemma}{Lemma}[chapter]
\newtheorem{notate}{Notation}[chapter]
\newtheorem{axiom}{Axiom}[chapter]
\newenvironment{proof}[1][Proof]
{\noindent {\bf #1: }}{\hfill $\blacksquare$}
%%-----------------------------------------------
%%-- Float related environments and commands.
%%-----------------------------------------------
%%--Modify behavior of the figure and table environment.
\def\fps@figure{hbt}
\def\fnum@figure{{\bf \figurename~\thefigure}}
\def\fps@table{htb}
\def\fnum@table{{\bf \tablename~\thetable}}
\def\mathfigure{\thesisfiguretrue\figure}
\def\endmathfigure{\endfigure\thesisfigurefalse}
%%--Redefine the @makecaption command so \small can be used.
\long\def\@makecaption#1#2{%
\vskip\abovecaptionskip
\sbox\@tempboxa{{\small #1: #2}}%
\def\baselinestretch{1}\small%\@newbaseline
\ifdim \wd\@tempboxa >\hsize
#1: #2\par
\else
\global \@minipagefalse
\hb@xt@\hsize{\hfil\box\@tempboxa\hfil}%
\fi
\vskip\belowcaptionskip}
%%--This allows for the correct setting of \arraystrecth in the
%%--math environments when used within a figure.
%\let\old@figure=\figure
%\let\old@endfigure=\endfigure
%\renewenvironment{figure}[1][\empty]{
% \ifx\empty \begin{old@figure}
%\def\figure{\thesisFiguretrue\old@figure}
%\def\endfigure{\global\thesisFigurefalse\old@endfigure}
%%-----------------------------------------------
%%-- Modify the displayed math environments.
%%-----------------------------------------------
\newif\ifthesisfigure
\thesisfigurefalse
%%--Set the arraystretch for math display.
\everydisplay{
\abovedisplayskip \baselinestretch\abovedisplayskip %plus 0.0pt minus 10pt%
\belowdisplayskip \abovedisplayskip%
\abovedisplayshortskip \abovedisplayshortskip%
\belowdisplayshortskip \belowdisplayshortskip%
\ifthesisfigure\def\arraystretch{1}\else\def\arraystretch{0.5}\fi}
\def\@setsize#1#2#3#4{%\@nomath#1%-KPC
\let\@currsize#1\baselineskip
#2\baselineskip\baselinestretch\baselineskip
\parskip\baselinestretch\parskip
\setbox\strutbox\hbox{\vrule height.7\baselineskip
depth.3\baselineskip width\z@}%-KPC
\normalbaselineskip\baselineskip#3#4}
%%--------------------------------------------
%%-- Miscellaneous commands.
%%--------------------------------------------
%%--Commands to simplify font changing.
% \newcommand{\sfup}{\sffamily\mdseries\upshape}
% \newcommand{\sfsc}{\ttfamily\mdseries\scshape}
% \newcommand{\sfit}{\sffamily\mdseries\itshape}
% \newcommand{\rmup}{\rmfamily\mdseries\upshape}
% \newcommand{\rmbf}{\rmfamily\bfseries\upshape}
% \newcommand{\rmit}{\rmfamily\mdseries\itshape}
% \newcommand{\ttup}{\ttfamily\mdseries\upshape}
\endinput
%%--The \tableofcontents.
%%%%% code removed REL
%%--The \listoffigures command.
\renewcommand\listoffigures{%
\if@twocolumn
\@restonecoltrue\onecolumn
\else
\@restonecolfalse
\fi
\oldchapter*{\listfigurename
\@mkboth{\uppercase{\listfigurename}}{\uppercase{\listfigurename}}}%
\@starttoc{lof}%
\if@restonecol\twocolumn\fi}
%%--The \listoftables command.
\renewcommand\listoftables{%
\if@twocolumn%
\@restonecoltrue\onecolumn%
\else%
\@restonecolfalse%
\fi%
\oldchapter*{\listtablename%
\@mkboth{\uppercase{\listtablename}}{\uppercase{\listtablename}}}%
\@starttoc{lot}%
\if@restonecol\twocolumn\fi}
\usepackage{wmchap}
\endinput