1 % \iffalse meta-comment
3 % Copyright (C) 2003 by Tim Pope <latex@rebelongto.us>
4 % ----------------------------------------------------
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:
11 % http://www.latex-project.org/lppl.txt
13 % and version 1.2 or later is part of all distributions of LaTeX
14 % version 1999/12/01 or later.
19 %<package>\NeedsTeXFormat{LaTeX2e}[1999/12/01]
20 %<package>\ProvidesPackage{mlastyle}
21 %<package> [2003/11/09 v0.9 MLA format and documentation style]
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}"}
28 AUTHOR = "Joseph Gibaldi",
29 TITLE = "MLA Handbook for Writers of Research Papers",
37 AUTHOR = "Leslie Lamport",
38 TITLE = "{\LaTeX}: A Document Preparation System",
42 PUBLISHER = "Addison-Wesley",
46 AUTHOR = "Tobias Oetker and Hubert Partl and Irene Hyna and Elisabeth
48 TITLE = "The Not So Short Introduction to {\LaTeXe}",
53 ACCESSDATE = "1~"#nov#"~2003",
54 URL = "CTAN://info/lshort/"}
57 AUTHOR = "Oren Patashnik",
58 TITLE = "{\BibTex ing}",
61 ACCESSDATE = "1~"#nov#"~2003",
62 URL = "CTAN://biblio/bibtex/distribs/doc/btxdoc.tex"}
64 \documentclass[draft]{ltxdoc}
66 \usepackage[mla]{mlastyle}
67 \bibliographystyle{mlastyle}
68 \addtolength{\marginparwidth}{1in}
69 \addtolength{\textwidth}{-1in}
70 \addtolength{\headwidth}{-1in}
72 \IfFileExists{natbib.sty}{
75 \bibpunct{[}{]}{,}{n}{}{,}%{
76 \bibliographystyle{plainnat}}
77 {\bibliographystyle{plain}}
78 \IfFileExists{url.sty}{\usepackage{url}}{}
79 \usepackage[compat]{mlastyle}
80 %\addtolength{\headsep}{-5pt}
81 %\addtolength{\headheight}{-12pt}
82 %\addtolength{\topmargin}{-17pt}
83 %\addtolength{\textheight}{22pt}
84 \IfFileExists{ulem.sty}{\usepackage[normalem]{ulem}}{\let\uline\emph}
86 \IfFileExists{times.sty}%
87 {\newcommand{\examp}[2][]{{\let\emph\uline\fontfamily{ptm}\selectfont##2}##1}}%
88 {\newcommand{\examp}[2][]{``##2##1''}}
90 {\makeatletter\gdef\NAT@MLA#1{#1}\gdef\NAT@idxtxt
91 {\expandafter\NAT@MLA\NAT@name\ \NAT@open\NAT@num\NAT@close}}
97 \DocInput{mlastyle.dtx}
105 % {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z
106 % Lower-case \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z
107 % Digits \0\1\2\3\4\5\6\7\8\9
108 % Exclamation \! Double quote \" Hash (number) \#
109 % Dollar \$ Percent \% Ampersand \&
110 % Acute accent \' Left paren \( Right paren \)
111 % Asterisk \* Plus \+ Comma \,
112 % Minus \- Point \. Solidus \/
113 % Colon \: Semicolon \; Less than \<
114 % Equals \= Greater than \> Question mark \?
115 % Commercial at \@ Left bracket \[ Backslash \\
116 % Right bracket \] Circumflex \^ Underscore \_
117 % Grave accent \` Left brace \{ Vertical bar \|
118 % Right brace \} Tilde \~}
121 % \changes{v0.9}{2003/11/09}{Converted to \texttt{dtx} file}
122 % \changes{v0.8}{2003/10/15}{Initial version}
124 % \GetFileInfo{mlastyle.sty}
126 % \DoNotIndex{\ ,\:,\/}
127 % \DoNotIndex{\@afterindentfalse,\@afterindenttrue}
128 % \DoNotIndex{\@arabic}
129 % \DoNotIndex{\@author}
130 % \DoNotIndex{\@auxout}
131 % \DoNotIndex{\@citea,\@citeb,\@citex}
132 % \DoNotIndex{\@date}
133 % \DoNotIndex{\@empty}
135 % \DoNotIndex{\@ifnextchar,\@ifstar,\@ifundefined}
136 % \DoNotIndex{\@latex@warning}
137 % \DoNotIndex{\@listI}
138 % \DoNotIndex{\@listi,\@listii,\@listiii}
139 % \DoNotIndex{\@listiv,\@listv,\@listvi}
141 % \DoNotIndex{\@noitemerr}
142 % \DoNotIndex{\@startsection}
143 % \DoNotIndex{\@tempswafalse}
144 % \DoNotIndex{\@title}
145 % \DoNotIndex{\@undefined}
146 % \DoNotIndex{\DeclareOption}
147 % \DoNotIndex{\ExecuteOptions}
148 % \DoNotIndex{\G@refundefinedtrue}
149 % \DoNotIndex{\NAT@@citetp,\NAT@citetp,\NAT@ctype,\NAT@date,\NAT@sep}
150 % \DoNotIndex{\ifNAT@par,\ifNAT@swa}
151 % \DoNotIndex{\ProcessOptions}
152 % \DoNotIndex{\RequirePackage}
153 % \DoNotIndex{\UL@start,\UL@stop}
154 % \DoNotIndex{\url@samestyle,\urlstyle,\UrlBigBreaks,\UrlBreakPenalty}
155 % \DoNotIndex{\do@url@hyp}
156 % \DoNotIndex{\addtolength}
157 % \DoNotIndex{\advance}
158 % \DoNotIndex{\baselineskip}
159 % \DoNotIndex{\bibpreamble,\bibpunct,\bibsep}
160 % \DoNotIndex{\begin}
161 % \DoNotIndex{\bfseries}
162 % \DoNotIndex{\bgroup}
163 % \DoNotIndex{\c@enumiv}
164 % \DoNotIndex{\catcode}
165 % \DoNotIndex{\centering}
166 % \DoNotIndex{\centerline}
167 % \DoNotIndex{\chapter}
168 % \DoNotIndex{\citation}
169 % \DoNotIndex{\citet,\citep}
170 % \DoNotIndex{\clearpage}
171 % \DoNotIndex{\csname}
176 % \DoNotIndex{\egroup}
179 % \DoNotIndex{\endcsname}
180 % \DoNotIndex{\endlist}
181 % \DoNotIndex{\exhyphenpenalty}
182 % \DoNotIndex{\expandafter}
183 % \DoNotIndex{\f@baselineskip}
184 % \DoNotIndex{\fancyhf}
185 % \DoNotIndex{\fancypagestyle}
187 % \DoNotIndex{\futurelet}
189 % \DoNotIndex{\global}
190 % \DoNotIndex{\hangindent}
191 % \DoNotIndex{\headrulewidth}
192 % \DoNotIndex{\if@filesw}
193 % \DoNotIndex{\if@tempswa}
194 % \DoNotIndex{\ifcase,\ifhmode,\ifnum}
195 % \DoNotIndex{\ifmlastyle@bibstyle}
196 % \DoNotIndex{\ifmlastyle@format}
197 % \DoNotIndex{\ifmlastyle@pages}
198 % \DoNotIndex{\ifmlastyle@papersize}
199 % \DoNotIndex{\ifmlastyle@style}
200 % \DoNotIndex{\ifmlastyle@times}
201 % \DoNotIndex{\ifmlastyle@underline}
203 % \DoNotIndex{\immediate}
205 % \DoNotIndex{\itemindent}
206 % \DoNotIndex{\itemsep}
207 % \DoNotIndex{\labelsep}
208 % \DoNotIndex{\labelwidth}
209 % \DoNotIndex{\leavevmode}
210 % \DoNotIndex{\leftmargin}
211 % \DoNotIndex{\leftmargini,\leftmarginii,\leftmarginiii}
212 % \DoNotIndex{\leftmarginiv,\leftmarginv,\leftmarginvi}
214 % \DoNotIndex{\linespread}
216 % \DoNotIndex{\listparindent}
217 % \DoNotIndex{\mathchardef}
218 % \DoNotIndex{\makeenmark}
221 % \DoNotIndex{\mlastyle@bibstylefalse}
222 % \DoNotIndex{\mlastyle@bibstyletrue}
223 % \DoNotIndex{\mlastyle@cite}
224 % \DoNotIndex{\mlastyle@course}
225 % \DoNotIndex{\mlastyle@formatfalse}
226 % \DoNotIndex{\mlastyle@formattrue}
227 % \DoNotIndex{\mlastyle@instructor}
228 % \DoNotIndex{\mlastyle@intbib}
229 % \DoNotIndex{\mlastyle@pagesfalse}
230 % \DoNotIndex{\mlastyle@pagestrue}
231 % \DoNotIndex{\mlastyle@papersizefalse}
232 % \DoNotIndex{\mlastyle@papersizetrue}
233 % \DoNotIndex{\mlastyle@qspread}
234 % \DoNotIndex{\mlastyle@sl@sh}
235 % \DoNotIndex{\mlastyle@slash}
236 % \DoNotIndex{\mlastyle@slashnext}
237 % \DoNotIndex{\mlastyle@slashx}
238 % \DoNotIndex{\mlastyle@stylefalse}
239 % \DoNotIndex{\mlastyle@styletrue}
240 % \DoNotIndex{\mlastyle@surname}
241 % \DoNotIndex{\mlastyle@timesfalse}
242 % \DoNotIndex{\mlastyle@timestrue}
243 % \DoNotIndex{\mlastyle@underlinefalse}
244 % \DoNotIndex{\mlastyle@underlinetrue}
245 % \DoNotIndex{\month}
246 % \DoNotIndex{\newblock}
247 % \DoNotIndex{\newcommand}
248 % \DoNotIndex{\newdimen}
249 % \DoNotIndex{\newenvironment}
250 % \DoNotIndex{\newif}
251 % \DoNotIndex{\newpage}
252 % \DoNotIndex{\noindent}
253 % \DoNotIndex{\normalsize}
254 % \DoNotIndex{\notesname}
255 % \DoNotIndex{\number}
258 % \DoNotIndex{\pagestyle}
260 % \DoNotIndex{\parindent}
261 % \DoNotIndex{\parsep}
262 % \DoNotIndex{\penalty}
263 % \DoNotIndex{\protected@xdef}
264 % \DoNotIndex{\relax}
265 % \DoNotIndex{\renewcommand}
266 % \DoNotIndex{\renewenvironment}
267 % \DoNotIndex{\rhead}
268 % \DoNotIndex{\selectfont}
269 % \DoNotIndex{\setlength}
270 % \DoNotIndex{\settowidth}
271 % \DoNotIndex{\sfcode}
273 % \DoNotIndex{\sloppy}
274 % \DoNotIndex{\space}
275 % \DoNotIndex{\string}
277 % \DoNotIndex{\thebibliography}
278 % \DoNotIndex{\thepage}
279 % \DoNotIndex{\topsep}
280 % \DoNotIndex{\usecounter}
281 % \DoNotIndex{\unskip}
282 % \DoNotIndex{\vskip}
284 % \DoNotIndex{\write}
287 % \DoNotIndex{\bibhang}
288 % \DoNotIndex{\evensidemargin}
289 % \DoNotIndex{\headheight}
290 % \DoNotIndex{\headsep}
291 % \DoNotIndex{\hoffset}
292 % \DoNotIndex{\marginparwidth}
293 % \DoNotIndex{\oddsidemargin}
294 % \DoNotIndex{\raggedbottom}
295 % \DoNotIndex{\raggedright}
296 % \DoNotIndex{\textheight}
297 % \DoNotIndex{\textwidth}
298 % \DoNotIndex{\topmargin}
299 % \DoNotIndex{\voffset}
300 % \DoNotIndex{\paperheight}
301 % \DoNotIndex{\paperwidth}
302 % \DoNotIndex{\pdfpageheight}
303 % \DoNotIndex{\pdfpagewidth}
304 % \DoNotIndex{\special}
306 % \hyphenation{pre-am-ble wide-spread}
308 % \newcommand{\Lopt}[1]{\textsf {#1}}
309 % \newcommand{\file}[1]{\texttt {#1}}
310 % \newcommand{\package}[1]{\textsf {#1}}
311 % ^^A\newcommand{\Lcount}[1]{\textsl {\small#1}}
312 % ^^A\newcommand{\pstyle}[1]{\textsl {#1}}
314 % \newcommand{\OptionIndex}[1]{\index{#1\actualchar\Lopt{#1} (option)\encapchar usage}\index{options:\levelchar\Lopt{#1}}}
316 % \title{The \package{mlastyle} package\thanks{This document
317 % corresponds to \package{mlastyle}~\fileversion, dated \filedate.}}
318 % \author{Tim Pope \\ \texttt{latex@rebelongto.us}}
325 % \section{Introduction}
327 % ^^A MLA style, consisting of a set of documentation conventions, has
328 % ^^A gained widespread acceptance in the humanities.
329 % According to the {\em MLA Handbook for Writers of Research
330 % Papers}\citeC{handbook}, MLA style is a set of ``commonly agreed-on
331 % rules for documenting quotations, facts, opinions and paraphrases'' that
332 % ``is preferred by a substantial majority of scholarly journals in
333 % language and literature{\makeatletter\ifmlastyle@style
334 % .''\citeM[xvi]{handbook}\else.''\fi} \LaTeX{} is a
335 % document preparation system enjoying popularity in the scientific field.
336 % It should come as no surprise that complete, up-to-date implementations
337 % of MLA style for \LaTeX{} are in short supply. The \LaTeX{} package
338 % \package{mlastyle} aims to fill this void.
342 % A sample document follows.
344 %\documentclass[12pt]{article}
345 %\usepackage{mlastyle}
348 %\instructor{Professor Smith}
349 %\course{English 101}
351 %\title{The Sadism Inherent in Compulsory English Classes}
356 %\end{document}\end{verbatim}
357 % \subsection{Initialization Macros}
358 % The \index{heading|usage}mandatory heading is generated with
359 % \DescribeMacro{\maketitle}|\maketitle|. Use the standard macros
360 % |\author|, |\title|, and |\date| to specify the relevant information.
361 % To define the instructor and name of the course, use the aptly named
362 % \DescribeMacro{\instructor}|\instructor|\marg{instructor} and
363 % \DescribeMacro{\course}|\course|\marg{course} macros.
365 % The last name for use in the header\index{header|usage} is derived from
366 % |\author|. If this does not produce the desired result, use
367 % \DescribeMacro{\surname}|\surname|\marg{last name} to override it.
369 % MLA style recommends the DD~Mon.~YYYY format for specifying dates;
370 % \DescribeMacro{\today}|\today| has been conveniently redefined to this.
371 % However, other formats can be used as long as done so consistently
372 % throughout the document. Also note that the date in the
373 % heading\index{heading|usage} should be the due date of the assignment;
374 % students who finish assignments early would be wise to call
375 % |\date|\marg{due date}.
377 % \subsection{Environments}
378 % Three environments have been modified from standard \LaTeX to better
379 % suit MLA format. To typeset \index{poetry|usage}poetry and
380 % \index{drama|usage}drama, use the \DescribeEnv{verse}|verse|
381 % environment. Quotations\index{quotations|usage} of a single paragraph
382 % or less always use the \DescribeEnv{quote}|quote| environment. For
383 % longer passages, use the \DescribeEnv{quotation}|quotation| environment
384 % if the beginning of the passage marks the beginning of a paragraph.
385 % Otherwise, use the |quote| environment.
387 % Be sure to follow MLA guidelines when using these environments. Short
388 % quotes should be enclosed in quotation marks and included directly in
391 % \subsection{Modes of Operation}
392 % The \package{mlastyle} package has four basic modes of operations,
393 % selected with one of four mutually exclusive options. The
394 % \OptionIndex{format}\Lopt{format}
395 % option tells \package{mlastyle} to use MLA format (i.e., 1 inch margins,
396 % double-spaced, etc.). The \OptionIndex{style}\Lopt{style} option tells
397 % \package{mlastyle} to use MLA style (i.e., the format of parenthetical
398 % documentation, etc). Each of these options
399 % disables the other; to use both MLA format and MLA style, specify the
400 % \OptionIndex{mla}\Lopt{mla} option, or nothing at all.
402 % To disable both MLA style and MLA format, use the
403 % \OptionIndex{compat}\Lopt{compat} option. This differs from omitting
404 % the package entirely in that certain macros are still defined (e.g.,
405 % |\instructor|). Also, citations are handled a bit differently than in
406 % standard \LaTeX{} (see section~\ref{sec:documentation}).
408 % In addition to the above, several other options modify the behavior of
409 % \package{mlastyle}.
411 % \subsubsection{Italics vs.\ Underlining} \index{underlining|usage}
412 % \index{italics|usage}\label{sec:italics}
413 % The {\em MLA Handbook\/}\citeC{handbook} dictates that emphasis should
414 % be indicated by underlining the text\citeM[94]{handbook}. Thus, the
415 % \package{ulem} package, which underlines all emphasized
416 % text, is loaded by default in \Lopt{mla} and \Lopt{format} modes. To
417 % disable this, use the \OptionIndex{italics}\Lopt{italics} option.
418 % Conversely, if underlining is desired in \Lopt{style} or \Lopt{compat}
419 % mode, the \OptionIndex{underline}\Lopt{underline} option can be used.
421 % \subsubsection{Fonts}
422 % By default, \package{mlastyle} uses \TeX's standard Computer Modern
423 % font. Some profess\-ors\penalty500---particularly those
424 % concerned with document length---require assignments to be set in
425 % \examp[.]{Times New Roman} This can be achieved with the
426 % \OptionIndex{times}\Lopt{times} option, which simply loads the
427 % \package{times} package. This opposite of this option is
428 % \OptionIndex{cm}\Lopt{cm}, which reverts to Computer Modern.
430 % \index{works cited|usage}
431 % \subsection{Documenting Sources} \label{sec:documentation}
433 % The \package{mlastyle} package reimplements the
434 % \DescribeEnv{thebibliography}|thebibliography| environment to generate
435 % the list of works cited in MLA style. Instruction in the basic use of
436 % \LaTeX's bibliography features is beyond the scope of this document;
437 % however, the following example, which should be included just before
438 % |\end{document}|, might prove to be a useful starting point:
440 %\begin{thebibliography}{}
442 %\bibitem[Lamport]{latexdps}
444 %\newblock \emph{\LaTeX: A Document Preparation System}.
446 %\newblock Reading: Addison-Wesley, 1994.
448 %\end{thebibliography}\end{verbatim}
449 % In this example, |Lamport| is the author's last name (for use in
450 % citations) and |latexdps| is the marker used to reference it (see
451 % section~\ref{sec:parenthetical}).
453 % For information on automatically generating the list of works cited with
454 % \BibTeX, see section~\ref{sec:bibtex}.
456 % \subsubsection{Parenthetical Documentation} \label{sec:parenthetical}
457 % A simple citation can by achieved with a call to
458 % \DescribeMacro{\cite}|\cite|\oarg{pages}\marg{marker}, where
459 % marker refers to the key given to either
460 % \index{BibTeX=\BibTeX|usage}\BibTeX{} or the |\bibitem| macro (|latex|
461 % in the above example).
462 % Omit \oarg{pages} if the source has no page numbers.
463 % Multiple sources can be cited using the syntax
464 % |\cite|\oarg{pages}|{|\meta{marker
465 % 1}\texttt{,}\penalty\exhyphenpenalty\meta{marker 2}\ldots|}|; however, page
466 % numbers can currently be specified only for the last referenced source.
467 % To work around this limitation, use |\citealp|, explained below.
469 % Three additional citation commands are provided, all of which take the
470 % same arguments as |\cite|. To omit the author information from the
471 % citation, use \DescribeMacro{\citepage}|\citepage|. Indirect
472 % citations---those of the format \examp{(qtd. in Pope
473 % \pageref{sec:italics})}---can be
474 % created with \DescribeMacro{\citeindirect}|\citeindirect|. Finally, the
475 % parentheses are omitted by \DescribeMacro{\citealp}|\citealp|. This was
476 % intended for use in cross references, but it can also help in citing
477 % multiple works. The result of
478 % |(\citealp[42]{texbook}|\texttt{; }|\citealp[69]{latexdps})|
479 % would be something like \examp[.]{(Knuth 42; Lamport 69)}
481 % \subsubsection{Using {\rm \BibTeX}} \label{sec:bibtex}
482 % Coupled with \index{BibTeX=\BibTeX|usage}\BibTeX,
483 % \package{mlastyle} provides a experimental implementation of MLA
484 % documentation style. Put\SpecialUsageIndex{\bibliographystyle}
485 % |\bibliographystyle{mlastyle}| in the document preamble to load the
486 % bibliography style. Alternatively, the
487 % \OptionIndex{bibstyle}\Lopt{bibstyle} option can handle this
488 % automatically, loading a bibliography style of |mlastyle| in \Lopt{mla}
489 % and \Lopt{style} modes and a bibliography style of |plain| in
490 % \Lopt{format} and \Lopt{compat} modes.
492 % Use of \BibTeX{} is also beyond the scope of this document; consult
493 % Patashnik\citeC{btxdoc} for an introduction.
494 % Briefly, to use the following example, substitute
495 % |\bibliography|\marg{filename} for the |thebibliography| environment.
496 % Then create \meta{filename}\file{.bib} with the contents below.
497 % Generating the document entails running \file{latex} on the \file{.tex}
498 % file, \file{bibtex} on the resulting \file{.aux} file, then \file{latex}
502 % AUTHOR = "Leslie Lamport",
503 % TITLE = "{\LaTeX}: A Document Preparation System",
505 % EDITION = "Second",
506 % ADDRESS = "Reading",
507 % PUBLISHER = "Addison-Wesley",
508 % YEAR = "1994"}\end{verbatim}
510 % In \package{mlastyle}, The |KEY| field serves the additional purpose of
511 % specifying an abbreviated title. This is unnecessary in the above
512 % example. If an additional book by Leslie Lamport was included, however,
513 % the |KEY| field would allow |\cite{latexdps}| to yield \examp{(Lamport,
514 % \emph{\LaTeX\/})} instead of \examp[.]{(Lamport, \emph{\LaTeX: A
515 % Doc\-um\-ent Pre\-pa\-ra\-tion Sys\-tem\/})}
517 % Note that only entries referenced by a citation are included in the list
518 % of works cited; to force the inclusion of an entry or all entries, use
519 % |\nocite|\marg{marker} and |\nocite{*}|, respectively.
521 % \StopEventually{\PrintChanges\bibliography{mlastyle}\PrintIndex}
523 % \section{Implementation}
528 % \subsection{Options}
529 % \begin{macro}{\ifmlastyle@*}
530 % \begin{macro}{\mlastyle@*true}
531 % \begin{macro}{\mlastyle@*false}
532 % Most options are implemented by modifying a |\newif| declared for that
535 \newif\ifmlastyle@bibstyle
536 \DeclareOption{bibstyle}{\mlastyle@bibstyletrue}
537 \DeclareOption{nobibstyle}{\mlastyle@bibstylefalse}
538 \newif\ifmlastyle@papersize
539 \DeclareOption{papersize}{\mlastyle@papersizetrue}
540 \DeclareOption{nopapersize}{\mlastyle@papersizefalse}
541 \newif\ifmlastyle@underline
542 \DeclareOption{underline}{\mlastyle@underlinetrue}
543 \DeclareOption{italics}{\mlastyle@underlinefalse}
544 \newif\ifmlastyle@times
545 \DeclareOption{times}{\mlastyle@timestrue}
546 \DeclareOption{cm}{\mlastyle@timesfalse}
547 \newif\ifmlastyle@style
548 \DeclareOption{compat}{\mlastyle@stylefalse
549 \mlastyle@formatfalse
550 \mlastyle@underlinefalse}
551 \DeclareOption{mla}{\mlastyle@styletrue
553 \mlastyle@underlinetrue}
554 \newif\ifmlastyle@format
555 \DeclareOption{format}{\mlastyle@stylefalse
557 \mlastyle@underlinetrue}
558 \DeclareOption{style}{\mlastyle@styletrue
559 \mlastyle@formatfalse
560 \mlastyle@underlinefalse}
561 \DeclareOption{singlespacequotes}{
562 \def\mlastyle@qspread{\linespread{1}\selectfont\vskip\baselineskip}}
563 \DeclareOption{doublespacequotes}{\let\mlastyle@qspread\relax}
564 \ExecuteOptions{nobibstyle,nopapersize,mla,cm,doublespacequotes}
570 % If the \Lopt{papersize} option is set, add the appropriate
571 % \textsc{PostScript} special, or adjust |\pdfpagewidth| and
572 % |\pdfpageheight| if pdf\LaTeX{} is in use.
574 \ifmlastyle@papersize
575 \ifx\@undefined\pdfpagewidth
576 \special{papersize=\the\paperwidth,\the\paperheight}
578 \setlength{\pdfpagewidth}{\paperwidth}
579 \setlength{\pdfpageheight}{\paperheight}
581 \fi % \ifmlastyle@papersize
583 % \begin{macro}{\UL@onin}
584 % Load the \package{ulem} package if the \Lopt{underline} option is set.
585 % By default, \package{ulem} does multiple underlining for nested
586 % emphasis. This is changed to MLA-style behavior with the redefinition
589 \ifmlastyle@underline
590 \RequirePackage{ulem}
591 \def\UL@onin#1{\egroup\UL@stop#1\UL@start}
592 \fi % \ifmlastyle@underline
595 % Load the \package{times} package if the \Lopt{times} option is set.
598 \RequirePackage{times}
599 \fi % \ifmlastyle@times
601 % \subsection{Macros}
602 % \begin{macro}{\instructor}
603 % Define the instructor, along with an obsolete synonym.
605 \def\instructor#1{\gdef\mlastyle@instructor{#1}}
606 \let\professor\instructor
609 % \begin{macro}{\course}
610 % Define the course, along with an obsolete synonym.
612 \def\course#1{\gdef\mlastyle@course{#1}}
613 \let\classname\course
616 % \begin{macro}{\surname}
617 % Define the surname, along with an obsolete synonym.
619 \def\surname#1{\gdef\mlastyle@surname{#1}}
620 \def\mlastyle@surname{\def\ml@##1 ##2,##3@@{##2}%
621 \def\and##1 {\unskip, }\expandafter\ml@\@author, ,@@}
622 \let\lastname\surname
627 % \begin{macro}{\bibstyle@mlastyle}
628 % This first block is the beginnings of an implementation for
629 % \package{natbib}. (Surely there is a better way to do this.)
631 \newcommand{\bibstyle@mlastyle}{%
632 \bibpunct[\mlastyle@space]{\mlastyle@brack(}{\mlastyle@brack)}%
633 {\unskip;}{a}{\mlastyle@comma}{,}
634 \gdef\mlastyle@brack##1{\ifx\NAT@date\mlastyle@notitle
635 \ifmlastyle@pages ##1\else\ifNAT@swa\ifnum
636 \NAT@ctype=0 ##1\else\unskip\fi\else\unskip\fi\fi\else ##1\fi}
637 \gdef\mlastyle@comma{\ifx\NAT@date\mlastyle@notitle\else,\fi}
638 \gdef\mlastyle@space{\ifx\NAT@date\mlastyle@notitle
639 \ifnum\NAT@ctype=1{} \fi\else{} \fi}
640 % \ifNAT@par\ifNAT@swa{} \fi\else{} \fi\fi\else{} \fi}
641 \gdef\citetext##1{(##1)}
642 \@ifundefined{chapter}
643 {\gdef\refname{Works Cited}}
644 {\gdef\bibname{Works Cited}}}
647 % \begin{macro}{\mlastyle@notitle}
648 % This hack represents an empty title in the MLA bibliography style.
650 \def\mlastyle@notitle
651 { \ \ \ \ \unskip\unskip\unskip\unskip\unskip}
652 \RequirePackage{natbib}
653 \newif\ifmlastyle@pages
654 \renewcommand\NAT@citetp
655 {\@ifnextchar[{\mlastyle@pagestrue\NAT@@citetp}%
656 {\mlastyle@pagesfalse\NAT@@citetp[]}}
659 % \begin{macro}{\cite}
660 % \begin{macro}{\citealp}
661 % ^^A\begin{macro}{\citepage}
662 % ^^A\begin{macro}{\citequote}
663 % The following macros, combined with \file{mlastyle.bst}, provide
664 % for a bibliography in MLA style. Note that the definition of |\cite|,
665 % |\citealp|, etc.\ vary depending on the options passed to
666 % \package{mlastyle}.
668 % \begin{macro}{\mlastyle@intcite}
669 % The original |\cite| is stored
670 % in |\mlastyle@intcite|.
672 %\let\mlastyle@intcite\cite
675 % \begin{macro}{\mlastyle@relax}
676 % This macro does nothing. Depending on the options, either |\citeC| or
677 % |\citeM| and its ilk will utilize it.
679 \newcommand{\mlastyle@relax}[2][]{\unskip}
682 % \subsubsection{MLA Style}
683 % \begin{macro}{\citeM}
684 % If the \Lopt{mla} or \Lopt{style} options are used, the following is
689 % If the \Lopt{bibstyle} option is set, specify the bibliography style.
692 \bibliographystyle{mlastyle}
698 \let\mlastyle@citequeue\@empty
699 \def\mlastyle@cite#1#2#3{\csname#1\endcsname[#2]{#3}}
700 \newcommand\citeflush{\ifhmode\unskip\fi
701 \ifx\mlastyle@citequeue\@empty\else{} \let\@citea\relax
702 \citetext{\@for\@citeb:=\mlastyle@citequeue\do{\@citea
703 \expandafter\mlastyle@cite\@citeb\def\@citea{\NAT@sep\ }}}%
704 \global\let\mlastyle@citequeue\@empty\fi}
705 \newcommand\mlastyle@citeadd[3]{\ifx\mlastyle@citequeue\@empty
706 \xdef\mlastyle@citequeue{{#1}{#2}{#3}}\else
707 \xdef\mlastyle@citequeue{\mlastyle@citequeue,%
709 \newcommand\citeadd[2][]{\mlastyle@citeadd{citealp}{#1}{#2}}
710 \newcommand\citea{\@ifstar
711 {\let\mlastyle@star*\mlastyle@citea}
712 {\let\mlastyle@star\@empty\mlastyle@citea}}
713 \newcommand\mlastyle@citea[2][]{\expandafter\citeauthor
714 \mlastyle@star{#2}\mlastyle@citeadd{citeyear}{#1}{#2}}
715 \newcommand\Citea{\@ifstar
716 {\let\mlastyle@star*\mlastyle@Citea}
717 {\let\mlastyle@star\@empty\mlastyle@Citea}}
718 \newcommand\mlastyle@Citea[2][]{\expandafter\Citeauthor
719 \mlastyle@star{#2}\mlastyle@citeadd{citeyear}{#1}{#2}}
720 \newcommand\citepage[2][]{\citeyearpar[#1]{#2}}
721 \newcommand\citepageM[2][]{\unskip{} \citeyearpar[#1]{#2}}
722 \newcommand\citeindirect[2][]{\citep[qtd.\ in][#1]{#2}}
723 \newcommand\citeindirectM[2][]{\unskip{} \citep[qtd.\ in][#1]{#2}}
725 \let\citeC\mlastyle@relax
727 % \subsubsection{Plain Style}
728 % \begin{macro}{\citeC}
729 % This next block is used if the \Lopt{compat} or \Lopt{format} option is
734 % If the \Lopt{bibstyle} option is set, specify the bibliography style.
737 \bibliographystyle{plain}
739 \ifx\@undefined\citet
740 \newcommand{\mlastyle@cite}[2][]{\@tempswafalse\@citex[]{#2}}
741 \newcommand{\citeC}[2][]{~\@tempswafalse\@citex[]{#2}}
743 \newcommand{\mlastyle@cite}[2][]{\citep[]{#2}}
746 \let\cite\mlastyle@cite
747 \let\citepage\mlastyle@cite
748 \let\citeindirect\mlastyle@cite
749 \let\citeM\mlastyle@relax
750 \let\citepageM\mlastyle@relax
751 \let\citeindirectM\mlastyle@relax
760 % \subsection{Formatting}
761 % Formatting is done if the \Lopt{mla} or \Lopt{format} option is set.
765 % \begin{macro}{\mlastyle@i}
766 % This is the standard MLA format indent.
768 \newdimen\mlastyle@i \mlastyle@i=.5in
771 % \subsubsection{Macros}
772 % \begin{macro}{\maketitle}
773 % \begin{macro}{\and}
774 % |\maketitle| generates a heading in MLA format.
776 \renewcommand{\maketitle}{\begin{flushleft}
778 \@ifundefined{mlastyle@instructor}{}{\mlastyle@instructor}\par
779 \@ifundefined{mlastyle@course}{}{\mlastyle@course}\par
780 \@date\end{flushleft}
781 \begin{center}\@title\end{center}\par
787 % \begin{macro}{\today}
788 % |\today| is redefined to DD~Mon.~YYYY format.
790 \def\today{\number\day~\ifcase\month\or
791 Jan.\or Feb.\or Mar.\or Apr.\or May\or June\or July\or
792 Aug.\or Sept.\or Oct.\or Nov.\or Dec.\fi\ \number\year}
795 % \begin{macro}{\slash}
796 % No penalty for |\slash|.
797 % ^^A\let\mlastyle@sl@sh=/
799 \edef\slash{/\penalty\z@}
801 % ^^A \def\mlastyle@slash{/\futurelet\mlastyle@slashnext\mlastyle@slashx}
802 % ^^A \def\mlastyle@slashx{\ifx\mlastyle@slashnext/\else
803 % ^^A \penalty\exhyphenpenalty\fi}
805 % \begin{macro}{\section}
806 % \begin{macro}{\subsection}
807 % \begin{macro}{\subsubsection}
808 % Sections are formatted by centering the section name and beginning a new
809 % page. Subsections simply center the section name.
811 \renewcommand{\section}{\clearpage\@startsection{section}{1}{\z@
812 }{0pt}{1sp}{\centering}}
813 \renewcommand{\subsection}{\@startsection{subsection}{2}{\z@
814 }{0pt}{1sp}{\centering}}
815 \renewcommand{\subsubsection}{\@startsection{subsubsection}{3}{\z@
816 }{0pt}{1sp}{\centering}}
818 % ^^A\let\mlastyle@vfont\verbatim@font
819 % ^^A\def\verbatim@font{\mlastyle@qspread\mlastyle@vfont}
823 % \subsubsection{Environments}
824 % ^^A%\newenvironment{blocks}{\begin{quote} \linespread{1} \selectfont}{\end{quote} \linespread{2} \small \selectfont}
825 % ^^A%\newenvironment{blockm}{\begin{quotation} \linespread{1} \selectfont}{\end{quotation} \linespread{2} \selectfont}
826 % \begin{environment}{verse}
827 % Indented 1 inch, with an additional .25 inch hanging indent.
829 \renewenvironment{verse}{\list{}{\mlastyle@qspread
830 \advance\leftmargin1.5\mlastyle@i\itemindent-.5\mlastyle@i
831 \listparindent\itemindent}\item\relax}{\endlist}
834 % \begin{environment}{quotation}
835 % Indented 1 inch, with a paragraph indent of an additional .25 inches.
837 \renewenvironment{quotation}{\list{}{\mlastyle@qspread
838 \advance\leftmargin\mlastyle@i\itemindent.5\mlastyle@i
839 \listparindent\itemindent}\item\relax}{\endlist}
842 % \begin{environment}{quote}
843 % Identical to the |quotation| environment, except the first paragraph is not
846 \renewenvironment{quote}{\list{}{\mlastyle@qspread
847 \advance\leftmargin\mlastyle@i
848 \listparindent.5\mlastyle@i}\item\relax}{\endlist}
851 % \begin{environment}{workscited}
852 % \begin{macro}{\bibent}
853 % Works cited environment, for compatibility with \package{mla-paper}.
855 \newenvironment{workscited}%
856 {\newpage{\centerline{Works Cited}}}{\newpage}
857 \newcommand{\bibent}{\noindent\hangindent\mlastyle@i}
861 % \subsubsection{Margins}
862 % Top and bottom margins are 1 inch each. The header is flush with the
863 % right margin, .5 inches from the top of the page.
864 % ^^A\addtolength{\headheight}{-1pt}
865 % ^^A\setlength{\headheight}{1.4\headheight}% kludge
867 \addtolength{\voffset}{-.5in}
868 \setlength{\textheight}{\paperheight}
869 \addtolength{\textheight}{-2in}
870 \setlength{\topmargin}{0in}
871 \setlength\headheight\f@baselineskip
872 \setlength{\headsep}{.5in}
873 \addtolength{\headsep}{-\headheight}
874 \setlength{\footskip}{0.25in}
877 % Left and right margins in MLA format are each 1 inch wide.
879 \addtolength{\hoffset}{-.5in}
880 \setlength{\textwidth}{\paperwidth}
881 \addtolength{\textwidth}{-2in}
882 \setlength{\oddsidemargin}{.5in}
883 \setlength{\evensidemargin}{.5in}
884 \setlength{\marginparwidth}{.5in}
886 % \subsubsection{Paragraphs}
887 % Paragraphs should be left justified, with the first line indented .5
891 \setlength\parindent\mlastyle@i
893 % MLA format specifies that all paragraphs should be indented, even those
894 % beginning a new section. This snippet from \package{indentfirst} changes
895 % \LaTeX{} to meet that requirement.
897 \let\@afterindentfalse\@afterindenttrue
900 % Double space {\em everywhere}.
901 % ^^A\RequirePackage{doublespace}
904 \leftmargini\parindent
905 \def\@listi{\leftmargin\leftmargini
906 \parsep\z@\itemsep\z@\topsep -3\p@\relax}
909 \def\@listii{\leftmargin\leftmarginii
910 \parsep\z@\itemsep\z@\topsep -3\p@\relax}
911 \def\@listiii{\leftmargin\leftmarginiii
912 \parsep\z@\itemsep\z@\topsep -3\p@\relax}
913 \def\@listiv{\leftmargin\leftmarginiv
914 \parsep\z@\itemsep\z@\topsep -3\p@\relax}
915 \def\@listv{\leftmargin\leftmarginv
916 \parsep\z@\itemsep\z@\topsep -3\p@\relax}
917 \def\@listvi{\leftmargin\leftmarginvi
918 \parsep\z@\itemsep\z@\topsep -3\p@\relax}
920 % \begin{macro}{\nonfrenchspacing}
921 % Only one space after colons, unless someone else has already tinkered
922 % with its space factor.
924 \let\mlastyle@intnfs\nonfrenchspacing
925 \def\nonfrenchspacing{\mlastyle@intnfs
926 \ifnum\the\sfcode`\:=2000\sfcode`\:=1999\fi}
927 \ifnum\the\sfcode`\:=2000\sfcode`\:=1999\fi
930 % \subsubsection{Header}
931 % The last name and page number appear on every page, including the first.
933 \RequirePackage{fancyhdr}
934 \fancypagestyle{plain}{\fancyhf{}}
935 \fancypagestyle{mlastyle}{
937 \rhead{\mlastyle@surname{} \thepage}
938 \renewcommand{\headrulewidth}{0pt}
939 \renewcommand{\footrulewidth}{0pt}}
942 % \subsubsection{Notes}
943 % Footnotes should be indented .5 inches; however .56 inches is used
944 % in a crude attempt to compensate for
945 % the alignment provided by the \package{footmisc} package. Endnotes are
946 % preferred in MLA style anyway, so this should not be a problem in most
949 \RequirePackage[ragged,norule]{footmisc}
950 \def\footnotelayout{\linespread{1}\footnotesize\raggedright{} }
951 \footnotemargin\mlastyle@i
952 \advance\footnotemargin .35em
953 \skip\footins=2\baselineskip
954 \footnotesep 1.2\footnotesep
955 \addtolength\footnotesep{\baselineskip}
956 \def\footnotesize{\normalsize}
958 % ^^A\let\footnoterule\relax
959 % \begin{macro}{\enoteformat}
960 % \begin{macro}{\enoteheading}
961 % \begin{macro}{\enotesize}
962 % Endnotes are supported, but only if the \package{endnotes} package is
963 % loaded {\em before\/} this package.
965 \ifx\@undefined\endnote\else
966 \def\enoteheading{\newpage\section*{\notesname}}
967 \def\enoteformat{\leavevmode\makeenmark{} }
968 \def\enotesize{\normalsize}
974 % \subsubsection{Bibliography}
975 % \begin{macro}{\url@mlastyle}
976 % |\url| is needed to format urls in the bibliography.
977 % Are |\UrlBreakPenalty| and |\UrlBigBreakPenalty| reversed?
980 \def\url@mlastyle{\url@samestyle
981 \mathchardef\UrlBreakPenalty 0
982 \def\UrlBigBreaks{\do\/\do@url@hyp}
987 % ^^A\ifx\@undefined\url{
989 % ^^A \gdef\url{\bgroup\catcode`/=13
990 % ^^A \let/\slash\mlastyle@url}
991 % ^^A \gdef\mlastyle@url#1{#1\egroup}}
993 % \begin{environment}{thebibliography}
994 % The definition of |thebibliography| varies depending on the document
997 \ifx\@undefined\citet
998 \renewenvironment\thebibliography#1{\clearpage
999 \@ifundefined{chapter}
1000 {\section*{\refname}}
1001 {\chapter*{\bibname}}
1002 \list{\@biblabel{\@arabic\c@enumiv}}%
1003 {\settowidth\labelwidth{\@biblabel{#1}}}
1004 \leftmargin\labelwidth
1005 \advance\leftmargin\labelsep
1006 \itemindent-\leftmargin
1007 \let\newblock\@empty
1013 {\@latex@warning{Empty `thebibliography' environment}}%
1017 % If the \package{natbib} package is loaded, the following is executed
1021 \bibhang\mlastyle@i\bibsep\z@
1024 % ^^A \newcommand\bibpreamble{%
1025 % ^^A \@ifundefined{citet}{}%
1026 % ^^A {\bibhang\mlastyle@i\bibsep\z@}}
1028 \fi % \ifmlastyle@format