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