From 0e8cdbd09e6e38a97b7b46dc59f16092694276ff Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Sat, 7 Nov 2020 22:02:21 +0000 Subject: mlacls (7nov20) git-svn-id: svn://tug.org/texlive/trunk@56874 c570f23f-e606-0410-a88d-b1316a301751 --- .../doc/latex/mlacls/mla-example-image.jpg | Bin 0 -> 2591814 bytes Master/texmf-dist/doc/latex/mlacls/mla-example.pdf | Bin 2697315 -> 2697255 bytes Master/texmf-dist/doc/latex/mlacls/mla-example.tex | 6 +- Master/texmf-dist/doc/latex/mlacls/mla.pdf | Bin 301548 -> 326617 bytes Master/texmf-dist/source/latex/mlacls/mla.dtx | 265 +++++++++++++++------ Master/texmf-dist/tex/latex/mlacls/mla.cls | 155 ++++++++---- 6 files changed, 304 insertions(+), 122 deletions(-) create mode 100644 Master/texmf-dist/doc/latex/mlacls/mla-example-image.jpg (limited to 'Master') diff --git a/Master/texmf-dist/doc/latex/mlacls/mla-example-image.jpg b/Master/texmf-dist/doc/latex/mlacls/mla-example-image.jpg new file mode 100644 index 00000000000..526d944c03e Binary files /dev/null and b/Master/texmf-dist/doc/latex/mlacls/mla-example-image.jpg differ diff --git a/Master/texmf-dist/doc/latex/mlacls/mla-example.pdf b/Master/texmf-dist/doc/latex/mlacls/mla-example.pdf index 8bebefb5901..de61b592bf5 100644 Binary files a/Master/texmf-dist/doc/latex/mlacls/mla-example.pdf and b/Master/texmf-dist/doc/latex/mlacls/mla-example.pdf differ diff --git a/Master/texmf-dist/doc/latex/mlacls/mla-example.tex b/Master/texmf-dist/doc/latex/mlacls/mla-example.tex index 0d7bc93f0ff..3d8cc8631fc 100644 --- a/Master/texmf-dist/doc/latex/mlacls/mla-example.tex +++ b/Master/texmf-dist/doc/latex/mlacls/mla-example.tex @@ -2,7 +2,7 @@ \title{Sample MLA Document} \author{John Doe} -\professor{Dr. Suzie Que} +\professor{Dr.\ Suzie Que} \course{\LaTeX\ 101} \date{\mladate} % see docs for `\mladate' @@ -26,7 +26,7 @@ Though this paper is short, section headings are employed as an example of the ``mla'' class' capabilities. Some professors may explicitly require or denounce use of headings. -Dr. Suzie Que of Anytown, PA requires they be used for anything +Dr.\ Suzie Que of Anytown, PA requires they be used for anything longer than five pages: \begin{blockquote} John---so help me God---if you turn in another twenty-page research @@ -90,7 +90,7 @@ Endnotes can be easily printed in correct format by calling \section{Using bibliographies} -Dr. Suzie Que was cited in the above blockquote. +Dr.\ Suzie Que was cited in the above blockquote. The ins-and-outs of ``biblatex'' will not be explained in this document, so please refer to online documentation such as the ``BibLaTeX Cheat Sheet''. diff --git a/Master/texmf-dist/doc/latex/mlacls/mla.pdf b/Master/texmf-dist/doc/latex/mlacls/mla.pdf index a351cac71f0..89794d68a4c 100644 Binary files a/Master/texmf-dist/doc/latex/mlacls/mla.pdf and b/Master/texmf-dist/doc/latex/mlacls/mla.pdf differ diff --git a/Master/texmf-dist/source/latex/mlacls/mla.dtx b/Master/texmf-dist/source/latex/mlacls/mla.dtx index cefa444991a..2ea31fb52fc 100644 --- a/Master/texmf-dist/source/latex/mlacls/mla.dtx +++ b/Master/texmf-dist/source/latex/mlacls/mla.dtx @@ -27,7 +27,7 @@ %\NeedsTeXFormat{LaTeX2e} %\ProvidesClass{mla} %<*mla> - [2020/08/16 v0.8 MLA Paper Class] + [2020/11/07 v0.9 MLA Paper Class] % %<*driver> @@ -47,7 +47,6 @@ \usepackage{verbatim} %% A couple things are cited in the docs -\usepackage{filecontents} \begin{filecontents}{mla.bib} @book{mlahb, author = {{Modern Language Association of America}}, @@ -92,12 +91,7 @@ \DeclareAcronym{SE}{short=SE,long=Stack Exchange} %% For a few different things -%%\usepackage{semantic-markup} -\usepackage{csquotes} -\newcommand{\foreign}[1]{\textit{#1}} -\newcommand{\term}[1]{\textit{#1}} -\newcommand{\soCalled}[1]{\textquote{#1}} -\newcommand{\mentioned}[1]{\textquote{#1}} +\usepackage{semantic-markup} %% Reset footnotes per page \usepackage[perpage]{footmisc} @@ -106,7 +100,7 @@ \interfootnotelinepenalty=10000 %% Technical info -\def\myemail{ssterling@firemail.cc} +\def\myemail{sprice623@aol.com} %% For the sake of consistency, I guess \GlossaryPrologue{\section{Change history}} @@ -137,7 +131,7 @@ % % \fi % -% \CheckSum{299} +% \CheckSum{401} % % \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 @@ -240,19 +234,37 @@ % \begin{macro}{\MLA@seven} % \begin{macro}{\MLA@eight} % \begin{macro}{\MLA@eightalt} +% \begin{macro}{\MLA@figures} +% \begin{macro}{\MLA@notes} % \begin{macro}{\MLA@microtype} +% \begin{macro}{\MLA@paperheader} +% \begin{macro}{\MLA@pageheader} +% \begin{macro}{\MLA@plainheadings} +% \begin{macro}{\MLA@fullpage} % The following are true/false switches to toggle certain features. % % \begin{macrocode} \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 % \end{macrocode} % \end{macro} % \end{macro} % \end{macro} % \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} % % \section{Options} % \label{sec:options} @@ -285,6 +297,17 @@ \DeclareOption{mla8alt}{\MLA@sevenfalse\MLA@eightfalse\MLA@eightalttrue} % \end{macrocode} % +% For those who do not plan on using figures and/or footnotes, +% some time (and dependency disk space) might be saved by using the +% \Dopt{nofigures} and/or \Dopt{nonotes} options, as they are enabled +% by default. +% \begin{macrocode} +\MLA@figurestrue +\MLA@notestrue +\DeclareOption{nofigures}{\MLA@figuresfalse} +\DeclareOption{nonotes}{\MLA@notesfalse} +% \end{macrocode} +% % The \Dpkg{microtype} package can be optionally included % with the \Dopt{microtype} option to offset the pain of using % the Times typeface. @@ -292,6 +315,43 @@ \DeclareOption{microtype}{\MLA@microtypetrue} % \end{macrocode} % +% \changes{v0.9}{2020/10/05}{Added \Dopt{nopaperheader}, +% \Dopt{nopageheader} and \Dopt{noheaders} options to enable +% omission of paper headers, page headers or both paper +% and page headers respectively} +% For rare cases in which the paper and page headers are omitted +% or must be custom, the options \Dopt{nopaperheader} and +% \Dopt{nopageheader} may be used respectively, or +% \Dopt{noheaders} to omit both. +% \begin{macrocode} +\MLA@paperheadertrue +\MLA@pageheadertrue +\DeclareOption{nopaperheader}{\MLA@paperheaderfalse} +\DeclareOption{nopageheader}{\MLA@pageheaderfalse} +\DeclareOption{noheaders}{\MLA@paperheaderfalse\MLA@pageheaderfalse} +% \end{macrocode} +% +% \changes{v0.9}{2020/10/05}{Added \Dopt{plainheadings} option to +% forego small-caps and auto-numbering in section headings} +% For professors and/or writers who desire to format the section +% headings manually and individually (and forego \cs{titleformat\{\}}, +% the \Dopt{plainheadings} option may be used. +% \begin{macrocode} +\MLA@plainheadingsfalse +\DeclareOption{plainheadings}{\MLA@plainheadingstrue} +% \end{macrocode} +% +% \changes{v0.9}{2020/11/07}{Added \Dopt{fullpage} option to explicitly +% allow widows and orphans} +% Another edge case is in which a professor may require strict 24-line +% papers, i.\,e.\ explicitly allowing orphans and widows, enabled using +% the \Dopt{fullpage} option\footnote{In versions of \Dcls{mlacls} +% prior to v0.9, disallowing widows and orphans was default behavior.}. +% \begin{macrocode} +\MLA@fullpagefalse +\DeclareOption{fullpage}{\MLA@fullpagetrue} +% \end{macrocode} +% % \subsection{Processing} % \label{sec:processing} % @@ -330,14 +390,12 @@ % \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} +% \changes{v0.9}{2020/08/20}{Added \Dopt{nofigures} and \Dopt{nonotes} +% options to prevent loading unused dependencies} % \begin{macrocode} -\RequirePackage{caption} -\RequirePackage{enotez} \RequirePackage{enumitem} \RequirePackage{fancyhdr} -\RequirePackage{float} \RequirePackage{fullpage} -\RequirePackage{graphicx} \RequirePackage{ragged2e} \RequirePackage{newtxtext} \RequirePackage{titlesec} @@ -373,6 +431,27 @@ \fi % \end{macrocode} % +% The \Dpkg{caption}, \Dpkg{float} and \Dpkg{graphicx} packages +% are loaded by default, but can be disabled using the +% \Dopt{nofigures} option. +% +% \begin{macrocode} +\ifMLA@figures + \RequirePackage{caption} + \RequirePackage{float} + \RequirePackage{graphicx} +\fi +% \end{macrocode} +% +% Likewise, the \Dpkg{enotez} package can be disabled with +% \Dopt{nonotes}. +% +% \begin{macrocode} +\ifMLA@notes + \RequirePackage{enotez} +\fi +% \end{macrocode} +% % The \Dpkg{microtype} package is loaded if the \Dopt{microtype} % option is specified. % @@ -473,16 +552,24 @@ \@afterindenttrue % \end{macrocode} % -% And, for the sake of consistent 24-line papers, -% orphans and widows are explicitly allowed. +% Orphans and widows are explicitly banned\footnote{According to the +% \ac{MLA} itself: \url{https://style.mla.org/orphaned-words/}}. +% For the odd case in which papers must be consistently 24 lines +% (i.\,e.\ explicitly allowing orphans and widows), the +% \Dopt{fullpage} option may be used (see section~\ref{sec:options}). % % \begin{macrocode} -\widowpenalty=0 -\clubpenalty=0 -\interlinepenalty=0 +\ifMLA@fullpage + \widowpenalty=0 + \clubpenalty=0 + \interlinepenalty=0 +\else + \widowpenalty=10000 + \clubpenalty=10000 +\fi % \end{macrocode} % -% For a final heinous crime against typesetting, +% As a heinous crime against the art of typesetting, % the \citetitle{mlahb} advises flush-left/ragged-right alignment. % (This is acheived with the \Dpkg{ragged2e} package.) % @@ -528,7 +615,9 @@ % \label{sec:running_head} % % The running head in \ac{MLA} style is simply the author's surname -% followed by the current page number, right-aligned. +% (if defined) followed by the current page number, right-aligned, +% unless specified otherwise using the \Dopt{nopageheader} option +% (see section~\ref{sec:options}). % This is managed using the \Dpkg{fancyhdr} and \Dpkg{xstring} packages. % % \begin{macrocode} @@ -539,7 +628,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 % \end{macrocode} % % The following code is largely a hack to align the header @@ -574,7 +669,7 @@ % % \begin{macro}{\professor} % The instructor who assigned the paper, i.e. -% \mentioned{Dr. Marjorie Stewart}. +% \mentioned{Dr.\ Marjorie Stewart}. % % \begin{macrocode} \newcommand*{\professor}[1]{\gdef\@professor{#1}} @@ -610,15 +705,20 @@ % \term{day month year}} % \changes{v0.4.1}{2019/05/15}{Changed date format back to whatever % is inside \cs{@date}} +% \changes{v0.9}{2020/10/05}{Changed to ignore (not print) undefined +% header macros} +% \changes{v0.9}{2020/10/05}{Fix weird bug where paragraph immediately +% after \cs{begin\{paper\}} (with no newline) is not indented} % \begin{macrocode} \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 } % \end{macrocode} % \end{macro} @@ -630,12 +730,16 @@ \renewcommand{\maketitle}{\makemlaheader} % \end{macrocode} % -% Finally, the header will print at the beginning of every document. +% Finally, the header will print at the beginning of every document +% unless specified otherwise using the \Dopt{nopaperheader} option +% (see section~\ref{sec:options}). % % \changes{v0.5}{2019/05/18}{Moved header-printing process to % \cs{AtBeginDocument}} % \begin{macrocode} -\AtBeginDocument{\maketitle} +\ifMLA@paperheader + \AtBeginDocument{\maketitle} +\fi % \end{macrocode} % % \subsection{Sectioning} @@ -643,6 +747,8 @@ % % \changes{v0.7}{2019/08/30}{Replaced regular space after dot % in section headings with \cs{enspace}} +% \changes{v0.8}{2020/08/16}{Removed extraneous spacing and newlines +% in section headings} % \begin{macro}{\section} % \changes{v0.2}{2019/05/02}{Changed heading to small-caps} % \begin{macro}{\subsection} @@ -659,7 +765,12 @@ % the popular, oft-referenced \ac{OWL}: \citeurl{owlmla}.}. % % However, for the sake of clarity, the section headings in this class -% will be set in small-caps. +% will be set in small-caps by default. +% Plain, unnumbered and entirely unformatted section headings can +% be acheived using the \Dopt{plainheadings} option +% (see section~\ref{sec:options}). +% For custom headings other than these, refer to the +% \Dpkg{fancyhdr} package documentation. % % \begin{macrocode} \renewcommand{\thesection}{\@arabic\c@section} @@ -670,12 +781,16 @@ % Un-fancifying the headings is acheived using % the \Dpkg{titlesec} package. % -% \changes{v0.8}{2020/08/16}{Removed extraneous spacing and newlines -% in section headings} % \begin{macrocode} -\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} @@ -761,15 +876,17 @@ % seems customary and logical. % % \begin{macrocode} -\setlength{\floatsep}{\baselineskip} -\setlength{\intextsep}{\baselineskip} -\setlength{\textfloatsep}{\baselineskip} -\g@addto@macro\@floatboxreset\centering +\ifMLA@figures + \setlength{\floatsep}{\baselineskip} + \setlength{\intextsep}{\baselineskip} + \setlength{\textfloatsep}{\baselineskip} + \g@addto@macro\@floatboxreset\centering +\fi % \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.}, +% 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 @@ -777,12 +894,14 @@ % \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 -} +\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 % \end{macrocode} % % \end{environment} @@ -795,21 +914,25 @@ % \Dpkg{caption} package. % % \begin{macrocode} -\captionsetup{% - font={normalfont}, - labelformat=simple, - labelsep=period, - position=bottom, - aboveskip=6pt, - belowskip=-10pt -} +\ifMLA@figures + \captionsetup{% + font={normalfont}, + labelformat=simple, + labelsep=period, + position=bottom, + aboveskip=6pt, + belowskip=-10pt + } +\fi % \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.} +\ifMLA@figures + \captionsetup[figure]{name=Fig.} +\fi % \end{macrocode} % % \end{environment} @@ -865,25 +988,29 @@ % This is acheived with the \Dpkg{enumitem} package. % % \begin{macrocode} -\newlist{mlanotes}{description}{1} -\setlist[mlanotes]{% - parsep=0pt, - itemsep=0pt, - topsep=0pt, - leftmargin=\parindent -} +\ifMLA@notes + \newlist{mlanotes}{description}{1} + \setlist[mlanotes]{% + parsep=0pt, + itemsep=0pt, + topsep=0pt, + leftmargin=\parindent + } +\fi % \end{macrocode} % % The following initializes the \Dpkg{enotez} package to use % the \Dlst{mlanotes} list format. % % \begin{macrocode} -\DeclareInstance{enotez-list}{mla}{list}{% - heading = {}, - format = \normalsize\normalfont, - list-type = mlanotes -} -\setenotez{list-name={},list-style=mla,backref} +\ifMLA@notes + \DeclareInstance{enotez-list}{mla}{list}{% + heading = {}, + format = \normalsize\normalfont, + list-type = mlanotes + } + \setenotez{list-name={},list-style=mla,backref} +\fi % \end{macrocode} % % \subsubsection{Bibliography} 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} -- cgit v1.2.3