Integrated \NAT@citex and \NAT@parse@date
[latex-mlastyle.git] / mlastyle.dtx
1 % \iffalse meta-comment
2 %
3 % Copyright (C) 2003 by Tim Pope <latex@rebelongto.us>
4 % ----------------------------------------------------
5
6 % This file may be distributed and/or modified under the
7 % conditions of the LaTeX Project Public License, either version 1.2
8 % of this license or (at your option) any later version.
9 % The latest version of this license is in:
10 %
11 %    http://www.latex-project.org/lppl.txt
12 %
13 % and version 1.2 or later is part of all distributions of LaTeX 
14 % version 1999/12/01 or later.
15 %
16 % \fi
17 %
18 % \iffalse
19 %<package>\NeedsTeXFormat{LaTeX2e}[1999/12/01]
20 %<package>\ProvidesPackage{mlastyle}
21 %<package>   [2003/11/09 v0.9 MLA format and documentation style]
22 %
23 %<*driver>
24 \begin{filecontents}{mlastyle.bib}
25 @PREAMBLE{"\def\BibTex{\rmfamily B\kern -.05em\textsc {i\kern -.025emb}\kern -.08emT\kern -.1667em\lower .7ex\hbox {E}\kern -.125emX}"}
26
27 @BOOK{handbook,
28   AUTHOR = "Joseph Gibaldi",
29   TITLE = "MLA Handbook for Writers of Research Papers",
30   KEY = "MLA Handbook",
31   EDITION = "Sixth",
32   ADDRESS = "New York",
33   PUBLISHER = "MLA",
34   YEAR = "2003"}
35
36 @BOOK{latexdps,
37   AUTHOR = "Leslie Lamport",
38   TITLE = "{\LaTeX}: A Document Preparation System",
39   KEY = "{\LaTeX}",
40   EDITION = "Second",
41   ADDRESS = "Reading",
42   PUBLISHER = "Addison-Wesley",
43   YEAR = "1994"}
44
45 @MANUAL{lshort,
46   AUTHOR  = "Tobias Oetker and Hubert Partl and Irene Hyna and Elisabeth 
47 Schlegl",
48   TITLE   = "The Not So Short Introduction to {\LaTeXe}",
49   KEY     = "Not So Short",
50   YEAR    = "2000",
51   MONTH   = dec,
52   VERSION = "4.0",
53   ACCESSDATE = "1~"#nov#"~2003",
54   URL     = "CTAN://info/lshort/"}
55
56 @MANUAL{btxdoc,
57   AUTHOR  = "Oren Patashnik",
58   TITLE   = "{\BibTex ing}",
59   YEAR    = "1988",
60   MONTH   = feb,
61   ACCESSDATE = "1~"#nov#"~2003",
62   URL     = "CTAN://biblio/bibtex/distribs/doc/btxdoc.tex"}
63 \end{filecontents}
64 \documentclass[draft]{ltxdoc}
65 \iffalse
66   \usepackage[mla]{mlastyle}
67   \bibliographystyle{mlastyle}
68   \addtolength{\marginparwidth}{1in}
69   \addtolength{\textwidth}{-1in}
70   \addtolength{\headwidth}{-1in}
71 \else
72   \IfFileExists{natbib.sty}{
73     \usepackage{natbib}
74     \citeindextrue
75     \bibpunct{[}{]}{,}{n}{}{,}%{
76     \bibliographystyle{plainnat}}
77     {\bibliographystyle{plain}}
78   \IfFileExists{url.sty}{\usepackage{url}}{}
79   \usepackage[compat]{mlastyle}
80   %\addtolength{\headsep}{-5pt}
81   %\addtolength{\headheight}{-12pt}
82   %\addtolength{\topmargin}{-17pt}
83   %\addtolength{\textheight}{22pt}
84   \IfFileExists{ulem.sty}{\usepackage[normalem]{ulem}}{\let\uline\emph}
85 \fi
86 \IfFileExists{times.sty}%
87 {\newcommand{\examp}[2][]{{\let\emph\uline\fontfamily{ptm}\selectfont##2}##1}}%
88 {\newcommand{\examp}[2][]{``##2##1''}}
89
90 {\makeatletter\gdef\NAT@MLA#1{#1}\gdef\NAT@idxtxt
91 {\expandafter\NAT@MLA\NAT@name{} \NAT@open\NAT@num\NAT@close}}
92 \EnableCrossrefs
93 \CodelineIndex
94 \RecordChanges
95 %\OnlyDescription
96 \begin{document}
97   \DocInput{mlastyle.dtx}
98 \end{document}
99 %</driver>
100 % \fi
101 %
102 % \CheckSum{0}
103 %
104 % \CharacterTable
105 %  {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
106 %   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
107 %   Digits        \0\1\2\3\4\5\6\7\8\9
108 %   Exclamation   \!     Double quote  \"     Hash (number) \#
109 %   Dollar        \$     Percent       \%     Ampersand     \&
110 %   Acute accent  \'     Left paren    \(     Right paren   \)
111 %   Asterisk      \*     Plus          \+     Comma         \,
112 %   Minus         \-     Point         \.     Solidus       \/
113 %   Colon         \:     Semicolon     \;     Less than     \<
114 %   Equals        \=     Greater than  \>     Question mark \?
115 %   Commercial at \@     Left bracket  \[     Backslash     \\
116 %   Right bracket \]     Circumflex    \^     Underscore    \_
117 %   Grave accent  \`     Left brace    \{     Vertical bar  \|
118 %   Right brace   \}     Tilde         \~}
119 %
120 %
121 % \changes{v0.9}{2003/11/09}{Converted to \texttt{dtx} file}
122 % \changes{v0.8}{2003/10/15}{Initial version}
123 %
124 % \GetFileInfo{mlastyle.sty}
125 %
126 % \makeatletter ^^A Get |\ | out of my index, damn it!
127 % \def\DoNotIndex{\begingroup \MakePrivateLetters
128 % \catcode`\\12
129 % \catcode`\ 12
130 % \do@not@index}
131 % \index@excludelist{\ }
132 % \makeatother
133 % \DoNotIndex{\ ,\:,\/,\.}
134 % \DoNotIndex{\@afterindentfalse,\@afterindenttrue}
135 % \DoNotIndex{\@arabic}
136 % \DoNotIndex{\@author}
137 % \DoNotIndex{\@auxout}
138 % \DoNotIndex{\@biblabel,\@citea,\@citeb,\@citex}
139 % \DoNotIndex{\@date}
140 % \DoNotIndex{\@empty}
141 % \DoNotIndex{\@for}
142 % \DoNotIndex{\@ifnextchar,\@ifstar,\@ifundefined}
143 % \DoNotIndex{\@latex@warning}
144 % \DoNotIndex{\@listI}
145 % \DoNotIndex{\@listi,\@listii,\@listiii}
146 % \DoNotIndex{\@listiv,\@listv,\@listvi}
147 % \DoNotIndex{\@m}
148 % \DoNotIndex{\@noitemerr}
149 % \DoNotIndex{\@setfontsize}
150 % \DoNotIndex{\@startsection}
151 % \DoNotIndex{\@tempswafalse}
152 % \DoNotIndex{\@title}
153 % \DoNotIndex{\@undefined}
154 % \DoNotIndex{\@xiipt}
155 % \DoNotIndex{\@width,\@height,\@depth}
156 % \DoNotIndex{\@minus,\@plus}
157 % \DoNotIndex{\DeclareOption}
158 % \DoNotIndex{\ExecuteOptions}
159 % \DoNotIndex{\G@refundefinedtrue}
160 % \DoNotIndex{\NAT@@citetp,\NAT@citetp,\NAT@ctype,\NAT@date,\NAT@sep}
161 % \DoNotIndex{\hyper@natlinkbreak,\hyper@natlinkend,\hyper@natlinkstart}
162 % \DoNotIndex{\@citec,\@extra@b@citeb,\@firstofone,\@namedef}
163 % \DoNotIndex{\NAT@@close,\NAT@@open,\NAT@alias,\NAT@all@names,\NAT@aysep}
164 % \DoNotIndex{\NAT@cite@list,\NAT@citeundefined,\NAT@cmt,\NAT@exlab}
165 % \DoNotIndex{\NAT@last@nm,\NAT@last@yr,\NAT@name,\NAT@nm,\NAT@nmfmt}
166 % \DoNotIndex{\NAT@parse,\NAT@sort@cites,\NAT@temp,\NAT@year,\NAT@yrsep}
167 % \DoNotIndex{\ifNAT@par,\ifNAT@swa,\ifNAT@full,\ifNAT@longnames}
168 % \DoNotIndex{\PackageWarning,\PackageWarningNoLine,\MessageBreak}
169 % \DoNotIndex{\ProcessOptions}
170 % \DoNotIndex{\RequirePackage}
171 % \DoNotIndex{\UL@start,\UL@stop}
172 % \DoNotIndex{\url@samestyle,\urlstyle,\UrlBigBreaks,\UrlBreakPenalty}
173 % \DoNotIndex{\do@url@hyp}
174 % \DoNotIndex{\abovedisplayskip,\abovedisplayshortskip}
175 % \DoNotIndex{\belowdisplayshortskip,\belowdisplayskip}
176 % \DoNotIndex{\addtolength}
177 % \DoNotIndex{\advance}
178 % \DoNotIndex{\baselineskip}
179 % \DoNotIndex{\bibpreamble,\bibpunct,\bibsep}
180 % \DoNotIndex{\begin}
181 % \DoNotIndex{\bfseries}
182 % \DoNotIndex{\bgroup,\egroup,\begingroup,\endgroup}
183 % \DoNotIndex{\c@enumiv}
184 % \DoNotIndex{\catcode}
185 % \DoNotIndex{\centering}
186 % \DoNotIndex{\centerline}
187 % \DoNotIndex{\chapter}
188 % \DoNotIndex{\citation}
189 % \DoNotIndex{\citet,\citep}
190 % \DoNotIndex{\clearpage}
191 % \DoNotIndex{\color@begingroup,\color@endgroup}
192 % \DoNotIndex{\csname}
193 % \DoNotIndex{\day}
194 % \DoNotIndex{\def}
195 % \DoNotIndex{\do}
196 % \DoNotIndex{\edef}
197 % \DoNotIndex{\else}
198 % \DoNotIndex{\end}
199 % \DoNotIndex{\endcsname}
200 % \DoNotIndex{\endlist}
201 % \DoNotIndex{\exhyphenpenalty}
202 % \DoNotIndex{\expandafter}
203 % \DoNotIndex{\f@baselineskip}
204 % \DoNotIndex{\fancyhf}
205 % \DoNotIndex{\fancypagestyle}
206 % \DoNotIndex{\fi}
207 % \DoNotIndex{\futurelet}
208 % \DoNotIndex{\gdef}
209 % \DoNotIndex{\global}
210 % \DoNotIndex{\hbox,\hfill,\hrule}
211 % \DoNotIndex{\hangindent}
212 % \DoNotIndex{\headrulewidth,\footrulewidth}
213 % \DoNotIndex{\ignorespaces}
214 % \DoNotIndex{\if@filesw}
215 % \DoNotIndex{\if@tempswa}
216 % \DoNotIndex{\if,\ifcase,\ifcat,\ifdim,\ifhmode,\ifnum,\ifx}
217 % \DoNotIndex{\ifmlastyle@bibstyle}
218 % \DoNotIndex{\ifmlastyle@format}
219 % \DoNotIndex{\ifmlastyle@pages}
220 % \DoNotIndex{\ifmlastyle@papersize}
221 % \DoNotIndex{\ifmlastyle@style}
222 % \DoNotIndex{\ifmlastyle@times}
223 % \DoNotIndex{\ifmlastyle@underline}
224 % \DoNotIndex{\immediate}
225 % \DoNotIndex{\insert,\insertpenalties}
226 % \DoNotIndex{\item}
227 % \DoNotIndex{\itemindent}
228 % \DoNotIndex{\itemsep}
229 % \DoNotIndex{\kern}
230 % \DoNotIndex{\labelsep,\labelwidth}
231 % \DoNotIndex{\lastname,\citeN}
232 % \DoNotIndex{\leaders}
233 % \DoNotIndex{\leavevmode}
234 % \DoNotIndex{\leftmargin}
235 % \DoNotIndex{\leftmargini,\leftmarginii,\leftmarginiii}
236 % \DoNotIndex{\leftmarginiv,\leftmarginv,\leftmarginvi}
237 % \DoNotIndex{\let,\long}
238 % \DoNotIndex{\linespread}
239 % \DoNotIndex{\list}
240 % \DoNotIndex{\listparindent}
241 % \DoNotIndex{\mathchardef}
242 % \DoNotIndex{\makeenmark}
243 % \DoNotIndex{\mbox}
244 % \DoNotIndex{\ml@}
245 % \DoNotIndex{\mlastyle@bibstylefalse}
246 % \DoNotIndex{\mlastyle@bibstyletrue}
247 % \DoNotIndex{\mlastyle@cite}
248 % \DoNotIndex{\mlastyle@course}
249 % \DoNotIndex{\mlastyle@formatfalse}
250 % \DoNotIndex{\mlastyle@formattrue}
251 % \DoNotIndex{\mlastyle@instructor}
252 % \DoNotIndex{\mlastyle@intbib}
253 % \DoNotIndex{\mlastyle@intnfs}
254 % \DoNotIndex{\mlastyle@pagesfalse}
255 % \DoNotIndex{\mlastyle@pagestrue}
256 % \DoNotIndex{\mlastyle@papersizefalse}
257 % \DoNotIndex{\mlastyle@papersizetrue}
258 % \DoNotIndex{\mlastyle@prevsplit}
259 % \DoNotIndex{\mlastyle@qspread}
260 % \DoNotIndex{\mlastyle@sl@sh}
261 % \DoNotIndex{\mlastyle@slash}
262 % \DoNotIndex{\mlastyle@slashnext}
263 % \DoNotIndex{\mlastyle@slashx}
264 % \DoNotIndex{\mlastyle@star}
265 % \DoNotIndex{\mlastyle@stylefalse}
266 % \DoNotIndex{\mlastyle@styletrue}
267 % \DoNotIndex{\mlastyle@surname}
268 % \DoNotIndex{\mlastyle@timesfalse}
269 % \DoNotIndex{\mlastyle@timestrue}
270 % \DoNotIndex{\mlastyle@underlinefalse}
271 % \DoNotIndex{\mlastyle@underlinetrue}
272 % \DoNotIndex{\mlastyle@urldate}
273 % \DoNotIndex{\month}
274 % \DoNotIndex{\newblock}
275 % \DoNotIndex{\newcommand}
276 % \DoNotIndex{\newdimen}
277 % \DoNotIndex{\newenvironment}
278 % \DoNotIndex{\newif}
279 % \DoNotIndex{\newpage}
280 % \DoNotIndex{\noindent}
281 % \DoNotIndex{\normalsize}
282 % \DoNotIndex{\notesname}
283 % \DoNotIndex{\number}
284 % \DoNotIndex{\or}
285 % \DoNotIndex{\p@}
286 % \DoNotIndex{\pagestyle}
287 % \DoNotIndex{\par}
288 % \DoNotIndex{\parindent}
289 % \DoNotIndex{\parsep}
290 % \DoNotIndex{\penalty}
291 % \DoNotIndex{\protected@xdef}
292 % \DoNotIndex{\relax}
293 % \DoNotIndex{\relpenalty}
294 % \DoNotIndex{\renewcommand}
295 % \DoNotIndex{\renewenvironment}
296 % \DoNotIndex{\rhead}
297 % \DoNotIndex{\reset@font,\selectfont}
298 % \DoNotIndex{\rule,\strut,\strutbox}
299 % \DoNotIndex{\splittopskip}
300 % \DoNotIndex{\setlength}
301 % \DoNotIndex{\settowidth}
302 % \DoNotIndex{\sfcode}
303 % \DoNotIndex{\skip}
304 % \DoNotIndex{\sloppy}
305 % \DoNotIndex{\space}
306 % \DoNotIndex{\string}
307 % \DoNotIndex{\the}
308 % \DoNotIndex{\thebibliography}
309 % \DoNotIndex{\thepage}
310 % \DoNotIndex{\topsep}
311 % \DoNotIndex{\usecounter}
312 % \DoNotIndex{\unskip}
313 % \DoNotIndex{\vbox,\vskip,\vss}
314 % \DoNotIndex{\xdef}
315 % \DoNotIndex{\write}
316 % \DoNotIndex{\year}
317 % \DoNotIndex{\z@}
318 % \DoNotIndex{\footnotesep,\footins,\@finalstrut,\@makefnmark}
319 % \DoNotIndex{\bibhang}
320 % \DoNotIndex{\evensidemargin}
321 % \DoNotIndex{\headheight}
322 % \DoNotIndex{\headsep,\footskip}
323 % \DoNotIndex{\hoffset}
324 % \DoNotIndex{\marginparwidth}
325 % \DoNotIndex{\oddsidemargin}
326 % \DoNotIndex{\raggedbottom}
327 % \DoNotIndex{\raggedright}
328 % \DoNotIndex{\textheight}
329 % \DoNotIndex{\textwidth}
330 % \DoNotIndex{\topmargin}
331 % \DoNotIndex{\voffset}
332 % \DoNotIndex{\paperheight}
333 % \DoNotIndex{\paperwidth}
334 % \DoNotIndex{\pdfpageheight}
335 % \DoNotIndex{\pdfpagewidth}
336 % \DoNotIndex{\special}
337 %
338 % \hyphenation{pre-am-ble wide-spread}
339 %
340 % \newcommand{\Lopt}[1]{\textsf {#1}}
341 % \newcommand{\file}[1]{\texttt {#1}}
342 % \newcommand{\package}[1]{\textsf {#1}}
343 % ^^A\newcommand{\Lcount}[1]{\textsl {\small#1}}
344 % ^^A\newcommand{\pstyle}[1]{\textsl {#1}}
345 %
346 % \newcommand{\OptionIndex}[1]{\index{#1\actualchar\Lopt{#1} (option)\encapchar usage}\index{options:\levelchar\Lopt{#1}}}
347 %
348 % \title{The \package{mlastyle} package\thanks{This document
349 %   corresponds to \package{mlastyle}~\fileversion, dated \filedate.}}
350 % \author{Tim Pope \\ \texttt{latex@rebelongto.us}}
351 % \surname{Pope}
352 %
353 % \maketitle
354 %
355 % \tableofcontents
356 %
357 % \section{Introduction}
358 %
359 % ^^A MLA style, consisting of a set of documentation conventions, has
360 % ^^A gained widespread acceptance in the humanities.
361 % According to the {\em MLA Handbook for Writers of Research
362 % Papers}\citeC{handbook}, MLA style is a set of ``commonly agreed-on
363 % rules for documenting quotations, facts, opinions and paraphrases'' that
364 % ``is preferred by a substantial majority of scholarly journals in
365 % language and literature{\makeatletter\ifmlastyle@style
366 % .''\citeM[xvi]{handbook}\else.''\fi} \LaTeX{} is a
367 % document preparation system enjoying popularity in the scientific field.
368 % It should come as no surprise that complete, up-to-date implementations
369 % of MLA style for \LaTeX{} are in short supply.  The \LaTeX{} package
370 % \package{mlastyle} aims to fill this void.
371 %
372 % \section{Usage}
373 %
374 % A sample document follows.
375 % \begin{verbatim}
376 %\documentclass[12pt]{article}
377 %\usepackage{mlastyle}
378 %
379 %\author{John Doe}
380 %\instructor{Professor Smith}
381 %\course{English 101}
382 %\date{1~Jan.\ 1970}
383 %\title{The Sadism Inherent in Compulsory English Classes}
384 %
385 %\begin{document}
386 %\maketitle
387 %'Nuff said.
388 %\end{document}\end{verbatim}
389 % \subsection{Initialization Macros}
390 % The \index{heading|usage}mandatory heading is generated with
391 % \DescribeMacro{\maketitle}|\maketitle|.  Use the standard macros
392 % |\author|, |\title|, and |\date| to specify the relevant information.
393 % To define the instructor and name of the course, use the aptly named
394 % \DescribeMacro{\instructor}|\instructor|\marg{instructor} and
395 % \DescribeMacro{\course}|\course|\marg{course} macros.
396 %
397 % The last name for use in the header\index{header|usage} is derived from
398 % |\author|.  If this does not produce the desired result, use
399 % \DescribeMacro{\surname}|\surname|\marg{last name} to override it.
400 %
401 % MLA style recommends the DD~Mon.~YYYY format for specifying dates;
402 % \DescribeMacro{\today}|\today| has been conveniently redefined to this.
403 % However, other formats can be used as long as done so consistently
404 % throughout the document.  Also note that the date in the
405 % heading\index{heading|usage} should be the due date of the assignment;
406 % students who finish assignments early would be wise to call
407 % |\date|\marg{due date}.
408 %
409 % \subsection{Environments}
410 % Three environments have been modified from standard \LaTeX to better
411 % suit MLA format.  To typeset \index{poetry|usage}poetry and
412 % \index{drama|usage}drama, use the \DescribeEnv{verse}|verse|
413 % environment.  Quotations\index{quotations|usage} of a single paragraph
414 % or less always use the \DescribeEnv{quote}|quote| environment.  For
415 % longer passages, use the \DescribeEnv{quotation}|quotation| environment
416 % if the beginning of the passage marks the beginning of a paragraph.
417 % Otherwise, use the |quote| environment.
418 %
419 % Be sure to follow MLA guidelines when using these environments.  Short
420 % quotes should be enclosed in quotation marks and included directly in
421 % the text.
422 %
423 % \subsection{Modes of Operation}
424 % The \package{mlastyle} package has four basic modes of operations,
425 % selected with one of four mutually exclusive options.  The
426 % \OptionIndex{format}\Lopt{format}
427 % option tells \package{mlastyle} to use MLA format (i.e., 1 inch margins,
428 % double-spaced, etc.).  The \OptionIndex{style}\Lopt{style} option tells
429 % \package{mlastyle} to use MLA style (i.e., the format of parenthetical
430 % documentation, etc).  Each of these options
431 % disables the other; to use both MLA format and MLA style, specify the
432 % \OptionIndex{mla}\Lopt{mla} option, or nothing at all.
433 %
434 % To disable both MLA style and MLA format, use the
435 % \OptionIndex{compat}\Lopt{compat} option.  This differs from omitting
436 % the package entirely in that certain macros are still defined (e.g.,
437 % |\instructor|).  Also, citations are handled a bit differently than in
438 % standard \LaTeX{} (see section~\ref{sec:documentation}).
439 %
440 % In addition to the above, several other options modify the behavior of
441 % \package{mlastyle}.
442 %
443 % \subsubsection{Italics vs.\ Underlining} \index{underlining|usage}
444 % \index{italics|usage}\label{sec:italics}
445 % The {\em MLA Handbook\/}\citeC{handbook} dictates that emphasis should
446 % be indicated by underlining the text\citeM[94]{handbook}.  Thus, the
447 % \package{ulem} package, which underlines all emphasized
448 % text, is loaded by default in \Lopt{mla} and \Lopt{format} modes.  To
449 % disable this, use the \OptionIndex{italics}\Lopt{italics} option.
450 % Conversely, if underlining is desired in \Lopt{style} or \Lopt{compat}
451 % mode, the \OptionIndex{underline}\Lopt{underline} option can be used.
452 %
453 % \subsubsection{Fonts}
454 % By default, \package{mlastyle} uses \TeX's standard Computer Modern
455 % font.  Some profess\-ors\penalty500---particularly those
456 % concerned with document length---require assignments to be set in
457 % \examp[.]{Times New Roman}  This can be achieved with the
458 % \OptionIndex{times}\Lopt{times} option, which simply loads the
459 % \package{times} package.  This opposite of this option is
460 % \OptionIndex{cm}\Lopt{cm}, which reverts to Computer Modern.
461 %
462 % \index{works cited|usage}
463 % \subsection{Documenting Sources} \label{sec:documentation}
464 %
465 % The \package{mlastyle} package reimplements the
466 % \DescribeEnv{thebibliography}|thebibliography| environment to generate
467 % the list of works cited in MLA style.  Instruction in the basic use of
468 % \LaTeX's bibliography features is beyond the scope of this document;
469 % however, the following example, which should be included just before
470 % |\end{document}|, might prove to be a useful starting point:
471 %\begin{verbatim}
472 %\begin{thebibliography}{}
473 %
474 %\bibitem[Lamport]{latexdps}
475 %Lamport, Leslie.
476 %\newblock \emph{\LaTeX: A Document Preparation System}.
477 %\newblock 2nd.~ed.
478 %\newblock Reading: Addison-Wesley, 1994.
479 %
480 %\end{thebibliography}\end{verbatim}
481 % In this example, |Lamport| is the author's last name (for use in
482 % citations) and |latexdps| is the marker used to reference it (see
483 % section~\ref{sec:parenthetical}).
484 %
485 % For information on automatically generating the list of works cited with
486 % \BibTeX, see section~\ref{sec:bibtex}.
487 %
488 % \subsubsection{Parenthetical Documentation} \label{sec:parenthetical}
489 % A simple citation can by achieved with a call to
490 % \DescribeMacro{\cite}|\cite|\oarg{pages}\marg{marker}, where
491 % marker refers to the key given to either
492 % \index{BibTeX=\BibTeX|usage}\BibTeX{} or the |\bibitem| macro (|latex|
493 % in the above example).
494 % Omit \oarg{pages} if the source has no page numbers.
495 % Multiple sources can be cited using the syntax
496 % |\cite|\oarg{pages}|{|\meta{marker
497 % 1}\texttt{,}\penalty\exhyphenpenalty\meta{marker 2}\ldots|}|; however, page
498 % numbers can currently be specified only for the last referenced source.
499 % To work around this limitation, use |\citealp|, explained below.
500 %
501 % Three additional citation commands are provided, all of which take the
502 % same arguments as |\cite|.  To omit the author information from the
503 % citation, use \DescribeMacro{\citepage}|\citepage|.  Indirect
504 % citations---those of the format \examp{(qtd. in Pope
505 % \pageref{sec:italics})}---can be
506 % created with \DescribeMacro{\citeindirect}|\citeindirect|.  Finally, the
507 % parentheses are omitted by \DescribeMacro{\citealp}|\citealp|.  This was
508 % intended for use in cross references, but it can also help in citing
509 % multiple works.  The result of
510 % |(\citealp[42]{texbook}|\texttt{; }|\citealp[69]{latexdps})|
511 % would be something like \examp[.]{(Knuth 42; Lamport 69)}
512 %
513 % \subsubsection{Using {\rm \BibTeX}} \label{sec:bibtex}
514 % Coupled with \index{BibTeX=\BibTeX|usage}\BibTeX,
515 % \package{mlastyle} provides a experimental implementation of MLA
516 % documentation style.  Put\SpecialUsageIndex{\bibliographystyle}
517 % |\bibliographystyle{mlastyle}| in the document preamble to load the
518 % bibliography style.  Alternatively, the
519 % \OptionIndex{bibstyle}\Lopt{bibstyle} option can handle this
520 % automatically, loading a bibliography style of |mlastyle| in \Lopt{mla}
521 % and \Lopt{style} modes and a bibliography style of |plain| in
522 % \Lopt{format} and \Lopt{compat} modes.
523 %
524 % Use of \BibTeX{} is also beyond the scope of this document; consult
525 % Patashnik\citeC{btxdoc} for an introduction.
526 % Briefly, to use the following example, substitute
527 % |\bibliography|\marg{filename} for the |thebibliography| environment.
528 % Then create \meta{filename}\file{.bib} with the contents below.
529 % Generating the document entails running \file{latex} on the \file{.tex}
530 % file, \file{bibtex} on the resulting \file{.aux} file, then \file{latex}
531 % twice more.
532 %\begin{verbatim}
533 %@BOOK{latexdps,
534 %  AUTHOR = "Leslie Lamport",
535 %  TITLE = "{\LaTeX}: A Document Preparation System",
536 %  KEY = "{\LaTeX}",
537 %  EDITION = "Second",
538 %  ADDRESS = "Reading",
539 %  PUBLISHER = "Addison-Wesley",
540 %  YEAR = "1994"}\end{verbatim}
541 %
542 % In \package{mlastyle}, The |KEY| field serves the additional purpose of
543 % specifying an abbreviated title.  This is unnecessary in the above
544 % example.  If an additional book by Leslie Lamport was included, however,
545 % the |KEY| field would allow |\cite{latexdps}| to yield \examp{(Lamport,
546 % \emph{\LaTeX\/})} instead of \examp[.]{(Lamport, \emph{\LaTeX: A
547 % Doc\-um\-ent Pre\-pa\-ra\-tion Sys\-tem\/})}
548 %
549 % Note that only entries referenced by a citation are included in the list
550 % of works cited; to force the inclusion of an entry or all entries, use
551 % |\nocite|\marg{marker} and |\nocite{*}|, respectively.
552 %
553 % \StopEventually{\PrintChanges\bibliography{mlastyle}\PrintIndex}
554 %
555 % \section{Implementation}
556 %    \begin{macrocode}
557 %<*package>
558 %    \end{macrocode}
559 %
560 % \subsection{Options}
561 % \begin{macro}{\ifmlastyle@*}
562 % \begin{macro}{\mlastyle@*true}
563 % \begin{macro}{\mlastyle@*false}
564 % Most options are implemented by modifying a |\newif| declared for that
565 % purpose.
566 %    \begin{macrocode}
567 \newif\ifmlastyle@bibstyle
568 \DeclareOption{bibstyle}{\mlastyle@bibstyletrue}
569 \DeclareOption{nobibstyle}{\mlastyle@bibstylefalse}
570 \newif\ifmlastyle@papersize
571 \DeclareOption{papersize}{\mlastyle@papersizetrue}
572 \DeclareOption{nopapersize}{\mlastyle@papersizefalse}
573 \newif\ifmlastyle@underline
574 \DeclareOption{underline}{\mlastyle@underlinetrue}
575 \DeclareOption{italics}{\mlastyle@underlinefalse}
576 \newif\ifmlastyle@times
577 \DeclareOption{times}{\mlastyle@timestrue}
578 \DeclareOption{cm}{\mlastyle@timesfalse}
579 \newif\ifmlastyle@style
580 \DeclareOption{compat}{\mlastyle@stylefalse
581         \mlastyle@formatfalse
582         \mlastyle@underlinefalse}
583 \DeclareOption{mla}{\mlastyle@styletrue
584         \mlastyle@formattrue
585         \mlastyle@underlinetrue}
586 \newif\ifmlastyle@format
587 \DeclareOption{format}{\mlastyle@stylefalse
588         \mlastyle@formattrue
589         \mlastyle@underlinetrue}
590 \DeclareOption{style}{\mlastyle@styletrue
591         \mlastyle@formatfalse
592         \mlastyle@underlinefalse}
593 \DeclareOption{singlespacequotes}{
594   \def\mlastyle@qspread{\linespread{1}\selectfont\vskip\baselineskip}}
595 \DeclareOption{doublespacequotes}{\let\mlastyle@qspread\relax}
596 \ExecuteOptions{nobibstyle,nopapersize,mla,cm,doublespacequotes}
597 \ProcessOptions
598 %    \end{macrocode}
599 % \end{macro}
600 % \end{macro}
601 % \end{macro}
602 % If the \Lopt{papersize} option is set, add the appropriate
603 % \textsc{PostScript} special, or adjust |\pdfpagewidth| and
604 % |\pdfpageheight| if pdf\LaTeX{} is in use.
605 %    \begin{macrocode}
606 \ifmlastyle@papersize
607   \ifx\@undefined\pdfpagewidth
608     \special{papersize=\the\paperwidth,\the\paperheight}
609   \else
610     \setlength{\pdfpagewidth}{\paperwidth}
611     \setlength{\pdfpageheight}{\paperheight}
612   \fi
613 \fi % \ifmlastyle@papersize
614 %    \end{macrocode}
615 % \begin{macro}{\UL@onin}
616 % Load the \package{ulem} package if the \Lopt{underline} option is set.
617 % By default, \package{ulem} does multiple underlining for nested
618 % emphasis.  This is changed to MLA-style behavior with the redefinition
619 % of |\UL@onin|.
620 %    \begin{macrocode}
621 \ifmlastyle@underline
622   \RequirePackage{ulem}
623   \def\UL@onin#1{\egroup\UL@stop#1\UL@start}
624 \fi % \ifmlastyle@underline
625 %    \end{macrocode}
626 % \end{macro}
627 % Load the \package{times} package if the \Lopt{times} option is set.
628 %    \begin{macrocode}
629 \ifmlastyle@times
630   \RequirePackage{times}
631 \fi % \ifmlastyle@times
632 %    \end{macrocode}
633 % \subsection{Macros}
634 % \begin{macro}{\instructor}
635 % Define the instructor, along with an obsolete synonym.
636 %    \begin{macrocode}
637 \def\instructor#1{\gdef\mlastyle@instructor{#1}}
638 \let\professor\instructor
639 %    \end{macrocode}
640 % \end{macro}
641 % \begin{macro}{\course}
642 % Define the course, along with an obsolete synonym.
643 %    \begin{macrocode}
644 \def\course#1{\gdef\mlastyle@course{#1}}
645 \let\classname\course
646 %    \end{macrocode}
647 % \end{macro}
648 % \begin{macro}{\surname}
649 % Define the surname, along with an obsolete synonym.
650 %    \begin{macrocode}
651 \def\surname#1{\gdef\mlastyle@surname{#1}}
652 \def\mlastyle@surname{\def\ml@##1 ##2,##3@@{##2}%
653   \def\and##1 {\unskip, }\expandafter\ml@\@author, ,@@}
654 \let\lastname\surname
655 %    \end{macrocode}
656 % \end{macro}
657 % \begin{macro}{\urldate}
658 % \begin{macro}{\theurldate}
659 % These next two respectively set and get the default access date for URLs
660 % in the works cited.
661 %    \begin{macrocode}
662 \def\urldate#1{\gdef\mlastyle@urldate{#1}}
663 \def\theurldate{\mlastyle@urldate}
664 \let\mlastyle@urldate\@date
665 %    \end{macrocode}
666 % \end{macro}
667 % \end{macro}
668 % \subsection{Style}
669 % \begin{macro}{\bibstyle@mlastyle}
670 % This first block is the beginnings of an implementation for
671 % \package{natbib}.  (Surely there is a better way to do this.)
672 %    \begin{macrocode}
673 \newcommand{\bibstyle@mlastyle}{%
674   \bibpunct[ ]{(}{)}{;}{a}{,}{,}
675   \@ifundefined{chapter}
676   {\gdef\refname{Works Cited}}
677   {\gdef\bibname{Works Cited}}}
678 %    \end{macrocode}
679 % \end{macro}
680 % \begin{macro}{\NAT@citex}
681 % The year field is normally empty but contains the title field if it is
682 % needed.  This is handled inconsistantly by \package{natbib}, so it is
683 % fixed up here.
684 %    \begin{macrocode}
685 \RequirePackage{natbib}
686 \def\NAT@citex
687   [#1][#2]#3{%
688   \NAT@sort@cites{#3}%
689   \let\@citea\@empty
690   \let\@citec\@empty
691   \ifNAT@swa
692   \if*#1*\if*#2*\def\@citea{\def\@citec{\NAT@@close}\NAT@@open}\else
693   \NAT@@open\def\@citea{\def\@citec
694   {\NAT@cmt#2\NAT@@close}}\def\@citec{#2\NAT@@close}\fi\else
695   \NAT@@open#1\ \if*#2*\def\@citec{\unskip\NAT@@close}\else
696       \def\@citec{#2\NAT@@close}\def\@citea{\def\@citec
697       {\NAT@cmt#2\NAT@@close}}\fi\fi
698   \fi
699   \let\NAT@nm\@empty\let\NAT@year\@empty
700     \@for\@citeb:=\NAT@cite@list\do
701     {\edef\@citeb{\expandafter\@firstofone\@citeb}%
702      \if@filesw\immediate\write\@auxout{\string\citation{\@citeb}}\fi
703      \@ifundefined{b@\@citeb\@extra@b@citeb}{\@citea%
704        {\reset@font\bfseries ?}\NAT@citeundefined
705                  \PackageWarning{natbib}%
706        {Citation `\@citeb' on page \thepage \space undefined}%
707        \def\NAT@date{}}%
708      {\let\NAT@last@nm=\NAT@nm\let\NAT@last@yr=\NAT@year
709      \NAT@parse{\@citeb}%
710       \ifNAT@longnames\@ifundefined{bv@\@citeb\@extra@b@citeb}{%
711         \let\NAT@name=\NAT@all@names
712         \global\@namedef{bv@\@citeb\@extra@b@citeb}{}}{}%
713       \fi
714      \ifNAT@full\let\NAT@nm\NAT@all@names\else
715        \let\NAT@nm\NAT@name\fi
716      \ifNAT@swa\ifcase\NAT@ctype
717        \if*\NAT@date*
718          \@citea\hyper@natlinkstart{\@citeb\@extra@b@citeb}%
719          \NAT@nmfmt{\NAT@nm}\NAT@date\hyper@natlinkend
720        \else
721          \ifx\NAT@last@nm\NAT@nm\NAT@yrsep
722          \ifx\NAT@last@yr\@empty\let\NAT@last@yr\relax\fi
723             \ifx\NAT@last@yr\NAT@year
724               \def\NAT@temp{{?}}%
725               \ifx\NAT@temp\NAT@exlab\PackageWarningNoLine{natbib}%
726               {Multiple citation on page \thepage: same authors and
727                year\MessageBreak without distinguishing extra
728                letter,\MessageBreak appears as question mark}\fi
729               \hyper@natlinkstart{\@citeb\@extra@b@citeb}\NAT@exlab
730               \hyper@natlinkend
731             \else\unskip
732             \ \hyper@natlinkstart{\@citeb\@extra@b@citeb}\NAT@date
733               \hyper@natlinkend
734             \fi
735          \else\@citea\hyper@natlinkstart{\@citeb\@extra@b@citeb}%
736            \NAT@nmfmt{\NAT@nm}%
737            \hyper@natlinkbreak{\NAT@aysep\ }{\@citeb\@extra@b@citeb}%
738            \NAT@date\hyper@natlinkend
739          \fi
740        \fi
741        \def\@citea{\NAT@sep\ }%
742      \or\@citea\hyper@natlinkstart{\@citeb\@extra@b@citeb}%
743          \NAT@nmfmt{\NAT@nm}\hyper@natlinkend
744          \def\@citea{\NAT@sep\ }%
745      \or\if*\NAT@date*\else
746          \@citea\hyper@natlinkstart{\@citeb\@extra@b@citeb}%
747          \NAT@date\hyper@natlinkend
748          \def\@citea{\NAT@sep\ }\fi
749      \or\@citea\hyper@natlinkstart{\@citeb\@extra@b@citeb}%
750          \NAT@alias\hyper@natlinkend
751          \def\@citea{\NAT@sep\ }%
752      \fi
753      \else\ifcase\NAT@ctype
754         \if*\NAT@date*
755           \@citea\hyper@natlinkstart{\@citeb\@extra@b@citeb}%
756           \NAT@nmfmt{\NAT@nm}\hyper@natlinkend
757           \if*#1*\def\@citea{\NAT@sep\ }%
758             \if*#2*\let\@citec\@empty\else
759             \def\@citec{\ \NAT@@open#2\NAT@@close}\fi
760             \else\ \NAT@@open\def\@citea{\NAT@@close\NAT@sep\ }
761             \if*#2*\def\@citec{\NAT@@close}\else
762             \def\@citec{\ #2\NAT@@close}\fi\fi
763         \else
764          \ifx\NAT@last@nm\NAT@nm\NAT@yrsep
765             \ifx\NAT@last@yr\NAT@year
766               \def\NAT@temp{{?}}%
767               \ifx\NAT@temp\NAT@exlab\PackageWarningNoLine{natbib}%
768               {Multiple citation on page \thepage: same authors and
769                year\MessageBreak without distinguishing extra
770                letter,\MessageBreak appears as question mark}\fi
771               \hyper@natlinkstart{\@citeb\@extra@b@citeb}\NAT@exlab
772               \hyper@natlinkend
773             \else\unskip
774             \ \hyper@natlinkstart{\@citeb\@extra@b@citeb}\NAT@date
775               \hyper@natlinkend
776             \fi
777          \else\@citea\hyper@natlinkstart{\@citeb\@extra@b@citeb}%
778            \NAT@nmfmt{\NAT@nm}%
779            \hyper@natlinkbreak{\ \NAT@@open\if*#1*\else#1\ \fi}%
780               {\@citeb\@extra@b@citeb}%
781            \NAT@date\hyper@natlinkend\fi
782          \if*#2*\def\@citec{\NAT@@close}\else
783          \def\@citec{\NAT@cmt#2\NAT@@close}\fi
784          \def\@citea{\NAT@@close\NAT@sep\ }%
785         \fi
786        \or\@citea\hyper@natlinkstart{\@citeb\@extra@b@citeb}%
787          \NAT@nmfmt{\NAT@nm}\hyper@natlinkend
788          \if*#2*\let\@citec\@empty\else
789          \def\@citec{ \NAT@@open#2\NAT@@close}\fi
790          \def\@citea{\NAT@sep\ }%
791        \or\if*\NAT@date*\else\@citea
792          \NAT@@open
793          \def\@citea{\NAT@@close\NAT@sep\ }%
794          \if*#2*\def\@citec{\NAT@@close}\else
795          \def\@citec{\NAT@cmt#2\NAT@@close}\fi
796          \hyper@natlinkstart{\@citeb\@extra@b@citeb}%
797          \NAT@date\hyper@natlinkend\fi
798        \or\@citea\hyper@natlinkstart{\@citeb\@extra@b@citeb}%
799          \NAT@alias\hyper@natlinkend
800          \def\@citea{\NAT@sep\ }%
801        \fi
802      \fi
803      }}%
804      \@citec\ifhmode\unskip\fi\endgroup}
805 %    \end{macrocode}
806 % \end{macro}
807 % \begin{macro}{\NAT@parse@date}
808 % |\NAT@parse@date| fails if the date contains a control sequence, so it
809 % is also redefined.
810 %    \begin{macrocode}
811 \def\NAT@parse@date#1#2#3#4#5#6@@{%
812   \ifcat\relax#1\def\NAT@year{}\def\NAT@exlab{}\else
813   \ifcat a#1\def\NAT@year{}\def\NAT@exlab{#1}\else
814   \ifcat a#2\def\NAT@year{#1}\def\NAT@exlab{#2}\else
815   \ifcat a#3\def\NAT@year{#1#2}\def\NAT@exlab{#3}\else
816   \ifcat a#4\def\NAT@year{#1#2#3}\def\NAT@exlab{#4}\else
817     \def\NAT@year{#1#2#3#4}\def\NAT@exlab{{#5}}\fi\fi\fi\fi\fi}
818 %    \end{macrocode}
819 % \end{macro}
820 % \begin{macro}{\cite}
821 % \begin{macro}{\citealp}
822 % ^^A\begin{macro}{\citepage}
823 % ^^A\begin{macro}{\citequote}
824 % The following macros, combined with \file{mlastyle.bst}, provide
825 % for a bibliography in MLA style.  Note that the definition of |\cite|,
826 % |\citealp|, etc.\ vary depending on the options passed to
827 % \package{mlastyle}.
828 %
829 % \begin{macro}{\mlastyle@intcite}
830 % The original |\cite| is stored
831 % in |\mlastyle@intcite|.
832 %    \begin{macrocode}
833 %\let\mlastyle@intcite\cite
834 %    \end{macrocode}
835 % \end{macro}
836 % \begin{macro}{\mlastyle@relax}
837 % This macro does nothing.  Depending on the options, either |\citeC| or
838 % |\citeM| and its ilk will utilize it.
839 %    \begin{macrocode}
840 \newcommand{\mlastyle@relax}[2][]{\unskip}
841 %    \end{macrocode}
842 % \end{macro}
843 % \subsubsection{MLA Style}
844 % \begin{macro}{\citeM}
845 % If the \Lopt{mla} or \Lopt{style} options are used, the following is
846 % executed.
847 %    \begin{macrocode}
848 \ifmlastyle@style
849 %    \end{macrocode}
850 % If the \Lopt{bibstyle} option is set, specify the bibliography style.
851 %    \begin{macrocode}
852   \ifmlastyle@bibstyle
853     \bibliographystyle{mlastyle}
854   \fi
855 %    \end{macrocode}
856 % \end{macro}
857 %    \begin{macrocode}
858   \let\cite\citep
859   \let\mlastyle@citequeue\@empty
860   \def\mlastyle@cite#1#2#3{\csname#1\endcsname[#2]{#3}}
861   \newcommand\citeflush{\ifhmode\unskip\fi
862     \ifx\mlastyle@citequeue\@empty\else\ \let\@citea\relax
863     \citetext{\@for\@citeb:=\mlastyle@citequeue\do{\@citea
864     \expandafter\mlastyle@cite\@citeb\def\@citea{\NAT@sep\ }}}%
865     \global\let\mlastyle@citequeue\@empty\fi}
866   \newcommand\mlastyle@citeadd[3]{\ifx\mlastyle@citequeue\@empty
867     \xdef\mlastyle@citequeue{{#1}{#2}{#3}}\else
868     \xdef\mlastyle@citequeue{\mlastyle@citequeue,%
869     {#1}{#2}{#3}}\fi}
870   \newcommand\citeadd[2][]{\mlastyle@citeadd{citealp}{#1}{#2}}
871   \newcommand\citea{\@ifstar
872     {\let\mlastyle@star*\mlastyle@citea}
873     {\let\mlastyle@star\@empty\mlastyle@citea}}
874   \newcommand\mlastyle@citea[2][]{\expandafter\citeauthor
875     \mlastyle@star{#2}\mlastyle@citeadd{citeyear}{#1}{#2}}
876   \newcommand\Citea{\@ifstar
877     {\let\mlastyle@star*\mlastyle@Citea}
878     {\let\mlastyle@star\@empty\mlastyle@Citea}}
879   \newcommand\mlastyle@Citea[2][]{\expandafter\Citeauthor
880     \mlastyle@star{#2}\mlastyle@citeadd{citeyear}{#1}{#2}}
881   \newcommand\citepage[2][]{\citeyearpar[#1]{#2}}
882   \newcommand\citepageM[2][]{\unskip\ \citeyearpar[#1]{#2}}
883   \newcommand\citeindirect[2][]{\citep[qtd.\ in][#1]{#2}}
884   \newcommand\citeindirectM[2][]{\unskip{} \citep[qtd.\ in][#1]{#2}}
885   \let\citeN\citealp
886   \let\citeC\mlastyle@relax
887 %    \end{macrocode}
888 % \subsubsection{Plain Style}
889 % \begin{macro}{\citeC}
890 % This next block is used if the \Lopt{compat} or \Lopt{format} option is
891 % set.
892 %    \begin{macrocode}
893 \else
894 %    \end{macrocode}
895 % If the \Lopt{bibstyle} option is set, specify the bibliography style.
896 %    \begin{macrocode}
897   \ifmlastyle@bibstyle
898     \bibliographystyle{plain}
899   \fi
900   \ifx\@undefined\citet
901     \newcommand{\mlastyle@cite}[2][]{\@tempswafalse\@citex[]{#2}}
902     \newcommand{\citeC}[2][]{~\@tempswafalse\@citex[]{#2}}
903   \else
904     \newcommand{\mlastyle@cite}[2][]{\citep[]{#2}}
905     \def\citeC{ \citep}
906   \fi
907   \let\cite\mlastyle@cite
908   \let\citepage\mlastyle@cite
909   \let\citeindirect\mlastyle@cite
910   \let\citeM\mlastyle@relax
911   \let\citepageM\mlastyle@relax
912   \let\citeindirectM\mlastyle@relax
913 \fi
914 %    \end{macrocode}
915 % \end{macro}
916 %
917 % ^^A\end{macro}
918 % ^^A\end{macro}
919 % \end{macro}
920 % \end{macro}
921 % \subsection{Formatting}
922 % \begin{macro}{\urlstyle@mlastyle}
923 % This first bit is always done, even if formatting is disabled.
924 %    \begin{macrocode}
925 \RequirePackage{url}
926 \def\url@mlastyle{\url@samestyle
927   \mathchardef\UrlBreakPenalty 0
928   \relpenalty\UrlBreakPenalty
929   \def\UrlBigBreaks{\do\/\do@url@hyp}
930 }
931 %    \end{macrocode}
932 % \end{macro}
933 % \begin{macro}{\mlastyle@i}
934 % This is the standard MLA format indent.
935 %    \begin{macrocode}
936   \newdimen\mlastyle@i \mlastyle@i=.5in
937 %    \end{macrocode}
938 % \end{macro}
939 % Everything else is done only if the \Lopt{mla} or \Lopt{format} option
940 % is set.
941 %    \begin{macrocode}
942 \ifmlastyle@format
943 %    \end{macrocode}
944 % \subsubsection{Macros}
945 % \begin{macro}{\maketitle}
946 % \begin{macro}{\and}
947 % |\maketitle| generates a heading in MLA format.
948 %    \begin{macrocode}
949   \renewcommand{\maketitle}{\begin{flushleft}
950     \@author\par
951     \@ifundefined{mlastyle@instructor}{}{\mlastyle@instructor}\par
952     \@ifundefined{mlastyle@course}{}{\mlastyle@course}\par
953     \@date\end{flushleft}
954     \begin{center}\@title\end{center}\par
955   }
956   \let\and\par
957 %    \end{macrocode}
958 % \end{macro}
959 % \end{macro}
960 % \begin{macro}{\today}
961 % |\today| is redefined to DD~Mon.~YYYY format.
962 %    \begin{macrocode}
963 \def\today{\number\day~\ifcase\month\or
964   Jan.\or Feb.\or Mar.\or Apr.\or May\or June\or July\or 
965   Aug.\or Sept.\or Oct.\or Nov.\or Dec.\fi\ \number\year}
966 %    \end{macrocode}
967 % \end{macro}
968 % \begin{macro}{\slash}
969 % No penalty for |\slash|.
970 % ^^A\let\mlastyle@sl@sh=/
971 %    \begin{macrocode}
972   \edef\slash{/\penalty\z@}
973 %    \end{macrocode}
974 % ^^A \def\mlastyle@slash{/\futurelet\mlastyle@slashnext\mlastyle@slashx}
975 % ^^A \def\mlastyle@slashx{\ifx\mlastyle@slashnext/\else
976 % ^^A  \penalty\exhyphenpenalty\fi}
977 % \end{macro}
978 % \begin{macro}{\section}
979 % \begin{macro}{\subsection}
980 % \begin{macro}{\subsubsection}
981 % Sections are formatted by centering the section name and beginning a new
982 % page.  Subsections simply center the section name.
983 %    \begin{macrocode}
984   \renewcommand{\section}{\clearpage\@startsection{section}{1}{\z@
985     }{0pt}{1sp}{\centering}}
986   \renewcommand{\subsection}{\@startsection{subsection}{2}{\z@
987     }{0pt}{1sp}{\centering}}
988   \renewcommand{\subsubsection}{\@startsection{subsubsection}{3}{\z@
989     }{0pt}{1sp}{\centering}}
990 %    \end{macrocode}
991 % ^^A\let\mlastyle@vfont\verbatim@font
992 % ^^A\def\verbatim@font{\mlastyle@qspread\mlastyle@vfont}
993 % \end{macro}
994 % \end{macro}
995 % \end{macro}
996 % \subsubsection{Environments}
997 % ^^A%\newenvironment{blocks}{\begin{quote} \linespread{1} \selectfont}{\end{quote} \linespread{2} \small \selectfont}
998 % ^^A%\newenvironment{blockm}{\begin{quotation} \linespread{1} \selectfont}{\end{quotation} \linespread{2} \selectfont}
999 % \begin{environment}{verse}
1000 % Indented 1 inch, with an additional .25 inch hanging indent.
1001 %    \begin{macrocode}
1002   \renewenvironment{verse}{\list{}{\mlastyle@qspread
1003     \advance\leftmargin1.5\mlastyle@i\itemindent-.5\mlastyle@i
1004     \listparindent\itemindent}\item\relax}{\endlist}
1005 %    \end{macrocode}
1006 % \end{environment}
1007 % \begin{environment}{quotation}
1008 % Indented 1 inch, with a paragraph indent of an additional .25 inches.
1009 %    \begin{macrocode}
1010   \renewenvironment{quotation}{\list{}{\mlastyle@qspread
1011     \advance\leftmargin\mlastyle@i\itemindent.5\mlastyle@i
1012     \listparindent\itemindent}\item\relax}{\endlist}
1013 %    \end{macrocode}
1014 % \end{environment}
1015 % \begin{environment}{quote}
1016 % Identical to the |quotation| environment, except the first paragraph is not
1017 % indented.
1018 %    \begin{macrocode}
1019   \renewenvironment{quote}{\list{}{\mlastyle@qspread
1020     \advance\leftmargin\mlastyle@i
1021     \listparindent.5\mlastyle@i}\item\relax}{\endlist}
1022 %    \end{macrocode}
1023 % \end{environment}
1024 % \begin{environment}{workscited}
1025 % \begin{macro}{\bibent}
1026 % Works cited environment, for compatibility with \package{mla-paper}.
1027 %    \begin{macrocode}
1028   \newenvironment{workscited}%
1029     {\newpage{\centerline{Works Cited}}}{\newpage}
1030   \newcommand{\bibent}{\noindent\hangindent\mlastyle@i}
1031 %    \end{macrocode}
1032 % \end{macro}
1033 % \end{environment}
1034 % \subsubsection{Margins}
1035 % Top and bottom margins are 1 inch each.  The header is flush with the
1036 % right margin, .5 inches from the top of the page.
1037 % ^^A\addtolength{\headheight}{-1pt}
1038 % ^^A\setlength{\headheight}{1.4\headheight}% kludge
1039 %    \begin{macrocode}
1040   \addtolength{\voffset}{-.5in}
1041   \setlength{\textheight}{\paperheight}
1042   \addtolength{\textheight}{-2in}
1043   \setlength{\topmargin}{0in}
1044   \setlength\headheight\f@baselineskip
1045   \setlength{\headsep}{.5in}
1046   \addtolength{\headsep}{-\headheight}
1047   \setlength{\footskip}{0.25in}
1048   \raggedbottom
1049 %    \end{macrocode}
1050 % Left and right margins in MLA format are each 1 inch wide.
1051 %    \begin{macrocode}
1052   \addtolength{\hoffset}{-.5in}
1053   \setlength{\textwidth}{\paperwidth}
1054   \addtolength{\textwidth}{-2in}
1055   \setlength{\oddsidemargin}{.5in}
1056   \setlength{\evensidemargin}{.5in}
1057   \setlength{\marginparwidth}{.5in}
1058 %    \end{macrocode}
1059 % \subsubsection{Paragraphs}
1060 % Paragraphs should be left justified, with the first line indented .5
1061 % inches.
1062 %    \begin{macrocode}
1063   \raggedright
1064   \setlength\parindent\mlastyle@i
1065 %    \end{macrocode}
1066 % MLA format specifies that all paragraphs should be indented, even those
1067 % beginning a new section.  This snippet from \package{indentfirst} changes
1068 % \LaTeX{} to meet that requirement.
1069 %    \begin{macrocode}
1070   \let\@afterindentfalse\@afterindenttrue
1071   \@afterindenttrue
1072 %    \end{macrocode}
1073 % Double space {\em everywhere}.  In a 12pt font, the default
1074 % |\baselineskip| is changed from 14.5pt to 14.4pt.
1075 % ^^A\RequirePackage{doublespace}
1076 %    \begin{macrocode}
1077   \normalsize
1078   \ifdim\baselineskip=14.5pt
1079   \renewcommand\normalsize{%
1080    \@setfontsize\normalsize\@xiipt{14.4}%
1081    \abovedisplayskip 12\p@ \@plus3\p@ \@minus7\p@
1082    \abovedisplayshortskip \z@ \@plus3\p@
1083    \belowdisplayshortskip 6.5\p@ \@plus3.5\p@ \@minus3\p@
1084    \belowdisplayskip \abovedisplayskip
1085    \let\@listi\@listI}\normalsize
1086   \fi
1087   \linespread{2}
1088   \leftmargini\parindent
1089   \def\@listi{\leftmargin\leftmargini
1090   \parsep\z@\itemsep\z@\topsep -3\p@\relax}
1091   \let\@listI\@listi
1092   \@listi
1093   \def\@listii{\leftmargin\leftmarginii
1094   \parsep\z@\itemsep\z@\topsep -3\p@\relax}
1095   \def\@listiii{\leftmargin\leftmarginiii
1096   \parsep\z@\itemsep\z@\topsep -3\p@\relax}
1097   \def\@listiv{\leftmargin\leftmarginiv
1098   \parsep\z@\itemsep\z@\topsep -3\p@\relax}
1099   \def\@listv{\leftmargin\leftmarginv
1100   \parsep\z@\itemsep\z@\topsep -3\p@\relax}
1101   \def\@listvi{\leftmargin\leftmarginvi
1102   \parsep\z@\itemsep\z@\topsep -3\p@\relax}
1103 %    \end{macrocode}
1104 % \begin{macro}{\nonfrenchspacing}
1105 % Only one space after colons, unless someone else has already tinkered
1106 % with its space factor.
1107 %    \begin{macrocode}
1108   \let\mlastyle@intnfs\nonfrenchspacing
1109   \def\nonfrenchspacing{\mlastyle@intnfs
1110     \ifnum\the\sfcode`\:=2000\sfcode`\:=1999\fi}
1111 \ifnum\the\sfcode`\:=2000\sfcode`\:=1999\fi
1112 %    \end{macrocode}
1113 % \end{macro}
1114 % \subsubsection{Header}
1115 % The last name and page number appear on every page, including the first.
1116 %    \begin{macrocode}
1117   \RequirePackage{fancyhdr}
1118   \fancypagestyle{plain}{\fancyhf{}}
1119   \fancypagestyle{mlastyle}{
1120     \fancyhf{}
1121     \rhead{\mlastyle@surname{} \thepage}
1122     \renewcommand{\headrulewidth}{0pt}
1123     \renewcommand{\footrulewidth}{0pt}}
1124   \pagestyle{mlastyle}
1125 %    \end{macrocode}
1126 % \subsubsection{Notes}
1127 % \begin{macro}{\@footnotetext}
1128 % \begin{macro}{\footnoterule}
1129 % This code is terrible, but seems to work in practice.  Suggestions
1130 % welcome.
1131 %    \begin{macrocode}
1132   \def\footnoterule{
1133     \global\skip\footins=\f@baselineskip\relax
1134     \ifnum\mlastyle@prevsplit=\z@
1135       \global\skip\footins=3.15\skip\footins\else
1136       \global\skip\footins=2.15\skip\footins
1137       \vbox to \z@{\linespread{1}\normalsize\vss\vbox{\noindent
1138       \leaders\hrule\@height 3\p@\@depth-2.6\p@
1139       %\leaders\hbox{-}
1140       \hfill\strut}\kern1.1\baselineskip}%
1141     \fi
1142     \xdef\mlastyle@prevsplit{\the\insertpenalties}}
1143   \def\mlastyle@prevsplit{0}
1144   \skip\footins=\f@baselineskip\relax
1145   \skip\footins=2.15\skip\footins
1146   \long\def\@footnotetext#1{\insert\footins{%
1147     \linespread{1}\normalsize
1148     \splittopskip\footnotesep
1149     \color@begingroup
1150     \parindent\mlastyle@i
1151     \rule\z@{1.7\baselineskip}
1152     \@makefnmark{}
1153     \ignorespaces#1\@finalstrut\strutbox
1154     \color@endgroup}}
1155 %    \end{macrocode}
1156 % \end{macro}
1157 % \end{macro}
1158 % \begin{macro}{\enoteformat}
1159 % \begin{macro}{\enoteheading}
1160 % \begin{macro}{\enotesize}
1161 % Endnotes are supported, but only if the \package{endnotes} package is
1162 % loaded {\em before\/} this package.
1163 %    \begin{macrocode}
1164   \ifx\@undefined\endnote\else
1165     \def\enoteheading{\newpage\section*{\notesname}}
1166     \def\enoteformat{\leavevmode\makeenmark{} }
1167     \def\enotesize{\normalsize}
1168   \fi
1169 %    \end{macrocode}
1170 % \end{macro}
1171 % \end{macro}
1172 % \end{macro}
1173 % \subsubsection{Bibliography}
1174 % \begin{macro}{\url@mlastyle}
1175 % |\url| is needed to format urls in the bibliography.
1176 %    \begin{macrocode}
1177 \urlstyle{mla}
1178 %    \end{macrocode}
1179 % \end{macro}
1180 % ^^A\ifx\@undefined\url{
1181 % ^^A  \catcode`/=13
1182 % ^^A    \gdef\url{\bgroup\catcode`/=13
1183 % ^^A    \let/\slash\mlastyle@url}
1184 % ^^A    \gdef\mlastyle@url#1{#1\egroup}}
1185 % ^^A}\fi
1186 % \begin{environment}{thebibliography}
1187 % The definition of |thebibliography| varies depending on the document
1188 % class.
1189 %    \begin{macrocode}
1190 \ifx\@undefined\citet
1191     \renewenvironment\thebibliography#1{\clearpage
1192       \@ifundefined{chapter}
1193         {\section*{\refname}}
1194         {\chapter*{\bibname}}
1195       \list{\@biblabel{\@arabic\c@enumiv}}%
1196         {\settowidth\labelwidth{\@biblabel{#1}}}
1197         \leftmargin\labelwidth
1198         \advance\leftmargin\labelsep
1199         \itemindent-\leftmargin
1200         \let\newblock\@empty
1201         %\sfcode`\.=\@m
1202         \usecounter{enumiv}
1203         \sloppy
1204       }
1205       {\def\@noitemerr
1206         {\@latex@warning{Empty `thebibliography' environment}}%
1207       \endlist}
1208 %    \end{macrocode}
1209 % \end{environment}
1210 % If the \package{natbib} package is loaded, the following is executed
1211 % instead.
1212 %    \begin{macrocode}
1213 \else
1214   \bibhang\mlastyle@i\bibsep\z@
1215 \fi
1216 %    \end{macrocode}
1217 % ^^A  \newcommand\bibpreamble{%
1218 % ^^A    \@ifundefined{citet}{}%
1219 % ^^A    {\bibhang\mlastyle@i\bibsep\z@}}
1220 %    \begin{macrocode}
1221 \fi % \ifmlastyle@format
1222 %    \end{macrocode}
1223
1224 %    \begin{macrocode}
1225 %</package>
1226 %    \end{macrocode}
1227 %
1228 % \Finale
1229 \endinput
1230 % vim:tw=74