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