diff options
| author | 2026-11-08 02:51:49 +0000 | |
|---|---|---|
| committer | 2026-11-08 02:51:49 +0000 | |
| commit | 80893fa3e272d9792ba1206f7006e8defeeccb6e (patch) | |
| tree | 1867dba062a481bf59313b0fbb16f416834a11a3 /doc/gost/gost-7-32-counters.sty | |
| download | lab-02-master.tar.gz | |
Diffstat (limited to 'doc/gost/gost-7-32-counters.sty')
| -rw-r--r-- | doc/gost/gost-7-32-counters.sty | 44 |
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 | % } | ||
