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