1 % \iffalse meta-comment
3 % Copyright (C) 2003 by Tim Pope <latex@rebelongto.us>
4 % ----------------------------------------------------
6 % This file may be distributed and/or modified under the
7 % conditions of the LaTeX Project Public License, either version 1.2
8 % of this license or (at your option) any later version.
9 % The latest version of this license is in:
11 % http://www.latex-project.org/lppl.txt
13 % and version 1.2 or later is part of all distributions of LaTeX
14 % version 1999/12/01 or later.
19 %<package>\NeedsTeXFormat{LaTeX2e}[1999/12/01]
20 %<package>\ProvidesPackage{mlastyle}
21 %<package> [2003/11/09 v0.9 MLA format and documentation style]
24 \begin{filecontents}{mlastyle.bib}
25 @PREAMBLE{"\def\BibTeX#1{\rmfamily B\kern -.05em\textsc {i\kern -.025emb}\kern -.08emT\kern -.1667em\lower .7ex\hbox {E}\kern -.125emX}"}
28 AUTHOR = "Joseph Gibaldi",
29 TITLE = "MLA Handbook for Writers of Research Papers",
37 AUTHOR = "Leslie Lamport",
38 TITLE = "{\LaTeX}: A Document Preparation System",
42 PUBLISHER = "Addison-Wesley",
46 AUTHOR = "Tobias Oetker and Hubert Partl and Irene Hyna and Elisabeth
48 TITLE = "The Not So Short Introduction to {\LaTeXe}",
53 ACCESSDATE = "1~"#nov#"~2003",
54 URL = "CTAN://info/lshort/"}
57 AUTHOR = "Oren Patashnik",
58 TITLE = "{\BibTeX{BibTeX}}ing",
61 ACCESSDATE = "1~"#nov#"~2003",
62 URL = "CTAN://biblio/bibtex/distribs/doc/btxdoc.tex"}
64 \documentclass[draft]{ltxdoc}
66 \usepackage[mla]{mlastyle}
67 \bibliographystyle{mlastyle}
68 \addtolength{\marginparwidth}{1in}
69 \addtolength{\textwidth}{-1in}
70 \addtolength{\headwidth}{-1in}
72 \usepackage[compat]{mlastyle}
73 \bibliographystyle{plain}
74 \addtolength{\headsep}{-5pt}
75 %\addtolength{\headheight}{-12pt}
76 \addtolength{\topmargin}{-17pt}
77 \addtolength{\textheight}{22pt}
78 \IfFileExists{ulem.sty}{\usepackage[normalem]{ulem}}{\let\uline\emph}
80 \IfFileExists{times.sty}%
81 {\newcommand{\examp}[2][]{{\let\emph\uline\fontfamily{ptm}\selectfont##2}##1}}%
82 {\newcommand{\examp}[2][]{``##2##1''}}
89 \DocInput{mlastyle.dtx}
97 % {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
98 % 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
99 % Digits \0\1\2\3\4\5\6\7\8\9
100 % Exclamation \! Double quote \" Hash (number) \#
101 % Dollar \$ Percent \% Ampersand \&
102 % Acute accent \' Left paren \( Right paren \)
103 % Asterisk \* Plus \+ Comma \,
104 % Minus \- Point \. Solidus \/
105 % Colon \: Semicolon \; Less than \<
106 % Equals \= Greater than \> Question mark \?
107 % Commercial at \@ Left bracket \[ Backslash \\
108 % Right bracket \] Circumflex \^ Underscore \_
109 % Grave accent \` Left brace \{ Vertical bar \|
110 % Right brace \} Tilde \~}
113 % \changes{v0.9}{2003/11/09}{Converted to \texttt{dtx} file}
114 % \changes{v0.8}{2003/10/15}{Initial version}
116 % \GetFileInfo{mlastyle.sty}
120 % \DoNotIndex{\@afterindentfalse}
121 % \DoNotIndex{\@afterindenttrue}
122 % \DoNotIndex{\@arabic}
123 % \DoNotIndex{\@author}
124 % \DoNotIndex{\@auxout}
125 % \DoNotIndex{\@citea}
126 % \DoNotIndex{\@citeb}
127 % \DoNotIndex{\@date}
128 % \DoNotIndex{\@empty}
129 % \DoNotIndex{\@firstofone}
131 % \DoNotIndex{\@ifundefined}
132 % \DoNotIndex{\@latex@warning}
133 % \DoNotIndex{\@listI}
134 % \DoNotIndex{\@listi}
135 % \DoNotIndex{\@listii}
136 % \DoNotIndex{\@listiii}
137 % \DoNotIndex{\@listiv}
138 % \DoNotIndex{\@listv}
139 % \DoNotIndex{\@listvi}
140 % \DoNotIndex{\@startsection}
141 % \DoNotIndex{\@tempswafalse}
142 % \DoNotIndex{\@title}
143 % \DoNotIndex{\@undefined}
144 % \DoNotIndex{\DeclareOption}
145 % \DoNotIndex{\ExecuteOptions}
146 % \DoNotIndex{\G@refundefinedtrue}
147 % \DoNotIndex{\ProcessOptions}
148 % \DoNotIndex{\RequirePackage}
149 % \DoNotIndex{\UL@start,\UL@stop}
150 % \DoNotIndex{\addtolength}
151 % \DoNotIndex{\advance}
152 % \DoNotIndex{\baselineskip}
153 % \DoNotIndex{\begin}
154 % \DoNotIndex{\bfseries}
155 % \DoNotIndex{\c@enumiv}
156 % \DoNotIndex{\catcode}
157 % \DoNotIndex{\centering}
158 % \DoNotIndex{\centerline}
159 % \DoNotIndex{\chapter}
160 % \DoNotIndex{\citation}
161 % \DoNotIndex{\clearpage}
162 % \DoNotIndex{\csname}
167 % \DoNotIndex{\egroup}
170 % \DoNotIndex{\endcsname}
171 % \DoNotIndex{\endlist}
172 % \DoNotIndex{\exhyphenpenalty}
173 % \DoNotIndex{\expandafter}
174 % \DoNotIndex{\f@baselineskip}
175 % \DoNotIndex{\fancyhf}
176 % \DoNotIndex{\fancypagestyle}
178 % \DoNotIndex{\futurelet}
180 % \DoNotIndex{\hangindent}
181 % \DoNotIndex{\headrulewidth}
182 % \DoNotIndex{\if@filesw}
183 % \DoNotIndex{\if@tempswa}
184 % \DoNotIndex{\ifcase}
185 % \DoNotIndex{\ifmlastyle@bibstyle}
186 % \DoNotIndex{\ifmlastyle@format}
187 % \DoNotIndex{\ifmlastyle@papersize}
188 % \DoNotIndex{\ifmlastyle@style}
189 % \DoNotIndex{\ifmlastyle@times}
190 % \DoNotIndex{\ifmlastyle@underline}
192 % \DoNotIndex{\immediate}
194 % \DoNotIndex{\itemindent}
195 % \DoNotIndex{\itemsep}
196 % \DoNotIndex{\labelsep}
197 % \DoNotIndex{\labelwidth}
198 % \DoNotIndex{\leavevmode}
199 % \DoNotIndex{\leftmargin}
200 % \DoNotIndex{\leftmargini,\leftmarginii,\leftmarginiii}
201 % \DoNotIndex{\leftmarginiv,\leftmarginv,\leftmarginvi}
203 % \DoNotIndex{\linespread}
205 % \DoNotIndex{\listparindent}
206 % \DoNotIndex{\makeenmark}
208 % \DoNotIndex{\mlastyle@bibstylefalse}
209 % \DoNotIndex{\mlastyle@bibstyletrue}
210 % \DoNotIndex{\mlastyle@cite}
211 % \DoNotIndex{\mlastyle@course}
212 % \DoNotIndex{\mlastyle@formatfalse}
213 % \DoNotIndex{\mlastyle@formattrue}
214 % \DoNotIndex{\mlastyle@instructor}
215 % \DoNotIndex{\mlastyle@intbib}
216 % \DoNotIndex{\mlastyle@papersizefalse}
217 % \DoNotIndex{\mlastyle@papersizetrue}
218 % \DoNotIndex{\mlastyle@qspread}
219 % \DoNotIndex{\mlastyle@sl@sh}
220 % \DoNotIndex{\mlastyle@slash}
221 % \DoNotIndex{\mlastyle@slashnext}
222 % \DoNotIndex{\mlastyle@slashx}
223 % \DoNotIndex{\mlastyle@stylefalse}
224 % \DoNotIndex{\mlastyle@styletrue}
225 % \DoNotIndex{\mlastyle@surname}
226 % \DoNotIndex{\mlastyle@timesfalse}
227 % \DoNotIndex{\mlastyle@timestrue}
228 % \DoNotIndex{\mlastyle@underlinefalse}
229 % \DoNotIndex{\mlastyle@underlinetrue}
230 % \DoNotIndex{\month}
231 % \DoNotIndex{\newblock}
232 % \DoNotIndex{\newcommand}
233 % \DoNotIndex{\newenvironment}
234 % \DoNotIndex{\newif}
235 % \DoNotIndex{\newpage}
236 % \DoNotIndex{\noindent}
237 % \DoNotIndex{\normalsize}
238 % \DoNotIndex{\notesname}
239 % \DoNotIndex{\number}
242 % \DoNotIndex{\pagestyle}
244 % \DoNotIndex{\parindent}
245 % \DoNotIndex{\parsep}
246 % \DoNotIndex{\penalty}
247 % \DoNotIndex{\relax}
248 % \DoNotIndex{\renewcommand}
249 % \DoNotIndex{\renewenvironment}
250 % \DoNotIndex{\reset@font}
251 % \DoNotIndex{\rhead}
252 % \DoNotIndex{\selectfont}
253 % \DoNotIndex{\setlength}
254 % \DoNotIndex{\settowidth}
255 % \DoNotIndex{\sfcode}
257 % \DoNotIndex{\sloppy}
258 % \DoNotIndex{\space}
259 % \DoNotIndex{\string}
260 % \DoNotIndex{\sw@llow}
262 % \DoNotIndex{\thebibliography}
263 % \DoNotIndex{\thepage}
264 % \DoNotIndex{\topsep}
265 % \DoNotIndex{\usecounter}
266 % \DoNotIndex{\vskip}
267 % \DoNotIndex{\write}
270 % \DoNotIndex{\evensidemargin}
271 % \DoNotIndex{\headheight}
272 % \DoNotIndex{\headsep}
273 % \DoNotIndex{\hoffset}
274 % \DoNotIndex{\marginparwidth}
275 % \DoNotIndex{\oddsidemargin}
276 % \DoNotIndex{\raggedbottom}
277 % \DoNotIndex{\raggedright}
278 % \DoNotIndex{\textheight}
279 % \DoNotIndex{\textwidth}
280 % \DoNotIndex{\topmargin}
281 % \DoNotIndex{\voffset}
282 % \DoNotIndex{\paperheight}
283 % \DoNotIndex{\paperwidth}
284 % \DoNotIndex{\pdfpageheight}
285 % \DoNotIndex{\pdfpagewidth}
286 % \DoNotIndex{\special}
288 % \hyphenation{pre-am-ble wide-spread}
290 % \newcommand{\Lopt}[1]{\textsf {#1}}
291 % \newcommand{\file}[1]{\texttt {#1}}
292 % \newcommand{\package}[1]{\textsf {#1}}
293 % ^^A\newcommand{\Lcount}[1]{\textsl {\small#1}}
294 % ^^A\newcommand{\pstyle}[1]{\textsl {#1}}
296 % \newcommand{\OptionIndex}[1]{\index{#1\actualchar\Lopt{#1} (option)\encapchar usage}\index{options:\levelchar\Lopt{#1}}}
298 % \title{The \package{mlastyle} package\thanks{This document
299 % corresponds to \package{mlastyle}~\fileversion, dated \filedate.}}
300 % \author{Tim Pope \\ \texttt{latex@rebelongto.us}}
307 % \section{Introduction}
309 % ^^A MLA style, consisting of a set of documentation conventions, has
310 % ^^A gained widespread acceptance in the humanities.
311 % According to the {\em MLA Handbook for Writers of Research
312 % Papers}\citeC{handbook}, MLA style is a set of ``commonly agreed-on
313 % rules for documenting quotations, facts, opinions and paraphrases'' that
314 % ``is preferred by a substantial majority of scholarly journals in
315 % language and literature{\makeatletter\ifmlastyle@style
316 % .''\citeM[xvi]{handbook}\else.''\fi} \LaTeX{} is a
317 % document preparation system enjoying popularity in the scientific field.
318 % It should come as no surprise that complete, up-to-date implementations
319 % of MLA style for \LaTeX{} are in short supply. The \LaTeX{} package
320 % \package{mlastyle} aims to fill this void.
324 % A sample document follows.
326 %\documentclass[12pt]{article}
327 %\usepackage{mlastyle}
330 %\instructor{Professor Smith}
331 %\course{English 101}
333 %\title{The Sadism Inherent in Compulsory English Classes}
338 %\end{document}\end{verbatim}
339 % \subsection{Initialization Macros}
340 % The \index{heading|usage}mandatory heading is generated with
341 % \DescribeMacro{\maketitle}|\maketitle|. Use the standard macros
342 % |\author|, |\title|, and |\date| to specify the relevant information.
343 % To define the instructor and name of the course, use the aptly named
344 % \DescribeMacro{\instructor}|\instructor|\marg{instructor} and
345 % \DescribeMacro{\course}|\course|\marg{course} macros.
347 % The last name for use in the header\index{header|usage} is derived from
348 % |\author|. If this does not produce the desired result, use
349 % \DescribeMacro{\surname}|\surname|\marg{last name} to override it.
351 % MLA style recommends the DD~Mon.~YYYY format for specifying dates;
352 % \DescribeMacro{\today}|\today| has been conveniently redefined to this.
353 % However, other formats can be used as long as done so consistently
354 % throughout the document. Also note that the date in the
355 % heading\index{heading|usage} should be the due date of the assignment;
356 % students who finish assignments early would be wise to call
357 % |\date|\marg{due date}.
359 % \subsection{Environments}
360 % Three environments have been modified from standard \LaTeX to better
361 % suit MLA format. To typeset \index{poetry|usage}poetry and
362 % \index{drama|usage}drama, use the \DescribeEnv{verse}|verse|
363 % environment. Quotations\index{quotations|usage} of a single paragraph
364 % or less always use the \DescribeEnv{quote}|quote| environment. For
365 % longer passages, use the \DescribeEnv{quotation}|quotation| environment
366 % if the beginning of the passage marks the beginning of a paragraph.
367 % Otherwise, use the |quote| environment.
369 % Be sure to follow MLA guidelines when using these environments. Short
370 % quotes should be enclosed in quotation marks and included directly in
373 % \subsection{Modes of Operation}
374 % The \package{mlastyle} package has four basic modes of operations,
375 % selected with one of four mutually exclusive options. The
376 % \OptionIndex{format}\Lopt{format}
377 % option tells \package{mlastyle} to use MLA format (i.e., 1 inch margins,
378 % double-spaced, etc.). The \OptionIndex{style}\Lopt{style} option tells
379 % \package{mlastyle} to use MLA style (i.e., the format of parenthetical
380 % documentation, etc). Each of these options
381 % disables the other; to use both MLA format and MLA style, specify the
382 % \OptionIndex{mla}\Lopt{mla} option, or nothing at all.
384 % To disable both MLA style and MLA format, use the
385 % \OptionIndex{compat}\Lopt{compat} option. This differs from omitting
386 % the package entirely in that certain macros are still defined (e.g.,
387 % |\instructor|). Also, citations are handled a bit differently than in
388 % standard \LaTeX{} (see section~\ref{sec:documentation}).
390 % In addition to the above, several other options modify the behavior of
391 % \package{mlastyle}.
393 % \subsubsection{Italics vs.\ Underlining} \index{underlining|usage}
394 % \index{italics|usage}\label{sec:italics}
395 % The {\em MLA Handbook\/}\citeC{handbook} dictates that emphasis should
396 % be indicated by underlining the text\citeM[94]{handbook}. Thus, the
397 % \package{ulem} package, which underlines all emphasized
398 % text, is loaded by default in \Lopt{mla} and \Lopt{format} modes. To
399 % disable this, use the \OptionIndex{italics}\Lopt{italics} option.
400 % Conversely, if underlining is desired in \Lopt{style} or \Lopt{compat}
401 % mode, the \OptionIndex{underline}\Lopt{underline} option can be used.
403 % \subsubsection{Fonts}
404 % By default, \package{mlastyle} uses \TeX's standard Computer Modern
405 % font. Some profess\-ors\penalty500---particularly those
406 % concerned with document length---require assignments to be set in
407 % \examp[.]{Times New Roman} This can be achieved with the
408 % \OptionIndex{times}\Lopt{times} option, which simply loads the
409 % \package{times} package. This opposite of this option is
410 % \OptionIndex{cm}\Lopt{cm}, which reverts to Computer Modern.
412 % \index{works cited|usage}
413 % \subsection{Documenting Sources} \label{sec:documentation}
415 % The \package{mlastyle} package reimplements the
416 % \DescribeEnv{thebibliography}|thebibliography| environment to generate
417 % the list of works cited in MLA style. Instruction in the basic use of
418 % \LaTeX's bibliography features is beyond the scope of this document;
419 % however, the following example, which should be included just before
420 % |\end{document}|, might prove to be a useful starting point:
422 %\begin{thebibliography}{}
424 %\bibitem[Lamport]{latexdps}
426 %\newblock {\em \LaTeX: A Document Preparation System}.
428 %\newblock Reading: Addison-Wesley, 1994.
430 %\end{thebibliography}\end{verbatim}
431 % In this example, |Lamport| is the author's last name (for use in
432 % citations) and |latex| is the marker used to reference it (see
433 % section~\ref{sec:parenthetical}).
435 % For information on automatically generating the list of works cited with
436 % \BibTeX, see section~\ref{sec:bibtex}.
438 % \subsubsection{Parenthetical Documentation} \label{sec:parenthetical}
439 % A simple citation can by achieved with a call to
440 % \DescribeMacro{\cite}|\cite|\oarg{pages}\marg{marker}, where
441 % marker refers to the key given to either
442 % \index{BibTeX=\BibTeX|usage}\BibTeX{} or the |\bibitem| macro (|latex|
443 % in the above example).
444 % Omit \oarg{pages} if the source has no page numbers.
445 % Multiple sources can be cited using the syntax
446 % |\cite|\oarg{pages}|{|\meta{marker
447 % 1}\texttt{,}\penalty\exhyphenpenalty\meta{marker 2}\ldots|}|; however, page
448 % numbers can currently be specified only for the last referenced source.
449 % To work around this limitation, use |\citeN|, explained below.
451 % Three additional citation commands are provided, all of which take the
452 % same arguments as |\cite|. To omit the author information from the
453 % citation, use \DescribeMacro{\citepage}|\citepage|. Indirect
454 % citations---those of the format \examp{(qtd. in Pope
455 % \pageref{sec:italics})}---can be
456 % created with \DescribeMacro{\citeindirect}|\citeindirect|. Finally, the
457 % parentheses are omitted by \DescribeMacro{\citeN}|\citeN|. This was
458 % intended for use in cross references, but it can also help in citing
459 % multiple works. The result of
460 % |(\citeN[42]{texbook}|\texttt{; }|\citeN[69]{latexdps})|
461 % would be something like \examp[.]{(Knuth 42; Lamport 69)}
463 % \subsubsection{Using {\rm \BibTeX}} \label{sec:bibtex}
464 % Coupled with \index{BibTeX=\BibTeX|usage}\BibTeX,
465 % \package{mlastyle} provides a experimental implementation of MLA
466 % documentation style. Put\SpecialUsageIndex{\bibliographystyle}
467 % |\bibliographystyle{mlastyle}| in the document preamble to load the
468 % bibliography style. Alternatively, the
469 % \OptionIndex{bibstyle}\Lopt{bibstyle} option can handle this
470 % automatically, loading a bibliography style of |mlastyle| in \Lopt{mla}
471 % and \Lopt{style} modes and a bibliography style of |plain| in
472 % \Lopt{format} and \Lopt{compat} modes.
474 % Use of \BibTeX{} is also beyond the scope of this document; instead,
475 % another example is provided. To use it, substitute
476 % |\bibliography|\marg{filename} for the |thebibliography| environment.
477 % Then create \meta{filename}\file{.bib} with the contents below.
478 % Generating the document entails running \file{latex} on the \file{.tex}
479 % file, \file{bibtex} on the resulting \file{.aux} file, then \file{latex}
483 % AUTHOR = "Leslie Lamport",
484 % TITLE = "{\LaTeX}: A Document Preparation System",
486 % EDITION = "Second",
487 % ADDRESS = "Reading",
488 % PUBLISHER = "Addison-Wesley",
489 % YEAR = "1994"}\end{verbatim}
491 % In \package{mlastyle}, The |KEY| field serves the additional purpose of
492 % specifying an abbreviated title. This is unnecessary in the above
493 % example. If an additional book by Leslie Lamport was included, however,
494 % the |KEY| field would allow |\cite{latexdps}| to yield \examp{(Lamport,
495 % \emph{\LaTeX\/})} instead of \examp[.]{(Lamport, \emph{\LaTeX: A
496 % Doc\-um\-ent Pre\-pa\-ra\-tion Sys\-tem\/})}
498 % Note that only entries referenced by a citation are included in the list
499 % of works cited; to force the inclusion of an entry or all entries, use
500 % |\nocite|\marg{marker} and |\nocite{*}|, respectively.
502 % \StopEventually{\PrintChanges\bibliography{mlastyle}\PrintIndex}
504 % \section{Implementation}
509 % \subsection{Options}
510 % \begin{macro}{\ifmlastyle@*}
511 % \begin{macro}{\mlastyle@*true}
512 % \begin{macro}{\mlastyle@*false}
513 % Most options are implemented by modifying a |\newif| declared for that
516 \newif\ifmlastyle@bibstyle
517 \DeclareOption{bibstyle}{\mlastyle@bibstyletrue}
518 \DeclareOption{nobibstyle}{\mlastyle@bibstylefalse}
519 \newif\ifmlastyle@papersize
520 \DeclareOption{papersize}{\mlastyle@papersizetrue}
521 \DeclareOption{nopapersize}{\mlastyle@papersizefalse}
522 \newif\ifmlastyle@underline
523 \DeclareOption{underline}{\mlastyle@underlinetrue}
524 \DeclareOption{italics}{\mlastyle@underlinefalse}
525 \newif\ifmlastyle@times
526 \DeclareOption{times}{\mlastyle@timestrue}
527 \DeclareOption{cm}{\mlastyle@timesfalse}
528 \newif\ifmlastyle@style
529 \DeclareOption{compat}{\mlastyle@stylefalse
530 \mlastyle@formatfalse
531 \mlastyle@underlinefalse}
532 \DeclareOption{mla}{\mlastyle@styletrue
534 \mlastyle@underlinetrue}
535 \newif\ifmlastyle@format
536 \DeclareOption{format}{\mlastyle@stylefalse
538 \mlastyle@underlinetrue}
539 \DeclareOption{style}{\mlastyle@styletrue
540 \mlastyle@formatfalse
541 \mlastyle@underlinefalse}
542 \DeclareOption{singlespacequotes}{
543 \def\mlastyle@qspread{\linespread{1}\selectfont\vskip\baselineskip}}
544 \DeclareOption{doublespacequotes}{\let\mlastyle@qspread\relax}
545 \ExecuteOptions{nobibstyle,nopapersize,mla,cm,doublespacequotes}
551 % If the \Lopt{papersize} option is set, add the appropriate
552 % \textsc{PostScript} special, or adjust |\pdfpagewidth| and
553 % |\pdfpageheight| if pdf\LaTeX{} is in use.
555 \ifmlastyle@papersize
556 \ifx\@undefined\pdfpagewidth
557 \special{papersize=\the\paperwidth,\the\paperheight}
559 \setlength{\pdfpagewidth}{\paperwidth}
560 \setlength{\pdfpageheight}{\paperheight}
562 \fi % \ifmlastyle@papersize
564 % If the \Lopt{bibstyle} option is set, specify the bibliography style.
568 \bibliographystyle{mlastyle}
570 \bibliographystyle{plain}
572 \fi % \ifmlastyle@bibstyle
574 % \begin{macro}{\UL@onin}
575 % Load the \package{ulem} package if the \Lopt{underline} option is set.
576 % By default, \package{ulem} does multiple underlining for nested
577 % emphasis. This is changed to MLA-style behavior with the redefinition
580 \ifmlastyle@underline
581 \RequirePackage{ulem}
582 \def\UL@onin#1{\egroup\UL@stop#1\UL@start}
583 \fi % \ifmlastyle@underline
586 % Load the \package{times} package if the \Lopt{times} option is set.
589 \RequirePackage{times}
590 \fi % \ifmlastyle@times
592 % \subsection{Macros}
593 % \begin{macro}{\instructor}
594 % Define the instructor, along with an obsolete synonym.
596 \def\instructor#1{\gdef\mlastyle@instructor{#1}}
597 \let\professor\instructor
600 % \begin{macro}{\course}
601 % Define the course, along with an obsolete synonym.
603 \def\course#1{\gdef\mlastyle@course{#1}}
604 \let\classname\course
607 % \begin{macro}{\surname}
608 % Define the surname, along with an obsolete synonym.
610 \def\surname#1{\gdef\mlastyle@surname{#1}}
611 \def\mlastyle@surname{\def\sw@llow##1 {}\expandafter\sw@llow\@author}
612 \let\lastname\surname
615 % \subsection{Formatting}
616 % Formatting is done if the \Lopt{mla} or \Lopt{format} option is set.
620 % \subsubsection{Macros}
621 % \begin{macro}{\maketitle}
622 % |\maketitle| generates a heading in MLA format.
624 \renewcommand{\maketitle}{\begin{flushleft}
626 \@ifundefined{mlastyle@instructor}{}{\mlastyle@instructor}\par
627 \@ifundefined{mlastyle@course}{}{\mlastyle@course}\par
628 \@date\end{flushleft}
629 \begin{center}\@title\end{center}\par
633 % \begin{macro}{\today}
634 % |\today| is redefined to DD~Mon.~YYYY format.
636 \def\today{\number\day~\ifcase\month\or
637 Jan.\or Feb.\or Mar.\or Apr.\or May\or June\or July\or
638 Aug.\or Sept.\or Oct.\or Nov.\or Dec.\fi\ \number\year}
641 % \begin{macro}{\slash}
642 % No penalty for |\slash|, and plain /'s permit line breaks if necessary.
643 % ^^A\let\mlastyle@sl@sh=/
645 \def\slash{/\penalty\z@}
646 \def\mlastyle@slash{/\futurelet\mlastyle@slashnext\mlastyle@slashx}
647 \def\mlastyle@slashx{\ifx\mlastyle@slashnext/\else
648 \penalty\exhyphenpenalty\fi}
651 % \begin{macro}{\section}
652 % \begin{macro}{\subsection}
653 % \begin{macro}{\subsubsection}
654 % Sections are formatted by centering the section name and beginning a new
655 % page. Subsections simply center the section name.
657 \renewcommand{\section}{\clearpage\@startsection{section}{1}{\z@
658 }{0pt}{1sp}{\centering}}
659 \renewcommand{\subsection}{\@startsection{subsection}{2}{\z@
660 }{0pt}{1sp}{\centering}}
661 \renewcommand{\subsubsection}{\@startsection{subsubsection}{3}{\z@
662 }{0pt}{1sp}{\centering}}
664 % ^^A\let\mlastyle@vfont\verbatim@font
665 % ^^A\def\verbatim@font{\mlastyle@qspread\mlastyle@vfont}
669 % \subsubsection{Environments}
670 % ^^A%\newenvironment{blocks}{\begin{quote} \linespread{1} \selectfont}{\end{quote} \linespread{2} \small \selectfont}
671 % ^^A%\newenvironment{blockm}{\begin{quotation} \linespread{1} \selectfont}{\end{quotation} \linespread{2} \selectfont}
672 % \begin{environment}{verse}
673 % Indented 1 inch, with an additional .25 inch hanging indent.
675 \renewenvironment{verse}{\list{}{\mlastyle@qspread
676 \advance\leftmargin.75in\itemindent-.25in
677 \listparindent\itemindent}\item\relax}{\endlist}
680 % \begin{environment}{quotation}
681 % Indented 1 inch, with a paragraph indent of an additional .25 inches.
683 \renewenvironment{quotation}{\list{}{\mlastyle@qspread
684 \advance\leftmargin.5in\itemindent.25in
685 \listparindent\itemindent}\item\relax}{\endlist}
688 % \begin{environment}{quote}
689 % Identical to the |quotation| environment, except the first paragraph is not
692 \renewenvironment{quote}{\list{}{\mlastyle@qspread
693 \advance\leftmargin.5in
694 \listparindent.25in}\item\relax}{\endlist}
697 % \begin{environment}{workscited}
698 % Works cited environment, for compatibility with \package{mla-paper}.
700 \newenvironment{workscited}%
701 {\newpage{\centerline{Works Cited}}}{\newpage}
702 \newcommand{\bibent}{\noindent \hangindent .5in}
705 % \subsubsection{Margins}
706 % Top and bottom margins are 1 inch each. The header is flush with the
707 % right margin at .5 inches from the top of the page.
708 % ^^A\addtolength{\headheight}{-1pt}
709 % ^^A\setlength{\headheight}{1.4\headheight}% kludge
711 \addtolength{\voffset}{-0.5in}
712 \setlength{\textheight}{\paperheight}
713 \addtolength{\textheight}{-2in}
714 \setlength{\topmargin}{0in}
715 \setlength\headheight\f@baselineskip
716 \setlength{\headsep}{0.5in}
717 \addtolength{\headsep}{-\headheight}
718 \setlength{\footskip}{0.25in}
721 % Left and right margins in MLA format are each 1 inch wide.
723 \addtolength{\hoffset}{-0.5in}
724 \setlength{\textwidth}{\paperwidth}
725 \addtolength{\textwidth}{-2in}
726 \setlength{\oddsidemargin}{0.5in}
727 \setlength{\evensidemargin}{0.5in}
728 \setlength{\marginparwidth}{0.5in}
730 % \subsubsection{Paragraphs}
731 % Paragraphs should be left justified, with the first line indented .5
735 \setlength{\parindent}{.5in}
737 % MLA format specifies that all paragraphs should be indented, even those
738 % beginning a new section. This snippet from \package{indentfirst} changes
739 % \LaTeX{} to meet that requirement.
741 \let\@afterindentfalse\@afterindenttrue
744 % Double space {\em everywhere}.
745 % ^^A\RequirePackage{doublespace}
748 \leftmargini\parindent
749 \def\@listi{\leftmargin\leftmargini
750 \parsep\z@\itemsep\z@\topsep -3\p@\relax}
753 \def\@listii{\leftmargin\leftmarginii
754 \parsep\z@\itemsep\z@\topsep -3\p@\relax}
755 \def\@listiii{\leftmargin\leftmarginiii
756 \parsep\z@\itemsep\z@\topsep -3\p@\relax}
757 \def\@listiv{\leftmargin\leftmarginiv
758 \parsep\z@\itemsep\z@\topsep -3\p@\relax}
759 \def\@listv{\leftmargin\leftmarginv
760 \parsep\z@\itemsep\z@\topsep -3\p@\relax}
761 \def\@listvi{\leftmargin\leftmarginvi
762 \parsep\z@\itemsep\z@\topsep -3\p@\relax}
764 % \subsubsection{Header}
765 % The last name and page number appear on every page, including the first.
767 \RequirePackage{fancyhdr}
768 \fancypagestyle{plain}{\fancyhf{}}
769 \fancypagestyle{mlastyle}{
771 \rhead{\mlastyle@surname{} \thepage}
772 \renewcommand{\headrulewidth}{0pt}
773 \renewcommand{\footrulewidth}{0pt}}
776 % \subsubsection{Notes}
777 % Footnotes should be indented .5 inches; however .56 inches is used
778 % in a crude attempt to compensate for
779 % the alignment provided by the \package{footmisc} package. Endnotes are
780 % preferred in MLA style anyway, so this should not be a problem in most
783 \RequirePackage[ragged,norule]{footmisc}
784 \def\footnotelayout{\linespread{1}\footnotesize\raggedright{} }
785 \footnotemargin .56in
786 \skip\footins=2\baselineskip
787 \footnotesep 1.2\footnotesep
788 \addtolength\footnotesep{\baselineskip}
789 \def\footnotesize{\normalsize}
791 % ^^A\let\footnoterule\relax
792 % Endnotes are supported, but only if the \package{endnotes} package is
793 % loaded {\em before\/} this package.
795 \ifx\@undefined\endnote\else
796 \def\enoteheading{\newpage\section*{\notesname}}
797 \def\enoteformat{\leavevmode\makeenmark{} }
798 \def\enotesize{\normalsize}
801 % \subsubsection{Bibliography}
802 % \begin{environment}{thebibliography}
803 % The definition of |\thebibliography| varies depending on the document
806 \@ifundefined{chapter}
810 { \def\thebibliography#1{\newpage\section*{\refname}
811 \list{\@biblabel{\@arabic\c@enumiv}}%
812 {\settowidth\labelwidth{\@biblabel{#1}}}
813 \leftmargin\labelwidth
814 \advance\leftmargin\labelsep
815 \itemindent-\leftmargin
818 %\catcode`\/=13\global\let/=\mlastyle@slash
819 \sloppy%\sfcode`\.=\@m
824 { \def\thebibliography#1{\chapter*{\bibname}
825 \list{\@biblabel{\@arabic\c@enumiv}}%
826 {\settowidth\labelwidth{\@biblabel{#1}}}
827 \leftmargin\labelwidth
828 \advance\leftmargin\labelsep
829 \itemindent-\leftmargin
832 %\catcode`/=13\let/=\mlastyle@slash
833 \sloppy%\sfcode`\.=\@m
838 \fi % \ifmlastyle@format
841 % \begin{macro}{\cite}
842 % \begin{macro}{\citeN}
843 % ^^A\begin{macro}{\citepage}
844 % ^^A\begin{macro}{\citequote}
845 % The following macros, combined with \file{mlastyle.bst}, provide
846 % for a bibliography in MLA style. Note that the definition of |\cite|,
847 % |\citeN|, etc.\ vary depending on the options passed to
848 % \package{mlastyle}.
850 % \begin{macro}{\mlastyle@intcite}
851 % The original |\cite| is stored
852 % in |\mlastyle@intcite|.
854 \let\mlastyle@intcite\cite
857 % \begin{macro}{\mlastyle@relax}
858 % This macro does nothing. Depending on the options, either |\citeC| or
859 % |\citeM| and its ilk will utilize it.
861 \newcommand{\mlastyle@relax}[2][]{}
864 % \subsubsection{MLA Style}
865 % \begin{macro}{\@cite}
866 % \begin{macro}{\citeM}
867 % If the \Lopt{mla} or \Lopt{style} options are used, the following is
871 \def\@cite#1#2{(#1\if@tempswa{} #2\fi)}
872 \def\cite{\def\@cite##1##2{(##1\if@tempswa{}
873 ##2\fi)}\mlastyle@intcite}
874 \def\citeN{\def\@cite##1##2{##1\if@tempswa{}
875 ##2\fi}\mlastyle@intcite}
876 \def\citeM{\def\@cite##1##2{ (##1\if@tempswa{}
877 ##2\fi)}\mlastyle@intcite}
878 \def\citepage{\def\@cite##1##2{\if@tempswa(##2)\fi}\mlastyle@intcite}
879 \def\citepageM{\def\@cite##1##2{\if@tempswa{}
880 (##2)\fi}\mlastyle@intcite}
881 \def\citeindirect{\def\@cite##1##2%
882 {(qtd. in ##1\if@tempswa{} ##2\fi)}\mlastyle@intcite}
883 \def\citeindirectM{\def\@cite##1##2%
884 { (qtd. in ##1\if@tempswa{} ##2\fi)}\mlastyle@intcite}
885 \let\citeC\mlastyle@relax
890 % Place commas in-between citations in the same |\citeyear|, |\citeyearNP|,
891 % |\citeN|, or |\shortciteN| command.
892 % Use something like |\citeN{ref1,ref2,ref3}| and |\citeN{ref4}| for a list.
894 % \@citedata and \@citedatax:
896 % \@ifnextchar [{\@tempswatrue\@citedatax}%
897 % {\@tempswafalse\@citedatax[]}%
899 % \def\@citedatax[#1]#2{%
901 % \if@filesw\immediate\write\@auxout{\string\citation{#2}}\fi%
902 % \def\@citea{}\@cite{\@for\@citeb:=#2\do%
903 % {\@citea\def\@citea{; }\@ifundefined% by Young
904 % {b@\@citeb}{{\bf ?}%
905 % \@warning{Citation `\@citeb' on page \thepage \space undefined}}%
906 % {\csname b@\@citeb\endcsname}}}{#1}}%
908 % \begin{macro}{\@citex}
909 % This is the original |\@citex| from \LaTeX{} modified to use semicolons.
913 \@cite{\@for\@citeb:=#2\do
914 {\@citea\def\@citea{;\penalty-1\ }%
915 \edef\@citeb{\expandafter\@firstofone\@citeb\@empty}%
916 \if@filesw\immediate\write\@auxout{\string\citation{\@citeb}}\fi
917 \@ifundefined{b@\@citeb}{\mbox{\reset@font\bfseries ?}%
920 {Citation `\@citeb' on page \thepage \space undefined}}%
921 {{\csname b@\@citeb\endcsname}}}}{#1}}
924 % \begin{macro}{\@biblabel}
925 % No labels in the bibliography.
929 \let\mlastyle@intbib\thebibliography
930 \def\thebibliography#1{\mlastyle@intbib{#1}
931 \itemindent-\leftmargin\def\@biblabel##1{}}
934 % Title either the bibliography or the references ``Works Cited,''
935 % depending on the document class.
937 \@ifundefined{chapter}
938 {\renewcommand\refname{Works Cited}}
939 {\renewcommand\bibname{Works Cited}}
942 % ^^A% Define the command \workscited{bib}{style}{nocite}
943 % ^^A%\newcommand{\workscited}[3]{%
944 % ^^A% \ifx\chapter\@undefined%
945 % ^^A% \addcontentsline{toc}{chapter}{\bfseries\bibname}% report style
947 % ^^A% \addcontentsline{toc}{section}{\bfseries\refname}% article style
949 % ^^A% \bibliography{#1}\bibliographystyle{#2}\nocite{#3}}
951 % ^^A\newcommand{\annote}[1]{\begin{list}{}{%
952 % ^^A \setlength{\labelwidth}{0pt}
953 % ^^A \addtolength{\leftmargin}{\parindent}
954 % ^^A \setlength{\labelsep}{0pt}}%
955 % ^^A \item #1 \end{list}}
956 % \subsubsection{Plain Style}
957 % \begin{macro}{\citeC}
958 % This next block is used if the \Lopt{compat} or \Lopt{format} option is
962 \newcommand{\mlastyle@cite}[2][]{\@tempswafalse\@citex[]{#2}}
963 \let\cite\mlastyle@cite
964 \let\citepage\mlastyle@cite
965 \let\citeindirect\mlastyle@cite
966 \newcommand{\citeC}[2][]{~\@tempswafalse\@citex[]{#2}}
967 \let\citeM\mlastyle@relax
968 \let\citepageM\mlastyle@relax
969 \let\citeindirectM\mlastyle@relax