diff options
author | Norbert Preining <norbert@preining.info> | 2020-03-20 03:01:17 +0000 |
---|---|---|
committer | Norbert Preining <norbert@preining.info> | 2020-03-20 03:01:17 +0000 |
commit | c720a4409b388fa706f3eb1ce275f76f7d49d996 (patch) | |
tree | d9e0864c856e4b7abba585785d57bbf02aa1f9ad /macros/latex/contrib/turabian-formatting | |
parent | c8b8ea37fe9cd71b53223dff23f291b2f158fc0f (diff) |
CTAN sync 202003200301
Diffstat (limited to 'macros/latex/contrib/turabian-formatting')
-rw-r--r-- | macros/latex/contrib/turabian-formatting/README | 4 | ||||
-rw-r--r-- | macros/latex/contrib/turabian-formatting/turabian-formatting-doc.pdf | bin | 113098 -> 113704 bytes | |||
-rw-r--r-- | macros/latex/contrib/turabian-formatting/turabian-formatting-doc.tex | 38 | ||||
-rw-r--r-- | macros/latex/contrib/turabian-formatting/turabian-formatting.sty | 171 | ||||
-rw-r--r-- | macros/latex/contrib/turabian-formatting/turabian-researchpaper.cls | 209 | ||||
-rw-r--r-- | macros/latex/contrib/turabian-formatting/turabian-thesis.cls | 272 |
6 files changed, 337 insertions, 357 deletions
diff --git a/macros/latex/contrib/turabian-formatting/README b/macros/latex/contrib/turabian-formatting/README index 7a023e9f9d..a08b2544d7 100644 --- a/macros/latex/contrib/turabian-formatting/README +++ b/macros/latex/contrib/turabian-formatting/README @@ -1,4 +1,4 @@ -Turabian Formatting for LaTeX (2018/08/01) +Turabian Formatting for LaTeX (2020/03/19) INTRODUCTION @@ -37,7 +37,7 @@ manual, turabian-formatting-doc.pdf, included in this package. ============================== -Copyright 2013-2018 Omar Abdool +Copyright 2013-2020 Omar Abdool This work may be distributed and/or modified under the conditions of the LaTeX Project Public License (LPPL), either version 1.3 of this license diff --git a/macros/latex/contrib/turabian-formatting/turabian-formatting-doc.pdf b/macros/latex/contrib/turabian-formatting/turabian-formatting-doc.pdf Binary files differindex 99fbe5bcfd..f200f9042c 100644 --- a/macros/latex/contrib/turabian-formatting/turabian-formatting-doc.pdf +++ b/macros/latex/contrib/turabian-formatting/turabian-formatting-doc.pdf diff --git a/macros/latex/contrib/turabian-formatting/turabian-formatting-doc.tex b/macros/latex/contrib/turabian-formatting/turabian-formatting-doc.tex index 1b55094487..e9616ac054 100644 --- a/macros/latex/contrib/turabian-formatting/turabian-formatting-doc.tex +++ b/macros/latex/contrib/turabian-formatting/turabian-formatting-doc.tex @@ -1,7 +1,7 @@ % Turabian Formatting for LaTeX -- Package Documentation % % ============================== -% Copyright 2013-2018 Omar Abdool +% Copyright 2013-2020 Omar Abdool % % This work may be distributed and/or modified under the conditions of the LaTeX % Project Public License (LPPL), either version 1.3 of this license or (at your @@ -19,7 +19,7 @@ % and turabian-formatting-doc.pdf (in addition to the README file). % % ============================== -% Last updated: 2018/08/01 +% Last updated: 2020/03/19 % % @@ -50,7 +50,7 @@ \usepackage{marginnote} \renewcommand*{\raggedleftmarginnote}{} \renewcommand*{\marginfont}{\ttfamily} -\renewcommand*{\marginnotevadjust}{2\baselineskip} +\renewcommand*{\marginnotevadjust}{\parskip} \usepackage{geometry} \geometry{top=1.5in, bottom=1.75in, left=1.75in, right=1.75in} @@ -196,7 +196,7 @@ The default page size, for both document classes, is 8\nicefrac{1}{2} × 11 inch The \texttt{twocolumn} option, however, is not supported. More so, the \texttt{turabian-thesis} document class does not support the \texttt{notitlepage} option. -Both documents classes, by default, are set to \texttt{oneside}. The \texttt{twoside} option is also supported. +Both document classes, by default, are set to \texttt{oneside}. The \texttt{twoside} option is also supported. \clearpage \subsection{Ragged Right (Left Align) Text} @@ -230,7 +230,9 @@ With the \texttt{endnotes} option, footnotes are restarted on each page and labe To produce a list of endnotes, use the \textcmd{theendnotes} command provided by the \texttt{endnotes} package. Through the \texttt{endnotes} option, each endnote is single-spaced with a ``blank line between notes." The default heading for this list of endnotes is typeset as \emph{Notes}.\footnote{% The \emph{Notes} heading, when using the \texttt{turabian-researchpaper} document class, is typeset with \textcmd{section*}. The \texttt{turabian-thesis} document class, however, typesets the \emph{Notes} heading with \textcmd{chapter*}. If there are no endnotes preceding \textcmd{theendnotes}, this command will generate a \emph{Notes} heading with an empty endnotes list.} -When used with \texttt{turabian-thesis}, the numbering of endnotes is restarted at the beginning of each chapter. In this case, the endnotes list then uses subheadings that divide endnotes by each chapter.\autocite[162]{turabian_manual_2018} +When used with \texttt{turabian-thesis}, the numbering of endnotes is restarted at the beginning of each chapter (using the \textcmd{chapter} command).\footnote{% + The starred \textcmd{chapter*} command does not restart the numbering of endnotes.} +In this case, the endnotes list then uses subheadings that divide endnotes by each chapter.\autocite[162]{turabian_manual_2018} \clearpage @@ -335,7 +337,7 @@ For a research paper, \textcmd{submissioninfo} is used for typesetting ``any inf \texttt{turabian-researchpaper} provides the optional \textcmd{course} command for typesetting course information (such as the course title). \marginnote{\textbackslash institution\{\}\newline \textbackslash department\{\}\newline \textbackslash location\{\}} -\texttt{turabian-thesis} also provides: (1) \textcmd{institution} for typesetting the institution at the top of the page, (2) for typesetting the name of the department, and (3) \textcmd{location} for typesetting a location just above the date. +\texttt{turabian-thesis} also provides: (1) \textcmd{institution} for typesetting the institution at the top of the page, (2) \textcmd{department} for typesetting the name of the department, and (3) \textcmd{location} for typesetting a location just above the date. To create a custom title page, use the \texttt{titlepage} environment. @@ -416,9 +418,9 @@ With the \texttt{turabian-researchpaper} document class, the heading of each app \label{sec:required_packages} -This package requires \LaTeX{}2e and makes use of the following packages installed as part of a standard \LaTeX{} distribution: \texttt{etoolbox}, \texttt{setspace}, \texttt{nowidow}, \texttt{footmisc}, \texttt{endnotes}, and \texttt{xparse}. +This package requires \LaTeX{}2e and makes use of the following packages installed as part of a standard \LaTeX{} distribution: \texttt{etoolbox}, \texttt{setspace}, \texttt{nowidow}, \texttt{footmisc}, and \texttt{endnotes}. -The following packages are highly recommended: \texttt{biblatex-chicago}, \texttt{csquotes}, \texttt{fancyhdr}, \texttt{tocloft}, \texttt{ellipsis}, and \texttt{threeparttable}. +The following packages are highly recommended: \texttt{biblatex-chicago}, \texttt{csquotes}, \texttt{tocloft}, \texttt{ellipsis}, and \texttt{threeparttable}. \clearpage @@ -426,6 +428,24 @@ The following packages are highly recommended: \texttt{biblatex-chicago}, \textt \label{sec:updates} +\marginnote{\rmfamily{2020/03/19}}% + +Part, chapter, section, and subsection headings are easier to adjust. This includes better support for \textcmd{MakeUppercase}. + +Vertical spacing, in typesetting part, chapter, section, and subsection headings, is more precise. + +The \texttt{appendixes} environment provides better support for adjusting the typesetting of appendix headings. + +Improved support for \texttt{biblatex}. + +The bibliography/references list, by default, is no longer included in the table of contents (instead, use the \texttt{heading=bibintoc} option with \textcmd{printbibliography}). + +Significantly improved support for implementing endnotes with the \texttt{endnotes} package. + +The \textcmd{chapter*} command no longer resets footnote and endnote counters. + +The \texttt{xparse} package is no longer required. + \marginnote{\rmfamily{2018/08/01}}% If the \texttt{biblatex-chicago} package is loaded by the user, the \texttt{noibid} option is no longer passed to the package by default. @@ -438,7 +458,7 @@ The default page style for pages in the front matter has been changed to \texttt The \textcmd{tableofcontents} command no longer causes subsequent pages to be typeset using the \texttt{plain} page style. -Paragraphs immediately following chapter, section, and subsection headings now have an indentation of 0.5 inches. +Paragraphs, immediately following chapter, section, and subsection headings, now have an indentation of 0.5 inches. The lists of figures, tables, and illustrations each appear as entries in the table of contents. diff --git a/macros/latex/contrib/turabian-formatting/turabian-formatting.sty b/macros/latex/contrib/turabian-formatting/turabian-formatting.sty index fad71334e8..b2e56dccda 100644 --- a/macros/latex/contrib/turabian-formatting/turabian-formatting.sty +++ b/macros/latex/contrib/turabian-formatting/turabian-formatting.sty @@ -4,7 +4,7 @@ % and Dissertations," 9th edition. % % ============================== -% Copyright 2013-2018 Omar Abdool +% Copyright 2013-2020 Omar Abdool % % This work may be distributed and/or modified under the conditions of the LaTeX % Project Public License (LPPL), either version 1.3 of this license or (at your @@ -27,7 +27,7 @@ \NeedsTeXFormat{LaTeX2e} -\ProvidesPackage{turabian-formatting}[2018/08/01 Turabian Formatting] +\ProvidesPackage{turabian-formatting}[2020/03/19 Turabian Formatting] % Package options: flags and variables @@ -74,13 +74,12 @@ \setlength\footskip{0.5in} -% Text spacing is double spaced +% Text spacing is double-spaced \RequirePackage{setspace} \setstretch{2} -% Preserve normalsize and footnotesize single spacing baselineskip values - +% Preserve normalsize and footnotesize single-spacing baselineskip values \newlength\tf@singlelineskip \newlength\tf@fnsinglelineskip @@ -143,13 +142,12 @@ % Footnotes: readjust footnote rule size and placement \renewcommand{\footnoterule}{% - \vspace*{-3pt} - \hrule width 2in height 0.4pt - \vspace*{-4pt}} + \kern-3\p@ + \hrule \@width 2in height 0.4\p@ + \kern-4\p@} -% Footnotes: make command to set footnote punctuation -\newcommand{\tf@setfnpunct}[1]{\def\tf@thefnpunct{#1\,\,}} -\tf@setfnpunct{.} +% Footnotes: set default footnote punctuation +\def\tf@thefnpunct{.\,\,} % Footnotes: renew command for typesetting footnotes \renewcommand{\@makefntext}[1]{% @@ -163,8 +161,8 @@ \def\ps@headings{% \let\@oddfoot\@empty \let\@evenfoot\@empty - \def\@evenhead{\thepage\hfil\slshape\leftmark} - \def\@oddhead{{\slshape\rightmark}\hfil\thepage} + \def\@evenhead{\thepage} + \def\@oddhead{\hfil\thepage} \let\@mkboth\@gobbletwo \let\markboth\@mkboth \let\chaptermark\@gobble @@ -192,8 +190,10 @@ % Set top section command name to "section" (default) \def\tf@topsecname{section} -% Set adjustment for baselineskip after \section and \section* headings -\def\tf@adjaftersec{\dimexpr \baselineskip -\tf@singlelineskip -\p@ \relax} +% Redefine \@afterheading to adjust for baselineskip after headings +\def\tf@adjaftersec{\dimexpr \baselineskip -\tf@singlelineskip \relax} +\let\tf@tempafterheading\@afterheading +\def\@afterheading{\vskip -\tf@adjaftersec\relax \tf@tempafterheading} % Headings formatting: \section, \subsection, and \subsubsection \setcounter{secnumdepth}{0} @@ -201,47 +201,96 @@ \renewcommand{\section}{% \@startsection{section}{1}% {\z@}% - {-\tf@singlelineskip}% + {2\tf@singlelineskip}% {\tf@singlelineskip}% - {\normalfont\bfseries\normalsize\singlespacing\centering}} + {\normalfont\bfseries\normalsize\centering}} \renewcommand{\subsection}{% \@startsection{subsection}{2}% {\z@}% - {-\tf@singlelineskip}% + {2\tf@singlelineskip}% {\tf@singlelineskip}% - {\normalfont\mdseries\normalsize\singlespacing\centering}} + {\normalfont\mdseries\normalsize\centering}} \renewcommand{\subsubsection}{% \@startsection{subsubsection}{3}% {\z@}% - {-\tf@singlelineskip}% + {2\tf@singlelineskip}% {\tf@singlelineskip}% - {\normalfont\bfseries\normalsize\singlespacing\raggedright}} + {\normalfont\bfseries\normalsize\raggedright}} -% Headings formatting: following paragraphs start with an indent -\def\tf@afterindent{\@afterindenttrue} +% Sections: section heading formatting +\def\tf@makesectionhead#1#2#3#4#5{% + \vskip -\tf@singlelineskip\relax + \begingroup + \singlespacing + #4{% + \@hangfrom{\hskip #3\relax\@svsec}% + \interlinepenalty \@M #5\@@par}% + \endgroup} + +% Sections: formatting of TOC \addcontentsline +\def\tf@tocline#1#2{\protect{\csname the#1\endcsname\quad}} + +% Sections: redefine \@sect to use \tf@makesectionhead and \tf@tocline +\def\@sect#1#2#3#4#5#6[#7]#8{% + \ifnum #2>\c@secnumdepth + \let\@svsec\@empty + \else + \refstepcounter{#1}% + \protected@edef\@svsec{\@seccntformat{#1}\relax}% + \fi + \@tempskipa #5\relax + \ifdim \@tempskipa>\z@ + \tf@makesectionhead{#1}{#2}{#3}{#6}{#8} + \csname #1mark\endcsname{#7}% + \addcontentsline{toc}{#1}{% + \ifnum #2>\c@secnumdepth \else \tf@tocline{#1}{#2} \fi #7}% + \else + \def\@svsechd{% + #6{\hskip #3\relax \@svsec #8}% + \csname #1mark\endcsname{#7}% + \addcontentsline{toc}{#1}{% + \ifnum #2>\c@secnumdepth \else \tf@tocline{#1}{#2} \fi #7}}% + \fi + \@xsect{#5}} + +% Sections: redefine \@ssect +\def\@ssect#1#2#3#4#5{% + \@tempskipa #3\relax + \ifdim \@tempskipa>\z@ + \vskip -\tf@singlelineskip\relax + \begingroup + \singlespacing + #4{% + \@hangfrom{\hskip #1}% + \interlinepenalty \@M #5\@@par}% + \endgroup + \else + \def\@svsechd{#4{\hskip #1\relax #5}}% + \fi + \@xsect{#3}} -% Table of Contents: renew formatting +% Table of Contents: set adjustment for baselineskip after toc heading +\def\tf@adjaftersectoc{% + \vspace{\dimexpr \baselineskip -3\tf@singlelineskip \relax}} -\def\tf@tocpagestyle{\@empty} +% Table of Contents: \@starttoc formatting hook +\def\tf@starttocformat{\singlespacing} \renewcommand{\tableofcontents}{% - \tf@tocpagestyle \expandafter\csname \tf@topsecname\endcsname*{\contentsname}% - \@mkboth{\contentsname}{\contentsname}% + \@mkboth{}{}% \if@optraggedright \let\tf@tocrmarg\@tocrmarg \def\@tocrmarg{\tf@tocrmarg plus1fil} \fi - { \vspace{\dimexpr -3\tf@singlelineskip +1\baselineskip \relax}% - \singlespacing - \@starttoc{toc}}}% + \tf@adjaftersectoc + {\tf@starttocformat\@starttoc{toc}}}% % List of Figures and List of Tables: adjust titles - \renewcommand{\listfigurename}{Figures} \renewcommand{\listtablename}{Tables} @@ -262,20 +311,18 @@ % List of Figures \renewcommand{\listoffigures}{% \expandafter\csname \tf@topsecname\endcsname*{\listfigurename}% - \@mkboth{\listfigurename}{\listfigurename}% + \@mkboth{}{}% \addcontentsline{toc}{\tf@topsecname}{\listfigurename}% - { \vspace{\dimexpr -3\tf@singlelineskip +1\baselineskip \relax}% - \singlespacing - \@starttoc{lof}}} + \tf@adjaftersectoc + {\tf@starttocformat\@starttoc{lof}}} % List of Tables \renewcommand{\listoftables}{% \expandafter\csname \tf@topsecname\endcsname*{\listtablename}% - \@mkboth{\listtablename}{\listtablename}% + \@mkboth{}{}% \addcontentsline{toc}{\tf@topsecname}{\listtablename}% - { \vspace{\dimexpr -3\tf@singlelineskip +1\baselineskip \relax}% - \singlespacing - \@starttoc{lot}}} + \tf@adjaftersectoc + {\tf@starttocformat\@starttoc{lot}}} % List of Illustrations \newcommand{\listillustrationname}{Illustrations} @@ -283,10 +330,10 @@ \newcommand{\listofillustrations}{% \expandafter\csname \tf@topsecname\endcsname*{\listillustrationname}% - \@mkboth{\listillustrationname}{\listillustrationname}% + \@mkboth{}{}% \addcontentsline{toc}{\tf@topsecname}{\listillustrationname}% - { \vspace{\dimexpr -3\tf@singlelineskip +1\baselineskip \relax}% - \singlespacing + \tf@adjaftersectoc + { \tf@starttocformat {\tf@illustrsection Figures}\par\nopagebreak \@starttoc{lof} \vspace{\tf@singlelineskip} @@ -295,7 +342,6 @@ % Figures and Tables: float positioning - \setlength\textfloatsep{% \dimexpr 2\tf@singlelineskip +\p@ \relax minus 1\tf@singlelineskip} \setlength\floatsep{% @@ -307,7 +353,6 @@ \def\fps@figure{!htb} % Figures and Tables: caption formatting - \setlength\abovecaptionskip{\z@} \setlength\belowcaptionskip{\z@} @@ -317,7 +362,6 @@ \small#1. #2\par \vskip\belowcaptionskip} - % Lists: enumerate and itemize formatting \setlength\leftmargini{1.5\parindent} \setlength\leftmargin{\leftmargini} @@ -391,7 +435,6 @@ % thebibliography environment: formatting (adjust \@openbib@code hook default) - \setlength\bibindent{\parindent} \renewcommand\@openbib@code{% @@ -422,52 +465,36 @@ \DefineBibliographyStrings{english}{% references = {Bibliography}} \fi - \renewcommand{\bibsetup}{% - \addcontentsline{toc}{\tf@topsecname}{\bibname} - \vspace{\dimexpr -2\tf@singlelineskip +1\baselineskip \relax}% - \singlespacing% - \def\tf@adjaftersec{\dimexpr \tf@singlelineskip -\p@ \relax}} - \renewcommand{\bibitemsep}{1\baselineskip} + \renewcommand{\bibitemsep}{\tf@singlelineskip} \renewcommand{\bibhang}{0.5in} + \renewcommand{\bibsetup}{% + \vskip \tf@adjaftersec\relax + \vskip -\tf@singlelineskip\relax + \singlespacing}% }{}} \fi % Endnotes: support and formatting - \if@endnotesformat - \RequirePackage{endnotes, xparse} + \RequirePackage{endnotes} % Changes footnote marker type and formatting - \tf@setfnpunct{} + \def\tf@thefnpunct{\,\,} \renewcommand*{\thefootnote}{\fnsymbol{footnote}} \PassOptionsToPackage{notetype=endonly}{biblatex-chicago} - \AtEndPreamble{% - % Make endnotes use of "_" not a special character when in text mode - \appto{\enoteheading}{% - \catcode`_=12 - \begingroup\lccode`~=`_ - \lowercase{\endgroup\let~}\sb - \mathcode`_="8000} - - % Create \jobname.ent if not already defined to avoid missing file error - \preto{\theendnotes}{% - \IfFileExists{./\jobname.ent}% - {}% - {% - \immediate\openout\@enotes=\jobname.ent\relax - \immediate\write\@enotes{}% - }}} + % Create \jobname.ent to avoid missing file error + \@openenotes % Set default endnotes formatting \renewcommand{\enotesize}{\normalsize} \renewcommand{\enoteformat}{% + \singlespacing \if@optraggedright \raggedright \fi \setlength\parindent{\footnotemargin} - \vspace{\tf@singlelineskip} \theenmark.\,\,} \else diff --git a/macros/latex/contrib/turabian-formatting/turabian-researchpaper.cls b/macros/latex/contrib/turabian-formatting/turabian-researchpaper.cls index ae2b8ce881..e97d559a64 100644 --- a/macros/latex/contrib/turabian-formatting/turabian-researchpaper.cls +++ b/macros/latex/contrib/turabian-formatting/turabian-researchpaper.cls @@ -4,7 +4,7 @@ % and Dissertations," 9th edition. % % ============================== -% Copyright 2013-2018 Omar Abdool +% Copyright 2013-2020 Omar Abdool % % This work may be distributed and/or modified under the conditions of the LaTeX % Project Public License (LPPL), either version 1.3 of this license or (at your @@ -27,7 +27,7 @@ \NeedsTeXFormat{LaTeX2e} -\ProvidesClass{turabian-researchpaper}[2018/08/01 Turabian Research Paper] +\ProvidesClass{turabian-researchpaper}[2020/03/19 Turabian Research Paper] % Default point size @@ -79,118 +79,69 @@ \RequirePackage{turabian-formatting} -% Part: formatting -\def\tf@partformat{\normalfont\bfseries\singlespacing\centering} - -\def\@part[#1]#2{% - \ifnum \c@secnumdepth >-2\relax - \refstepcounter{part}% - \addcontentsline{toc}{part}% - {\protect{\partname\space\thepart}}% - \else - \addcontentsline{toc}{part}{#1}% - \fi - \markboth{}{}% - { \tf@partformat - \interlinepenalty \@M - \ifnum \c@secnumdepth >-2\relax - \partname\nobreakspace\thepart - \par\nobreak - \vspace*{1\baselineskip}% - \fi - \ifstrempty{#2}% - {}% - {#2\par\nobreak}}% - \vspace{\dimexpr 3\tf@singlelineskip -\baselineskip \relax}} - -\def\@spart#1{% - { \tf@partformat - \interlinepenalty \@M - #1\par\nobreak}% - \vspace{\dimexpr 3\tf@singlelineskip -\baselineskip \relax}} - +% Sections: \section* adjustment to space after heading +\newif\if@adjustssect\@adjustssecttrue +\newlength\tf@ssectafterskip % Sections: command to disable differentiate and reformat \section* \gdef\noadjustssect{\@adjustssectionfalse} -% Sections: \section* adjustment to space after heading -\newif\if@adjustssection\@adjustssectiontrue -\newlength\tf@ssect@afterskip -\setlength\tf@ssect@afterskip{1\p@} +% Sections: \section* heading formatting hook +\def\tf@ssectformat#1{#1} -% Sections: adjustment to space after \section heading -\newif\if@tf@adjustsection\@tf@adjustsectionfalse -\newlength\tf@sect@afterskip -\setlength\tf@sect@afterskip{1\p@} - -% Sections: redefine \@startsection to differentiate starred version +% Sections: redefine \@startsection to support \if@adjustssect and \tf@ssectformat \def\@startsection#1#2#3#4#5#6{% \if@noskipsec \leavevmode \fi \par \@tempskipa #4\relax \@afterindenttrue \ifdim \@tempskipa <\z@ - \@tempskipa -\@tempskipa \tf@afterindent + \@tempskipa -\@tempskipa \@afterindentfalse \fi \if@nobreak \everypar{} \else \addpenalty\@secpenalty\addvspace\@tempskipa \fi - \setlength\tf@ssect@afterskip{\dimexpr #5 -\tf@adjaftersec \relax} - \if@adjustssection - \ifstrequal{#1}{section}% - {\setlength\tf@ssect@afterskip{% - \dimexpr 2\tf@singlelineskip -\tf@adjaftersec \relax}}% - {} - \fi - \setlength\tf@sect@afterskip{\dimexpr #5 -\tf@adjaftersec \relax} - \if@tf@adjustsection - \ifstrequal{#1}{section}% - {\setlength\tf@sect@afterskip{% - \dimexpr 2\tf@singlelineskip -\tf@adjaftersec \relax}}% - {} + \setlength\tf@ssectafterskip{#5} + \ifnum #2 =1 + \if@adjustssect \setlength\tf@ssectafterskip{2\tf@singlelineskip} \fi \fi \@ifstar - {\@ssect{#3}{#4}{\tf@ssect@afterskip}{#6}}% - {\@dblarg{\@sect{#1}{#2}{#3}{#4}{\tf@sect@afterskip}{#6}}}} + {\@ssect{#3}{#4}{\tf@ssectafterskip}{\tf@ssectformat{#6}}}% + {\@dblarg{\@sect{#1}{#2}{#3}{#4}{#5}{#6}}}} -% Sections: formatting between \@svsec and heading -\protected@edef\tf@secsep#1#2{\@empty} -% Sections: formatting of TOC \addcontentsline -\def\tf@tocline#1{\protect{\csname the#1\endcsname\quad}} +% Part: formatting (unsupported) +\def\tf@partformat{\normalfont\bfseries\centering} -% Sections: redefine \@sect to support optional two-line formatting -\def\@sect#1#2#3#4#5#6[#7]#8{% - \ifnum #2>\c@secnumdepth - \let\@svsec\@empty - \else - \refstepcounter{#1}% - \protected@edef\@svsec{\@seccntformat{#1}\relax}% - \fi - \@tempskipa #5\relax - \ifdim \@tempskipa>\z@ - \begingroup - #6{% - \@hangfrom{\hskip #3\relax\@svsec}% - \interlinepenalty \@M \tf@secsep{#1}{#8}#8\@@par}% - \endgroup - \csname #1mark\endcsname{#7}% - \addcontentsline{toc}{#1}{% - \ifnum #2>\c@secnumdepth \else - \tf@tocline{#1}% - \fi - #7}% +\def\@part[#1]#2{% + \@afterindenttrue + \ifnum \c@secnumdepth >\m@ne + \refstepcounter{part}% + \addcontentsline{toc}{part}{\protect{\partname\space\thepart}}% \else - \def\@svsechd{% - #6{\hskip #3\relax\@svsec #8}% - \csname #1mark\endcsname{#7}% - \addcontentsline{toc}{#1}{% - \ifnum #2>\c@secnumdepth \else - \tf@tocline{#1}% - \fi - #7}}% + \addcontentsline{toc}{part}{#1}% \fi - \@xsect{#5}} + \markboth{}{}% + \begingroup + \setlength\parskip{\tf@singlelineskip} + \singlespacing + \interlinepenalty \@M + \tf@partformat{% + \ifnum \c@secnumdepth >\m@ne + \partname\nobreakspace\thepart\relax\@@par + \fi% + #2\@@par}% + \endgroup + \vskip 2\tf@singlelineskip + \@afterheading} + +\def\@spart#1{% + \@afterindenttrue + { \singlespacing + \interlinepenalty \@M + \tf@partformat{#1\@@par}}% + \vskip 2\tf@singlelineskip + \@afterheading} % Title page: commands for use with \maketitle @@ -230,7 +181,7 @@ % Formatting for titlepage option \renewcommand{\maketitle}{% \begin{titlepage}% - \tf@setfnpunct{} + \def\tf@thefnpunct{\,\,} \renewcommand*{\thefootnote}{\fnsymbol{footnote}} \let\footnoterule\relax \normalfont\normalsize\centering\singlespacing @@ -276,7 +227,6 @@ % Table of Contents, List of Figures, and List of Tables: item number alignment -%\def\numberline#1{\hb@xt@\@tempdima{\hfil #1\hspace{1em}}} \def\@tocrmarg{0.75in} \def\@pnumwidth{3.5ex} @@ -288,30 +238,33 @@ \renewcommand*{\l@part}[2]{% \ifnum \c@tocdepth >-2\relax \addpenalty{-\@highpenalty}% - \addvspace{1\baselineskip}% + \vskip 2\tf@singlelineskip % \setlength\@tempdima{0.5in}% - \vskip \tf@singlelineskip - { \parindent \z@ - \rightskip \z@ + { \parindent \z@ \rightskip \z@ \parfillskip -\@rightskip \leavevmode \advance\leftskip\@tempdima \hskip -\leftskip \bfseries #1\nobreak\hfil \nobreak\par} + \if@compatibility + \global\@nobreaktrue + \everypar{\global\@nobreakfalse\everypar{}}% + \fi \fi} \renewcommand*{\l@section}[2]{% \ifnum \c@tocdepth >\z@ \addpenalty\@secpenalty - \setlength\@tempdima{\z@}% \vskip \tf@singlelineskip - { \parindent \z@ - \rightskip \@tocrmarg + \setlength\@tempdima{\z@}% + \begingroup + \parindent \z@ \rightskip \@tocrmarg \parfillskip -\rightskip \leavevmode \advance\leftskip\@tempdima \hskip -\leftskip - #1\nobreak\hfil \nobreak\hb@xt@\@pnumwidth{\hss #2}\par} + #1\nobreak\hfil \nobreak\hb@xt@\@pnumwidth{\hss #2}\par + \endgroup \fi} \renewcommand*{\l@subsection}{% @@ -344,31 +297,43 @@ % Appendixes: adjust formatting of section headings \def\tf@appendixsecfrmt{% - \DeclareRobustCommand{\@seccntformat}[1]{% - \ifstrequal{##1}{section}% - {\appendixname\space \csname the##1\endcsname}% - {\csname the##1\endcsname\quad}} - \DeclareRobustCommand{\tf@secsep}[2]{% - \ifstrequal{##1}{section}% - {\ifstrempty{##2}{}{\par\nobreak}}% - {\@empty}} - \def\tf@tocline##1{\appendixname\space \csname the##1\endcsname.\quad} - \@tf@adjustsectiontrue} + \def\thesection{\@Alph\c@section} + \protect\def\tf@makesectionhead##1##2##3##4##5{% + \vskip -\tf@singlelineskip\relax + \ifnum ##2 =1 + \begingroup + \singlespacing + \interlinepenalty \@M + ##4{\appendixname\space\thesection\relax\@@par ##5\@@par}% + \vskip \tf@singlelineskip + \endgroup + \else + \begingroup + \singlespacing + ##4{% + \@hangfrom{\hskip ##3\relax\@svsec}% + \interlinepenalty \@M ##5\@@par}% + \endgroup + \fi} + \def\tf@tocline##1##2{% + \ifnum ##2 =1 + \protect{\appendixname\space\thesection.\quad} + \else + \protect{\csname the##1\endcsname\quad} + \fi}} % Appendixes: make environment \newenvironment{appendixes}% {% \setcounter{secnumdepth}{1} - \tf@appendixsecfrmt - \setcounter{section}{0}% - \setcounter{subsection}{0}% - \gdef\thesection{\@Alph\c@section}% + \setcounter{section}{0} + \setcounter{subsection}{0} + \tf@appendixsecfrmt% }% {% \setcounter{secnumdepth}{0}% \setcounter{section}{0}% \setcounter{subsection}{0}% - \gdef\thesection{\@arabic\c@section}% }% % Appendixes: remove \appendix command @@ -377,14 +342,10 @@ % Endnotes: Notes heading formatted as \section* \if@endnotesformat - \renewcommand{\enoteheading}{% + \def\enoteheading{% \section*{\notesname}% - \markboth{\notesname}{\notesname}% - \addcontentsline{toc}{section}{\notesname}% - \vspace{\dimexpr -4\tf@singlelineskip +1\baselineskip \relax} - \singlespacing\mbox{}% - \def\tf@adjaftersec{\dimexpr \tf@singlelineskip -\p@ \relax} - \let\tf@afterindent\@afterindenttrue}% + \markboth{}{}% + \addcontentsline{toc}{section}{\notesname}} \fi diff --git a/macros/latex/contrib/turabian-formatting/turabian-thesis.cls b/macros/latex/contrib/turabian-formatting/turabian-thesis.cls index a95a62a7b6..0fdcff0aa4 100644 --- a/macros/latex/contrib/turabian-formatting/turabian-thesis.cls +++ b/macros/latex/contrib/turabian-formatting/turabian-thesis.cls @@ -4,7 +4,7 @@ % and Dissertations," 9th edition. % % ============================== -% Copyright 2013-2018 Omar Abdool +% Copyright 2013-2020 Omar Abdool % % This work may be distributed and/or modified under the conditions of the LaTeX % Project Public License (LPPL), either version 1.3 of this license or (at your @@ -27,7 +27,7 @@ \NeedsTeXFormat{LaTeX2e} -\ProvidesClass{turabian-thesis}[2018/08/01 Turabian Theses and Dissertations] +\ProvidesClass{turabian-thesis}[2020/03/19 Turabian Theses and Dissertations] % Default point size @@ -128,57 +128,56 @@ \if@openright \cleardoublepage \else \clearpage \fi \secdef\@part\@spart} -\def\tf@partformat{\normalfont\bfseries\normalsize\singlespacing\centering} +\def\tf@partformat{\normalfont\bfseries\normalsize\centering} % Part: heading with empty page \def\@part[#1]#2{% \ifnum \c@secnumdepth >-2\relax - \if@mainmatter - \refstepcounter{part}% - \addcontentsline{toc}{part}% - {\protect\numberline{\partname\space\thepart}#1}% - \else - \addcontentsline{toc}{part}{#1}% - \fi + \refstepcounter{part} + \setcounter{footnote}{0} + \addcontentsline{toc}{part}% + {\protect\numberline{\partname\space\thepart}#1} \else - \addcontentsline{toc}{part}{#1}% + \addcontentsline{toc}{part}{#1} \fi - \markboth{}{}% - { \tf@partformat + \markboth{}{} + \thispagestyle{empty} + \begingroup + \setlength\parskip{\tf@singlelineskip} + \singlespacing \interlinepenalty \@M - \thispagestyle{empty}% - \ifnum \c@secnumdepth >-2\relax - \if@mainmatter - \partname\nobreakspace\thepart - \par\nobreak - \vspace*{1\baselineskip}% - \fi - \fi - #2\par} + \tf@partformat{ + \ifnum \c@secnumdepth >-2\relax + \partname\nobreakspace\thepart\relax\@@par + \fi% + #1\@@par}% + \endgroup \@endpart} % Part: heading with plain page style; allows following part description \def\@spart#1{% \ifnum \c@secnumdepth >-2\relax - \if@mainmatter - \refstepcounter{part}% - \addcontentsline{toc}{part}% - {\protect\numberline{\partname\space\thepart}#1}% - \fi + \refstepcounter{part} + \setcounter{footnote}{0} + \addcontentsline{toc}{part}% + {\protect\numberline{\partname\space\thepart}#1} + \else + \addcontentsline{toc}{part}{#1} \fi - \markboth{}{}% - { \tf@partformat + \markboth{}{} + \thispagestyle{plain} + \begingroup + \setlength\parskip{\tf@singlelineskip} + \singlespacing \interlinepenalty \@M - \thispagestyle{plain}% - \ifnum \c@secnumdepth >-2\relax - \if@mainmatter - \partname\nobreakspace\thepart - \par\nobreak - \vspace*{1\baselineskip}% - \fi - \fi - \ifstrempty{#1}{}{#1\par\nobreak}}% - \vspace{\dimexpr 3\tf@singlelineskip -\baselineskip \relax} + \tf@partformat{ + \ifnum \c@secnumdepth >-2\relax + \partname\nobreakspace\thepart\relax\@@par + \fi% + #1\@@par}% + \endgroup + \vskip 2\tf@singlelineskip + \@afterindenttrue \@afterheading} \def\@endpart{\if@openright \cleardoublepage \else \clearpage \fi} @@ -220,83 +219,62 @@ \@tfchapterbeforefalse \fi} -% Chapter: formatting -\def\tf@chapformat{\normalfont\bfseries\normalsize\singlespacing\centering} - -\newlength\tf@adjafterchapskip -\setlength\tf@adjafterchapskip{\z@} - -\def\tf@setafterchapskip{% - \setlength\tf@adjafterchapskip{% - \dimexpr 3\tf@singlelineskip -\baselineskip \relax}} - +% Chapter: heading layout \def\@chapter[#1]#2{% \@figuredblnumfalse \@tabledblnumfalse - \tf@afterindent + \@afterindenttrue \ifnum \c@secnumdepth >\m@ne + \setcounter{footnote}{0} \if@mainmatter \tf@chapcounter - \typeout{\@chapapp\space\thechapter.}% + \typeout{\@chapapp\space\thechapter} \addcontentsline{toc}{chapter}% - {\protect\numberline{\@chapapp\space\thechapter}#1}% + {\protect\numberline{\@chapapp\space\thechapter}#1} + \tf@endnotesection{\@chapapp\space\thechapter} \else \tf@restoreftcounters - \addcontentsline{toc}{chapter}{#1}% + \addcontentsline{toc}{chapter}{#1} + \tf@endnotesection{#1} \fi \else - \addcontentsline{toc}{chapter}{#1}% + \addcontentsline{toc}{chapter}{#1} \fi - \chaptermark{#1}% - \@makechapterhead{#2}% + \chaptermark{#1} + \@makechapterhead{#2} \@afterheading} \def\@schapter#1{% \@figuredblnumfalse \@tabledblnumfalse \tf@restoreftcounters - \tf@afterindent - \@makeschapterhead{#1}% + \@afterindenttrue + \@makeschapterhead{#1} \@afterheading} +% Chapter: heading formatting +\def\tf@chapformat{\normalfont\bfseries\normalsize\centering} + \def\@makechapterhead#1{% - \tf@setafterchapskip - { \tf@chapformat - \ifnum \c@secnumdepth >\m@ne - \if@mainmatter - \@chapapp\space \thechapter - \par\nobreak - \vspace*{1\baselineskip}% - \fi - \fi + \begingroup + \setlength\parskip{\tf@singlelineskip} + \singlespacing \interlinepenalty\@M - \ifstrempty{#1}{}{#1\par\nobreak \vspace{\tf@adjafterchapskip}}}} + \tf@chapformat{ + \ifnum \c@secnumdepth >\m@ne + \if@mainmatter + \@chapapp\space \thechapter\relax\@@par + \fi% + \fi% + #1\@@par} + \endgroup + \vskip 2\tf@singlelineskip} \def\@makeschapterhead#1{% - \tf@setafterchapskip - { \tf@chapformat + { \singlespacing \interlinepenalty\@M - #1\par\nobreak - \vspace{\tf@adjafterchapskip}}} - - -% Sections: redefine \@startsection to support adjusting space after section headings -\def\@startsection#1#2#3#4#5#6{% - \if@noskipsec \leavevmode \fi - \par - \@tempskipa #4\relax - \@afterindenttrue - \ifdim \@tempskipa <\z@ - \@tempskipa -\@tempskipa \tf@afterindent - \fi - \if@nobreak - \everypar{}% - \else - \addpenalty\@secpenalty\addvspace\@tempskipa - \fi - \@ifstar - {\@ssect{#3}{#4}{\dimexpr #5 -\tf@adjaftersec \relax}{#6}}% - {\@dblarg{\@sect{#1}{#2}{#3}{#4}{\dimexpr #5 -\tf@adjaftersec \relax}{#6}}}} + \tf@chapformat{#1}\par\nobreak}% + \vskip 2\tf@singlelineskip} % Title page: commands for use with \maketitle @@ -357,7 +335,7 @@ \renewcommand{\maketitle}{% \begin{titlepage}% \singlespacing - \tf@setfnpunct{} + \def\tf@thefnpunct{\,\,} \renewcommand*{\thefootnote}{\fnsymbol{footnote}} \let\footnoterule\relax \normalfont\normalsize @@ -404,9 +382,8 @@ \renewcommand*{\l@part}[2]{% \ifnum \c@tocdepth >-2\relax \addpenalty{-\@highpenalty}% - \addvspace{1\baselineskip}% + \vskip 2\tf@singlelineskip % \setlength\@tempdima{1.25in}% - \vskip 1\baselineskip { \parindent \z@ \rightskip \z@ \parfillskip -\@rightskip @@ -433,7 +410,7 @@ \renewcommand*{\l@section}{% \ifnum \c@tocdepth >\z@ \vskip \tf@singlelineskip \fi - \@dottedtocline{1}{1.5in}{\z@}} + \@dottedtocline{1}{1.25in}{\z@}} \renewcommand*{\l@subsection}{% \ifnum \c@tocdepth >1 \vskip \tf@singlelineskip \fi @@ -493,19 +470,36 @@ \newcounter{appendix} +% Appendixes: heading formatting +\def\tf@appendixchapfrmt{% + \def\thechapter{\@Alph\c@appendix} + \def\@chapapp{\appendixname}% + \protect\def\@chapter[##1]##2{% + \tf@appendixcounter + \setcounter{footnote}{0} + \@afterindenttrue + \typeout{\@chapapp\space\thechapter} + \addcontentsline{toc}{chapter}% + {\protect\numberline{\@chapapp\space\thechapter}##1} + \chaptermark{##1} + \tf@endnotesection{\@chapapp\space\thechapter} + \begingroup + \setlength\parskip{\tf@singlelineskip} + \singlespacing + \interlinepenalty\@M + \tf@chapformat{\@chapapp\space \thechapter\@@par ##2\@@par} + \endgroup + \vskip 2\tf@singlelineskip + \@afterheading}} + \newenvironment{appendixes}% {% - \@mainmattertrue - \setcounter{section}{0}% - \def\@chapapp{\appendixname}% - \def\thechapter{\@Alph\c@appendix} - \def\tf@chapcounter{\refstepcounter{appendix}} \if@doublenumerate \if@tfchapterbefore \else \setcounter{tf@tempchapfcnt}{\value{figure}} \setcounter{tf@tempchaptcnt}{\value{table}} \fi - \def\tf@chapcounter{% + \def\tf@appendixcounter{% \refstepcounter{appendix} \@figuredblnumtrue \@tabledblnumtrue} @@ -513,70 +507,48 @@ \setcounter{table}{0} \def\tf@figuredblnumprefix{A} \def\tf@tabledblnumprefix{A} + \else + \def\tf@appendixcounter{% + \refstepcounter{appendix} + \@figuredblnumfalse + \@tabledblnumfalse} \fi + \tf@appendixchapfrmt% }% {% \if@doublenumerate \setcounter{figure}{\value{tf@tempchapfcnt}} \setcounter{table}{\value{tf@tempchaptcnt}} - \fi + \fi% } % Appendixes: remove \appendix command \def\appendix{\@empty} -% Endnotes: layout and formatting +% Endnotes: reset endnote counter and create endnote section heading +\def\tf@endnotesection#1{% + \if@endnotesformat + \setcounter{endnote}{0} + \if@enotesopen + \addtoendnotes{\noexpand\tf@enotesechead{#1}} + \fi + \fi} +% Endnotes: format and make endnote section heading if followed by an endnote \if@endnotesformat + \def\tf@enotesechead#1{% + \@ifnextchar\@doanenote% + {\vskip\tf@singlelineskip\relax \section*{#1}}% + {}} +\fi - \let\tf@chapter\chapter - - \@addtoreset{endnote}{chapter} - - % Renew Notes heading formatted as \chapter* (also added to Table of Content) - \renewcommand{\enoteheading}{% - \tf@chapter*{\notesname}% - \@mkboth{\notesname}{\notesname}% - \addcontentsline{toc}{chapter}{\notesname}% - \vspace{\dimexpr -5\tf@singlelineskip +1\baselineskip \relax}% - \singlespacing\mbox{}% - \def\tf@adjaftersec{\dimexpr \tf@singlelineskip -\p@ \relax} - \let\tf@afterindent\@afterindenttrue}% - - % Renew \chapter command to: (1) reset endnotes counter at each chapter, and (2) add subheadings for each chapter in \endnotes formatting. - \RenewDocumentCommand{\chapter}{som}{% - \IfBooleanTF{#1}% - {% if \chapter* - \tf@chapter*{#3}% - \setcounter{endnote}{0}% - \addtoendnotes{% - \noexpand\tf@enotedivider% - {\noexpand\section*}{\unexpanded{#3}}}% - }% - {% if \chapter - \IfNoValueTF{#2}% - {\tf@chapter{#3}}% - {\tf@chapter[#2]{#3}}% - \setcounter{endnote}{0}% - \if@mainmatter - \addtoendnotes{% - \noexpand\tf@enotedivider% - {\noexpand\section*}{\@chapapp\space \thechapter}}% - \else - \addtoendnotes{% - \noexpand\tf@enotedivider% - {\noexpand\section*}{\unexpanded{#3}}}% - \fi - }} - - % Empty subheading divider before \theendnotes for use with \tf@enotedivider - \preto{\theendnotes}{% - \addtoendnotes{\noexpand\tf@enotedivider{}{}}} - - % Make endnote divider if not followed by another endnote divider - \def\tf@enotedivider#1#2{\@ifnextchar\tf@enotedivider{}{#1{#2}}}% - +% Endnotes: Notes heading formatted as \chapter* +\if@endnotesformat + \def\enoteheading{% + \chapter*{\notesname}% + \@mkboth{}{}% + \addcontentsline{toc}{chapter}{\notesname}} \fi |