From 7e58d40557545aed226fc852f4e32f86f76517bd Mon Sep 17 00:00:00 2001
From: Karl Berry <karl@freefriends.org>
Date: Sun, 5 Nov 2017 22:05:09 +0000
Subject: turabian-formatting (5nov17)

git-svn-id: svn://tug.org/texlive/trunk@45700 c570f23f-e606-0410-a88d-b1316a301751
---
 .../turabian-formatting/turabian-formatting.sty    | 122 +++++++++++----------
 1 file changed, 62 insertions(+), 60 deletions(-)

(limited to 'Master/texmf-dist/tex/latex/turabian-formatting/turabian-formatting.sty')

diff --git a/Master/texmf-dist/tex/latex/turabian-formatting/turabian-formatting.sty b/Master/texmf-dist/tex/latex/turabian-formatting/turabian-formatting.sty
index 29003fba222..1b6a94e2e6e 100644
--- a/Master/texmf-dist/tex/latex/turabian-formatting/turabian-formatting.sty
+++ b/Master/texmf-dist/tex/latex/turabian-formatting/turabian-formatting.sty
@@ -27,7 +27,7 @@
 
 
 \NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{turabian-formatting}[2017/03/18 Turabian Formatting]
+\ProvidesPackage{turabian-formatting}[2017/11/04 Turabian Formatting]
 
 
 % Package options: flags
@@ -58,30 +58,19 @@
 
 
 % Margin size: 1 inch on all sides
-\setlength\textwidth{\paperwidth}
-\addtolength\textwidth{-2in}
+\setlength\textwidth{\dimexpr \paperwidth -2in \relax}
 \setlength\hoffset{\z@}
 
-\setlength\textheight{\paperheight}
-\addtolength\textheight{-2in}
+\setlength\textheight{\dimexpr \paperheight -2in \relax}
 \setlength\voffset{\z@}
 
 \setlength\oddsidemargin{\z@}
 \setlength\evensidemargin{\z@}
 
-% Header height: set to 1 line of text
-\ifcase \@ptsize
-	\setlength\headheight{10pt}
-\or
-	\setlength\headheight{11pt}
-\or
-	\setlength\headheight{12pt}
-\fi
-
 % Header top and footer baseline: set to 0.5in from page edges
 \setlength\topmargin{-0.5in}
-\setlength\headsep{0.5in}
-\addtolength\headsep{-\headheight}
+\setlength\headheight{\dimexpr \f@size pt \relax}
+\setlength\headsep{\dimexpr 0.5in -\headheight \relax}
 
 \setlength\footskip{0.5in}
 
@@ -89,9 +78,23 @@
 \RequirePackage{setspace}
 \setstretch{2}
 
-% Preserve length of one line of text for subsequent use
+
+% Preserve normalsize and footnotesize single spacing baselineskip values
+
 \newlength\tf@singlelineskip
-\setlength\tf@singlelineskip{0.5\baselineskip}
+\newlength\tf@fnsinglelineskip
+
+\ifcase \@ptsize
+	\setlength\tf@singlelineskip{12pt}
+	\setlength\tf@fnsinglelineskip{9.5pt}
+\or
+	\setlength\tf@singlelineskip{13.6pt}
+	\setlength\tf@fnsinglelineskip{11pt}
+\or
+	\setlength\tf@singlelineskip{14.5pt}
+	\setlength\tf@fnsinglelineskip{12pt}
+\fi
+
 
 % Paragraph indent
 \setlength\parindent{0.5in}
@@ -148,10 +151,11 @@
 \newcommand{\tf@setfnpunct}[1]{\def\tf@thefnpunct{#1\,\,}}
 \tf@setfnpunct{.}
 
-% Footnotes: Renew command for typesetting footnotes
+% Footnotes: renew command for typesetting footnotes
 \renewcommand{\@makefntext}[1]{%
 	\if@optraggedright \raggedright \fi
 	\setlength\parindent{\footnotemargin}%
+	\setlength\tf@singlelineskip{\tf@fnsinglelineskip}%
 	\@thefnmark\tf@thefnpunct#1}
 
 
@@ -189,29 +193,32 @@
 \def\tf@topsecname{section}
 
 
-% Headings formatting: \section, \subsection, and \subsubsection
+% Set adjustment for baselineskip after \section and \section* headings
+\def\tf@adjaftersec{\dimexpr \baselineskip -\tf@singlelineskip -\p@ \relax}
+
 
+% Headings formatting: \section, \subsection, and \subsubsection
 \setcounter{secnumdepth}{0}
 
 \renewcommand{\section}{%
 	\@startsection{section}{1}%
 		{\z@}%
 		{-\tf@singlelineskip}%
-		{1\p@}%
+		{\tf@singlelineskip}%
 		{\normalfont\bfseries\normalsize\singlespacing\centering}}
 
 \renewcommand{\subsection}{%
 	\@startsection{subsection}{2}%
 		{\z@}%
 		{-\tf@singlelineskip}%
-		{1\p@}%
+		{\tf@singlelineskip}%
 		{\normalfont\mdseries\normalsize\singlespacing\centering}}
 
 \renewcommand{\subsubsection}{%
 	\@startsection{subsubsection}{3}%
 		{\z@}%
 		{-\tf@singlelineskip}%
-		{1\p@}%
+		{\tf@singlelineskip}%
 		{\normalfont\bfseries\normalsize\singlespacing\raggedright}}
 
 
@@ -221,8 +228,10 @@
 \def\numberline#1{\hb@xt@\@tempdima{\tflist@beforesecnum #1\tflist@aftersecnum}}
 
 
-% Table of Contents: renew \tableofcontents with single spacing support
+% Table of Contents: renew formatting
+
 \def\tf@tocpagestyle{\@empty}
+
 \renewcommand{\tableofcontents}{%
 	\tf@tocpagestyle
 	\expandafter\csname \tf@topsecname\endcsname*{\contentsname}%
@@ -231,10 +240,9 @@
 		\let\tf@tocrmarg\@tocrmarg
 		\def\@tocrmarg{\tf@tocrmarg plus1fil}
 	\fi
-	\singlespacing%
-	\vspace{-1\baselineskip}
-	\@starttoc{toc}%
-	\setstretch{2}}%
+	{	\vspace{\dimexpr -3\tf@singlelineskip +1\baselineskip \relax}%
+		\singlespacing
+		\@starttoc{toc}}}%
 
 % Table of Contents: right margin and number width formatting
 \def\@tocrmarg{5em}
@@ -263,19 +271,17 @@
 \renewcommand{\listoffigures}{%
 	\expandafter\csname \tf@topsecname\endcsname*{\listfigurename}%
 	\@mkboth{\MakeUppercase\listfigurename}{\MakeUppercase\listfigurename}%
-	\singlespacing%
-	\vspace{-1\baselineskip}
-	\@starttoc{lof}
-	\setstretch{2}}
+	{	\vspace{\dimexpr -3\tf@singlelineskip +1\baselineskip \relax}%
+		\singlespacing
+		\@starttoc{lof}}}
 
 % List of Tables
 \renewcommand{\listoftables}{%
 	\expandafter\csname \tf@topsecname\endcsname*{\listtablename}%
 	\@mkboth{\MakeUppercase\listtablename}{\MakeUppercase\listtablename}%
-	\singlespacing%
-	\vspace{-1\baselineskip}
-	\@starttoc{lot}
-	\setstretch{2}}
+	{	\vspace{\dimexpr -3\tf@singlelineskip +1\baselineskip \relax}%
+		\singlespacing
+		\@starttoc{lot}}}
 
 % List of Illustrations
 \newcommand{\listillustrationname}{Illustrations}
@@ -284,21 +290,23 @@
 \newcommand{\listofillustrations}{%
 	\expandafter\csname \tf@topsecname\endcsname*{\listillustrationname}%
 	\@mkboth{\MakeUppercase\listillustrationname}{\MakeUppercase\listillustrationname}%
-	\singlespacing%
-	\vspace{-1\baselineskip}
-	{\tf@illustrsection Figures}\par\nopagebreak
-	\@starttoc{lof}
-	\vspace{1\baselineskip}
-	{\tf@illustrsection Tables}\par\nopagebreak
-	\@starttoc{lot}
-	\setstretch{2}}
+	{	\vspace{\dimexpr -3\tf@singlelineskip +1\baselineskip \relax}%
+		\singlespacing
+		{\tf@illustrsection Figures}\par\nopagebreak
+		\@starttoc{lof}
+		\vspace{\tf@singlelineskip}
+		{\tf@illustrsection Tables}\par\nopagebreak
+		\@starttoc{lot}}}
 
 
 % Figures and Tables: float positioning
 
-\setlength\textfloatsep{2\tf@singlelineskip}
-\setlength\floatsep{2\tf@singlelineskip minus 0.5\tf@singlelineskip}
-\setlength\intextsep{2\tf@singlelineskip minus 0.25\tf@singlelineskip}
+\setlength\textfloatsep{%
+	\dimexpr 2\tf@singlelineskip +\p@ \relax minus 1\tf@singlelineskip}
+\setlength\floatsep{%
+	\dimexpr 1\tf@singlelineskip +\p@ \relax plus 1\tf@singlelineskip}
+\setlength\intextsep{%
+	\dimexpr 1\tf@singlelineskip +\p@ \relax plus 1\tf@singlelineskip}
 
 \def\fps@table{!htb}
 \def\fps@figure{!htb}
@@ -322,8 +330,7 @@
 \setlength\leftmarginiii{\parindent}
 \setlength\leftmarginiv{\parindent}
 \setlength\labelsep{.65em}
-\setlength\labelwidth{\parindent}
-\addtolength\labelwidth{-\labelsep}
+\setlength\labelwidth{\dimexpr \parindent -\labelsep \relax}
 
 % Lists: formatting command for both enumerate and itemize
 \def\tf@listformat{%
@@ -380,12 +387,7 @@
 				\setlength\rightmargin{\leftmargin}
 			\fi
 			\setlength\parsep{\z@}
-			% Place line spacing between text and quotation
-			\ifnum \baselinestretch =1
-				\setlength\topsep{\baselineskip}
-			\else
-				\setlength\topsep{\z@}
-			\fi}%
+			\setlength\topsep{\dimexpr 2\tf@singlelineskip -\baselineskip \relax}}%
 		\singlespacing%
 		\item\relax%
 	}
@@ -400,9 +402,7 @@
 \renewcommand\@openbib@code{%
 	\singlespacing
 	\setlength\leftmargin{\bibindent}
-	\setlength\itemindent{-\bibindent}
-	\addtolength\itemindent{\labelsep}
-	\addtolength\itemindent{\labelwidth}
+	\setlength\itemindent{\dimexpr -\bibindent +\labelsep +\labelwidth \relax}
 	\setlength\itemsep{\tf@singlelineskip}
 	\setlength\parsep{\z@}}
 
@@ -429,7 +429,9 @@
 				\fi
 				\renewcommand{\bibsetup}{%
 					\addcontentsline{toc}{\tf@topsecname}{\bibname}
-					\singlespacing}
+					\vspace{\dimexpr -2\tf@singlelineskip +1\baselineskip \relax}%
+					\singlespacing%
+					\def\tf@adjaftersec{\dimexpr \tf@singlelineskip -\p@ \relax}}
 				\renewcommand{\bibitemsep}{1\baselineskip}
 				\renewcommand{\bibhang}{0.5in}
 			}{}}
@@ -470,7 +472,7 @@
 	\renewcommand{\enoteformat}{%
 		\if@optraggedright \raggedright \fi
 		\setlength\parindent{\footnotemargin}
-		\vspace{1\baselineskip}
+		\vspace{\tf@singlelineskip}
 		\theenmark.\,\,}
 
 \else
-- 
cgit v1.2.3

