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{\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 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}
141 % \DoNotIndex{\@startsection}
142 % \DoNotIndex{\@tempswafalse}
143 % \DoNotIndex{\@title}
144 % \DoNotIndex{\@undefined}
145 % \DoNotIndex{\DeclareOption}
146 % \DoNotIndex{\ExecuteOptions}
147 % \DoNotIndex{\G@refundefinedtrue}
148 % \DoNotIndex{\ProcessOptions}
149 % \DoNotIndex{\RequirePackage}
150 % \DoNotIndex{\UL@start,\UL@stop}
151 % \DoNotIndex{\addtolength}
152 % \DoNotIndex{\advance}
153 % \DoNotIndex{\baselineskip}
154 % \DoNotIndex{\begin}
155 % \DoNotIndex{\bfseries}
156 % \DoNotIndex{\c@enumiv}
157 % \DoNotIndex{\catcode}
158 % \DoNotIndex{\centering}
159 % \DoNotIndex{\centerline}
160 % \DoNotIndex{\chapter}
161 % \DoNotIndex{\citation}
162 % \DoNotIndex{\citet,\citep}
163 % \DoNotIndex{\clearpage}
164 % \DoNotIndex{\csname}
169 % \DoNotIndex{\egroup}
172 % \DoNotIndex{\endcsname}
173 % \DoNotIndex{\endlist}
174 % \DoNotIndex{\exhyphenpenalty}
175 % \DoNotIndex{\expandafter}
176 % \DoNotIndex{\f@baselineskip}
177 % \DoNotIndex{\fancyhf}
178 % \DoNotIndex{\fancypagestyle}
180 % \DoNotIndex{\futurelet}
182 % \DoNotIndex{\global}
183 % \DoNotIndex{\hangindent}
184 % \DoNotIndex{\headrulewidth}
185 % \DoNotIndex{\if@filesw}
186 % \DoNotIndex{\if@tempswa}
187 % \DoNotIndex{\ifcase}
188 % \DoNotIndex{\ifmlastyle@bibstyle}
189 % \DoNotIndex{\ifmlastyle@format}
190 % \DoNotIndex{\ifmlastyle@papersize}
191 % \DoNotIndex{\ifmlastyle@style}
192 % \DoNotIndex{\ifmlastyle@times}
193 % \DoNotIndex{\ifmlastyle@underline}
195 % \DoNotIndex{\immediate}
197 % \DoNotIndex{\itemindent}
198 % \DoNotIndex{\itemsep}
199 % \DoNotIndex{\labelsep}
200 % \DoNotIndex{\labelwidth}
201 % \DoNotIndex{\leavevmode}
202 % \DoNotIndex{\leftmargin}
203 % \DoNotIndex{\leftmargini,\leftmarginii,\leftmarginiii}
204 % \DoNotIndex{\leftmarginiv,\leftmarginv,\leftmarginvi}
206 % \DoNotIndex{\linespread}
208 % \DoNotIndex{\listparindent}
209 % \DoNotIndex{\makeenmark}
211 % \DoNotIndex{\mlastyle@bibstylefalse}
212 % \DoNotIndex{\mlastyle@bibstyletrue}
213 % \DoNotIndex{\mlastyle@cite}
214 % \DoNotIndex{\mlastyle@course}
215 % \DoNotIndex{\mlastyle@formatfalse}
216 % \DoNotIndex{\mlastyle@formattrue}
217 % \DoNotIndex{\mlastyle@instructor}
218 % \DoNotIndex{\mlastyle@intbib}
219 % \DoNotIndex{\mlastyle@papersizefalse}
220 % \DoNotIndex{\mlastyle@papersizetrue}
221 % \DoNotIndex{\mlastyle@qspread}
222 % \DoNotIndex{\mlastyle@sl@sh}
223 % \DoNotIndex{\mlastyle@slash}
224 % \DoNotIndex{\mlastyle@slashnext}
225 % \DoNotIndex{\mlastyle@slashx}
226 % \DoNotIndex{\mlastyle@stylefalse}
227 % \DoNotIndex{\mlastyle@styletrue}
228 % \DoNotIndex{\mlastyle@surname}
229 % \DoNotIndex{\mlastyle@timesfalse}
230 % \DoNotIndex{\mlastyle@timestrue}
231 % \DoNotIndex{\mlastyle@underlinefalse}
232 % \DoNotIndex{\mlastyle@underlinetrue}
233 % \DoNotIndex{\month}
234 % \DoNotIndex{\newblock}
235 % \DoNotIndex{\newcommand}
236 % \DoNotIndex{\newdimen}
237 % \DoNotIndex{\newenvironment}
238 % \DoNotIndex{\newif}
239 % \DoNotIndex{\newpage}
240 % \DoNotIndex{\noindent}
241 % \DoNotIndex{\normalsize}
242 % \DoNotIndex{\notesname}
243 % \DoNotIndex{\number}
246 % \DoNotIndex{\pagestyle}
248 % \DoNotIndex{\parindent}
249 % \DoNotIndex{\parsep}
250 % \DoNotIndex{\penalty}
251 % \DoNotIndex{\relax}
252 % \DoNotIndex{\renewcommand}
253 % \DoNotIndex{\renewenvironment}
254 % \DoNotIndex{\reset@font}
255 % \DoNotIndex{\rhead}
256 % \DoNotIndex{\selectfont}
257 % \DoNotIndex{\setlength}
258 % \DoNotIndex{\settowidth}
259 % \DoNotIndex{\sfcode}
261 % \DoNotIndex{\sloppy}
262 % \DoNotIndex{\space}
263 % \DoNotIndex{\string}
264 % \DoNotIndex{\sw@llow}
266 % \DoNotIndex{\thebibliography}
267 % \DoNotIndex{\thepage}
268 % \DoNotIndex{\topsep}
269 % \DoNotIndex{\usecounter}
270 % \DoNotIndex{\vskip}
271 % \DoNotIndex{\write}
274 % \DoNotIndex{\bibhang}
275 % \DoNotIndex{\evensidemargin}
276 % \DoNotIndex{\headheight}
277 % \DoNotIndex{\headsep}
278 % \DoNotIndex{\hoffset}
279 % \DoNotIndex{\marginparwidth}
280 % \DoNotIndex{\oddsidemargin}
281 % \DoNotIndex{\raggedbottom}
282 % \DoNotIndex{\raggedright}
283 % \DoNotIndex{\textheight}
284 % \DoNotIndex{\textwidth}
285 % \DoNotIndex{\topmargin}
286 % \DoNotIndex{\voffset}
287 % \DoNotIndex{\paperheight}
288 % \DoNotIndex{\paperwidth}
289 % \DoNotIndex{\pdfpageheight}
290 % \DoNotIndex{\pdfpagewidth}
291 % \DoNotIndex{\special}
293 % \hyphenation{pre-am-ble wide-spread}
295 % \newcommand{\Lopt}[1]{\textsf {#1}}
296 % \newcommand{\file}[1]{\texttt {#1}}
297 % \newcommand{\package}[1]{\textsf {#1}}
298 % ^^A\newcommand{\Lcount}[1]{\textsl {\small#1}}
299 % ^^A\newcommand{\pstyle}[1]{\textsl {#1}}
301 % \newcommand{\OptionIndex}[1]{\index{#1\actualchar\Lopt{#1} (option)\encapchar usage}\index{options:\levelchar\Lopt{#1}}}
303 % \title{The \package{mlastyle} package\thanks{This document
304 % corresponds to \package{mlastyle}~\fileversion, dated \filedate.}}
305 % \author{Tim Pope \\ \texttt{latex@rebelongto.us}}
312 % \section{Introduction}
314 % ^^A MLA style, consisting of a set of documentation conventions, has
315 % ^^A gained widespread acceptance in the humanities.
316 % According to the {\em MLA Handbook for Writers of Research
317 % Papers}\citeC{handbook}, MLA style is a set of ``commonly agreed-on
318 % rules for documenting quotations, facts, opinions and paraphrases'' that
319 % ``is preferred by a substantial majority of scholarly journals in
320 % language and literature{\makeatletter\ifmlastyle@style
321 % .''\citeM[xvi]{handbook}\else.''\fi} \LaTeX{} is a
322 % document preparation system enjoying popularity in the scientific field.
323 % It should come as no surprise that complete, up-to-date implementations
324 % of MLA style for \LaTeX{} are in short supply. The \LaTeX{} package
325 % \package{mlastyle} aims to fill this void.
329 % A sample document follows.
331 %\documentclass[12pt]{article}
332 %\usepackage{mlastyle}
335 %\instructor{Professor Smith}
336 %\course{English 101}
338 %\title{The Sadism Inherent in Compulsory English Classes}
343 %\end{document}\end{verbatim}
344 % \subsection{Initialization Macros}
345 % The \index{heading|usage}mandatory heading is generated with
346 % \DescribeMacro{\maketitle}|\maketitle|. Use the standard macros
347 % |\author|, |\title|, and |\date| to specify the relevant information.
348 % To define the instructor and name of the course, use the aptly named
349 % \DescribeMacro{\instructor}|\instructor|\marg{instructor} and
350 % \DescribeMacro{\course}|\course|\marg{course} macros.
352 % The last name for use in the header\index{header|usage} is derived from
353 % |\author|. If this does not produce the desired result, use
354 % \DescribeMacro{\surname}|\surname|\marg{last name} to override it.
356 % MLA style recommends the DD~Mon.~YYYY format for specifying dates;
357 % \DescribeMacro{\today}|\today| has been conveniently redefined to this.
358 % However, other formats can be used as long as done so consistently
359 % throughout the document. Also note that the date in the
360 % heading\index{heading|usage} should be the due date of the assignment;
361 % students who finish assignments early would be wise to call
362 % |\date|\marg{due date}.
364 % \subsection{Environments}
365 % Three environments have been modified from standard \LaTeX to better
366 % suit MLA format. To typeset \index{poetry|usage}poetry and
367 % \index{drama|usage}drama, use the \DescribeEnv{verse}|verse|
368 % environment. Quotations\index{quotations|usage} of a single paragraph
369 % or less always use the \DescribeEnv{quote}|quote| environment. For
370 % longer passages, use the \DescribeEnv{quotation}|quotation| environment
371 % if the beginning of the passage marks the beginning of a paragraph.
372 % Otherwise, use the |quote| environment.
374 % Be sure to follow MLA guidelines when using these environments. Short
375 % quotes should be enclosed in quotation marks and included directly in
378 % \subsection{Modes of Operation}
379 % The \package{mlastyle} package has four basic modes of operations,
380 % selected with one of four mutually exclusive options. The
381 % \OptionIndex{format}\Lopt{format}
382 % option tells \package{mlastyle} to use MLA format (i.e., 1 inch margins,
383 % double-spaced, etc.). The \OptionIndex{style}\Lopt{style} option tells
384 % \package{mlastyle} to use MLA style (i.e., the format of parenthetical
385 % documentation, etc). Each of these options
386 % disables the other; to use both MLA format and MLA style, specify the
387 % \OptionIndex{mla}\Lopt{mla} option, or nothing at all.
389 % To disable both MLA style and MLA format, use the
390 % \OptionIndex{compat}\Lopt{compat} option. This differs from omitting
391 % the package entirely in that certain macros are still defined (e.g.,
392 % |\instructor|). Also, citations are handled a bit differently than in
393 % standard \LaTeX{} (see section~\ref{sec:documentation}).
395 % In addition to the above, several other options modify the behavior of
396 % \package{mlastyle}.
398 % \subsubsection{Italics vs.\ Underlining} \index{underlining|usage}
399 % \index{italics|usage}\label{sec:italics}
400 % The {\em MLA Handbook\/}\citeC{handbook} dictates that emphasis should
401 % be indicated by underlining the text\citeM[94]{handbook}. Thus, the
402 % \package{ulem} package, which underlines all emphasized
403 % text, is loaded by default in \Lopt{mla} and \Lopt{format} modes. To
404 % disable this, use the \OptionIndex{italics}\Lopt{italics} option.
405 % Conversely, if underlining is desired in \Lopt{style} or \Lopt{compat}
406 % mode, the \OptionIndex{underline}\Lopt{underline} option can be used.
408 % \subsubsection{Fonts}
409 % By default, \package{mlastyle} uses \TeX's standard Computer Modern
410 % font. Some profess\-ors\penalty500---particularly those
411 % concerned with document length---require assignments to be set in
412 % \examp[.]{Times New Roman} This can be achieved with the
413 % \OptionIndex{times}\Lopt{times} option, which simply loads the
414 % \package{times} package. This opposite of this option is
415 % \OptionIndex{cm}\Lopt{cm}, which reverts to Computer Modern.
417 % \index{works cited|usage}
418 % \subsection{Documenting Sources} \label{sec:documentation}
420 % The \package{mlastyle} package reimplements the
421 % \DescribeEnv{thebibliography}|thebibliography| environment to generate
422 % the list of works cited in MLA style. Instruction in the basic use of
423 % \LaTeX's bibliography features is beyond the scope of this document;
424 % however, the following example, which should be included just before
425 % |\end{document}|, might prove to be a useful starting point:
427 %\begin{thebibliography}{}
429 %\bibitem[Lamport]{latexdps}
431 %\newblock \emph{\LaTeX: A Document Preparation System}.
433 %\newblock Reading: Addison-Wesley, 1994.
435 %\end{thebibliography}\end{verbatim}
436 % In this example, |Lamport| is the author's last name (for use in
437 % citations) and |latexdps| is the marker used to reference it (see
438 % section~\ref{sec:parenthetical}).
440 % For information on automatically generating the list of works cited with
441 % \BibTeX, see section~\ref{sec:bibtex}.
443 % \subsubsection{Parenthetical Documentation} \label{sec:parenthetical}
444 % A simple citation can by achieved with a call to
445 % \DescribeMacro{\cite}|\cite|\oarg{pages}\marg{marker}, where
446 % marker refers to the key given to either
447 % \index{BibTeX=\BibTeX|usage}\BibTeX{} or the |\bibitem| macro (|latex|
448 % in the above example).
449 % Omit \oarg{pages} if the source has no page numbers.
450 % Multiple sources can be cited using the syntax
451 % |\cite|\oarg{pages}|{|\meta{marker
452 % 1}\texttt{,}\penalty\exhyphenpenalty\meta{marker 2}\ldots|}|; however, page
453 % numbers can currently be specified only for the last referenced source.
454 % To work around this limitation, use |\citealt|, explained below.
456 % Three additional citation commands are provided, all of which take the
457 % same arguments as |\cite|. To omit the author information from the
458 % citation, use \DescribeMacro{\citepage}|\citepage|. Indirect
459 % citations---those of the format \examp{(qtd. in Pope
460 % \pageref{sec:italics})}---can be
461 % created with \DescribeMacro{\citeindirect}|\citeindirect|. Finally, the
462 % parentheses are omitted by \DescribeMacro{\citealt}|\citealt|. This was
463 % intended for use in cross references, but it can also help in citing
464 % multiple works. The result of
465 % |(\citealt[42]{texbook}|\texttt{; }|\citealt[69]{latexdps})|
466 % would be something like \examp[.]{(Knuth 42; Lamport 69)}
468 % \subsubsection{Using {\rm \BibTeX}} \label{sec:bibtex}
469 % Coupled with \index{BibTeX=\BibTeX|usage}\BibTeX,
470 % \package{mlastyle} provides a experimental implementation of MLA
471 % documentation style. Put\SpecialUsageIndex{\bibliographystyle}
472 % |\bibliographystyle{mlastyle}| in the document preamble to load the
473 % bibliography style. Alternatively, the
474 % \OptionIndex{bibstyle}\Lopt{bibstyle} option can handle this
475 % automatically, loading a bibliography style of |mlastyle| in \Lopt{mla}
476 % and \Lopt{style} modes and a bibliography style of |plain| in
477 % \Lopt{format} and \Lopt{compat} modes.
479 % Use of \BibTeX{} is also beyond the scope of this document; consult
480 % Patashnik\citeC{btxdoc} for an introduction.
481 % Briefly, to use the following example, substitute
482 % |\bibliography|\marg{filename} for the |thebibliography| environment.
483 % Then create \meta{filename}\file{.bib} with the contents below.
484 % Generating the document entails running \file{latex} on the \file{.tex}
485 % file, \file{bibtex} on the resulting \file{.aux} file, then \file{latex}
489 % AUTHOR = "Leslie Lamport",
490 % TITLE = "{\LaTeX}: A Document Preparation System",
492 % EDITION = "Second",
493 % ADDRESS = "Reading",
494 % PUBLISHER = "Addison-Wesley",
495 % YEAR = "1994"}\end{verbatim}
497 % In \package{mlastyle}, The |KEY| field serves the additional purpose of
498 % specifying an abbreviated title. This is unnecessary in the above
499 % example. If an additional book by Leslie Lamport was included, however,
500 % the |KEY| field would allow |\cite{latexdps}| to yield \examp{(Lamport,
501 % \emph{\LaTeX\/})} instead of \examp[.]{(Lamport, \emph{\LaTeX: A
502 % Doc\-um\-ent Pre\-pa\-ra\-tion Sys\-tem\/})}
504 % Note that only entries referenced by a citation are included in the list
505 % of works cited; to force the inclusion of an entry or all entries, use
506 % |\nocite|\marg{marker} and |\nocite{*}|, respectively.
508 % \StopEventually{\PrintChanges\bibliography{mlastyle}\PrintIndex}
510 % \section{Implementation}
515 % \subsection{Options}
516 % \begin{macro}{\ifmlastyle@*}
517 % \begin{macro}{\mlastyle@*true}
518 % \begin{macro}{\mlastyle@*false}
519 % Most options are implemented by modifying a |\newif| declared for that
522 \newif\ifmlastyle@bibstyle
523 \DeclareOption{bibstyle}{\mlastyle@bibstyletrue}
524 \DeclareOption{nobibstyle}{\mlastyle@bibstylefalse}
525 \newif\ifmlastyle@papersize
526 \DeclareOption{papersize}{\mlastyle@papersizetrue}
527 \DeclareOption{nopapersize}{\mlastyle@papersizefalse}
528 \newif\ifmlastyle@underline
529 \DeclareOption{underline}{\mlastyle@underlinetrue}
530 \DeclareOption{italics}{\mlastyle@underlinefalse}
531 \newif\ifmlastyle@times
532 \DeclareOption{times}{\mlastyle@timestrue}
533 \DeclareOption{cm}{\mlastyle@timesfalse}
534 \newif\ifmlastyle@style
535 \DeclareOption{compat}{\mlastyle@stylefalse
536 \mlastyle@formatfalse
537 \mlastyle@underlinefalse}
538 \DeclareOption{mla}{\mlastyle@styletrue
540 \mlastyle@underlinetrue}
541 \newif\ifmlastyle@format
542 \DeclareOption{format}{\mlastyle@stylefalse
544 \mlastyle@underlinetrue}
545 \DeclareOption{style}{\mlastyle@styletrue
546 \mlastyle@formatfalse
547 \mlastyle@underlinefalse}
548 \DeclareOption{singlespacequotes}{
549 \def\mlastyle@qspread{\linespread{1}\selectfont\vskip\baselineskip}}
550 \DeclareOption{doublespacequotes}{\let\mlastyle@qspread\relax}
551 \ExecuteOptions{nobibstyle,nopapersize,mla,cm,doublespacequotes}
557 % If the \Lopt{papersize} option is set, add the appropriate
558 % \textsc{PostScript} special, or adjust |\pdfpagewidth| and
559 % |\pdfpageheight| if pdf\LaTeX{} is in use.
561 \ifmlastyle@papersize
562 \ifx\@undefined\pdfpagewidth
563 \special{papersize=\the\paperwidth,\the\paperheight}
565 \setlength{\pdfpagewidth}{\paperwidth}
566 \setlength{\pdfpageheight}{\paperheight}
568 \fi % \ifmlastyle@papersize
570 % If the \Lopt{bibstyle} option is set, specify the bibliography style.
574 \bibliographystyle{mlastyle}
576 \bibliographystyle{plain}
578 \fi % \ifmlastyle@bibstyle
580 % \begin{macro}{\UL@onin}
581 % Load the \package{ulem} package if the \Lopt{underline} option is set.
582 % By default, \package{ulem} does multiple underlining for nested
583 % emphasis. This is changed to MLA-style behavior with the redefinition
586 \ifmlastyle@underline
587 \RequirePackage{ulem}
588 \def\UL@onin#1{\egroup\UL@stop#1\UL@start}
589 \fi % \ifmlastyle@underline
592 % Load the \package{times} package if the \Lopt{times} option is set.
595 \RequirePackage{times}
596 \fi % \ifmlastyle@times
598 % \subsection{Macros}
599 % \begin{macro}{\instructor}
600 % Define the instructor, along with an obsolete synonym.
602 \def\instructor#1{\gdef\mlastyle@instructor{#1}}
603 \let\professor\instructor
606 % \begin{macro}{\course}
607 % Define the course, along with an obsolete synonym.
609 \def\course#1{\gdef\mlastyle@course{#1}}
610 \let\classname\course
613 % \begin{macro}{\surname}
614 % Define the surname, along with an obsolete synonym.
616 \def\surname#1{\gdef\mlastyle@surname{#1}}
617 \def\mlastyle@surname{\def\sw@llow##1 {}\expandafter\sw@llow\@author}
618 \let\lastname\surname
621 % \subsection{Formatting}
622 % Formatting is done if the \Lopt{mla} or \Lopt{format} option is set.
623 % \begin{macro}{\mlastyle@i}
625 \newdimen\mlastyle@i \mlastyle@i=.5in
631 % \subsubsection{Macros}
632 % \begin{macro}{\maketitle}
633 % |\maketitle| generates a heading in MLA format.
635 \renewcommand{\maketitle}{\begin{flushleft}
637 \@ifundefined{mlastyle@instructor}{}{\mlastyle@instructor}\par
638 \@ifundefined{mlastyle@course}{}{\mlastyle@course}\par
639 \@date\end{flushleft}
640 \begin{center}\@title\end{center}\par
644 % \begin{macro}{\today}
645 % |\today| is redefined to DD~Mon.~YYYY format.
647 \def\today{\number\day~\ifcase\month\or
648 Jan.\or Feb.\or Mar.\or Apr.\or May\or June\or July\or
649 Aug.\or Sept.\or Oct.\or Nov.\or Dec.\fi\ \number\year}
652 % \begin{macro}{\slash}
653 % No penalty for |\slash|, and plain /'s permit line breaks if necessary.
654 % ^^A\let\mlastyle@sl@sh=/
656 \def\slash{/\penalty\z@}
657 \def\mlastyle@slash{/\futurelet\mlastyle@slashnext\mlastyle@slashx}
658 \def\mlastyle@slashx{\ifx\mlastyle@slashnext/\else
659 \penalty\exhyphenpenalty\fi}
662 % \begin{macro}{\section}
663 % \begin{macro}{\subsection}
664 % \begin{macro}{\subsubsection}
665 % Sections are formatted by centering the section name and beginning a new
666 % page. Subsections simply center the section name.
668 \renewcommand{\section}{\clearpage\@startsection{section}{1}{\z@
669 }{0pt}{1sp}{\centering}}
670 \renewcommand{\subsection}{\@startsection{subsection}{2}{\z@
671 }{0pt}{1sp}{\centering}}
672 \renewcommand{\subsubsection}{\@startsection{subsubsection}{3}{\z@
673 }{0pt}{1sp}{\centering}}
675 % ^^A\let\mlastyle@vfont\verbatim@font
676 % ^^A\def\verbatim@font{\mlastyle@qspread\mlastyle@vfont}
680 % \subsubsection{Environments}
681 % ^^A%\newenvironment{blocks}{\begin{quote} \linespread{1} \selectfont}{\end{quote} \linespread{2} \small \selectfont}
682 % ^^A%\newenvironment{blockm}{\begin{quotation} \linespread{1} \selectfont}{\end{quotation} \linespread{2} \selectfont}
683 % \begin{environment}{verse}
684 % Indented 1 inch, with an additional .25 inch hanging indent.
686 \renewenvironment{verse}{\list{}{\mlastyle@qspread
687 \advance\leftmargin1.5\mlastyle@i\itemindent-.5\mlastyle@i
688 \listparindent\itemindent}\item\relax}{\endlist}
691 % \begin{environment}{quotation}
692 % Indented 1 inch, with a paragraph indent of an additional .25 inches.
694 \renewenvironment{quotation}{\list{}{\mlastyle@qspread
695 \advance\leftmargin\mlastyle@i\itemindent.5\mlastyle@i
696 \listparindent\itemindent}\item\relax}{\endlist}
699 % \begin{environment}{quote}
700 % Identical to the |quotation| environment, except the first paragraph is not
703 \renewenvironment{quote}{\list{}{\mlastyle@qspread
704 \advance\leftmargin\mlastyle@i
705 \listparindent.5\mlastyle@i}\item\relax}{\endlist}
708 % \begin{environment}{workscited}
709 % Works cited environment, for compatibility with \package{mla-paper}.
711 \newenvironment{workscited}%
712 {\newpage{\centerline{Works Cited}}}{\newpage}
713 \newcommand{\bibent}{\noindent \hangindent\mlastyle@i}
716 % \subsubsection{Margins}
717 % Top and bottom margins are 1 inch each. The header is flush with the
718 % right margin at .5 inches from the top of the page.
719 % ^^A\addtolength{\headheight}{-1pt}
720 % ^^A\setlength{\headheight}{1.4\headheight}% kludge
722 \addtolength{\voffset}{-.5in}
723 \setlength{\textheight}{\paperheight}
724 \addtolength{\textheight}{-2in}
725 \setlength{\topmargin}{0in}
726 \setlength\headheight\f@baselineskip
727 \setlength{\headsep}{.5in}
728 \addtolength{\headsep}{-\headheight}
729 \setlength{\footskip}{0.25in}
732 % Left and right margins in MLA format are each 1 inch wide.
734 \addtolength{\hoffset}{-.5in}
735 \setlength{\textwidth}{\paperwidth}
736 \addtolength{\textwidth}{-2in}
737 \setlength{\oddsidemargin}{.5in}
738 \setlength{\evensidemargin}{.5in}
739 \setlength{\marginparwidth}{.5in}
741 % \subsubsection{Paragraphs}
742 % Paragraphs should be left justified, with the first line indented .5
746 \setlength\parindent\mlastyle@i
748 % MLA format specifies that all paragraphs should be indented, even those
749 % beginning a new section. This snippet from \package{indentfirst} changes
750 % \LaTeX{} to meet that requirement.
752 \let\@afterindentfalse\@afterindenttrue
755 % Double space {\em everywhere}.
756 % ^^A\RequirePackage{doublespace}
759 \leftmargini\parindent
760 \def\@listi{\leftmargin\leftmargini
761 \parsep\z@\itemsep\z@\topsep -3\p@\relax}
764 \def\@listii{\leftmargin\leftmarginii
765 \parsep\z@\itemsep\z@\topsep -3\p@\relax}
766 \def\@listiii{\leftmargin\leftmarginiii
767 \parsep\z@\itemsep\z@\topsep -3\p@\relax}
768 \def\@listiv{\leftmargin\leftmarginiv
769 \parsep\z@\itemsep\z@\topsep -3\p@\relax}
770 \def\@listv{\leftmargin\leftmarginv
771 \parsep\z@\itemsep\z@\topsep -3\p@\relax}
772 \def\@listvi{\leftmargin\leftmarginvi
773 \parsep\z@\itemsep\z@\topsep -3\p@\relax}
775 % \subsubsection{Header}
776 % The last name and page number appear on every page, including the first.
778 \RequirePackage{fancyhdr}
779 \fancypagestyle{plain}{\fancyhf{}}
780 \fancypagestyle{mlastyle}{
782 \rhead{\mlastyle@surname{} \thepage}
783 \renewcommand{\headrulewidth}{0pt}
784 \renewcommand{\footrulewidth}{0pt}}
787 % \subsubsection{Notes}
788 % Footnotes should be indented .5 inches; however .56 inches is used
789 % in a crude attempt to compensate for
790 % the alignment provided by the \package{footmisc} package. Endnotes are
791 % preferred in MLA style anyway, so this should not be a problem in most
794 \RequirePackage[ragged,norule]{footmisc}
795 \def\footnotelayout{\linespread{1}\footnotesize\raggedright{} }
796 \footnotemargin\mlastyle@i
797 \advance\footnotemargin .35em
798 \skip\footins=2\baselineskip
799 \footnotesep 1.2\footnotesep
800 \addtolength\footnotesep{\baselineskip}
801 \def\footnotesize{\normalsize}
803 % ^^A\let\footnoterule\relax
804 % Endnotes are supported, but only if the \package{endnotes} package is
805 % loaded {\em before\/} this package.
807 \ifx\@undefined\endnote\else
808 \def\enoteheading{\newpage\section*{\notesname}}
809 \def\enoteformat{\leavevmode\makeenmark{} }
810 \def\enotesize{\normalsize}
813 % \subsubsection{Bibliography}
814 % \begin{environment}{thebibliography}
815 % The definition of |\thebibliography| varies depending on the document
818 \ifx\@undefined\citet
819 \@ifundefined{chapter}
823 { \def\thebibliography#1{\newpage\section*{\refname}
824 \list{\@biblabel{\@arabic\c@enumiv}}%
825 {\settowidth\labelwidth{\@biblabel{#1}}}
826 \leftmargin\labelwidth
827 \advance\leftmargin\labelsep
828 \itemindent-\leftmargin
831 %\catcode`/=13\global\let/=\mlastyle@slash
832 \sloppy%\sfcode`\.=\@m
837 { \def\thebibliography#1{\chapter*{\bibname}
838 \list{\@biblabel{\@arabic\c@enumiv}}%
839 {\settowidth\labelwidth{\@biblabel{#1}}}
840 \leftmargin\labelwidth
841 \advance\leftmargin\labelsep
842 \itemindent-\leftmargin
845 %\catcode`/=13\let/=\mlastyle@slash
846 \sloppy%\sfcode`\.=\@m
850 % \subsubsection{Experimental \package{natbib} Implementation}
853 \newcommand\bibpreamble{%
854 \@ifundefined{citet}{}%
855 {\bibhang\mlastyle@i\bibsep\z@}}
859 \fi % \ifmlastyle@format
862 % This first block is the beginnings of an implementation for
865 \newcommand{\bibstyle@mlastyle}{\bibpunct[ ]{(}{)}{;}{a}{,}{;}
866 \@ifundefined{chapter}
867 {\gdef\refname{Works Cited}}
868 {\gdef\bibname{Works Cited}}}
870 % \begin{macro}{\cite}
871 % \begin{macro}{\citealt}
872 % ^^A\begin{macro}{\citepage}
873 % ^^A\begin{macro}{\citequote}
874 % The following macros, combined with \file{mlastyle.bst}, provide
875 % for a bibliography in MLA style. Note that the definition of |\cite|,
876 % |\citealt|, etc.\ vary depending on the options passed to
877 % \package{mlastyle}.
879 % \begin{macro}{\mlastyle@intcite}
880 % The original |\cite| is stored
881 % in |\mlastyle@intcite|.
883 \let\mlastyle@intcite\cite
886 % \begin{macro}{\mlastyle@relax}
887 % This macro does nothing. Depending on the options, either |\citeC| or
888 % |\citeM| and its ilk will utilize it.
890 \newcommand{\mlastyle@relax}[2][]{}
893 % \subsubsection{MLA Style}
894 % \begin{macro}{\@cite}
895 % \begin{macro}{\citeM}
896 % If the \Lopt{mla} or \Lopt{style} options are used, the following is
900 \ifx\@undefined\citet
901 \def\@cite#1#2{(#1\if@tempswa{} #2\fi)}
902 \def\cite{\def\@cite##1##2{(##1\if@tempswa{}
903 ##2\fi)}\mlastyle@intcite}
904 \def\citealt{\def\@cite##1##2{##1\if@tempswa{}
905 ##2\fi}\mlastyle@intcite}
907 \def\citeM{\def\@cite##1##2{ (##1\if@tempswa{}
908 ##2\fi)}\mlastyle@intcite}
909 \def\citepage{\def\@cite##1##2{\if@tempswa(##2)\fi}\mlastyle@intcite}
910 \def\citepageM{\def\@cite##1##2{\if@tempswa{}
911 (##2)\fi}\mlastyle@intcite}
912 \def\citeindirect{\def\@cite##1##2%
913 {(qtd. in ##1\if@tempswa{} ##2\fi)}\mlastyle@intcite}
914 \def\citeindirectM{\def\@cite##1##2%
915 { (qtd. in ##1\if@tempswa{} ##2\fi)}\mlastyle@intcite}
916 \let\citeC\mlastyle@relax
921 % Place commas in-between citations in the same |\citeyear|, |\citeyearNP|,
922 % |\citeN|, or |\shortciteN| command.
923 % Use something like |\citeN{ref1,ref2,ref3}| and |\citeN{ref4}| for a list.
925 % \@citedata and \@citedatax:
927 % \@ifnextchar [{\@tempswatrue\@citedatax}%
928 % {\@tempswafalse\@citedatax[]}%
930 % \def\@citedatax[#1]#2{%
932 % \if@filesw\immediate\write\@auxout{\string\citation{#2}}\fi%
933 % \def\@citea{}\@cite{\@for\@citeb:=#2\do%
934 % {\@citea\def\@citea{; }\@ifundefined% by Young
935 % {b@\@citeb}{{\bf ?}%
936 % \@warning{Citation `\@citeb' on page \thepage \space undefined}}%
937 % {\csname b@\@citeb\endcsname}}}{#1}}%
939 % \begin{macro}{\@citex}
940 % This is the original |\@citex| from \LaTeX{} modified to use semicolons.
944 \@cite{\@for\@citeb:=#2\do
945 {\@citea\def\@citea{;\penalty-1\ }%
946 \edef\@citeb{\expandafter\@firstofone\@citeb\@empty}%
947 \if@filesw\immediate\write\@auxout{\string\citation{\@citeb}}\fi
948 \@ifundefined{b@\@citeb}{\mbox{\reset@font\bfseries ?}%
951 {Citation `\@citeb' on page \thepage \space undefined}}%
952 {{\csname b@\@citeb\endcsname}}}}{#1}}
955 % \begin{macro}{\@biblabel}
956 % No labels in the bibliography.
960 \let\mlastyle@intbib\thebibliography
961 \def\thebibliography#1{\mlastyle@intbib{#1}
962 \itemindent-\leftmargin\def\@biblabel##1{}}
965 % Title either the bibliography or the references ``Works Cited,''
966 % depending on the document class.
968 \@ifundefined{chapter}
969 {\renewcommand\refname{Works Cited}}
970 {\renewcommand\bibname{Works Cited}}
973 \newcommand\citepage[2][]{\citetext{#2}}
974 \newcommand\citepageM[2][]{ \citetext{#2}}
975 \newcommand\citeindirect[2][]{\citep[#1][qtd. in]{#2}}
976 \newcommand\citeindirectM[2][]{ \citep[#1][qtd. in]{#2}}
977 \let\citeC\mlastyle@relax
981 % ^^A% Define the command \workscited{bib}{style}{nocite}
982 % ^^A%\newcommand{\workscited}[3]{%
983 % ^^A% \ifx\chapter\@undefined%
984 % ^^A% \addcontentsline{toc}{chapter}{\bfseries\bibname}% report style
986 % ^^A% \addcontentsline{toc}{section}{\bfseries\refname}% article style
988 % ^^A% \bibliography{#1}\bibliographystyle{#2}\nocite{#3}}
990 % ^^A\newcommand{\annote}[1]{\begin{list}{}{%
991 % ^^A \setlength{\labelwidth}{0pt}
992 % ^^A \addtolength{\leftmargin}{\parindent}
993 % ^^A \setlength{\labelsep}{0pt}}%
994 % ^^A \item #1 \end{list}}
995 % \subsubsection{Plain Style}
996 % \begin{macro}{\citeC}
997 % This next block is used if the \Lopt{compat} or \Lopt{format} option is
1001 \newcommand{\mlastyle@cite}[2][]{\@tempswafalse\@citex[]{#2}}
1002 \let\cite\mlastyle@cite
1003 \let\citepage\mlastyle@cite
1004 \let\citeindirect\mlastyle@cite
1005 \newcommand{\citeC}[2][]{~\@tempswafalse\@citex[]{#2}}
1006 \let\citeM\mlastyle@relax
1007 \let\citepageM\mlastyle@relax
1008 \let\citeindirectM\mlastyle@relax