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