1 % \iffalse meta-comment
3 % Copyright (C) 2003 by Tim Pope <latex@rebelongto.us>
4 % ----------------------------------------------------
6 % This file may be distributed and/or modified under the
7 % conditions of the LaTeX Project Public License, either version 1.2
8 % of this license or (at your option) any later version.
9 % The latest version of this license is in:
11 % http://www.latex-project.org/lppl.txt
13 % and version 1.2 or later is part of all distributions of LaTeX
14 % version 1999/12/01 or later.
19 %<package>\NeedsTeXFormat{LaTeX2e}[1999/12/01]
20 %<package>\ProvidesPackage{mlastyle}
21 %<package> [2003/11/09 v0.9 MLA format and documentation style]
24 \begin{filecontents}{mlastyle.bib}
26 AUTHOR = "Joseph Gibaldi",
27 TITLE = "MLA Handbook for Writers of Research Papers",
35 AUTHOR = "Leslie Lamport",
36 TITLE = "\LaTeX: A Document Preparation System",
40 PUBLISHER = "Addison-Wesley",
44 AUTHOR = "Tobias Oetker and Hubert Partl and Irene Hyna and Elisabeth
46 TITLE = "The Not So Short Introduction to {\LaTeXe}",
51 ACCESSDATE = "1~"#nov#"~2003",
52 URL = "CTAN://info/lshort/"}
55 AUTHOR = "Oren Patashnik",
56 TITLE = "{\BibTeX ing}",
59 ACCESSDATE = "1~"#nov#"~2003",
60 URL = "CTAN://biblio/bibtex/distribs/doc/btxdoc.tex"}
62 \documentclass[draft]{ltxdoc}
64 \usepackage[mla]{mlastyle}
65 \bibliographystyle{mlastyle}
66 \addtolength{\marginparwidth}{1in}
67 \addtolength{\textwidth}{-1in}
68 \addtolength{\headwidth}{-1in}
70 \usepackage[compat]{mlastyle}
71 \bibliographystyle{plain}
72 \addtolength{\headsep}{-5pt}
73 %\addtolength{\headheight}{-12pt}
74 \addtolength{\topmargin}{-17pt}
75 \addtolength{\textheight}{22pt}
76 \IfFileExists{ulem.sty}{\usepackage[normalem]{ulem}}{\let\uline\emph}
78 \IfFileExists{times.sty}%
79 {\newcommand{\examp}[2][]{{\let\emph\uline\fontfamily{ptm}\selectfont##2}##1}}%
80 {\newcommand{\examp}[2][]{``##2##1''}}
87 \DocInput{mlastyle.dtx}
95 % {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
96 % 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
97 % Digits \0\1\2\3\4\5\6\7\8\9
98 % Exclamation \! Double quote \" Hash (number) \#
99 % Dollar \$ Percent \% Ampersand \&
100 % Acute accent \' Left paren \( Right paren \)
101 % Asterisk \* Plus \+ Comma \,
102 % Minus \- Point \. Solidus \/
103 % Colon \: Semicolon \; Less than \<
104 % Equals \= Greater than \> Question mark \?
105 % Commercial at \@ Left bracket \[ Backslash \\
106 % Right bracket \] Circumflex \^ Underscore \_
107 % Grave accent \` Left brace \{ Vertical bar \|
108 % Right brace \} Tilde \~}
111 % \changes{v0.9}{2003/11/09}{Converted to \texttt{dtx} file}
112 % \changes{v0.8}{2003/10/15}{Initial version}
114 % \GetFileInfo{mlastyle.sty}
118 % \DoNotIndex{\@afterindentfalse}
119 % \DoNotIndex{\@afterindenttrue}
120 % \DoNotIndex{\@arabic}
121 % \DoNotIndex{\@author}
122 % \DoNotIndex{\@auxout}
123 % \DoNotIndex{\@citea}
124 % \DoNotIndex{\@citeb}
125 % \DoNotIndex{\@date}
126 % \DoNotIndex{\@empty}
127 % \DoNotIndex{\@firstofone}
129 % \DoNotIndex{\@ifundefined}
130 % \DoNotIndex{\@latex@warning}
131 % \DoNotIndex{\@listI}
132 % \DoNotIndex{\@listi}
133 % \DoNotIndex{\@listii}
134 % \DoNotIndex{\@listiii}
135 % \DoNotIndex{\@listiv}
136 % \DoNotIndex{\@listv}
137 % \DoNotIndex{\@listvi}
138 % \DoNotIndex{\@startsection}
139 % \DoNotIndex{\@tempswafalse}
140 % \DoNotIndex{\@title}
141 % \DoNotIndex{\@undefined}
142 % \DoNotIndex{\DeclareOption}
143 % \DoNotIndex{\ExecuteOptions}
144 % \DoNotIndex{\G@refundefinedtrue}
145 % \DoNotIndex{\ProcessOptions}
146 % \DoNotIndex{\RequirePackage}
147 % \DoNotIndex{\UL@start,\UL@stop}
148 % \DoNotIndex{\addtolength}
149 % \DoNotIndex{\advance}
150 % \DoNotIndex{\baselineskip}
151 % \DoNotIndex{\begin}
152 % \DoNotIndex{\bfseries}
153 % \DoNotIndex{\c@enumiv}
154 % \DoNotIndex{\catcode}
155 % \DoNotIndex{\centering}
156 % \DoNotIndex{\centerline}
157 % \DoNotIndex{\chapter}
158 % \DoNotIndex{\citation}
159 % \DoNotIndex{\clearpage}
160 % \DoNotIndex{\csname}
165 % \DoNotIndex{\egroup}
168 % \DoNotIndex{\endcsname}
169 % \DoNotIndex{\endlist}
170 % \DoNotIndex{\exhyphenpenalty}
171 % \DoNotIndex{\expandafter}
172 % \DoNotIndex{\f@baselineskip}
173 % \DoNotIndex{\fancyhf}
174 % \DoNotIndex{\fancypagestyle}
176 % \DoNotIndex{\futurelet}
178 % \DoNotIndex{\hangindent}
179 % \DoNotIndex{\headrulewidth}
180 % \DoNotIndex{\if@filesw}
181 % \DoNotIndex{\if@tempswa}
182 % \DoNotIndex{\ifcase}
183 % \DoNotIndex{\ifmlastyle@bibstyle}
184 % \DoNotIndex{\ifmlastyle@format}
185 % \DoNotIndex{\ifmlastyle@papersize}
186 % \DoNotIndex{\ifmlastyle@style}
187 % \DoNotIndex{\ifmlastyle@times}
188 % \DoNotIndex{\ifmlastyle@underline}
190 % \DoNotIndex{\immediate}
192 % \DoNotIndex{\itemindent}
193 % \DoNotIndex{\itemsep}
194 % \DoNotIndex{\labelsep}
195 % \DoNotIndex{\labelwidth}
196 % \DoNotIndex{\leavevmode}
197 % \DoNotIndex{\leftmargin}
198 % \DoNotIndex{\leftmargini,\leftmarginii,\leftmarginiii}
199 % \DoNotIndex{\leftmarginiv,\leftmarginv,\leftmarginvi}
201 % \DoNotIndex{\linespread}
203 % \DoNotIndex{\listparindent}
204 % \DoNotIndex{\makeenmark}
206 % \DoNotIndex{\mlastyle@bibstylefalse}
207 % \DoNotIndex{\mlastyle@bibstyletrue}
208 % \DoNotIndex{\mlastyle@cite}
209 % \DoNotIndex{\mlastyle@course}
210 % \DoNotIndex{\mlastyle@formatfalse}
211 % \DoNotIndex{\mlastyle@formattrue}
212 % \DoNotIndex{\mlastyle@instructor}
213 % \DoNotIndex{\mlastyle@intbib}
214 % \DoNotIndex{\mlastyle@papersizefalse}
215 % \DoNotIndex{\mlastyle@papersizetrue}
216 % \DoNotIndex{\mlastyle@qspread}
217 % \DoNotIndex{\mlastyle@sl@sh}
218 % \DoNotIndex{\mlastyle@slash}
219 % \DoNotIndex{\mlastyle@slashnext}
220 % \DoNotIndex{\mlastyle@slashx}
221 % \DoNotIndex{\mlastyle@stylefalse}
222 % \DoNotIndex{\mlastyle@styletrue}
223 % \DoNotIndex{\mlastyle@surname}
224 % \DoNotIndex{\mlastyle@timesfalse}
225 % \DoNotIndex{\mlastyle@timestrue}
226 % \DoNotIndex{\mlastyle@underlinefalse}
227 % \DoNotIndex{\mlastyle@underlinetrue}
228 % \DoNotIndex{\month}
229 % \DoNotIndex{\newblock}
230 % \DoNotIndex{\newcommand}
231 % \DoNotIndex{\newenvironment}
232 % \DoNotIndex{\newif}
233 % \DoNotIndex{\newpage}
234 % \DoNotIndex{\noindent}
235 % \DoNotIndex{\normalsize}
236 % \DoNotIndex{\notesname}
237 % \DoNotIndex{\number}
240 % \DoNotIndex{\pagestyle}
242 % \DoNotIndex{\parindent}
243 % \DoNotIndex{\parsep}
244 % \DoNotIndex{\penalty}
245 % \DoNotIndex{\relax}
246 % \DoNotIndex{\renewcommand}
247 % \DoNotIndex{\renewenvironment}
248 % \DoNotIndex{\reset@font}
249 % \DoNotIndex{\rhead}
250 % \DoNotIndex{\selectfont}
251 % \DoNotIndex{\setlength}
252 % \DoNotIndex{\settowidth}
253 % \DoNotIndex{\sfcode}
255 % \DoNotIndex{\sloppy}
256 % \DoNotIndex{\space}
257 % \DoNotIndex{\string}
258 % \DoNotIndex{\sw@llow}
260 % \DoNotIndex{\thebibliography}
261 % \DoNotIndex{\thepage}
262 % \DoNotIndex{\topsep}
263 % \DoNotIndex{\usecounter}
264 % \DoNotIndex{\vskip}
265 % \DoNotIndex{\write}
268 % \DoNotIndex{\evensidemargin}
269 % \DoNotIndex{\headheight}
270 % \DoNotIndex{\headsep}
271 % \DoNotIndex{\hoffset}
272 % \DoNotIndex{\marginparwidth}
273 % \DoNotIndex{\oddsidemargin}
274 % \DoNotIndex{\raggedbottom}
275 % \DoNotIndex{\raggedright}
276 % \DoNotIndex{\textheight}
277 % \DoNotIndex{\textwidth}
278 % \DoNotIndex{\topmargin}
279 % \DoNotIndex{\voffset}
280 % \DoNotIndex{\paperheight}
281 % \DoNotIndex{\paperwidth}
282 % \DoNotIndex{\pdfpageheight}
283 % \DoNotIndex{\pdfpagewidth}
284 % \DoNotIndex{\special}
286 % \hyphenation{pre-am-ble wide-spread}
288 % \newcommand{\Lopt}[1]{\textsf {#1}}
289 % \newcommand{\file}[1]{\texttt {#1}}
290 % \newcommand{\package}[1]{\textsf {#1}}
291 % ^^A\newcommand{\Lcount}[1]{\textsl {\small#1}}
292 % ^^A\newcommand{\pstyle}[1]{\textsl {#1}}
294 % \newcommand{\OptionIndex}[1]{\index{#1\actualchar\Lopt{#1} (option)\encapchar usage}\index{options:\levelchar\Lopt{#1}}}
296 % \title{The \package{mlastyle} package\thanks{This document
297 % corresponds to \package{mlastyle}~\fileversion, dated \filedate.}}
298 % \author{Tim Pope \\ \texttt{latex@rebelongto.us}}
305 % \section{Introduction}
307 % ^^A MLA style, consisting of a set of documentation conventions, has
308 % ^^A gained widespread acceptance in the humanities.
309 % According to the {\em MLA Handbook for Writers of Research
310 % Papers}\citeC{handbook}, MLA style is a set of ``commonly agreed-on
311 % rules for documenting quotations, facts, opinions and paraphrases'' that
312 % ``is preferred by a substantial majority of scholarly journals in
313 % language and literature{\makeatletter\ifmlastyle@style
314 % .''\citeM[xvi]{handbook}\else.''\fi} \LaTeX{} is a
315 % document preparation system enjoying popularity in the scientific field.
316 % It should come as no surprise that complete, up-to-date implementations
317 % of MLA style for \LaTeX{} are in short supply. The \LaTeX{} package
318 % \package{mlastyle} aims to fill this void.
322 % A sample document follows.
324 %\documentclass[12pt]{article}
325 %\usepackage{mlastyle}
328 %\instructor{Professor Smith}
329 %\course{English 101}
331 %\title{The Sadism Inherent in Compulsory English Classes}
336 %\end{document}\end{verbatim}
337 % \subsection{Initialization Macros}
338 % The \index{heading|usage}mandatory heading is generated with
339 % \DescribeMacro{\maketitle}|\maketitle|. Use the standard macros
340 % |\author|, |\title|, and |\date| to specify the relevant information.
341 % To define the instructor and name of the course, use the aptly named
342 % \DescribeMacro{\instructor}|\instructor|\marg{instructor} and
343 % \DescribeMacro{\course}|\course|\marg{course} macros.
345 % The last name for use in the header\index{header|usage} is derived from
346 % |\author|. If this does not produce the desired result, use
347 % \DescribeMacro{\surname}|\surname|\marg{last name} to override it.
349 % MLA style recommends the DD~Mon.~YYYY format for specifying dates;
350 % \DescribeMacro{\today}|\today| has been conveniently redefined to this.
351 % However, other formats can be used as long as done so consistently
352 % throughout the document. Also note that the date in the
353 % heading\index{heading|usage} should be the due date of the assignment;
354 % students who finish assignments early would be wise to call
355 % |\date|\marg{due date}.
357 % \subsection{Environments}
358 % Three environments have been modified from standard \LaTeX to better
359 % suit MLA format. To typeset \index{poetry|usage}poetry and
360 % \index{drama|usage}drama, use the \DescribeEnv{verse}|verse|
361 % environment. Quotations\index{quotations|usage} of a single paragraph
362 % or less always use the \DescribeEnv{quote}|quote| environment. For
363 % longer passages, use the \DescribeEnv{quotation}|quotation| environment
364 % if the beginning of the passage marks the beginning of a paragraph.
365 % Otherwise, use the |quote| environment.
367 % Be sure to follow MLA guidelines when using these environments. Short
368 % quotes should be enclosed in quotation marks and included directly in
371 % \subsection{Modes of Operation}
372 % The \package{mlastyle} package has four basic modes of operations,
373 % selected with one of four mutually exclusive options. The
374 % \OptionIndex{format}\Lopt{format}
375 % option tells \package{mlastyle} to use MLA format (i.e., 1 inch margins,
376 % double-spaced, etc.). The \OptionIndex{style}\Lopt{style} option tells
377 % \package{mlastyle} to use MLA style (i.e., the format of parenthetical
378 % documentation, etc). Each of these options
379 % disables the other; to use both MLA format and MLA style, specify the
380 % \OptionIndex{mla}\Lopt{mla} option, or nothing at all.
382 % To disable both MLA style and MLA format, use the
383 % \OptionIndex{compat}\Lopt{compat} option. This differs from omitting
384 % the package entirely in that certain macros are still defined (e.g.,
385 % |\instructor|). Also, citations are handled a bit differently than in
386 % standard \LaTeX{} (see section~\ref{sec:documentation}).
388 % In addition to the above, several other options modify the behavior of
389 % \package{mlastyle}.
391 % \subsubsection{Italics vs.\ Underlining} \index{underlining|usage}
392 % \index{italics|usage}\label{sec:italics}
393 % The {\em MLA Handbook\/}\citeC{handbook} dictates that emphasis should
394 % be indicated by underlining the text\citeM[94]{handbook}. Thus, the
395 % \package{ulem} package, which underlines all emphasized
396 % text, is loaded by default in \Lopt{mla} and \Lopt{format} modes. To
397 % disable this, use the \OptionIndex{italics}\Lopt{italics} option.
398 % Conversely, if underlining is desired in \Lopt{style} or \Lopt{compat}
399 % mode, the \OptionIndex{underline}\Lopt{underline} option can be used.
401 % \subsubsection{Fonts}
402 % By default, \package{mlastyle} uses \TeX's standard Computer Modern
403 % font. Some profess\-ors\penalty500---particularly those
404 % concerned with document length---require assignments to be set in
405 % \examp[.]{Times New Roman} This can be achieved with the
406 % \OptionIndex{times}\Lopt{times} option, which simply loads the
407 % \package{times} package. This opposite of this option is
408 % \OptionIndex{cm}\Lopt{cm}, which reverts to Computer Modern.
410 % \index{works cited|usage}
411 % \subsection{Documenting Sources} \label{sec:documentation}
413 % The \package{mlastyle} package reimplements the
414 % \DescribeEnv{thebibliography}|thebibliography| environment to generate
415 % the list of works cited in MLA style. Instruction in the basic use of
416 % \LaTeX's bibliography features is beyond the scope of this document;
417 % however, the following example, which should be included just before
418 % |\end{document}|, might prove to be a useful starting point:
420 %\begin{thebibliography}{}
422 %\bibitem[Lamport]{latexdps}
424 %\newblock {\em \LaTeX: A Document Preparation System}.
426 %\newblock Reading: Addison-Wesley, 1994.
428 %\end{thebibliography}\end{verbatim}
429 % In this example, |Lamport| is the author's last name (for use in
430 % citations) and |latex| is the marker used to reference it (see
431 % section~\ref{sec:parenthetical}).
433 % For information on automatically generating the list of works cited with
434 % \BibTeX, see section~\ref{sec:bibtex}.
436 % \subsubsection{Parenthetical Documentation} \label{sec:parenthetical}
437 % A simple citation can by achieved with a call to
438 % \DescribeMacro{\cite}|\cite|\oarg{pages}\marg{marker}, where
439 % marker refers to the key given to either
440 % \index{BibTeX=\BibTeX|usage}\BibTeX{} or the |\bibitem| macro (|latex|
441 % in the above example).
442 % Omit \oarg{pages} if the source has no page numbers.
443 % Multiple sources can be cited using the syntax
444 % |\cite|\oarg{pages}|{|\meta{marker
445 % 1}\texttt{,}\penalty\exhyphenpenalty\meta{marker 2}\ldots|}|; however, page
446 % numbers can currently be specified only for the last referenced source.
447 % To work around this limitation, use |\citeN|, explained below.
449 % Three additional citation commands are provided, all of which take the
450 % same arguments as |\cite|. To omit the author information from the
451 % citation, use \DescribeMacro{\citepage}|\citepage|. Indirect
452 % citations---those of the format \examp{(qtd. in Pope
453 % \pageref{sec:italics})}---can be
454 % created with \DescribeMacro{\citeindirect}|\citeindirect|. Finally, the
455 % parentheses are omitted by \DescribeMacro{\citeN}|\citeN|. This was
456 % intended for use in cross references, but it can also help in citing
457 % multiple works. The result of
458 % |(\citeN[42]{texbook}|\texttt{; }|\citeN[69]{latexdps})|
459 % would be something like \examp[.]{(Knuth 42; Lamport 69)}
461 % \subsubsection{Using {\rm \BibTeX}} \label{sec:bibtex}
462 % Coupled with \index{BibTeX=\BibTeX|usage}\BibTeX,
463 % \package{mlastyle} provides a experimental implementation of MLA
464 % documentation style. Put\SpecialUsageIndex{\bibliographystyle}
465 % |\bibliographystyle{mlastyle}| in the document preamble to load the
466 % bibliography style. Alternatively, the
467 % \OptionIndex{bibstyle}\Lopt{bibstyle} option can handle this
468 % automatically, loading a bibliography style of |mlastyle| in \Lopt{mla}
469 % and \Lopt{style} modes and a bibliography style of |plain| in
470 % \Lopt{format} and \Lopt{compat} modes.
472 % Use of \BibTeX{} is also beyond the scope of this document; instead,
473 % another example is provided. To use it, substitute
474 % |\bibliography|\marg{filename} for the |thebibliography| environment.
475 % Then create \meta{filename}\file{.bib} with the contents below.
476 % Generating the document entails running \file{latex} on the \file{.tex}
477 % file, \file{bibtex} on the resulting \file{.aux} file, then \file{latex}
481 % AUTHOR = "Leslie Lamport",
482 % TITLE = "{\LaTeX}: A Document Preparation System",
484 % EDITION = "Second",
485 % ADDRESS = "Reading",
486 % PUBLISHER = "Addison-Wesley",
487 % YEAR = "1994"}\end{verbatim}
489 % In \package{mlastyle}, The |KEY| field serves the additional purpose of
490 % specifying an abbreviated title. This is unnecessary in the above
491 % example. If an additional book by Leslie Lamport was included, however,
492 % the |KEY| field would allow |\cite{latexdps}| to yield \examp{(Lamport,
493 % \emph{\LaTeX\/})} instead of \examp[.]{(Lamport, \emph{\LaTeX: A
494 % Doc\-um\-ent Pre\-pa\-ra\-tion Sys\-tem\/})}
496 % Note that only entries referenced by a citation are included in the list
497 % of works cited; to force the inclusion of an entry or all entries, use
498 % |\nocite|\marg{marker} and |\nocite{*}|, respectively.
500 % \StopEventually{\PrintChanges\bibliography{mlastyle}\PrintIndex}
502 % \section{Implementation}
507 % \subsection{Options}
508 % \begin{macro}{\ifmlastyle@*}
509 % \begin{macro}{\mlastyle@*true}
510 % \begin{macro}{\mlastyle@*false}
511 % Most options are implemented by modifying a |\newif| declared for that
514 \newif\ifmlastyle@bibstyle
515 \DeclareOption{bibstyle}{\mlastyle@bibstyletrue}
516 \DeclareOption{nobibstyle}{\mlastyle@bibstylefalse}
517 \newif\ifmlastyle@papersize
518 \DeclareOption{papersize}{\mlastyle@papersizetrue}
519 \DeclareOption{nopapersize}{\mlastyle@papersizefalse}
520 \newif\ifmlastyle@underline
521 \DeclareOption{underline}{\mlastyle@underlinetrue}
522 \DeclareOption{italics}{\mlastyle@underlinefalse}
523 \newif\ifmlastyle@times
524 \DeclareOption{times}{\mlastyle@timestrue}
525 \DeclareOption{cm}{\mlastyle@timesfalse}
526 \newif\ifmlastyle@style
527 \DeclareOption{compat}{\mlastyle@stylefalse
528 \mlastyle@formatfalse
529 \mlastyle@underlinefalse}
530 \DeclareOption{mla}{\mlastyle@styletrue
532 \mlastyle@underlinetrue}
533 \newif\ifmlastyle@format
534 \DeclareOption{format}{\mlastyle@stylefalse
536 \mlastyle@underlinetrue}
537 \DeclareOption{style}{\mlastyle@styletrue
538 \mlastyle@formatfalse
539 \mlastyle@underlinefalse}
540 \DeclareOption{singlespacequotes}{
541 \def\mlastyle@qspread{\linespread{1}\selectfont\vskip\baselineskip}}
542 \DeclareOption{doublespacequotes}{\let\mlastyle@qspread\relax}
543 \ExecuteOptions{nobibstyle,nopapersize,mla,cm,doublespacequotes}
549 % If the \Lopt{papersize} option is set, add the appropriate
550 % \textsc{PostScript} special, or adjust |\pdfpagewidth| and
551 % |\pdfpageheight| if pdf\LaTeX{} is in use.
553 \ifmlastyle@papersize
554 \ifx\@undefined\pdfpagewidth
555 \special{papersize=\the\paperwidth,\the\paperheight}
557 \setlength{\pdfpagewidth}{\paperwidth}
558 \setlength{\pdfpageheight}{\paperheight}
560 \fi % \ifmlastyle@papersize
562 % If the \Lopt{bibstyle} option is set, specify the bibliography style.
566 \bibliographystyle{mlastyle}
568 \bibliographystyle{plain}
570 \fi % \ifmlastyle@bibstyle
572 % \begin{macro}{\UL@onin}
573 % Load the \package{ulem} package if the \Lopt{underline} option is set.
574 % By default, \package{ulem} does multiple underlining for nested
575 % emphasis. This is changed to MLA-style behavior with the redefinition
578 \ifmlastyle@underline
579 \RequirePackage{ulem}
580 \def\UL@onin#1{\egroup\UL@stop#1\UL@start}
581 \fi % \ifmlastyle@underline
584 % Load the \package{times} package if the \Lopt{times} option is set.
587 \RequirePackage{times}
588 \fi % \ifmlastyle@times
590 % \subsection{Macros}
591 % \begin{macro}{\instructor}
592 % Define the instructor, along with an obsolete synonym.
594 \def\instructor#1{\gdef\mlastyle@instructor{#1}}
595 \let\professor\instructor
598 % \begin{macro}{\course}
599 % Define the course, along with an obsolete synonym.
601 \def\course#1{\gdef\mlastyle@course{#1}}
602 \let\classname\course
605 % \begin{macro}{\surname}
606 % Define the surname, along with an obsolete synonym.
608 \def\surname#1{\gdef\mlastyle@surname{#1}}
609 \def\mlastyle@surname{\def\sw@llow##1 {}\expandafter\sw@llow\@author}
610 \let\lastname\surname
613 % \subsection{Formatting}
614 % Formatting is done if the \Lopt{mla} or \Lopt{format} option is set.
618 % \subsubsection{Macros}
619 % \begin{macro}{\maketitle}
620 % |\maketitle| generates a heading in MLA format.
622 \renewcommand{\maketitle}{\begin{flushleft}
624 \@ifundefined{mlastyle@instructor}{}{\mlastyle@instructor}\par
625 \@ifundefined{mlastyle@course}{}{\mlastyle@course}\par
626 \@date\end{flushleft}
627 \begin{center}\@title\end{center}\par
631 % \begin{macro}{\today}
632 % |\today| is redefined to DD~Mon.~YYYY format.
634 \def\today{\number\day~\ifcase\month\or
635 Jan.\or Feb.\or Mar.\or Apr.\or May\or June\or July\or
636 Aug.\or Sept.\or Oct.\or Nov.\or Dec.\fi\ \number\year}
639 % \begin{macro}{\slash}
640 % No penalty for |\slash|, and plain /'s permit line breaks if necessary.
641 % ^^A\let\mlastyle@sl@sh=/
643 \def\slash{/\penalty\z@}
644 \def\mlastyle@slash{/\futurelet\mlastyle@slashnext\mlastyle@slashx}
645 \def\mlastyle@slashx{\ifx\mlastyle@slashnext/\else
646 \penalty\exhyphenpenalty\fi}
649 % \begin{macro}{\section}
650 % \begin{macro}{\subsection}
651 % \begin{macro}{\subsubsection}
652 % Sections are formatted by centering the section name and beginning a new
653 % page. Subsections simply center the section name.
655 \renewcommand{\section}{\clearpage\@startsection{section}{1}{\z@
656 }{0pt}{1sp}{\centering}}
657 \renewcommand{\subsection}{\@startsection{subsection}{2}{\z@
658 }{0pt}{1sp}{\centering}}
659 \renewcommand{\subsubsection}{\@startsection{subsubsection}{3}{\z@
660 }{0pt}{1sp}{\centering}}
662 % ^^A\let\mlastyle@vfont\verbatim@font
663 % ^^A\def\verbatim@font{\mlastyle@qspread\mlastyle@vfont}
667 % \subsubsection{Environments}
668 % ^^A%\newenvironment{blocks}{\begin{quote} \linespread{1} \selectfont}{\end{quote} \linespread{2} \small \selectfont}
669 % ^^A%\newenvironment{blockm}{\begin{quotation} \linespread{1} \selectfont}{\end{quotation} \linespread{2} \selectfont}
670 % \begin{environment}{verse}
671 % Indented 1 inch, with an additional .25 inch hanging indent.
673 \renewenvironment{verse}{\list{}{\mlastyle@qspread
674 \advance\leftmargin.75in\itemindent-.25in
675 \listparindent\itemindent}\item\relax}{\endlist}
678 % \begin{environment}{quotation}
679 % Indented 1 inch, with a paragraph indent of an additional .25 inches.
681 \renewenvironment{quotation}{\list{}{\mlastyle@qspread
682 \advance\leftmargin.5in\itemindent.25in
683 \listparindent\itemindent}\item\relax}{\endlist}
686 % \begin{environment}{quote}
687 % Identical to the |quotation| environment, except the first paragraph is not
690 \renewenvironment{quote}{\list{}{\mlastyle@qspread
691 \advance\leftmargin.5in
692 \listparindent.25in}\item\relax}{\endlist}
695 % \begin{environment}{workscited}
696 % Works cited environment, for compatibility with \package{mla-paper}.
698 \newenvironment{workscited}%
699 {\newpage{\centerline{Works Cited}}}{\newpage}
700 \newcommand{\bibent}{\noindent \hangindent .5in}
703 % \subsubsection{Margins}
704 % Top and bottom margins are 1 inch each. The header is flush with the
705 % right margin at .5 inches from the top of the page.
706 % ^^A\addtolength{\headheight}{-1pt}
707 % ^^A\setlength{\headheight}{1.4\headheight}% kludge
709 \addtolength{\voffset}{-0.5in}
710 \setlength{\textheight}{\paperheight}
711 \addtolength{\textheight}{-2in}
712 \setlength{\topmargin}{0in}
713 \setlength\headheight\f@baselineskip
714 \setlength{\headsep}{0.5in}
715 \addtolength{\headsep}{-\headheight}
716 \setlength{\footskip}{0.25in}
719 % Left and right margins in MLA format are each 1 inch wide.
721 \addtolength{\hoffset}{-0.5in}
722 \setlength{\textwidth}{\paperwidth}
723 \addtolength{\textwidth}{-2in}
724 \setlength{\oddsidemargin}{0.5in}
725 \setlength{\evensidemargin}{0.5in}
726 \setlength{\marginparwidth}{0.5in}
728 % \subsubsection{Paragraphs}
729 % Paragraphs should be left justified, with the first line indented .5
733 \setlength{\parindent}{.5in}
735 % MLA format specifies that all paragraphs should be indented, even those
736 % beginning a new section. This snippet from \package{indentfirst} changes
737 % \LaTeX{} to meet that requirement.
739 \let\@afterindentfalse\@afterindenttrue
742 % Double space {\em everywhere}.
743 % ^^A\RequirePackage{doublespace}
746 \leftmargini\parindent
747 \def\@listi{\leftmargin\leftmargini
748 \parsep\z@\itemsep\z@\topsep -3\p@\relax}
751 \def\@listii{\leftmargin\leftmarginii
752 \parsep\z@\itemsep\z@\topsep -3\p@\relax}
753 \def\@listiii{\leftmargin\leftmarginiii
754 \parsep\z@\itemsep\z@\topsep -3\p@\relax}
755 \def\@listiv{\leftmargin\leftmarginiv
756 \parsep\z@\itemsep\z@\topsep -3\p@\relax}
757 \def\@listv{\leftmargin\leftmarginv
758 \parsep\z@\itemsep\z@\topsep -3\p@\relax}
759 \def\@listvi{\leftmargin\leftmarginvi
760 \parsep\z@\itemsep\z@\topsep -3\p@\relax}
762 % \subsubsection{Header}
763 % The last name and page number appear on every page, including the first.
765 \RequirePackage{fancyhdr}
766 \fancypagestyle{plain}{\fancyhf{}}
767 \fancypagestyle{mlastyle}{
769 \rhead{\mlastyle@surname{} \thepage}
770 \renewcommand{\headrulewidth}{0pt}
771 \renewcommand{\footrulewidth}{0pt}}
774 % \subsubsection{Notes}
775 % Footnotes should be indented .5 inches; however .56 inches is used
776 % in a crude attempt to compensate for
777 % the alignment provided by the \package{footmisc} package. Endnotes are
778 % preferred in MLA style anyway, so this should not be a problem in most
781 \RequirePackage[ragged,norule]{footmisc}
782 \def\footnotelayout{\linespread{1}\footnotesize\raggedright{} }
783 \footnotemargin .56in
784 \skip\footins=2\baselineskip
785 \footnotesep 1.2\footnotesep
786 \addtolength\footnotesep{\baselineskip}
787 \def\footnotesize{\normalsize}
789 % ^^A\let\footnoterule\relax
790 % Endnotes are supported, but only if the \package{endnotes} package is
791 % loaded {\em before\/} this package.
793 \ifx\@undefined\endnote\else
794 \def\enoteheading{\newpage\section*{\notesname}}
795 \def\enoteformat{\leavevmode\makeenmark{} }
796 \def\enotesize{\normalsize}
799 % \subsubsection{Bibliography}
800 % \begin{environment}{thebibliography}
801 % The definition of |\thebibliography| varies depending on the document
804 \@ifundefined{chapter}
808 { \def\thebibliography#1{\newpage\section*{\refname}
809 \list{\@biblabel{\@arabic\c@enumiv}}%
810 {\settowidth\labelwidth{\@biblabel{#1}}}
811 \leftmargin\labelwidth
812 \advance\leftmargin\labelsep
813 \itemindent-\leftmargin
816 %\catcode`\/=13\global\let/=\mlastyle@slash
817 \sloppy%\sfcode`\.=\@m
822 { \def\thebibliography#1{\chapter*{\bibname}
823 \list{\@biblabel{\@arabic\c@enumiv}}%
824 {\settowidth\labelwidth{\@biblabel{#1}}}
825 \leftmargin\labelwidth
826 \advance\leftmargin\labelsep
827 \itemindent-\leftmargin
830 %\catcode`/=13\let/=\mlastyle@slash
831 \sloppy%\sfcode`\.=\@m
836 \fi % \ifmlastyle@format
839 % \begin{macro}{\cite}
840 % \begin{macro}{\citeN}
841 % ^^A\begin{macro}{\citepage}
842 % ^^A\begin{macro}{\citequote}
843 % The following macros, combined with \file{mlastyle.bst}, provide
844 % for a bibliography in MLA style. Note that the definition of |\cite|,
845 % |\citeN|, etc.\ vary depending on the options passed to
846 % \package{mlastyle}.
848 % \begin{macro}{\mlastyle@intcite}
849 % The original |\cite| is stored
850 % in |\mlastyle@intcite|.
852 \let\mlastyle@intcite\cite
855 % \begin{macro}{\mlastyle@relax}
856 % This macro does nothing. Depending on the options, either |\citeC| or
857 % |\citeM| and its ilk will utilize it.
859 \newcommand{\mlastyle@relax}[2][]{}
862 % \subsubsection{MLA Style}
863 % \begin{macro}{\@cite}
864 % \begin{macro}{\citeM}
865 % If the \Lopt{mla} or \Lopt{style} options are used, the following is
869 \def\@cite#1#2{(#1\if@tempswa{} #2\fi)}
870 \def\cite{\def\@cite##1##2{(##1\if@tempswa{}
871 ##2\fi)}\mlastyle@intcite}
872 \def\citeN{\def\@cite##1##2{##1\if@tempswa{}
873 ##2\fi}\mlastyle@intcite}
874 \def\citeM{\def\@cite##1##2{ (##1\if@tempswa{}
875 ##2\fi)}\mlastyle@intcite}
876 \def\citepage{\def\@cite##1##2{\if@tempswa(##2)\fi}\mlastyle@intcite}
877 \def\citepageM{\def\@cite##1##2{\if@tempswa{}
878 (##2)\fi}\mlastyle@intcite}
879 \def\citeindirect{\def\@cite##1##2%
880 {(qtd. in ##1\if@tempswa{} ##2\fi)}\mlastyle@intcite}
881 \def\citeindirectM{\def\@cite##1##2%
882 { (qtd. in ##1\if@tempswa{} ##2\fi)}\mlastyle@intcite}
883 \let\citeC\mlastyle@relax
888 % Place commas in-between citations in the same |\citeyear|, |\citeyearNP|,
889 % |\citeN|, or |\shortciteN| command.
890 % Use something like |\citeN{ref1,ref2,ref3}| and |\citeN{ref4}| for a list.
892 % \@citedata and \@citedatax:
894 % \@ifnextchar [{\@tempswatrue\@citedatax}%
895 % {\@tempswafalse\@citedatax[]}%
897 % \def\@citedatax[#1]#2{%
899 % \if@filesw\immediate\write\@auxout{\string\citation{#2}}\fi%
900 % \def\@citea{}\@cite{\@for\@citeb:=#2\do%
901 % {\@citea\def\@citea{; }\@ifundefined% by Young
902 % {b@\@citeb}{{\bf ?}%
903 % \@warning{Citation `\@citeb' on page \thepage \space undefined}}%
904 % {\csname b@\@citeb\endcsname}}}{#1}}%
906 % \begin{macro}{\@citex}
907 % This is the original |\@citex| from \LaTeX{} modified to use semicolons.
911 \@cite{\@for\@citeb:=#2\do
912 {\@citea\def\@citea{;\penalty-1\ }%
913 \edef\@citeb{\expandafter\@firstofone\@citeb\@empty}%
914 \if@filesw\immediate\write\@auxout{\string\citation{\@citeb}}\fi
915 \@ifundefined{b@\@citeb}{\mbox{\reset@font\bfseries ?}%
918 {Citation `\@citeb' on page \thepage \space undefined}}%
919 {{\csname b@\@citeb\endcsname}}}}{#1}}
922 % \begin{macro}{\@biblabel}
923 % No labels in the bibliography.
927 \let\mlastyle@intbib\thebibliography
928 \def\thebibliography#1{\mlastyle@intbib{#1}
929 \itemindent-\leftmargin\def\@biblabel##1{}}
932 % Title either the bibliography or the references ``Works Cited,''
933 % depending on the document class.
935 \@ifundefined{chapter}
936 {\renewcommand\refname{Works Cited}}
937 {\renewcommand\bibname{Works Cited}}
940 % ^^A% Define the command \workscited{bib}{style}{nocite}
941 % ^^A%\newcommand{\workscited}[3]{%
942 % ^^A% \ifx\chapter\@undefined%
943 % ^^A% \addcontentsline{toc}{chapter}{\bfseries\bibname}% report style
945 % ^^A% \addcontentsline{toc}{section}{\bfseries\refname}% article style
947 % ^^A% \bibliography{#1}\bibliographystyle{#2}\nocite{#3}}
949 % ^^A\newcommand{\annote}[1]{\begin{list}{}{%
950 % ^^A \setlength{\labelwidth}{0pt}
951 % ^^A \addtolength{\leftmargin}{\parindent}
952 % ^^A \setlength{\labelsep}{0pt}}%
953 % ^^A \item #1 \end{list}}
954 % \subsubsection{Plain Style}
955 % \begin{macro}{\citeC}
956 % This next block is used if the \Lopt{compat} or \Lopt{format} option is
960 \newcommand{\mlastyle@cite}[2][]{\@tempswafalse\@citex[]{#2}}
961 \let\cite\mlastyle@cite
962 \let\citepage\mlastyle@cite
963 \let\citeindirect\mlastyle@cite
964 \newcommand{\citeC}[2][]{~\@tempswafalse\@citex[]{#2}}
965 \let\citeM\mlastyle@relax
966 \let\citepageM\mlastyle@relax
967 \let\citeindirectM\mlastyle@relax