Fixed urlstyle
[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 % \DoNotIndex{\ ,\:,\/}
127 % \DoNotIndex{\@afterindentfalse,\@afterindenttrue}
128 % \DoNotIndex{\@arabic}
129 % \DoNotIndex{\@author}
130 % \DoNotIndex{\@auxout}
131 % \DoNotIndex{\@biblabel,\@citea,\@citeb,\@citex}
132 % \DoNotIndex{\@date}
133 % \DoNotIndex{\@empty}
134 % \DoNotIndex{\@for}
135 % \DoNotIndex{\@ifnextchar,\@ifstar,\@ifundefined}
136 % \DoNotIndex{\@latex@warning}
137 % \DoNotIndex{\@listI}
138 % \DoNotIndex{\@listi,\@listii,\@listiii}
139 % \DoNotIndex{\@listiv,\@listv,\@listvi}
140 % \DoNotIndex{\@m}
141 % \DoNotIndex{\@noitemerr}
142 % \DoNotIndex{\@startsection}
143 % \DoNotIndex{\@tempswafalse}
144 % \DoNotIndex{\@title}
145 % \DoNotIndex{\@undefined}
146 % \DoNotIndex{\DeclareOption}
147 % \DoNotIndex{\ExecuteOptions}
148 % \DoNotIndex{\G@refundefinedtrue}
149 % \DoNotIndex{\NAT@@citetp,\NAT@citetp,\NAT@ctype,\NAT@date,\NAT@sep}
150 % \DoNotIndex{\ifNAT@par,\ifNAT@swa}
151 % \DoNotIndex{\ProcessOptions}
152 % \DoNotIndex{\RequirePackage}
153 % \DoNotIndex{\UL@start,\UL@stop}
154 % \DoNotIndex{\url@samestyle,\urlstyle,\UrlBigBreaks,\UrlBreakPenalty}
155 % \DoNotIndex{\do@url@hyp}
156 % \DoNotIndex{\addtolength}
157 % \DoNotIndex{\advance}
158 % \DoNotIndex{\baselineskip}
159 % \DoNotIndex{\bibpreamble,\bibpunct,\bibsep}
160 % \DoNotIndex{\begin}
161 % \DoNotIndex{\bfseries}
162 % \DoNotIndex{\bgroup}
163 % \DoNotIndex{\c@enumiv}
164 % \DoNotIndex{\catcode}
165 % \DoNotIndex{\centering}
166 % \DoNotIndex{\centerline}
167 % \DoNotIndex{\chapter}
168 % \DoNotIndex{\citation}
169 % \DoNotIndex{\citet,\citep}
170 % \DoNotIndex{\clearpage}
171 % \DoNotIndex{\csname}
172 % \DoNotIndex{\day}
173 % \DoNotIndex{\def}
174 % \DoNotIndex{\do}
175 % \DoNotIndex{\edef}
176 % \DoNotIndex{\egroup}
177 % \DoNotIndex{\else}
178 % \DoNotIndex{\end}
179 % \DoNotIndex{\endcsname}
180 % \DoNotIndex{\endlist}
181 % \DoNotIndex{\exhyphenpenalty}
182 % \DoNotIndex{\expandafter}
183 % \DoNotIndex{\f@baselineskip}
184 % \DoNotIndex{\fancyhf}
185 % \DoNotIndex{\fancypagestyle}
186 % \DoNotIndex{\fi}
187 % \DoNotIndex{\futurelet}
188 % \DoNotIndex{\gdef}
189 % \DoNotIndex{\global}
190 % \DoNotIndex{\hangindent}
191 % \DoNotIndex{\headrulewidth}
192 % \DoNotIndex{\if@filesw}
193 % \DoNotIndex{\if@tempswa}
194 % \DoNotIndex{\ifcase,\ifhmode,\ifnum}
195 % \DoNotIndex{\ifmlastyle@bibstyle}
196 % \DoNotIndex{\ifmlastyle@format}
197 % \DoNotIndex{\ifmlastyle@pages}
198 % \DoNotIndex{\ifmlastyle@papersize}
199 % \DoNotIndex{\ifmlastyle@style}
200 % \DoNotIndex{\ifmlastyle@times}
201 % \DoNotIndex{\ifmlastyle@underline}
202 % \DoNotIndex{\ifx}
203 % \DoNotIndex{\immediate}
204 % \DoNotIndex{\item}
205 % \DoNotIndex{\itemindent}
206 % \DoNotIndex{\itemsep}
207 % \DoNotIndex{\labelsep}
208 % \DoNotIndex{\labelwidth}
209 % \DoNotIndex{\leavevmode}
210 % \DoNotIndex{\leftmargin}
211 % \DoNotIndex{\leftmargini,\leftmarginii,\leftmarginiii}
212 % \DoNotIndex{\leftmarginiv,\leftmarginv,\leftmarginvi}
213 % \DoNotIndex{\let}
214 % \DoNotIndex{\linespread}
215 % \DoNotIndex{\list}
216 % \DoNotIndex{\listparindent}
217 % \DoNotIndex{\mathchardef}
218 % \DoNotIndex{\makeenmark}
219 % \DoNotIndex{\mbox}
220 % \DoNotIndex{\ml@}
221 % \DoNotIndex{\mlastyle@bibstylefalse}
222 % \DoNotIndex{\mlastyle@bibstyletrue}
223 % \DoNotIndex{\mlastyle@cite}
224 % \DoNotIndex{\mlastyle@course}
225 % \DoNotIndex{\mlastyle@formatfalse}
226 % \DoNotIndex{\mlastyle@formattrue}
227 % \DoNotIndex{\mlastyle@instructor}
228 % \DoNotIndex{\mlastyle@intbib}
229 % \DoNotIndex{\mlastyle@intnfs}
230 % \DoNotIndex{\mlastyle@pagesfalse}
231 % \DoNotIndex{\mlastyle@pagestrue}
232 % \DoNotIndex{\mlastyle@papersizefalse}
233 % \DoNotIndex{\mlastyle@papersizetrue}
234 % \DoNotIndex{\mlastyle@qspread}
235 % \DoNotIndex{\mlastyle@sl@sh}
236 % \DoNotIndex{\mlastyle@slash}
237 % \DoNotIndex{\mlastyle@slashnext}
238 % \DoNotIndex{\mlastyle@slashx}
239 % \DoNotIndex{\mlastyle@star}
240 % \DoNotIndex{\mlastyle@stylefalse}
241 % \DoNotIndex{\mlastyle@styletrue}
242 % \DoNotIndex{\mlastyle@surname}
243 % \DoNotIndex{\mlastyle@timesfalse}
244 % \DoNotIndex{\mlastyle@timestrue}
245 % \DoNotIndex{\mlastyle@underlinefalse}
246 % \DoNotIndex{\mlastyle@underlinetrue}
247 % \DoNotIndex{\mlastyle@urldate}
248 % \DoNotIndex{\month}
249 % \DoNotIndex{\newblock}
250 % \DoNotIndex{\newcommand}
251 % \DoNotIndex{\newdimen}
252 % \DoNotIndex{\newenvironment}
253 % \DoNotIndex{\newif}
254 % \DoNotIndex{\newpage}
255 % \DoNotIndex{\noindent}
256 % \DoNotIndex{\normalsize}
257 % \DoNotIndex{\notesname}
258 % \DoNotIndex{\number}
259 % \DoNotIndex{\or}
260 % \DoNotIndex{\p@}
261 % \DoNotIndex{\pagestyle}
262 % \DoNotIndex{\par}
263 % \DoNotIndex{\parindent}
264 % \DoNotIndex{\parsep}
265 % \DoNotIndex{\penalty}
266 % \DoNotIndex{\protected@xdef}
267 % \DoNotIndex{\relax}
268 % \DoNotIndex{\renewcommand}
269 % \DoNotIndex{\renewenvironment}
270 % \DoNotIndex{\rhead}
271 % \DoNotIndex{\selectfont}
272 % \DoNotIndex{\setlength}
273 % \DoNotIndex{\settowidth}
274 % \DoNotIndex{\sfcode}
275 % \DoNotIndex{\skip}
276 % \DoNotIndex{\sloppy}
277 % \DoNotIndex{\space}
278 % \DoNotIndex{\string}
279 % \DoNotIndex{\the}
280 % \DoNotIndex{\thebibliography}
281 % \DoNotIndex{\thepage}
282 % \DoNotIndex{\topsep}
283 % \DoNotIndex{\usecounter}
284 % \DoNotIndex{\unskip}
285 % \DoNotIndex{\vskip}
286 % \DoNotIndex{\xdef}
287 % \DoNotIndex{\write}
288 % \DoNotIndex{\year}
289 % \DoNotIndex{\z@}
290 % \DoNotIndex{\bibhang}
291 % \DoNotIndex{\evensidemargin}
292 % \DoNotIndex{\headheight}
293 % \DoNotIndex{\headsep}
294 % \DoNotIndex{\hoffset}
295 % \DoNotIndex{\marginparwidth}
296 % \DoNotIndex{\oddsidemargin}
297 % \DoNotIndex{\raggedbottom}
298 % \DoNotIndex{\raggedright}
299 % \DoNotIndex{\textheight}
300 % \DoNotIndex{\textwidth}
301 % \DoNotIndex{\topmargin}
302 % \DoNotIndex{\voffset}
303 % \DoNotIndex{\paperheight}
304 % \DoNotIndex{\paperwidth}
305 % \DoNotIndex{\pdfpageheight}
306 % \DoNotIndex{\pdfpagewidth}
307 % \DoNotIndex{\special}
308 %
309 % \hyphenation{pre-am-ble wide-spread}
310 %
311 % \newcommand{\Lopt}[1]{\textsf {#1}}
312 % \newcommand{\file}[1]{\texttt {#1}}
313 % \newcommand{\package}[1]{\textsf {#1}}
314 % ^^A\newcommand{\Lcount}[1]{\textsl {\small#1}}
315 % ^^A\newcommand{\pstyle}[1]{\textsl {#1}}
316 %
317 % \newcommand{\OptionIndex}[1]{\index{#1\actualchar\Lopt{#1} (option)\encapchar usage}\index{options:\levelchar\Lopt{#1}}}
318 %
319 % \title{The \package{mlastyle} package\thanks{This document
320 %   corresponds to \package{mlastyle}~\fileversion, dated \filedate.}}
321 % \author{Tim Pope \\ \texttt{latex@rebelongto.us}}
322 % \surname{Pope}
323 %
324 % \maketitle
325 %
326 % \tableofcontents
327 %
328 % \section{Introduction}
329 %
330 % ^^A MLA style, consisting of a set of documentation conventions, has
331 % ^^A gained widespread acceptance in the humanities.
332 % According to the {\em MLA Handbook for Writers of Research
333 % Papers}\citeC{handbook}, MLA style is a set of ``commonly agreed-on
334 % rules for documenting quotations, facts, opinions and paraphrases'' that
335 % ``is preferred by a substantial majority of scholarly journals in
336 % language and literature{\makeatletter\ifmlastyle@style
337 % .''\citeM[xvi]{handbook}\else.''\fi} \LaTeX{} is a
338 % document preparation system enjoying popularity in the scientific field.
339 % It should come as no surprise that complete, up-to-date implementations
340 % of MLA style for \LaTeX{} are in short supply.  The \LaTeX{} package
341 % \package{mlastyle} aims to fill this void.
342 %
343 % \section{Usage}
344 %
345 % A sample document follows.
346 % \begin{verbatim}
347 %\documentclass[12pt]{article}
348 %\usepackage{mlastyle}
349 %
350 %\author{John Doe}
351 %\instructor{Professor Smith}
352 %\course{English 101}
353 %\date{1~Jan.\ 1970}
354 %\title{The Sadism Inherent in Compulsory English Classes}
355 %
356 %\begin{document}
357 %\maketitle
358 %'Nuff said.
359 %\end{document}\end{verbatim}
360 % \subsection{Initialization Macros}
361 % The \index{heading|usage}mandatory heading is generated with
362 % \DescribeMacro{\maketitle}|\maketitle|.  Use the standard macros
363 % |\author|, |\title|, and |\date| to specify the relevant information.
364 % To define the instructor and name of the course, use the aptly named
365 % \DescribeMacro{\instructor}|\instructor|\marg{instructor} and
366 % \DescribeMacro{\course}|\course|\marg{course} macros.
367 %
368 % The last name for use in the header\index{header|usage} is derived from
369 % |\author|.  If this does not produce the desired result, use
370 % \DescribeMacro{\surname}|\surname|\marg{last name} to override it.
371 %
372 % MLA style recommends the DD~Mon.~YYYY format for specifying dates;
373 % \DescribeMacro{\today}|\today| has been conveniently redefined to this.
374 % However, other formats can be used as long as done so consistently
375 % throughout the document.  Also note that the date in the
376 % heading\index{heading|usage} should be the due date of the assignment;
377 % students who finish assignments early would be wise to call
378 % |\date|\marg{due date}.
379 %
380 % \subsection{Environments}
381 % Three environments have been modified from standard \LaTeX to better
382 % suit MLA format.  To typeset \index{poetry|usage}poetry and
383 % \index{drama|usage}drama, use the \DescribeEnv{verse}|verse|
384 % environment.  Quotations\index{quotations|usage} of a single paragraph
385 % or less always use the \DescribeEnv{quote}|quote| environment.  For
386 % longer passages, use the \DescribeEnv{quotation}|quotation| environment
387 % if the beginning of the passage marks the beginning of a paragraph.
388 % Otherwise, use the |quote| environment.
389 %
390 % Be sure to follow MLA guidelines when using these environments.  Short
391 % quotes should be enclosed in quotation marks and included directly in
392 % the text.
393 %
394 % \subsection{Modes of Operation}
395 % The \package{mlastyle} package has four basic modes of operations,
396 % selected with one of four mutually exclusive options.  The
397 % \OptionIndex{format}\Lopt{format}
398 % option tells \package{mlastyle} to use MLA format (i.e., 1 inch margins,
399 % double-spaced, etc.).  The \OptionIndex{style}\Lopt{style} option tells
400 % \package{mlastyle} to use MLA style (i.e., the format of parenthetical
401 % documentation, etc).  Each of these options
402 % disables the other; to use both MLA format and MLA style, specify the
403 % \OptionIndex{mla}\Lopt{mla} option, or nothing at all.
404 %
405 % To disable both MLA style and MLA format, use the
406 % \OptionIndex{compat}\Lopt{compat} option.  This differs from omitting
407 % the package entirely in that certain macros are still defined (e.g.,
408 % |\instructor|).  Also, citations are handled a bit differently than in
409 % standard \LaTeX{} (see section~\ref{sec:documentation}).
410 %
411 % In addition to the above, several other options modify the behavior of
412 % \package{mlastyle}.
413 %
414 % \subsubsection{Italics vs.\ Underlining} \index{underlining|usage}
415 % \index{italics|usage}\label{sec:italics}
416 % The {\em MLA Handbook\/}\citeC{handbook} dictates that emphasis should
417 % be indicated by underlining the text\citeM[94]{handbook}.  Thus, the
418 % \package{ulem} package, which underlines all emphasized
419 % text, is loaded by default in \Lopt{mla} and \Lopt{format} modes.  To
420 % disable this, use the \OptionIndex{italics}\Lopt{italics} option.
421 % Conversely, if underlining is desired in \Lopt{style} or \Lopt{compat}
422 % mode, the \OptionIndex{underline}\Lopt{underline} option can be used.
423 %
424 % \subsubsection{Fonts}
425 % By default, \package{mlastyle} uses \TeX's standard Computer Modern
426 % font.  Some profess\-ors\penalty500---particularly those
427 % concerned with document length---require assignments to be set in
428 % \examp[.]{Times New Roman}  This can be achieved with the
429 % \OptionIndex{times}\Lopt{times} option, which simply loads the
430 % \package{times} package.  This opposite of this option is
431 % \OptionIndex{cm}\Lopt{cm}, which reverts to Computer Modern.
432 %
433 % \index{works cited|usage}
434 % \subsection{Documenting Sources} \label{sec:documentation}
435 %
436 % The \package{mlastyle} package reimplements the
437 % \DescribeEnv{thebibliography}|thebibliography| environment to generate
438 % the list of works cited in MLA style.  Instruction in the basic use of
439 % \LaTeX's bibliography features is beyond the scope of this document;
440 % however, the following example, which should be included just before
441 % |\end{document}|, might prove to be a useful starting point:
442 %\begin{verbatim}
443 %\begin{thebibliography}{}
444 %
445 %\bibitem[Lamport]{latexdps}
446 %Lamport, Leslie.
447 %\newblock \emph{\LaTeX: A Document Preparation System}.
448 %\newblock 2nd.~ed.
449 %\newblock Reading: Addison-Wesley, 1994.
450 %
451 %\end{thebibliography}\end{verbatim}
452 % In this example, |Lamport| is the author's last name (for use in
453 % citations) and |latexdps| is the marker used to reference it (see
454 % section~\ref{sec:parenthetical}).
455 %
456 % For information on automatically generating the list of works cited with
457 % \BibTeX, see section~\ref{sec:bibtex}.
458 %
459 % \subsubsection{Parenthetical Documentation} \label{sec:parenthetical}
460 % A simple citation can by achieved with a call to
461 % \DescribeMacro{\cite}|\cite|\oarg{pages}\marg{marker}, where
462 % marker refers to the key given to either
463 % \index{BibTeX=\BibTeX|usage}\BibTeX{} or the |\bibitem| macro (|latex|
464 % in the above example).
465 % Omit \oarg{pages} if the source has no page numbers.
466 % Multiple sources can be cited using the syntax
467 % |\cite|\oarg{pages}|{|\meta{marker
468 % 1}\texttt{,}\penalty\exhyphenpenalty\meta{marker 2}\ldots|}|; however, page
469 % numbers can currently be specified only for the last referenced source.
470 % To work around this limitation, use |\citealp|, explained below.
471 %
472 % Three additional citation commands are provided, all of which take the
473 % same arguments as |\cite|.  To omit the author information from the
474 % citation, use \DescribeMacro{\citepage}|\citepage|.  Indirect
475 % citations---those of the format \examp{(qtd. in Pope
476 % \pageref{sec:italics})}---can be
477 % created with \DescribeMacro{\citeindirect}|\citeindirect|.  Finally, the
478 % parentheses are omitted by \DescribeMacro{\citealp}|\citealp|.  This was
479 % intended for use in cross references, but it can also help in citing
480 % multiple works.  The result of
481 % |(\citealp[42]{texbook}|\texttt{; }|\citealp[69]{latexdps})|
482 % would be something like \examp[.]{(Knuth 42; Lamport 69)}
483 %
484 % \subsubsection{Using {\rm \BibTeX}} \label{sec:bibtex}
485 % Coupled with \index{BibTeX=\BibTeX|usage}\BibTeX,
486 % \package{mlastyle} provides a experimental implementation of MLA
487 % documentation style.  Put\SpecialUsageIndex{\bibliographystyle}
488 % |\bibliographystyle{mlastyle}| in the document preamble to load the
489 % bibliography style.  Alternatively, the
490 % \OptionIndex{bibstyle}\Lopt{bibstyle} option can handle this
491 % automatically, loading a bibliography style of |mlastyle| in \Lopt{mla}
492 % and \Lopt{style} modes and a bibliography style of |plain| in
493 % \Lopt{format} and \Lopt{compat} modes.
494 %
495 % Use of \BibTeX{} is also beyond the scope of this document; consult
496 % Patashnik\citeC{btxdoc} for an introduction.
497 % Briefly, to use the following example, substitute
498 % |\bibliography|\marg{filename} for the |thebibliography| environment.
499 % Then create \meta{filename}\file{.bib} with the contents below.
500 % Generating the document entails running \file{latex} on the \file{.tex}
501 % file, \file{bibtex} on the resulting \file{.aux} file, then \file{latex}
502 % twice more.
503 %\begin{verbatim}
504 %@BOOK{latexdps,
505 %  AUTHOR = "Leslie Lamport",
506 %  TITLE = "{\LaTeX}: A Document Preparation System",
507 %  KEY = "{\LaTeX}",
508 %  EDITION = "Second",
509 %  ADDRESS = "Reading",
510 %  PUBLISHER = "Addison-Wesley",
511 %  YEAR = "1994"}\end{verbatim}
512 %
513 % In \package{mlastyle}, The |KEY| field serves the additional purpose of
514 % specifying an abbreviated title.  This is unnecessary in the above
515 % example.  If an additional book by Leslie Lamport was included, however,
516 % the |KEY| field would allow |\cite{latexdps}| to yield \examp{(Lamport,
517 % \emph{\LaTeX\/})} instead of \examp[.]{(Lamport, \emph{\LaTeX: A
518 % Doc\-um\-ent Pre\-pa\-ra\-tion Sys\-tem\/})}
519 %
520 % Note that only entries referenced by a citation are included in the list
521 % of works cited; to force the inclusion of an entry or all entries, use
522 % |\nocite|\marg{marker} and |\nocite{*}|, respectively.
523 %
524 % \StopEventually{\PrintChanges\bibliography{mlastyle}\PrintIndex}
525 %
526 % \section{Implementation}
527 %    \begin{macrocode}
528 %<*package>
529 %    \end{macrocode}
530 %
531 % \subsection{Options}
532 % \begin{macro}{\ifmlastyle@*}
533 % \begin{macro}{\mlastyle@*true}
534 % \begin{macro}{\mlastyle@*false}
535 % Most options are implemented by modifying a |\newif| declared for that
536 % purpose.
537 %    \begin{macrocode}
538 \newif\ifmlastyle@bibstyle
539 \DeclareOption{bibstyle}{\mlastyle@bibstyletrue}
540 \DeclareOption{nobibstyle}{\mlastyle@bibstylefalse}
541 \newif\ifmlastyle@papersize
542 \DeclareOption{papersize}{\mlastyle@papersizetrue}
543 \DeclareOption{nopapersize}{\mlastyle@papersizefalse}
544 \newif\ifmlastyle@underline
545 \DeclareOption{underline}{\mlastyle@underlinetrue}
546 \DeclareOption{italics}{\mlastyle@underlinefalse}
547 \newif\ifmlastyle@times
548 \DeclareOption{times}{\mlastyle@timestrue}
549 \DeclareOption{cm}{\mlastyle@timesfalse}
550 \newif\ifmlastyle@style
551 \DeclareOption{compat}{\mlastyle@stylefalse
552         \mlastyle@formatfalse
553         \mlastyle@underlinefalse}
554 \DeclareOption{mla}{\mlastyle@styletrue
555         \mlastyle@formattrue
556         \mlastyle@underlinetrue}
557 \newif\ifmlastyle@format
558 \DeclareOption{format}{\mlastyle@stylefalse
559         \mlastyle@formattrue
560         \mlastyle@underlinetrue}
561 \DeclareOption{style}{\mlastyle@styletrue
562         \mlastyle@formatfalse
563         \mlastyle@underlinefalse}
564 \DeclareOption{singlespacequotes}{
565   \def\mlastyle@qspread{\linespread{1}\selectfont\vskip\baselineskip}}
566 \DeclareOption{doublespacequotes}{\let\mlastyle@qspread\relax}
567 \ExecuteOptions{nobibstyle,nopapersize,mla,cm,doublespacequotes}
568 \ProcessOptions
569 %    \end{macrocode}
570 % \end{macro}
571 % \end{macro}
572 % \end{macro}
573 % If the \Lopt{papersize} option is set, add the appropriate
574 % \textsc{PostScript} special, or adjust |\pdfpagewidth| and
575 % |\pdfpageheight| if pdf\LaTeX{} is in use.
576 %    \begin{macrocode}
577 \ifmlastyle@papersize
578   \ifx\@undefined\pdfpagewidth
579     \special{papersize=\the\paperwidth,\the\paperheight}
580   \else
581     \setlength{\pdfpagewidth}{\paperwidth}
582     \setlength{\pdfpageheight}{\paperheight}
583   \fi
584 \fi % \ifmlastyle@papersize
585 %    \end{macrocode}
586 % \begin{macro}{\UL@onin}
587 % Load the \package{ulem} package if the \Lopt{underline} option is set.
588 % By default, \package{ulem} does multiple underlining for nested
589 % emphasis.  This is changed to MLA-style behavior with the redefinition
590 % of |\UL@onin|.
591 %    \begin{macrocode}
592 \ifmlastyle@underline
593   \RequirePackage{ulem}
594   \def\UL@onin#1{\egroup\UL@stop#1\UL@start}
595 \fi % \ifmlastyle@underline
596 %    \end{macrocode}
597 % \end{macro}
598 % Load the \package{times} package if the \Lopt{times} option is set.
599 %    \begin{macrocode}
600 \ifmlastyle@times
601   \RequirePackage{times}
602 \fi % \ifmlastyle@times
603 %    \end{macrocode}
604 % \subsection{Macros}
605 % \begin{macro}{\instructor}
606 % Define the instructor, along with an obsolete synonym.
607 %    \begin{macrocode}
608 \def\instructor#1{\gdef\mlastyle@instructor{#1}}
609 \let\professor\instructor
610 %    \end{macrocode}
611 % \end{macro}
612 % \begin{macro}{\course}
613 % Define the course, along with an obsolete synonym.
614 %    \begin{macrocode}
615 \def\course#1{\gdef\mlastyle@course{#1}}
616 \let\classname\course
617 %    \end{macrocode}
618 % \end{macro}
619 % \begin{macro}{\surname}
620 % Define the surname, along with an obsolete synonym.
621 %    \begin{macrocode}
622 \def\surname#1{\gdef\mlastyle@surname{#1}}
623 \def\mlastyle@surname{\def\ml@##1 ##2,##3@@{##2}%
624   \def\and##1 {\unskip, }\expandafter\ml@\@author, ,@@}
625 \let\lastname\surname
626 %    \end{macrocode}
627 % \end{macro}
628 % \begin{macro}{\urldate}
629 % \begin{macro}{\theurldate}
630 % These next two respectively set and get the default access date for URLs
631 % in the works cited.
632 %    \begin{macrocode}
633 \def\urldate#1{\gdef\mlastyle@urldate{#1}}
634 \def\theurldate{\mlastyle@urldate}
635 \let\mlastyle@urldate\@date
636 %    \end{macrocode}
637 % \end{macro}
638 % \end{macro}
639 % \subsection{Style}
640 % \begin{macro}{\bibstyle@mlastyle}
641 % This first block is the beginnings of an implementation for
642 % \package{natbib}.  (Surely there is a better way to do this.)
643 %    \begin{macrocode}
644 \newcommand{\bibstyle@mlastyle}{%
645   \bibpunct[ ]{(}{)}{;}{a}{,}{,}
646   %\bibpunct[\mlastyle@space]{\mlastyle@brack(}{\mlastyle@brack)}%
647   %  {\unskip;}{a}{\mlastyle@comma}{,}
648   \gdef\mlastyle@brack##1{\ifx\NAT@date\mlastyle@notitle
649     \ifmlastyle@pages ##1\else\ifNAT@swa\ifnum
650     \NAT@ctype=0 ##1\else\unskip\fi\else\unskip\fi\fi\else ##1\fi}
651   \gdef\mlastyle@comma{\ifx\NAT@date\mlastyle@notitle\else,\fi}
652   \gdef\mlastyle@space{\ifx\NAT@date\mlastyle@notitle
653   \ifnum\NAT@ctype=1{} \fi\else{} \fi}
654 %      \ifNAT@par\ifNAT@swa{} \fi\else{} \fi\fi\else{} \fi}
655     \gdef\citetext##1{(##1)}
656   \@ifundefined{chapter}
657   {\gdef\refname{Works Cited}}
658   {\gdef\bibname{Works Cited}}}
659 %    \end{macrocode}
660 % \end{macro}
661 % \begin{macro}{\mlastyle@notitle}
662 % This hack represents an empty title in the MLA bibliography style.
663 %    \begin{macrocode}
664 \def\mlastyle@notitle
665   { \ \ \ \ \unskip\unskip\unskip\unskip\unskip}
666 \RequirePackage{natbib}
667 \newif\ifmlastyle@pages
668 \renewcommand\NAT@citetp
669 {\@ifnextchar[{\mlastyle@pagestrue\NAT@@citetp}%
670   {\mlastyle@pagesfalse\NAT@@citetp[]}}
671 %    \end{macrocode}
672 %\end{macro}
673 % \begin{macro}{\cite}
674 % \begin{macro}{\citealp}
675 % ^^A\begin{macro}{\citepage}
676 % ^^A\begin{macro}{\citequote}
677 % The following macros, combined with \file{mlastyle.bst}, provide
678 % for a bibliography in MLA style.  Note that the definition of |\cite|,
679 % |\citealp|, etc.\ vary depending on the options passed to
680 % \package{mlastyle}.
681 %
682 % \begin{macro}{\mlastyle@intcite}
683 % The original |\cite| is stored
684 % in |\mlastyle@intcite|.
685 %    \begin{macrocode}
686 %\let\mlastyle@intcite\cite
687 %    \end{macrocode}
688 % \end{macro}
689 % \begin{macro}{\mlastyle@relax}
690 % This macro does nothing.  Depending on the options, either |\citeC| or
691 % |\citeM| and its ilk will utilize it.
692 %    \begin{macrocode}
693 \newcommand{\mlastyle@relax}[2][]{\unskip}
694 %    \end{macrocode}
695 % \end{macro}
696 % \subsubsection{MLA Style}
697 % \begin{macro}{\citeM}
698 % If the \Lopt{mla} or \Lopt{style} options are used, the following is
699 % executed.
700 %    \begin{macrocode}
701 \ifmlastyle@style
702 %    \end{macrocode}
703 % If the \Lopt{bibstyle} option is set, specify the bibliography style.
704 %    \begin{macrocode}
705   \ifmlastyle@bibstyle
706     \bibliographystyle{mlastyle}
707   \fi
708 %    \end{macrocode}
709 % \end{macro}
710 %    \begin{macrocode}
711   \let\cite\citep
712   \let\mlastyle@citequeue\@empty
713   \def\mlastyle@cite#1#2#3{\csname#1\endcsname[#2]{#3}}
714   \newcommand\citeflush{\ifhmode\unskip\fi
715     \ifx\mlastyle@citequeue\@empty\else{} \let\@citea\relax
716     \citetext{\@for\@citeb:=\mlastyle@citequeue\do{\@citea
717     \expandafter\mlastyle@cite\@citeb\def\@citea{\NAT@sep\ }}}%
718     \global\let\mlastyle@citequeue\@empty\fi}
719   \newcommand\mlastyle@citeadd[3]{\ifx\mlastyle@citequeue\@empty
720     \xdef\mlastyle@citequeue{{#1}{#2}{#3}}\else
721     \xdef\mlastyle@citequeue{\mlastyle@citequeue,%
722     {#1}{#2}{#3}}\fi}
723   \newcommand\citeadd[2][]{\mlastyle@citeadd{citealp}{#1}{#2}}
724   \newcommand\citea{\@ifstar
725     {\let\mlastyle@star*\mlastyle@citea}
726     {\let\mlastyle@star\@empty\mlastyle@citea}}
727   \newcommand\mlastyle@citea[2][]{\expandafter\citeauthor
728     \mlastyle@star{#2}\mlastyle@citeadd{citeyear}{#1}{#2}}
729   \newcommand\Citea{\@ifstar
730     {\let\mlastyle@star*\mlastyle@Citea}
731     {\let\mlastyle@star\@empty\mlastyle@Citea}}
732   \newcommand\mlastyle@Citea[2][]{\expandafter\Citeauthor
733     \mlastyle@star{#2}\mlastyle@citeadd{citeyear}{#1}{#2}}
734   \newcommand\citepage[2][]{\citeyearpar[#1]{#2}}
735   \newcommand\citepageM[2][]{\unskip{} \citeyearpar[#1]{#2}}
736   \newcommand\citeindirect[2][]{\citep[qtd.\ in][#1]{#2}}
737   \newcommand\citeindirectM[2][]{\unskip{} \citep[qtd.\ in][#1]{#2}}
738   \let\citeN\citealp
739   \let\citeC\mlastyle@relax
740 %    \end{macrocode}
741 % \subsubsection{Plain Style}
742 % \begin{macro}{\citeC}
743 % This next block is used if the \Lopt{compat} or \Lopt{format} option is
744 % set.
745 %    \begin{macrocode}
746 \else
747 %    \end{macrocode}
748 % If the \Lopt{bibstyle} option is set, specify the bibliography style.
749 %    \begin{macrocode}
750   \ifmlastyle@bibstyle
751     \bibliographystyle{plain}
752   \fi
753   \ifx\@undefined\citet
754     \newcommand{\mlastyle@cite}[2][]{\@tempswafalse\@citex[]{#2}}
755     \newcommand{\citeC}[2][]{~\@tempswafalse\@citex[]{#2}}
756   \else
757     \newcommand{\mlastyle@cite}[2][]{\citep[]{#2}}
758     \def\citeC{ \citep}
759   \fi
760   \let\cite\mlastyle@cite
761   \let\citepage\mlastyle@cite
762   \let\citeindirect\mlastyle@cite
763   \let\citeM\mlastyle@relax
764   \let\citepageM\mlastyle@relax
765   \let\citeindirectM\mlastyle@relax
766 \fi
767 %    \end{macrocode}
768 % \end{macro}
769 %
770 % ^^A\end{macro}
771 % ^^A\end{macro}
772 % \end{macro}
773 % \end{macro}
774 % \subsection{Formatting}
775 % \begin{macro}{\urlstyle@mlastyle}
776 % This first bit is always done, even if formatting is disabled.
777 %    \begin{macrocode}
778 \RequirePackage{url}
779 \def\url@mlastyle{\url@samestyle
780   \mathchardef\UrlBreakPenalty 0
781   \relpenalty\UrlBreakPenalty
782   \def\UrlBigBreaks{\do\/\do@url@hyp}
783 }
784 %    \end{macrocode}
785 % \end{macro}
786 % \begin{macro}{\mlastyle@i}
787 % This is the standard MLA format indent.
788 %    \begin{macrocode}
789   \newdimen\mlastyle@i \mlastyle@i=.5in
790 %    \end{macrocode}
791 % \end{macro}
792 % Everything else is done only if the \Lopt{mla} or \Lopt{format} option
793 % is set.
794 %    \begin{macrocode}
795 \ifmlastyle@format
796 %    \end{macrocode}
797 % \subsubsection{Macros}
798 % \begin{macro}{\maketitle}
799 % \begin{macro}{\and}
800 % |\maketitle| generates a heading in MLA format.
801 %    \begin{macrocode}
802   \renewcommand{\maketitle}{\begin{flushleft}
803     \@author\par
804     \@ifundefined{mlastyle@instructor}{}{\mlastyle@instructor}\par
805     \@ifundefined{mlastyle@course}{}{\mlastyle@course}\par
806     \@date\end{flushleft}
807     \begin{center}\@title\end{center}\par
808   }
809   \let\and\par
810 %    \end{macrocode}
811 % \end{macro}
812 % \end{macro}
813 % \begin{macro}{\today}
814 % |\today| is redefined to DD~Mon.~YYYY format.
815 %    \begin{macrocode}
816 \def\today{\number\day~\ifcase\month\or
817   Jan.\or Feb.\or Mar.\or Apr.\or May\or June\or July\or 
818   Aug.\or Sept.\or Oct.\or Nov.\or Dec.\fi\ \number\year}
819 %    \end{macrocode}
820 % \end{macro}
821 % \begin{macro}{\slash}
822 % No penalty for |\slash|.
823 % ^^A\let\mlastyle@sl@sh=/
824 %    \begin{macrocode}
825   \edef\slash{/\penalty\z@}
826 %    \end{macrocode}
827 % ^^A \def\mlastyle@slash{/\futurelet\mlastyle@slashnext\mlastyle@slashx}
828 % ^^A \def\mlastyle@slashx{\ifx\mlastyle@slashnext/\else
829 % ^^A  \penalty\exhyphenpenalty\fi}
830 % \end{macro}
831 % \begin{macro}{\section}
832 % \begin{macro}{\subsection}
833 % \begin{macro}{\subsubsection}
834 % Sections are formatted by centering the section name and beginning a new
835 % page.  Subsections simply center the section name.
836 %    \begin{macrocode}
837   \renewcommand{\section}{\clearpage\@startsection{section}{1}{\z@
838     }{0pt}{1sp}{\centering}}
839   \renewcommand{\subsection}{\@startsection{subsection}{2}{\z@
840     }{0pt}{1sp}{\centering}}
841   \renewcommand{\subsubsection}{\@startsection{subsubsection}{3}{\z@
842     }{0pt}{1sp}{\centering}}
843 %    \end{macrocode}
844 % ^^A\let\mlastyle@vfont\verbatim@font
845 % ^^A\def\verbatim@font{\mlastyle@qspread\mlastyle@vfont}
846 % \end{macro}
847 % \end{macro}
848 % \end{macro}
849 % \subsubsection{Environments}
850 % ^^A%\newenvironment{blocks}{\begin{quote} \linespread{1} \selectfont}{\end{quote} \linespread{2} \small \selectfont}
851 % ^^A%\newenvironment{blockm}{\begin{quotation} \linespread{1} \selectfont}{\end{quotation} \linespread{2} \selectfont}
852 % \begin{environment}{verse}
853 % Indented 1 inch, with an additional .25 inch hanging indent.
854 %    \begin{macrocode}
855   \renewenvironment{verse}{\list{}{\mlastyle@qspread
856     \advance\leftmargin1.5\mlastyle@i\itemindent-.5\mlastyle@i
857     \listparindent\itemindent}\item\relax}{\endlist}
858 %    \end{macrocode}
859 % \end{environment}
860 % \begin{environment}{quotation}
861 % Indented 1 inch, with a paragraph indent of an additional .25 inches.
862 %    \begin{macrocode}
863   \renewenvironment{quotation}{\list{}{\mlastyle@qspread
864     \advance\leftmargin\mlastyle@i\itemindent.5\mlastyle@i
865     \listparindent\itemindent}\item\relax}{\endlist}
866 %    \end{macrocode}
867 % \end{environment}
868 % \begin{environment}{quote}
869 % Identical to the |quotation| environment, except the first paragraph is not
870 % indented.
871 %    \begin{macrocode}
872   \renewenvironment{quote}{\list{}{\mlastyle@qspread
873     \advance\leftmargin\mlastyle@i
874     \listparindent.5\mlastyle@i}\item\relax}{\endlist}
875 %    \end{macrocode}
876 % \end{environment}
877 % \begin{environment}{workscited}
878 % \begin{macro}{\bibent}
879 % Works cited environment, for compatibility with \package{mla-paper}.
880 %    \begin{macrocode}
881   \newenvironment{workscited}%
882     {\newpage{\centerline{Works Cited}}}{\newpage}
883   \newcommand{\bibent}{\noindent\hangindent\mlastyle@i}
884 %    \end{macrocode}
885 % \end{macro}
886 % \end{environment}
887 % \subsubsection{Margins}
888 % Top and bottom margins are 1 inch each.  The header is flush with the
889 % right margin, .5 inches from the top of the page.
890 % ^^A\addtolength{\headheight}{-1pt}
891 % ^^A\setlength{\headheight}{1.4\headheight}% kludge
892 %    \begin{macrocode}
893   \addtolength{\voffset}{-.5in}
894   \setlength{\textheight}{\paperheight}
895   \addtolength{\textheight}{-2in}
896   \setlength{\topmargin}{0in}
897   \setlength\headheight\f@baselineskip
898   \setlength{\headsep}{.5in}
899   \addtolength{\headsep}{-\headheight}
900   \setlength{\footskip}{0.25in}
901   \raggedbottom
902 %    \end{macrocode}
903 % Left and right margins in MLA format are each 1 inch wide.
904 %    \begin{macrocode}
905   \addtolength{\hoffset}{-.5in}
906   \setlength{\textwidth}{\paperwidth}
907   \addtolength{\textwidth}{-2in}
908   \setlength{\oddsidemargin}{.5in}
909   \setlength{\evensidemargin}{.5in}
910   \setlength{\marginparwidth}{.5in}
911 %    \end{macrocode}
912 % \subsubsection{Paragraphs}
913 % Paragraphs should be left justified, with the first line indented .5
914 % inches.
915 %    \begin{macrocode}
916   \raggedright
917   \setlength\parindent\mlastyle@i
918 %    \end{macrocode}
919 % MLA format specifies that all paragraphs should be indented, even those
920 % beginning a new section.  This snippet from \package{indentfirst} changes
921 % \LaTeX{} to meet that requirement.
922 %    \begin{macrocode}
923   \let\@afterindentfalse\@afterindenttrue
924   \@afterindenttrue
925 %    \end{macrocode}
926 % Double space {\em everywhere}.
927 % ^^A\RequirePackage{doublespace}
928 %    \begin{macrocode}
929   \linespread{2.0}
930   \leftmargini\parindent
931   \def\@listi{\leftmargin\leftmargini
932   \parsep\z@\itemsep\z@\topsep -3\p@\relax}
933   \let\@listI\@listi
934   \@listi
935   \def\@listii{\leftmargin\leftmarginii
936   \parsep\z@\itemsep\z@\topsep -3\p@\relax}
937   \def\@listiii{\leftmargin\leftmarginiii
938   \parsep\z@\itemsep\z@\topsep -3\p@\relax}
939   \def\@listiv{\leftmargin\leftmarginiv
940   \parsep\z@\itemsep\z@\topsep -3\p@\relax}
941   \def\@listv{\leftmargin\leftmarginv
942   \parsep\z@\itemsep\z@\topsep -3\p@\relax}
943   \def\@listvi{\leftmargin\leftmarginvi
944   \parsep\z@\itemsep\z@\topsep -3\p@\relax}
945 %    \end{macrocode}
946 % \begin{macro}{\nonfrenchspacing}
947 % Only one space after colons, unless someone else has already tinkered
948 % with its space factor.
949 %    \begin{macrocode}
950   \let\mlastyle@intnfs\nonfrenchspacing
951   \def\nonfrenchspacing{\mlastyle@intnfs
952     \ifnum\the\sfcode`\:=2000\sfcode`\:=1999\fi}
953 \ifnum\the\sfcode`\:=2000\sfcode`\:=1999\fi
954 %    \end{macrocode}
955 % \end{macro}
956 % \subsubsection{Header}
957 % The last name and page number appear on every page, including the first.
958 %    \begin{macrocode}
959   \RequirePackage{fancyhdr}
960   \fancypagestyle{plain}{\fancyhf{}}
961   \fancypagestyle{mlastyle}{
962     \fancyhf{}
963     \rhead{\mlastyle@surname{} \thepage}
964     \renewcommand{\headrulewidth}{0pt}
965     \renewcommand{\footrulewidth}{0pt}}
966   \pagestyle{mlastyle}
967 %    \end{macrocode}
968 % \subsubsection{Notes}
969 % Footnotes should be indented .5 inches; however .56 inches is used
970 % in a crude attempt to compensate for
971 % the alignment provided by the \package{footmisc} package.  Endnotes are
972 % preferred in MLA style anyway, so this should not be a problem in most
973 % circumstances.
974 %    \begin{macrocode}
975   \RequirePackage[ragged,norule]{footmisc}
976   \def\footnotelayout{\linespread{1}\footnotesize\raggedright{} }
977   \footnotemargin\mlastyle@i
978   \advance\footnotemargin .35em
979   \skip\footins=2\baselineskip
980   \footnotesep 1.2\footnotesep
981   \addtolength\footnotesep{\baselineskip}
982   \def\footnotesize{\normalsize}
983 %    \end{macrocode}
984 % ^^A\let\footnoterule\relax
985 % \begin{macro}{\enoteformat}
986 % \begin{macro}{\enoteheading}
987 % \begin{macro}{\enotesize}
988 % Endnotes are supported, but only if the \package{endnotes} package is
989 % loaded {\em before\/} this package.
990 %    \begin{macrocode}
991   \ifx\@undefined\endnote\else
992     \def\enoteheading{\newpage\section*{\notesname}}
993     \def\enoteformat{\leavevmode\makeenmark{} }
994     \def\enotesize{\normalsize}
995   \fi
996 %    \end{macrocode}
997 % \end{macro}
998 % \end{macro}
999 % \end{macro}
1000 % \subsubsection{Bibliography}
1001 % \begin{macro}{\url@mlastyle}
1002 % |\url| is needed to format urls in the bibliography.
1003 %    \begin{macrocode}
1004 \urlstyle{mla}
1005 %    \end{macrocode}
1006 % \end{macro}
1007 % ^^A\ifx\@undefined\url{
1008 % ^^A  \catcode`/=13
1009 % ^^A    \gdef\url{\bgroup\catcode`/=13
1010 % ^^A    \let/\slash\mlastyle@url}
1011 % ^^A    \gdef\mlastyle@url#1{#1\egroup}}
1012 % ^^A}\fi
1013 % \begin{environment}{thebibliography}
1014 % The definition of |thebibliography| varies depending on the document
1015 % class.
1016 %    \begin{macrocode}
1017 \ifx\@undefined\citet
1018     \renewenvironment\thebibliography#1{\clearpage
1019       \@ifundefined{chapter}
1020         {\section*{\refname}}
1021         {\chapter*{\bibname}}
1022       \list{\@biblabel{\@arabic\c@enumiv}}%
1023         {\settowidth\labelwidth{\@biblabel{#1}}}
1024         \leftmargin\labelwidth
1025         \advance\leftmargin\labelsep
1026         \itemindent-\leftmargin
1027         \let\newblock\@empty
1028         %\sfcode`\.=\@m
1029         \usecounter{enumiv}
1030         \sloppy
1031       }
1032       {\def\@noitemerr
1033         {\@latex@warning{Empty `thebibliography' environment}}%
1034       \endlist}
1035 %    \end{macrocode}
1036 % \end{environment}
1037 % If the \package{natbib} package is loaded, the following is executed
1038 % instead.
1039 %    \begin{macrocode}
1040 \else
1041   \bibhang\mlastyle@i\bibsep\z@
1042 \fi
1043 %    \end{macrocode}
1044 % ^^A  \newcommand\bibpreamble{%
1045 % ^^A    \@ifundefined{citet}{}%
1046 % ^^A    {\bibhang\mlastyle@i\bibsep\z@}}
1047 %    \begin{macrocode}
1048 \fi % \ifmlastyle@format
1049 %    \end{macrocode}
1050
1051 %    \begin{macrocode}
1052 %</package>
1053 %    \end{macrocode}
1054 %
1055 % \Finale
1056 \endinput
1057 % vim:tw=74