aboutsummaryrefslogtreecommitdiff
path: root/doc/diploma/gost/gost-7-32-toc.sty
diff options
context:
space:
mode:
Diffstat (limited to 'doc/diploma/gost/gost-7-32-toc.sty')
-rw-r--r--doc/diploma/gost/gost-7-32-toc.sty54
1 files changed, 54 insertions, 0 deletions
diff --git a/doc/diploma/gost/gost-7-32-toc.sty b/doc/diploma/gost/gost-7-32-toc.sty
new file mode 100644
index 0000000..0f03386
--- /dev/null
+++ b/doc/diploma/gost/gost-7-32-toc.sty
@@ -0,0 +1,54 @@
1\ProvidesPackage{gost-7-32-toc}[2022/01/28 GOST 7.32-2017]
2
3\RequirePackage{tocloft}
4\RequirePackage[
5 bookmarks=true,
6 colorlinks=true,
7 unicode=true,
8 urlcolor=black,
9 linkcolor=black,
10 anchorcolor=black,
11 citecolor=black,
12 menucolor=black,
13 filecolor=black,
14 hidelinks
15]{hyperref}
16
17\RequirePackage{etoolbox}
18
19\addto\captionsrussian{%
20 \renewcommand{\contentsname}{СОДЕРЖАНИЕ}%
21}
22
23% Intercept \section* to inject a hyperref anchor right at its location
24\makeatletter
25\pretocmd{\@ssect}{\phantomsection}{}{}
26\makeatother
27
28%
29% Set custom font styles
30%
31\renewcommand{\cftsecfont}{\normalfont}
32\renewcommand{\cftsecleader}{\cftdotfill{\cftdotsep}}
33\renewcommand{\cftsecpagefont}{\normalsize}
34\renewcommand{\cftaftertoctitle}{\hfill\hfill}
35\renewcommand{\cfttoctitlefont}{\hfill\normalfont\large\bfseries}
36\titleformat{\tableofcontents}[block]{\centering\large\bfseries}{\thesection}{0.5em}{}
37\titlespacing{\tableofcontents}{0cm}{0cm}{1cm}
38
39% \renewcommand{\cftsecpresnum}{Глава }
40% \renewcommand{\cftsecaftersnum}{.}
41% \renewcommand{\cftsubsecaftersnum}{.}
42% \renewcommand{\cftsubsubsecaftersnum}{.}
43%
44% Set indents and line spacing
45%
46\cftsetindents{sec}{0pt}{3em}
47\cftsetindents{subsec}{0pt}{3em}
48\cftsetindents{subsubsec}{0pt}{3em}
49% \setlength{\cftsecindent}{0pt}
50% \setlength{\cftsubsecindent}{0pt}
51% \setlength{\cftsubsubsecindent}{0pt}
52\setlength{\cftbeforesecskip}{0cm}
53\setlength{\cftbeforesubsecskip}{0cm}
54\setlength{\cftbeforesubsubsecskip}{0cm}