-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathpreamble.tex
53 lines (46 loc) · 1.29 KB
/
preamble.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
\usepackage{amsthm}
\usepackage{fontspec}
\setmonofont{Menlo}
\usepackage[english,main=russian]{babel}
\usepackage{fancyhdr}
\usepackage{float}
\pagestyle{fancy}
\usepackage[fit]{truncate}
\fancyhead[LE,RO]{\nouppercase{\truncate{0.5\headwidth}{\rightmark}}}
\fancyhead[LO,RE]{\nouppercase{\truncate{0.5\headwidth}{\leftmark}}}
\usepackage{setspace}
\onehalfspacing
\setlength\parindent{20pt}
\setlength\parskip{0em}
\makeatletter
\def\thm@space@setup{%
\thm@preskip=8pt plus 2pt minus 4pt
\thm@postskip=\thm@preskip
}
\DeclareSymbolFont{cyrletters}{\encodingdefault}{\familydefault}{m}{it}
\newcommand{\makecyrmathletter}[1]{%
\begingroup\lccode`a=#1\lowercase{\endgroup
\Umathcode`a}="0 \csname symcyrletters\endcsname\space #1
}
\count255="409
\loop\ifnum\count255<"44F
\advance\count255 by 1
\makecyrmathletter{\count255}
\repeat
\DeclareSourcemap{
\maps[datatype=bibtex]{
\map{
\step[fieldsource=langid, match=russian, final]
\step[fieldset=presort, fieldvalue={a}]
}
\map{
\step[fieldsource=langid, notmatch=russian, final]
\step[fieldset=presort, fieldvalue={z}]
}
}
}
\renewcommand{\partname}{Часть}
\renewcommand{\contentsname}{Содержание}
\renewcommand{\chaptername}{Упражнение}
\renewcommand{\figurename}{Рис.}
\makeatother