-
Notifications
You must be signed in to change notification settings - Fork 0
/
tuftex-sectioning.sty
81 lines (70 loc) · 3.06 KB
/
tuftex-sectioning.sty
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{tuftex-sectioning}[2023-06-20 package tuftex-sectioning]
% package preliminary declarations
\RequirePackage{titlesec,titletoc}
% package options: none, not doing symmetric option
% package declarations
% From original tufte-common.def
% Turn off section numbering
\setcounter{secnumdepth}{-1}
% From original tufte-common.def
% Make Tuftian-style section headings and TOC formatting
%\titleformat{\chapter}%
% [display]% shape
% {\relax\ifthenelse{\NOT\boolean{@tufte@symmetric}}{\begin{fullwidth}}{}}% format applied to label+text
% {\itshape\huge\thechapter}% label
% {0pt}% horizontal separation between label and title body
% {\huge\rmfamily\itshape}% before the title body
% [\ifthenelse{\NOT\boolean{@tufte@symmetric}}{\end{fullwidth}}{}]% after the title body
\titleformat{\chapter}%
[display]% shape
{\relax\begin{fullwidth}}% format applied to label+text
{\itshape\huge\thechapter}% label
{0pt}% horizontal separation between label and title body
{\huge\rmfamily\itshape}% before the title body
[\end{fullwidth}]% after the title body
\titleformat{\section}%
[hang]% shape
{\normalfont\Large\itshape}% format applied to label+text
{\thesection}% label
{1em}% horizontal separation between label and title body
{}% before the title body
[]% after the title body
\titleformat{\subsection}%
[hang]% shape
{\normalfont\large\itshape}% format applied to label+text
{\thesubsection}% label
{1em}% horizontal separation between label and title body
{}% before the title body
[]% after the title body
\titleformat{\paragraph}%
[runin]% shape
{\normalfont\itshape}% format applied to label+text
{\theparagraph}% label
{1em}% horizontal separation between label and title body
{}% before the title body
[]% after the title body
\titlespacing*{\chapter}{0pt}{50pt}{40pt}
\titlespacing*{\section}{0pt}{3.5ex plus 1ex minus .2ex}{2.3ex plus .2ex}
\titlespacing*{\subsection}{0pt}{3.25ex plus 1ex minus .2ex}{1.5ex plus.2ex}
% Subsubsection and following section headings shouldn't be used.
% See Bringhurst's _The Elements of Typography_, section 4.2.2.
\RenewDocumentCommand{\subsubsection}{}{%
\PackageError{tuftex-sectioning}{\string\subsubsection is undefined by this class.
See Robert Bringhurst's _The Elements of
Typographic Style_, section 4.2.2.
\string\subsubsection was used}
{From Bringhurst's _The Elements of Typographic Style_, section 4.2.2: Use as
many levels of headings as you need, no more and no fewer. Also see the many
related threads on Ask E.T. at http://www.edwardtufte.com/.}
}
\RenewDocumentCommand{\subparagraph}{}{%
\PackageError{tuftex-sectioning}{\string\subparagraph is undefined by this class.%
See Robert Bringhurst's _The Elements of
Typographic Style_, section 4.2.2.
\string\subparagraph was used}
{From Bringhurst's _The Elements of Typographic Style_, section 4.2.2: Use as
many levels of headings as you need, no more and no fewer. Also see the many
related threads on Ask E.T. at http://www.edwardtufte.com/.}
}
% expose to outside world