summaryrefslogtreecommitdiff
path: root/Master/texmf-dist
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2019-08-11 21:08:57 +0000
committerKarl Berry <karl@freefriends.org>2019-08-11 21:08:57 +0000
commited254354293979dbcd210a012d742be68956efc9 (patch)
tree4203b8e5233b5143cb52531bf131afb3fa491618 /Master/texmf-dist
parent84ff1351b3ee00a1859a4057fc82b1e822cd148d (diff)
mlacls
git-svn-id: svn://tug.org/texlive/trunk@51865 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist')
-rw-r--r--Master/texmf-dist/doc/latex/mlacls/BUGS.md9
-rw-r--r--Master/texmf-dist/doc/latex/mlacls/README.md2
-rw-r--r--Master/texmf-dist/doc/latex/mlacls/mla-example.bib10
-rw-r--r--Master/texmf-dist/doc/latex/mlacls/mla-example.pdfbin61351 -> 2654820 bytes
-rw-r--r--Master/texmf-dist/doc/latex/mlacls/mla-example.tex16
-rw-r--r--Master/texmf-dist/doc/latex/mlacls/mla.pdfbin303085 -> 312047 bytes
-rw-r--r--Master/texmf-dist/source/latex/mlacls/mla.dtx283
-rw-r--r--Master/texmf-dist/tex/latex/mlacls/mla.cls111
8 files changed, 322 insertions, 109 deletions
diff --git a/Master/texmf-dist/doc/latex/mlacls/BUGS.md b/Master/texmf-dist/doc/latex/mlacls/BUGS.md
index 5eb659f1aa6..1c5951a3682 100644
--- a/Master/texmf-dist/doc/latex/mlacls/BUGS.md
+++ b/Master/texmf-dist/doc/latex/mlacls/BUGS.md
@@ -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
---------
diff --git a/Master/texmf-dist/doc/latex/mlacls/README.md b/Master/texmf-dist/doc/latex/mlacls/README.md
index 366d2dca3a6..c2b200f8f2a 100644
--- a/Master/texmf-dist/doc/latex/mlacls/README.md
+++ b/Master/texmf-dist/doc/latex/mlacls/README.md
@@ -31,7 +31,7 @@ To read the documentation, run `mla.dtx` through LaTeX:
$ 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`,
diff --git a/Master/texmf-dist/doc/latex/mlacls/mla-example.bib b/Master/texmf-dist/doc/latex/mlacls/mla-example.bib
index e53fca0b8c7..d725f77e311 100644
--- a/Master/texmf-dist/doc/latex/mlacls/mla-example.bib
+++ b/Master/texmf-dist/doc/latex/mlacls/mla-example.bib
@@ -7,3 +7,13 @@
howpublished = {Web},
urldate = {2019-04-21}
}
+
+@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}
+}
diff --git a/Master/texmf-dist/doc/latex/mlacls/mla-example.pdf b/Master/texmf-dist/doc/latex/mlacls/mla-example.pdf
index 7e824d5147f..43abfb7c375 100644
--- a/Master/texmf-dist/doc/latex/mlacls/mla-example.pdf
+++ b/Master/texmf-dist/doc/latex/mlacls/mla-example.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/mlacls/mla-example.tex b/Master/texmf-dist/doc/latex/mlacls/mla-example.tex
index 1eb78678514..8b9d624c3b0 100644
--- a/Master/texmf-dist/doc/latex/mlacls/mla-example.tex
+++ b/Master/texmf-dist/doc/latex/mlacls/mla-example.tex
@@ -1,4 +1,4 @@
-\documentclass[mla8]{mla}
+\documentclass[mla7,microtype]{mla}
\title{Sample MLA Document}
\author{John Doe}
@@ -65,6 +65,20 @@ work just as expected, even with sublists.
\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.
diff --git a/Master/texmf-dist/doc/latex/mlacls/mla.pdf b/Master/texmf-dist/doc/latex/mlacls/mla.pdf
index b7d11c2f764..2fb4f09ee6d 100644
--- a/Master/texmf-dist/doc/latex/mlacls/mla.pdf
+++ b/Master/texmf-dist/doc/latex/mlacls/mla.pdf
Binary files differ
diff --git a/Master/texmf-dist/source/latex/mlacls/mla.dtx b/Master/texmf-dist/source/latex/mlacls/mla.dtx
index 272a53d9f4a..ba5c6784ab5 100644
--- a/Master/texmf-dist/source/latex/mlacls/mla.dtx
+++ b/Master/texmf-dist/source/latex/mlacls/mla.dtx
@@ -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@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@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}
+\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}
%
@@ -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@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}
@@ -256,7 +280,14 @@
% In this case, one can specify \Dopt{mla8alt}
% to the \Dcls{mla} class.
% \begin{macrocode}
-\DeclareOption{mla8alt}{\def\@optMlaEightAlt}
+\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}
@@ -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,28 +350,42 @@
\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@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@eight
+ \RequirePackage[style=mla-new,noremoteinfo=false,
+ showmedium=false,backend=biber]{biblatex}
+\fi
+\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.
+%
+% \begin{macrocode}
+\RequirePackage{hyperref}
+\hypersetup{hidelinks,pdfusetitle}
% \end{macrocode}
%
% \section{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@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,30 +442,55 @@
% for pretty typesetting.
%
% \begin{macrocode}
-\hyphenpenalty 10000
-\pretolerance 10000
+\hyphenpenalty=10000
+\pretolerance=10000
% \end{macrocode}
%
% \subsection{Paragraphing}
% \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@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@indent} prevents this.
+%
+% \begin{macrocode}
+\newlength{\MLA@indent}
+\setlength{\MLA@indent}{0.5in}
+% \end{macrocode}
+% \end{macro}
%
+%
+% \changes{v0.6}{2019-05-29}{Explicitly set \cs{partopset} to 0pt}
% \begin{macrocode}
-\setlength{\parindent}{0.5in}
-\setlength{\RaggedRightParindent}{\parindent}
+\setlength{\parindent}{\MLA@indent}
+\setlength{\RaggedRightParindent}{\MLA@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@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@indent
}
\setlist[enumerate]{%
parsep=0pt,
itemsep=0pt,
topsep=0pt,
- leftmargin=\parindent
+ leftmargin=\MLA@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@indent}}
% \begin{macrocode}
\renewenvironment{blockquote}{%
- \list{}{\leftmargin 0.5in}
+ \list{}{\leftmargin \MLA@indent}
\item[]
- \setlength{\parindent}{0.5in}
+ \setlength{\parindent}{\MLA@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@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@endH}{%
+ \vspace{-12pt}
+ \@endfloatbox\vskip\intextsep
+ \if@flstyle\setbox\@currbox\float@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@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@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@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@indent}
% \end{macrocode}
%
% \appendix
diff --git a/Master/texmf-dist/tex/latex/mlacls/mla.cls b/Master/texmf-dist/tex/latex/mlacls/mla.cls
index c47907b8a52..2d88ba69bb6 100644
--- a/Master/texmf-dist/tex/latex/mlacls/mla.cls
+++ b/Master/texmf-dist/tex/latex/mlacls/mla.cls
@@ -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,51 +43,68 @@
\fi
\the\year
}
-\DeclareOption{mla7}{\def\@optMlaSeven}
-\DeclareOption{mla8}{\def\@optMlaEight}
-\DeclareOption{mla8alt}{\def\@optMlaEightAlt}
+\newif\ifMLA@seven
+\newif\ifMLA@eight
+\newif\ifMLA@eightalt
+\newif\ifMLA@microtype
+\DeclareOption{mla7}{\MLA@seventrue\MLA@eightfalse\MLA@eightaltfalse}
+\DeclareOption{mla8}{\MLA@sevenfalse\MLA@eighttrue\MLA@eightaltfalse}
+\DeclareOption{mla8alt}{\MLA@sevenfalse\MLA@eightfalse\MLA@eightalttrue}
+\DeclareOption{microtype}{\MLA@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}
\RequirePackage[american]{babel}
\RequirePackage{csquotes}
\RequirePackage{hanging}
-\RequirePackage[hidelinks,pdfusetitle]{hyperref}
-\ifdefined\@optMlaSeven
+\ifMLA@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@eight
+ \RequirePackage[style=mla-new,noremoteinfo=false,
+ showmedium=false,backend=biber]{biblatex}
+\fi
+\ifMLA@eightalt
+ \RequirePackage[style=mla,noremoteinfo=false,
+ showmedium=false,backend=biber]{biblatex}
+\fi
+\ifMLA@microtype
+ \RequirePackage{microtype}
+\fi
+\RequirePackage{hyperref}
+\hypersetup{hidelinks,pdfusetitle}
+\ifMLA@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@indent}
+\setlength{\MLA@indent}{0.5in}
+\setlength{\parindent}{\MLA@indent}
+\setlength{\RaggedRightParindent}{\MLA@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@section}
\renewcommand{\thesubsection}{\thesection.\@arabic\c@subsection}
\renewcommand{\thesubsubsection}{\thesubsection.\@arabic\c@subsubsection}
@@ -140,42 +158,56 @@
parsep=0pt,
itemsep=0pt,
topsep=0pt,
- leftmargin=\parindent
+ leftmargin=\MLA@indent
}
\setlist[enumerate]{%
parsep=0pt,
itemsep=0pt,
topsep=0pt,
- leftmargin=\parindent
+ leftmargin=\MLA@indent
}
\renewenvironment{blockquote}{%
- \list{}{\leftmargin 0.5in}
+ \list{}{\leftmargin \MLA@indent}
\item[]
- \setlength{\parindent}{0.5in}
+ \setlength{\parindent}{\MLA@indent}
\vspace{-\topsep}
}{%
\endlist
\vspace{-\topsep}
}
-\newenvironment{paper}{%
- \makemlaheader
-}{%
- \newpage
+\setlength{\floatsep}{\baselineskip}
+\setlength{\intextsep}{\baselineskip}
+\setlength{\textfloatsep}{\baselineskip}
+\g@addto@macro\@floatboxreset\centering
+\renewcommand{\float@endH}{%
+ \vspace{-12pt}
+ \@endfloatbox\vskip\intextsep
+ \if@flstyle\setbox\@currbox\float@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@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@indent}
\endinput
%%
%% End of file `mla.cls'.