summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/mlacls
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2020-11-07 22:02:21 +0000
committerKarl Berry <karl@freefriends.org>2020-11-07 22:02:21 +0000
commit0e8cdbd09e6e38a97b7b46dc59f16092694276ff (patch)
treece038919be4a770de8a359031d0731d95214dd20 /Master/texmf-dist/tex/latex/mlacls
parent6cdef7b2569f67661d5b2cb99e317da16a7603e9 (diff)
mlacls (7nov20)
git-svn-id: svn://tug.org/texlive/trunk@56874 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/mlacls')
-rw-r--r--Master/texmf-dist/tex/latex/mlacls/mla.cls155
1 files changed, 105 insertions, 50 deletions
diff --git a/Master/texmf-dist/tex/latex/mlacls/mla.cls b/Master/texmf-dist/tex/latex/mlacls/mla.cls
index 6f77f45ef7e..29b8aa704a8 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}
- [2020/08/16 v0.8 MLA Paper Class]
+ [2020/11/07 v0.9 MLA Paper Class]
\LoadClass[letterpaper,12pt]{article}
\newcommand{\mladate}{%
@@ -47,23 +47,38 @@
\newif\ifMLA@seven
\newif\ifMLA@eight
\newif\ifMLA@eightalt
+\newif\ifMLA@figures
+\newif\ifMLA@notes
\newif\ifMLA@microtype
+\newif\ifMLA@paperheader
+\newif\ifMLA@pageheader
+\newif\ifMLA@plainheadings
+\newif\ifMLA@fullpage
\DeclareOption{mla7}{\MLA@seventrue\MLA@eightfalse\MLA@eightaltfalse}
\DeclareOption{mla8}{\MLA@sevenfalse\MLA@eighttrue\MLA@eightaltfalse}
\DeclareOption{mla8alt}{\MLA@sevenfalse\MLA@eightfalse\MLA@eightalttrue}
+\MLA@figurestrue
+\MLA@notestrue
+\DeclareOption{nofigures}{\MLA@figuresfalse}
+\DeclareOption{nonotes}{\MLA@notesfalse}
\DeclareOption{microtype}{\MLA@microtypetrue}
+\MLA@paperheadertrue
+\MLA@pageheadertrue
+\DeclareOption{nopaperheader}{\MLA@paperheaderfalse}
+\DeclareOption{nopageheader}{\MLA@pageheaderfalse}
+\DeclareOption{noheaders}{\MLA@paperheaderfalse\MLA@pageheaderfalse}
+\MLA@plainheadingsfalse
+\DeclareOption{plainheadings}{\MLA@plainheadingstrue}
+\MLA@fullpagefalse
+\DeclareOption{fullpage}{\MLA@fullpagetrue}
\DeclareOption*{%
\ClassWarning{mla}{Unknown option `\CurrentOption'; ignoring}
}
\ExecuteOptions{mla8}
\ProcessOptions\relax
-\RequirePackage{caption}
-\RequirePackage{enotez}
\RequirePackage{enumitem}
\RequirePackage{fancyhdr}
-\RequirePackage{float}
\RequirePackage{fullpage}
-\RequirePackage{graphicx}
\RequirePackage{ragged2e}
\RequirePackage{newtxtext}
\RequirePackage{titlesec}
@@ -83,6 +98,14 @@
\RequirePackage[style=mla,noremoteinfo=false,
showmedium=false,backend=biber]{biblatex}
\fi
+\ifMLA@figures
+ \RequirePackage{caption}
+ \RequirePackage{float}
+ \RequirePackage{graphicx}
+\fi
+\ifMLA@notes
+ \RequirePackage{enotez}
+\fi
\ifMLA@microtype
\RequirePackage{microtype}
\fi
@@ -101,9 +124,14 @@
\setlength{\partopsep}{0em}
\let\@afterindentfalse\@afterindenttrue
\@afterindenttrue
-\widowpenalty=0
-\clubpenalty=0
-\interlinepenalty=0
+\ifMLA@fullpage
+ \widowpenalty=0
+ \clubpenalty=0
+ \interlinepenalty=0
+\else
+ \widowpenalty=10000
+ \clubpenalty=10000
+\fi
\RaggedRight
\renewenvironment{noindent}{%
\edef\tmpind{\parindent}
@@ -121,7 +149,13 @@
\fancyhf{}
\pagestyle{headings}
\pagestyle{norule}
-\fancyhead[RO]{{\StrBehind{\@author}{ }[\last]\last} \thepage}
+\ifMLA@pageheader
+ \ifx\@author\@empty
+ \fancyhead[RO]{\thepage}
+ \else
+ \fancyhead[RO]{{\StrBehind{\@author}{ }[\last]\last} \thepage}
+ \fi
+\fi
\setlength{\headheight}{18pt}
\setlength{\headsep}{12pt}
\setlength{\voffset}{-34pt}
@@ -134,21 +168,30 @@
\date{\mladate}
\newcommand{\makemlaheader}{%
\begin{noindent}
- \@author \\
- \@professor \\
- \@course \\
- \@date \\
- \begin{center}\@title\end{center}
+\ifx\@author\@empty\else\@author\\\fi
+\ifx\@professor\@empty\else\@professor\\\fi
+\ifx\@course\@empty\else\@course\\\fi
+\ifx\@date\@empty\else\@date\\\fi
+ \ifx\@title\@empty\else\begin{center}\@title\end{center}\fi
\end{noindent}
+ % for some reason, this blank line is necessary
}
\renewcommand{\maketitle}{\makemlaheader}
-\AtBeginDocument{\maketitle}
+\ifMLA@paperheader
+ \AtBeginDocument{\maketitle}
+\fi
\renewcommand{\thesection}{\@arabic\c@section}
\renewcommand{\thesubsection}{\thesection.\@arabic\c@subsection}
\renewcommand{\thesubsubsection}{\thesubsection.\@arabic\c@subsubsection}
-\titleformat{\section}[block]{\normalsize\sc}{\thetitle.\enspace}{0pt}{}[]
-\titleformat{\subsection}[block]{\normalsize\sc}{\thetitle.\enspace}{0pt}{}[]
-\titleformat{\subsubsection}[block]{\normalsize\sc}{\thetitle.\enspace}{0pt}{}[]
+\ifMLA@plainheadings
+ \titleformat{\section}[block]{\normalsize}{}{0pt}{}[]
+ \titleformat{\subsection}[block]{\normalsize}{}{0pt}{}[]
+ \titleformat{\subsubsection}[block]{\normalsize}{}{0pt}{}[]
+\else
+ \titleformat{\section}[block]{\normalsize\sc}{\thetitle.\enspace}{0pt}{}[]
+ \titleformat{\subsection}[block]{\normalsize\sc}{\thetitle.\enspace}{0pt}{}[]
+ \titleformat{\subsubsection}[block]{\normalsize\sc}{\thetitle.\enspace}{0pt}{}[]
+\fi
\titlespacing*{\section}{0pt}{0pt}{0pt}
\titlespacing*{\subsection}{0pt}{0pt}{0pt}
\titlespacing*{\subsubsection}{0pt}{0pt}{0pt}
@@ -177,25 +220,33 @@
\endlist
\vspace{-\topsep}
}
-\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.}
+\ifMLA@figures
+ \setlength{\floatsep}{\baselineskip}
+ \setlength{\intextsep}{\baselineskip}
+ \setlength{\textfloatsep}{\baselineskip}
+ \g@addto@macro\@floatboxreset\centering
+\fi
+\ifMLA@figures
+ \renewcommand{\float@endH}{%
+ \vspace{-12pt}
+ \@endfloatbox\vskip\intextsep
+ \if@flstyle\setbox\@currbox\float@makebox\columnwidth\fi
+ \box\@currbox\vskip\intextsep\relax\@doendpe
+ }
+\fi
+\ifMLA@figures
+ \captionsetup{%
+ font={normalfont},
+ labelformat=simple,
+ labelsep=period,
+ position=bottom,
+ aboveskip=6pt,
+ belowskip=-10pt
+ }
+\fi
+\ifMLA@figures
+ \captionsetup[figure]{name=Fig.}
+\fi
\newenvironment{paper}{}{}
\newenvironment{notes}{%
\newpage
@@ -204,19 +255,23 @@
\begin{center}Notes\end{center}
\end{noindent}
}{}
-\newlist{mlanotes}{description}{1}
-\setlist[mlanotes]{%
- parsep=0pt,
- itemsep=0pt,
- topsep=0pt,
- leftmargin=\parindent
-}
-\DeclareInstance{enotez-list}{mla}{list}{%
- heading = {},
- format = \normalsize\normalfont,
- list-type = mlanotes
-}
-\setenotez{list-name={},list-style=mla,backref}
+\ifMLA@notes
+ \newlist{mlanotes}{description}{1}
+ \setlist[mlanotes]{%
+ parsep=0pt,
+ itemsep=0pt,
+ topsep=0pt,
+ leftmargin=\parindent
+ }
+\fi
+\ifMLA@notes
+ \DeclareInstance{enotez-list}{mla}{list}{%
+ heading = {},
+ format = \normalsize\normalfont,
+ list-type = mlanotes
+ }
+ \setenotez{list-name={},list-style=mla,backref}
+\fi
\newenvironment{workscited}{%
\newpage
\begin{noindent}