-
Notifications
You must be signed in to change notification settings - Fork 0
/
bachelor_thesis.cls
668 lines (544 loc) · 24.2 KB
/
bachelor_thesis.cls
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
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
% ********** Êëàñ äëÿ íàïèñàííÿ ïîÿñíþâàëüíî¿ çàïèñêè **********
% ********* äî àòåñòàö³éíî¿ ðîáîòè ñòóïåíÿ áàêàëàâðà **********
% ***** àâòîðè: Òàâðîâ Ä. Þ., Áîðèñåíêî Ï. Á., Äóò÷àê ². Î. ****
% 1. ²äåíòèô³êóºìî êëàñ
\ProvidesClass{bachelor_thesis}[2015/12/24 v3.0 Êëàñ äëÿ íàïèñàííÿ ïîÿñíþâàëüíî¿ çàïèñêè]
\NeedsTeXFormat{LaTeX2e} % ïîòð³áíèé ôîðìàò
% 2. Çàâàíòàæóºìî "áàòüê³âñüêèé êëàñ"
\LoadClass[a4paper,14pt,ukrainian,oneside]{extreport}
% 3. Çàâàíòàæóºìî ïàêåòè
% ìîâí³ ïàêåòè
\RequirePackage{cmap}% äëÿ êîäóâàííÿ øðèôò³â ó pdf
\RequirePackage[T2A]{fontenc} % ïàêåò äëÿ ï³äòðèìêè êèðèë³÷íèõ øðèôò³â
\RequirePackage[cp1251]{inputenc} % ïàêåò äëÿ ï³äòðèìêì Windows'³âñüêîãî êîäóâàííÿ cp1251
\RequirePackage[russian,ukrainian]{babel} % ïàêåò äëÿ ï³äòðèìêè óêðà¿íñüêî¿ òà ðîñ³éñüêî¿ ìîâ
\RequirePackage{pscyr} % ïàêåò ³ç ãàðíèìè êèðèë³÷íèìè øðèôòàìè
\RequirePackage{mathtext} % ïîòð³áí³ ñèìâîëè â ðåæèì³ ìàòåìàòè÷íèõ ôîðìóë
\RequirePackage{amssymb,amsfonts,amsmath,amsthm} % ïîòð³áí³ ñèìâîëè â ðåæèì³ ìàòåìàòè÷íèõ ôîðìóë
\RequirePackage{textcomp} % ïîòð³áí³ ñèìâîëè â ðåæèì³ ìàòåìàòè÷íèõ ôîðìóë
\RequirePackage{upgreek} % ïàêåò äëÿ ïðÿìèõ ãðåöüêèõ ë³òåð
% ãðàô³÷í³ ïàêåòè
\RequirePackage{graphicx} % îñíîâíèé ïàêåò äëÿ âñòàâêè ãðàô³êè
\RequirePackage{subfig} % ïàêåò äëÿ âñòàâêè ï³äðèñóíê³â
\RequirePackage{flafter} % ïàêåò ãàðàíòóº, ùî ðèñóíîê ÷è òàáëèöÿ í³êîëè íå ç'ÿâëÿòüñÿ ðàí³øå ïîñèëàííÿ íà ñàìèõ ñåáå
\RequirePackage{caption} % ïàêåò äëÿ ïåðñîíàë³çàö³¿ çàãîëîâê³â ðèñóíê³â òà òàáëèöü
\RequirePackage{xtab} % ïàêåò äëÿ äîâãèõ òàáëèöü
\RequirePackage{longtable} % ïàêåò äëÿ äîâãèõ òàáëèöü
\RequirePackage{multirow} % ïàêåò äëÿ îá'ºäíàííÿ ðÿäê³â òàáëèö³
\RequirePackage{array} % ïàêåò äëÿ âèð³âíþâàííÿ âñåðåäèí³ òàáëèö³
% ïàêåòè äëÿ ôîðìàòóâàííÿ â³äñòóï³â òà ïîë³â
\RequirePackage[includehead, headsep=0pt, footskip=0pt, top=2cm, bottom=2cm, left=2cm, right=1cm]{geometry} % çàäàºìî ïîëÿ ñòîð³íêè
\RequirePackage{indentfirst} % â³äñòóï äëÿ ïåðøîãî ðÿäêà àáçàöó
\RequirePackage{hanging} % â³äñòóï äëÿ âñ³õ ³íøèõ ðÿäê³â àáçàöó
\RequirePackage[shortlabels]{enumitem} % ïàêåò äëÿ ôîðìàòóâàííÿ ñïèñê³â
\RequirePackage{setspace} % ïàêåò äëÿ òîãî, ùîá ìîæíà áóëî çàäàòè ì³æðÿäêîâèé ³íòåðâàë
\RequirePackage{fancyhdr} % ïàêåò ïîòð³áíèé äëÿ âèñòàâëåííÿ ïîçèö³¿ íîìåðó ñòîð³íêè
\RequirePackage{etoolbox} % ïàêåò äëÿ ïðèáèðàííÿ âèñÿ÷îãî â³äñòóïó â á³áë³îãðàô³¿ òà ïðîïèñóâàííÿ óìîâíèõ â³äñòàíåé ì³æ çàãîëîâêàìè
% ñòèë³ çàãîëîâê³â òà çì³ñòó
\RequirePackage[rm,small,raggedright]{titlesec} % ïàêåò äëÿ ðó÷íîãî êåðóâàííÿ ñòèëåì çàãîëîâê³â
\RequirePackage[titles,subfigure]{tocloft} % ïàêåò äëÿ ðó÷íîãî êåðóâàííÿ ñòèëåì çì³ñòó
% ïàêåò äëÿ êîðåêòíîãî ïðåäñòàâëåííÿ ³íòåðíåò-ïîñèëàíü ó "Ïåðåë³êó ïîñèëàíü"
\RequirePackage{url}
% ïàêåò äëÿ íîðìàëüíèõ ïðîá³ë³â ï³ñëÿ êîì ó äåñÿòêîâèõ äðîáàõ
\RequirePackage{icomma}
% ïàêåò äëÿ â³äîáðàæåííÿ ôîðìàòóâàííÿ âèõ³äíèõ êîä³â
\RequirePackage{listings}
% ïàêåò äëÿ ïàðàìåòðè÷íèõ êîìàíä
\RequirePackage{xkeyval}
% ïàêåò äëÿ ã³ïåðïîñèëàíü ó çì³ñò³
\RequirePackage[hidelinks]{hyperref}
% ïàêåò äëÿ êîä³â ïðîãðàì
\RequirePackage{verbatim}
% 4. Îñíîâíà ÷àñòèíà
\frenchspacing
\doublespacing % ³íòåðâàë "1,5" ì³æ ðÿäêàìè
\renewcommand{\rmdefault}{ftm} % çàäàºìî øðèôò çà ïðîìîâ÷àííÿì --- "Times New Roman" ³ç ïàêåòó pscyr
\newcommand{\setfontsize}[1]{\fontsize{#1pt}{#1pt}\selectfont} % êîìàíäà äëÿ çàäàâàííÿ ðîçì³ðó øðèôòà
\newcommand{\invcommas}[1]{\guillemotleft #1\guillemotright} % êîìàíäà äëÿ ôðàíöóçüêèõ êóòîâèõ ëàïîê
% òåêñò ã³ïåðïîñèëàíü áóäå òîãî æ øðèôòó, ùî é îñíîâíèé òåêñò
\urlstyle{same}
% ñòèëü ñòîð³íêè äëÿ ïîçèö³¿ íîìåðó ñòîð³íêè
\fancypagestyle{plain}{
\fancyhf{}
\rhead{\thepage}
\renewcommand{\headrulewidth}{0pt}
\renewcommand{\footrulewidth}{0pt}
}
% êîìàíäè äëÿ çàáîðîíè ðîçðèâó ôîðìóë ó íåáàæàíîìó ì³ñö³
\binoppenalty=10000
\relpenalty=10000
% êîìàíäè äëÿ çàáîðîíè âèêîðèñòàííÿ ïåðåíåñåíü
\tolerance=1
\emergencystretch=\maxdimen
\hyphenpenalty=10000
\hbadness=10000
% êîìàíäà äëÿ ñòâîðåííÿ íåíóìåðîâàíîãî ðîçä³ëó, ÿêèé òèì íå ìåíøå ïîêàçóºòüñÿ â çì³ñò³
\newcommand{\uchapter}[1]{\chapter*{#1}\addcontentsline{toc}{chapter}{#1}}
% äëÿ ñòâîðåííÿ âñòóïó âèêîðèñòàºìî êîìàíäó \uchapter
\newcommand{\intro}{\uchapter{ÂÑÒÓÏ}}
% äëÿ ñòâîðåííÿ âèñíîâê³â âèêîðèñòàºìî êîìàíäó \uchapter
\newcommand{\conclusions}{\uchapter{ÂÈÑÍÎÂÊÈ}}
% äëÿ ñòâîðåííÿ ïåðåë³êó óìîâíèõ ïîçíà÷åíü âèêîðèñòàºìî êîìàíäó \shortings
\newcommand{\shortings}{\uchapter{ÏÅÐÅË²Ê ÓÌÎÂÍÈÕ ÏÎÇÍÀ×ÅÍÜ}}
% õèòðà êîìàíäà äëÿ ñòâîðåííÿ äîäàòê³â
\newcounter{appendnum}
\newcommand{\append}[1]{
\setcounter{chapter}{0}
\setcounter{figure}{0}
\setcounter{table}{0}
\setcounter{section}{0}
\setcounter{subsection}{0}
\titleformat{\chapter}{\centering\normalsize}{\hspace{1cm}\thechapter}{0.5em}{}
\chapter*{Äîäàòîê \Asbuk{appendnum}\\#1}
\addcontentsline{toc}{chapter}{Äîäàòîê \Asbuk{appendnum}\ #1}
\addvspace{-28pt}
\preto\section{%
\ifnum\value{section}=0\addvspace{0pt}\fi%
}
\renewcommand{\thefigure}{\Asbuk{appendnum}.\arabic{figure}}
\renewcommand{\thetable}{\Asbuk{appendnum}.\arabic{table}}
\renewcommand{\thesection}{\Asbuk{appendnum}.\arabic{section}}
\renewcommand{\thesubsection}{\Asbuk{appendnum}.\arabic{section}.\arabic{subsection}}
}
% ïðèáèðàºìî íåäîïóñòèì³ áóêâè ç ïîçíà÷åííÿ äîäàòê³â
\pretocmd\append{
\stepcounter{appendnum}
\ifnum\Asbuk{appendnum}=¥ \stepcounter{appendnum}\fi
\ifnum\Asbuk{appendnum}=ª \stepcounter{appendnum}\fi
\ifnum\Asbuk{appendnum}=Ç \stepcounter{appendnum}\fi
\ifnum\Asbuk{appendnum}=² \stepcounter{appendnum}\fi
\ifnum\Asbuk{appendnum}=¯ \stepcounter{appendnum}\fi
\ifnum\Asbuk{appendnum}=É \stepcounter{appendnum}\fi
\ifnum\Asbuk{appendnum}=Î \stepcounter{appendnum}\fi
\ifnum\Asbuk{appendnum}=× \stepcounter{appendnum}\fi
\ifnum\Asbuk{appendnum}=Ü \stepcounter{appendnum}\fi
}{}{}
% áóäåìî çì³íþâàòè ñòèë³ çàãîëîâê³â
% ñïî÷àòêó --- äëÿ ðîçä³ëó
\titleformat{\chapter}[block] % óêàçóºìî, ùî ìîäèô³êóºìî ñàìå ðîçä³ë
%{\centering\ \normalsize }
%{\}
{\MakeUppercase \normalfont \centering \normalsize \bfseries } % óêàçóºìî ôîðìàò íàçâè ("óñ³ âåëèê³")
{\hspace{1cm}\thechapter} % óêàçóºìî ôîðìàò âëàñíå íîìåðà: öå áóäå ïðîñòî ÷èñëî, áåç êðàïêè
{0.5em} % â³äñòàíü ì³æ íîìåðîì ³ íàçâîþ
{} % òåêñò, ùî ïåðåäóº íàçâ³
% òåïåð --- äëÿ ï³äðîçä³ëó
\titleformat{\section}[block] % óêàçóºìî, ùî ìîäèô³êóºìî ñàìå ï³äðîçä³ë
{\normalsize \bfseries} % óêàçóºìî ôîðìàò íàçâè (æèðíèé)
{\hspace{1.25cm}\thesection} % óêàçóºìî ôîðìàò âëàñíå íîìåðà: öå áóäå ïðîñòî ÷èñëî, áåç êðàïêè
{0.5em} % â³äñòàíü ì³æ íîìåðîì ³ íàçâîþ
{} % òåêñò, ùî ïåðåäóº íàçâ³
% òåïåð --- äëÿ ï³äðîçä³ëó ùå íèæ÷îãî ð³âíÿ
\titleformat{\subsection}[block] % óêàçóºìî, ùî ìîäèô³êóºìî ñàìå ï³äðîçä³ë íèæíüîãî ð³âíÿ
{\normalsize \bfseries} % óêàçóºìî ôîðìàò íàçâè (æèðíèé)
{\hspace{1.25cm}\thesubsection} % óêàçóºìî ôîðìàò âëàñíå íîìåðà: öå áóäå ïðîñòî ÷èñëî, áåç êðàïêè
{0.5em} % â³äñòàíü ì³æ íîìåðîì ³ íàçâîþ
{} % òåêñò, ùî ïåðåäóº íàçâ³
% òåïåð çàäàìî â³äñòóïè äëÿ çàãîëîâêó ðîçä³ëó
\titlespacing{\chapter} % óêàçóºìî, ùî ìîäèô³êóºìî ñàìå ðîçä³ë
{0pt} % â³äñòóï çë³âà
{-28pt} % â³äñòóï çâåðõó (íåìàº)
{48pt} % â³äñòóï çíèçó (2 ðÿäêè)
% òåïåð çàäàìî â³äñòóïè äëÿ çàãîëîâêó ï³äðîçä³ëó
\titlespacing{\section} % óêàçóºìî, ùî ìîäèô³êóºìî ñàìå ï³äðîçä³ë
{0pt} % â³äñòóï çë³âà
{48pt} % â³äñòóï çâåðõó (2 ðÿäêè)
{48pt} % â³äñòóï çíèçó (2 ðÿäêè)
% òåïåð çàäàìî â³äñòóïè äëÿ çàãîëîâêó ïóíêòà
\titlespacing{\subsection} % óêàçóºìî, ùî ìîäèô³êóºìî ñàìå ïóíêò
{0pt} % â³äñòóï çë³âà
{48pt} % â³äñòóï çâåðõó (2 ðÿäêè)
{48pt} % â³äñòóï çíèçó (2 ðÿäêè)
% òåïåð çðîáèìî òàê, ùîá ì³æ äâîìà çàãîëîâêàìè áóëà çâè÷àéíà â³äñòàíü
\preto\section{%
\ifnum\value{section}=0\addvspace{-48pt}\fi%
}
\preto\subsection{%
\ifnum\value{subsection}=0\addvspace{-48pt}\fi%
}
% âèäîçì³íþºìî çì³ñò
\makeatletter
\renewcommand{\tableofcontents}{
\clearpage
\pagestyle{plain}
\begin{center}
\bfseries{\MakeUppercase{Çì³ñò}}
\end{center}
\addvspace{42pt}
\@starttoc{toc}
}
\makeatother
% çì³íþºìî ôîðìàò íóìåðàö³¿ ôîðìóë
\renewcommand{\theequation}{\arabic{chapter}.\arabic{equation}}
% çàäàìî îíîâëåí³ ñïèñêè, ç ïðàâèëüíèìè â³äñòóïàìè
% íóìåðîâàíèé ïåðøîãî ð³âíÿ
\AddEnumerateCounter{\asbuk}{\@asbuk}{\cyrm}
\setlist[itemize,1]{label=-, partopsep=0pt, parsep=0pt, topsep=0pt, itemsep=0pt, itemindent=1.7cm, leftmargin=0pt}
\setlist[itemize,2]{label=-, partopsep=0pt, parsep=0pt, topsep=0pt, itemsep=0pt, itemindent=2.25cm, leftmargin=0pt}
\setlist[enumerate,1]{label=\asbuk*), partopsep=0pt, parsep=0pt, topsep=0pt, itemsep=0pt, itemindent=1.9cm, leftmargin=0pt}
\setlist[enumerate,2]{label=\arabic*), partopsep=0pt, parsep=0pt, topsep=0pt, itemsep=0pt, itemindent=2.6cm, leftmargin=0pt}
% òåïåð çàéìåìîñÿ çì³ñòîì
% çàäàºìî â³äñòàíü ì³æ òî÷êàìè
\renewcommand{\cftchapdotsep}{1}
\renewcommand{\cftsecdotsep}{1}
\renewcommand{\cftsubsecdotsep}{1}
% çàäàºìî ðîçì³ð ïîëÿ, ùî âèä³ëÿºòüñÿ ï³ä íîìåð ñòîð³íêè
\cftsetpnumwidth{1em}
% çàäàìî â³äñòàí³ ì³æ ðÿäêàìè â çì³ñò³
\setlength\cftbeforechapskip{0pt}
% çàéìåìîñÿ ðîçä³ëàìè
\renewcommand{\cftchapaftersnum}{} % ùî áóäå ïèñàòèñÿ ï³ñëÿ íîìåðó ðîçä³ëó (í³÷îãî)
\renewcommand{\cftchapindent}{0cm} % â³äñòóï íîìåðà ðîçä³ëó â³ä ë³âîãî êðàþ
\renewcommand{\cftchapnumwidth}{1em} % ðîçì³ð ïîëÿ, ùî âèä³ëÿºòüñÿ ï³ä íîìåð ðîçä³ëó
\renewcommand{\cftchappagefont}{\mdseries} % ñòèëü íîìåðó ñòîð³íêè (çâè÷àéíèé, 14pt)
\renewcommand{\cftchapfont}{\mdseries} % ñòèëü çàãîëîâêó (çâè÷àéíèé)
\renewcommand{\cftchapleader}{\cftdotfill{\cftchapdotsep}} % ÷èì çàïîâíþâàòè ïðîì³æîê â³ä çàãîëîâêó äî íîìåðó ñòîð³íêè (òî÷êàìè)
% òåïåð çàéìåìîñÿ ï³äðîçä³ëàìè
\renewcommand{\cftsecaftersnum}{} % ùî áóäå ïèñàòèñÿ ï³ñëÿ íîìåðó ï³äðîçä³ëó (í³÷îãî)
\renewcommand{\cftsecindent}{1em} % â³äñòóï íîìåðà ï³äðîçä³ëó â³ä ë³âîãî êðàþ
\renewcommand{\cftsecnumwidth}{2em} % ðîçì³ð ïîëÿ, ùî âèä³ëÿºòüñÿ ï³ä íîìåð ï³äðîçä³ëó
\renewcommand{\cftsecpagefont}{\mdseries} % ñòèëü íîìåðó ñòîð³íêè (çâè÷àéíèé, 14pt)
\renewcommand{\cftsecfont}{\mdseries} % ñòèëü çàãîëîâêó (çâè÷àéíèé)
\renewcommand{\cftsecleader}{\cftdotfill{\cftsecdotsep}} % ÷èì çàïîâíþâàòè ïðîì³æîê â³ä çàãîëîâêó äî íîìåðó ñòîð³íêè (òî÷êàìè)
% òåïåð çàéìåìîñÿ ïóíêòàìè
\renewcommand{\cftsubsecaftersnum}{} % ùî áóäå ïèñàòèñÿ ï³ñëÿ íîìåðó ïóíêòà (í³÷îãî)
\renewcommand{\cftsubsecindent}{3em} % â³äñòóï íîìåðà ïóíêòà â³ä ë³âîãî êðàþ
\renewcommand{\cftsubsecnumwidth}{2.5em} % ðîçì³ð ïîëÿ, ùî âèä³ëÿºòüñÿ ï³ä íîìåð ïóíêòà
\renewcommand{\cftsubsecpagefont}{\mdseries} % ñòèëü íîìåðó ñòîð³íêè (çâè÷àéíèé, 14pt)
\renewcommand{\cftsubsecfont}{\mdseries} % ñòèëü çàãîëîâêó (çâè÷àéíèé)
\renewcommand{\cftsubsecleader}{\cftdotfill{\cftsubsecdotsep}} % ÷èì çàïîâíþâàòè ïðîì³æîê â³ä çàãîëîâêó äî íîìåðó ñòîð³íêè (òî÷êàìè)
% çàãîëîâêè òàáëèöü, ðèñóíê³â ³ ë³ñòèíã³â
\DeclareCaptionLabelFormat{tablecap}{Òàáëèöÿ #2} % ôîðìàò çà ïðîìîâ÷àííÿì "Òàáë." íå âëàøòîâóº
\DeclareCaptionLabelFormat{figurecap}{Ðèñóíîê #2} % ôîðìàò çà ïðîìîâ÷àííÿì "Ðèñ." íå âëàøòîâóº
\DeclareCaptionFormat{listing}{˳ñòèíã ôàéëó #3} % ôîðìàò çà ïðîìîâ÷àííÿì "Listing" íå âëàøòîâóº
\captionsetup[table]{margin=0pt,singlelinecheck=false, justification=justified, labelsep=endash, labelformat=tablecap, font = {stretch = 1.5}, belowskip=18pt, aboveskip=3pt} % ôîðìàò äëÿ òàáëèöü
\captionsetup[figure]{justification=centering, labelsep=endash, labelformat=figurecap, font = {stretch = 1.5}} % ôîðìàò äëÿ ðèñóíê³â
\captionsetup[lstlisting]{margin=0pt, format=listing, singlelinecheck=false, font = {stretch = 1.5}} % ôîðìàò äëÿ ë³ñòèíã³â
\setlength{\textfloatsep}{21pt}
\setlength{\intextsep}{21pt}
% êîìàíäà, ùî çì³íþº ëàòèíñüê³ ë³òåðè íà êèðèë³÷í³ â ï³äðèñóíêàõ
\renewcommand{\thesubfigure}{\asbuk{subfigure}}
% íîâå îòî÷åííÿ äëÿ äîâãèõ òàáëèöü
\renewenvironment{table}[4]{
\begingroup\centering
\setlength{\LTpre}{-14pt}
\setlength{\LTpost}{14pt}
\setlength{\LTcapwidth}{0pt}
\begin{longtable}{#1}
\kill
\caption{#2}\label{#3}\\
#4
\endfirsthead
\kill
\caption*{Ïðîäîâæåííÿ òàáëèö³ \thetable}\\
#4
\endhead
\hline
\endfoot
}
{%
\end{longtable}
\endgroup
}
% íàâåäåìî ïîðÿäîê ³ç â³äñòóïàìè â á³áë³îãðàô³¿
\patchcmd{\thebibliography}
{\advance\leftmargin\labelsep}
{\leftmargin=0pt\itemindent=1.9cm\advance\itemindent\labelsep}
{}{}
% çì³íþºìî ôîðìàò íîìåðó äëÿ ïåðåë³êó ïîñèëàíü (÷èñëî + êðàïêà)
\makeatletter
\renewcommand{\@biblabel}[1]{#1.}
\makeatother
% îíîâèìî ñòàíäàðòíå îòî÷åííÿ, îñê³ëüêè ïîòð³áíî äîäàòè ïåðåë³ê ïîñèëàíü ó çì³ñò
\let\tempbib\thebibliography
\let\tempbibend\endthebibliography
\renewenvironment{thebibliography}{
\renewcommand{\bibname}{ÏÅÐÅË²Ê ÏÎÑÈËÀÍÜ}% çì³íþºìî çàãîëîâîê
\tempbib{99.}% ìàêñèìàëüíî ìîæëèâèé íîìåð äæåðåëà --- 99
% äàë³ íàâåäåìî ïîðÿäîê ³ç â³äñòóïàìè
\setlength\partopsep{0pt}
\setlength\parskip{0pt}
\setlength\parsep{0pt}
\setlength\topsep{0pt}
\setlength\itemsep{0pt}
\addcontentsline{toc}{chapter}{Ïåðåë³ê ïîñèëàíü}% äîäàºìî â çì³ñò
}
{
\tempbibend
}
% ñïåö³àëüíà êîìàíäà äëÿ âñòàâêè ë³ñòèíã³â
\newcommand{\listing}[2]{\singlespacing\lstinputlisting[language=C++, basicstyle=\tiny, breaklines=true, caption={#1}]{#2}\doublespacing}
% íîâ³ êîìàíäè äëÿ àíîòàö³é
% äâîìà ìîâàìè
\newcommand{\abstractUkr}{\chapter*{ÐÅÔÅÐÀÒ}\thispagestyle{plain}\renewcommand{\arraystretch}{1.5}\setfontsize{14}}
\newcommand{\abstractEng}{\chapter*{ABSTRACT}\thispagestyle{plain}\renewcommand{\arraystretch}{1.5}\setfontsize{14}}
\newcommand{\abstractRU}{\chapter*{ÐÅÔÅÐÀÒ}\thispagestyle{plain}\renewcommand{\arraystretch}{1.5}\setfontsize{14}}
% íîâà êîìàíäà äëÿ òèòóëüíîãî àðêóøó
% \maketitlepage{params}, äå params --- öå ðîçä³ëåí³ êîìàìè ïàðè "ïàðàìåòð={çíà÷åííÿ}"
% StudentName --- ϲÁ ñòóäåíòà
% StudentMale --- ñòàòü ñòóäåíòà (true, ÿêùî ÷îëîâ³ê, false --- ÿêùî æ³íêà)
% StudentGroup --- ãðóïà ñòóäåíòà
% ThesisTitle --- òåìà ðîáîòè (áåç ëàïîê)
% Advisor --- ïîñàäà, íàóêîâèé ñòóï³íü, â÷åíå çâàííÿ, ïð³çâèùå, ³í³ö³àëè êåð³âíèêà ðîáîòè
% Reviewer --- ïîñàäà, íàóêîâèé ñòóï³íü, â÷åíå çâàííÿ, ïð³çâèùå, ³í³ö³àëè ðåöåíçåíòà
% ConsultantChapter --- íàçâà ðîçä³ëó, ÿêèé êîíñóëüòóâàâ êîíñóëüòàíò
% Consultant --- ïîñàäà, íàóêîâèé ñòóï³íü, â÷åíå çâàííÿ, ïð³çâèùå, ³í³ö³àëè êîíñóëüòàíòà
% ConsultantChapterSecond --- íàçâà ðîçä³ëó, ÿêèé êîíñóëüòóâàâ äðóãèé êîíñóëüòàíò
% ConsultantSecond --- ïîñàäà, íàóêîâèé ñòóï³íü, â÷åíå çâàííÿ, ïð³çâèùå, ³í³ö³àëè äðóãîãî êîíñóëüòàíòà
% Year --- ð³ê çàõèñòó ðîáîòè
\makeatletter
\define@cmdkey[Thesis]{Title}{StudentName}{}
\define@boolkey[Thesis]{Title}{StudentMale}{}
\define@cmdkey[Thesis]{Title}{StudentGroup}{}
\define@cmdkey[Thesis]{Title}{ThesisTitle}{}
\define@cmdkey[Thesis]{Title}{Advisor}{}
\define@cmdkey[Thesis]{Title}{Reviewer}{}
\define@cmdkey[Thesis]{Title}{ConsultantChapter}{}
\define@cmdkey[Thesis]{Title}{Consultant}{}
\define@cmdkey[Thesis]{Title}{ConsultantChapterSecond}{}
\define@cmdkey[Thesis]{Title}{ConsultantSecond}{}
\define@cmdkey[Thesis]{Title}{Year}{}
\newcommand{\maketitlepage}[1]{
\setkeys[Thesis]{Title}{#1}
\thispagestyle{empty}
\setlength{\parindent}{0cm}
\begingroup\centering % öåíòðóâàííÿ
\setfontsize{14}
\textbf{\MakeUppercase{Íàö³îíàëüíèé òåõí³÷íèé óí³âåðñèòåò Óêðà¿íè}}
\textbf{\MakeUppercase{\invcommas{Êè¿âñüêèé ïîë³òåõí³÷íèé ³íñòèòóò}}}
\textbf{Ôàêóëüòåò ïðèêëàäíî¿ ìàòåìàòèêè}
\textbf{Êàôåäðà ïðèêëàäíî¿ ìàòåìàòèêè}
\endgroup
\addvspace{14pt}
\setlength\parindent{10cm}
{\renewcommand{\arraystretch}{0.8}
\begin{tabular}{l}
\invcommas{Äî çàõèñòó äîïóùåíî} \\
Çàâ³äóâà÷ êàôåäðè\\
\_\_\_\_\_\_\_\_\_\_\_\_\_~Î.~Ð.~×åðòîâ \\
\invcommas{\_\_\_\_}~\_\_\_\_\_\_\_\_\_\_\_\_\_~\cmdThesis@Title@Year\ ð. \\
\end{tabular}}
\setlength\parindent{0cm}
\addvspace{14pt}
\setfontsize{20}
\centerline{\textbf{Äèïëîìíà ðîáîòà}}
\setfontsize{14}
\centerline{\textbf{íà çäîáóòòÿ ñòóïåíÿ áàêàëàâðà}}
\addvspace{6pt}
ç³ ñïåö³àëüíîñò³ 6.040301 \invcommas{Ïðèêëàäíà ìàòåìàòèêà}
\begin{singlespace}
íà òåìó: \cmdThesis@Title@ThesisTitle
\end{singlespace}
\addvspace{14pt}
\ifThesis@Title@StudentMale
Âèêîíàâ: ñòóäåíò
\else
Âèêîíàëà: ñòóäåíòêà
\fi
IV êóðñó, ãðóïè {\cmdThesis@Title@StudentGroup}
{\renewcommand{\arraystretch}{1.0}
\begin{tabular*}{\textwidth}{@{\extracolsep{\fill}}>{\raggedright}p{4.6cm}>{\raggedright}p{8.25cm}l}
& \cmdThesis@Title@StudentName &\_\_\_\_\_\_\_\_\_\_\_\_\_\\
Êåð³âíèê & \cmdThesis@Title@Advisor & \_\_\_\_\_\_\_\_\_\_\_\_\_\\
\ifundef{\cmdThesis@Title@ConsultantChapter}{\relax}%
{Êîíñóëüòàíò \cmdThesis@Title@ConsultantChapter & \cmdThesis@Title@Consultant & \_\_\_\_\_\_\_\_\_\_\_\_\_\\}
\ifundef{\cmdThesis@Title@ConsultantChapterSecond}{\relax}%
{Êîíñóëüòàíò \cmdThesis@Title@ConsultantChapterSecond & \cmdThesis@Title@ConsultantSecond & \_\_\_\_\_\_\_\_\_\_\_\_\_\\}
Êîíñóëüòàíò ³ç íîðìîêîíòðîëþ & ñòàðøèé~âèêëàäà÷ Ìàëü÷èêîâ~Â.~Â. & \_\_\_\_\_\_\_\_\_\_\_\_\_\\
Ðåöåíçåíò & \cmdThesis@Title@Reviewer & \_\_\_\_\_\_\_\_\_\_\_\_\_\\
\end{tabular*}}
\vfill
\begin{singlespace}
\setlength\parindent{8cm}
\begin{tabular}{l}
Çàñâ³ä÷óþ, ùî â ö³é äèïëîìí³é ðîáîò³\\
íåìຠçàïîçè÷åíü ³ç ïðàöü ³íøèõ àâòîð³â\\
áåç â³äïîâ³äíèõ ïîñèëàíü.\\
\ifThesis@Title@StudentMale
Ñòóäåíò
\else
Ñòóäåíòêà
\fi
~\_\_\_\_\_\_\_\_\_\_\_\_\_
\end{tabular}
\setlength\parindent{0cm}
\end{singlespace}
\vfill
\begingroup\centering
Êè¿â --- \cmdThesis@Title@Year
\endgroup
\clearpage % ïî÷èíàºìî ç íîâî¿ ñòîð³íêè
\setcounter{page}{2} % íîìåð ñòîð³íêè áóäå 2
}
% íîâà êîìàíäà äëÿ ïîáóäîâè çàâäàííÿ
% \assignment{params}, äå params --- öå ðîçä³ëåí³ êîìàìè ïàðè "ïàðàìåòð={çíà÷åííÿ}"
% StudentName --- ϲÁ ñòóäåíòà â ðîäîâîìó â³äì³íêó
% StudentMale --- ñòàòü ñòóäåíòà (true, ÿêùî ÷îëîâ³ê, false --- ÿêùî æ³íêà)
% ThesisTitle --- òåìà ðîáîòè (áåç ëàïîê)
% Advisor --- ϲÁ, íàóêîâèé ñòóï³íü, â÷åíå çâàííÿ êåð³âíèêà
% Order --- äàòà òà íîìåð íàêàçó
% ApplicationDate --- 2. Òåðì³í ïîäàííÿ ñòóäåíòîì ðîáîòè
% InputData --- 3. Âèõ³äí³ äàí³ äî ðîáîòè
% Contents --- 4. Çì³ñò ðîáîòè
% Graphics --- 5. Ïåðåë³ê ³ëþñòðàòèâíîãî ìàòåð³àëó
% 6. Êîíñóëüòàíòè ðîçä³ë³â ðîáîòè
% ConsultantChapter --- íàçâà ðîçä³ëó, ÿêèé êîíñóëüòóâàâ êîíñóëüòàíò
% Consultant --- ïð³çâèøå, ³í³ö³àëè òà ïîñàäà êîíñóëüòàíòà
% ConsultantChapterSecond --- íàçâà ðîçä³ëó, ÿêèé êîíñóëüòóâàâ äðóãèé êîíñóëüòàíò
% ConsultantSecond --- ïð³çâèøå, ³í³ö³àëè òà ïîñàäà äðóãîãî êîíñóëüòàíòà
% AssignmentDate --- 6(7). Äàòà âèäà÷³ çàâäàííÿ
% Calendar --- âíóòð³øíÿ ÷àñòèíà òàáëèö³ ç êàëåíäàðíèì ïëàíîì
% êîæíèé ðÿäîê òàáëèö³ ïîâèíåí ìàòè ôîðìàò:
% #1 & #2 & #3 & \\
% äå #1 --- íîìåð ç/ï
% #2 --- íàçâà çàâäàííÿ
% #3 --- òåðì³í âèêîíàííÿ çàâäàííÿ
% ï³ñëÿ êîæíîãî ðÿäêà, îêð³ì îñòàííüîãî, ïîòð³áíî íà îêðåìîìó ðÿäêó
% çàëèøàòè \hline
% StudentNameShort --- ³í³ö³àëè òà ïð³çâèùå ñòóäåíòà
% AdvisorNameShort --- ³í³ö³àëè òà ïð³çâèùå êåð³âíèêà
% Year --- ð³ê çàòâåðäæåííÿ çàâäàííÿ
\makeatletter
\define@cmdkey[Thesis]{Assignment}{StudentName}{}
\define@boolkey[Thesis]{Assignment}{StudentMale}{}
\define@cmdkey[Thesis]{Assignment}{ThesisTitle}{}
\define@cmdkey[Thesis]{Assignment}{Advisor}{}
\define@cmdkey[Thesis]{Assignment}{Order}{}
\define@cmdkey[Thesis]{Assignment}{ApplicationDate}{}
\define@cmdkey[Thesis]{Assignment}{InputData}{}
\define@cmdkey[Thesis]{Assignment}{Contents}{}
\define@cmdkey[Thesis]{Assignment}{Graphics}{}
\define@cmdkey[Thesis]{Assignment}{ConsultantChapter}{}
\define@cmdkey[Thesis]{Assignment}{Consultant}{}
\define@cmdkey[Thesis]{Assignment}{ConsultantChapterSecond}{}
\define@cmdkey[Thesis]{Assignment}{ConsultantSecond}{}
\define@cmdkey[Thesis]{Assignment}{AssignmentDate}{}
\define@cmdkey[Thesis]{Assignment}{Calendar}{}
\define@cmdkey[Thesis]{Assignment}{StudentNameShort}{}
\define@cmdkey[Thesis]{Assignment}{AdvisorNameShort}{}
\define@cmdkey[Thesis]{Assignment}{Year}{}
\newcommand{\assignment}[1]{
\setkeys[Thesis]{Assignment}{#1}
\pagestyle{empty}
\setlength{\parindent}{0cm}
\begingroup\centering % öåíòðóâàííÿ
\textbf{Íàö³îíàëüíèé òåõí³÷íèé óí³âåðñèòåò Óêðà¿íè}
\textbf{\invcommas{Êè¿âñüêèé ïîë³òåõí³÷íèé ³íñòèòóò}}
\endgroup
Ôàêóëüòåò ïðèêëàäíî¿ ìàòåìàòèêè
Êàôåäðà ïðèêëàäíî¿ ìàòåìàòèêè
гâåíü âèùî¿ îñâ³òè --- ïåðøèé (áàêàëàâðñüêèé)
Ñïåö³àëüí³ñòü 6.040301 \invcommas{Ïðèêëàäíà ìàòåìàòèêà}
\addvspace{14pt} % íåâåëèêèé â³äñòóï
\setlength\parindent{10cm}
{\renewcommand{\arraystretch}{0.8}
\begin{tabular}{l}
\MakeUppercase{Çàòâåðäæóþ} \\
Çàâ³äóâà÷ êàôåäðè\\
\_\_\_\_\_\_\_\_\_\_\_\_\_~Î.~Ð.~×åðòîâ \\
\invcommas{\_\_\_\_}~\_\_\_\_\_\_\_\_\_\_\_\_\_~\cmdThesis@Assignment@Year\ ð. \\
\end{tabular}}
\setlength\parindent{0cm}
\addvspace{28pt} % íåâåëèêèé â³äñòóï
\begingroup\centering
\textbf{\MakeUppercase{Çàâäàííÿ}}
\textbf{íà äèïëîìíó ðîáîòó}
\ifThesis@Assignment@StudentMale
\textbf{ñòóäåíòó}
\else
\textbf{ñòóäåíòö³}
\fi
\cmdThesis@Assignment@StudentName
\endgroup
1.~Òåìà ðîáîòè: \invcommas{\cmdThesis@Assignment@ThesisTitle},
êåð³âíèê ðîáîòè \cmdThesis@Assignment@Advisor,
çàòâåðäæåí³ íàêàçîì ïî óí³âåðñèòåòó â³ä \cmdThesis@Assignment@Order.
2.~Òåðì³í ïîäàííÿ \ifThesis@Assignment@StudentMale
ñòóäåíòîì
\else
ñòóäåíòêîþ
\fi ðîáîòè: \cmdThesis@Assignment@ApplicationDate.
3.~Âèõ³äí³ äàí³ äî ðîáîòè: \cmdThesis@Assignment@InputData.
4.~Çì³ñò ðîáîòè: \cmdThesis@Assignment@Contents.
5.~Ïåðåë³ê ³ëþñòðàòèâíîãî ìàòåð³àëó: \cmdThesis@Assignment@Graphics.
\ifundef{\cmdThesis@Title@ConsultantChapter}{6.~Äàòà âèäà÷³ çàâäàííÿ: \cmdThesis@Assignment@AssignmentDate}%
{\begin{samepage}
6.~Êîíñóëüòàíòè ðîçä³ë³â ðîáîòè:
\setfontsize{12}
\begin{center}
\renewcommand{\arraystretch}{1.2}
\begin{tabular*}{\textwidth}{@{\extracolsep{\fill}}|>{\raggedright}p{5.7cm}|>{\raggedright}p{5.7cm}|c|c|@{\extracolsep{\fill}}}
\hline
\multirow{3}{*}{\parbox[t]{5.7cm}{\centering{} Ðîçä³ë}} & \multirow{3}{*}{\parbox[t]{5.7cm}{\centering{} Ïð³çâèùå, ³í³ö³àëè òà ïîñàäà êîíñóëüòàíòà}} & \multicolumn{2}{c|}{ϳäïèñ, äàòà} \\
\cline{3-4}
& & \parbox[t]{5.6em}{\centering{}çàâäàííÿ\\âèäàâ} & \parbox[t]{5.6em}{\centering{}çàâäàííÿ\\ïðèéíÿâ} \\
\hline
\cmdThesis@Assignment@ConsultantChapter & \cmdThesis@Assignment@Consultant & & \\
\ifundef{\cmdThesis@Assignment@ConsultantChapterSecond}{\hline}%
{\hline
\cmdThesis@Assignment@ConsultantChapterSecond & \cmdThesis@Assignment@ConsultantSecond & & \\
\hline}
\end{tabular*}
\end{center}
\end{samepage}
\setfontsize{14}
7.~Äàòà âèäà÷³ çàâäàííÿ: \cmdThesis@Assignment@AssignmentDate
}
\addvspace{14pt}
\begingroup\centering
Êàëåíäàðíèé ïëàí
\setfontsize{12}
\renewcommand{\arraystretch}{1.1}
\setlength{\LTleft}{0pt}
\setlength{\LTright}{0pt}
\setlength{\LTcapwidth}{0pt}
\begin{longtable}{@{\extracolsep{\fill}}|c|>{\raggedright}p{8cm}|c|c|@{\extracolsep{\fill}}}
\kill
\hline
\multirow{2}{*}{\No\ ç/ï} & \multirow{2}{*}{\parbox[t]{8cm}{\centering Íàçâà åòàï³â âèêîíàííÿ\\äèïëîìíî¿ ðîáîòè}} & \multirow{2}{*}{\parbox[t]{8em}{\centering{}Òåðì³í âèêîíàííÿ\\åòàï³â ðîáîòè}} & \multirow{2}{*}{\parbox[t]{5em}{\centering{}Ïðèì³òêà}} \\
& & & \\
\hline
\endfirsthead
\kill
\hline
\multirow{2}{*}{\No\ ç/ï} & \multirow{2}{*}{\parbox[t]{8cm}{\centering{}Íàçâà åòàï³â âèêîíàííÿ\\äèïëîìíî¿ ðîáîòè}} & \multirow{2}{*}{\parbox[t]{8em}{\centering{}Òåðì³í âèêîíàííÿ\\åòàï³â ðîáîòè}} & \multirow{2}{*}{\parbox[t]{5em}{\centering{}Ïðèì³òêà}} \\
& & & \\
\hline
\endhead
\hline
\endfoot
\cmdThesis@Assignment@Calendar
\end{longtable}
\endgroup
\setfontsize{14}
\renewcommand{\arraystretch}{1.1}
\begin{tabular*}{\textwidth}{@{\extracolsep{\fill}}lrl}
\ifThesis@Assignment@StudentMale
Ñòóäåíò
\else
Ñòóäåíòêà
\fi
& \_\_\_\_\_\_\_\_\_\_\_\_\_ & \cmdThesis@Assignment@StudentNameShort \\
Êåð³âíèê ðîáîòè & \_\_\_\_\_\_\_\_\_\_\_\_\_ & \cmdThesis@Assignment@AdvisorNameShort \\
\end{tabular*}
\clearpage
\pagestyle{plain}
\setlength{\parindent}{1.25cm} % çàäàºìî â³äñòóï ïåðøîãî ðÿäêà àáçàöó (5 çíàê³â, àáî 1,25 ñì)
% ïðîïóñê ðÿäêà äî òà ï³ñëÿ ôîðìóëè
\setlength{\belowdisplayskip}{21pt}
\setlength{\abovedisplayskip}{21pt}
\setlength{\belowdisplayshortskip}{21pt}
\setlength{\abovedisplayshortskip}{21pt}
}
\makeatother
% âèïðàâëÿºìî ïîìèëêè ç àïîñòðîôàìè â ôîðìóëàõ
\makeatletter
\def\latex@@rquote{^\bgroup\prim@s}
\let\hang@@h@ngrquote\h@ngrquote
\renewcommand{\h@ngrquote}{
\relax\ifmmode
\expandafter\latex@@rquote
\else
\expandafter\hang@@h@ngrquote
\fi}
\makeatother