summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/turabian-formatting/turabian-formatting.sty
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/latex/turabian-formatting/turabian-formatting.sty')
-rw-r--r--Master/texmf-dist/tex/latex/turabian-formatting/turabian-formatting.sty104
1 files changed, 100 insertions, 4 deletions
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 36636109f96..734f70f34d8 100644
--- a/Master/texmf-dist/tex/latex/turabian-formatting/turabian-formatting.sty
+++ b/Master/texmf-dist/tex/latex/turabian-formatting/turabian-formatting.sty
@@ -4,7 +4,7 @@
% Manual for Writers of Research Papers, Theses, and Dissertations (8th edition)
%
% ==============================
-% Copyright 2013 Omar Abdool
+% Copyright 2013-2016 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,13 +27,15 @@
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{turabian-formatting}[2016/02/27 Turabian Formatting]
+\ProvidesPackage{turabian-formatting}[2016/03/15 Turabian Formatting]
% Flags adjusted with package options
\newif\if@optraggedright\@optraggedrightfalse
+\newif\if@authordateformat\@authordateformatfalse
+
\newif\if@appendbibformat\@appendbibformattrue
\newif\if@endnotesformat\@endnotesformatfalse
@@ -43,6 +45,8 @@
\DeclareOption{raggedright}{\@optraggedrighttrue}
+\DeclareOption{authordate}{\@authordateformattrue}
+
\DeclareOption{noadjustbib}{\@appendbibformatfalse}
\DeclareOption{endnotes}{\@endnotesformattrue}
@@ -421,6 +425,62 @@
\def\quote{\quotation}
+% Lists: enumerate and itemize
+
+\setlength\leftmargini{1.5\parindent}
+\setlength\leftmargin{\leftmargini}
+\setlength\leftmarginii{\parindent}
+\setlength\leftmarginiii{\parindent}
+\setlength\leftmarginiv{\parindent}
+\setlength\labelsep{.65em}
+\setlength\labelwidth{\parindent}
+\addtolength\labelwidth{-\labelsep}
+
+% Formatting command for both enumerate and itemize
+\def\tf@listformat{%
+ \setlength\topsep{\z@}
+ \setlength\itemsep{\z@}
+ \setlength\parsep{\z@}
+ \setlength\listparindent{\parindent}}
+
+% Format of enumerate list labels
+\renewcommand{\labelenumi}{\arabic{enumi}.}
+\renewcommand{\labelenumii}{\alph{enumii})}
+\renewcommand{\labelenumiii}{(\arabic{enumiii})}
+\renewcommand{\labelenumiv}{(\alph{enumiv})}
+
+% Redefine enumerate to include formatting command hook
+\def\tf@enumerateformat{\tf@listformat}
+\def\enumerate{%
+ \ifnum
+ \@enumdepth >\thr@@\@toodeep
+ \else
+ \advance\@enumdepth\@ne
+ \edef\@enumctr{enum\romannumeral\the\@enumdepth}%
+ \expandafter
+ \list
+ \csname label\@enumctr\endcsname
+ {\usecounter\@enumctr%
+ \def\makelabel##1{\hss\llap{##1}}%
+ \tf@enumerateformat}%
+ \fi}
+
+% Redefine itemize to include formatting command hook
+\def\tf@itemizeformat{\tf@listformat}
+\def\itemize{%
+ \ifnum
+ \@itemdepth >\thr@@\@toodeep
+ \else
+ \advance\@itemdepth\@ne
+ \edef\@itemitem{labelitem\romannumeral\the\@itemdepth}%
+ \expandafter
+ \list
+ \csname\@itemitem\endcsname
+ {\def\makelabel##1{\hss\llap{##1}}%
+ \tf@itemizeformat}%
+ \fi}
+
+
% Tables and Figures: float positioning
\setlength\textfloatsep{1\baselineskip plus 2pt}
@@ -487,10 +547,22 @@
{isbn=false, autolang=other, footmarkoff, backend=biber}%
{biblatex-chicago}
+\if@authordateformat
+ \PassOptionsToPackage{authordate}{biblatex-chicago}
+\fi
+
+% Adjustments to \printbibliography formatting
\if@appendbibformat
\AtEndPreamble{%
\@ifpackageloaded{biblatex}%
{%
+ \if@authordateformat
+ \DefineBibliographyStrings{english}{%
+ bibliography = {References}}
+ \else
+ \DefineBibliographyStrings{english}{%
+ references = {Bibliography}}
+ \fi
\renewcommand{\bibsetup}{\singlespacing}
\renewcommand{\bibitemsep}{1\baselineskip}
\renewcommand{\bibhang}{0.5in}
@@ -500,7 +572,6 @@
% endnotes package support: formatting
-% Note: endnotes package causes error when cite keys contain "_".
\if@endnotesformat
@@ -511,7 +582,7 @@
\renewcommand*{\thefootnote}{\fnsymbol{footnote}}
\PassOptionsToPackage{notetype=endonly}{biblatex-chicago}
-
+
% Endnotes layout and formatting (based on if chapter is defined)
\ifcsdef{chapter}%
{% If \chapter defined...
@@ -561,6 +632,22 @@
\singlespacing}%
}%
+ % 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{}%
+ }}
+
% Set default endnotes formatting
\renewcommand{\enotesize}{\normalsize}
\renewcommand{\enoteformat}{%
@@ -571,6 +658,13 @@
\vspace{1\baselineskip}
\theenmark.\,\,}
+\else
+
+ % Define \theendnotes if endnotes package not loaded
+ \@ifpackageloaded{endnotes}%
+ {}%
+ {\def\theendnotes{\@empty}}
+
\fi
@@ -578,6 +672,8 @@
\if@optemptymargins
+ \PackageWarningNoLine{turabian-formatting}{The 'emptymargins' option has been deprecated}
+
% Adjust top margin height by 0.5in
\addtolength\textheight{-0.5in}
\addtolength\topmargin{0.5in}