From 5b2ab1c7e44689b07f900be82bcc32899b6acf48 Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Sat, 18 May 2019 21:15:28 +0000 Subject: mlacls (18may19) git-svn-id: svn://tug.org/texlive/trunk@51157 c570f23f-e606-0410-a88d-b1316a301751 --- Master/texmf-dist/source/latex/mlacls/mla.dtx | 124 ++++++++++++++++++++++---- 1 file changed, 108 insertions(+), 16 deletions(-) (limited to 'Master/texmf-dist/source/latex/mlacls') diff --git a/Master/texmf-dist/source/latex/mlacls/mla.dtx b/Master/texmf-dist/source/latex/mlacls/mla.dtx index 41c17781920..272a53d9f4a 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> - [2019/05/07 v0.3 MLA Paper Class] + [2019/05/18 v0.4.1 MLA Paper Class] % %<*driver> @@ -38,6 +38,7 @@ \newcommand*{\Dfile}[1]{\texttt{#1}} \newcommand*{\Dopt}[1]{\textsf{\small #1}} \newcommand*{\Dctr}[1]{\textsl{\small #1}} +\newcommand*{\Dlst}[1]{\texttt{#1}} \newcommand*{\Denv}[1]{\texttt{#1}} \newcommand*{\Dcls}[1]{\textsf{#1}} \newcommand*{\Dpkg}[1]{\textsf{#1}} @@ -117,6 +118,9 @@ \GlossaryPrologue{\pdfbookmark[0]{Change history}{ch} \section*{Change history}} +%% Everything just looks better, in my opinion +\usepackage{microtype} + %% Comment this if you don't want to produce a changelog \AtEndDocument{\PrintChanges} @@ -130,7 +134,7 @@ % % \fi % -% \CheckSum{0} +% \CheckSum{231} % % \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 @@ -183,7 +187,9 @@ % and version 1.3c or later is part of all distributions % of \LaTeX\ version 2008/05/04 or later. % +% \microtypesetup{protrusion=false} % \tableofcontents +% \microtypesetup{protrusion=true} % % \StopEventually{} ^^A % @@ -200,7 +206,9 @@ % \begin{macro}{\mladate} % The \citetitle{mlahb} requires use of the \term{day month year} % date format, not \TeX 's standard \term{month day, year}. -% The macro \cs{mladate} will format \cs{date} accordingly. +% The macro \cs{mladate} will format \cs{today} accordingly +% to be used as the default value for \cs{date} +% (see section~\ref{sec:the_header}). % % \changes{v0.2}{2019/05/02}{Added macro} % \begin{macrocode} @@ -282,12 +290,16 @@ % % \changes{v0.3}{2019/05/07}{Replaced obsolete \Dpkg{times} package % with \Dpkg{newtxtext}} +% \changes{v0.4}{2019/05/11}{Added \Dpkg{microtype} package} +% \changes{v0.4}{2019/05/12}{Added \Dpkg{enumitem} package} % \begin{macrocode} \RequirePackage{enotez} +\RequirePackage{enumitem} \RequirePackage{fancyhdr} \RequirePackage{fullpage} \RequirePackage{indentfirst} \RequirePackage{ragged2e} +\RequirePackage{microtype} \RequirePackage{newtxtext} \RequirePackage{titlesec} \RequirePackage{xstring} @@ -340,6 +352,21 @@ % \ac{MLA} format\footnote{According to the popular, oft-referenced % \ac{OWL}: \citeurl{owlmla}.}. % +% \subsubsection{Microtype} +% \label{sec:microtype} +% +% The \Dpkg{microtype} package (as loaded in +% section~\ref{sec:loading_packages}) +% will marginally offset the burden of using Times +% by correcting its ugly kerning and tracking. +% The vague \Dopt{activate=false} below simply disables +% protrusion, maintaining original line and page breaks. +% +% \changes{v0.4}{2019/05/12}{Disabled \Dpkg{microtype} protrusion} +% \begin{macrocode} +\microtypesetup{activate=false} +% \end{macrocode} +% % \subsection{Line breaking and spacing} % \label{sec:line_breaking} % @@ -351,8 +378,10 @@ % and likely following versions as well.} produces 24. % 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} % \begin{macrocode} -\linespread{1.99} +\linespread{1.905} % \end{macrocode} % % Though not explicitly denounced in the \citetitle{mlahb}, @@ -461,8 +490,20 @@ % \subsection{The header} % \label{sec:the_header} % +% \begin{macro}{\title} +% \begin{macro}{\author} +% \begin{macro}{\date} % The \cs{title}, \cs{author} and \cs{date} macros work as expected. -% The following, however, are unique to the \Dcls{mla} class. +% However, if your surname contains a space, you must contain the +% surname in braces as such: +% {\small |\author{Ludwig {van Beethoven}}|}. +% This keeps the full surname in the running head (see +% section~\ref{sec:running_head}). +% \end{macro} +% \end{macro} +% \end{macro} +% +% The following header commands are unique to the \Dcls{mla} class. % % \begin{macro}{\professor} % The instructor who assigned the paper, i.e. @@ -483,30 +524,32 @@ % \end{macro} % % To prevent undefined behavior, the internal macros used -% to store the above information are set empty (except for \cs{date}). +% to store the above information are set empty, except for \cs{date}. +% (Note the use of \cs{mladate}; see section~\ref{sec:initial_code}.) % % \begin{macrocode} \title{} \author{} \professor{} \course{} -\date{\today} +\date{\mladate} % \end{macrocode} % % \begin{macro}{\makemlaheader} % This command finally prints out the standard four-line % \ac{MLA} header, as well as the title. -% (Note the use of \cs{mladate}; see section~\ref{sec:initial_code}.) % % \changes{v0.2}{2019/05/02}{Changed date format to % \term{day month year}} +% \changes{v0.4.1}{2019/05/15}{Changed date format back to whatever +% is inside \cs{@date}} % \begin{macrocode} \newcommand{\makemlaheader}{% \begin{noindent} \@author \\ \@professor \\ \@course \\ - \mladate \\ + \@date \\ \begin{center}\@title\end{center} \end{noindent} } @@ -568,6 +611,38 @@ % The solution \Dpkg{indentfirst} package was already loaded % in section~\ref{sec:loading_packages}. % +% \subsection{Lists} +% \label{sec:lists} +% +% \begin{environment}{itemize} +% \changes{v0.4}{2019/05/12}{Added list type} +% \begin{environment}{enumerate} +% \changes{v0.4}{2019/05/12}{Added list type} +% 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 +% preserve double-spacing and adhere to +% common practice\footnote{According to the \ac{MLA} itself: +% \url{https://style.mla.org/vertical-lists-in-mla-style/}.}; +% these changes are acheived using the \Dpkg{enumitem} package. +% +% \begin{macrocode} +\setlist[itemize]{% + parsep=0pt, + itemsep=0pt, + topsep=0pt, + leftmargin=\parindent +} +\setlist[enumerate]{% + parsep=0pt, + itemsep=0pt, + topsep=0pt, + leftmargin=\parindent +} +% \end{macrocode} +% \end{environment} +% \end{environment} +% % \subsection{Block quotation} % \label{sec:block_quoatation} % @@ -622,31 +697,48 @@ % \changes{v0.2}{2019/04/28}{Added environment} % \changes{v0.2}{2019/04/28}{Countered unexplained vertical space % after heading} +% \changes{v0.4}{2019/05/12}{Changed endnotes list type to +% custom \Dlst{mlaendnotes} list} +% \changes{v0.4}{2019/05/12}{Changed default endnotes format +% to \Dlst{mla}} +% \changes{v0.4}{2019/05/12}{Removed extra \cs{vspace}} % \begin{macrocode} \newenvironment{notes}{% \begin{noindent} \pdfbookmark[0]{Notes}{notes} \begin{center}Notes\end{center} \end{noindent} - \vspace{-16pt} % XXX to counter unexplained space }{% \newpage } % \end{macrocode} % \end{environment} % -% The following code is to format endnotes per -% common practice\footnote{According to the popular, oft-referenced -% \ac{OWL}: \citeurl{owlendnotes}.} -% when using the \Dpkg{enotez} package. +% To correctly format endnotes per common practice\footnote{According +% to the popular, oft-referenced \ac{OWL}: \citeurl{owlendnotes}.}, +% a custom \Dlst{mlanotes} list type will be created. +% This is acheived with the \Dpkg{enumitem} package. +% +% \begin{macrocode} +\newlist{mlanotes}{description}{1} +\setlist[mlanotes]{% + parsep=0pt, + itemsep=0pt, + topsep=0pt, + leftmargin=\parindent +} +% \end{macrocode} +% +% The following initializes the \Dpkg{enotez} package to use +% the \Dlst{mlanotes} list format. % % \begin{macrocode} -\setenotez{list-name={}} \DeclareInstance{enotez-list}{mla}{list}{% heading = {}, format = \normalsize\normalfont, - list-type = description + list-type = mlanotes } +\setenotez{list-name={},list-style=mla,backref} % \end{macrocode} % % \subsubsection{Bibliography} -- cgit v1.2.3