-
Notifications
You must be signed in to change notification settings - Fork 1
/
oberon.tex
199 lines (155 loc) · 6.06 KB
/
oberon.tex
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
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
\documentclass[b5paper, 11pt, twoside, onecolumn, openany]{memoir}
%%% PACKAGES
\usepackage[utf8]{inputenc}
\usepackage[T2A]{fontenc}
\usepackage[russian]{babel}
\usepackage[final]{microtype} % Less badboxes
\usepackage{bookmark}
\usepackage{listings}
\usepackage{soulutf8}
\usepackage{pscyr}
% \usepackage{kpfonts} %Font
\usepackage{amsmath,amssymb,mathtools} % Math
% \usepackage{tikz} % Figures
\usepackage{graphicx} % Include figures
%%% CODE LISTINGS
\input{codesettings.tex}
%%% PAGE LAYOUT
\setlrmarginsandblock{0.15\paperwidth}{*}{1} % Left and right margin
\setulmarginsandblock{0.2\paperwidth}{*}{1} % Upper and lower margin
\checkandfixthelayout
%%% SECTIONAL DIVISIONS
\maxsecnumdepth{section} % Subsections (and higher) are numbered
\setsecnumdepth{section}
\makeatletter %
\makechapterstyle{standard}{
\setlength{\beforechapskip}{0\baselineskip}
\setlength{\midchapskip}{1\baselineskip}
\setlength{\afterchapskip}{2\baselineskip}
\renewcommand{\chapterheadstart}{\vspace*{\beforechapskip}}
\renewcommand{\chapnamefont}{\centering\normalfont\Large}
\renewcommand{\printchaptername}{\chapnamefont \@chapapp}
\renewcommand{\chapternamenum}{\space}
\renewcommand{\chapnumfont}{\normalfont\Large}
\renewcommand{\printchapternum}{\chapnumfont \thechapter}
\renewcommand{\afterchapternum}{\par\nobreak\vskip \midchapskip}
\renewcommand{\printchapternonum}{\vspace*{\midchapskip}\vspace*{5mm}}
\renewcommand{\chaptitlefont}{\centering\bfseries\LARGE}
\renewcommand{\printchaptertitle}[1]{\chaptitlefont ##1}
\renewcommand{\afterchaptertitle}{\par\nobreak\vskip \afterchapskip}
% Part titles
\renewcommand{\beforepartskip}{}
\renewcommand{\afterpartskip}{\bigskip}
\renewcommand{\clearforchapter}{}
}
\makeatother
\chapterstyle{standard}
\setsecheadstyle{\normalfont\large\bfseries}
\setsubsecheadstyle{\normalfont\normalsize\bfseries}
\setparaheadstyle{\normalfont\normalsize\bfseries}
\setparaindent{0pt}\setafterparaskip{0pt}
%%% FLOATS AND CAPTIONS
%%%------------------------------------------------------------------------
\makeatletter % You do not need to write [htpb] all the time
\renewcommand\fps@figure{htbp}
\renewcommand\fps@table{htbp}
\makeatother
\captiondelim{\space } % A space between caption name and text
\captionnamefont{\small\bfseries} % Font of the caption name
\captiontitlefont{\small\normalfont} % Font of the caption text
\changecaptionwidth % Change the width of the caption
\captionwidth{1\textwidth} %
%%% ABSTRACT
%%%------------------------------------------------------------------------
\renewcommand{\abstractnamefont}{\normalfont\small\bfseries} % Font of abstract title
\setlength{\absleftindent}{0.1\textwidth} % Width of abstract
\setlength{\absrightindent}{\absleftindent}
%%% HEADER AND FOOTER
%%%------------------------------------------------------------------------
\makepagestyle{standard} % Make standard pagestyle
\makeatletter % Define standard pagestyle
\makeevenfoot{standard}{}{}{} %
\makeoddfoot{standard}{}{}{} %
\makeevenhead{standard}{\bfseries\thepage\normalfont\qquad\small\leftmark}{}{}
\makeoddhead{standard}{}{}{\small\rightmark\qquad\bfseries\thepage}
% \makeheadrule{standard}{\textwidth}{\normalrulethickness}
\makeatother %
\makeatletter
\makepsmarks{standard}{
\createmark{chapter}{both}{nonumber}{\@chapapp\ }{ \quad }
\createmark{chapter}{right}{nonumber}{}{ \quad }
\createmark{section}{right}{nonumber}{}{ \quad }
\createmark{subsection}{right}{nonumber}{}{ \quad }
\createplainmark{toc}{both}{\contentsname}
\createplainmark{lof}{both}{\listfigurename}
\createplainmark{lot}{both}{\listtablename}
\createplainmark{bib}{both}{\bibname}
\createplainmark{index}{both}{\indexname}
\createplainmark{glossary}{both}{\glossaryname}
}
\makeatother %
\makepagestyle{chap} % Make new chapter pagestyle
\makeatletter
\makeevenfoot{chap}{}{}{} % Define new chapter pagestyle
\makeoddfoot{chap}{}{}{} %
\makeevenhead{chap}{}{}{} %
\makeoddhead{chap}{}{}{} %
% \makeheadrule{chap}{\textwidth}{\normalrulethickness}
\makeatother
\nouppercaseheads
\pagestyle{standard} % Choosing pagestyle and chapter pagestyle
\aliaspagestyle{chapter}{chap} %
%%% NEW COMMANDS
%%%------------------------------------------------------------------------
\maxtocdepth{subsection} % ToC depth
\settocdepth{subsection}
\AtEndDocument{\addtocontents{toc}{\par}} % Add a \par to the end of the TOC
\usepackage{hyperref} % Internal hyperlinks
\hypersetup{
pdfborder={0 0 0}, % No borders around internal hyperlinks
pdfauthor={Коллектив авторов} % author
}
\usepackage{memhfixc} %
\author{Коллектив авторов}
\title{Построение компиляторов}
\date{}
\renewcommand{\partnumberline}[1]{} % Remove part number in ToC
\renewcommand{\cftpartdotsep}{\cftdotsep} % Part dots in ToC
\renewcommand{\chapternumberline}[1]{} % Remove chapter number in ToC
\renewcommand{\cftchapterdotsep}{\cftdotsep} % Chapter dots in ToC
% Remove section numbers in ToC
\let\oldcftsf\cftsectionfont% save definition of \cftsectionfont
\let\oldcftspn\cftsectionafterpnum% and of \cftsectionafterpnum
\renewcommand*{\cftsectionfont}{%
\let\oldnl\numberline% save definition of \numberline
\renewcommand*{\numberline}[1]{}% change it
\oldcftsf} % use original \cftsectionfont
\renewcommand*{\cftsectionafterpnum}{%
\let\numberline\oldnl% % restore orginal \numberline
\oldcftspn} % use original \cftsectionafterpnum
\begin{document}
\mainmatter
\begin{center}
~ \\ ~ \\ ~ \\ ~ \\ ~ \\
%{А. И. Ефимов} \\
%{П. В. Александрян} \\
%{Д. В. Высоцкий} \\
\vspace{120pt}
\textbf{\Huge ПОСТРОЕНИЕ} \\
~ \\
\textbf{\Huge КОМПИЛЯТОРОВ} \\
\vspace{180pt}
{ИЗДАТЕЛЬСТВО} \\
{ТЕХНИКО-ТЕОРЕТИЧЕСКОЙ ЛИТЕРАТУРЫ} \\
{КОМАНДЫ РАЗРАБОТЧИКОВ} \\
{КОМПИЛЯТОРА ОБЕРОНА} \\
~ \\
{Р И Г А ~ ~ ~ 2 0 2 0}
\end{center}
\clearpage
\input{text.tex}
\backmatter
\clearpage
\tableofcontents*
\clearpage
\end{document}