summaryrefslogtreecommitdiff
path: root/graphs-exam/style.tex
diff options
context:
space:
mode:
Diffstat (limited to 'graphs-exam/style.tex')
-rw-r--r--graphs-exam/style.tex65
1 files changed, 65 insertions, 0 deletions
diff --git a/graphs-exam/style.tex b/graphs-exam/style.tex
new file mode 100644
index 0000000..cd109fd
--- /dev/null
+++ b/graphs-exam/style.tex
@@ -0,0 +1,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\hfill\NOTE\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,
+}