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

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

\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}}

\declaretheoremstyle[
  headfont=\sffamily\bfseries,%
  notefont=\sffamily\bfseries,%
  notebraces={(}{)},%
  headpunct=,%
  bodyfont=\sffamily\itshape,%
  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{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=definition, numberwithin=theorem]{remark}

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

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