-
Notifications
You must be signed in to change notification settings - Fork 3
/
preamble.tex
110 lines (93 loc) · 3.98 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
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
%%% PDF settings
\pdfvariable minorversion 7 % Set PDF version to 1.7.
%%% Fonts and language setup.
\usepackage{polyglossia}
% Setup fonts.
\usepackage{fontspec}
\setmainfont{CMU Serif}
\setsansfont{CMU Sans Serif}
\setmonofont{CMU Typewriter Text}
\usepackage{microtype} % Add fancy-schmancy font tricks.
\usepackage{xcolor} % Add colors support.
%% Math
\usepackage{amsmath, amsfonts, amssymb, amsthm, mathtools} % Advanced math tools.
\usepackage{thmtools}
\usepackage{unicode-math} % Allow TTF and OTF fonts in math and allow direct typing unicode math characters.
\unimathsetup{
warnings-off={
mathtools-colon,
mathtools-overbracket
}
}
\setmathfont{Latin Modern Math} % default
\setmathfont[range={\setminus,\varnothing,\smashtimes}]{Asana Math}
%%% Images
\usepackage{graphicx}
\graphicspath{{figures/}}
\usepackage{import}
%%% Polyglossia setup after (nearly) everything as described in documentation.
\setdefaultlanguage{russian}
\setotherlanguage{english}
%%% Custom commands
\newcommand{\R}{\mathbb{R}}
\newcommand{\N}{\mathbb{N}}
\newcommand{\Z}{\mathbb{Z}}
\newcommand{\Q}{\mathbb{Q}}
\newcommand{\C}{\mathbb{C}}
\newcommand{\id}{\mathrm{id}}
\AtBeginDocument{\renewcommand{\leq}{\leqslant}}
\AtBeginDocument{\renewcommand{\geq}{\geqslant}}
\AtBeginDocument{\renewcommand{\Re}{\operatorname{Re}}}
\AtBeginDocument{\renewcommand{\Im}{\operatorname{Im}}}
\AtBeginDocument{\renewcommand{\phi}{\varphi}}
\AtBeginDocument{\renewcommand{\epsilon}{\varepsilon}}
%%% theorem-like envs
\theoremstyle{definition}
\declaretheoremstyle[spaceabove=0.5\topsep,
spacebelow=0.5\topsep,
headfont=\bfseries\sffamily,
bodyfont=\normalfont,
headpunct=.,
postheadspace=5pt plus 1pt minus 1pt]{myStyle}
\declaretheoremstyle[spacebelow=\topsep,
headfont=\bfseries\sffamily,
bodyfont=\normalfont,
headpunct=.,
postheadspace=5pt plus 1pt minus 1pt,]{myStyleWithFrame}
\declaretheoremstyle[spacebelow=\topsep,
headfont=\bfseries\sffamily,
bodyfont=\normalfont,
headpunct=.,
postheadspace=5pt plus 1pt minus 1pt,
qed=\blacksquare]{myProofStyleWithFrame}
\usepackage[breakable]{tcolorbox}
\tcbset{sharp corners=all, colback=white}
\tcolorboxenvironment{theorem}{}
\tcolorboxenvironment{theorem*}{}
\tcolorboxenvironment{axiom}{}
\tcolorboxenvironment{assertion}{}
\tcolorboxenvironment{lemma}{}
\tcolorboxenvironment{proposition}{}
\tcolorboxenvironment{corollary}{}
\tcolorboxenvironment{definition}{}
\tcolorboxenvironment{proofReplace}{toprule=0mm,bottomrule=0mm,rightrule=0mm, colback=white, breakable }
\declaretheorem[name=Теорема, numberwithin=chapter, style=myStyleWithFrame]{theorem}
\declaretheorem[name=Теорема, numbered=no, style=myStyleWithFrame]{theorem*}
\declaretheorem[name=Аксиома, sibling=theorem, style=myStyleWithFrame]{axiom}
\declaretheorem[name=Преположение, sibling=theorem, style=myStyleWithFrame]{assertion}
\declaretheorem[name=Лемма, sibling=theorem, style=myStyleWithFrame]{lemma}
\declaretheorem[name=Предложение, sibling=theorem, style=myStyleWithFrame]{proposition}
\declaretheorem[name=Следствие, numberwithin=theorem, style=myStyleWithFrame]{corollary}
\declaretheorem[name=Определение, numberwithin=chapter, style=myStyleWithFrame]{definition}
\declaretheorem[name=Свойство, numberwithin=chapter, style=myStyle]{property}
\declaretheorem[name=Свойства, numbered=no, style=myStyle]{propertylist}
\declaretheorem[name=Пример, numberwithin=chapter, style=myStyle]{example}
\declaretheorem[name=Замечание, numbered=no, style=myStyle]{remark}
\declaretheorem[name=Доказательство, numbered=no, style=myProofStyleWithFrame]{proofReplace}
\renewenvironment{proof}[1][\proofname]{\begin{proofReplace}}{\end{proofReplace}}
\declaretheorem[name=Доказательство, numbered=no, style=myProofStyleWithFrame]{longProof}
%%% Memoir settings
\chapterstyle{ger}
\setlength{\headheight}{2\baselineskip}
%%% HyperRef
\usepackage{hyperref}