diff options
author | Karl Berry <karl@freefriends.org> | 2016-09-18 21:07:17 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2016-09-18 21:07:17 +0000 |
commit | 1b5bddace01f2a00882c38e13c677f11537042cb (patch) | |
tree | 6154a904e703196f9607d5ae7742b3c60f682523 /Master/texmf-dist/tex/latex/turabian-formatting/turabian-researchpaper.cls | |
parent | 0933010f07bbf3805ec52e45f375a1f785c44502 (diff) |
turabian-formatting (18sep16)
git-svn-id: svn://tug.org/texlive/trunk@42097 c570f23f-e606-0410-a88d-b1316a301751
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 | 115 |
1 files changed, 96 insertions, 19 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 27f7017ad9a..d7eb71c8bdc 100644 --- a/Master/texmf-dist/tex/latex/turabian-formatting/turabian-researchpaper.cls +++ b/Master/texmf-dist/tex/latex/turabian-formatting/turabian-researchpaper.cls @@ -27,7 +27,7 @@ \NeedsTeXFormat{LaTeX2e} -\ProvidesClass{turabian-researchpaper}[2016/07/18 Turabian Research Paper] +\ProvidesClass{turabian-researchpaper}[2016/09/17 Turabian Research Paper] % Default point size @@ -79,18 +79,46 @@ \RequirePackage{turabian-formatting} +% Part: formatting +\def\tf@partformat{\normalfont\bfseries\normalsize\singlespacing\centering} + +\def\@part[#1]#2{% + \ifnum \c@secnumdepth >-2\relax + \refstepcounter{part}% + \addcontentsline{toc}{part}% + {\protect\numberline{\thepart.}#1}% + \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{1\baselineskip}}}} + +\def\@spart#1{% + { \tf@partformat + \interlinepenalty \@M + #1\par\nobreak + \vspace{1\baselineskip}}} + + % Sections: \section* adjustment to space after heading \newif\if@adjustssection\@adjustssectiontrue -\newlength\tf@ssectafterskip -\setlength\tf@ssectafterskip{1\p@} +\newlength\tf@ssect@afterskip +\setlength\tf@ssect@afterskip{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@} +\newlength\tf@sect@afterskip +\setlength\tf@sect@afterskip{1\p@} % Sections: redefine \@startsection to differentiate starred version \def\@startsection#1#2#3#4#5#6{% @@ -104,21 +132,21 @@ \if@nobreak \everypar{} \else \addpenalty\@secpenalty\addvspace\@tempskipa \fi - \setlength\tf@ssectafterskip{#5} + \setlength\tf@ssect@afterskip{#5} \if@adjustssection \ifstrequal{#1}{section}% - {\setlength\tf@ssectafterskip{\tf@singlelineskip}}% + {\setlength\tf@ssect@afterskip{\tf@singlelineskip}}% {} \fi - \setlength\tf@sectafterskip{#5} + \setlength\tf@sect@afterskip{#5} \if@tf@adjustsection \ifstrequal{#1}{section}% - {\setlength\tf@sectafterskip{\tf@singlelineskip}}% + {\setlength\tf@sect@afterskip{\tf@singlelineskip}}% {} \fi \@ifstar - {\@ssect{#3}{#4}{\tf@ssectafterskip}{#6}}% - {\@dblarg{\@sect{#1}{#2}{#3}{#4}{\tf@sectafterskip}{#6}}}} + {\@ssect{#3}{#4}{\tf@ssect@afterskip}{#6}}% + {\@dblarg{\@sect{#1}{#2}{#3}{#4}{\tf@sect@afterskip}{#6}}}} % Sections: formatting between \@svsec and heading \protected@edef\tf@secsep#1#2{\@empty} @@ -161,9 +189,35 @@ % Title page: commands for use with \maketitle +\newcommand{\subtitle}[1]{\gdef\tf@subtitle{#1}} +\subtitle{\@empty} + +\newcommand{\submissioninfo}[1]{\gdef\tf@submissioninfo{#1}} +\submissioninfo{\@empty} + \newcommand{\course}[1]{\gdef\tf@course{#1}} \course{\@empty} +% Title page: command for emptying/completing \maketitle +\newcommand{\tf@emptymaketitle}{% + \global\let\thanks\relax + \global\let\maketitle\relax + + \global\let\@thanks\@empty + \global\let\@author\@empty + \global\let\@date\@empty + \global\let\@title\@empty + \global\let\tf@subtitle\@empty + \global\let\tf@submissioninfo\@empty + \global\let\tf@course\@empty + + \global\let\title\relax + \global\let\author\relax + \global\let\date\relax + \global\let\subtitle\relax + \global\let\submissioninfo\relax + \global\let\course\relax} + % Title page: renew \maketitle command research paper \if@titlepage % Formatting for titlepage option @@ -186,9 +240,9 @@ \@date\par \parskip=\z@ \end{titlepage}% + % if not endnotes, reset footnote counter + \if@endnotesformat \else \setcounter{footnote}{0} \fi \tf@emptymaketitle - \global\let\tf@course\@empty - \global\let\course\relax \cleardoublepage} \else % Formatting for notitlepage option @@ -208,9 +262,9 @@ \@date\par \vspace*{0.5in} \vspace*{-1\baselineskip}} - \tf@emptymaketitle - \global\let\tf@course\@empty - \global\let\course\relax} + % if not endnotes, reset footnote counter + \if@endnotesformat \else \setcounter{footnote}{0} \fi + \tf@emptymaketitle} \fi @@ -218,6 +272,21 @@ \setcounter{tocdepth}{1} +\renewcommand*{\l@part}[2]{% + \ifnum \c@tocdepth >-2\relax + \addpenalty{-\@highpenalty}% + \addvspace{1\baselineskip}% + \setlength\@tempdima{3em}% + \vskip 1\baselineskip + { \parindent \z@ + \rightskip \z@ + \parfillskip -\@rightskip + \leavevmode + \advance\leftskip\@tempdima + \hskip -\leftskip + \bfseries #1\nobreak\hfil \nobreak\hb@xt@\@pnumwidth{\hss #2}\par} + \fi} + \renewcommand*{\l@section}[2]{% \ifnum \c@tocdepth >\z@ \addpenalty\@secpenalty @@ -242,7 +311,7 @@ \@dottedtocline{3}{1.0in}{\z@}} -% Figures and Tables: list formatting +% List of Figures: formatting \renewcommand*{\l@figure}[2]{% \def\tflist@beforesecnum{\hfil} \def\tflist@aftersecnum{\hspace{3.5em}} @@ -256,6 +325,9 @@ \leavevmode \advance\leftskip\@tempdima \null\nobreak\hskip -\leftskip #1\nobreak\hfil \nobreak\hb@xt@\@pnumwidth{\hss #2}\par}} + + +% List of Tables: formatting \def\l@table{\l@figure} @@ -284,17 +356,22 @@ % Appendixes: make environment \newenvironment{appendixes}% {% - \@appendixestrue \setcounter{secnumdepth}{1} \tf@appendixsecfrmt - \tf@appendix + \setcounter{section}{0}% + \setcounter{subsection}{0}% + \gdef\thesection{\@Alph\c@section}% }% {% \setcounter{secnumdepth}{0}% \setcounter{section}{0}% + \setcounter{subsection}{0}% \gdef\thesection{\@arabic\c@section}% }% +% Appendixes: remove \appendix command +\def\appendix{\@empty} + % Endnotes: Notes heading formatted as \section* \if@endnotesformat |