Added \urldate and \theurldate
[latex-mlastyle.git] / mlastyle.dtx
index 8c3cc7a6d21466f64443c98b8ad683aea1a83b96..038c4510a86057ff27df8795ecf5628524ebe4a5 100644 (file)
@@ -128,7 +128,7 @@ Schlegl",
 % \DoNotIndex{\@arabic}
 % \DoNotIndex{\@author}
 % \DoNotIndex{\@auxout}
-% \DoNotIndex{\@citea,\@citeb,\@citex}
+% \DoNotIndex{\@biblabel,\@citea,\@citeb,\@citex}
 % \DoNotIndex{\@date}
 % \DoNotIndex{\@empty}
 % \DoNotIndex{\@for}
@@ -226,6 +226,7 @@ Schlegl",
 % \DoNotIndex{\mlastyle@formattrue}
 % \DoNotIndex{\mlastyle@instructor}
 % \DoNotIndex{\mlastyle@intbib}
+% \DoNotIndex{\mlastyle@intnfs}
 % \DoNotIndex{\mlastyle@pagesfalse}
 % \DoNotIndex{\mlastyle@pagestrue}
 % \DoNotIndex{\mlastyle@papersizefalse}
@@ -235,6 +236,7 @@ Schlegl",
 % \DoNotIndex{\mlastyle@slash}
 % \DoNotIndex{\mlastyle@slashnext}
 % \DoNotIndex{\mlastyle@slashx}
+% \DoNotIndex{\mlastyle@star}
 % \DoNotIndex{\mlastyle@stylefalse}
 % \DoNotIndex{\mlastyle@styletrue}
 % \DoNotIndex{\mlastyle@surname}
@@ -242,6 +244,7 @@ Schlegl",
 % \DoNotIndex{\mlastyle@timestrue}
 % \DoNotIndex{\mlastyle@underlinefalse}
 % \DoNotIndex{\mlastyle@underlinetrue}
+% \DoNotIndex{\mlastyle@urldate}
 % \DoNotIndex{\month}
 % \DoNotIndex{\newblock}
 % \DoNotIndex{\newcommand}
@@ -622,15 +625,26 @@ Schlegl",
 \let\lastname\surname
 %    \end{macrocode}
 % \end{macro}
-
+% \begin{macro}{\urldate}
+% \begin{macro}{\theurldate}
+% These next two respectively set and get the default access date for URLs
+% in the works cited.
+%    \begin{macrocode}
+\def\urldate#1{\gdef\mlastyle@urldate{#1}}
+\def\theurldate{\mlastyle@urldate}
+\let\mlastyle@urldate\@date
+%    \end{macrocode}
+% \end{macro}
+% \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 to do this.)
 %    \begin{macrocode}
 \newcommand{\bibstyle@mlastyle}{%
-  \bibpunct[\mlastyle@space]{\mlastyle@brack(}{\mlastyle@brack)}%
-    {\unskip;}{a}{\mlastyle@comma}{,}
+  \bibpunct[ ]{(}{)}{;}{a}{,}{,}
+  %\bibpunct[\mlastyle@space]{\mlastyle@brack(}{\mlastyle@brack)}%
+  %  {\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}
@@ -758,16 +772,22 @@ Schlegl",
 % \end{macro}
 % \end{macro}
 % \subsection{Formatting}
-% Formatting is done if the \Lopt{mla} or \Lopt{format} option is set.
+% \begin{macro}{\urlstyle@mlastyle}
+% This first bit is always done, even if formatting is disabled.
 %    \begin{macrocode}
-\ifmlastyle@format
 %    \end{macrocode}
+% \end{macro}
 % \begin{macro}{\mlastyle@i}
 % This is the standard MLA format indent.
 %    \begin{macrocode}
   \newdimen\mlastyle@i \mlastyle@i=.5in
 %    \end{macrocode}
 % \end{macro}
+% Everything else is done only if the \Lopt{mla} or \Lopt{format} option
+% is set.
+%    \begin{macrocode}
+\ifmlastyle@format
+%    \end{macrocode}
 % \subsubsection{Macros}
 % \begin{macro}{\maketitle}
 % \begin{macro}{\and}
@@ -974,7 +994,6 @@ Schlegl",
 % \subsubsection{Bibliography}
 % \begin{macro}{\url@mlastyle}
 % |\url| is needed to format urls in the bibliography.
-% Are |\UrlBreakPenalty| and |\UrlBigBreakPenalty| reversed?
 %    \begin{macrocode}
 \RequirePackage{url}
 \def\url@mlastyle{\url@samestyle