-
Notifications
You must be signed in to change notification settings - Fork 0
/
imnasuworks.sty
600 lines (568 loc) · 22.4 KB
/
imnasuworks.sty
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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
\usepackage{latexsym,amsfonts,amssymb,amsmath,amsthm}
\usepackage{graphics,graphicx,longtable,array,euscript,epsfig}
\usepackage{epstopdf}
\usepackage{cite}
\usepackage{hyphenat}
%Next package make pdf file searcheable and copiable for cyrylic letters
\usepackage[noTeX]{mmap}
%\usepackage{cmap}: accepted preloaded fonts without reloading.
%\usepackage[resetfonts]{cmap}: as you can read in the README of cmap this forces the reloading of preloaded fonts (Computer Modern).
%\usepackage[useTeX]{mmap} and \usepackage{mmap}: does everything cmap does plus correcting mathematical symbols in your pdf; uses new -m.cmap files ("uses ascii strings for the macro-names").
%\usepackage[noTeX]{mmap}: does everything cmap does plus correcting mathematical symbols in your pdf; uses the cmap files (unicode).
\usepackage[T2A]{fontenc}
\usepackage[cp1251]{inputenc}
\usepackage[russian,english,ukrainian]{babel}
\usepackage{import}
\usepackage[%
breaklinks,%
unicode,%
% pdftex,%
% ,backref=page%
]%
{hyperref}
%This package makes some handy float enchansments, such as float styles, etc
\usepackage{float}
%This one allows to force the placement of pending floats by issuing \FloatBarrier command inside the document
\usepackage{placeins}
%\sepackage[breakwords]{truncate}
\usepackage{truncate}
%\usepackage[stable]{footmisc}
%Subcations for subfigures
\usepackage{caption,subcaption}
%This package is needed to redefine the label and ref commands
%see http://tex.stackexchange.com/questions/85956/redefining-label-and-ref-when-using-hyperref
% for more info 2
\usepackage{letltxmacro}
%We use patchcmd from the next package
%\usepackage{etoolbox}
\setlength{\textwidth}{111.0mm}\setlength{\textheight}{166.0mm}
\setlength{\oddsidemargin}{0in}\setlength{\evensidemargin}{0in}
\setlength{\topmargin}{-1cm}
\setlength{\parindent}{5.0mm}
%\usepackage{showkeys}
%\sloppy
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%% Issue related definitions %%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\selectlanguage{ukrainian}
%Used to define the counter correspondence
%We use the work counter to count the number of article in the issue.
%Next package provide the command to attach every local paper counter
%to the counter work and reset all them in one \refstepcounter command (which is done in
%the of subimportwork command)
\usepackage{chngcntr}
%Define new counter which is used to count articles
%and reset per article counter in a single command
\newcounter{work}
%\setcounter{work}{0}
\counterwithin*{section}{work}
\counterwithin*{figure}{work}
\counterwithin*{table}{work}
%Force to reset the equation counter, since it may not be
%set to 0 automatically if the article do not contain sections
\counterwithin*{equation}{work}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% Metadata for the issue and and article
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%Metadata for the issue
\def\metadata@issue@vol{13}
\def\metadata@issue@number{3}
\def\metadata@issue@year{2016}
%Metadata for the article
%Article unique ID
\def\article@tag{\roman{work}}
\def\article@language{ukrainian}
\def\fl@env#1{\foreignlanguage{\article@language}{#1}}
%We need to retain the original definitions of the label, pageref
\let\old@label\label
\let\old@ref\ref%
\let\old@pageref\pageref%
%Define new command subimportwork to be used in the main issue file only.
%It handles:
% 1. Local article counter reset.
% 2. The definition of two labels for the first and last page of the article.
% 3. Provide isolation of the per-article local definitions
\let\old@subimport\subimport
\newcommand{\subimportwork}[2]{%
\refstepcounter{work}%
\clearpage
\begingroup
\label{firstpage}
\old@subimport{#1}{#2}
\label{lastpage}
\FloatBarrier
\clearpage
\endgroup
}
%The main idea is to automate the creation of labels for the first and the last page of each work.
%There might be several ways to achieve this.
%One of which is to try to redefine the \subimport command
%and add to it the label creation.
%In this case we are gonna need the ability to define labels
%with auto-incrementing numbers at the end.
%Try to use the command
%\newcommand{\addnextlabel}{\stepcounter{foo}%
% \edef\baz{\noexpand\label{bar:arabic{foo}}}%
% \baz
%}
%(see http://tex.stackexchange.com/questions/6413/building-labels-out-of-counters
%and
%http://tex.stackexchange.com/questions/21300/custom-counter-and-cross-referencing
%and
%http://tex.stackexchange.com/questions/39380/what-exactly-do-csname-and-endcsname-do
% for discussion )
%
%Some additional hints can be found at
%http://code.google.com/p/dpctex/source/browse/trunk/numdef/numdef.sty
%
%Useful info on latex and tex counters:
%http://www.texdev.net/2009/11/17/tex-counts-and-latex-counters/
%Here we redine the \label and related reference commands to modify label keys by adding chapter number in front of the key
%It allows to have the same label in the different files
\AtBeginDocument{%
\LetLtxMacro{\TheRealLabel}{\label}%
\LetLtxMacro{\TheRealRef}{\ref}%
\LetLtxMacro{\TheRealPageRef}{\pageref}%
%Next two are the subordinate commands of \bibitem
\LetLtxMacro{\@old@bibitem}{\@bibitem}%
\LetLtxMacro{\@old@lbibitem}{\@lbibitem}%the bib
% \LetLtxMacro{\@old@citex}{\@citex}%the bib
% \LetLtxMacro{\@old@cite}{\@cite}%the bib
% redefining \label, \ref, \pageref (\renewcommand or \DeclareRobustCommand)
\gdef\label#1{\TheRealLabel{\article@tag:#1}}
\gdef\ref#1{\TheRealRef{\article@tag:#1}}
\gdef\pageref#1{\TheRealPageref{\article@tag:#1}}
\gdef\@bibitem#1{\@old@bibitem{\article@tag:#1}}
\gdef\@lbibitem[#1]#2{\@old@lbibitem[#1]{\article@tag:#2}}
%In order to modify the citation tag writen to the aux file by cite package
%we need to redefine the following command
%(Need to be used with \usepackage{cite})
\gdef\@cite@ignsp@#1,#2{\article@tag:#1\ifx\:#2\@empty\expandafter\@gobblethree
\else,\expandafter\@cite@ignsp@\fi #2}
%For the ordinary latex citations one might want to look into the redefinition of \@nocite, or \@cite
% \gdef\@nocite[#1]#2{\@old@citex[#1]{\article@tag:#2}}
% \gdef\@cite#1#2{\@old@cite{\article@tag:#1}{\article@tag:#2}}
\LetLtxMacro{\ltx@label}{\label}%
}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%% End of issue related definitions %%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\def\ehkol{\foreignlanguage{ukrainian}{\truncate{0.94\textwidth}{Àâòîð ñòàòò³}}}
\def\ohkol{\foreignlanguage{ukrainian}{\truncate{0.94\textwidth}{Íàçâà ñòàòò³}}}
\renewcommand{\@evenhead}{%
\hspace*{-3pt}\raisebox{-15pt}[\headheight][0pt]{%
\vbox{\hbox{\hspace*{3pt}\hbox to \textwidth{%
\thepage \hfil \fl@env{\ehkol}}}%
\vskip3pt \hrule}}}
\renewcommand{\@oddhead}{%
\hspace*{-3pt}\raisebox{-15pt}[\headheight][0pt]{
\vbox{\hbox{\hbox to \textwidth{%
\fl@env{\ohkol} \hfil \thepage}\hspace*{3pt}}%
\vskip3pt\hrule}}}
\renewcommand{\@evenfoot}{}
\renewcommand{\@oddfoot}{}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%% Maketitle related commands and definitons %%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%We would like to have an optional argument for \title and \author commands.
%This short version is needed to keep the text only version of title or author's text
%free of the non-robust commands (like \thanks for example).
%To achieve that we borrow a trick from the \chapter command's definition.
%\def\@stitle{\@empty}
\renewcommand{\title}{\@dblarg{\settitle}}
\def\settitle[#1]#2{\gdef\@stitle{#1}\gdef\@title{#2}}
%\def\@sauthor{\@empty}
\renewcommand{\author}{\@dblarg{\setauthor}}
\def\setauthor[#1]#2{\gdef\@sauthor{#1}\gdef\@author{#2}}
\def\@udc{\vphantom{\CYRU\CYRD\CYRK}}
%\def\@udc{\@empty}
\newcommand{\udc}[1]{\gdef\@udc{#1}}
\def\@address{\@empty}
\newcommand{\address}[1]{\gdef\@address{#1}}
%Commands to typeset abstract
\def\@tsabstract#1{%
% \def\tmp{#1}
% \ifx\tmp\@empty
% \meaning\tmp
% \else%
\vspace*{-1.3em}
\begin{flushright}\begin{minipage}{105mm}\small #1\end{minipage}\end{flushright}%
}
\def\@abstractua{\@empty}
\newcommand{\abstractua}[1]{\gdef\@abstractua{\foreignlanguage{ukrainian}{#1}}}
\def\@abstractru{\@empty}
\newcommand{\abstractru}[1]{\gdef\@abstractru{\foreignlanguage{russian}{#1}}}
\def\@abstracten{\@empty}
\newcommand{\abstracten}[1]{\gdef\@abstracten{\foreignlanguage{english}{#1}}}
\renewcommand\maketitle{\par
\begingroup
\renewcommand\thefootnote{\@fnsymbol\c@footnote}%
\def\@makefnmark{\rlap{\@textsuperscript{\normalfont\@thefnmark}}}%
\long\def\@makefntext##1{\parindent 1em\noindent
\hb@[email protected]{%
\hss\@textsuperscript{\normalfont\@thefnmark}}##1}%
\global\@topnum\z@ % Prevents figures from going at top of page.
%Next command adds a bookmark to PDF table of contents panel
%it relies on the hyperref package
\pdfbookmark[0]{\thework. \@sauthor}{Work \article@tag}
\@maketitle
\thispagestyle{empty}
\@thanks
\let\thefootnote\relax
\let\thanks\@gobble
\footnotetext{\hfill\copyright \ \ {\bfseries \@sauthor, \metadata@issue@year}}
\edef\article@language{\languagename}
%Define headers and footers
% \xdef\ehkol{\noexpand\fl@env{\noexpand\truncate{0.94\textwidth}{\@sauthor}}}
\xdef\ehkol{\@sauthor}
\xdef\ohkol{\noexpand\fl@env{\noexpand\truncate{0.94\textwidth}{\@stitle}}}
\endgroup
\vskip\z@
\setcounter{footnote}{0}%
%Here is the place to write the article info into the list of papers file (.low)
% \edef\@conline{\noexpand\contentsline{section}{\@stitle}{}{}{}}
\@writelow
\@writenbu
% \global\let\thanks\relax
% \global\let\maketitle\relax
% \global\let\@maketitle\relax
\global\def\@udc{\vphantom{\CYRU\CYRD\CYRK}}%\@empty %\vphantom{\CYRU\CYRD\CYRK}
\global\let\@thanks\@empty
\global\let\@author\@empty
\global\let\@date\@empty
\global\let\@title\@empty
\global\let\@address\@empty
\global\let\@abstractua\@empty
\global\let\@abstractru\@empty
\global\let\@abstracten\@empty
}
\def\@maketitle{%
% \newpage
% \null
\let\footnote\thanks
\def\work@front@header{\makebox[\textwidth]%
{%
\foreignlanguage{ukrainian}{\protect\small\sf Çá³ðíèê ïðàöü Iíñòèòóòó ìàòåìàòèêè ÍÀÍ Óêðà¿íè \hfill \metadata@issue@year, ò.\,\metadata@issue@vol, ¹\,\metadata@issue@number,
\old@pageref{\article@tag:firstpage}--\old@pageref{\article@tag:lastpage}%
}
}%
% \pageref{firstpage}--\pageref{lastpage}
% \TheRealPageref{\article@tag:firstpage}--\TheRealPageref{\article@tag:lastpage}%
}
\noindent\raisebox{26pt}[0pt][0pt] {\work@front@header}\par%
\vspace*{-1.5em}
\noindent\foreignlanguage{ukrainian}{\texttt{ÓÄÊ \@udc}}\par%
\vspace*{-0.5em}
% \article@language
\begin{flushleft}\LARGE\bfseries\@title\end{flushleft}\par%
% \vspace*{-2em}
\begin{flushleft}\bfseries\itshape \fl@env{\@author}\end{flushleft}\par%
\vspace*{-1.2em}
\begin{flushleft}\itshape\fl@env{\@address}\end{flushleft}\par%
% \vspace*{1em}\vspace{\z@}
\@tsabstract{\@abstracten}
\@tsabstract{\@abstractua}
\@tsabstract{\@abstractru}
% \vspace{0.1em}
% \vspace{\z@}
% \vspace{-2em}
}
%Next command write the contents line with the name of authors and title of the work into low file
%to be used later for the generation of issue's table of contents
\def\@writelow{%
% \immediate\write\lowfile{\string\contentsentry{\@sauthor}%
% {\@stitle}{\string\TheRealPageRef{\article@tag:firstpage}}}
\protected@write\@auxout
{\let\label\@gobble \let\index\@gobble \let\glossary\@gobble \let\thanks\@gobble}%
{\string\@writefile{low}{\string\contentsentry{\@sauthor}%
{\@title}{\string\TheRealPageRef{\article@tag:firstpage}}}}
}
\def\@writenbu{%
% \immediate\write\lowfile{\string\contentsentry{\@sauthor}%
% {\@stitle}{\string\TheRealPageRef{\article@tag:firstpage}}}
\protected@write\@auxout
{\let\label\@gobble \let\index\@gobble \let\glossary\@gobble \let\thanks\@gobble}%
{\string\@writefile{nbu}{\string\nohyphens{\@sauthor\ \string[\@title\string] {} \string\TheRealPageRef{\article@tag:firstpage}-\string\TheRealPageRef{\article@tag:lastpage}\#}}}%
}
\newcommand{\listofworksname}{Çì³ñò}
\newcommand{\listofworks}{%
% \section*{\listofworksname
% \@mkboth{\listofworksname}{\contentsname}}%
\renewcommand{\ehkol}{Çì³ñò}
\renewcommand{\ohkol}{Çì³ñò}
\vspace*{1mm}
\centerline{\Large \bfseries Çì³ñò}
% \noindent
\@starttoc{low}%
}
\newcommand{\nbulistofworks}{%
% \section*{\listofworksname
% \@mkboth{\listofworksname}{\contentsname}}%
\clearpage%
\thispagestyle{empty}%
% \textwidth=100cm
\selectlanguage{ukrainian}
% \begin{verbatim}
% [Òèòóë]\{Tittle\}
% [Çì³ñò]\{Contents\}
% \end{verbatim}
Çá³ðíèê ïðàöü ²íñòèòóòó ìàòåìàòèêè ÍÀÍ Óêðà¿íè, \metadata@issue@year, \metadata@issue@vol, ¹~\metadata@issue@number\#\par
\texttt{[Òèòóë]\{Tittle\}}\#\par%
\texttt{[Çì³ñò]\{Contents\}}\#\par
% test%
% \noindent
\@starttoc{nbu}%
\input{\jobname.nbu}
% \begingroup
% \hyphenpenalty 10000
% \exhyphenpenalty 10000
% \input{\jobname.nbu}
% \endgroup
}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\renewcommand{\section}{\@startsection{section}{1}{\z@}%
{-3.25ex \@plus -1ex \@minus -.2ex}%
{2.0ex \@plus .2ex}%
{\normalfont\large\bfseries}}
\renewcommand{\subsection}{\@startsection{subsection}{2}{\z@}%
{-3.25ex\@plus -1ex \@minus -.2ex}%
{1.5ex \@plus .2ex}%
{\normalfont\normalsize\bfseries}}
\renewcommand{\subsubsection}{\@startsection{subsubsection}{3}{\z@}%
{-3.25ex\@plus -1ex \@minus -.2ex}%
{1.5ex \@plus .2ex}%
{\normalfont\normalsize\bfseries}}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % %
%Floats fromatting
% % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % %
%If you want a caption without number but
%with the word figure then write
% \renewcommand{\thefigure}{}
%inside the figure environment
\renewcommand{\thetable}{\arabic{table}}
\renewcommand{\thefigure}{\arabic{figure}}
%We intentionally move period into the definition of the number for floats.
%The reason is that if one has a single float in the paper there is not point to print number. In that case use the reciept above to avoid that.
\captionsetup{font={small}, labelsep={period},labelfont=bf}
\captionsetup[subfigure]{labelformat=simple,labelfont=it}
% % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%Define new theorem styles to make them independent on the changes
%in amsthm package
\newtheoremstyle{plainstyle} % name
{\topsep} % Space above
{\topsep} % Space below
{\itshape} % Body font
{\parindent} % Indent amount
{\bfseries} % Theorem head font
{.} % Punctuation after theorem head
{.5em} % Space after theorem head
{} % Theorem head spec (can be left empty, meaning normal)
\newtheoremstyle{definitionstyle} % name
{\topsep} % Space above
{\topsep} % Space below
{\normalfont} % Body font
{\parindent} % Indent amount
{\bfseries} % Theorem head font
{.} % Punctuation after theorem head
{.5em} % Space after theorem head
{} % Theorem head spec (can be left empty, meaning normal)
\newtheoremstyle{remarkstyle} % name
{\topsep} % Space above
{\topsep} % Space below
{\normalfont} % Body font
{\parindent} % Indent amount
{\bfseries} % Theorem head font
{.} % Punctuation after theorem head
{.5em} % Space after theorem head
{} % Theorem head spec (can be left empty, meaning normal)
%\theoremstyle{mytheoremstyle}
%\newtheorem{thm}{Theorem}
\newtheorem{theorem}{\protect\theoremname}[section]
\newtheorem{lemma}{\protect\lemmaname}[section]
\newtheorem{definition}{\protect\definitionname}[section]
\newtheorem{problem}{\protect\problemname}[section]
\newtheorem{conjecture}{\protect\conjecturename}[section]
\newtheorem{assumption}{\protect\assumptionname}[section]
\newtheorem{corollary}{\protect\corollaryname}[section]
\newtheorem{proposition}{\protect\propositionname}[section]
\newtheorem{remark}{\protect\remarkname}[section]
\newtheorem{algorithm}{\protect\algorithmname}[section]
\newtheorem{example}{\protect\examplename}[section]
\newcommand{\theoremname}{}
\newcommand{\lemmaname}{}
\newcommand{\definitionname}{}
\newcommand{\problemname}{}
\newcommand{\conjecturename}{}
\newcommand{\assumptionname}{}
\newcommand{\corollaryname}{}
\newcommand{\propositionname}{}
\newcommand{\remarkname}{}
\newcommand{\algorithmname}{}
\newcommand{\examplename}{}
\providecommand{\bbljan}{}
\providecommand{\bblfeb}{}
\providecommand{\bblmar}{}
\providecommand{\bblapr}{}
\providecommand{\bblmay}{}
\providecommand{\bbljun}{}
\providecommand{\bbljul}{}
\providecommand{\bblaug}{}
\providecommand{\bblsep}{}
\providecommand{\bbloct}{}
\providecommand{\bblnov}{}
\providecommand{\bbldec}{}
%\newcommand{\proofname}{}
\addto\captionsenglish{%
\renewcommand{\theoremname}{Theorem}%
\renewcommand{\lemmaname}{Lemma}
\renewcommand{\definitionname}{Definition}
\renewcommand{\examplename}{Example}%
\renewcommand{\problemname}{Problem}
\renewcommand{\conjecturename}{Conjecture}
\renewcommand{\assumptionname}{Assumption}
\renewcommand{\corollaryname}{Corollary}
\renewcommand{\propositionname}{Proposition}
\renewcommand{\remarkname}{Remark}
\renewcommand{\algorithmname}{Algorithm}
\renewcommand{\proofname}{Proof}
\renewcommand{\thesubfigure}{\asbuk{subfigure}.}
\renewcommand{\tablename}{Table}
\renewcommand{\refname}{}
\renewcommand{\bbljan}{jan}
\renewcommand{\bblfeb}{feb}
\renewcommand{\bblmar}{mar}
\renewcommand{\bblapr}{apr}
\renewcommand{\bblmay}{may}
\renewcommand{\bbljun}{jun}
\renewcommand{\bbljul}{jul}
\renewcommand{\bblaug}{aug}
\renewcommand{\bblsep}{sep}
\renewcommand{\bbloct}{oct}
\renewcommand{\bblnov}{nov}
\renewcommand{\bbldec}{dec}
}
\addto\captionsrussian{%
\renewcommand{\theoremname}{Òåîðåìà}%
\renewcommand{\lemmaname}{Ëåììà}
\renewcommand{\definitionname}{Îïðåäåëåíèÿ}
\renewcommand{\examplename}{Ïðèìåð}%
\renewcommand{\problemname}{Çàäà÷à}
\renewcommand{\conjecturename}{Ãèïîòåçà}
\renewcommand{\assumptionname}{Ïðåäïîëîæåíèå}
\renewcommand{\corollaryname}{Ñëåäñòâèå}
\renewcommand{\propositionname}{Ïðåäëîæåíèå}
\renewcommand{\remarkname}{Çàìå÷àíèå}
\renewcommand{\algorithmname}{Àëãîðèòì}
\renewcommand{\proofname}{Äîêàçàòåëüñòâî}
\renewcommand{\figurename}{Ðèñ}
\renewcommand{\thesubfigure}{\asbuk{subfigure}.}
\renewcommand{\tablename}{Òàáëèöÿ}
\renewcommand{\refname}{}
\renewcommand{\bbljan}{ÿíâ}
\renewcommand{\bblfeb}{ôåâ}
\renewcommand{\bblmar}{ìàðò}
\renewcommand{\bblapr}{àïð}
\renewcommand{\bblmay}{ìàé}
\renewcommand{\bbljun}{èþíü}
\renewcommand{\bbljul}{èþëü}
\renewcommand{\bblaug}{àâã}
\renewcommand{\bblsep}{ñåíò}
\renewcommand{\bbloct}{îêò}
\renewcommand{\bblnov}{íîÿ}
\renewcommand{\bbldec}{äåê}
}
\addto\captionsukrainian{%
\renewcommand{\theoremname}{Òåîðåìà}%
\renewcommand{\lemmaname}{Ëåìà}%
\renewcommand{\definitionname}{Îçíà÷åííÿ}%
\renewcommand{\examplename}{Ïðèêëàä}%
\renewcommand{\problemname}{Çàäà÷à}%
\renewcommand{\conjecturename}{óïîòåçà}%
\renewcommand{\assumptionname}{Ïðèïóùåííÿ}%
\renewcommand{\corollaryname}{Íàñë³äîê}%
\renewcommand{\propositionname}{Òâåðäæåííÿ}%
\renewcommand{\remarkname}{Çàóâàæåííÿ}%
\renewcommand{\algorithmname}{Àëãîðèòì}%
\renewcommand{\proofname}{Äîâåäåííÿ}%
\renewcommand{\figurename}{Ðèñ}%
\renewcommand{\thesubfigure}{\asbuk{subfigure}.}%
\renewcommand{\tablename}{Òàáëèöÿ}%
\renewcommand{\refname}{}%
\renewcommand{\bbljan}{ñ³÷}%
\renewcommand{\bblfeb}{ëþò}%
\renewcommand{\bblmar}{áåð}%
\renewcommand{\bblapr}{êâ³ò}%
\renewcommand{\bblmay}{òðàâ}%
\renewcommand{\bbljun}{÷åðâ}%
\renewcommand{\bbljul}{ëèï}%
\renewcommand{\bblaug}{ñåðï}%
\renewcommand{\bblsep}{âåðåñ}%
\renewcommand{\bbloct}{æîâò}%
\renewcommand{\bblnov}{ëèñòîï}%
\renewcommand{\bbldec}{ãðóä}%
}
%Reset label and counter correspondense for the sectionless articles
\newcommand{\nosectioncounters}{%
\counterwithout{theorem}{section}%
\counterwithout{lemma}{section}%
\counterwithout{definition}{section}%
\counterwithout{problem}{section}%
\counterwithout{conjecture}{section}%
\counterwithout{assumption}{section}%
\counterwithout{corollary}{section}%
\counterwithout{proposition}{section}%
\counterwithout{remark}{section}%
\counterwithout{algorithm}{section}%
\counterwithout{example}{section}%
\setcounter{theorem}{0}%
\setcounter{lemma}{0}%
\setcounter{definition}{0}%
\setcounter{problem}{0}%
\setcounter{conjecture}{0}%
\setcounter{assumption}{0}%
\setcounter{corollary}{0}%
\setcounter{proposition}{0}%
\setcounter{remark}{0}%
\setcounter{algorithm}{0}%
\setcounter{example}{0}%
}
%Restore label and counter correspondense for the articles with sectioning
\newcommand{\addsectioncounters}{%
\counterwithin{theorem}{section}%
\counterwithin{lemma}{section}%
\counterwithin{definition}{section}%
\counterwithin{problem}{section}%
\counterwithin{conjecture}{section}%
\counterwithin{assumption}{section}%
\counterwithin{corollary}{section}%
\counterwithin{proposition}{section}%
\counterwithin{remark}{section}%
\counterwithin{algorithm}{section}%
\counterwithin{example}{section}%
}
%Redefinition of thebibliography command
\renewenvironment{thebibliography}[1]
{\section*{\refname}%
\vspace{-2.6em}
\small%
\list{\@biblabel{\@arabic\c@enumiv}}%
{\settowidth\labelwidth{\@biblabel{#1}}%
\leftmargin\labelwidth
\advance\leftmargin\labelsep
\@openbib@code
\usecounter{enumiv}%
\let\p@enumiv\@empty
\renewcommand\theenumiv{\@arabic\c@enumiv}}%
\sloppy
\clubpenalty4000
\@clubpenalty \clubpenalty
\widowpenalty4000%
\sfcode`\.\@m}
{\def\@noitemerr
{\@latex@warning{Empty `thebibliography' environment}}%
\endlist}
\def\bibfont{\footnotesize}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%