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