diff options
Diffstat (limited to 'Master/texmf-dist/tex/latex/turabian-formatting/turabian-researchpaper.cls')
-rw-r--r-- | Master/texmf-dist/tex/latex/turabian-formatting/turabian-researchpaper.cls | 242 |
1 files changed, 234 insertions, 8 deletions
diff --git a/Master/texmf-dist/tex/latex/turabian-formatting/turabian-researchpaper.cls b/Master/texmf-dist/tex/latex/turabian-formatting/turabian-researchpaper.cls index 7235a6b5696..27f7017ad9a 100644 --- a/Master/texmf-dist/tex/latex/turabian-formatting/turabian-researchpaper.cls +++ b/Master/texmf-dist/tex/latex/turabian-formatting/turabian-researchpaper.cls @@ -27,14 +27,14 @@ \NeedsTeXFormat{LaTeX2e} -\ProvidesClass{turabian-researchpaper}[2016/07/12 Turabian Research Paper] +\ProvidesClass{turabian-researchpaper}[2016/07/18 Turabian Research Paper] % Default point size \def\@@ptsize{12pt} -% Options for document class +% Document class options: handling \DeclareOption{raggedright}{% \PassOptionsToPackage{\CurrentOption}{turabian-formatting}} @@ -58,24 +58,20 @@ \DeclareOption{12pt}{\def\@@ptsize{12pt}} - -% Deprecated/removed options \DeclareOption{emptymargins}{% \ClassWarningNoLine{turabian-researchpaper}{The '\CurrentOption' option is no longer available} - \PassOptionsToPackage{\CurrentOption}{turabian-formatting}} + \OptionNotUsed} \DeclareOption{endnotesonly}{% \ClassWarningNoLine{turabian-researchpaper}{The '\CurrentOption' option has been deprecated. Consider using the 'endnotes' option instead} \OptionNotUsed} - -% Pass other options to article document class \DeclareOption*{\PassOptionsToClass{\CurrentOption}{article}} \ProcessOptions\relax -% Build upon article document class +% Load "article" document class with options \LoadClass[titlepage,oneside,onecolumn,\@@ptsize]{article} @@ -83,3 +79,233 @@ \RequirePackage{turabian-formatting} +% Sections: \section* adjustment to space after heading +\newif\if@adjustssection\@adjustssectiontrue +\newlength\tf@ssectafterskip +\setlength\tf@ssectafterskip{1\p@} + +% Sections: command to disable differentiate and reformat \section* +\gdef\noadjustssect{\@adjustssectionfalse} + +% Sections: adjustment to space after \section heading +\newif\if@tf@adjustsection\@tf@adjustsectionfalse +\newlength\tf@sectafterskip +\setlength\tf@sectafterskip{1\p@} + +% Sections: redefine \@startsection to differentiate starred version +\def\@startsection#1#2#3#4#5#6{% + \if@noskipsec \leavevmode \fi + \par + \@tempskipa #4\relax + \@afterindenttrue + \ifdim \@tempskipa <\z@ + \@tempskipa -\@tempskipa \@afterindentfalse + \fi + \if@nobreak \everypar{} \else + \addpenalty\@secpenalty\addvspace\@tempskipa + \fi + \setlength\tf@ssectafterskip{#5} + \if@adjustssection + \ifstrequal{#1}{section}% + {\setlength\tf@ssectafterskip{\tf@singlelineskip}}% + {} + \fi + \setlength\tf@sectafterskip{#5} + \if@tf@adjustsection + \ifstrequal{#1}{section}% + {\setlength\tf@sectafterskip{\tf@singlelineskip}}% + {} + \fi + \@ifstar + {\@ssect{#3}{#4}{\tf@ssectafterskip}{#6}}% + {\@dblarg{\@sect{#1}{#2}{#3}{#4}{\tf@sectafterskip}{#6}}}} + +% Sections: formatting between \@svsec and heading +\protected@edef\tf@secsep#1#2{\@empty} + +% Sections: formatting of TOC \addcontentsline +\def\tf@tocline#1{\protect\numberline{\csname the#1\endcsname\quad}} + +% 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}% + \else + \def\@svsechd{% + #6{\hskip #3\relax\@svsec #8}% + \csname #1mark\endcsname{#7}% + \addcontentsline{toc}{#1}{% + \ifnum #2>\c@secnumdepth \else + \protect\numberline{\csname the#1\endcsname\quad}% + \fi + #7}}% + \fi + \@xsect{#5}} + + +% Title page: commands for use with \maketitle +\newcommand{\course}[1]{\gdef\tf@course{#1}} +\course{\@empty} + +% Title page: renew \maketitle command research paper +\if@titlepage + % Formatting for titlepage option + \renewcommand{\maketitle}{% + \begin{titlepage}% + \tf@setfnpunct{} + \renewcommand*{\thefootnote}{\fnsymbol{footnote}} + \let\footnoterule\relax + \normalfont\normalsize\centering\singlespacing + \parskip=1\baselineskip + \vspace*{-2\baselineskip} + \vspace*{0.333\paperheight} + \vspace*{-1in} + { \bfseries\@title\par% + \tf@subtitle\par}% + \vspace*{2.35in} + \@author\@thanks\par + \tf@course\par + \tf@submissioninfo\par + \@date\par + \parskip=\z@ + \end{titlepage}% + \tf@emptymaketitle + \global\let\tf@course\@empty + \global\let\course\relax + \cleardoublepage} +\else + % Formatting for notitlepage option + \renewcommand{\maketitle}{% + \thispagestyle{plain} + { \renewcommand*{\thefootnote}{\fnsymbol{footnote}} + \normalfont\normalsize\centering\singlespacing + \parskip=1\baselineskip + \vspace*{0.5in} + \vspace*{-1.5\baselineskip} + { \bfseries\@title\par% + \tf@subtitle\par}% + \vspace*{1\baselineskip} + \@author\@thanks\par + \tf@course\par + \tf@submissioninfo\par + \@date\par + \vspace*{0.5in} + \vspace*{-1\baselineskip}} + \tf@emptymaketitle + \global\let\tf@course\@empty + \global\let\course\relax} +\fi + + +% Table of Contents: formatting + +\setcounter{tocdepth}{1} + +\renewcommand*{\l@section}[2]{% + \ifnum \c@tocdepth >\z@ + \addpenalty\@secpenalty + \addvspace{1\baselineskip}% + \setlength\@tempdima{\z@}% + { \parindent \z@ + \rightskip \@tocrmarg + \parfillskip -\rightskip + \leavevmode + \ifnum \c@tocdepth >\@ne \bfseries \fi + \advance\leftskip\@tempdima + \hskip -\leftskip + #1\nobreak\hfil \nobreak\hb@xt@\@pnumwidth{\hss #2}\par} + \fi} + +\renewcommand*{\l@subsection}{% + \ifnum \c@tocdepth >1 \vskip 1\baselineskip \fi + \@dottedtocline{2}{0.5in}{\z@}} + +\renewcommand*{\l@subsubsection}{% + \ifnum \c@tocdepth >2 \vskip 1\baselineskip \fi + \@dottedtocline{3}{1.0in}{\z@}} + + +% Figures and Tables: list formatting +\renewcommand*{\l@figure}[2]{% + \def\tflist@beforesecnum{\hfil} + \def\tflist@aftersecnum{\hspace{3.5em}} + \setlength\@tempdima{5em} + \vskip 1\baselineskip + { \leftskip \z@ \relax + \rightskip \@tocrmarg + \parfillskip -\rightskip + \parindent \z@ \relax\@afterindenttrue + \interlinepenalty\@M + \leavevmode + \advance\leftskip\@tempdima \null\nobreak\hskip -\leftskip + #1\nobreak\hfil \nobreak\hb@xt@\@pnumwidth{\hss #2}\par}} +\def\l@table{\l@figure} + + +% Abstract: formatting +\renewenvironment{abstract}% + {% + \clearpage + \section*{\abstractname} + }% + {\clearpage} + + +% 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} + +% Appendixes: make environment +\newenvironment{appendixes}% + {% + \@appendixestrue + \setcounter{secnumdepth}{1} + \tf@appendixsecfrmt + \tf@appendix + }% + {% + \setcounter{secnumdepth}{0}% + \setcounter{section}{0}% + \gdef\thesection{\@arabic\c@section}% + }% + + +% Endnotes: Notes heading formatted as \section* +\if@endnotesformat + \renewcommand{\enoteheading}{% + \section*{\notesname}% + \markboth{\notesname}{\notesname}% + \addcontentsline{toc}{section}{\notesname}% + \mbox{}\par% + \vspace{-1.5\baselineskip}% + \let\@afterindentfalse\@afterindenttrue + \singlespacing}% +\fi + + |