aboutsummaryrefslogtreecommitdiff
path: root/doc/gost/gost-7-32-counters.sty
diff options
context:
space:
mode:
authorLibravatar Martin Michalec <martin@michalec.dev>2026-11-11 06:32:30 +0000
committerLibravatar Martin Michalec <martin@michalec.dev>2026-11-11 06:46:30 +0000
commit5b4a191d1cf310a3d7a99351e716a1a60004be69 (patch)
tree4b8d1a82765946f323a90f35344526110e778a3f /doc/gost/gost-7-32-counters.sty
downloadcoursework-5b4a191d1cf310a3d7a99351e716a1a60004be69.tar.gz
publishHEADmaster
Diffstat (limited to 'doc/gost/gost-7-32-counters.sty')
-rw-r--r--doc/gost/gost-7-32-counters.sty44
1 files changed, 44 insertions, 0 deletions
diff --git a/doc/gost/gost-7-32-counters.sty b/doc/gost/gost-7-32-counters.sty
new file mode 100644
index 0000000..ee95480
--- /dev/null
+++ b/doc/gost/gost-7-32-counters.sty
@@ -0,0 +1,44 @@
1\ProvidesPackage{gost-7-32-counters}[2022/01/29 GOST 7.32-2017]
2
3%
4% Values for capital russian letters counter
5%
6\makeatletter
7\newcommand\AlphRus[1]{%
8 \expandafter \@AlphRus \csname c@#1\endcsname
9}
10
11\newcommand\@AlphRus[1]{%
12 \ifcase #1%
13 \or А\or Б\or В\or Г\or Д\or Е\or Ж\or И\or К\or
14 Л\or М\or Н\or П\or Р\or С\or Т\or У\or Ф\or
15 Х\or Ц\or Ш\or Щ\or Э\or Ю\or Я%
16 \else \@ctrerr
17\fi
18}
19\makeatother
20
21%
22% Values for lowercase russian letters counter
23%
24\makeatletter
25\newcommand\alphRus[1]{%
26 \expandafter \@alphRus \csname c@#1\endcsname
27}
28
29\newcommand\@alphRus[1]{%
30 \ifcase #1%
31 \or а\or б\or в\or г\or д\or е\or ж\or и\or к\or
32 л\or м\or н\or п\or р\or с\or т\or у\or ф\or
33 х\or ц\or ш\or щ\or э\or ю\or я%
34 \else \@ctrerr
35\fi
36}
37\makeatother
38
39% Increment figure counter when using lstlisting
40% \let\oldlstlisting\lstlisting
41% \renewcommand{\lstlisting}[1][]{%
42% \refstepcounter{figure}
43% \oldlstlisting[#1]
44% }