Wrote several pages of documentation
[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 .dtx mlastyle file] 
22 %
23 %<*driver>
24 \documentclass[draft]{ltxdoc}
25 \iftrue
26   \usepackage[compat]{mlastyle}
27   \addtolength{\headsep}{-25pt}
28   \addtolength{\headheight}{-12pt}
29   \addtolength{\topmargin}{-17pt}
30   \addtolength{\textheight}{58pt}
31   \IfFileExists{ulem.sty}{\usepackage[normalem]{ulem}}{\let\uline\emph}
32 \else
33   \usepackage[mla]{mlastyle}
34   \addtolength{\marginparwidth}{1in}
35   \addtolength{\textwidth}{-1in}
36   \addtolength{\headwidth}{-1in}
37 \fi
38 \IfFileExists{times.sty}%
39   {\newcommand{\examp}[2][]{{\let\emph\uline\fontfamily{ptm}\selectfont##2}##1}}%
40   {\newcommand{\examp}[2][]{``##2##1''}}
41
42 \EnableCrossrefs
43 \CodelineIndex
44 \RecordChanges
45 %\OnlyDescription
46 \begin{document}
47   \DocInput{mlastyle.dtx}
48 \end{document}
49 %</driver>
50 % \fi
51 %
52 % \CheckSum{0}
53 %
54 % \CharacterTable
55 %  {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
56 %   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
57 %   Digits        \0\1\2\3\4\5\6\7\8\9
58 %   Exclamation   \!     Double quote  \"     Hash (number) \#
59 %   Dollar        \$     Percent       \%     Ampersand     \&
60 %   Acute accent  \'     Left paren    \(     Right paren   \)
61 %   Asterisk      \*     Plus          \+     Comma         \,
62 %   Minus         \-     Point         \.     Solidus       \/
63 %   Colon         \:     Semicolon     \;     Less than     \<
64 %   Equals        \=     Greater than  \>     Question mark \?
65 %   Commercial at \@     Left bracket  \[     Backslash     \\
66 %   Right bracket \]     Circumflex    \^     Underscore    \_
67 %   Grave accent  \`     Left brace    \{     Vertical bar  \|
68 %   Right brace   \}     Tilde         \~}
69 %
70 %
71 % \changes{v0.9}{2003/11/09}{Converted to \texttt{dtx} file}
72 % \changes{v0.8}{2003/10/15}{Initial version}
73 %
74 % \GetFileInfo{mlastyle.sty}
75 %
76 % \DoNotIndex{\ }
77 % \DoNotIndex{\.}
78 % \DoNotIndex{\@afterindentfalse}
79 % \DoNotIndex{\@afterindenttrue}
80 % \DoNotIndex{\@arabic}
81 % \DoNotIndex{\@author}
82 % \DoNotIndex{\@auxout}
83 % \DoNotIndex{\@citea}
84 % \DoNotIndex{\@citeb}
85 % \DoNotIndex{\@date}
86 % \DoNotIndex{\@empty}
87 % \DoNotIndex{\@firstofone}
88 % \DoNotIndex{\@for}
89 % \DoNotIndex{\@ifundefined}
90 % \DoNotIndex{\@latex@warning}
91 % \DoNotIndex{\@listI}
92 % \DoNotIndex{\@listi}
93 % \DoNotIndex{\@listii}
94 % \DoNotIndex{\@listiii}
95 % \DoNotIndex{\@listiv}
96 % \DoNotIndex{\@listv}
97 % \DoNotIndex{\@listvi}
98 % \DoNotIndex{\@startsection}
99 % \DoNotIndex{\@tempswafalse}
100 % \DoNotIndex{\@title}
101 % \DoNotIndex{\@undefined}
102 % \DoNotIndex{\DeclareOption}
103 % \DoNotIndex{\ExecuteOptions}
104 % \DoNotIndex{\G@refundefinedtrue}
105 % \DoNotIndex{\ProcessOptions}
106 % \DoNotIndex{\RequirePackage}
107 % \DoNotIndex{\addtolength}
108 % \DoNotIndex{\advance}
109 % \DoNotIndex{\baselineskip}
110 % \DoNotIndex{\begin}
111 % \DoNotIndex{\bfseries}
112 % \DoNotIndex{\c@enumiv}
113 % \DoNotIndex{\catcode}
114 % \DoNotIndex{\centering}
115 % \DoNotIndex{\centerline}
116 % \DoNotIndex{\chapter}
117 % \DoNotIndex{\citation}
118 % \DoNotIndex{\clearpage}
119 % \DoNotIndex{\csname}
120 % \DoNotIndex{\day}
121 % \DoNotIndex{\def}
122 % \DoNotIndex{\do}
123 % \DoNotIndex{\edef}
124 % \DoNotIndex{\else}
125 % \DoNotIndex{\end}
126 % \DoNotIndex{\endcsname}
127 % \DoNotIndex{\endlist}
128 % \DoNotIndex{\exhyphenpenalty}
129 % \DoNotIndex{\expandafter}
130 % \DoNotIndex{\f@baselineskip}
131 % \DoNotIndex{\fancyhf}
132 % \DoNotIndex{\fancypagestyle}
133 % \DoNotIndex{\fi}
134 % \DoNotIndex{\futurelet}
135 % \DoNotIndex{\gdef}
136 % \DoNotIndex{\hangindent}
137 % \DoNotIndex{\headrulewidth}
138 % \DoNotIndex{\if@filesw}
139 % \DoNotIndex{\if@tempswa}
140 % \DoNotIndex{\ifcase}
141 % \DoNotIndex{\ifmlastyle@bibstyle}
142 % \DoNotIndex{\ifmlastyle@format}
143 % \DoNotIndex{\ifmlastyle@papersize}
144 % \DoNotIndex{\ifmlastyle@style}
145 % \DoNotIndex{\ifmlastyle@times}
146 % \DoNotIndex{\ifmlastyle@underline}
147 % \DoNotIndex{\ifx}
148 % \DoNotIndex{\immediate}
149 % \DoNotIndex{\item}
150 % \DoNotIndex{\itemindent}
151 % \DoNotIndex{\itemsep}
152 % \DoNotIndex{\labelsep}
153 % \DoNotIndex{\labelwidth}
154 % \DoNotIndex{\leavevmode}
155 % \DoNotIndex{\leftmargin}
156 % \DoNotIndex{\leftmargini,\leftmarginii,\leftmarginiii}
157 % \DoNotIndex{\leftmarginiv,\leftmarginv,\leftmarginvi}
158 % \DoNotIndex{\let}
159 % \DoNotIndex{\linespread}
160 % \DoNotIndex{\list}
161 % \DoNotIndex{\listparindent}
162 % \DoNotIndex{\makeenmark}
163 % \DoNotIndex{\mbox}
164 % \DoNotIndex{\mlastyle@bibstylefalse}
165 % \DoNotIndex{\mlastyle@bibstyletrue}
166 % \DoNotIndex{\mlastyle@cite}
167 % \DoNotIndex{\mlastyle@course}
168 % \DoNotIndex{\mlastyle@formatfalse}
169 % \DoNotIndex{\mlastyle@formattrue}
170 % \DoNotIndex{\mlastyle@instructor}
171 % \DoNotIndex{\mlastyle@intbib}
172 % \DoNotIndex{\mlastyle@papersizefalse}
173 % \DoNotIndex{\mlastyle@papersizetrue}
174 % \DoNotIndex{\mlastyle@qspread}
175 % \DoNotIndex{\mlastyle@sl@sh}
176 % \DoNotIndex{\mlastyle@slash}
177 % \DoNotIndex{\mlastyle@slashnext}
178 % \DoNotIndex{\mlastyle@slashx}
179 % \DoNotIndex{\mlastyle@stylefalse}
180 % \DoNotIndex{\mlastyle@styletrue}
181 % \DoNotIndex{\mlastyle@surname}
182 % \DoNotIndex{\mlastyle@timesfalse}
183 % \DoNotIndex{\mlastyle@timestrue}
184 % \DoNotIndex{\mlastyle@underlinefalse}
185 % \DoNotIndex{\mlastyle@underlinetrue}
186 % \DoNotIndex{\month}
187 % \DoNotIndex{\newblock}
188 % \DoNotIndex{\newcommand}
189 % \DoNotIndex{\newenvironment}
190 % \DoNotIndex{\newif}
191 % \DoNotIndex{\newpage}
192 % \DoNotIndex{\noindent}
193 % \DoNotIndex{\normalsize}
194 % \DoNotIndex{\notesname}
195 % \DoNotIndex{\number}
196 % \DoNotIndex{\or}
197 % \DoNotIndex{\p@}
198 % \DoNotIndex{\pagestyle}
199 % \DoNotIndex{\par}
200 % \DoNotIndex{\parindent}
201 % \DoNotIndex{\parsep}
202 % \DoNotIndex{\penalty}
203 % \DoNotIndex{\relax}
204 % \DoNotIndex{\renewcommand}
205 % \DoNotIndex{\renewenvironment}
206 % \DoNotIndex{\reset@font}
207 % \DoNotIndex{\rhead}
208 % \DoNotIndex{\setlength}
209 % \DoNotIndex{\settowidth}
210 % \DoNotIndex{\sfcode}
211 % \DoNotIndex{\skip}
212 % \DoNotIndex{\sloppy}
213 % \DoNotIndex{\space}
214 % \DoNotIndex{\string}
215 % \DoNotIndex{\sw@llow}
216 % \DoNotIndex{\the}
217 % \DoNotIndex{\thepage}
218 % \DoNotIndex{\topsep}
219 % \DoNotIndex{\usecounter}
220 % \DoNotIndex{\vskip}
221 % \DoNotIndex{\write}
222 % \DoNotIndex{\year}
223 % \DoNotIndex{\z@}
224 % \DoNotIndex{\evensidemargin}
225 % \DoNotIndex{\headheight}
226 % \DoNotIndex{\headsep}
227 % \DoNotIndex{\hoffset}
228 % \DoNotIndex{\marginparwidth}
229 % \DoNotIndex{\oddsidemargin}
230 % \DoNotIndex{\raggedbottom}
231 % \DoNotIndex{\raggedright}
232 % \DoNotIndex{\textheight}
233 % \DoNotIndex{\textwidth}
234 % \DoNotIndex{\topmargin}
235 % \DoNotIndex{\voffset}
236 % \DoNotIndex{\paperheight}
237 % \DoNotIndex{\paperwidth}
238 % \DoNotIndex{\pdfpageheight}
239 % \DoNotIndex{\pdfpagewidth}
240 % \DoNotIndex{\special}
241 %
242 % \hyphenation{pre-am-ble pro-fess-ors}
243 %
244 % \newcommand{\Lopt}[1]{\textsf {#1}}
245 % \newcommand{\file}[1]{\texttt {#1}}
246 % \newcommand{\package}[1]{\textsf {#1}}
247 % ^^A\newcommand{\Lcount}[1]{\textsl {\small#1}}
248 % ^^A\newcommand{\pstyle}[1]{\textsl {#1}}
249 %
250 % \newcommand{\OptionIndex}[1]{\index{#1\actualchar\Lopt{#1} (option)\encapchar usage}\index{options:\levelchar\Lopt{#1}}}
251 %
252 % \title{The \package{mlastyle} package\thanks{This document
253 %   corresponds to \package{mlastyle}~\fileversion, dated \filedate.}}
254 % \author{Tim Pope \\ \texttt{latex@rebelongto.us}}
255 % \surname{Pope}
256 %
257 % \maketitle
258 % \tableofcontents
259 %
260 % \section{Introduction}
261 %
262 % MLA style consists of a set of documentation conventions that has gained
263 % widespread acceptance in the humanites.  \LaTeX{} is a
264 % document preparation system enjoying populatity in the scientific field.
265 % It should come as no surprise that complete, up-to-date implementations
266 % of MLA style for \LaTeX{} are in short supply.  The \LaTeX{} package
267 % \package{mlastyle} aims to fill this void.
268 %
269 % \section{Usage}
270 %
271 % A sample document follows.
272 % \begin{verbatim}
273 %\documentclass[12pt]{article}
274 %\usepackage{mlastyle}
275 %
276 %\author{John Doe}
277 %\instructor{Professor Smith}
278 %\course{English 101}
279 %\date{1~Jan.\ 1970}
280 %\title{The Futility of Compulsory English Classes}
281 %
282 %\begin{document}
283 %\maketitle
284 %'Nuff said.
285 %\end{document}\end{verbatim}
286 % \subsection{Initialization Macros}
287 % The \index{heading|usage}mandatory heading is generated with
288 % \DescribeMacro{\maketitle}|\maketitle|.  Use the standard macros
289 % |\author|, |\title|, and |\date| to specify the relevant information.
290 % To define the instructor and name of the course, use the aptly named
291 % \DescribeMacro{\instructor}|\instructor|\marg{instructor} and
292 % \DescribeMacro{\course}|\course|\marg{course} macros.
293 %
294 % The last name for use in the header\index{header|usage} is derived from
295 % |\author|.  If this does not produce the desired result, use
296 % \DescribeMacro{\surname}|\surname|\marg{last name} to override it.
297 %
298 % MLA style recommends the DD~Mon.~YYYY format for specifying dates;
299 % \DescribeMacro{\today}|\today| has been conveniently redefined to this.
300 % However, other formats can be used as long as done so consistently
301 % throughout the document.  Also note that the date in the header should
302 % be the due date of the assignment; students who finish assignments early
303 % would be wise to call |\date|\marg{due date}.
304 %
305 % \subsection{Environments}
306 % \DescribeEnv{verse}
307 % \DescribeEnv{quote}
308 % \DescribeEnv{quotation}
309 % Three environments have been modified from standard \LaTeX to better
310 % suit MLA format.  To typeset poetry\index{poetry|usage} and
311 % drama\index{drama|usage}, use the |verse| environment.
312 % Quotations\index{quotations|usage} of a single paragraph or less always
313 % use the |quote| environment.  For longer passages, use the |quotation|
314 % environment if the beginning of the passage marks the beginning of a
315 % paragraph.  Otherwise, use the |quote| environment.
316 %
317 % Be sure to follow MLA guidelines when using these environments.  Short
318 % quotes should be enclosed in quotation marks and included directly in
319 % the text.
320 %
321 % \subsection{Modes of Operation}
322 % The \package{mlastyle} package has four basic modes of operations,
323 % selected with one of four mutually exclusive options.  The
324 % \OptionIndex{format}\Lopt{format}
325 % option tells \package{mlastyle} to use MLA format (i.e., 1 inch margins,
326 % double-spaced, etc.).  The \OptionIndex{style}\Lopt{style} option tells
327 % \package{mlastyle} to use MLA style (i.e., parenthetical documentation
328 % includes the author and page number, etc).  Each of these options
329 % disables the other; to use both MLA format and MLA style, specify the
330 % \OptionIndex{mla}\Lopt{mla} option, or nothing at all.
331 %
332 % To disable both MLA style and MLA format, use the
333 % \OptionIndex{compat}\Lopt{compat} option.  This differs from omitting
334 % the package entirely in that certain macros are still defined (e.g.,
335 % |\instructor|).  Also, citations are handled a bit differently than in
336 % standard \LaTeX{} (see section~\ref{sec:documentation}).
337 %
338 % In addition to the above, several other options modify the behavior of
339 % \package{mlastyle}.
340 %
341 % \subsubsection{Italics vs.\ Underlining} \index{underlining|usage}
342 % \index{italics|usage}
343 % MLA format dictates that emphasis should be indicated by underlining the
344 % text.  Thus, the \package{ulem} package is loaded by default
345 % in \Lopt{mla} and \Lopt{format} modes.  To disable this, use the
346 % \OptionIndex{italics}\Lopt{italics} option.  Conversely, if underlining
347 % is desired in \Lopt{style} or \Lopt{compat} mode, the
348 % \OptionIndex{underline}\Lopt{underline} option can be used.
349 %
350 % \subsubsection{Fonts}
351 % By default, \package{mlastyle} uses \TeX's standard Computer Modern
352 % font.  Some professors\penalty\exhyphenpenalty---particularly those
353 % concerned with document length---mandate that assignments be set in
354 % \examp[.]{Times}  This can be achieved with the
355 % \OptionIndex{times}\Lopt{times} option, which simply loads the
356 % \package{times} package.  This option can be cancelled with
357 % the \OptionIndex{cm}\Lopt{cm} option, which reverts to Computer Modern.
358 %
359 % \index{works cited|usage}
360 % \subsection{Documenting Sources} \label{sec:documentation}
361 %
362 % The \package{mlastyle} package reimpliments the
363 % \DescribeEnv{thebibliography}|thebibliography| environment to generate
364 % the list of works cited in MLA style.  Use of \LaTeX's bibliography
365 % features is beyond the scope of this document; however, the following
366 % example, which should be included just before |\end{document}|, might
367 % prove to be a useful starting point:
368 %\begin{verbatim}
369 %\begin{thebibliography}{}
370 %
371 %\bibitem[Lamport]{latex}
372 %Lamport, Leslie.
373 %\newblock {\em \LaTeX: A Document Preparation System}.
374 %\newblock 2nd.~ed.
375 %\newblock Reading: Addison-Wesley, 1994.
376 %
377 %\end{thebibliography}\end{verbatim}
378 %
379 % In this example, |Lamport| is the author's last name (for use in
380 % citations) and |latex| is the marker used to reference it (see
381 % section~\ref{sec:parenthetical}).
382 %
383 % For information on automatically generating the list of works cited with
384 % \BibTeX, see section~\ref{sec:bibtex}.
385 %
386 % \subsubsection{Parenthetical Documentation} \label{sec:parenthetical}
387 % A simple citation can by achieved with a call to
388 % \DescribeMacro{\cite}|\cite|\oarg{pages}\marg{marker}, where
389 % marker refers to the key given to either
390 % \index{BibTeX=\BibTeX|usage}\BibTeX{} or the |\bibitem| macro (|latex|
391 % in the above example).
392 % Omit \oarg{pages} if the source has no page numbers.
393 % Multiple sources can be cited using the syntax
394 % |\cite|\oarg{pages}|{|\meta{marker
395 % 1}\texttt{,}\penalty\exhyphenpenalty\meta{marker 2}\ldots|}|; however, page
396 % numbers can currently be specified only for the last referenced source.
397 % To work around this limitation |\citeN|, explained below, can be used.
398 %
399 % Three additional citation commands are provided, all of which take the
400 % same arguments as |\cite|.  To omit the author information from the
401 % citation, use \DescribeMacro{\citepage}|\citepage|.  Indirect
402 % citations---those of the format \examp{(qtd. in Brown 6)}---can be
403 % created with \DescribeMacro{\citeindirect}|\citeindirect|.  Finally, the
404 % parentheses are omitted by \DescribeMacro{\citeN}|\citeN|.  This was
405 % intended for use in cross references, but it can also help in citing
406 % multiple works.  The result of
407 % |(\citeN[42]{knuth}|\texttt{; }|\citeN[69]{lamport})|
408 % would be something like \examp[.]{(Knuth 42; Lamport 69)}
409 %
410 % \subsubsection{Using {\rm \BibTeX}} \label{sec:bibtex}
411 % Coupled with \index{BibTeX=\BibTeX|usage}\BibTeX,
412 % \package{mlastyle} provides a experimental implementation of MLA
413 % documentation style.  Put\SpecialUsageIndex{\bibliographystyle}
414 % |\bibliographystyle{mlastyle}| in the document preamble to load the
415 % bibliography style.  Alternatively, the
416 % \OptionIndex{bibstyle}\Lopt{bibstyle} option can handle this
417 % automatically, loading a bibliography style of |mlastyle| in \Lopt{mla}
418 % and \Lopt{style} modes and a bibliography style of |plain| in
419 % \Lopt{format} and \Lopt{compat} modes.
420 %
421 % Use of \BibTeX{} is also beyond the scope of this document; instead,
422 % another example is provided.  To use it, substitute
423 % |\bibliography|\marg{filename} for the |thebibliography| environment.
424 % Then create \meta{filename}\file{.bib} with the contents below.
425 % Generating the document entails running \file{latex} on the \file{.tex}
426 % file, \file{bibtex} on the resulting \file{.aux} file, then \file{latex}
427 % twice more.
428 %\begin{verbatim}
429 %@BOOK{latex,
430 %  AUTHOR = "Leslie Lamport",
431 %  TITLE = "\LaTeX: A Document Preparation System",
432 %  KEY = "\LaTeX",
433 %  EDITION = "Second",
434 %  ADDRESS = "Reading",
435 %  PUBLISHER = "Addison-Wesley",
436 %  YEAR = "1994"}\end{verbatim}
437 % In \package{mlastyle}, The |KEY| field serves the additional purpose of
438 % specifying an abbreviated title.  This is unnecessary in the above
439 % example.  If an additional book by Leslie Lamport was included, however,
440 % the |KEY| field would allow |\cite{lamport}| to yield \examp{(Lamport,
441 % \emph{\LaTeX\/})} instead of \examp[.]{(Lamport, \emph{\LaTeX: A Document
442 % Preparation System\/})}
443 %
444 % \StopEventually{\PrintChanges\PrintIndex}
445 %
446 % \section{Implementation}
447 % \iffalse
448 %<*package>
449 % \fi
450 % \subsection{Options}
451 %
452 % \begin{macro}{\ifmlastyle@*}
453 % \begin{macro}{\mlastyle@*true}
454 % \begin{macro}{\mlastyle@*false}
455 % Most options are implemented by modifying a |\newif| declared for this
456 % purpose.
457 %    \begin{macrocode}
458 \newif\ifmlastyle@bibstyle
459 \DeclareOption{bibstyle}{\mlastyle@bibstyletrue}
460 \DeclareOption{nobibstyle}{\mlastyle@bibstylefalse}
461 \newif\ifmlastyle@papersize
462 \DeclareOption{papersize}{\mlastyle@papersizetrue}
463 \DeclareOption{nopapersize}{\mlastyle@papersizefalse}
464 \newif\ifmlastyle@underline
465 \DeclareOption{underline}{\mlastyle@underlinetrue}
466 \DeclareOption{italics}{\mlastyle@underlinefalse}
467 \newif\ifmlastyle@times
468 \DeclareOption{times}{\mlastyle@timestrue}
469 \DeclareOption{cm}{\mlastyle@timesfalse}
470 \newif\ifmlastyle@style
471 \DeclareOption{compat}{\mlastyle@stylefalse
472         \mlastyle@formatfalse
473         \mlastyle@underlinefalse}
474 \DeclareOption{mla}{\mlastyle@styletrue
475         \mlastyle@formattrue
476         \mlastyle@underlinetrue}
477 \newif\ifmlastyle@format
478 \DeclareOption{format}{\mlastyle@stylefalse
479         \mlastyle@formattrue
480         \mlastyle@underlinetrue}
481 \DeclareOption{style}{\mlastyle@styletrue
482         \mlastyle@formatfalse
483         \mlastyle@underlinefalse}
484 \DeclareOption{singlespacequotes}{
485   \def\mlastyle@qspread{\linespread{1}\normalsize\vskip\baselineskip}}
486 \DeclareOption{doublespacequotes}{\let\mlastyle@qspread\relax}
487 \ExecuteOptions{nobibstyle,nopapersize,mla,cm,doublespacequotes}
488 \ProcessOptions
489 %    \end{macrocode}
490 % \end{macro}
491 % \end{macro}
492 % \end{macro}
493 % If the \Lopt{papersize} option is set, add the appropriate
494 % \textsc{PostScript} special, or adjust |\pdfpagewidth| and
495 % |\pdfpageheight| if pdf\LaTeX{} is in use.
496 %    \begin{macrocode}
497 \ifmlastyle@papersize
498   \ifx\@undefined\pdfpagewidth
499     \special{papersize=\the\paperwidth,\the\paperheight}
500   \else
501     \setlength{\pdfpagewidth}{\paperwidth}
502     \setlength{\pdfpageheight}{\paperheight}
503   \fi
504 \fi % \ifmlastyle@papersize
505 %    \end{macrocode}
506 % If the \Lopt{bibstyle} option is set, specify the bibliography style.
507 %    \begin{macrocode}
508 \ifmlastyle@bibstyle
509   \ifmlastyle@style
510     \bibliographystyle{mlastyle}
511   \else
512     \bibliographystyle{plain}
513   \fi
514 \fi % \ifmlastyle@bibstyle
515 %    \end{macrocode}
516 % Load the \package{ulem} package if the \Lopt{underline} option is set.
517 %    \begin{macrocode}
518 \ifmlastyle@underline
519   \RequirePackage{ulem}
520 \fi % \ifmlastyle@underline
521 %    \end{macrocode}
522 % Load the \package{times} package if the \Lopt{times} option is set.
523 %    \begin{macrocode}
524 \ifmlastyle@times
525   \RequirePackage{times}
526 \fi % \ifmlastyle@times
527 %    \end{macrocode}
528 % \subsection{Macros}
529 % \begin{macro}{\instructor}
530 % Define the instructor, along with an obsolete synonym.
531 %    \begin{macrocode}
532 \def\instructor#1{\gdef\mlastyle@instructor{#1}}
533 \let\professor\instructor
534 %    \end{macrocode}
535 % \end{macro}
536 % \begin{macro}{\course}
537 % Define the course, along with an obsolete synonym.
538 %    \begin{macrocode}
539 \def\course#1{\gdef\mlastyle@course{#1}}
540 \let\classname\course
541 %    \end{macrocode}
542 % \end{macro}
543 % \begin{macro}{\surname}
544 % Define the surname, along with an obsolete synonym.
545 %    \begin{macrocode}
546 \def\surname#1{\gdef\mlastyle@surname{#1}}
547 \def\mlastyle@surname{\def\sw@llow##1 {}\expandafter\sw@llow\@author}
548 \let\lastname\surname
549 %    \end{macrocode}
550 % \end{macro}
551 % \subsection{Formatting}
552 % Formatting is done if the \Lopt{mla} or \Lopt{format} option is set.
553 %    \begin{macrocode}
554 \ifmlastyle@format
555 %    \end{macrocode}
556 % \subsubsection{Macros}
557 % \begin{macro}{\maketitle}
558 % |\maketitle| generates a heading in MLA format.
559 %    \begin{macrocode}
560   \renewcommand{\maketitle}{\begin{flushleft}
561     \@author\par
562     \@ifundefined{mlastyle@instructor}{}{\mlastyle@instructor}\par
563     \@ifundefined{mlastyle@course}{}{\mlastyle@course}\par
564     \@date\end{flushleft}
565     \begin{center}\@title\end{center}\par
566   }
567 %    \end{macrocode}
568 % \end{macro}
569 % \begin{macro}{\today}
570 % |\today| is redefined to DD~Mon.~YYYY format.
571 %    \begin{macrocode}
572 \def\today{\number\day~\ifcase\month\or
573   Jan.\or Feb.\or Mar.\or Apr.\or May\or June\or July\or 
574   Aug.\or Sept.\or Oct.\or Nov.\or Dec.\fi\ \number\year}
575 %    \end{macrocode}
576 % \end{macro}
577 % \begin{macro}{\slash}
578 % No penalty for |\slash|, and plain /'s permit line breaks if necessary.
579 % ^^A\let\mlastyle@sl@sh=/
580 %    \begin{macrocode}
581   \def\slash{/\penalty\z@}
582   \def\mlastyle@slash{/\futurelet\mlastyle@slashnext\mlastyle@slashx}
583   \def\mlastyle@slashx{\ifx\mlastyle@slashnext/\else
584     \penalty\exhyphenpenalty\fi}
585 %    \end{macrocode}
586 % \end{macro}
587 % \begin{macro}{\section}
588 % \begin{macro}{\subsection}
589 % Sections are formatted by centering the section name and beginning a new
590 % page.  Subsections simply center the section name.
591 %    \begin{macrocode}
592   \renewcommand{\section}{\clearpage\@startsection{section}{1}{\z@
593     }{0pt}{1sp}{\centering}}
594   \renewcommand{\subsection}{\@startsection{subsection}{2}{\z@
595     }{0pt}{1sp}{\centering}}
596   \renewcommand{\subsubsection}{\@startsection{subsubsection}{3}{\z@
597     }{0pt}{1sp}{\centering}}
598 %    \end{macrocode}
599 % ^^A\let\mlastyle@vfont\verbatim@font
600 % ^^A\def\verbatim@font{\mlastyle@qspread\mlastyle@vfont}
601 % \end{macro}
602 % \end{macro}
603 % \subsubsection{Environments}
604 % ^^A%\newenvironment{blocks}{\begin{quote} \linespread{1} \small \normalsize}{\end{quote} \linespread{2} \small \normalsize}
605 % ^^A%\newenvironment{blockm}{\begin{quotation} \linespread{1} \small \normalsize}{\end{quotation} \linespread{2} \small \normalsize}
606 % \begin{environment}{verse}
607 % Indented 1 inch, with an additional .25 inch hanging indent.
608 %    \begin{macrocode}
609   \renewenvironment{verse}{\list{}{\mlastyle@qspread
610     \advance\leftmargin.75in\itemindent-.25in
611     \listparindent\itemindent}\item\relax}{\endlist}
612 %    \end{macrocode}
613 % \end{environment}
614 % \begin{environment}{quotation}
615 % Indented 1 inch, with a paragraph indent of an additional .25 inches.
616 %    \begin{macrocode}
617   \renewenvironment{quotation}{\list{}{\mlastyle@qspread
618     \advance\leftmargin.5in\itemindent.25in
619     \listparindent\itemindent}\item\relax}{\endlist}
620 %    \end{macrocode}
621 % \end{environment}
622 % \begin{environment}{quote}
623 % Identical to the |quotation| environment, except the first paragraph is not
624 % indented.
625 %    \begin{macrocode}
626   \renewenvironment{quote}{\list{}{\mlastyle@qspread
627     \advance\leftmargin.5in
628     \listparindent.25in}\item\relax}{\endlist}
629 %    \end{macrocode}
630 % \end{environment}
631 % \begin{environment}{workscited}
632 % Works Cited environment, for compatibility with \package{mla-paper}.
633 %    \begin{macrocode}
634   \newenvironment{workscited}%
635     {\newpage{\centerline{Works Cited}}}{\newpage}
636   \newcommand{\bibent}{\noindent \hangindent .5in}
637 %    \end{macrocode}
638 % \end{environment}
639 % \subsubsection{Margins}
640 % Top and bottom margins are 1 inch each.  The header is flush with the
641 % right margin at .5 inches from the top of the page.
642 % ^^A\addtolength{\headheight}{-1pt}
643 % ^^A\setlength{\headheight}{1.4\headheight}% kludge
644 %    \begin{macrocode}
645   \addtolength{\voffset}{-0.5in}
646   \setlength{\textheight}{\paperheight}
647   \addtolength{\textheight}{-2in}
648   \setlength{\topmargin}{0in}
649   \setlength\headheight\f@baselineskip
650   \setlength{\headsep}{0.5in}
651   \addtolength{\headsep}{-\headheight}
652   \setlength{\footskip}{0.25in}
653   \raggedbottom
654 %    \end{macrocode}
655 % Left and right margins in MLA format are each 1 inch wide.
656 %    \begin{macrocode}
657   \addtolength{\hoffset}{-0.5in}
658   \setlength{\textwidth}{\paperwidth}
659   \addtolength{\textwidth}{-2in}
660   \setlength{\oddsidemargin}{0.5in}
661   \setlength{\evensidemargin}{0.5in}
662   \setlength{\marginparwidth}{0.5in}
663 %    \end{macrocode}
664 % \subsubsection{Paragraphs}
665 % Paragraphs should be left justified, with the first line indented .5
666 % inches.
667 %    \begin{macrocode}
668   \raggedright
669   \setlength{\parindent}{.5in}
670 %    \end{macrocode}
671 % MLA format specifies that all paragraphs should be indented, even those
672 % beginning a new section.  This snippet from \package{indentfirst} changes
673 % \LaTeX{} to meet that requirement.
674 %    \begin{macrocode}
675   \let\@afterindentfalse\@afterindenttrue
676   \@afterindenttrue
677 %    \end{macrocode}
678 % Double space {\em everywhere}.
679 % ^^A\RequirePackage{doublespace}
680 %    \begin{macrocode}
681   \linespread{2.0}
682   \leftmargini\parindent
683   \def\@listi{\leftmargin\leftmargini
684   \parsep\z@\itemsep\z@\topsep -3\p@\relax}
685   \let\@listI\@listi
686   \@listi
687   \def\@listii{\leftmargin\leftmarginii
688   \parsep\z@\itemsep\z@\topsep -3\p@\relax}
689   \def\@listiii{\leftmargin\leftmarginiii
690   \parsep\z@\itemsep\z@\topsep -3\p@\relax}
691   \def\@listiv{\leftmargin\leftmarginiv
692   \parsep\z@\itemsep\z@\topsep -3\p@\relax}
693   \def\@listv{\leftmargin\leftmarginv
694   \parsep\z@\itemsep\z@\topsep -3\p@\relax}
695   \def\@listvi{\leftmargin\leftmarginvi
696   \parsep\z@\itemsep\z@\topsep -3\p@\relax}
697 %    \end{macrocode}
698 % \subsubsection{Header}
699 % The last name and page number appear on every page, including the first.
700 %    \begin{macrocode}
701   \RequirePackage{fancyhdr}
702   \fancypagestyle{plain}{\fancyhf{}}
703   \fancypagestyle{mlastyle}{
704     \fancyhf{}
705     \rhead{\mlastyle@surname{} \thepage}
706     \renewcommand{\headrulewidth}{0pt}
707     \renewcommand{\footrulewidth}{0pt}}
708   \pagestyle{mlastyle}
709 %    \end{macrocode}
710 % \subsubsection{Notes}
711 % Footnotes should be indented .5 inches; however .56 inches is used
712 % in a crude attempt to compensate for
713 % the alignment provided by the \package{footmisc} package.  Endnotes are
714 % preferred in MLA style anyway, so this should not be a problem in most
715 % circumstances.
716 %    \begin{macrocode}
717   \RequirePackage[ragged,norule]{footmisc}
718   \def\footnotelayout{\linespread{1}\footnotesize\raggedright{} }
719   \footnotemargin .56in
720   \skip\footins=2\baselineskip
721   \footnotesep 1.2\footnotesep
722   \addtolength\footnotesep{\baselineskip}
723   \def\footnotesize{\normalsize}
724 %    \end{macrocode}
725 % ^^A\let\footnoterule\relax
726 % Endnotes are supported, but only if the \package{endnotes} package is
727 % loaded {\em before\/} this package.
728 %    \begin{macrocode}
729   \ifx\@undefined\endnote\else
730     \def\enoteheading{\newpage\section*{\notesname}}
731     \def\enoteformat{\leavevmode\makeenmark{} }
732     \def\enotesize{\normalsize}
733   \fi
734 %    \end{macrocode}
735 % \subsubsection{Bibliography}
736 % The definition of |\thebibliography| varies depending on the document
737 % class.
738 %    \begin{macrocode}
739   \@ifundefined{chapter}
740 %    \end{macrocode}
741 % Article class.
742 %    \begin{macrocode}
743   { \def\thebibliography#1{\newpage\section*{\refname}
744       \list{\@biblabel{\@arabic\c@enumiv}}%
745       {\settowidth\labelwidth{\@biblabel{#1}}}
746       \leftmargin\labelwidth
747       \advance\leftmargin\labelsep
748       \itemindent-\leftmargin
749       \def\newblock{}
750       \usecounter{enumiv}
751       \sloppy%\sfcode`\.=1000\relax
752       \catcode`/=13\let/=\mlastyle@slash}}
753 %    \end{macrocode}
754 % Report/book class.
755 %    \begin{macrocode}
756   { \def\thebibliography#1{\chapter*{\bibname}
757       \list{\@biblabel{\@arabic\c@enumiv}}%
758       {\settowidth\labelwidth{\@biblabel{#1}}}
759       \leftmargin\labelwidth
760       \advance\leftmargin\labelsep
761       \itemindent-\leftmargin
762       \def\newblock{}
763       \usecounter{enumiv}
764       \sloppy%\sfcode`\.=1000\relax
765       \catcode`/=13\let/=\mlastyle@slash}}
766 %    \end{macrocode}
767 %    \begin{macrocode}
768 \fi % \ifmlastyle@format
769 %    \end{macrocode}
770 % \subsection{Style}
771 % \begin{macro}{\cite}
772 % \begin{macro}{\citeN}
773 % ^^A\begin{macro}{\citepage}
774 % ^^A\begin{macro}{\citequote}
775 % The following macros, combined with \file{mlastyle.bst}, provide
776 % for a bibliography in MLA style.  Note that the definition of |\cite|,
777 % |\citeN|, etc.\ vary depending on the options passed to
778 % \package{mlastyle}.
779 %
780 % \begin{macro}{\mlastyle@intcite}
781 % The original |\cite| is stored
782 % in |\mlastyle@intcite|.
783 %    \begin{macrocode}
784 \let\mlastyle@intcite\cite
785 %    \end{macrocode}
786 % \end{macro}
787 % \begin{macro}{\mlastyle@relax}
788 % This macro does nothing.  Depending on the options, either |\citeC| or
789 % |\citeM| and its ilk will utilize it.
790 %    \begin{macrocode}
791 \newcommand{\mlastyle@relax}[2][]{}
792 %    \end{macrocode}
793 % \end{macro}
794 % \subsubsection{MLA Style}
795 % \begin{macro}{\citeM}
796 % If the \Lopt{mla} or \Lopt{style} options are used, the following is
797 % executed.
798 %    \begin{macrocode}
799 \ifmlastyle@style
800   \def\@cite#1#2{(#1\if@tempswa{} #2\fi)}
801   \def\cite{\def\@cite##1##2{(##1\if@tempswa{}
802     ##2\fi)}\mlastyle@intcite}
803   \def\citeN{\def\@cite##1##2{##1\if@tempswa{}
804     ##2\fi}\mlastyle@intcite}
805   \def\citeM{\def\@cite##1##2{ (##1\if@tempswa{}
806     ##2\fi)}\mlastyle@intcite}
807   \def\citepage{\def\@cite##1##2{\if@tempswa(##2)\fi}\mlastyle@intcite}
808   \def\citepageM{\def\@cite##1##2{\if@tempswa{}
809     (##2)\fi}\mlastyle@intcite}
810   \def\citeindirect{\def\@cite##1##2%
811   {(qtd. in ##1\if@tempswa{} ##2\fi)}\mlastyle@intcite}
812   \def\citeindirectM{\def\@cite##1##2%
813   { (qtd. in ##1\if@tempswa{} ##2\fi)}\mlastyle@intcite}
814   \let\citeC\mlastyle@relax
815 %    \end{macrocode}
816 % \end{macro}
817 % \iffalse
818 % Place commas in-between citations in the same |\citeyear|, |\citeyearNP|,
819 % |\citeN|, or |\shortciteN| command.
820 % Use something like |\citeN{ref1,ref2,ref3}| and |\citeN{ref4}| for a list.
821 %
822 % \@citedata and \@citedatax:
823 %  \def\@citedata{%
824 %    \@ifnextchar [{\@tempswatrue\@citedatax}%
825 %                {\@tempswafalse\@citedatax[]}%
826 %  }
827 %  \def\@citedatax[#1]#2{%
828 %  \let\@citea\@empty
829 %  \if@filesw\immediate\write\@auxout{\string\citation{#2}}\fi%
830 %    \def\@citea{}\@cite{\@for\@citeb:=#2\do%
831 %      {\@citea\def\@citea{; }\@ifundefined% by Young
832 %        {b@\@citeb}{{\bf ?}%
833 %        \@warning{Citation `\@citeb' on page \thepage \space undefined}}%
834 %  {\csname b@\@citeb\endcsname}}}{#1}}%
835 % \fi
836 % \begin{macro}{\@citex}
837 % This is the original |\@citex| from \LaTeX{} modified to use semicolons.
838 %    \begin{macrocode}
839 \def\@citex[#1]#2{%
840   \let\@citea\@empty
841   \@cite{\@for\@citeb:=#2\do
842     {\@citea\def\@citea{;\penalty-1\ }%
843      \edef\@citeb{\expandafter\@firstofone\@citeb\@empty}%
844      \if@filesw\immediate\write\@auxout{\string\citation{\@citeb}}\fi
845      \@ifundefined{b@\@citeb}{\mbox{\reset@font\bfseries ?}%
846        \G@refundefinedtrue
847        \@latex@warning
848          {Citation `\@citeb' on page \thepage \space undefined}}%
849        {{\csname b@\@citeb\endcsname}}}}{#1}}
850 %    \end{macrocode}
851 % \end{macro}
852 % \begin{macro}{\@biblabel}
853 % No labels in the bibliography.
854 %    \begin{macrocode}
855   \def\@biblabel#1{#1}
856   \labelsep\z@
857   \let\mlastyle@intbib\thebibliography
858   \def\thebibliography#1{\mlastyle@intbib{#1}
859     \itemindent-\leftmargin\def\@biblabel##1{}}
860 %    \end{macrocode}
861 % \end{macro}
862 % Title either the bibliography or the references ``Works Cited,''
863 % depending on the document class.
864 %    \begin{macrocode}
865   \@ifundefined{chapter}
866   {\renewcommand\refname{Works Cited}}
867   {\renewcommand\bibname{Works Cited}}
868 %    \end{macrocode}
869 %
870 % ^^A% Define the command \workscited{bib}{style}{nocite}
871 % ^^A%\newcommand{\workscited}[3]{%
872 % ^^A%  \ifx\chapter\@undefined%
873 % ^^A%    \addcontentsline{toc}{chapter}{\bfseries\bibname}% report style
874 % ^^A%  \else
875 % ^^A%    \addcontentsline{toc}{section}{\bfseries\refname}% article style
876 % ^^A%  \fi
877 % ^^A%  \bibliography{#1}\bibliographystyle{#2}\nocite{#3}}
878 % ^^A% \fi
879 % ^^A\newcommand{\annote}[1]{\begin{list}{}{%
880 % ^^A                \setlength{\labelwidth}{0pt}
881 % ^^A                \addtolength{\leftmargin}{\parindent}
882 % ^^A                \setlength{\labelsep}{0pt}}%
883 % ^^A                \item #1 \end{list}}
884 % \subsubsection{Plain Style}
885 % \begin{macro}{\citeC}
886 % This next block is used only if the \Lopt{compat} option is set.
887 %    \begin{macrocode}
888 \else
889   \newcommand{\mlastyle@cite}[2][]{\@tempswafalse\@citex[]{#2}}
890   \let\cite\mlastyle@cite
891   \let\citepage\mlastyle@cite
892   \let\citeindirect\mlastyle@cite
893   \newcommand{\citeC}[2][]{ \@tempswafalse\@citex[]{#2}}
894   \let\citeM\mlastyle@relax
895   \let\citepageM\mlastyle@relax
896   \let\citeindirectM\mlastyle@relax
897 \fi
898 %    \end{macrocode}
899 % \end{macro}
900 %
901 % ^^A\end{macro}
902 % ^^A\end{macro}
903 % \end{macro}
904 % \end{macro}
905 % \iffalse
906 %</package>
907 % \fi
908 %
909 % \Finale
910 \endinput
911 % vim:tw=74