-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathnotebook.cls
More file actions
74 lines (64 loc) · 1.71 KB
/
Copy pathnotebook.cls
File metadata and controls
74 lines (64 loc) · 1.71 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
\NeedsTeXFormat{LaTeX2e}
\ProvidesClass{notebook}[6666/66/66 Notes]
\LoadClass{book}
%%% Required packages.
\RequirePackage[margin=2.5cm]{geometry}
\RequirePackage[colorlinks=true]{hyperref}
%%% Page styles.
% Standard page style; section title in top right with chapter in bottom left
% and page number in bottom right.
\def\ps@normal{%
\def\@oddfoot{\leftmark\hfill\thepage}%
\let\@evenfoot\@oddfoot%
\def\@oddhead{\hfill\rightmark}%
\let\@evenhead\@oddhead%
\let\@mkboth\markboth%
}
\pagestyle{normal}
% More bare page style for large pages; only page number in bottom right.
\def\ps@numbered{%
\def\@oddfoot{\hfill\thepage}%
\let\@evenfoot\@oddfoot%
\let\@oddhead\@empty\let\@evenhead\@empty%
\let\@mkboth\markboth%
}
% Make chapter mark \leftmark as "N | CHAPTER TITLE" where N is chapter number.
\renewcommand{\chaptermark}[1]{%
\markboth{\MakeUppercase{\if@mainmatter\thechapter~\textbar~\fi#1}}{}%
}
% Make section mark \rightmark as "SECTION TITLE".
\renewcommand{\sectionmark}[1]{\markright{\MakeUppercase{#1}}}
%%% Sectioning.
% Title page.
\renewcommand{\maketitle}{%
\thispagestyle{empty}%
\noindent%
\\[0.4\textheight]%
{\huge\scshape\@title}%
\\[2em]%
{\large\scshape\@date}%
\\[2em]%
{\large\scshape\@author}%
\clearpage%
\setcounter{page}{1}%
}
% Chapters.
\def\chapter{%
\clearpage%
\thispagestyle{numbered}%
\global\@topnum\z@
\@afterindentfalse
\secdef\@chapter\@schapter
}
\def\@makechapterhead#1{%
\vspace*{50\p@}%
{ \parindent \z@ \raggedright \normalfont
\ifnum \c@secnumdepth > \m@ne
\if@mainmatter
\Huge\bfseries\thechapter~\textbar~%
\fi
\fi
\interlinepenalty\@M
\Huge\bfseries #1\par\nobreak
\vskip 40\p@
}}