aboutsummaryrefslogtreecommitdiff
path: root/doc/gost/gost-7-32-headings.sty
diff options
context:
space:
mode:
Diffstat (limited to 'doc/gost/gost-7-32-headings.sty')
-rw-r--r--doc/gost/gost-7-32-headings.sty96
1 files changed, 96 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..4787abf
--- /dev/null
+++ b/doc/gost/gost-7-32-headings.sty
@@ -0,0 +1,96 @@
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]{\centering\large\setstretch{1}\bfseries}{\thesection}{0.5em}{}
13\titlespacing*{\section}{0cm}{0cm}{0.5cm}
14\newcommand{\sectionbreak}{\clearpage}
15
16\titleformat{\subsection}[block]{\normalsize\bfseries}{\thesubsection}{0.5em}{}
17\titlespacing{\subsection}{0cm}{0.5cm}{0.5cm}
18
19\titleformat{\subsubsection}[runin]{\normalsize\bfseries}{\thesubsubsection}{0.5em}{}[\newline\indent]
20\titlespacing{\subsubsection}{1.25cm}{0.5em}{0cm}
21
22\titleformat{\paragraph}[runin]{\normalsize\bfseries}{\theparagraph}{0.5em}{}[\newline\indent]
23\titlespacing{\paragraph}{1.25cm}{0.5em}{0cm}
24
25%
26% Make special headings, that have their own formatting rules:
27% - centered
28% - all-caps
29% - bold
30%
31% Only three of them must appear in TOC: introduction, conclusion and references
32%
33\newcommand{\introduction}{
34 \addcontentsline{toc}{section}{ВВЕДЕНИЕ}
35 \begin{center}
36 \bfseries\large
37 ВВЕДЕНИЕ
38 \end{center}
39}
40
41\newcommand{\conclusion}{
42 \addcontentsline{toc}{section}{ЗАКЛЮЧЕНИЕ}
43 \begin{center}
44 \bfseries\large
45 ЗАКЛЮЧЕНИЕ
46 \end{center}
47}
48
49\newcommand{\references}{
50 \addcontentsline{toc}{section}{СПИСОК ИСПОЛЬЗОВАННЫХ ИСТОЧНИКОВ}
51 \begin{center}
52 \bfseries\large
53 СПИСОК ИСПОЛЬЗОВАННЫХ ИСТОЧНИКОВ
54 \end{center}
55}
56
57\newcommand{\essay}{
58 \begin{center}
59 \bfseries\large
60 РЕФЕРАТ
61 \end{center}
62}
63
64\newcommand{\definitions}{
65 \begin{center}
66 \bfseries\large
67 ОПРЕДЕЛЕНИЯ
68 \end{center}
69}
70
71\newcommand{\abbreviations}{
72 \begin{center}
73 \bfseries\large
74 ОБОЗНАЧЕНИЯ И СОКРАЩЕНИЯ
75 \end{center}
76}
77
78\newcommand{\defsabbrs}{
79 \begin{center}
80 \bfseries\large
81 ОПРЕДЕЛЕНИЯ, ОБОЗНАЧЕНИЯ И СОКРАЩЕНИЯ
82 \end{center}
83}
84
85%
86% Appendices headings. Appendices have autoincrementing number,
87% that is represented with russian letter.
88% This heading must appear in TOC
89%
90\newcounter{appendixcnt}
91\setcounter{appendixcnt}{1}
92
93\renewcommand{\appendix}[1]{
94 \addcontentsline{toc}{section}{ПРИЛОЖЕНИЕ \AlphRus{appendixcnt}. #1}
95 \stepcounter{appendixcnt}
96}