aboutsummaryrefslogtreecommitdiff
path: root/doc/gost/gost-7-32-headings.sty
diff options
context:
space:
mode:
authorLibravatar Comrade Martin Miroslavovich Michalec <martin@michalec.dev>2023-11-26 21:34:11 +0000
committerLibravatar Martin Michalec <martin@michalec.dev>2026-11-07 02:13:38 +0000
commit252df6c74c7be9b82aa89cdb4972f91c87b06184 (patch)
tree988497c67eb3d8d8789aa9bdea47bafd300e25b2 /doc/gost/gost-7-32-headings.sty
downloadcoursework-252df6c74c7be9b82aa89cdb4972f91c87b06184.tar.gz
publishHEADmaster
Diffstat (limited to 'doc/gost/gost-7-32-headings.sty')
-rw-r--r--doc/gost/gost-7-32-headings.sty98
1 files changed, 98 insertions, 0 deletions
diff --git a/doc/gost/gost-7-32-headings.sty b/doc/gost/gost-7-32-headings.sty
new file mode 100644
index 0000000..d0bb40e
--- /dev/null
+++ b/doc/gost/gost-7-32-headings.sty
@@ -0,0 +1,98 @@
1\ProvidesPackage{gost-7-32-headings}[2022/01/28 GOST 7.32-2017]
2
3\RequirePackage{titlesec}
4\RequirePackage{titling}
5\RequirePackage{setspace}
6
7\RequirePackage{gost-7-32-counters}
8
9%
10% Set custom formatting to well-known LaTeX commands: section, subsection and subsubsection
11%
12\titleformat{\section}[block]{\newpage\cleardoublepage\large\setstretch{1}\bfseries}{\thesection}{0.5em}{}
13\titlespacing{\section}{0cm}{0cm}{0.5cm}
14
15\titleformat{\subsection}[block]{\normalsize\bfseries}{\thesubsection}{0.5em}{}
16\titlespacing{\subsection}{0cm}{0.5cm}{0.5cm}
17
18\titleformat{\subsubsection}[runin]{\normalsize\bfseries}{\thesubsubsection}{0.5em}{}[\newline\indent]
19\titlespacing{\subsubsection}{1.25cm}{0.5em}{0cm}
20
21%
22% Make special headings, that have their own formatting rules:
23% - centered
24% - all-caps
25% - bold
26%
27% Only three of them must appear in TOC: introduction, conclusion and references
28%
29\newcommand{\introduction}{
30 \addcontentsline{toc}{section}{ВВЕДЕНИЕ}
31 \begin{center}
32 \bfseries\large
33 ВВЕДЕНИЕ
34 \end{center}
35}
36
37\newcommand{\conclusion}{
38 \addcontentsline{toc}{section}{ЗАКЛЮЧЕНИЕ}
39 \begin{center}
40 \bfseries\large
41 ЗАКЛЮЧЕНИЕ
42 \end{center}
43}
44
45\newcommand{\references}{
46 \addcontentsline{toc}{section}{СПИСОК ИСПОЛЬЗОВАННЫХ ИСТОЧНИКОВ}
47 \begin{center}
48 \bfseries\large
49 СПИСОК ИСПОЛЬЗОВАННЫХ ИСТОЧНИКОВ
50 \end{center}
51}
52
53\newcommand{\essay}{
54 \begin{center}
55 \bfseries\large
56 РЕФЕРАТ
57 \end{center}
58}
59
60\newcommand{\definitions}{
61 \begin{center}
62 \bfseries\large
63 ОПРЕДЕЛЕНИЯ
64 \end{center}
65}
66
67\newcommand{\abbreviations}{
68 \begin{center}
69 \bfseries\large
70 ОБОЗНАЧЕНИЯ И СОКРАЩЕНИЯ
71 \end{center}
72}
73
74\newcommand{\defsabbrs}{
75 \begin{center}
76 \bfseries\large
77 ОПРЕДЕЛЕНИЯ, ОБОЗНАЧЕНИЯ И СОКРАЩЕНИЯ
78 \end{center}
79}
80
81%
82% Appendices headings. Appendices have autoincrementing number,
83% that is represented with russian letter.
84% This heading must appear in TOC
85%
86\newcounter{appendixcnt}
87\setcounter{appendixcnt}{1}
88
89\renewcommand{\appendix}[1]{
90 \addcontentsline{toc}{section}{ПРИЛОЖЕНИЕ \AlphRus{appendixcnt}. #1}
91 \begin{center}
92 \bfseries\large
93 ПРИЛОЖЕНИЕ \AlphRus{appendixcnt}
94
95 #1
96 \end{center}
97 \stepcounter{appendixcnt}
98}