texlive[51865] Master/texmf-dist: mlacls

commits+karl at tug.org commits+karl at tug.org
Sun Aug 11 23:08:58 CEST 2019


Revision: 51865
          http://tug.org/svn/texlive?view=revision&revision=51865
Author:   karl
Date:     2019-08-11 23:08:57 +0200 (Sun, 11 Aug 2019)
Log Message:
-----------
mlacls

Modified Paths:
--------------
    trunk/Master/texmf-dist/doc/latex/mlacls/BUGS.md
    trunk/Master/texmf-dist/doc/latex/mlacls/README.md
    trunk/Master/texmf-dist/doc/latex/mlacls/mla-example.bib
    trunk/Master/texmf-dist/doc/latex/mlacls/mla-example.pdf
    trunk/Master/texmf-dist/doc/latex/mlacls/mla-example.tex
    trunk/Master/texmf-dist/doc/latex/mlacls/mla.pdf
    trunk/Master/texmf-dist/source/latex/mlacls/mla.dtx
    trunk/Master/texmf-dist/tex/latex/mlacls/mla.cls

Modified: trunk/Master/texmf-dist/doc/latex/mlacls/BUGS.md
===================================================================
--- trunk/Master/texmf-dist/doc/latex/mlacls/BUGS.md	2019-08-11 20:37:58 UTC (rev 51864)
+++ trunk/Master/texmf-dist/doc/latex/mlacls/BUGS.md	2019-08-11 21:08:57 UTC (rev 51865)
@@ -1,8 +1,13 @@
 Bugs
 ====
 
-* Specifying both options `mla7` and `mla8` doesn't return an error,
-  but instead falls back to `mla7`.
+* Not really a bug, but specifying more than one of `mla7`, `mla8`
+  or `mla8alt` will simply use the last one specified.
+  Example: options `mla7,mla8alt` will use `mla8alt`, and
+  `mla8,mla7` will use `mla7`.
+  This is normal behavior in most classes, but I thought
+  I ought to specify this somewhere before someone somehow
+  gets confused.
 
 Reporting
 ---------

Modified: trunk/Master/texmf-dist/doc/latex/mlacls/README.md
===================================================================
--- trunk/Master/texmf-dist/doc/latex/mlacls/README.md	2019-08-11 20:37:58 UTC (rev 51864)
+++ trunk/Master/texmf-dist/doc/latex/mlacls/README.md	2019-08-11 21:08:57 UTC (rev 51865)
@@ -31,7 +31,7 @@
 $ pdflatex mla.dtx
 $ gv mla.dtx
 ```
-(If you're getting this package from [CTAN](https://ctan.org),
+(If you're getting this package from [CTAN](https://ctan.org/pkg/mlacls),
 a file called `mla.pdf` should already be provided.)
 
 For an example file, refer to `mla-example.tex` and `mla-example.bib`,

Modified: trunk/Master/texmf-dist/doc/latex/mlacls/mla-example.bib
===================================================================
--- trunk/Master/texmf-dist/doc/latex/mlacls/mla-example.bib	2019-08-11 20:37:58 UTC (rev 51864)
+++ trunk/Master/texmf-dist/doc/latex/mlacls/mla-example.bib	2019-08-11 21:08:57 UTC (rev 51865)
@@ -7,3 +7,13 @@
     howpublished = {Web},
     urldate = {2019-04-21}
 }
+
+ at online{price2018,
+    author = {Seth Price},
+    title = {Spruce Knob Overlook},
+    publisher = {Instagram},
+    date = {2018-07-20},
+    howpublished = {Web},
+    url = {https://www.instagram.com/p/Bleocv-hknc/},
+    urldate = {2019-05-29}
+}

Modified: trunk/Master/texmf-dist/doc/latex/mlacls/mla-example.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/mlacls/mla-example.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/mlacls/mla-example.tex	2019-08-11 20:37:58 UTC (rev 51864)
+++ trunk/Master/texmf-dist/doc/latex/mlacls/mla-example.tex	2019-08-11 21:08:57 UTC (rev 51865)
@@ -1,4 +1,4 @@
-\documentclass[mla8]{mla}
+\documentclass[mla7,microtype]{mla}
 
 \title{Sample MLA Document}
 \author{John Doe}
@@ -65,6 +65,20 @@
 \item Okay, now it's the last item.
 \end{itemize}
 
+\section{Figures}
+
+On rare occasions, you might have to use figures or tables
+in your paper.
+Good news is the ``figure'' and ``table'' environments
+work exactly as expected!
+Just make sure to use ``\textbackslash{}begin\{figure\}[H]''
+if you want the image to stay exactly where you put it.
+\begin{figure}[H]
+\includegraphics[width=0.5\linewidth]{mla-example-image}
+\caption{A scene from atop Spruce Knob, West Virginia}
+\end{figure}
+And yes, I shamelessly used my own image.
+
 \section{Using endnotes}
 
 As one may notice, the above subsection used an endnote.

Modified: trunk/Master/texmf-dist/doc/latex/mlacls/mla.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/source/latex/mlacls/mla.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/mlacls/mla.dtx	2019-08-11 20:37:58 UTC (rev 51864)
+++ trunk/Master/texmf-dist/source/latex/mlacls/mla.dtx	2019-08-11 21:08:57 UTC (rev 51865)
@@ -27,7 +27,7 @@
 %<mla>\NeedsTeXFormat{LaTeX2e}
 %<mla>\ProvidesClass{mla}
 %<*mla>
-    [2019/05/18 v0.4.1 MLA Paper Class]
+    [2019/05/29 v0.6 MLA Paper Class]
 %</mla>
 
 %<*driver>
@@ -46,16 +46,6 @@
 %% Needed for the appendix
 \usepackage{verbatim}
 
-%% Fancy PDF
-\usepackage[hidelinks]{hyperref}
-\hypersetup{
-    pdfinfo={
-        Title=The MLA class,
-        Author=Seth Price,
-        Creator=LaTeX
-    }
-}
-
 %% A couple things are cited in the docs
 \usepackage{filecontents}
 \begin{filecontents}{mla.bib}
@@ -99,6 +89,7 @@
 \DeclareAcronym{OWL}{short=OWL,long=Purdue Online Writing Lab}
 \DeclareAcronym{PDF}{short=PDF,long=Portable Document Format}
 \DeclareAcronym{LPPL}{short=LPPL,long=\LaTeX\ Project Public License}
+\DeclareAcronym{SE}{short=SE,long=Stack Exchange}
 
 %% For a few different things
 %%\usepackage{semantic-markup}
@@ -111,16 +102,28 @@
 %% Reset footnotes per page
 \usepackage[perpage]{footmisc}
 
+%% Keep footnotes from breaking across pages
+\interfootnotelinepenalty=10000
+
 %% Technical info
 \def\myemail{ssterling at firemail.cc}
 
 %% For the sake of consistency, I guess
-\GlossaryPrologue{\pdfbookmark[0]{Change history}{ch}
-	\section*{Change history}}
+\GlossaryPrologue{\section{Change history}}
 
 %% Everything just looks better, in my opinion
 \usepackage{microtype}
 
+%% Fancy PDF
+\usepackage[hidelinks]{hyperref}
+\hypersetup{
+    pdfinfo={
+        Title=The MLA class,
+        Author=Seth Price,
+        Creator=LaTeX
+    }
+}
+
 %% Comment this if you don't want to produce a changelog
 \AtEndDocument{\PrintChanges}
 
@@ -134,7 +137,7 @@
 %
 % \fi
 %
-% \CheckSum{231}
+% \CheckSum{291}
 %
 % \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
@@ -232,6 +235,23 @@
 %    \end{macrocode}
 % \end{macro}
 %
+% \begin{macro}{\MLA at seven}
+% \begin{macro}{\MLA at eight}
+% \begin{macro}{\MLA at eightalt}
+% \begin{macro}{\MLA at microtype}
+% The following are true/false switches to toggle certain features.
+%
+%    \begin{macrocode}
+\newif\ifMLA at seven
+\newif\ifMLA at eight
+\newif\ifMLA at eightalt
+\newif\ifMLA at microtype
+%    \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
 % \section{Options}
 % \label{sec:options}
 %
@@ -245,9 +265,13 @@
 %
 % \changes{v0.3}{2019/05/06}{Improved options parsing to avoid
 %	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}{\def\@optMlaSeven}
-\DeclareOption{mla8}{\def\@optMlaEight}
+\DeclareOption{mla7}{\MLA at seventrue\MLA at eightfalse\MLA at eightaltfalse}
+\DeclareOption{mla8}{\MLA at sevenfalse\MLA at eighttrue\MLA at eightaltfalse}
 %    \end{macrocode}
 %
 % \changes{v0.3}{2019/05/07}{Added \Dopt{mla8alt} option}
@@ -256,9 +280,16 @@
 % In this case, one can specify \Dopt{mla8alt}
 % to the \Dcls{mla} class.
 %    \begin{macrocode}
-\DeclareOption{mla8alt}{\def\@optMlaEightAlt}
+\DeclareOption{mla8alt}{\MLA at sevenfalse\MLA at eightfalse\MLA at 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 at microtypetrue}
+%    \end{macrocode}
+%
 % \subsection{Processing}
 % \label{sec:processing}
 %
@@ -292,14 +323,20 @@
 %	with \Dpkg{newtxtext}}
 % \changes{v0.4}{2019/05/11}{Added \Dpkg{microtype} package}
 % \changes{v0.4}{2019/05/12}{Added \Dpkg{enumitem} package}
+% \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}
 \RequirePackage{enumitem}
 \RequirePackage{fancyhdr}
+\RequirePackage{float}
 \RequirePackage{fullpage}
-\RequirePackage{indentfirst}
+\RequirePackage{graphicx}
 \RequirePackage{ragged2e}
-\RequirePackage{microtype}
 \RequirePackage{newtxtext}
 \RequirePackage{titlesec}
 \RequirePackage{xstring}
@@ -313,30 +350,44 @@
 \RequirePackage[american]{babel}
 \RequirePackage{csquotes}
 \RequirePackage{hanging}
-\RequirePackage[hidelinks,pdfusetitle]{hyperref}
 %    \end{macrocode}
 %
 % And finally, \Dpkg{biblatex}.
 % The \Dcls{mla} class options dictate what options are passed to
 % \Dpkg{biblatex}, hence the \term{if-then} clauses.
-% Due to the nature of the code, earlier editions specified
-% will override later versions (this will later be fixed).
 %
 %    \begin{macrocode}
-\ifdefined\@optMlaSeven
+\ifMLA at seven
     \RequirePackage[style=mla,noremoteinfo=false,showmedium=true,
                     backend=biber]{biblatex}
-\else
-    \ifdefined\@optMlaEightAlt
-        \RequirePackage[style=mla,noremoteinfo=false,
-                        showmedium=false,backend=biber]{biblatex}
-    \else\ifdefined\@optMlaEight
-        \RequirePackage[style=mla-new,noremoteinfo=false,
-                        showmedium=false,backend=biber]{biblatex}
-    \fi\fi
 \fi
+\ifMLA at eight
+    \RequirePackage[style=mla-new,noremoteinfo=false,
+                    showmedium=false,backend=biber]{biblatex}
+\fi
+\ifMLA at 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 at microtype
+    \RequirePackage{microtype}
+\fi
+%    \end{macrocode}
+%
+% For some reason, common practice is to load \Dpkg{hyperref} last
+% of all packages.
+%
+%    \begin{macrocode}
+\RequirePackage{hyperref}
+\hypersetup{hidelinks,pdfusetitle}
+%    \end{macrocode}
+%
 % \section{Document layout}
 % \label{sec:document_layout}
 %
@@ -355,7 +406,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.
@@ -364,7 +415,9 @@
 %
 % \changes{v0.4}{2019/05/12}{Disabled \Dpkg{microtype} protrusion}
 %    \begin{macrocode}
-\microtypesetup{activate=false}
+\ifMLA at microtype
+    \microtypesetup{activate=false}
+\fi
 %    \end{macrocode}
 %
 % \subsection{Line breaking and spacing}
@@ -379,7 +432,7 @@
 % To compensate, line spacing is set to \emph{just enough}:
 %
 % \changes{v0.4}{2019/05/08}{Changed \cs{linespacing} to
-%	prints 24 lines per page}
+%	print 24 lines per page}
 %    \begin{macrocode}
 \linespread{1.905}
 %    \end{macrocode}
@@ -389,8 +442,8 @@
 % for pretty typesetting.
 %
 %    \begin{macrocode}
-\hyphenpenalty 10000
-\pretolerance 10000
+\hyphenpenalty=10000
+\pretolerance=10000
 %    \end{macrocode}
 %
 % \subsection{Paragraphing}
@@ -397,22 +450,47 @@
 % \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.
 %
+% \begin{macro}{\MLA at indent}
+% \changes{v0.7}{2019/06/05}{Added macro}
+% In case the indent should be changed, several other macros relying
+% on it might be broken.
+% Using an internal like \cs{MLA at indent} prevents this.
+%
 %    \begin{macrocode}
-\setlength{\parindent}{0.5in}
-\setlength{\RaggedRightParindent}{\parindent}
+\newlength{\MLA at indent}
+\setlength{\MLA at indent}{0.5in}
+%    \end{macrocode}
+% \end{macro}
+%
+%
+% \changes{v0.6}{2019-05-29}{Explicitly set \cs{partopset} to 0pt}
+%    \begin{macrocode}
+\setlength{\parindent}{\MLA at indent}
+\setlength{\RaggedRightParindent}{\MLA at indent}
 \setlength{\parskip}{0em}
 \setlength{\topsep}{0em}
+\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.
 %
 %    \begin{macrocode}
-\widowpenalty 0
-\clubpenalty 0
-\interlinepenalty 0
+\widowpenalty=0
+\clubpenalty=0
+\interlinepenalty=0
 %    \end{macrocode}
 %
 % For a final heinous crime against typesetting,
@@ -563,6 +641,14 @@
 \renewcommand{\maketitle}{\makemlaheader}
 %    \end{macrocode}
 %
+% Finally, the header will print at the beginning of every document.
+%
+% \changes{v0.5}{2019/05/18}{Moved header-printing process to
+%	\cs{AtBeginDocument}}
+%    \begin{macrocode}
+\AtBeginDocument{\maketitle}
+%    \end{macrocode}
+%
 % \subsection{Sectioning}
 % \label{sec:sectioning}
 %
@@ -606,11 +692,6 @@
 % \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}
 %
@@ -618,6 +699,7 @@
 % \changes{v0.4}{2019/05/12}{Added list type}
 % \begin{environment}{enumerate}
 % \changes{v0.4}{2019/05/12}{Added list type}
+% \changes{v0.7}{2019/06/05}{Changed length to use \cs{MLA at indent}}
 % To the user, \Dlst{itemize} and \Dlst{enumerate} lists
 % will function exactly as expected.
 % However, the formatting of the lists must be modified as to
@@ -631,13 +713,13 @@
     parsep=0pt,
     itemsep=0pt,
     topsep=0pt,
-    leftmargin=\parindent
+    leftmargin=\MLA at indent
 }
 \setlist[enumerate]{%
     parsep=0pt,
     itemsep=0pt,
     topsep=0pt,
-    leftmargin=\parindent
+    leftmargin=\MLA at indent
 }
 %    \end{macrocode}
 % \end{environment}
@@ -654,11 +736,12 @@
 %
 % \changes{v0.2}{2019/04/28}{Countered unexplained vertical space
 %	after environment}
+% \changes{v0.7}{2019/06/05}{Changed length to use \cs{MLA at indent}}
 %    \begin{macrocode}
 \renewenvironment{blockquote}{%
-    \list{}{\leftmargin 0.5in}
+    \list{}{\leftmargin \MLA at indent}
     \item[]
-    \setlength{\parindent}{0.5in}
+    \setlength{\parindent}{\MLA at indent}
     \vspace{-\topsep}
 }{%
     \endlist
@@ -667,6 +750,76 @@
 %    \end{macrocode}
 % \end{environment}
 %
+% \subsection{Figures and tables}
+% \label{sec:figures}
+%
+% The \citetitle{mlahb} doesn't specify much of anything about
+% the actual formatting of figures or tables or their captions,
+% so the following is mostly based on the package author's
+% personal preference and observations.
+%
+% \begin{environment}{figure}
+% \changes{v0.6}{2019/05/29}{Properly formatted}
+% \begin{environment}{table}
+% \changes{v0.6}{2019/05/29}{Properly formatted}
+%
+% Centered figures with margins the equivalent of one line of text
+% seems customary and logical.
+%
+%    \begin{macrocode}
+\setlength{\floatsep}{\baselineskip}
+\setlength{\intextsep}{\baselineskip}
+\setlength{\textfloatsep}{\baselineskip}
+\g at addto@macro\@floatboxreset\centering
+%    \end{macrocode}
+%
+% Thanks to a bug inherited from the \Dpkg{here} package
+% which has remained unfixed since 1987\footnote{See the \cs{par}
+% on p. 11, line 249 of \Dfile{ltfloat.dtx} from the \LaTeX\ kernel.},
+% there is not only extra space after the figure but the inability to
+% insert a figure within a paragraph.
+% Miraculously, there is a fix for this\footnote{See David Carlisle's
+% answer on \TeX\ \acs{SE}:
+% \url{https://tex.stackexchange.com/a/310793}}.
+%
+%    \begin{macrocode}
+\renewcommand{\float at endH}{%
+    \vspace{-12pt}
+    \@endfloatbox\vskip\intextsep
+    \if at flstyle\setbox\@currbox\float at makebox\columnwidth\fi
+    \box\@currbox\vskip\intextsep\relax\@doendpe
+}
+%    \end{macrocode}
+%
+% \end{environment}
+% \end{environment}
+% 
+% \begin{environment}{caption}
+% \changes{v0.6}{2019/05/29}{Properly formatted}
+%
+% Un-fancifying the caption is acheived using the
+% \Dpkg{caption} package.
+%
+%    \begin{macrocode}
+\captionsetup{%
+    font={normalfont},
+    labelformat=simple,
+    labelsep=period,
+    position=bottom,
+    aboveskip=6pt,
+    belowskip=-10pt
+}
+%    \end{macrocode}
+%
+% In the author's personal experience, most \ac{MLA}-style papers
+% use \mentioned{Fig.} and not \mentioned{Figure}.
+%
+%    \begin{macrocode}
+\captionsetup[figure]{name=Fig.}
+%    \end{macrocode}
+%
+% \end{environment}
+%
 % \subsection{Paper sections}
 % \label{sec:paper_sections}
 %
@@ -675,14 +828,12 @@
 %
 % \begin{environment}{paper}
 % The main content; the body.
-% This environment produces the \ac{MLA} header at the top.
+% This environment exists only for a logical division and does
+% nothing special.
 %
+% \changes{v0.5}{2019/05/18}{Removed \cs{newpage}}
 %    \begin{macrocode}
-\newenvironment{paper}{%
-    \makemlaheader
-}{%
-    \newpage
-}
+\newenvironment{paper}{}{}
 %    \end{macrocode}
 % \end{environment}
 %
@@ -702,15 +853,16 @@
 % \changes{v0.4}{2019/05/12}{Changed default endnotes format
 %	to \Dlst{mla}}
 % \changes{v0.4}{2019/05/12}{Removed extra \cs{vspace}}
+% \changes{v0.5}{2019/05/18}{Moved \cs{newpage} to beginning of environment}
+% \changes{v0.7}{2019/06/05}{Changed length to use \cs{MLA at indent}}
 %    \begin{macrocode}
 \newenvironment{notes}{%
+    \newpage
     \begin{noindent}
         \pdfbookmark[0]{Notes}{notes}
         \begin{center}Notes\end{center}
     \end{noindent}
-}{%
-    \newpage
-}
+}{}
 %    \end{macrocode}
 % \end{environment}
 %
@@ -725,7 +877,7 @@
     parsep=0pt,
     itemsep=0pt,
     topsep=0pt,
-    leftmargin=\parindent
+    leftmargin=\MLA at indent
 }
 %    \end{macrocode}
 %
@@ -751,16 +903,17 @@
 %
 % \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/06/05}{Changed length to use \cs{MLA at indent}}
 %    \begin{macrocode}
 \newenvironment{workscited}{%
+    \newpage
     \begin{noindent}
         \pdfbookmark[0]{Works Cited}{workscited}
         \begin{center}Works Cited\end{center}
     \end{noindent}
     \vspace{-16pt} % XXX to counter unexplained space
-}{%
-    \newpage
-}
+}{}
 %    \end{macrocode}
 % \end{environment}
 %
@@ -770,7 +923,7 @@
 % defined by the \Dpkg{biblatex} package.
 %
 %    \begin{macrocode}
-\setlength{\bibhang}{\parindent}
+\setlength{\bibhang}{\MLA at indent}
 %    \end{macrocode}
 %
 % \appendix

Modified: trunk/Master/texmf-dist/tex/latex/mlacls/mla.cls
===================================================================
--- trunk/Master/texmf-dist/tex/latex/mlacls/mla.cls	2019-08-11 20:37:58 UTC (rev 51864)
+++ trunk/Master/texmf-dist/tex/latex/mlacls/mla.cls	2019-08-11 21:08:57 UTC (rev 51865)
@@ -23,7 +23,7 @@
 
 \NeedsTeXFormat{LaTeX2e}
 \ProvidesClass{mla}
-    [2019/05/18 v0.4.1 MLA Paper Class]
+    [2019/05/29 v0.6 MLA Paper Class]
 
 \LoadClass[letterpaper,12pt]{article}
 \newcommand{\mladate}{%
@@ -43,21 +43,27 @@
     \fi
     \the\year
 }
-\DeclareOption{mla7}{\def\@optMlaSeven}
-\DeclareOption{mla8}{\def\@optMlaEight}
-\DeclareOption{mla8alt}{\def\@optMlaEightAlt}
+\newif\ifMLA at seven
+\newif\ifMLA at eight
+\newif\ifMLA at eightalt
+\newif\ifMLA at microtype
+\DeclareOption{mla7}{\MLA at seventrue\MLA at eightfalse\MLA at eightaltfalse}
+\DeclareOption{mla8}{\MLA at sevenfalse\MLA at eighttrue\MLA at eightaltfalse}
+\DeclareOption{mla8alt}{\MLA at sevenfalse\MLA at eightfalse\MLA at eightalttrue}
+\DeclareOption{microtype}{\MLA at microtypetrue}
 \DeclareOption*{%
     \ClassWarning{mla}{Unknown option `\CurrentOption'; ignoring}
 }
 \ExecuteOptions{mla8}
 \ProcessOptions\relax
+\RequirePackage{caption}
 \RequirePackage{enotez}
 \RequirePackage{enumitem}
 \RequirePackage{fancyhdr}
+\RequirePackage{float}
 \RequirePackage{fullpage}
-\RequirePackage{indentfirst}
+\RequirePackage{graphicx}
 \RequirePackage{ragged2e}
-\RequirePackage{microtype}
 \RequirePackage{newtxtext}
 \RequirePackage{titlesec}
 \RequirePackage{xstring}
@@ -64,30 +70,41 @@
 \RequirePackage[american]{babel}
 \RequirePackage{csquotes}
 \RequirePackage{hanging}
-\RequirePackage[hidelinks,pdfusetitle]{hyperref}
-\ifdefined\@optMlaSeven
+\ifMLA at seven
     \RequirePackage[style=mla,noremoteinfo=false,showmedium=true,
                     backend=biber]{biblatex}
-\else
-    \ifdefined\@optMlaEightAlt
-        \RequirePackage[style=mla,noremoteinfo=false,
-                        showmedium=false,backend=biber]{biblatex}
-    \else\ifdefined\@optMlaEight
-        \RequirePackage[style=mla-new,noremoteinfo=false,
-                        showmedium=false,backend=biber]{biblatex}
-    \fi\fi
 \fi
-\microtypesetup{activate=false}
+\ifMLA at eight
+    \RequirePackage[style=mla-new,noremoteinfo=false,
+                    showmedium=false,backend=biber]{biblatex}
+\fi
+\ifMLA at eightalt
+    \RequirePackage[style=mla,noremoteinfo=false,
+                    showmedium=false,backend=biber]{biblatex}
+\fi
+\ifMLA at microtype
+    \RequirePackage{microtype}
+\fi
+\RequirePackage{hyperref}
+\hypersetup{hidelinks,pdfusetitle}
+\ifMLA at microtype
+    \microtypesetup{activate=false}
+\fi
 \linespread{1.905}
-\hyphenpenalty 10000
-\pretolerance 10000
-\setlength{\parindent}{0.5in}
-\setlength{\RaggedRightParindent}{\parindent}
+\hyphenpenalty=10000
+\pretolerance=10000
+\newlength{\MLA at indent}
+\setlength{\MLA at indent}{0.5in}
+\setlength{\parindent}{\MLA at indent}
+\setlength{\RaggedRightParindent}{\MLA at indent}
 \setlength{\parskip}{0em}
 \setlength{\topsep}{0em}
-\widowpenalty 0
-\clubpenalty 0
-\interlinepenalty 0
+\setlength{\partopsep}{0em}
+\let\@afterindentfalse\@afterindenttrue
+\@afterindenttrue
+\widowpenalty=0
+\clubpenalty=0
+\interlinepenalty=0
 \RaggedRight
 \renewenvironment{noindent}{%
     \edef\tmpind{\parindent}
@@ -126,6 +143,7 @@
     \end{noindent}
 }
 \renewcommand{\maketitle}{\makemlaheader}
+\AtBeginDocument{\maketitle}
 \renewcommand{\thesection}{\@arabic\c at section}
 \renewcommand{\thesubsection}{\thesection.\@arabic\c at subsection}
 \renewcommand{\thesubsubsection}{\thesubsection.\@arabic\c at subsubsection}
@@ -140,42 +158,56 @@
     parsep=0pt,
     itemsep=0pt,
     topsep=0pt,
-    leftmargin=\parindent
+    leftmargin=\MLA at indent
 }
 \setlist[enumerate]{%
     parsep=0pt,
     itemsep=0pt,
     topsep=0pt,
-    leftmargin=\parindent
+    leftmargin=\MLA at indent
 }
 \renewenvironment{blockquote}{%
-    \list{}{\leftmargin 0.5in}
+    \list{}{\leftmargin \MLA at indent}
     \item[]
-    \setlength{\parindent}{0.5in}
+    \setlength{\parindent}{\MLA at indent}
     \vspace{-\topsep}
 }{%
     \endlist
     \vspace{-\topsep}
 }
-\newenvironment{paper}{%
-    \makemlaheader
-}{%
-    \newpage
+\setlength{\floatsep}{\baselineskip}
+\setlength{\intextsep}{\baselineskip}
+\setlength{\textfloatsep}{\baselineskip}
+\g at addto@macro\@floatboxreset\centering
+\renewcommand{\float at endH}{%
+    \vspace{-12pt}
+    \@endfloatbox\vskip\intextsep
+    \if at flstyle\setbox\@currbox\float at makebox\columnwidth\fi
+    \box\@currbox\vskip\intextsep\relax\@doendpe
 }
+\captionsetup{%
+    font={normalfont},
+    labelformat=simple,
+    labelsep=period,
+    position=bottom,
+    aboveskip=6pt,
+    belowskip=-10pt
+}
+\captionsetup[figure]{name=Fig.}
+\newenvironment{paper}{}{}
 \newenvironment{notes}{%
+    \newpage
     \begin{noindent}
         \pdfbookmark[0]{Notes}{notes}
         \begin{center}Notes\end{center}
     \end{noindent}
-}{%
-    \newpage
-}
+}{}
 \newlist{mlanotes}{description}{1}
 \setlist[mlanotes]{%
     parsep=0pt,
     itemsep=0pt,
     topsep=0pt,
-    leftmargin=\parindent
+    leftmargin=\MLA at indent
 }
 \DeclareInstance{enotez-list}{mla}{list}{%
     heading = {},
@@ -184,15 +216,14 @@
 }
 \setenotez{list-name={},list-style=mla,backref}
 \newenvironment{workscited}{%
+    \newpage
     \begin{noindent}
         \pdfbookmark[0]{Works Cited}{workscited}
         \begin{center}Works Cited\end{center}
     \end{noindent}
     \vspace{-16pt} % XXX to counter unexplained space
-}{%
-    \newpage
-}
-\setlength{\bibhang}{\parindent}
+}{}
+\setlength{\bibhang}{\MLA at indent}
 \endinput
 %%
 %% End of file `mla.cls'.



More information about the tex-live-commits mailing list