-
Notifications
You must be signed in to change notification settings - Fork 0
/
prue-thesis.sty
133 lines (111 loc) · 4.63 KB
/
prue-thesis.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
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
% +--------------------------------------------------+
% | Russian-specific packages |
% +--------------------------------------------------+
\usepackage[T2A]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[english,russian]{babel}
% +--------------------------------------------------+
% | Page formatting |
% +--------------------------------------------------+
% Paper size, margins
\usepackage{geometry}
\geometry{
a4paper,
left=30mm,
right=10mm,
vmargin=25mm,
}
% Page number position
\usepackage{fancyhdr}
\fancyhf{} % Delete current heading/footer configuration
\fancyhead[C]{\thepage} % Put page number to the center of the page header
\renewcommand{\headrulewidth}{0pt} % Delete bottom border of the page header
\pagestyle{fancy} % Apply styles
% Landscape pages in the document
\usepackage{pdflscape}
% +--------------------------------------------------+
% | Fonts and spacing |
% +--------------------------------------------------+
% Almost Times New Roman, default for Roman family
\renewcommand{\rmdefault}{Tempora-TLF}
\usepackage{textcase}
\usepackage{anyfontsize}
% 1.5 line space in Microsoft Word
\linespread{1.213}
% Paragraph indentation
\usepackage{indentfirst}
\setlength\parindent{1.25cm}
% +--------------------------------------------------+
% | Table of contents |
% +--------------------------------------------------+
% Depth of ToC: 1 is chapter, 2 is subsection, etc.
\setcounter{tocdepth}{2}
\usepackage{tocloft}
% Sections
\renewcommand{\cftsecpresnum}{Глава } % Text before the number
\renewcommand{\cftsecaftersnum}{.} % Text after the number
\newlength\tocseclength % New number length
\settowidth\tocseclength{\cftsecpresnum}
\addtolength\cftsecnumwidth{\tocseclength}
\renewcommand\cftsecdotsep{4.5} % Separator: dots and their interval
\setlength{\cftbeforesecskip}{0pt} % Line space between sections
% Subsections
\renewcommand{\cftsubsecaftersnum}{.} % Text after the number
\setlength{\cftsubsecindent}{2.222em} % Text with the same indentation as section one
% No hyphens in ToC
\renewcommand{\@tocrmarg}{\@pnumwidth plus1fil}
% Links in ToC
\usepackage[hidelinks]{hyperref}
% +--------------------------------------------------+
% | Titles (headers) |
% +--------------------------------------------------+
\usepackage[raggedright]{titlesec} % raggedright = no hyphens
% Format and spacing of section
\titleformat{\section}
[block] % no indentation
{\Large\bfseries\filcenter} % format
{Глава \thesection. } % label
{0em} % sep
{} % before
\titlespacing{\section}
{0pt} % left
{18pt} % beforesep
{18pt} % aftersep
% Format and spacing of section
\titleformat{\subsection}
[block] % no indentation
{\large\bfseries\filcenter} % format
{\thesubsection. } % label
{0em} % sep
{} % before
\titlespacing{\subsection}
{0pt} % left
{18pt} % beforesep
{18pt} % aftersep
% +--------------------------------------------------+
% | Tables, images, captions |
% +--------------------------------------------------+
\usepackage{graphicx}
\graphicspath{ {src/img/} }
\usepackage[justification=centering]{caption}
\DeclareCaptionLabelSeparator{emdash}{ --- }
\captionsetup{labelsep=emdash}
% Multi-page tables with even distribution of column width
% Combines `tabularx` and `longtable` packages
\usepackage{xltabular}
\usepackage{multirow}
\usepackage{multicol}
% +--------------------------------------------------+
% | Lists |
% +--------------------------------------------------+
\usepackage{enumitem} % enumerate, itemize
\setlist{nolistsep} % no extra line space
\renewcommand{\labelitemi}{--} % bullet type
% +--------------------------------------------------+
% | Helpful commands |
% +--------------------------------------------------+
\newcommand{\titleboldcaps}[1]{\textbf{\MakeTextUppercase{#1}}}
\newcommand{\titlesmallboldcaps}[1]{\fontsize{11}{11} \titleboldcaps{#1}}
\newcommand{\titlebig}[1]{\fontsize{15}{15} \textmd{#1}}
\newcommand{\titlemain}[1]{\fontsize{18}{18} \textmd{#1}}
\newcommand{\smallcaption}[1]{\fontsize{10}{10} \textmd{#1}}