From cb070b2d3f2b6e241e3be1b7e0eeb90fc755255f Mon Sep 17 00:00:00 2001 From: Martin Michalec Date: Thu, 12 Nov 2026 01:28:13 +0300 Subject: publish --- doc/diploma/gost/gost-7-32-toc.sty | 54 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100644 doc/diploma/gost/gost-7-32-toc.sty (limited to 'doc/diploma/gost/gost-7-32-toc.sty') 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 @@ +\ProvidesPackage{gost-7-32-toc}[2022/01/28 GOST 7.32-2017] + +\RequirePackage{tocloft} +\RequirePackage[ + bookmarks=true, + colorlinks=true, + unicode=true, + urlcolor=black, + linkcolor=black, + anchorcolor=black, + citecolor=black, + menucolor=black, + filecolor=black, + hidelinks +]{hyperref} + +\RequirePackage{etoolbox} + +\addto\captionsrussian{% + \renewcommand{\contentsname}{СОДЕРЖАНИЕ}% +} + +% Intercept \section* to inject a hyperref anchor right at its location +\makeatletter +\pretocmd{\@ssect}{\phantomsection}{}{} +\makeatother + +% +% Set custom font styles +% +\renewcommand{\cftsecfont}{\normalfont} +\renewcommand{\cftsecleader}{\cftdotfill{\cftdotsep}} +\renewcommand{\cftsecpagefont}{\normalsize} +\renewcommand{\cftaftertoctitle}{\hfill\hfill} +\renewcommand{\cfttoctitlefont}{\hfill\normalfont\large\bfseries} +\titleformat{\tableofcontents}[block]{\centering\large\bfseries}{\thesection}{0.5em}{} +\titlespacing{\tableofcontents}{0cm}{0cm}{1cm} + +% \renewcommand{\cftsecpresnum}{Глава } +% \renewcommand{\cftsecaftersnum}{.} +% \renewcommand{\cftsubsecaftersnum}{.} +% \renewcommand{\cftsubsubsecaftersnum}{.} +% +% Set indents and line spacing +% +\cftsetindents{sec}{0pt}{3em} +\cftsetindents{subsec}{0pt}{3em} +\cftsetindents{subsubsec}{0pt}{3em} +% \setlength{\cftsecindent}{0pt} +% \setlength{\cftsubsecindent}{0pt} +% \setlength{\cftsubsubsecindent}{0pt} +\setlength{\cftbeforesecskip}{0cm} +\setlength{\cftbeforesubsecskip}{0cm} +\setlength{\cftbeforesubsubsecskip}{0cm} -- cgit v1.3.1