summaryrefslogtreecommitdiff
path: root/graphs-exam/style.tex
blob: 74aaa6fad3ff1d1721178d59891b26a3c92298d4 (plain)
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
\usepackage{thmtools}
\usepackage[svgnames]{xcolor}
\usepackage{framed}

\colorlet{definitioncolor}{DarkGreen}
\colorlet{theoremcolor}{DarkBlue}
\colorlet{lemmacolor}{DarkRed}

\renewenvironment{leftbar}[1][]{%
  \def\FrameCommand{{\color{#1}\vrule width 2pt} \hspace{7pt}}%
  \MakeFramed {\advance\hsize-\width \FrameRestore}}%
 {\endMakeFramed}

\renewenvironment{definitionbar}
  {\begin{leftbar}[definitioncolor]}
  {\end{leftbar}}

\renewenvironment{theorembar}
  {\begin{leftbar}[theoremcolor]}
  {\end{leftbar}}
\renewenvironment{lemmabar}
  {\begin{leftbar}[lemmacolor]}
  {\end{leftbar}}

\declaretheoremstyle[
  headfont=\bfseries,%
  notefont=\bfseries,%
  notebraces={(}{)},%
  headpunct=,%
  bodyfont=,%
  headformat=\color{definitioncolor}\NAME~\NUMBER~\NOTE\hfill\smallskip\linebreak,%
  preheadhook=\begin{definitionbar},%
  postfoothook=\end{definitionbar},%
]{customDefinition}
\declaretheorem[name={Определение}, style=customDefinition]{definition}

\declaretheoremstyle[
  headfont=\bfseries,%
  notefont=\bfseries,%
  notebraces={(}{)},%
  headpunct=,%
  headformat=\color{lemmacolor}\NAME~\NUMBER~\NOTE\hfill\smallskip\linebreak,%
  preheadhook=\begin{lemmabar},%
  postfoothook=\end{lemmabar},%
]{customLemma}
\declaretheorem[name={Лемма}, style=customLemma]{lemma}

\declaretheoremstyle[
  headfont=\bfseries,%
  notefont=\bfseries,%
  notebraces={(}{)},%
  headpunct=,%
  headformat=\color{theoremcolor}\NAME~\NUMBER~\NOTE\hfill\smallskip\linebreak,%
  preheadhook=\begin{theorembar},%
  postfoothook=\end{theorembar},%
]{customTheorem}
\declaretheorem[name={Теорема}, style=customTheorem]{theorem}

\declaretheoremstyle[
  headfont=\itshape\bfseries,%
  headpunct=,%
  headformat=\color{theoremcolor}\NAME\hfill\smallskip\linebreak,%
  preheadhook=\begin{theorembar},%
  postfoothook=\end{theorembar},%
]{customProof}
\declaretheorem[name={Доказательство}, style=customProof, unnumbered]{proofthm}
\renewenvironment{proof}{
  \begin{proofthm}
}{\end{proofthm}}

% TODO: Изменить стиль замечаний
\declaretheorem[
  name={Замечание},
  style=customDefinition,
  numberwithin=theorem
]{remark}

\declaretheorem[
  name={Следствие},
  style=customDefinition,
  numberwithin=theorem
]{corollary}

\setlength{\parindent}{0pt}
\setlength{\parskip}{0.5\baselineskip}

\hypersetup{
  colorlinks=true,
  linkcolor=blue,
}