% \begin{macrocode}
\def\surname#1{\gdef\mlastyle@surname{#1}}
\def\mlastyle@surname{\def\ml@##1 ##2,##3@@{##2}%
- \expandafter\ml@\@author, ,@@}
+ \def\and##1 {\unskip, }\expandafter\ml@\@author, ,@@}
\let\lastname\surname
% \end{macrocode}
% \end{macro}
% \subsection{Style}
% \begin{macro}{\bibstyle@mlastyle}
% This first block is the beginnings of an implementation for
-% \package{natbib}. Surely there is a better way.
+% \package{natbib}. (Surely there is a better way.)
% \begin{macrocode}
\newcommand{\bibstyle@mlastyle}{%
\bibpunct[\mlastyle@space]{\mlastyle@brack(}{\mlastyle@brack)}%
- {;}{a}{\mlastyle@comma}{,}
+ {\unskip;}{a}{\mlastyle@comma}{,}
\gdef\mlastyle@brack##1{\ifx\NAT@date\mlastyle@notitle
\ifmlastyle@pages ##1\else\ifNAT@swa\ifnum
\NAT@ctype=0 ##1\else\unskip\fi\else\unskip\fi\fi\else ##1\fi}
\gdef\mlastyle@comma{\ifx\NAT@date\mlastyle@notitle\else,\fi}
- \gdef\mlastyle@space{\ifx\NAT@date\mlastyle@notitle{}\else{} \fi}
\gdef\mlastyle@space{\ifx\NAT@date\mlastyle@notitle
- \ifnum\NAT@ctype<2
- \ifNAT@par\ifNAT@swa{} \fi\else{} \fi\fi\else{} \fi}
+ \ifnum\NAT@ctype=1{} \fi\else{} \fi}
+% \ifNAT@par\ifNAT@swa{} \fi\else{} \fi\fi\else{} \fi}
\gdef\citetext##1{(##1)}
\@ifundefined{chapter}
{\gdef\refname{Works Cited}}
% This hack represents an empty title in the MLA bibliography style.
% \begin{macrocode}
\def\mlastyle@notitle
- { \ \ \ \ \unskip\unskip\unskip\unskip\unskip\unskip}
+ { \ \ \ \ \unskip\unskip\unskip\unskip\unskip}
\RequirePackage{natbib}
\newif\ifmlastyle@pages
\renewcommand\NAT@citetp
% \begin{macrocode}
\let\cite\citep
\let\mlastyle@citequeue\empty
- %\newcommand\citeflush{\ifx\mlastyle@citequeue\@empty\unskip
- %\else\citetext{\mlastyle@citequeue}\global
- %\let\mlastyle@citequeue\@empty\fi}
- %\newcommand\citeadd[2][]{\ifx\mlastyle@citequeue\@empty
- %\protected@xdef\mlastyle@citequeue{\citealp[#1]{#2}}\else
- %\protected@xdef\mlastyle@citequeue{\mlastyle@citequeue\NAT@sep
- %\ {\citealp[#1]{#2}}\fi}
+ \def\mlastyle@cite#1#2#3{\csname#1\endcsname[#2]{#3}}
+ \newcommand\citeflush{\ifhmode\unskip\fi
+ \ifx\mlastyle@citequeue\@empty\else{} \let\@citea\relax
+ \citetext{\@for\@citeb:=\mlastyle@citequeue\do{\@citea
+ \expandafter\mlastyle@cite\@citeb\def\@citea{\NAT@sep\ }}}%
+ \global\let\mlastyle@citequeue\@empty\fi}
+ \newcommand\mlastyle@citeadd[3]{\ifx\mlastyle@citequeue\@empty
+ \xdef\mlastyle@citequeue{{#1}{#2}{#3}}\else
+ \xdef\mlastyle@citequeue{\mlastyle@citequeue,%
+ {#1}{#2}{#3}}\fi}
+ \newcommand\citeadd[2][]{\mlastyle@citeadd{citealp}{#1}{#2}}
+ \newcommand\citea{\@ifstar
+ {\let\mlastyle@star*\mlastyle@citea}
+ {\let\mlastyle@star\empty\mlastyle@citea}}
+ \newcommand\mlastyle@citea[2][]{\expandafter\citeauthor
+ \mlastyle@star{#2}\mlastyle@citeadd{citeyear}{#1}{#2}}
+ \newcommand\Citea{\@ifstar
+ {\let\mlastyle@star*\mlastyle@Citea}
+ {\let\mlastyle@star\empty\mlastyle@Citea}}
+ \newcommand\mlastyle@Citea[2][]{\expandafter\Citeauthor
+ \mlastyle@star{#2}\mlastyle@citeadd{citeyear}{#1}{#2}}
\newcommand\citepage[2][]{\citeyearpar[#1]{#2}}
\newcommand\citepageM[2][]{\unskip{} \citeyearpar[#1]{#2}}
\newcommand\citeindirect[2][]{\citep[qtd.\ in][#1]{#2}}