X-Git-Url: http://git.tpope.net/?p=latex-mlastyle.git;a=blobdiff_plain;f=mlastyle.dtx;h=dc05e324d2a0b97466aead4ea55f67682a2cdd48;hp=d38f36c494a904afd42172d2c9116bc88d890580;hb=43dba4c6f02d747bc217c3ba9426c657d469bb00;hpb=e66984112a684c955a8ea7fd24770cd60827beb4 diff --git a/mlastyle.dtx b/mlastyle.dtx index d38f36c..dc05e32 100644 --- a/mlastyle.dtx +++ b/mlastyle.dtx @@ -1,7 +1,7 @@ % \iffalse meta-comment % -% Copyright (C) 2003 by Scott Pakin -% -------------------------------------------------- +% Copyright (C) 2003 by Tim Pope +% ---------------------------------------------------- % % This file may be distributed and/or modified under the % conditions of the LaTeX Project Public License, either version 1.2 @@ -126,8 +126,8 @@ %\usepackage{mlastyle} % %\author{John Doe} -%\professor{Professor Smith} -%\classname{English 101} +%\instructor{Professor Smith} +%\course{English 101} %\date{1~Jan.\ 1970} %\title{The Futility of Compulsory English Classes} % @@ -137,18 +137,18 @@ %\end{document}\end{verbatim} % \subsection{Initiation Macros} % \DescribeMacro{\maketitle} -% \DescribeMacro{\professor} -% \DescribeMacro{\classname} +% \DescribeMacro{\instuctor} +% \DescribeMacro{\course} % The mandatory heading\index{heading|usage} is generated with % |\maketitle|. Use the standard macros |\author|, |\title|, and |\date| -% to specify the relevant information. To define the professor and name -% of the class, use the aptly named |\professor|\marg{name} and -% |\classname|\marg{class} macros. +% to specify the relevant information. To define the instructor and name +% of the course, use the aptly named |\instructor|\marg{instructor} and +% |\instructor|\marg{course} macros. % -% \DescribeMacro{\lastname} +% \DescribeMacro{\surname} % The last name for use in the header\index{header|usage} is derived from % |\author|. If this does not produce the desired result, use -% |\lastname|\marg{last name} to override it. +% |\surname|\marg{last name} to override it. % % \DescribeMacro{\date} % \DescribeMacro{\today} @@ -178,24 +178,23 @@ % \subsection{Documentating Sources} % % Coupled with \BibTeX, \package{mlastyle} provides a experimental -% implementation of MLA documentation style. Load the bibliography style -% by putting |\bibliographystyle{mlastyle}| in the document preamble. +% implementation of MLA documentation style. Put |\bibstyle{mlastyle}| in +% the document preamble to load the bibliography style. % % \StopEventually{\PrintChanges\PrintIndex} +% +% \section{Implementation} % \iffalse %<*package> % \fi -% \section{Implementation} -% % \subsection{Options} % -% First, the options. +% Most options are implemented by modifying a |\newif| declared for this +% purpose. % \begin{macrocode} \newif\ifmlastyle@bibstyle \DeclareOption{bibstyle}{\mlastyle@bibstyletrue} \DeclareOption{nobibstyle}{\mlastyle@bibstylefalse} -% \end{macrocode} -% \begin{macrocode} \newif\ifmlastyle@papersize \DeclareOption{papersize}{\mlastyle@papersizetrue} \DeclareOption{nopapersize}{\mlastyle@papersizefalse} @@ -261,22 +260,26 @@ \fi % \ifmlastyle@times % \end{macrocode} % \subsection{Macros} -% \begin{macro}{\professor} -% Define the professor. +% \begin{macro}{\instructor} +% Define the instructor, along with an obsolete synonym. % \begin{macrocode} -\def\professor#1{\gdef\theprofessor{#1}} +\def\instructor#1{\gdef\mlastyle@instructor{#1}} +\let\professor\instructor % \end{macrocode} % \end{macro} -% \begin{macro}{\classname} -% Define the class. +% \begin{macro}{\course} +% Define the course, along with an obsolete synonym. % \begin{macrocode} -\def\classname#1{\gdef\theclassname{#1}} +\def\course#1{\gdef\mlastyle@course{#1}} +\let\classname\course % \end{macrocode} % \end{macro} -% \begin{macro}{\lastname} -% Define the last name. +% \begin{macro}{\surname} +% Define the surname, along with an obsolete synonym. % \begin{macrocode} -\def\lastname#1{\gdef\thelastname{#1}} +\def\surname#1{\gdef\mlastyle@surname{#1}} +\def\mlastyle@surname{\def\sw@llow##1 {}\expandafter\sw@llow\@author} +\let\lastname\surname % \end{macrocode} % \end{macro} % \subsection{Formatting} @@ -291,8 +294,8 @@ % \begin{macrocode} \renewcommand{\maketitle}{\begin{flushleft} \@author\par - \@ifundefined{theprofessor}{}{\theprofessor}\par - \@ifundefined{theclassname}{}{\theclassname}\par + \@ifundefined{mlastyle@instructor}{}{\mlastyle@instructor}\par + \@ifundefined{mlastyle@course}{}{\mlastyle@course}\par \@date\end{flushleft} \begin{center}\@title\end{center}\par } @@ -367,12 +370,13 @@ % right margin at .5 inches from the top of the page. % ^^A%\settoheight{\headheight}{\llap{\parbox[b]{\textwidth}{\large\raggedleft Pope}}} % \begin{macrocode} - \setlength{\voffset}{-0.5in} + \addtolength{\voffset}{-0.5in} \setlength{\textheight}{\paperheight} \addtolength{\textheight}{-2in} \setlength{\topmargin}{0in} - \addtolength{\headheight}{-1pt} - \setlength{\headheight}{1.4\headheight}% kludge + %\addtolength{\headheight}{-1pt} + %\setlength{\headheight}{1.4\headheight}% kludge + \setlength\headheight\f@baselineskip \setlength{\headsep}{0.5in} \addtolength{\headsep}{-\headheight} \setlength{\footskip}{0.25in} @@ -380,7 +384,7 @@ % \end{macrocode} % Left and right margins in MLA format are each 1 inch wide. % \begin{macrocode} - \setlength{\hoffset}{-0.5in} + \addtolength{\hoffset}{-0.5in} \setlength{\textwidth}{\paperwidth} \addtolength{\textwidth}{-2in} \setlength{\oddsidemargin}{0.5in} @@ -428,9 +432,7 @@ \fancypagestyle{plain}{\fancyhf{}} \fancypagestyle{mlastyle}{ \fancyhf{} - \def\sw@llow##1 {} - \rhead{\@ifundefined{thelastname}% - {\expandafter\sw@llow\@author}{\thelastname} \thepage} + \rhead{\mlastyle@surname{} \thepage} \renewcommand{\headrulewidth}{0pt} \renewcommand{\footrulewidth}{0pt} } @@ -464,8 +466,8 @@ % \subsubsection{Miscellaneous} % With all packages loaded, we can now redefine |/|. % \begin{macrocode} - \catcode`/=13 - \let/=\mlastyle@slash + %\catcode`/=13 + %\let/=\mlastyle@slash % \end{macrocode} % The definition of |\thebibliography| varies depending on the document % class. @@ -634,3 +636,4 @@ % % \Finale \endinput +% vim:tw=74