Initial revision
[latex-mlastyle.git] / mlastyle.dtx
1 % \iffalse meta-comment
2 %
3 % Copyright (C) 2003 by Scott Pakin <pakin@uiuc.edu>
4 % --------------------------------------------------
5
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:
10 %
11 %    http://www.latex-project.org/lppl.txt
12 %
13 % and version 1.2 or later is part of all distributions of LaTeX 
14 % version 1999/12/01 or later.
15 %
16 % \fi
17 %
18 % \iffalse
19 %<package>\NeedsTeXFormat{LaTeX2e}[1999/12/01]
20 %<package>\ProvidesPackage{mlastyle}
21 %<package>   [2003/10/21 v1.0 .dtx mlastyle file] 
22 %
23 %<*driver>
24 \documentclass{ltxdoc}
25 \usepackage[compat]{mlastyle}
26 \EnableCrossrefs
27 \CodelineIndex
28 \RecordChanges
29 %\OnlyDescription
30 \begin{document}
31   \DocInput{mlastyle.dtx}
32 \end{document}
33 %</driver>
34 % \fi
35 %
36 % \CheckSum{0}
37 %
38 % \CharacterTable
39 %  {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
40 %   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
41 %   Digits        \0\1\2\3\4\5\6\7\8\9
42 %   Exclamation   \!     Double quote  \"     Hash (number) \#
43 %   Dollar        \$     Percent       \%     Ampersand     \&
44 %   Acute accent  \'     Left paren    \(     Right paren   \)
45 %   Asterisk      \*     Plus          \+     Comma         \,
46 %   Minus         \-     Point         \.     Solidus       \/
47 %   Colon         \:     Semicolon     \;     Less than     \<
48 %   Equals        \=     Greater than  \>     Question mark \?
49 %   Commercial at \@     Left bracket  \[     Backslash     \\
50 %   Right bracket \]     Circumflex    \^     Underscore    \_
51 %   Grave accent  \`     Left brace    \{     Vertical bar  \|
52 %   Right brace   \}     Tilde         \~}
53 %
54 %
55 % \changes{v1.0}{2003/09/25}{Initial version}
56 %
57 % \GetFileInfo{mlastyle.sty}
58 %
59 % \DoNotIndex{\the,\edef,\gdef,\voffset,\@undefined}
60 % \DoNotIndex{\@centercr,\@for,\@date,\do,\@startsection}
61 % \DoNotIndex{\@citea,\@citeb}
62 % \DoNotIndex{\@empty,\@ignoretrue}
63 % \DoNotIndex{\@ixpt}
64 % \DoNotIndex{\@M,\@minus,\@ne,\@plus}
65 % \DoNotIndex{\.,\ ,\\}
66 % \DoNotIndex{\addtolength,\advance}
67 % \DoNotIndex{\ast,\begin,\begingroup,\bfseries,\bgroup,\box}
68 % \DoNotIndex{\bullet}
69 % \DoNotIndex{\cdot,\cr,\day,\DeclareOption}
70 % \DoNotIndex{\def,\DocInput,\documentclass}
71 % \DoNotIndex{\DoNotIndex,\egroup,\ifx,\else,\fi,\endtrivlist}
72 % \DoNotIndex{\EnableCrossrefs,\end,\end@dblfloat,\end@float,\endgroup}
73 % \DoNotIndex{\endlist,\everycr,\ExecuteOptions,\expandafter}
74 % \DoNotIndex{\filedate,\filename,\fileversion,\futurelet}
75 % \DoNotIndex{\global,\halign,\hangindent,\hbox,\hfil,\hfill,\hrule}
76 % \DoNotIndex{\hsize,\hskip,\hspace,\hss,\ifcase,\or,\fi}
77 % \DoNotIndex{\ifvmode,\fi,\ifnum,\fi,\input}
78 % \DoNotIndex{\kern,\leavevmode,\let,\leftmark}
79 % \DoNotIndex{\list,\llap,\long,\m@ne,\m@th,\mark}
80 % \DoNotIndex{\mbox,\month,\newcommand,\newcounter,\newenvironment}
81 % \DoNotIndex{\mlastyle@bibstyletrue,\mlastyle@bibstylefalse}
82 % \DoNotIndex{\mlastyle@formattrue,\mlastyle@formatfalse}
83 % \DoNotIndex{\mlastyle@papersizetrue,\mlastyle@papersizefalse}
84 % \DoNotIndex{\mlastyle@styletrue,\mlastyle@stylefalse}
85 % \DoNotIndex{\mlastyle@timestrue,\mlastyle@timesfalse}
86 % \DoNotIndex{\mlastyle@underlinetrue,\mlastyle@underlinefalse}
87 % \DoNotIndex{\mlastyle@bibstyletrue,\mlastyle@bibstylefalse}
88 % \DoNotIndex{\mlastyle@slashnext,\mlastyle@slashx}
89 % \DoNotIndex{}
90 % \DoNotIndex{\NeedsTeXFormat,\newdimen}
91 % \DoNotIndex{\newpage,\nobreak,\noindent,\number}
92 % \DoNotIndex{\or,\p@}
93 % \DoNotIndex{\pagestyle,\par}
94 % \DoNotIndex{\penalty,\PrintChanges,\PrintIndex,\ProcessOptions}
95 % \DoNotIndex{\protect,\ProvidesClass,\raggedbottom,\raggedright}
96 % \DoNotIndex{\refstepcounter,\relax,\renewcommand,\renewenvironment}
97 % \DoNotIndex{\reset@font}
98 % \DoNotIndex{\rightmargin,\rlap,\rmfamily}
99 % \DoNotIndex{\setbox,\setcounter,\setlength}
100 % \DoNotIndex{\skip,\slshape,\space}
101 % \DoNotIndex{\trivlist,\typeout,\tw@}
102 % \DoNotIndex{\voffset,\vskip,\vspace,\year,\z@}
103 %
104 % \newcommand*{\Lopt}[1]{\textsf {#1}}
105 % \newcommand*{\file}[1]{\texttt {#1}}
106 % \newcommand*{\package}[1]{\textsf {#1}}
107 % \newcommand*{\Lcount}[1]{\textsl {\small#1}}
108 % \newcommand*{\pstyle}[1]{\textsl {#1}}
109 %
110 % \title{The \package{mlastyle} package\thanks{This document
111 %   corresponds to \package{mlastyle}~\fileversion, dated \filedate.}}
112 % \author{Tim Pope \\ \texttt{latex@rebelongto.us}}
113 %
114 % \maketitle
115 %
116 % \section{Introduction}
117 %
118 % MLA style is ugly.  Nevertheless, it is often required, particularly in
119 % the humanities.
120 %
121 % \section{Usage}
122 %
123 % A sample document follows.
124 % \begin{verbatim}
125 %\documentclass[12pt]{article}
126 %\usepackage{mlastyle}
127 %
128 %\author{John Doe}
129 %\professor{Professor Smith}
130 %\classname{English 101}
131 %\date{1~Jan.\ 1970}
132 %\title{The Futility of Compulsory English Classes}
133 %
134 %\begin{document}
135 %\maketitle
136 %'Nuff said.
137 %\end{document}\end{verbatim}
138 % \subsection{Initiation Macros}
139 % \DescribeMacro{\maketitle}
140 % \DescribeMacro{\professor}
141 % \DescribeMacro{\classname}
142 % The mandatory heading\index{heading|usage} is generated with
143 % |\maketitle|.  Use the standard macros |\author|, |\title|, and |\date|
144 % to specify the relevant information.  To define the professor and name
145 % of the class, use the aptly named |\professor|\marg{name} and
146 % |\classname|\marg{class} macros.
147 %
148 % \DescribeMacro{\lastname}
149 % The last name for use in the header\index{header|usage} is derived from
150 % |\author|.  If this does not produce the desired result, use
151 % |\lastname|\marg{last name} to override it.
152 %
153 % \DescribeMacro{\date}
154 % \DescribeMacro{\today}
155 % MLA style recommends the DD~Mon.~YYYY format for specifying dates;
156 % |\today| has been conveniently redefined to this.  However, other
157 % formats can be used as long as done so consistantly throughout the
158 % document.  Also note that the date in the header should be the due date
159 % of the assignment, so be sure to explictly call |\date|\marg{due date}
160 % if you actually finish your assignments early.
161 %
162 % \subsection{Environments}
163 % \DescribeEnv{verse}
164 % \DescribeEnv{quote}
165 % \DescribeEnv{quotation}
166 % Three environments have been modified from standard \LaTeX to better
167 % suit MLA format.  To typeset poetry\index{poetry|usage} and
168 % drama\index{drama|usage}, use the |verse| environment.
169 % Quotations\index{quotations|usage} of a single paragraph or less always
170 % use the |quote| environment.  For longer passages, use the |quotation|
171 % environment if the beginning of the passage marks the beginning of a
172 % paragraph.  Otherwise, use the |quote| environment.
173 %
174 % Be sure to follow MLA guidelines when using these environments.  Short
175 % quotes should be enclosed in quotation marks and included directly in
176 % the text.
177 %
178 % \subsection{Documentating Sources}
179 %
180 % Coupled with \BibTeX, \package{mlastyle} provides a experimental
181 % implementation of MLA documentation style.  Load the bibliography style
182 % by putting |\bibliographystyle{mlastyle}| in the document preamble.
183 %
184 % \StopEventually{\PrintChanges\PrintIndex}
185 % \iffalse
186 %<*package>
187 % \fi
188 % \section{Implementation}
189 %
190 % \subsection{Options}
191 %
192 % First, the options.
193 %    \begin{macrocode}
194 \newif\ifmlastyle@bibstyle
195 \DeclareOption{bibstyle}{\mlastyle@bibstyletrue}
196 \DeclareOption{nobibstyle}{\mlastyle@bibstylefalse}
197 %    \end{macrocode}
198 %    \begin{macrocode}
199 \newif\ifmlastyle@papersize
200 \DeclareOption{papersize}{\mlastyle@papersizetrue}
201 \DeclareOption{nopapersize}{\mlastyle@papersizefalse}
202 \newif\ifmlastyle@underline
203 \DeclareOption{underline}{\mlastyle@underlinetrue}
204 \DeclareOption{italics}{\mlastyle@underlinefalse}
205 \newif\ifmlastyle@times
206 \DeclareOption{times}{\mlastyle@timestrue}
207 \DeclareOption{cm}{\mlastyle@timesfalse}
208 \newif\ifmlastyle@style
209 \DeclareOption{compat}{\mlastyle@stylefalse
210         \mlastyle@formatfalse
211         \mlastyle@underlinefalse}
212 \DeclareOption{mla}{\mlastyle@styletrue
213         \mlastyle@formattrue
214         \mlastyle@underlinetrue}
215 \newif\ifmlastyle@format
216 \DeclareOption{format}{\mlastyle@stylefalse
217         \mlastyle@formattrue
218         \mlastyle@underlinetrue}
219 \DeclareOption{style}{\mlastyle@styletrue
220         \mlastyle@formatfalse
221         \mlastyle@underlinefalse}
222 \DeclareOption{singlespacequotes}{
223   \def\mlastyle@qspread{\linespread{1}\normalsize\vskip\baselineskip}}
224 \DeclareOption{doublespacequotes}{\let\mlastyle@qspread\relax}
225 \ExecuteOptions{nobibstyle,nopapersize,mla,cm,doublespacequotes}
226 \ProcessOptions
227 %    \end{macrocode}
228 % If the \Lopt{papersize} option is set, add the appropriate
229 % \textsc{PostScript} special, or adjust |\pdfpagewidth| and
230 % |\pdfpageheight| if pdf\LaTeX{} is in use.
231 %    \begin{macrocode}
232 \ifmlastyle@papersize
233   \ifx\@undefined\pdfpagewidth
234     \special{papersize=\the\paperwidth,\the\paperheight}
235   \else
236     \setlength{\pdfpagewidth}{\paperwidth}
237     \setlength{\pdfpageheight}{\paperheight}
238   \fi
239 \fi % \ifmlastyle@papersize
240 %    \end{macrocode}
241 % If the \Lopt{bibstyle} option is set, specify the bibliography style.
242 %    \begin{macrocode}
243 \ifmlastyle@bibstyle
244   \ifmlastyle@style
245     \bibliographystyle{mlastyle}
246   \else
247     \bibliographystyle{plain}
248   \fi
249 \fi % \ifmlastyle@bibstyle
250 %    \end{macrocode}
251 % Load the \package{ulem} package if the \Lopt{underline} option is set.
252 %    \begin{macrocode}
253 \ifmlastyle@underline
254   \RequirePackage{ulem}
255 \fi % \ifmlastyle@underline
256 %    \end{macrocode}
257 % Load the \package{times} package if the \Lopt{times} option is set.
258 %    \begin{macrocode}
259 \ifmlastyle@times
260   \RequirePackage{times}
261 \fi % \ifmlastyle@times
262 %    \end{macrocode}
263 % \subsection{Macros}
264 % \begin{macro}{\professor}
265 % Define the professor.
266 %    \begin{macrocode}
267 \def\professor#1{\gdef\theprofessor{#1}}
268 %    \end{macrocode}
269 % \end{macro}
270 % \begin{macro}{\classname}
271 % Define the class.
272 %    \begin{macrocode}
273 \def\classname#1{\gdef\theclassname{#1}}
274 %    \end{macrocode}
275 % \end{macro}
276 % \begin{macro}{\lastname}
277 % Define the last name.
278 %    \begin{macrocode}
279 \def\lastname#1{\gdef\thelastname{#1}}
280 %    \end{macrocode}
281 % \end{macro}
282 % \subsection{Formatting}
283 % Formatting is only done if the \Lopt{format} option is set.  This is the
284 % default.
285 %    \begin{macrocode}
286 \ifmlastyle@format
287 %    \end{macrocode}
288 % \subsubsection{Macros}
289 % \begin{macro}{\maketitle}
290 % Redefined |\maketitle| generate a heading in MLA format.
291 %    \begin{macrocode}
292   \renewcommand{\maketitle}{\begin{flushleft}
293     \@author\par
294     \@ifundefined{theprofessor}{}{\theprofessor}\par
295     \@ifundefined{theclassname}{}{\theclassname}\par
296     \@date\end{flushleft}
297     \begin{center}\@title\end{center}\par
298   }
299 %    \end{macrocode}
300 % \end{macro}
301 % \begin{macro}{\today}
302 % |\today| is redefined to DD~Mon.~YYYY format.
303 %    \begin{macrocode}
304 \def\today{\number\day~\ifcase\month\or
305   Jan.\or Feb.\or Mar.\or Apr.\or May\or June\or July\or 
306   Aug.\or Sept.\or Oct.\or Nov.\or Dec.\fi\ \number\year}
307 %    \end{macrocode}
308 % \end{macro}
309 % \begin{macro}{\slash}
310 % No penalty for |\slash|, and plain /'s permit line breaks if necessary.
311 %    \begin{macrocode}
312   \def\slash{/\penalty\z@}
313   %\let\mlastyle@sl@sh=/
314   \def\mlastyle@slash{/\futurelet\mlastyle@slashnext\mlastyle@slashx}
315   \def\mlastyle@slashx{\ifx\mlastyle@slashnext/\else
316     \penalty\exhyphenpenalty\fi}
317 %    \end{macrocode}
318 % \end{macro}
319 % \begin{macro}{\section}
320 % Sections are formatted by centering the section name and beginning a new
321 % page.  Subsections simply center the section name.
322 %    \begin{macrocode}
323   \renewcommand{\section}{\clearpage\@startsection{section}{1}{\z@
324     }{0pt}{1sp}{\centering}}
325   \renewcommand{\subsection}{\@startsection{subsection}{2}{\z@
326     }{0pt}{1sp}{\centering}}
327 %    \end{macrocode}
328 % \end{macro}
329 % \subsubsection{Environments}
330 % ^^A%\newenvironment{blocks}{\begin{quote} \linespread{1} \small \normalsize}{\end{quote} \linespread{2} \small \normalsize}
331 % ^^A%\newenvironment{blockm}{\begin{quotation} \linespread{1} \small \normalsize}{\end{quotation} \linespread{2} \small \normalsize}
332 % \begin{environment}{verse}
333 % Indented 1 inch, with an additional .25 inch hanging indent.
334 %    \begin{macrocode}
335   \renewenvironment{verse}{\list{}{\mlastyle@qspread
336     \advance\leftmargin.75in\itemindent-.25in
337     \listparindent\itemindent}\item\relax}{\endlist}
338 %    \end{macrocode}
339 % \end{environment}
340 % \begin{environment}{quotation}
341 % Indented 1 inch, with a paragraph indent of an additional .25 inches.
342 %    \begin{macrocode}
343   \renewenvironment{quotation}{\list{}{\mlastyle@qspread
344     \advance\leftmargin.5in\itemindent.25in
345     \listparindent\itemindent}\item\relax}{\endlist}
346 %    \end{macrocode}
347 % \end{environment}
348 % \begin{environment}{quote}
349 % Identical to the |quotation| environment, except the first paragraph is not
350 % indented.
351 %    \begin{macrocode}
352   \renewenvironment{quote}{\list{}{\mlastyle@qspread
353     \advance\leftmargin.5in
354     \listparindent.25in}\item\relax}{\endlist}
355 %    \end{macrocode}
356 % \end{environment}
357 % \begin{environment}{workscited}
358 % Works Cited environment, for compatibility with \package{mla-paper}.
359 %    \begin{macrocode}
360   \newenvironment{workscited}%
361     {\newpage{\centerline{Works Cited}}}{\newpage}
362   \newcommand{\bibent}{\noindent \hangindent .5in}
363 %    \end{macrocode}
364 % \end{environment}
365 % \subsubsection{Margins}
366 % Top and bottom margins are 1 inch each.  The header is flush with the
367 % right margin at .5 inches from the top of the page.
368 % ^^A%\settoheight{\headheight}{\llap{\parbox[b]{\textwidth}{\large\raggedleft Pope}}}
369 %    \begin{macrocode}
370   \setlength{\voffset}{-0.5in}
371   \setlength{\textheight}{\paperheight}
372   \addtolength{\textheight}{-2in}
373   \setlength{\topmargin}{0in}
374   \addtolength{\headheight}{-1pt}
375   \setlength{\headheight}{1.4\headheight}% kludge
376   \setlength{\headsep}{0.5in}
377   \addtolength{\headsep}{-\headheight}
378   \setlength{\footskip}{0.25in}
379   \raggedbottom
380 %    \end{macrocode}
381 % Left and right margins in MLA format are each 1 inch wide.
382 %    \begin{macrocode}
383   \setlength{\hoffset}{-0.5in}
384   \setlength{\textwidth}{\paperwidth}
385   \addtolength{\textwidth}{-2in}
386   \setlength{\oddsidemargin}{0.5in}
387   \setlength{\evensidemargin}{0.5in}
388   \setlength{\marginparwidth}{0.5in}
389 %    \end{macrocode}
390 % \subsubsection{Paragraphs}
391 % Paragraphs should be left justified, with the first line indented .5
392 % inches.
393 %    \begin{macrocode}
394   \raggedright
395   \setlength{\parindent}{.5in}
396 %    \end{macrocode}
397 % MLA format specifies that all paragraphs should be indented, even those
398 % beginning a new section.  This snippet from \package{indentfirst} changes
399 % \LaTeX{} to meet that requirement.
400 %    \begin{macrocode}
401   \let\@afterindentfalse\@afterindenttrue
402   \@afterindenttrue
403 %    \end{macrocode}
404 % Double space {\em everywhere}.
405 % ^^A\RequirePackage{doublespace}
406 %    \begin{macrocode}
407   \linespread{2.0}
408   \leftmargini\parindent
409   \def\@listi{\leftmargin\leftmargini
410   \parsep\z@\itemsep\z@\topsep -3\p@\relax}
411   \let\@listI\@listi
412   \@listi
413   \def\@listii{\leftmargin\leftmarginii
414   \parsep\z@\itemsep\z@\topsep -3\p@\relax}
415   \def\@listiii{\leftmargin\leftmarginiii
416   \parsep\z@\itemsep\z@\topsep -3\p@\relax}
417   \def\@listiv{\leftmargin\leftmarginiv
418   \parsep\z@\itemsep\z@\topsep -3\p@\relax}
419   \def\@listv{\leftmargin\leftmarginv
420   \parsep\z@\itemsep\z@\topsep -3\p@\relax}
421   \def\@listvi{\leftmargin\leftmarginvi
422   \parsep\z@\itemsep\z@\topsep -3\p@\relax}
423 %    \end{macrocode}
424 % \subsubsection{Header}
425 % The last name and page number appear on every page, including the first.
426 %    \begin{macrocode}
427   \RequirePackage{fancyhdr}
428   \fancypagestyle{plain}{\fancyhf{}}
429   \fancypagestyle{mlastyle}{
430     \fancyhf{}
431     \def\sw@llow##1 {}
432     \rhead{\@ifundefined{thelastname}%
433       {\expandafter\sw@llow\@author}{\thelastname} \thepage}
434     \renewcommand{\headrulewidth}{0pt}
435     \renewcommand{\footrulewidth}{0pt}
436   }
437   \pagestyle{mlastyle}
438 %    \end{macrocode}
439 % \subsubsection{Notes}
440 % Footnotes should be indented .5 inches; however .56 inches is used
441 % in a crude attempt to compensate for
442 % the alignment provided by the \package{footmisc} package.  Endnotes are
443 % preferred in MLA style anyway, so this should not be a problem in most
444 % circumstances.
445 %    \begin{macrocode}
446   \RequirePackage[ragged,norule]{footmisc}
447   \def\footnotelayout{\linespread{1}\footnotesize\raggedright{} }
448   \footnotemargin .56in
449   \skip\footins=2\baselineskip
450   \footnotesep 1.2\footnotesep
451   \addtolength\footnotesep{\baselineskip}
452   \def\footnotesize{\normalsize}
453 %    \end{macrocode}
454 % ^^A\let\footnoterule\relax
455 % Endnotes are supported, but only if the \package{endnotes} package is
456 % loaded {\em before\/} this package.
457 %    \begin{macrocode}
458   \ifx\@undefined\endnote\else
459     \def\enoteheading{\newpage\section*{\notesname}}
460     \def\enoteformat{\leavevmode\makeenmark{} }
461     \def\enotesize{\normalsize}
462   \fi
463 %    \end{macrocode}
464 % \subsubsection{Miscellaneous}
465 % With all packages loaded, we can now redefine |/|.
466 %    \begin{macrocode}
467   \catcode`/=13
468   \let/=\mlastyle@slash
469 %    \end{macrocode}
470 % The definition of |\thebibliography| varies depending on the document
471 % class.
472 %    \begin{macrocode}
473   \@ifundefined{chapter}
474 %    \end{macrocode}
475 % Article class.
476 %    \begin{macrocode}
477   {
478     \def\thebibliography#1{\newpage\section*{\refname}
479       \list{\@biblabel{\@arabic\c@enumiv}}%
480       {\settowidth\labelwidth{\@biblabel{#1}}}
481       \leftmargin\labelwidth
482       \advance\leftmargin\labelsep
483       \itemindent-\leftmargin
484       \def\newblock{}
485       \usecounter{enumiv}
486       \sloppy%\sfcode`\.=1000\relax
487       }}
488 %    \end{macrocode}
489 % Report/book class.
490 %    \begin{macrocode}
491   {
492     \def\thebibliography#1{\chapter*{\bibname}
493       \list{\@biblabel{\@arabic\c@enumiv}}%
494       {\settowidth\labelwidth{\@biblabel{#1}}}
495       \leftmargin\labelwidth
496       \advance\leftmargin\labelsep
497       \itemindent-\leftmargin
498       \def\newblock{}
499       \usecounter{enumiv}
500       \sloppy%\sfcode`\.=1000\relax
501       }}
502 %    \end{macrocode}
503 % We're done formatting!
504 %    \begin{macrocode}
505 \fi % \ifmlastyle@format
506 %    \end{macrocode}
507 % \subsection{Works Cited}
508 % \begin{macro}{\cite}
509 % The following macros, combined with \file{mlastyle.bst}, provide
510 % for a bibliography in MLA style.  Note that the definition of |\cite|,
511 % |\citeN|, etc.\ vary depending on the options passed to
512 % \package{mlastyle}.
513 %
514 % \begin{macro}{\mlastyle@intcite}
515 % Since the original |\cite| is needed after it is overridden, it is stored
516 % in |\mlastyle@intcite|.
517 %    \begin{macrocode}
518 \let\mlastyle@intcite\cite
519 %    \end{macrocode}
520 % \end{macro}
521 % \begin{macro}{\mlastyle@relax}
522 % This macro does nothing.  Depending on the options, ither |\citeC| or
523 % |\citeM| and its ilk will utilize it.
524 %    \begin{macrocode}
525 \newcommand{\mlastyle@relax}[2][]{}
526 %    \end{macrocode}
527 % \end{macro}
528 % \subsubsection{MLA Style}
529 % \begin{macro}{\citeM}
530 % If the \Lopt{compat} option is {\em not\/} used, the following is
531 % executed.
532 %    \begin{macrocode}
533 \ifmlastyle@style
534   \def\@cite#1#2{(#1\if@tempswa{} #2\fi)}
535   \def\cite{\def\@cite##1##2{(##1\if@tempswa{} ##2\fi)}\mlastyle@intcite}
536   \def\citeN{\def\@cite##1##2{##1\if@tempswa{} ##2\fi}\mlastyle@intcite}
537   \def\citeM{\def\@cite##1##2{ (##1\if@tempswa{} ##2\fi)}\mlastyle@intcite}
538   \def\citepage{\def\@cite##1##2{\if@tempswa(##2)\fi}\mlastyle@intcite}
539   \def\citepageM{\def\@cite##1##2{\if@tempswa{} (##2)\fi}\mlastyle@intcite}
540   \def\citeindirect{\def\@cite##1##2%
541   {(qtd. in ##1\if@tempswa{} ##2\fi)}\mlastyle@intcite}
542   \def\citeindirectM{\def\@cite##1##2%
543   { (qtd. in ##1\if@tempswa{} ##2\fi)}\mlastyle@intcite}
544   \let\citeC\mlastyle@relax
545 %    \end{macrocode}
546 % \end{macro}
547 % \iffalse
548 % Place commas in-between citations in the same |\citeyear|, |\citeyearNP|,
549 % |\citeN|, or |\shortciteN| command.
550 % Use something like |\citeN{ref1,ref2,ref3}| and |\citeN{ref4}| for a list.
551 %
552 % \@citedata and \@citedatax:
553 %  \def\@citedata{%
554 %    \@ifnextchar [{\@tempswatrue\@citedatax}%
555 %                {\@tempswafalse\@citedatax[]}%
556 %  }
557 %  \def\@citedatax[#1]#2{%
558 %  \let\@citea\@empty
559 %  \if@filesw\immediate\write\@auxout{\string\citation{#2}}\fi%
560 %    \def\@citea{}\@cite{\@for\@citeb:=#2\do%
561 %      {\@citea\def\@citea{; }\@ifundefined% by Young
562 %        {b@\@citeb}{{\bf ?}%
563 %        \@warning{Citation `\@citeb' on page \thepage \space undefined}}%
564 %  {\csname b@\@citeb\endcsname}}}{#1}}%
565 % \fi
566 % \begin{macro}{\@citex}
567 % This is the original |\@citex| from \LaTeX{} modified to use semicolons.
568 %    \begin{macrocode}
569 \def\@citex[#1]#2{%
570   \let\@citea\@empty
571   \@cite{\@for\@citeb:=#2\do
572     {\@citea\def\@citea{;\penalty-1\ }%
573      \edef\@citeb{\expandafter\@firstofone\@citeb\@empty}%
574      \if@filesw\immediate\write\@auxout{\string\citation{\@citeb}}\fi
575      \@ifundefined{b@\@citeb}{\mbox{\reset@font\bfseries ?}%
576        \G@refundefinedtrue
577        \@latex@warning
578          {Citation `\@citeb' on page \thepage \space undefined}}%
579        {{\csname b@\@citeb\endcsname}}}}{#1}}
580 %    \end{macrocode}
581 % \end{macro}
582 % \begin{macro}{\@biblabel}
583 % No labels in the bibliography.
584 %    \begin{macrocode}
585   \def\@biblabel#1{#1}
586   \labelsep\z@
587   \let\mlastyle@intbib\thebibliography
588   \def\thebibliography#1{\mlastyle@intbib{#1}
589     \itemindent-\leftmargin\def\@biblabel##1{}}
590 %    \end{macrocode}
591 % \end{macro}
592 % Title the either the bibliography or the references ``Works Cited,''
593 % depending on the document class.
594 %    \begin{macrocode}
595   \@ifundefined{chapter}
596   {\renewcommand\refname{Works Cited}}
597   {\renewcommand\bibname{Works Cited}}
598 %    \end{macrocode}
599 %
600 % ^^A% Define the command \workscited{bib}{style}{nocite}
601 % ^^A%\newcommand{\workscited}[3]{%
602 % ^^A%  \ifx\chapter\@undefined%
603 % ^^A%    \addcontentsline{toc}{chapter}{\bfseries\bibname}% report style
604 % ^^A%  \else
605 % ^^A%    \addcontentsline{toc}{section}{\bfseries\refname}% article style
606 % ^^A%  \fi
607 % ^^A%  \bibliography{#1}\bibliographystyle{#2}\nocite{#3}}
608 % ^^A% \fi
609 % ^^A\newcommand{\annote}[1]{\begin{list}{}{%
610 % ^^A                \setlength{\labelwidth}{0pt}
611 % ^^A                \addtolength{\leftmargin}{\parindent}
612 % ^^A                \setlength{\labelsep}{0pt}}%
613 % ^^A                \item #1 \end{list}}
614 % \subsubsection{Plain Style}
615 % \begin{macro}{\citeC}
616 % This next block is used only if the \Lopt{compat} option is set.
617 %    \begin{macrocode}
618 \else
619   \newcommand{\mlastyle@cite}[2][]{\@tempswafalse\@citex[]{#2}}
620   \let\cite\mlastyle@cite
621   \let\citepage\mlastyle@cite
622   \let\citeindirect\mlastyle@cite
623   \newcommand{\citeC}[2][]{ \@tempswafalse\@citex[]{#2}}
624   \let\citeM\mlastyle@relax
625   \let\citepageM\mlastyle@relax
626   \let\citeindirectM\mlastyle@relax
627 \fi
628 %    \end{macrocode}
629 % \end{macro}
630 % \end{macro}
631 % \iffalse
632 %</package>
633 % \fi
634 %
635 % \Finale
636 \endinput