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