...
 
Commits (9)
......@@ -27,7 +27,7 @@
%<mla>\NeedsTeXFormat{LaTeX2e}
%<mla>\ProvidesClass{mla}
%<*mla>
[2019/05/29 v0.6 MLA Paper Class]
[2019/09/30 v0.7 MLA Paper Class]
%</mla>
%<*driver>
......@@ -137,7 +137,7 @@
%
% \fi
%
% \CheckSum{294}
% \CheckSum{286}
%
% \CharacterTable
% {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
......@@ -214,6 +214,7 @@
% (see section~\ref{sec:the_header}).
%
% \changes{v0.2}{2019/05/02}{Added macro}
% \changes{v0.7}{2019/08/30}{Added August to month list}
% \begin{macrocode}
\newcommand{\mladate}{%
\the\day\
......@@ -225,6 +226,7 @@
\or May
\or June
\or July
\or August
\or September
\or October
\or November
......@@ -235,26 +237,22 @@
% \end{macrocode}
% \end{macro}
%
% The following commands will toggle the on/off status of certain
% features and options by defining and un-defining certain macros.
% \begin{macro}{\MLA@seven}
% \begin{macro}{\MLA@eight}
% \begin{macro}{\MLA@eightalt}
% \begin{macro}{\MLA@microtype}
% The following are true/false switches to toggle certain features.
%
% \begin{macrocode}
\newcommand{\useMlaSeven}{%
\def\@useMlaSeven
\let\@useMlaEight\undefined
\let\@useMlaEightAlt\undefined
}
\newcommand{\useMlaEight}{%
\let\@useMlaSeven\undefined
\def\@useMlaEight
\let\@useMlaEightAlt\undefined
}
\newcommand{\useMlaEightAlt}{%
\let\@useMlaSeven\undefined
\let\@useMlaEight\undefined
\def\@useMlaEightAlt
}
\newif\ifMLA@seven
\newif\ifMLA@eight
\newif\ifMLA@eightalt
\newif\ifMLA@microtype
% \end{macrocode}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
%
% \section{Options}
% \label{sec:options}
......@@ -271,9 +269,11 @@
% contradiction and undefined behavior}
% \changes{v0.5}{2019/05/21}{Changed options parser to use
% toggle-switch commands in the style of default \LaTeX\ classes}
% \changes{v0.7}{2019/05/30}{Changed options parser to use
% \cs{ifMLA@\ldots} toggle format seen in other classes}
% \begin{macrocode}
\DeclareOption{mla7}{\useMlaSeven}
\DeclareOption{mla8}{\useMlaEight}
\DeclareOption{mla7}{\MLA@seventrue\MLA@eightfalse\MLA@eightaltfalse}
\DeclareOption{mla8}{\MLA@sevenfalse\MLA@eighttrue\MLA@eightaltfalse}
% \end{macrocode}
%
% \changes{v0.3}{2019/05/07}{Added \Dopt{mla8alt} option}
......@@ -282,7 +282,14 @@
% In this case, one can specify \Dopt{mla8alt}
% to the \Dcls{mla} class.
% \begin{macrocode}
\DeclareOption{mla8alt}{\useMlaEightAlt}
\DeclareOption{mla8alt}{\MLA@sevenfalse\MLA@eightfalse\MLA@eightalttrue}
% \end{macrocode}
%
% The \Dpkg{microtype} package can be optionally included
% with the \Dopt{microtype} option to offset the pain of using
% the Times typeface.
% \begin{macrocode}
\DeclareOption{microtype}{\MLA@microtypetrue}
% \end{macrocode}
%
% \subsection{Processing}
......@@ -321,6 +328,8 @@
% \changes{v0.6}{2019/05/29}{Added \Dpkg{caption} package}
% \changes{v0.6}{2019/05/29}{Added \Dpkg{graphicx} package}
% \changes{v0.6}{2019/05/29}{Added \Dpkg{float} package}
% \changes{v0.7}{2019/06/01}{Changed \Dpkg{microtype} package
% to only load through \Dopt{microtype} class option}
% \begin{macrocode}
\RequirePackage{caption}
\RequirePackage{enotez}
......@@ -329,9 +338,7 @@
\RequirePackage{float}
\RequirePackage{fullpage}
\RequirePackage{graphicx}
\RequirePackage{indentfirst}
\RequirePackage{ragged2e}
\RequirePackage{microtype}
\RequirePackage{newtxtext}
\RequirePackage{titlesec}
\RequirePackage{xstring}
......@@ -352,20 +359,29 @@
% \Dpkg{biblatex}, hence the \term{if-then} clauses.
%
% \begin{macrocode}
\ifdefined\@useMlaSeven
\ifMLA@seven
\RequirePackage[style=mla,noremoteinfo=false,showmedium=true,
backend=biber]{biblatex}
\fi
\ifdefined\@useMlaEight
\ifMLA@eight
\RequirePackage[style=mla-new,noremoteinfo=false,
showmedium=false,backend=biber]{biblatex}
\fi
\ifdefined\@useMlaEightAlt
\ifMLA@eightalt
\RequirePackage[style=mla,noremoteinfo=false,
showmedium=false,backend=biber]{biblatex}
\fi
% \end{macrocode}
%
% The \Dpkg{microtype} package is loaded if the \Dopt{microtype}
% option is specified.
%
% \begin{macrocode}
\ifMLA@microtype
\RequirePackage{microtype}
\fi
% \end{macrocode}
%
% For some reason, common practice is to load \Dpkg{hyperref} last
% of all packages.
%
......@@ -392,7 +408,7 @@
% \subsubsection{Microtype}
% \label{sec:microtype}
%
% The \Dpkg{microtype} package (as loaded in
% The \Dpkg{microtype} package (if loaded as in
% section~\ref{sec:loading_packages})
% will marginally offset the burden of using Times
% by correcting its ugly kerning and tracking.
......@@ -401,7 +417,9 @@
%
% \changes{v0.4}{2019/05/12}{Disabled \Dpkg{microtype} protrusion}
% \begin{macrocode}
\microtypesetup{activate=false}
\ifMLA@microtype
\microtypesetup{activate=false}
\fi
% \end{macrocode}
%
% \subsection{Line breaking and spacing}
......@@ -434,7 +452,7 @@
% \label{sec:paragraphing}
%
% The \citetitle{mlahb} specifies half-inch first-line indentation
% for each paragraph and no extra spacing in between.
% for every paragraph and no extra spacing in between.
%
% \changes{v0.6}{2019-05-29}{Explicitly set \cs{partopset} to 0pt}
% \begin{macrocode}
......@@ -445,6 +463,16 @@
\setlength{\partopsep}{0em}
% \end{macrocode}
%
% \TeX\ does not indent the first paragraph after headings by default.
% Thankfully, the fix for this is simple.
%
% \changes{v0.7}{2019/05/31}{Copied code from \Dpkg{indentfirst}
% to reduce dependency count}
% \begin{macrocode}
\let\@afterindentfalse\@afterindenttrue
\@afterindenttrue
% \end{macrocode}
%
% And, for the sake of consistent 24-line papers,
% orphans and widows are explicitly allowed.
%
......@@ -613,6 +641,8 @@
% \subsection{Sectioning}
% \label{sec:sectioning}
%
% \changes{v0.7}{2019/08/30}{Replaced regular space after dot
% in section headings with \cs{enspace}}
% \begin{macro}{\section}
% \changes{v0.2}{2019/05/02}{Changed heading to small-caps}
% \begin{macro}{\subsection}
......@@ -647,17 +677,12 @@
\titlespacing*{\section}{0pt}{0pt}{0pt}
\titlespacing*{\subsection}{0pt}{0pt}{0pt}
\titlespacing*{\subsubsection}{0pt}{0pt}{0pt}
\titlelabel{\thetitle. }
\titlelabel{\thetitle.\enspace}
% \end{macrocode}
% \end{macro}
% \end{macro}
% \end{macro}
%
% Under default configuration, \TeX\ doesn't indent the
% first paragraph after a section heading, violating \ac{MLA} style.
% The solution \Dpkg{indentfirst} package was already loaded
% in section~\ref{sec:loading_packages}.
%
% \subsection{Lists}
% \label{sec:lists}
%
......@@ -867,6 +892,7 @@
% \changes{v0.2}{2019/04/28}{Countered unexplained vertical space
% after heading}
% \changes{v0.5}{2019/05/18}{Moved \cs{newpage} to beginning of environment}
% \changes{v0.7}{2019/08/30}{Changed correction spacing from 16pt to 10pt}
% \begin{macrocode}
\newenvironment{workscited}{%
\newpage
......@@ -874,7 +900,7 @@
\pdfbookmark[0]{Works Cited}{workscited}
\begin{center}Works Cited\end{center}
\end{noindent}
\vspace{-16pt} % XXX to counter unexplained space
\vspace{-10pt} % XXX to counter unexplained space
}{}
% \end{macrocode}
% \end{environment}
......