Substituted instructor and course for professor and classname
[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 %\instructor{Professor Smith}
130 %\course{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{\instuctor}
141 % \DescribeMacro{\course}
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 instructor and name
145 % of the course, use the aptly named |\instructor|\marg{instructor} and
146 % |\instructor|\marg{course} macros.
147 %
148 % \DescribeMacro{\surname}
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 % |\surname|\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.  Put |\bibstyle{mlastyle}| in
182 % the document preamble to load the bibliography style.
183 %
184 % \StopEventually{\PrintChanges\PrintIndex}
185 %
186 % \section{Implementation}
187 % \iffalse
188 %<*package>
189 % \fi
190 % \subsection{Options}
191 %
192 % Most options are implemented by modifying a |\newif| declared for this
193 % purpose.
194 %    \begin{macrocode}
195 \newif\ifmlastyle@bibstyle
196 \DeclareOption{bibstyle}{\mlastyle@bibstyletrue}
197 \DeclareOption{nobibstyle}{\mlastyle@bibstylefalse}
198 \newif\ifmlastyle@papersize
199 \DeclareOption{papersize}{\mlastyle@papersizetrue}
200 \DeclareOption{nopapersize}{\mlastyle@papersizefalse}
201 \newif\ifmlastyle@underline
202 \DeclareOption{underline}{\mlastyle@underlinetrue}
203 \DeclareOption{italics}{\mlastyle@underlinefalse}
204 \newif\ifmlastyle@times
205 \DeclareOption{times}{\mlastyle@timestrue}
206 \DeclareOption{cm}{\mlastyle@timesfalse}
207 \newif\ifmlastyle@style
208 \DeclareOption{compat}{\mlastyle@stylefalse
209         \mlastyle@formatfalse
210         \mlastyle@underlinefalse}
211 \DeclareOption{mla}{\mlastyle@styletrue
212         \mlastyle@formattrue
213         \mlastyle@underlinetrue}
214 \newif\ifmlastyle@format
215 \DeclareOption{format}{\mlastyle@stylefalse
216         \mlastyle@formattrue
217         \mlastyle@underlinetrue}
218 \DeclareOption{style}{\mlastyle@styletrue
219         \mlastyle@formatfalse
220         \mlastyle@underlinefalse}
221 \DeclareOption{singlespacequotes}{
222   \def\mlastyle@qspread{\linespread{1}\normalsize\vskip\baselineskip}}
223 \DeclareOption{doublespacequotes}{\let\mlastyle@qspread\relax}
224 \ExecuteOptions{nobibstyle,nopapersize,mla,cm,doublespacequotes}
225 \ProcessOptions
226 %    \end{macrocode}
227 % If the \Lopt{papersize} option is set, add the appropriate
228 % \textsc{PostScript} special, or adjust |\pdfpagewidth| and
229 % |\pdfpageheight| if pdf\LaTeX{} is in use.
230 %    \begin{macrocode}
231 \ifmlastyle@papersize
232   \ifx\@undefined\pdfpagewidth
233     \special{papersize=\the\paperwidth,\the\paperheight}
234   \else
235     \setlength{\pdfpagewidth}{\paperwidth}
236     \setlength{\pdfpageheight}{\paperheight}
237   \fi
238 \fi % \ifmlastyle@papersize
239 %    \end{macrocode}
240 % If the \Lopt{bibstyle} option is set, specify the bibliography style.
241 %    \begin{macrocode}
242 \ifmlastyle@bibstyle
243   \ifmlastyle@style
244     \bibliographystyle{mlastyle}
245   \else
246     \bibliographystyle{plain}
247   \fi
248 \fi % \ifmlastyle@bibstyle
249 %    \end{macrocode}
250 % Load the \package{ulem} package if the \Lopt{underline} option is set.
251 %    \begin{macrocode}
252 \ifmlastyle@underline
253   \RequirePackage{ulem}
254 \fi % \ifmlastyle@underline
255 %    \end{macrocode}
256 % Load the \package{times} package if the \Lopt{times} option is set.
257 %    \begin{macrocode}
258 \ifmlastyle@times
259   \RequirePackage{times}
260 \fi % \ifmlastyle@times
261 %    \end{macrocode}
262 % \subsection{Macros}
263 % \begin{macro}{\instructor}
264 % Define the instructor, along with an obsolete synonym.
265 %    \begin{macrocode}
266 \def\instructor#1{\gdef\mlastyle@instructor{#1}}
267 \let\professor\instructor
268 %    \end{macrocode}
269 % \end{macro}
270 % \begin{macro}{\course}
271 % Define the course, along with an obsolete synonym.
272 %    \begin{macrocode}
273 \def\course#1{\gdef\mlastyle@course{#1}}
274 \let\classname\course
275 %    \end{macrocode}
276 % \end{macro}
277 % \begin{macro}{\surname}
278 % Define the surname, along with an obsolete synonym.
279 %    \begin{macrocode}
280 \def\surname#1{\gdef\mlastyle@surname{#1}}
281 \let\lastname\surname
282 %    \end{macrocode}
283 % \end{macro}
284 % \subsection{Formatting}
285 % Formatting is only done if the \Lopt{format} option is set.  This is the
286 % default.
287 %    \begin{macrocode}
288 \ifmlastyle@format
289 %    \end{macrocode}
290 % \subsubsection{Macros}
291 % \begin{macro}{\maketitle}
292 % Redefined |\maketitle| generate a heading in MLA format.
293 %    \begin{macrocode}
294   \renewcommand{\maketitle}{\begin{flushleft}
295     \@author\par
296     \@ifundefined{mlastyle@instructor}{}{\mlastyle@instructor}\par
297     \@ifundefined{mlastyle@course}{}{\mlastyle@course}\par
298     \@date\end{flushleft}
299     \begin{center}\@title\end{center}\par
300   }
301 %    \end{macrocode}
302 % \end{macro}
303 % \begin{macro}{\today}
304 % |\today| is redefined to DD~Mon.~YYYY format.
305 %    \begin{macrocode}
306 \def\today{\number\day~\ifcase\month\or
307   Jan.\or Feb.\or Mar.\or Apr.\or May\or June\or July\or 
308   Aug.\or Sept.\or Oct.\or Nov.\or Dec.\fi\ \number\year}
309 %    \end{macrocode}
310 % \end{macro}
311 % \begin{macro}{\slash}
312 % No penalty for |\slash|, and plain /'s permit line breaks if necessary.
313 %    \begin{macrocode}
314   \def\slash{/\penalty\z@}
315   %\let\mlastyle@sl@sh=/
316   \def\mlastyle@slash{/\futurelet\mlastyle@slashnext\mlastyle@slashx}
317   \def\mlastyle@slashx{\ifx\mlastyle@slashnext/\else
318     \penalty\exhyphenpenalty\fi}
319 %    \end{macrocode}
320 % \end{macro}
321 % \begin{macro}{\section}
322 % Sections are formatted by centering the section name and beginning a new
323 % page.  Subsections simply center the section name.
324 %    \begin{macrocode}
325   \renewcommand{\section}{\clearpage\@startsection{section}{1}{\z@
326     }{0pt}{1sp}{\centering}}
327   \renewcommand{\subsection}{\@startsection{subsection}{2}{\z@
328     }{0pt}{1sp}{\centering}}
329 %    \end{macrocode}
330 % \end{macro}
331 % \subsubsection{Environments}
332 % ^^A%\newenvironment{blocks}{\begin{quote} \linespread{1} \small \normalsize}{\end{quote} \linespread{2} \small \normalsize}
333 % ^^A%\newenvironment{blockm}{\begin{quotation} \linespread{1} \small \normalsize}{\end{quotation} \linespread{2} \small \normalsize}
334 % \begin{environment}{verse}
335 % Indented 1 inch, with an additional .25 inch hanging indent.
336 %    \begin{macrocode}
337   \renewenvironment{verse}{\list{}{\mlastyle@qspread
338     \advance\leftmargin.75in\itemindent-.25in
339     \listparindent\itemindent}\item\relax}{\endlist}
340 %    \end{macrocode}
341 % \end{environment}
342 % \begin{environment}{quotation}
343 % Indented 1 inch, with a paragraph indent of an additional .25 inches.
344 %    \begin{macrocode}
345   \renewenvironment{quotation}{\list{}{\mlastyle@qspread
346     \advance\leftmargin.5in\itemindent.25in
347     \listparindent\itemindent}\item\relax}{\endlist}
348 %    \end{macrocode}
349 % \end{environment}
350 % \begin{environment}{quote}
351 % Identical to the |quotation| environment, except the first paragraph is not
352 % indented.
353 %    \begin{macrocode}
354   \renewenvironment{quote}{\list{}{\mlastyle@qspread
355     \advance\leftmargin.5in
356     \listparindent.25in}\item\relax}{\endlist}
357 %    \end{macrocode}
358 % \end{environment}
359 % \begin{environment}{workscited}
360 % Works Cited environment, for compatibility with \package{mla-paper}.
361 %    \begin{macrocode}
362   \newenvironment{workscited}%
363     {\newpage{\centerline{Works Cited}}}{\newpage}
364   \newcommand{\bibent}{\noindent \hangindent .5in}
365 %    \end{macrocode}
366 % \end{environment}
367 % \subsubsection{Margins}
368 % Top and bottom margins are 1 inch each.  The header is flush with the
369 % right margin at .5 inches from the top of the page.
370 % ^^A%\settoheight{\headheight}{\llap{\parbox[b]{\textwidth}{\large\raggedleft Pope}}}
371 %    \begin{macrocode}
372   \setlength{\voffset}{-0.5in}
373   \setlength{\textheight}{\paperheight}
374   \addtolength{\textheight}{-2in}
375   \setlength{\topmargin}{0in}
376   \addtolength{\headheight}{-1pt}
377   \setlength{\headheight}{1.4\headheight}% kludge
378   \setlength{\headsep}{0.5in}
379   \addtolength{\headsep}{-\headheight}
380   \setlength{\footskip}{0.25in}
381   \raggedbottom
382 %    \end{macrocode}
383 % Left and right margins in MLA format are each 1 inch wide.
384 %    \begin{macrocode}
385   \setlength{\hoffset}{-0.5in}
386   \setlength{\textwidth}{\paperwidth}
387   \addtolength{\textwidth}{-2in}
388   \setlength{\oddsidemargin}{0.5in}
389   \setlength{\evensidemargin}{0.5in}
390   \setlength{\marginparwidth}{0.5in}
391 %    \end{macrocode}
392 % \subsubsection{Paragraphs}
393 % Paragraphs should be left justified, with the first line indented .5
394 % inches.
395 %    \begin{macrocode}
396   \raggedright
397   \setlength{\parindent}{.5in}
398 %    \end{macrocode}
399 % MLA format specifies that all paragraphs should be indented, even those
400 % beginning a new section.  This snippet from \package{indentfirst} changes
401 % \LaTeX{} to meet that requirement.
402 %    \begin{macrocode}
403   \let\@afterindentfalse\@afterindenttrue
404   \@afterindenttrue
405 %    \end{macrocode}
406 % Double space {\em everywhere}.
407 % ^^A\RequirePackage{doublespace}
408 %    \begin{macrocode}
409   \linespread{2.0}
410   \leftmargini\parindent
411   \def\@listi{\leftmargin\leftmargini
412   \parsep\z@\itemsep\z@\topsep -3\p@\relax}
413   \let\@listI\@listi
414   \@listi
415   \def\@listii{\leftmargin\leftmarginii
416   \parsep\z@\itemsep\z@\topsep -3\p@\relax}
417   \def\@listiii{\leftmargin\leftmarginiii
418   \parsep\z@\itemsep\z@\topsep -3\p@\relax}
419   \def\@listiv{\leftmargin\leftmarginiv
420   \parsep\z@\itemsep\z@\topsep -3\p@\relax}
421   \def\@listv{\leftmargin\leftmarginv
422   \parsep\z@\itemsep\z@\topsep -3\p@\relax}
423   \def\@listvi{\leftmargin\leftmarginvi
424   \parsep\z@\itemsep\z@\topsep -3\p@\relax}
425 %    \end{macrocode}
426 % \subsubsection{Header}
427 % The last name and page number appear on every page, including the first.
428 %    \begin{macrocode}
429   \RequirePackage{fancyhdr}
430   \fancypagestyle{plain}{\fancyhf{}}
431   \fancypagestyle{mlastyle}{
432     \fancyhf{}
433     \def\sw@llow##1 {}
434     \rhead{\@ifundefined{mlastyle@surname}%
435       {\expandafter\sw@llow\@author}{\mlastyle@surname} \thepage}
436     \renewcommand{\headrulewidth}{0pt}
437     \renewcommand{\footrulewidth}{0pt}
438   }
439   \pagestyle{mlastyle}
440 %    \end{macrocode}
441 % \subsubsection{Notes}
442 % Footnotes should be indented .5 inches; however .56 inches is used
443 % in a crude attempt to compensate for
444 % the alignment provided by the \package{footmisc} package.  Endnotes are
445 % preferred in MLA style anyway, so this should not be a problem in most
446 % circumstances.
447 %    \begin{macrocode}
448   \RequirePackage[ragged,norule]{footmisc}
449   \def\footnotelayout{\linespread{1}\footnotesize\raggedright{} }
450   \footnotemargin .56in
451   \skip\footins=2\baselineskip
452   \footnotesep 1.2\footnotesep
453   \addtolength\footnotesep{\baselineskip}
454   \def\footnotesize{\normalsize}
455 %    \end{macrocode}
456 % ^^A\let\footnoterule\relax
457 % Endnotes are supported, but only if the \package{endnotes} package is
458 % loaded {\em before\/} this package.
459 %    \begin{macrocode}
460   \ifx\@undefined\endnote\else
461     \def\enoteheading{\newpage\section*{\notesname}}
462     \def\enoteformat{\leavevmode\makeenmark{} }
463     \def\enotesize{\normalsize}
464   \fi
465 %    \end{macrocode}
466 % \subsubsection{Miscellaneous}
467 % With all packages loaded, we can now redefine |/|.
468 %    \begin{macrocode}
469   \catcode`/=13
470   \let/=\mlastyle@slash
471 %    \end{macrocode}
472 % The definition of |\thebibliography| varies depending on the document
473 % class.
474 %    \begin{macrocode}
475   \@ifundefined{chapter}
476 %    \end{macrocode}
477 % Article class.
478 %    \begin{macrocode}
479   {
480     \def\thebibliography#1{\newpage\section*{\refname}
481       \list{\@biblabel{\@arabic\c@enumiv}}%
482       {\settowidth\labelwidth{\@biblabel{#1}}}
483       \leftmargin\labelwidth
484       \advance\leftmargin\labelsep
485       \itemindent-\leftmargin
486       \def\newblock{}
487       \usecounter{enumiv}
488       \sloppy%\sfcode`\.=1000\relax
489       }}
490 %    \end{macrocode}
491 % Report/book class.
492 %    \begin{macrocode}
493   {
494     \def\thebibliography#1{\chapter*{\bibname}
495       \list{\@biblabel{\@arabic\c@enumiv}}%
496       {\settowidth\labelwidth{\@biblabel{#1}}}
497       \leftmargin\labelwidth
498       \advance\leftmargin\labelsep
499       \itemindent-\leftmargin
500       \def\newblock{}
501       \usecounter{enumiv}
502       \sloppy%\sfcode`\.=1000\relax
503       }}
504 %    \end{macrocode}
505 % We're done formatting!
506 %    \begin{macrocode}
507 \fi % \ifmlastyle@format
508 %    \end{macrocode}
509 % \subsection{Works Cited}
510 % \begin{macro}{\cite}
511 % The following macros, combined with \file{mlastyle.bst}, provide
512 % for a bibliography in MLA style.  Note that the definition of |\cite|,
513 % |\citeN|, etc.\ vary depending on the options passed to
514 % \package{mlastyle}.
515 %
516 % \begin{macro}{\mlastyle@intcite}
517 % Since the original |\cite| is needed after it is overridden, it is stored
518 % in |\mlastyle@intcite|.
519 %    \begin{macrocode}
520 \let\mlastyle@intcite\cite
521 %    \end{macrocode}
522 % \end{macro}
523 % \begin{macro}{\mlastyle@relax}
524 % This macro does nothing.  Depending on the options, ither |\citeC| or
525 % |\citeM| and its ilk will utilize it.
526 %    \begin{macrocode}
527 \newcommand{\mlastyle@relax}[2][]{}
528 %    \end{macrocode}
529 % \end{macro}
530 % \subsubsection{MLA Style}
531 % \begin{macro}{\citeM}
532 % If the \Lopt{compat} option is {\em not\/} used, the following is
533 % executed.
534 %    \begin{macrocode}
535 \ifmlastyle@style
536   \def\@cite#1#2{(#1\if@tempswa{} #2\fi)}
537   \def\cite{\def\@cite##1##2{(##1\if@tempswa{} ##2\fi)}\mlastyle@intcite}
538   \def\citeN{\def\@cite##1##2{##1\if@tempswa{} ##2\fi}\mlastyle@intcite}
539   \def\citeM{\def\@cite##1##2{ (##1\if@tempswa{} ##2\fi)}\mlastyle@intcite}
540   \def\citepage{\def\@cite##1##2{\if@tempswa(##2)\fi}\mlastyle@intcite}
541   \def\citepageM{\def\@cite##1##2{\if@tempswa{} (##2)\fi}\mlastyle@intcite}
542   \def\citeindirect{\def\@cite##1##2%
543   {(qtd. in ##1\if@tempswa{} ##2\fi)}\mlastyle@intcite}
544   \def\citeindirectM{\def\@cite##1##2%
545   { (qtd. in ##1\if@tempswa{} ##2\fi)}\mlastyle@intcite}
546   \let\citeC\mlastyle@relax
547 %    \end{macrocode}
548 % \end{macro}
549 % \iffalse
550 % Place commas in-between citations in the same |\citeyear|, |\citeyearNP|,
551 % |\citeN|, or |\shortciteN| command.
552 % Use something like |\citeN{ref1,ref2,ref3}| and |\citeN{ref4}| for a list.
553 %
554 % \@citedata and \@citedatax:
555 %  \def\@citedata{%
556 %    \@ifnextchar [{\@tempswatrue\@citedatax}%
557 %                {\@tempswafalse\@citedatax[]}%
558 %  }
559 %  \def\@citedatax[#1]#2{%
560 %  \let\@citea\@empty
561 %  \if@filesw\immediate\write\@auxout{\string\citation{#2}}\fi%
562 %    \def\@citea{}\@cite{\@for\@citeb:=#2\do%
563 %      {\@citea\def\@citea{; }\@ifundefined% by Young
564 %        {b@\@citeb}{{\bf ?}%
565 %        \@warning{Citation `\@citeb' on page \thepage \space undefined}}%
566 %  {\csname b@\@citeb\endcsname}}}{#1}}%
567 % \fi
568 % \begin{macro}{\@citex}
569 % This is the original |\@citex| from \LaTeX{} modified to use semicolons.
570 %    \begin{macrocode}
571 \def\@citex[#1]#2{%
572   \let\@citea\@empty
573   \@cite{\@for\@citeb:=#2\do
574     {\@citea\def\@citea{;\penalty-1\ }%
575      \edef\@citeb{\expandafter\@firstofone\@citeb\@empty}%
576      \if@filesw\immediate\write\@auxout{\string\citation{\@citeb}}\fi
577      \@ifundefined{b@\@citeb}{\mbox{\reset@font\bfseries ?}%
578        \G@refundefinedtrue
579        \@latex@warning
580          {Citation `\@citeb' on page \thepage \space undefined}}%
581        {{\csname b@\@citeb\endcsname}}}}{#1}}
582 %    \end{macrocode}
583 % \end{macro}
584 % \begin{macro}{\@biblabel}
585 % No labels in the bibliography.
586 %    \begin{macrocode}
587   \def\@biblabel#1{#1}
588   \labelsep\z@
589   \let\mlastyle@intbib\thebibliography
590   \def\thebibliography#1{\mlastyle@intbib{#1}
591     \itemindent-\leftmargin\def\@biblabel##1{}}
592 %    \end{macrocode}
593 % \end{macro}
594 % Title the either the bibliography or the references ``Works Cited,''
595 % depending on the document class.
596 %    \begin{macrocode}
597   \@ifundefined{chapter}
598   {\renewcommand\refname{Works Cited}}
599   {\renewcommand\bibname{Works Cited}}
600 %    \end{macrocode}
601 %
602 % ^^A% Define the command \workscited{bib}{style}{nocite}
603 % ^^A%\newcommand{\workscited}[3]{%
604 % ^^A%  \ifx\chapter\@undefined%
605 % ^^A%    \addcontentsline{toc}{chapter}{\bfseries\bibname}% report style
606 % ^^A%  \else
607 % ^^A%    \addcontentsline{toc}{section}{\bfseries\refname}% article style
608 % ^^A%  \fi
609 % ^^A%  \bibliography{#1}\bibliographystyle{#2}\nocite{#3}}
610 % ^^A% \fi
611 % ^^A\newcommand{\annote}[1]{\begin{list}{}{%
612 % ^^A                \setlength{\labelwidth}{0pt}
613 % ^^A                \addtolength{\leftmargin}{\parindent}
614 % ^^A                \setlength{\labelsep}{0pt}}%
615 % ^^A                \item #1 \end{list}}
616 % \subsubsection{Plain Style}
617 % \begin{macro}{\citeC}
618 % This next block is used only if the \Lopt{compat} option is set.
619 %    \begin{macrocode}
620 \else
621   \newcommand{\mlastyle@cite}[2][]{\@tempswafalse\@citex[]{#2}}
622   \let\cite\mlastyle@cite
623   \let\citepage\mlastyle@cite
624   \let\citeindirect\mlastyle@cite
625   \newcommand{\citeC}[2][]{ \@tempswafalse\@citex[]{#2}}
626   \let\citeM\mlastyle@relax
627   \let\citepageM\mlastyle@relax
628   \let\citeindirectM\mlastyle@relax
629 \fi
630 %    \end{macrocode}
631 % \end{macro}
632 % \end{macro}
633 % \iffalse
634 %</package>
635 % \fi
636 %
637 % \Finale
638 \endinput
639 % vim:tw=74