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{\UL@start,\UL@stop}
129 % \DoNotIndex{\addtolength}
130 % \DoNotIndex{\advance}
131 % \DoNotIndex{\baselineskip}
132 % \DoNotIndex{\begin}
133 % \DoNotIndex{\bfseries}
134 % \DoNotIndex{\c@enumiv}
135 % \DoNotIndex{\catcode}
136 % \DoNotIndex{\centering}
137 % \DoNotIndex{\centerline}
138 % \DoNotIndex{\chapter}
139 % \DoNotIndex{\citation}
140 % \DoNotIndex{\clearpage}
141 % \DoNotIndex{\csname}
146 % \DoNotIndex{\egroup}
149 % \DoNotIndex{\endcsname}
150 % \DoNotIndex{\endlist}
151 % \DoNotIndex{\exhyphenpenalty}
152 % \DoNotIndex{\expandafter}
153 % \DoNotIndex{\f@baselineskip}
154 % \DoNotIndex{\fancyhf}
155 % \DoNotIndex{\fancypagestyle}
157 % \DoNotIndex{\futurelet}
159 % \DoNotIndex{\hangindent}
160 % \DoNotIndex{\headrulewidth}
161 % \DoNotIndex{\if@filesw}
162 % \DoNotIndex{\if@tempswa}
163 % \DoNotIndex{\ifcase}
164 % \DoNotIndex{\ifmlastyle@bibstyle}
165 % \DoNotIndex{\ifmlastyle@format}
166 % \DoNotIndex{\ifmlastyle@papersize}
167 % \DoNotIndex{\ifmlastyle@style}
168 % \DoNotIndex{\ifmlastyle@times}
169 % \DoNotIndex{\ifmlastyle@underline}
171 % \DoNotIndex{\immediate}
173 % \DoNotIndex{\itemindent}
174 % \DoNotIndex{\itemsep}
175 % \DoNotIndex{\labelsep}
176 % \DoNotIndex{\labelwidth}
177 % \DoNotIndex{\leavevmode}
178 % \DoNotIndex{\leftmargin}
179 % \DoNotIndex{\leftmargini,\leftmarginii,\leftmarginiii}
180 % \DoNotIndex{\leftmarginiv,\leftmarginv,\leftmarginvi}
182 % \DoNotIndex{\linespread}
184 % \DoNotIndex{\listparindent}
185 % \DoNotIndex{\makeenmark}
187 % \DoNotIndex{\mlastyle@bibstylefalse}
188 % \DoNotIndex{\mlastyle@bibstyletrue}
189 % \DoNotIndex{\mlastyle@cite}
190 % \DoNotIndex{\mlastyle@course}
191 % \DoNotIndex{\mlastyle@formatfalse}
192 % \DoNotIndex{\mlastyle@formattrue}
193 % \DoNotIndex{\mlastyle@instructor}
194 % \DoNotIndex{\mlastyle@intbib}
195 % \DoNotIndex{\mlastyle@papersizefalse}
196 % \DoNotIndex{\mlastyle@papersizetrue}
197 % \DoNotIndex{\mlastyle@qspread}
198 % \DoNotIndex{\mlastyle@sl@sh}
199 % \DoNotIndex{\mlastyle@slash}
200 % \DoNotIndex{\mlastyle@slashnext}
201 % \DoNotIndex{\mlastyle@slashx}
202 % \DoNotIndex{\mlastyle@stylefalse}
203 % \DoNotIndex{\mlastyle@styletrue}
204 % \DoNotIndex{\mlastyle@surname}
205 % \DoNotIndex{\mlastyle@timesfalse}
206 % \DoNotIndex{\mlastyle@timestrue}
207 % \DoNotIndex{\mlastyle@underlinefalse}
208 % \DoNotIndex{\mlastyle@underlinetrue}
209 % \DoNotIndex{\month}
210 % \DoNotIndex{\newblock}
211 % \DoNotIndex{\newcommand}
212 % \DoNotIndex{\newenvironment}
213 % \DoNotIndex{\newif}
214 % \DoNotIndex{\newpage}
215 % \DoNotIndex{\noindent}
216 % \DoNotIndex{\normalsize}
217 % \DoNotIndex{\notesname}
218 % \DoNotIndex{\number}
221 % \DoNotIndex{\pagestyle}
223 % \DoNotIndex{\parindent}
224 % \DoNotIndex{\parsep}
225 % \DoNotIndex{\penalty}
226 % \DoNotIndex{\relax}
227 % \DoNotIndex{\renewcommand}
228 % \DoNotIndex{\renewenvironment}
229 % \DoNotIndex{\reset@font}
230 % \DoNotIndex{\rhead}
231 % \DoNotIndex{\selectfont}
232 % \DoNotIndex{\setlength}
233 % \DoNotIndex{\settowidth}
234 % \DoNotIndex{\sfcode}
236 % \DoNotIndex{\sloppy}
237 % \DoNotIndex{\space}
238 % \DoNotIndex{\string}
239 % \DoNotIndex{\sw@llow}
241 % \DoNotIndex{\thebibliography}
242 % \DoNotIndex{\thepage}
243 % \DoNotIndex{\topsep}
244 % \DoNotIndex{\usecounter}
245 % \DoNotIndex{\vskip}
246 % \DoNotIndex{\write}
249 % \DoNotIndex{\evensidemargin}
250 % \DoNotIndex{\headheight}
251 % \DoNotIndex{\headsep}
252 % \DoNotIndex{\hoffset}
253 % \DoNotIndex{\marginparwidth}
254 % \DoNotIndex{\oddsidemargin}
255 % \DoNotIndex{\raggedbottom}
256 % \DoNotIndex{\raggedright}
257 % \DoNotIndex{\textheight}
258 % \DoNotIndex{\textwidth}
259 % \DoNotIndex{\topmargin}
260 % \DoNotIndex{\voffset}
261 % \DoNotIndex{\paperheight}
262 % \DoNotIndex{\paperwidth}
263 % \DoNotIndex{\pdfpageheight}
264 % \DoNotIndex{\pdfpagewidth}
265 % \DoNotIndex{\special}
267 % \hyphenation{pre-am-ble wide-spread}
269 % \newcommand{\Lopt}[1]{\textsf {#1}}
270 % \newcommand{\file}[1]{\texttt {#1}}
271 % \newcommand{\package}[1]{\textsf {#1}}
272 % ^^A\newcommand{\Lcount}[1]{\textsl {\small#1}}
273 % ^^A\newcommand{\pstyle}[1]{\textsl {#1}}
275 % \newcommand{\OptionIndex}[1]{\index{#1\actualchar\Lopt{#1} (option)\encapchar usage}\index{options:\levelchar\Lopt{#1}}}
277 % \title{The \package{mlastyle} package\thanks{This document
278 % corresponds to \package{mlastyle}~\fileversion, dated \filedate.}}
279 % \author{Tim Pope \\ \texttt{latex@rebelongto.us}}
286 % \section{Introduction}
288 % ^^A MLA style, consisting of a set of documentation conventions, has
289 % ^^A gained widespread acceptance in the humanities.
290 % According to the {\em MLA Handbook for Writers of Research
291 % Papers}\citeC{handbook}, MLA style is a set of ``commonly agreed-on
292 % rules for documenting quotations, facts, opinions and paraphrases'' that
293 % ``is preferred by a substantial majority of scholarly journals in
294 % language and literature{\makeatletter\ifmlastyle@style
295 % .''\citeM[xvi]{handbook}\else.''\fi} \LaTeX{} is a
296 % document preparation system enjoying popularity in the scientific field.
297 % It should come as no surprise that complete, up-to-date implementations
298 % of MLA style for \LaTeX{} are in short supply. The \LaTeX{} package
299 % \package{mlastyle} aims to fill this void.
303 % A sample document follows.
305 %\documentclass[12pt]{article}
306 %\usepackage{mlastyle}
309 %\instructor{Professor Smith}
310 %\course{English 101}
312 %\title{The Sadism Inherent in Compulsory English Classes}
317 %\end{document}\end{verbatim}
318 % \subsection{Initialization Macros}
319 % The \index{heading|usage}mandatory heading is generated with
320 % \DescribeMacro{\maketitle}|\maketitle|. Use the standard macros
321 % |\author|, |\title|, and |\date| to specify the relevant information.
322 % To define the instructor and name of the course, use the aptly named
323 % \DescribeMacro{\instructor}|\instructor|\marg{instructor} and
324 % \DescribeMacro{\course}|\course|\marg{course} macros.
326 % The last name for use in the header\index{header|usage} is derived from
327 % |\author|. If this does not produce the desired result, use
328 % \DescribeMacro{\surname}|\surname|\marg{last name} to override it.
330 % MLA style recommends the DD~Mon.~YYYY format for specifying dates;
331 % \DescribeMacro{\today}|\today| has been conveniently redefined to this.
332 % However, other formats can be used as long as done so consistently
333 % throughout the document. Also note that the date in the
334 % heading\index{heading|usage} should be the due date of the assignment;
335 % students who finish assignments early would be wise to call
336 % |\date|\marg{due date}.
338 % \subsection{Environments}
339 % Three environments have been modified from standard \LaTeX to better
340 % suit MLA format. To typeset \index{poetry|usage}poetry and
341 % \index{drama|usage}drama, use the \DescribeEnv{verse}|verse|
342 % environment. Quotations\index{quotations|usage} of a single paragraph
343 % or less always use the \DescribeEnv{quote}|quote| environment. For
344 % longer passages, use the \DescribeEnv{quotation}|quotation| environment
345 % if the beginning of the passage marks the beginning of a paragraph.
346 % Otherwise, use the |quote| environment.
348 % Be sure to follow MLA guidelines when using these environments. Short
349 % quotes should be enclosed in quotation marks and included directly in
352 % \subsection{Modes of Operation}
353 % The \package{mlastyle} package has four basic modes of operations,
354 % selected with one of four mutually exclusive options. The
355 % \OptionIndex{format}\Lopt{format}
356 % option tells \package{mlastyle} to use MLA format (i.e., 1 inch margins,
357 % double-spaced, etc.). The \OptionIndex{style}\Lopt{style} option tells
358 % \package{mlastyle} to use MLA style (i.e., the format of parenthetical
359 % documentation, etc). Each of these options
360 % disables the other; to use both MLA format and MLA style, specify the
361 % \OptionIndex{mla}\Lopt{mla} option, or nothing at all.
363 % To disable both MLA style and MLA format, use the
364 % \OptionIndex{compat}\Lopt{compat} option. This differs from omitting
365 % the package entirely in that certain macros are still defined (e.g.,
366 % |\instructor|). Also, citations are handled a bit differently than in
367 % standard \LaTeX{} (see section~\ref{sec:documentation}).
369 % In addition to the above, several other options modify the behavior of
370 % \package{mlastyle}.
372 % \subsubsection{Italics vs.\ Underlining} \index{underlining|usage}
373 % \index{italics|usage}\label{sec:italics}
374 % The {\em MLA Handbook\/}\citeC{handbook} dictates that emphasis should
375 % be indicated by underlining the text\citeM[94]{handbook}. Thus, the
376 % \package{ulem} package, which underlines all emphasized
377 % text, is loaded by default in \Lopt{mla} and \Lopt{format} modes. To
378 % disable this, use the \OptionIndex{italics}\Lopt{italics} option.
379 % Conversely, if underlining is desired in \Lopt{style} or \Lopt{compat}
380 % mode, the \OptionIndex{underline}\Lopt{underline} option can be used.
382 % \subsubsection{Fonts}
383 % By default, \package{mlastyle} uses \TeX's standard Computer Modern
384 % font. Some profess\-ors\penalty500---particularly those
385 % concerned with document length---require assignments to be set in
386 % \examp[.]{Times New Roman} This can be achieved with the
387 % \OptionIndex{times}\Lopt{times} option, which simply loads the
388 % \package{times} package. This opposite of this option is
389 % \OptionIndex{cm}\Lopt{cm}, which reverts to Computer Modern.
391 % \index{works cited|usage}
392 % \subsection{Documenting Sources} \label{sec:documentation}
394 % The \package{mlastyle} package reimplements the
395 % \DescribeEnv{thebibliography}|thebibliography| environment to generate
396 % the list of works cited in MLA style. Instruction in the basic use of
397 % \LaTeX's bibliography features is beyond the scope of this document;
398 % however, the following example, which should be included just before
399 % |\end{document}|, might prove to be a useful starting point:
401 %\begin{thebibliography}{}
403 %\bibitem[Lamport]{latex}
405 %\newblock {\em \LaTeX: A Document Preparation System}.
407 %\newblock Reading: Addison-Wesley, 1994.
409 %\end{thebibliography}\end{verbatim}
410 % In this example, |Lamport| is the author's last name (for use in
411 % citations) and |latex| is the marker used to reference it (see
412 % section~\ref{sec:parenthetical}).
414 % For information on automatically generating the list of works cited with
415 % \BibTeX, see section~\ref{sec:bibtex}.
417 % \subsubsection{Parenthetical Documentation} \label{sec:parenthetical}
418 % A simple citation can by achieved with a call to
419 % \DescribeMacro{\cite}|\cite|\oarg{pages}\marg{marker}, where
420 % marker refers to the key given to either
421 % \index{BibTeX=\BibTeX|usage}\BibTeX{} or the |\bibitem| macro (|latex|
422 % in the above example).
423 % Omit \oarg{pages} if the source has no page numbers.
424 % Multiple sources can be cited using the syntax
425 % |\cite|\oarg{pages}|{|\meta{marker
426 % 1}\texttt{,}\penalty\exhyphenpenalty\meta{marker 2}\ldots|}|; however, page
427 % numbers can currently be specified only for the last referenced source.
428 % To work around this limitation, use |\citeN|, explained below.
430 % Three additional citation commands are provided, all of which take the
431 % same arguments as |\cite|. To omit the author information from the
432 % citation, use \DescribeMacro{\citepage}|\citepage|. Indirect
433 % citations---those of the format \examp{(qtd. in Pope
434 % \pageref{sec:italics})}---can be
435 % created with \DescribeMacro{\citeindirect}|\citeindirect|. Finally, the
436 % parentheses are omitted by \DescribeMacro{\citeN}|\citeN|. This was
437 % intended for use in cross references, but it can also help in citing
438 % multiple works. The result of
439 % |(\citeN[42]{texbook}|\texttt{; }|\citeN[69]{latex})|
440 % would be something like \examp[.]{(Knuth 42; Lamport 69)}
442 % \subsubsection{Using {\rm \BibTeX}} \label{sec:bibtex}
443 % Coupled with \index{BibTeX=\BibTeX|usage}\BibTeX,
444 % \package{mlastyle} provides a experimental implementation of MLA
445 % documentation style. Put\SpecialUsageIndex{\bibliographystyle}
446 % |\bibliographystyle{mlastyle}| in the document preamble to load the
447 % bibliography style. Alternatively, the
448 % \OptionIndex{bibstyle}\Lopt{bibstyle} option can handle this
449 % automatically, loading a bibliography style of |mlastyle| in \Lopt{mla}
450 % and \Lopt{style} modes and a bibliography style of |plain| in
451 % \Lopt{format} and \Lopt{compat} modes.
453 % Use of \BibTeX{} is also beyond the scope of this document; instead,
454 % another example is provided. To use it, substitute
455 % |\bibliography|\marg{filename} for the |thebibliography| environment.
456 % Then create \meta{filename}\file{.bib} with the contents below.
457 % Generating the document entails running \file{latex} on the \file{.tex}
458 % file, \file{bibtex} on the resulting \file{.aux} file, then \file{latex}
462 % AUTHOR = "Leslie Lamport",
463 % TITLE = "\LaTeX: A Document Preparation System",
465 % EDITION = "Second",
466 % ADDRESS = "Reading",
467 % PUBLISHER = "Addison-Wesley",
468 % YEAR = "1994"}\end{verbatim}
470 % In \package{mlastyle}, The |KEY| field serves the additional purpose of
471 % specifying an abbreviated title. This is unnecessary in the above
472 % example. If an additional book by Leslie Lamport was included, however,
473 % the |KEY| field would allow |\cite{latex}| to yield \examp{(Lamport,
474 % \emph{\LaTeX\/})} instead of \examp[.]{(Lamport, \emph{\LaTeX: A
475 % Doc\-um\-ent Pre\-pa\-ra\-tion Sys\-tem\/})}
477 % Note that only entries referenced by a citation are included in the list
478 % of works cited; to force the inclusion of an entry or all entries, use
479 % |\nocite|\marg{marker} and |\nocite{*}|, respectively.
481 % \StopEventually{\PrintChanges\bibliography{mlastyle}\PrintIndex}
483 % \section{Implementation}
488 % \subsection{Options}
489 % \begin{macro}{\ifmlastyle@*}
490 % \begin{macro}{\mlastyle@*true}
491 % \begin{macro}{\mlastyle@*false}
492 % Most options are implemented by modifying a |\newif| declared for that
495 \newif\ifmlastyle@bibstyle
496 \DeclareOption{bibstyle}{\mlastyle@bibstyletrue}
497 \DeclareOption{nobibstyle}{\mlastyle@bibstylefalse}
498 \newif\ifmlastyle@papersize
499 \DeclareOption{papersize}{\mlastyle@papersizetrue}
500 \DeclareOption{nopapersize}{\mlastyle@papersizefalse}
501 \newif\ifmlastyle@underline
502 \DeclareOption{underline}{\mlastyle@underlinetrue}
503 \DeclareOption{italics}{\mlastyle@underlinefalse}
504 \newif\ifmlastyle@times
505 \DeclareOption{times}{\mlastyle@timestrue}
506 \DeclareOption{cm}{\mlastyle@timesfalse}
507 \newif\ifmlastyle@style
508 \DeclareOption{compat}{\mlastyle@stylefalse
509 \mlastyle@formatfalse
510 \mlastyle@underlinefalse}
511 \DeclareOption{mla}{\mlastyle@styletrue
513 \mlastyle@underlinetrue}
514 \newif\ifmlastyle@format
515 \DeclareOption{format}{\mlastyle@stylefalse
517 \mlastyle@underlinetrue}
518 \DeclareOption{style}{\mlastyle@styletrue
519 \mlastyle@formatfalse
520 \mlastyle@underlinefalse}
521 \DeclareOption{singlespacequotes}{
522 \def\mlastyle@qspread{\linespread{1}\selectfont\vskip\baselineskip}}
523 \DeclareOption{doublespacequotes}{\let\mlastyle@qspread\relax}
524 \ExecuteOptions{nobibstyle,nopapersize,mla,cm,doublespacequotes}
530 % If the \Lopt{papersize} option is set, add the appropriate
531 % \textsc{PostScript} special, or adjust |\pdfpagewidth| and
532 % |\pdfpageheight| if pdf\LaTeX{} is in use.
534 \ifmlastyle@papersize
535 \ifx\@undefined\pdfpagewidth
536 \special{papersize=\the\paperwidth,\the\paperheight}
538 \setlength{\pdfpagewidth}{\paperwidth}
539 \setlength{\pdfpageheight}{\paperheight}
541 \fi % \ifmlastyle@papersize
543 % If the \Lopt{bibstyle} option is set, specify the bibliography style.
547 \bibliographystyle{mlastyle}
549 \bibliographystyle{plain}
551 \fi % \ifmlastyle@bibstyle
553 % \begin{macro}{\UL@onin}
554 % Load the \package{ulem} package if the \Lopt{underline} option is set.
555 % By default, \package{ulem} does multiple underlining for nested
556 % emphasis. This is changed to MLA-style behavior with the redefinition
559 \ifmlastyle@underline
560 \RequirePackage{ulem}
561 \def\UL@onin#1{\egroup\UL@stop#1\UL@start}
562 \fi % \ifmlastyle@underline
565 % Load the \package{times} package if the \Lopt{times} option is set.
568 \RequirePackage{times}
569 \fi % \ifmlastyle@times
571 % \subsection{Macros}
572 % \begin{macro}{\instructor}
573 % Define the instructor, along with an obsolete synonym.
575 \def\instructor#1{\gdef\mlastyle@instructor{#1}}
576 \let\professor\instructor
579 % \begin{macro}{\course}
580 % Define the course, along with an obsolete synonym.
582 \def\course#1{\gdef\mlastyle@course{#1}}
583 \let\classname\course
586 % \begin{macro}{\surname}
587 % Define the surname, along with an obsolete synonym.
589 \def\surname#1{\gdef\mlastyle@surname{#1}}
590 \def\mlastyle@surname{\def\sw@llow##1 {}\expandafter\sw@llow\@author}
591 \let\lastname\surname
594 % \subsection{Formatting}
595 % Formatting is done if the \Lopt{mla} or \Lopt{format} option is set.
599 % \subsubsection{Macros}
600 % \begin{macro}{\maketitle}
601 % |\maketitle| generates a heading in MLA format.
603 \renewcommand{\maketitle}{\begin{flushleft}
605 \@ifundefined{mlastyle@instructor}{}{\mlastyle@instructor}\par
606 \@ifundefined{mlastyle@course}{}{\mlastyle@course}\par
607 \@date\end{flushleft}
608 \begin{center}\@title\end{center}\par
612 % \begin{macro}{\today}
613 % |\today| is redefined to DD~Mon.~YYYY format.
615 \def\today{\number\day~\ifcase\month\or
616 Jan.\or Feb.\or Mar.\or Apr.\or May\or June\or July\or
617 Aug.\or Sept.\or Oct.\or Nov.\or Dec.\fi\ \number\year}
620 % \begin{macro}{\slash}
621 % No penalty for |\slash|, and plain /'s permit line breaks if necessary.
622 % ^^A\let\mlastyle@sl@sh=/
624 \def\slash{/\penalty\z@}
625 \def\mlastyle@slash{/\futurelet\mlastyle@slashnext\mlastyle@slashx}
626 \def\mlastyle@slashx{\ifx\mlastyle@slashnext/\else
627 \penalty\exhyphenpenalty\fi}
630 % \begin{macro}{\section}
631 % \begin{macro}{\subsection}
632 % \begin{macro}{\subsubsection}
633 % Sections are formatted by centering the section name and beginning a new
634 % page. Subsections simply center the section name.
636 \renewcommand{\section}{\clearpage\@startsection{section}{1}{\z@
637 }{0pt}{1sp}{\centering}}
638 \renewcommand{\subsection}{\@startsection{subsection}{2}{\z@
639 }{0pt}{1sp}{\centering}}
640 \renewcommand{\subsubsection}{\@startsection{subsubsection}{3}{\z@
641 }{0pt}{1sp}{\centering}}
643 % ^^A\let\mlastyle@vfont\verbatim@font
644 % ^^A\def\verbatim@font{\mlastyle@qspread\mlastyle@vfont}
648 % \subsubsection{Environments}
649 % ^^A%\newenvironment{blocks}{\begin{quote} \linespread{1} \selectfont}{\end{quote} \linespread{2} \small \selectfont}
650 % ^^A%\newenvironment{blockm}{\begin{quotation} \linespread{1} \selectfont}{\end{quotation} \linespread{2} \selectfont}
651 % \begin{environment}{verse}
652 % Indented 1 inch, with an additional .25 inch hanging indent.
654 \renewenvironment{verse}{\list{}{\mlastyle@qspread
655 \advance\leftmargin.75in\itemindent-.25in
656 \listparindent\itemindent}\item\relax}{\endlist}
659 % \begin{environment}{quotation}
660 % Indented 1 inch, with a paragraph indent of an additional .25 inches.
662 \renewenvironment{quotation}{\list{}{\mlastyle@qspread
663 \advance\leftmargin.5in\itemindent.25in
664 \listparindent\itemindent}\item\relax}{\endlist}
667 % \begin{environment}{quote}
668 % Identical to the |quotation| environment, except the first paragraph is not
671 \renewenvironment{quote}{\list{}{\mlastyle@qspread
672 \advance\leftmargin.5in
673 \listparindent.25in}\item\relax}{\endlist}
676 % \begin{environment}{workscited}
677 % Works cited environment, for compatibility with \package{mla-paper}.
679 \newenvironment{workscited}%
680 {\newpage{\centerline{Works Cited}}}{\newpage}
681 \newcommand{\bibent}{\noindent \hangindent .5in}
684 % \subsubsection{Margins}
685 % Top and bottom margins are 1 inch each. The header is flush with the
686 % right margin at .5 inches from the top of the page.
687 % ^^A\addtolength{\headheight}{-1pt}
688 % ^^A\setlength{\headheight}{1.4\headheight}% kludge
690 \addtolength{\voffset}{-0.5in}
691 \setlength{\textheight}{\paperheight}
692 \addtolength{\textheight}{-2in}
693 \setlength{\topmargin}{0in}
694 \setlength\headheight\f@baselineskip
695 \setlength{\headsep}{0.5in}
696 \addtolength{\headsep}{-\headheight}
697 \setlength{\footskip}{0.25in}
700 % Left and right margins in MLA format are each 1 inch wide.
702 \addtolength{\hoffset}{-0.5in}
703 \setlength{\textwidth}{\paperwidth}
704 \addtolength{\textwidth}{-2in}
705 \setlength{\oddsidemargin}{0.5in}
706 \setlength{\evensidemargin}{0.5in}
707 \setlength{\marginparwidth}{0.5in}
709 % \subsubsection{Paragraphs}
710 % Paragraphs should be left justified, with the first line indented .5
714 \setlength{\parindent}{.5in}
716 % MLA format specifies that all paragraphs should be indented, even those
717 % beginning a new section. This snippet from \package{indentfirst} changes
718 % \LaTeX{} to meet that requirement.
720 \let\@afterindentfalse\@afterindenttrue
723 % Double space {\em everywhere}.
724 % ^^A\RequirePackage{doublespace}
727 \leftmargini\parindent
728 \def\@listi{\leftmargin\leftmargini
729 \parsep\z@\itemsep\z@\topsep -3\p@\relax}
732 \def\@listii{\leftmargin\leftmarginii
733 \parsep\z@\itemsep\z@\topsep -3\p@\relax}
734 \def\@listiii{\leftmargin\leftmarginiii
735 \parsep\z@\itemsep\z@\topsep -3\p@\relax}
736 \def\@listiv{\leftmargin\leftmarginiv
737 \parsep\z@\itemsep\z@\topsep -3\p@\relax}
738 \def\@listv{\leftmargin\leftmarginv
739 \parsep\z@\itemsep\z@\topsep -3\p@\relax}
740 \def\@listvi{\leftmargin\leftmarginvi
741 \parsep\z@\itemsep\z@\topsep -3\p@\relax}
743 % \subsubsection{Header}
744 % The last name and page number appear on every page, including the first.
746 \RequirePackage{fancyhdr}
747 \fancypagestyle{plain}{\fancyhf{}}
748 \fancypagestyle{mlastyle}{
750 \rhead{\mlastyle@surname{} \thepage}
751 \renewcommand{\headrulewidth}{0pt}
752 \renewcommand{\footrulewidth}{0pt}}
755 % \subsubsection{Notes}
756 % Footnotes should be indented .5 inches; however .56 inches is used
757 % in a crude attempt to compensate for
758 % the alignment provided by the \package{footmisc} package. Endnotes are
759 % preferred in MLA style anyway, so this should not be a problem in most
762 \RequirePackage[ragged,norule]{footmisc}
763 \def\footnotelayout{\linespread{1}\footnotesize\raggedright{} }
764 \footnotemargin .56in
765 \skip\footins=2\baselineskip
766 \footnotesep 1.2\footnotesep
767 \addtolength\footnotesep{\baselineskip}
768 \def\footnotesize{\normalsize}
770 % ^^A\let\footnoterule\relax
771 % Endnotes are supported, but only if the \package{endnotes} package is
772 % loaded {\em before\/} this package.
774 \ifx\@undefined\endnote\else
775 \def\enoteheading{\newpage\section*{\notesname}}
776 \def\enoteformat{\leavevmode\makeenmark{} }
777 \def\enotesize{\normalsize}
780 % \subsubsection{Bibliography}
781 % \begin{environment}{thebibliography}
782 % The definition of |\thebibliography| varies depending on the document
785 \@ifundefined{chapter}
789 { \def\thebibliography#1{\newpage\section*{\refname}
790 \list{\@biblabel{\@arabic\c@enumiv}}%
791 {\settowidth\labelwidth{\@biblabel{#1}}}
792 \leftmargin\labelwidth
793 \advance\leftmargin\labelsep
794 \itemindent-\leftmargin
797 \sloppy%\sfcode`\.=1000\relax
798 \catcode`/=13\let/=\mlastyle@slash}}
802 { \def\thebibliography#1{\chapter*{\bibname}
803 \list{\@biblabel{\@arabic\c@enumiv}}%
804 {\settowidth\labelwidth{\@biblabel{#1}}}
805 \leftmargin\labelwidth
806 \advance\leftmargin\labelsep
807 \itemindent-\leftmargin
810 \sloppy%\sfcode`\.=1000\relax
811 \catcode`/=13\let/=\mlastyle@slash}}
815 \fi % \ifmlastyle@format
818 % \begin{macro}{\cite}
819 % \begin{macro}{\citeN}
820 % ^^A\begin{macro}{\citepage}
821 % ^^A\begin{macro}{\citequote}
822 % The following macros, combined with \file{mlastyle.bst}, provide
823 % for a bibliography in MLA style. Note that the definition of |\cite|,
824 % |\citeN|, etc.\ vary depending on the options passed to
825 % \package{mlastyle}.
827 % \begin{macro}{\mlastyle@intcite}
828 % The original |\cite| is stored
829 % in |\mlastyle@intcite|.
831 \let\mlastyle@intcite\cite
834 % \begin{macro}{\mlastyle@relax}
835 % This macro does nothing. Depending on the options, either |\citeC| or
836 % |\citeM| and its ilk will utilize it.
838 \newcommand{\mlastyle@relax}[2][]{}
841 % \subsubsection{MLA Style}
842 % \begin{macro}{\@cite}
843 % \begin{macro}{\citeM}
844 % If the \Lopt{mla} or \Lopt{style} options are used, the following is
848 \def\@cite#1#2{(#1\if@tempswa{} #2\fi)}
849 \def\cite{\def\@cite##1##2{(##1\if@tempswa{}
850 ##2\fi)}\mlastyle@intcite}
851 \def\citeN{\def\@cite##1##2{##1\if@tempswa{}
852 ##2\fi}\mlastyle@intcite}
853 \def\citeM{\def\@cite##1##2{ (##1\if@tempswa{}
854 ##2\fi)}\mlastyle@intcite}
855 \def\citepage{\def\@cite##1##2{\if@tempswa(##2)\fi}\mlastyle@intcite}
856 \def\citepageM{\def\@cite##1##2{\if@tempswa{}
857 (##2)\fi}\mlastyle@intcite}
858 \def\citeindirect{\def\@cite##1##2%
859 {(qtd. in ##1\if@tempswa{} ##2\fi)}\mlastyle@intcite}
860 \def\citeindirectM{\def\@cite##1##2%
861 { (qtd. in ##1\if@tempswa{} ##2\fi)}\mlastyle@intcite}
862 \let\citeC\mlastyle@relax
867 % Place commas in-between citations in the same |\citeyear|, |\citeyearNP|,
868 % |\citeN|, or |\shortciteN| command.
869 % Use something like |\citeN{ref1,ref2,ref3}| and |\citeN{ref4}| for a list.
871 % \@citedata and \@citedatax:
873 % \@ifnextchar [{\@tempswatrue\@citedatax}%
874 % {\@tempswafalse\@citedatax[]}%
876 % \def\@citedatax[#1]#2{%
878 % \if@filesw\immediate\write\@auxout{\string\citation{#2}}\fi%
879 % \def\@citea{}\@cite{\@for\@citeb:=#2\do%
880 % {\@citea\def\@citea{; }\@ifundefined% by Young
881 % {b@\@citeb}{{\bf ?}%
882 % \@warning{Citation `\@citeb' on page \thepage \space undefined}}%
883 % {\csname b@\@citeb\endcsname}}}{#1}}%
885 % \begin{macro}{\@citex}
886 % This is the original |\@citex| from \LaTeX{} modified to use semicolons.
890 \@cite{\@for\@citeb:=#2\do
891 {\@citea\def\@citea{;\penalty-1\ }%
892 \edef\@citeb{\expandafter\@firstofone\@citeb\@empty}%
893 \if@filesw\immediate\write\@auxout{\string\citation{\@citeb}}\fi
894 \@ifundefined{b@\@citeb}{\mbox{\reset@font\bfseries ?}%
897 {Citation `\@citeb' on page \thepage \space undefined}}%
898 {{\csname b@\@citeb\endcsname}}}}{#1}}
901 % \begin{macro}{\@biblabel}
902 % No labels in the bibliography.
906 \let\mlastyle@intbib\thebibliography
907 \def\thebibliography#1{\mlastyle@intbib{#1}
908 \itemindent-\leftmargin\def\@biblabel##1{}}
911 % Title either the bibliography or the references ``Works Cited,''
912 % depending on the document class.
914 \@ifundefined{chapter}
915 {\renewcommand\refname{Works Cited}}
916 {\renewcommand\bibname{Works Cited}}
919 % ^^A% Define the command \workscited{bib}{style}{nocite}
920 % ^^A%\newcommand{\workscited}[3]{%
921 % ^^A% \ifx\chapter\@undefined%
922 % ^^A% \addcontentsline{toc}{chapter}{\bfseries\bibname}% report style
924 % ^^A% \addcontentsline{toc}{section}{\bfseries\refname}% article style
926 % ^^A% \bibliography{#1}\bibliographystyle{#2}\nocite{#3}}
928 % ^^A\newcommand{\annote}[1]{\begin{list}{}{%
929 % ^^A \setlength{\labelwidth}{0pt}
930 % ^^A \addtolength{\leftmargin}{\parindent}
931 % ^^A \setlength{\labelsep}{0pt}}%
932 % ^^A \item #1 \end{list}}
933 % \subsubsection{Plain Style}
934 % \begin{macro}{\citeC}
935 % This next block is used if the \Lopt{compat} or \Lopt{format} option is
939 \newcommand{\mlastyle@cite}[2][]{\@tempswafalse\@citex[]{#2}}
940 \let\cite\mlastyle@cite
941 \let\citepage\mlastyle@cite
942 \let\citeindirect\mlastyle@cite
943 \newcommand{\citeC}[2][]{~\@tempswafalse\@citex[]{#2}}
944 \let\citeM\mlastyle@relax
945 \let\citepageM\mlastyle@relax
946 \let\citeindirectM\mlastyle@relax