blob: 01d944b51a5dd95274661d2fe42287c22fe5883d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
|
\ProvidesPackage{gost-7-32-counters}[2022/01/29 GOST 7.32-2017]
%
% Values for capital russian letters counter
%
\makeatletter
\newcommand\AlphRus[1]{%
\expandafter \@AlphRus \csname c@#1\endcsname
}
\newcommand\@AlphRus[1]{%
\ifcase #1%
\or А\or Б\or В\or Г\or Д\or Е\or Ж\or И\or К\or
Л\or М\or Н\or П\or Р\or С\or Т\or У\or Ф\or
Х\or Ц\or Ш\or Щ\or Э\or Ю\or Я%
\else \@ctrerr
\fi
}
\makeatother
%
% Values for lowercase russian letters counter
%
\makeatletter
\newcommand\alphRus[1]{%
\expandafter \@alphRus \csname c@#1\endcsname
}
\newcommand\@alphRus[1]{%
\ifcase #1%
\or а\or б\or в\or г\or д\or е\or ж\or и\or к\or
л\or м\or н\or п\or р\or с\or т\or у\or ф\or
х\or ц\or ш\or щ\or э\or ю\or я%
\else \@ctrerr
\fi
}
\makeatother
% Increment figure counter when using lstlisting
\let\oldlstlisting\lstlisting
\renewcommand{\lstlisting}[1][]{%
\refstepcounter{figure}
\oldlstlisting[#1]
}
|