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