-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtint_book_header.tex
More file actions
164 lines (149 loc) · 7.31 KB
/
tint_book_header.tex
File metadata and controls
164 lines (149 loc) · 7.31 KB
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
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
%% -- tint overrides
%% fonts, using roboto (condensed) as default
\usepackage[sfdefault,condensed]{roboto}
%% also nice: \usepackage[default]{lato}
%% colored links, setting 'borrowed' from RJournal.sty with 'Thanks, Achim!'
%\RequirePackage{color}
%\definecolor{link}{rgb}{0.1,0.1,0.8} %% blue with some grey
%\hypersetup{
% colorlinks,%
% citecolor=link,%
% filecolor=link,%
% linkcolor=link,%
% urlcolor=link
%}
%% macros
\makeatletter
%% -- tint does not use italics or allcaps in title
\renewcommand{\maketitle}{%
\newpage
\global\@topnum\z@% prevent floats from being placed at the top of the page
\begingroup
\setlength{\parindent}{0pt}%
\setlength{\parskip}{4pt}%
\let\@@title\@empty
\let\@@author\@empty
\let\@@date\@empty
\ifthenelse{\boolean{@tufte@sfsidenotes}}{%
%\gdef\@@title{\sffamily\LARGE\allcaps{\@title}\par}%
%\gdef\@@author{\sffamily\Large\allcaps{\@author}\par}%
%\gdef\@@date{\sffamily\Large\allcaps{\@date}\par}%
\gdef\@@title{\begingroup\fontseries{b}\selectfont\LARGE{\@title}\par}%
\gdef\@@author{\begingroup\fontseries{l}\selectfont\Large{\@author}\par}%
\gdef\@@date{\begingroup\fontseries{l}\selectfont\Large{\@date}\par}%
}{%
%\gdef\@@title{\LARGE\itshape\@title\par}%
%\gdef\@@author{\Large\itshape\@author\par}%
%\gdef\@@date{\Large\itshape\@date\par}%
%\gdef\@@title{\begingroup\fontseries{b}\selectfont\LARGE\@title\par\endgroup}%
%\gdef\@@author{\begingroup\fontseries{l}\selectfont\Large\@author\par\endgroup}%
%\gdef\@@date{\begingroup\fontseries{l}\selectfont\Large\@date\par\endgroup}%
\gdef\@@title{\begingroup\fontseries{b}\fontsize{28}{60}\selectfont\@title\par\endgroup}%
\gdef\@@author{\begingroup\fontseries{l}\fontsize{16}{20}\selectfont\@author\par\endgroup}%
\gdef\@@date{\begingroup\fontseries{l}\fontsize{16}{20}\selectfont\@date\par\endgroup}%
}%
%\phantom{XXX}%
\vspace{12pc}%
\@@title%
\vspace{4pc}%
\@@author
\@@date
\endgroup
\thispagestyle{plain}% suppress the running head
\tuftebreak% add some space before the text begins
\@afterindentfalse\@afterheading% suppress indentation of the next paragraph
}
%% -- tint does not use italics or allcaps in section/subsection/paragraph
\titleformat{\chapter}%
[display]% shape
{\relax\ifthenelse{\NOT\boolean{@tufte@symmetric}}{\begin{fullwidth}}{}}% format applied to label+text
%{\itshape\huge\thechapter}% label
{\huge \chaptername \thechapter}% label
{0pt}% horizontal separation between label and title body
%{\huge\rmfamily\itshape}% before the title body
{\fontseries{b}\selectfont\huge}% before the title body
[\ifthenelse{\NOT\boolean{@tufte@symmetric}}{\end{fullwidth}}{}]% after the title body
\titleformat{\section}%
[hang]% shape
%{\normalfont\Large\itshape}% format applied to label+text
{\fontseries{b}\selectfont\Large}% 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
{\fontseries{m}\selectfont\large}% 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
{\fontseries{l}\selectfont}% format applied to label+text
{\theparagraph}% label
{1em}% horizontal separation between label and title body
{}% before the title body
[]% after the title body
%% -- tint does not use italics here either
% Formatting for main TOC (printed in front matter)
% {section} [left] {above} {before w/label} {before w/o label} {filler + page} [after]
\ifthenelse{\boolean{@tufte@toc}}{%
\titlecontents{part}% FIXME
[0em] % distance from left margin
%{\vspace{1.5\baselineskip}\begin{fullwidth}\LARGE\rmfamily\itshape} % above (global formatting of entry)
{\vspace{1.5\baselineskip}\begin{fullwidth}\fontseries{m}\selectfont\LARGE} % above (global formatting of entry)
{\contentslabel{2em}} % before w/label (label = ``II'')
{} % before w/o label
{\rmfamily\upshape\qquad\thecontentspage} % filler + page (leaders and page num)
[\end{fullwidth}] % after
\titlecontents{chapter}%
[0em] % distance from left margin
%{\vspace{1.5\baselineskip}\begin{fullwidth}\LARGE\rmfamily\itshape} % above (global formatting of entry)
{\vspace{1.5\baselineskip}\begin{fullwidth}\fontseries{m}\selectfont\LARGE} % above (global formatting of entry)
{\hspace*{0em}\contentslabel{2em}} % before w/label (label = ``2'')
{\hspace*{0em}} % before w/o label
%{\rmfamily\upshape\qquad\thecontentspage} % filler + page (leaders and page num)
{\upshape\qquad\thecontentspage} % filler + page (leaders and page num)
[\end{fullwidth}] % after
\titlecontents{section}% FIXME
[0em] % distance from left margin
%{\vspace{0\baselineskip}\begin{fullwidth}\Large\rmfamily\itshape} % above (global formatting of entry)
{\vspace{0\baselineskip}\begin{fullwidth}\fontseries{m}\selectfont\Large} % above (global formatting of entry)
{\hspace*{2em}\contentslabel{2em}} % before w/label (label = ``2.6'')
{\hspace*{2em}} % before w/o label
%{\rmfamily\upshape\qquad\thecontentspage} % filler + page (leaders and page num)
{\upshape\qquad\thecontentspage} % filler + page (leaders and page num)
[\end{fullwidth}] % after
\titlecontents{subsection}% FIXME
[0em] % distance from left margin
%{\vspace{0\baselineskip}\begin{fullwidth}\large\rmfamily\itshape} % above (global formatting of entry)
{\vspace{0\baselineskip}\begin{fullwidth}\fontseries{m}\selectfont\large} % above (global formatting of entry)
{\hspace*{4em}\contentslabel{4em}} % before w/label (label = ``2.6.1'')
{\hspace*{4em}} % before w/o label
%{\rmfamily\upshape\qquad\thecontentspage} % filler + page (leaders and page num)
{\upshape\qquad\thecontentspage} % filler + page (leaders and page num)
[\end{fullwidth}] % after
\titlecontents{paragraph}% FIXME
[0em] % distance from left margin
%{\vspace{0\baselineskip}\begin{fullwidth}\normalsize\rmfamily\itshape} % above (global formatting of entry)
{\vspace{0\baselineskip}\begin{fullwidth}\fontseries{m}\selectfont\normalsize\rmfamily} % above (global formatting of entry)
{\hspace*{6em}\contentslabel{2em}} % before w/label (label = ``2.6.0.0.1'')
{\hspace*{6em}} % before w/o label
%{\rmfamily\upshape\qquad\thecontentspage} % filler + page (leaders and page num)
{\upshape\qquad\thecontentspage} % filler + page (leaders and page num)
[\end{fullwidth}] % after
}{}
% tint: no smallcaps in header
% The 'fancy' page style is the default style for all pages.
\fancyhf{} % clear header and footer fields
\ifthenelse{\boolean{@tufte@twoside}}
% {\fancyhead[LE]{\thepage\quad\smallcaps{\newlinetospace{\plaintitle}}}%
% \fancyhead[RO]{\smallcaps{\newlinetospace{\plainauthor}}\quad\thepage}}
% {\fancyhead[RE,RO]{\smallcaps{\newlinetospace{\plaintitle}}\quad\thepage}}
{\fancyhead[LE]{\thepage\quad{\newlinetospace{\plaintitle}}}%
\fancyhead[RO]{{\newlinetospace{\plaintitle}}\quad\thepage}}%
{\fancyhead[RE,RO]{{\newlinetospace{\plaintitle}}\quad\thepage}}
\makeatother