-
Notifications
You must be signed in to change notification settings - Fork 12
/
Copy pathEE-dyplom.cls
858 lines (787 loc) · 30.1 KB
/
EE-dyplom.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
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
% ----------------------------------------------------------------------------
% Szablon prac dyplomowych na Wydziale Elektrycznym PW, zgodny z obowiązującymi
% Zarządzeniami JM Rektora PW:
% 57/2016, 42/2020, 109/2021, 3/2022 oraz 4/2022.
% ----------------------------------------------------------------------------
% Spełnione wszystkie zasady wymagane:
% - druk dwustronny (twoside, openright) na A4
% - numeracja stron um ieszczona u dołu po zewnętrznej stronie z odbiciem
% lustrzanym na stronach parzystych i nieparzystych
% - podrozdziały do trzech poziomów - kontrola po stronie autora pracy
% dyplomowej
% ----------------------------------------------------------------------------
% Większość zasad zalecanych zgodnie z zaleceniami.
% Główne różnice - dla poprawy czytelności pracy:
% * zwiększone światło międzywierszowe (interlinia 1.46557 zamiast 1.15)
% * wyróżniające się nagłówki rozdziałów
% * wyróżnione kolorem, klikalne odnośniki
% ----------------------------------------------------------------------------
% Dziękuję innym Autorom, na których szablonach mogłem się wzorować:
% prof. dr hab. inż. Jacek Starzyński, Wydział Elektryczny, PW
% Artur M. Brodzki i Piotr Woźniak, Wydział EiTI, PW
% ----------------------------------------------------------------------------
% Licencja szablonu: CC-BY 4.0
% https://creativecommons.org/licenses/by/4.0/
% Możesz edytować ten plik, jeśli Cię to nie przeraża ;)
% ----------------------------------------------------------------------------
% Aktualna wersja szablonu dostępna na GitHubie:
% https://github.com/SP5LMA/EE-dyplom
% Autor: Łukasz Makowski <lukasz.makowski.ee@pw.edu.pl>
% ----------------------------------------------------------------------------
\NeedsTeXFormat{LaTeX2e}
\ProvidesClass{EE-dyplom}[2022/01/26 Praca dyplomowa na Wydziale Elektrycznym PW]
\LoadClass[a4paper,11pt,twoside,openright]{book}
% Alternatywnie: 12 pt
%\LoadClass[a4paper,12pt,twoside,openright]{book}
% -------------------------------------------------------------------
% Możliwość kompilacji przez pdflatex i xelatex
% -------------------------------------------------------------------
\RequirePackage{iftex}
\ifPDFTeX
\let\strcmp\pdfstrcmp
\let\XeLaTeX\LaTeX
\fi
% -------------------------------------------------------------------
% Zdefiniowanie parametru klasy
% -------------------------------------------------------------------
\RequirePackage{kvoptions}
\SetupKeyvalOptions{family=EE-dyplom.cls, prefix=pw}
\DeclareStringOption[inz]{thesis}
\DeclareStringOption[EE]{faculty}
\ProcessKeyvalOptions*
\ifnum\strcmp{\pwthesis}{inz} = 0
\newcommand{\locallang}{PL}
\fi
\ifnum\strcmp{\pwthesis}{mgr} = 0
\newcommand{\locallang}{PL}
\fi
\ifnum\strcmp{\pwthesis}{bsc} = 0
\newcommand{\locallang}{EN}
\fi
\ifnum\strcmp{\pwthesis}{msc} = 0
\newcommand{\locallang}{EN}
\fi
% -------------------------------------------------------------------
% Wykaz symboli i skrótów
% Pakiet musi być wczytany przed mathspec
% -------------------------------------------------------------------
\RequirePackage[acronym,symbols,nopostdot]{glossaries}
\setglossarysection{section}
\makeglossaries
\loadglsentries{glossary}
\ifnum\strcmp{\locallang}{PL} = 0
\newcommand{\acronymstitle}{Wykaz skrótów i symboli}
\else
\newcommand{\acronymstitle}{List of Abbreviations and Symbols}
\fi
% -------------------------------------------------------------------
% Krój pisma w XeLaTeX
% Zalecane: krój bezszeryfowy (sfdefault)
% Symbole matematyczne
% Specyfikacja kroju pisma
% Lista krojów pisma (aka "czcionek") w Overleaf:
% https://www.overleaf.com/learn/latex/Questions/Which%20OTF%20or%20TTF%20fonts%20are%20supported%20via%20fontspec%3F
% Lista krojów typowo dostępnych w LaTeX:
% https://tug.org/FontCatalogue/
% -------------------------------------------------------------------
\RequirePackage{amsfonts}
\RequirePackage{amsmath}
\RequirePackage{amssymb}
\RequirePackage{amsthm}
\RequirePackage{esint}
%\RequirePackage[version=4]{mhchem}
\ifXeTeX
\RequirePackage{mathspec} % wczytuje również fontspec
\setmainfont{Latin Modern Roman}
\setromanfont{Latin Modern Roman}
\setsansfont{Latin Modern Sans}
\setmonofont{Latin Modern Mono}
\setmathrm{Latin Modern Math}
\setmathfont(Digits,Latin)[Scale=MatchLowercase]{Latin Modern Math}
\else
\RequirePackage{lmodern}
\renewcommand*\familydefault{\sfdefault}
\RequirePackage[T1]{fontenc}
\fi
\renewcommand{\familydefault}{\sfdefault}
% -------------------------------------------------------------------
% Podstawowa konfiguracja XeLaTeX
% -------------------------------------------------------------------
\ifXeTeX
\RequirePackage{xltxtra}
\fi
% -------------------------------------------------------------------
% Lokalizacja XeLaTeX % PL-EN
% Musi być wczytana na początku
% -------------------------------------------------------------------
\ifXeTeX
\RequirePackage{polyglossia}
\ifnum\strcmp{\locallang}{PL} = 0
\setdefaultlanguage{polish}
\else
\setdefaultlanguage{english}
\fi
\setotherlanguage{polish}
\setotherlanguage{english}
\setotherlanguage{latin}
%\selectlanguage{english}
%\selectlanguage{polish}
\else
\RequirePackage[MeX]{polski}
\ifnum\strcmp{\locallang}{PL} = 0
\RequirePackage[latin,english,polish]{babel}
\selectlanguage{polish}
\else
\RequirePackage[latin,polish,english]{babel}
\selectlanguage{english}
\fi
\RequirePackage[utf8]{inputenc}
\DeclareUnicodeCharacter{00B0}{$^{\circ}$}
\DeclareUnicodeCharacter{00D7}{x}
\fi
% -------------------------------------------------------------------
% Wymiary strony
% Zalecane:
% margines wewnętrzny 30 mm,
% margines zewnętrzny 20 mm,
% marginesy górny i dolny 20 mm
% -------------------------------------------------------------------
\RequirePackage[a4paper,
includehead,
includefoot,
inner=30mm,
outer=20mm,
vmargin=25mm]
{geometry}
% Do debugowania wymiarów
%\RequirePackage{showframe}
% -------------------------------------------------------------------
% Odstęp międzywierszowy
% Zalecane: interlinia 1,15
% -------------------------------------------------------------------
\RequirePackage{setspace}
% -------------------------------------------------------------------
% Alternatywnie supergęsty tekst: lineskip 12 pt gdy stopień pisma 12 pt
%\setstretch{0.8333333} % bo LaTeX ma defaultowy współczynnik 1.2
% -------------------------------------------------------------------
% Interlinia 1,15 (0.83333 * 1.15)
%\setstretch{0.9583}
% -------------------------------------------------------------------
% Alternatywnie interlinia 1.2*stopień pisma (standard w LaTeX)
%\singlespacing % == \setstretch{1.0}
% -------------------------------------------------------------------
% Alternatywnie superzłoty podział (0.83333 * 1.46557)
\setstretch{1.2213}
% -------------------------------------------------------------------
% Alternatywnie interlinia 1.5
%\onehalfspacing % == \setstretch{1.25} 1.25*1.2=1.5
% -------------------------------------------------------------------
% Alternatywnie złoty podział (odstęp 1.618):
%\setstretch{1.348333}
% -------------------------------------------------------------------
% Alternatywnie podwójna interlinia
%\doublespacing
% -------------------------------------------------------------------
% Nagłówki i stopki stron
% Wymagane: numery stron w zewnętrznych,
% dolnych narożnikach.
% -------------------------------------------------------------------
\RequirePackage{fancyhdr}
\fancyhf{}
\fancypagestyle{plain}{ %
\fancyhf{}
\renewcommand{\headrulewidth}{0pt}
\renewcommand{\footrulewidth}{0pt}
\fancyfoot[RO,LE]{\thepage}
}
\fancypagestyle{headings}{
\fancyhf{}
\renewcommand{\headrulewidth}{1pt}
\fancyheadoffset{0cm}
\fancyhead[LE]{\textit{\nouppercase{\leftmark}}}
\fancyhead[RO]{\textit{\nouppercase{\rightmark}}}
\fancyfoot[RO,LE]{\thepage}
\renewcommand{\footrulewidth}{0pt}
\setlength{\headheight}{16pt}
}
\pagestyle{headings}
% -------------------------------------------------------------------
% Puste strony niech będą naprawdę puste
% -------------------------------------------------------------------
\RequirePackage{emptypage}
% -------------------------------------------------------------------
% Formatowanie akapitów
% Do wyboru: akapit z wcięciem 0,5 cm
% ALBO bez wcięcia z odstępem 4 [?] przed akapitem
% Uwaga: pierwszy akapit rozdziału zawsze jest bez
% wcięcia i jest to prawidłowe, zgodne z zasadami
% typografii.
% -------------------------------------------------------------------
% Rozwiązanie 1:
\setlength{\parindent}{0.5cm}
\setlength{\parskip}{0em}
% Rozwiązanie 2:
%\setlength{\parindent}{0pt}
%\setlength{\parskip}{4mm}
% -------------------------------------------------------------------
% Odwołania do źródeł (bibliografia)
% Do wyboru: styl numeracyjny wg normy PN (?)
% ALBO styl harwardzki
% -------------------------------------------------------------------
\RequirePackage[backend=biber,
style=ieee, % styl numeryczny IEEE prawie jak PN
sorting=nyt, % sortowanie spisu po nazwiskach
citestyle=numeric-comp % kompaktowe odnośniki numeryczne typu [21-23]
]{biblatex}
\addbibresource{EE-dyplom.bib}
\DeclareNameAlias{default}{family-given} % nazwisko na początku
\newcommand{\bibliografia}{
\cleardoublepage
\phantomsection
\addcontentsline{toc}{chapter}{\refname}
{
\sloppy
\printbibliography
}
}
% -------------------------------------------------------------------
% Alternatywa - styl harwardzki:
% -------------------------------------------------------------------
%\RequirePackage{natbib}
%\bibliographystyle{agsm}
%\newcommand{\bibliografia}{
% \bibliography{EE-dyplom.bib}
%}
% -------------------------------------------------------------------
% Żeby spis treści zawierał to co trzeba
% -------------------------------------------------------------------
\RequirePackage[nottoc]{tocbibind}
% -------------------------------------------------------------------
% Numeracja tabel i rysunków
% Do wyboru: ciągła w całej pracy
% ALBO kolejna w rozdziałach
% -------------------------------------------------------------------
% Rozwiązanie 1: ciągła w pracy
\RequirePackage{chngcntr}
\counterwithout{figure}{chapter}
\counterwithout{table}{chapter}
\counterwithout{equation}{chapter}
% Rozwiązanie 2: kolejna w rozdziałach
% To standard - wystarczy zakomentować powyższe
% -------------------------------------------------------------------
% Tytuły tabel i podpisy rysunków
% Zalecenie: 9 pt, "justowany do lewej strony" (?)
% -------------------------------------------------------------------
% Gdy główny stopień pisma to 11 pt wtedy footnotesize daje 9 pt
%\RequirePackage[format=plain, labelfont=bf, labelsep=period,
% font=footnotesize, justification=RaggedRight]
% {caption}
% Alternatywnie: 10 pt gdy główny to 11 pt i 11 pt gdy główny to 12 pt
\RequirePackage[format=plain, labelfont=bf, labelsep=period,
font=small, justification=justified]
{caption}
\RequirePackage{subcaption}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Ustawienia typografii
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% -------------------------------------------------------------------
% Kontrola wdów i sierot
% -------------------------------------------------------------------
\widowpenalty 20000
\clubpenalty 20000
\raggedbottom
% -------------------------------------------------------------------
% Przenoszenie wyrazów do nowej linii
% -------------------------------------------------------------------
\pretolerance 1000
\hyphenpenalty 1000
\tolerance 2000
\emergencystretch .618em
\righthyphenmin 4
\lefthyphenmin 4
% -------------------------------------------------------------------
% Znaki cytowania % PL-EN
% -------------------------------------------------------------------
\RequirePackage{csquotes}
\setquotestyle[guillemets]{polish}
%\setquotestyle{english}
% -------------------------------------------------------------------
% Klikalne linki
% -------------------------------------------------------------------
\RequirePackage{hyperref}
\hypersetup{ % Na bazie https://en.wikibooks.org/wiki/LaTeX/Hyperlinks
% bookmarks=true, % show bookmarks bar? FIXME
unicode=true, % non-Latin characters in Acrobat’s bookmarks
pdftoolbar=true, % show Acrobat’s toolbar?
pdfmenubar=true, % show Acrobat’s menu?
pdffitwindow=false, % window fit to page when opened
pdfstartview={FitH}, % fits the width of the page to the window
% pdfsubject={}, % subject of the document
% pdfkeywords={}, % list of keywords
linktoc=all, % defines which part of an entry in the table
%of contents is made into a link (none,section,page,all)
pdfnewwindow=true, % links in new PDF window
colorlinks=true, % false: boxed links; true: colored links
linkcolor=EEBlueDark, % color of internal links (change box color with linkbordercolor)
citecolor=EEBlueDark, % color of links to bibliography
filecolor=EEBlueDark, % color of file links
urlcolor=EEBlueDark, % color of external links
linkbordercolor={1 0 0}, % color of frame around internal links (if colorlinks=false)
citebordercolor={0 1 0}, % color of frame around citations
urlbordercolor={0 1 1}, % color of frame around URL links
}
% -------------------------------------------------------------------
% Wypełniacze do testowania typografii
% -------------------------------------------------------------------
\RequirePackage{lipsum}
\RequirePackage{bredzenie}
% -------------------------------------------------------------------
% Formatowanie tabel
% -------------------------------------------------------------------
\RequirePackage{multirow}
\RequirePackage{multicol}
\RequirePackage{longtable}
\RequirePackage{colortbl}
% -------------------------------------------------------------------
% Kolory
% -------------------------------------------------------------------
\RequirePackage[usenames,dvipsnames]{xcolor}
\definecolor{mysamplecolor}{rgb}{0.123, 0.456, 0.789}
% Kolory wydziałów "budowlanych"
\definecolor{bud}{RGB}{106, 186, 156}
% Kolory wydziałów "mechanicznych"
\definecolor{mech}{RGB}{234, 124, 90}
% Kolory wydziałów "chemicznych"
\definecolor{chem}{RGB}{254, 213, 66}
% Kolory wydziałów "elektrycznych"
\definecolor{elek}{RGB}{120, 150, 207}
% Kolory wydziałów "matematyczno-fizycznych"
\definecolor{mfiz}{RGB}{150, 95, 119}
% Kolory wydziałów "multidyscyplinarnych"
\definecolor{multi}{RGB}{180, 160, 170}
% Kolor Wydziału Elektrycznego i dwa pokrewne monochromatyczne.
% Kolor podstawowy jest tu określony w przybliżeniu, gdyż
% Zarządzenie definiuje go niejednoznacznie. Dla wskazanego
% Pantone 2716C i 2716U podane wartości CMYK (50, 30, 0, 0)
% są inne niż podaje to Pantone na swej stronie www (38, 26, 0, 0).
\definecolor{EEBlue}{cmyk}{0.50, 0.30, 0, 0} % #8ba5d3
\definecolor{EEBlueLight}{cmyk}{0.14, 0.04, 0.03, 0} % #e2ecf8
\definecolor{EEBlueDark}{cmyk}{0.73, 0.55, 0.35, 0.32} % #45536a
% Uzupełniający dla EEBlue - pomarańczowy
\definecolor{EEOrange}{cmyk}{0.02, 0.41, 0.94, 0} % #f6a307
% Uzupełniające bliskie dla EEBlue, 10 stopni na kole barw
\definecolor{EETangerine}{RGB}{255, 119, 0}
\definecolor{EEGold}{RGB}{255, 209, 0}
\definecolor{EEAzure}{RGB}{0, 136, 255}
\definecolor{EEUltramarine}{RGB}{0, 46, 255}
% -------------------------------------------------------------------
% Ścieżki do grafik
% -------------------------------------------------------------------
\RequirePackage{graphicx}
\graphicspath{{gfx/}{rysunki/}}
% -------------------------------------------------------------------
% Listingi programów
% -------------------------------------------------------------------
\RequirePackage{listings}
\lstdefinestyle{EEStyle}{
backgroundcolor=\color{white},
commentstyle=\color{EEBlueDark},
keywordstyle=\bfseries\color{EEUltramarine},
numberstyle=\tiny\color{EEBlue},
stringstyle=\color{EETangerine},
basicstyle=\ttfamily\small,
breakatwhitespace=false,
breaklines=true,
captionpos=b,
keepspaces=true,
numbers=left,
firstnumber=1, % 2
stepnumber=1, % 5
numbersep=5pt,
showspaces=false,
showstringspaces=false,
showtabs=false,
tabsize=2,
frame=lB,
frameround=tttt,
inputpath=src
}
\lstset{style=EEStyle}
% -------------------------------------------------------------------
% Ozdobniki ścieżek plików, menu i klawiszy
% -------------------------------------------------------------------
\RequirePackage[os=win]{menukeys}
\renewmenumacro{\menu}[>]{roundedmenus}
\renewmenumacro{\directory}{pathswithfolder}
\renewmenumacro{\keys}{shadowedroundedkeys}
% -------------------------------------------------------------------
% Dodatki
% -------------------------------------------------------------------
\RequirePackage{etoolbox}
%\RequirePackage[titletoc]{appendix}
\ifnum\strcmp{\locallang}{PL} = 0
\newcommand{\appendiceslisttitle}{Spis załączników}
\newcommand{\appendixprefix}{Załącznik}
\else
\newcommand{\appendiceslisttitle}{List of Appendices}
\newcommand{\appendixprefix}{Appendix}
\fi
\renewcommand{\appendixname}{\appendixprefix}
\let\appendixname\appendixprefix
% -------------------------------------------------------------------
% Stopnie pisma tytułów
% Zalecenie: wielkości 14 [?], 13 [?], 12 [?]
% odpowiednio dla poziomów I, II i III
% -------------------------------------------------------------------
%\RequirePackage{titlesec}
%\titleformat{\chapter}[display]
% {\fontsize{18pt}{48pt}\selectfont \bfseries}
% {\chaptertitlename\ \thechapter}{1em}
% {\fontsize{14pt}{0pt}\selectfont \bfseries}
%\titleformat{\section}[hang]
% {\fontsize{13pt}{18pt}\selectfont \bfseries}
% {\thesection}{1em}{}
%\titleformat{\subsection}[hang]
% {\fontsize{12pt}{15pt}\selectfont \bfseries}
% {\thesubsection}{1em}{}
% Alternatywne rozwiązanie:
% LaTeX robi to dobrze więc po co zmieniać?
% -------------------------------------------------------------------
% Wyliczenia
% Zalecenie: tylko kropka lub myślnik
% -------------------------------------------------------------------
\RequirePackage{enumitem}
\newlength\docparskip
\setlength{\docparskip}{\parskip}
\setlist[itemize,1]{nosep,
label=$\bullet$, % ustawiony krój ma kwadratowe kropki
}
\setlist[itemize,2]{nosep,label=--}
\setlist[itemize,3]{nosep,label=-}
\setlist[itemize,4]{nosep,label=$\cdot$}
%\setlist[description]{font=\normalfont, labelwidth=3em}
% -------------------------------------------------------------------
% Przypisy dolne
% -------------------------------------------------------------------
% Standardowo zgodne z zaleceniami
% -------------------------------------------------------------------
% W celu umieszczenia PDF z "Oświadczeniami"
% -------------------------------------------------------------------
\RequirePackage{tikz}
%\RequirePackage[absolute,overlay]{textpos}
\newcommand{\grantlicense}[1]{
\newcommand{\@grantlicense}{#1}
}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Here be dragons...
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% STRONA TYTUŁOWA
% Here be dragons...
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\newcommand{\instytut}[1]{
\newcommand{\@instytut}{#1}
}
\newcommand{\kierunek}[1]{
\newcommand{\@kierunek}{#1}
}
\newcommand{\specjalnosc}[1]{
\newcommand{\@specjalnosc}{#1}
}
\newcommand{\album}[1]{
\newcommand{\@album}{#1}
}
\newcommand{\promotor}[1]{
\newcommand{\@promotor}{#1}
}
\newcommand{\engtitle}[1]{
\newcommand{\@engtitle}{#1}
}
\newcommand{\longdate}[1]{
\newcommand{\@longdate}{#1}
}
\ifnum\strcmp{\pwthesis}{inz} = 0
\newcommand{\frontpageheader}{inzhead.png}
\fi
\ifnum\strcmp{\pwthesis}{mgr} = 0
\newcommand{\frontpageheader}{mgrhead.png}
\fi
\ifnum\strcmp{\pwthesis}{bsc} = 0
\newcommand{\frontpageheader}{bschead.png}
\fi
\ifnum\strcmp{\pwthesis}{msc} = 0
\newcommand{\frontpageheader}{mschead.png}
\fi
\ifnum\strcmp{\locallang}{PL} = 0
\newcommand{\kieruneklocal}{na~kierunku }
\newcommand{\specjalnosclocal}{w~specjalności }
\newcommand{\titlelocal}{\@title }
\newcommand{\albumlocal}{numer~albumu }
\newcommand{\promotorlocal}{promotor}
\newcommand{\citylocal}{WARSZAWA }
\fi
\ifnum\strcmp{\locallang}{EN} = 0
\newcommand{\kieruneklocal}{in~the~field~of~study }
\newcommand{\specjalnosclocal}{and~specialisation }
\newcommand{\titlelocal}{\@engtitle }
\newcommand{\albumlocal}{student record book number }
\newcommand{\promotorlocal}{supervisor }
\newcommand{\citylocal}{WARSZAWA }
\fi
\newcommand{\pwheader}{Head}
\ifnum\strcmp{\locallang}{PL} = 0
\g@addto@macro\pwheader\pwfaculty
\g@addto@macro\pwheader{PL.png}
\fi
\ifnum\strcmp{\locallang}{EN} = 0
\g@addto@macro\pwheader\pwfaculty
\g@addto@macro\pwheader{EN.png}
\fi
\let\oldmaketitle\maketitle
\renewcommand{\maketitle}{
\linespread{1.15}
\thispagestyle{empty}
\begin{center}
\includegraphics[width=\textwidth]{\pwheader}
\vskip 3em
\@instytut
\vskip 3em
\includegraphics[width=\linewidth]{\frontpageheader}
\vskip 1em
\kieruneklocal \@kierunek
\vskip .5em
\specjalnosclocal \@specjalnosc
\vskip 3em
\large \titlelocal
\vskip 3em
\LARGE \@author \\
\normalsize
\albumlocal \@album
\vskip 2em
\promotorlocal\\\@promotor
\vfill
\citylocal \@date
\end{center}
}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% streszczenie, abstract
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\newcommand{\streszczeniepracy}[1]{
\newcommand{\@streszczeniepracy}{#1}
}
\newcommand{\slowakluczowe}[1]{
\newcommand{\@slowakluczowe}{#1}
}
\newcommand{\thesisabstract}[1]{
\newcommand{\@thesisabstract}{#1}
}
\newcommand{\thesiskeywords}[1]{
\newcommand{\@thesiskeywords}{#1}
}
% Streszczenie polskie
\newcommand{\stronastreszczenia}{
\cleardoublepage
\thispagestyle{empty}
\begin{center}
\textbf{\large\@title}
\textbf{Streszczenie}
\end{center}
\@streszczeniepracy
\vskip 2em
\noindent\textbf{Słowa kluczowe: }
\@slowakluczowe
\cleardoublepage
}
% Abstract angielski
\newcommand{\abstractpage}{
\cleardoublepage
\thispagestyle{empty}
\begin{center}
\textbf{\large\@engtitle}
\textbf{Abstract}
\end{center}
\@thesisabstract
\vskip 2em
\noindent\textbf{Keywords: }
\@thesiskeywords
\cleardoublepage
}
% Spięcie stron streszczeń we właściwej
% kolejności w jedno polecenie.
\newcommand{\abstractpages}{
\ifnum\strcmp{\locallang}{PL} = 0
\stronastreszczenia
\abstractpage
\else
\abstractpage
\stronastreszczenia
\fi
}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Oświadczenia o autorstwie
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\newcommand{\authorship}{
\ifnum\strcmp{\locallang}{PL} = 0 % wersja polska
\begin{tikzpicture}[remember picture, overlay]
\node [anchor=north west, inner sep=0pt] at (current page.north west)
{{\includegraphics[width=\paperwidth]{gfx/oswiadczeniePL-2021-109.pdf}};};
\node[anchor=north west, inner sep=0pt] at(10.4, -1.1) {Warszawa \@longdate};
\node[anchor=north west, inner sep=0pt] at(-0.8, -2.3) {\@author};
\node[anchor=north west, inner sep=0pt] at(-0.8, -3.6) {\@album};
\node[anchor=north west, inner sep=0pt] at(-0.8, -4.8) {\@kierunek};
\node[anchor=north east, inner sep=0pt] at(13.8, -14.6) {\@author};
\end{tikzpicture}
\clearpage
\else % wersja angielska
\begin{tikzpicture}[remember picture, overlay]
\node [anchor=north west, inner sep=0pt] at (current page.north west)
{{\includegraphics[width=\paperwidth]{gfx/oswiadczenieEN-2021-109.pdf}};};
\node[anchor=north west, inner sep=0pt] at(10.4, -1.4) {Warszawa \@longdate};
\node[anchor=north west, inner sep=0pt] at(-0.8, -2.6) {\@author};
\node[anchor=north west, inner sep=0pt] at(-0.8, -3.9) {\@album};
\node[anchor=north west, inner sep=0pt] at(-0.8, -5.2) {\@kierunek};
\node[anchor=north east, inner sep=0pt] at(13.8, -19.6) {\@author};
\end{tikzpicture}
\clearpage
\fi
\cleardoublepage
}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Oświadczenia o licencji
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\newcommand{\licensedthesis}{
\ifnum\strcmp{\locallang}{PL} = 0 % wersja polska
\begin{tikzpicture}[remember picture, overlay]
\node [anchor=north west, inner sep=0pt] at (current page.north west)
{{\includegraphics[width=\paperwidth]{gfx/licencjaPL-2021-109.pdf}};};
\node[anchor=north east, inner sep=0pt] at(15.5, -1.3) {Warszawa \@longdate};
\node[anchor=north west, inner sep=0pt] at(-1.2, -2.1) {\@author};
\node[anchor=north west, inner sep=0pt] at(-1.2, -2.95) {\@album};
\node[anchor=north west, inner sep=0pt] at(-1.2, -3.75) {\@kierunek};
\node[anchor=north east, inner sep=0pt] at(15.5, -13.3) {\@author};
\node[anchor=south west, inner sep=0pt] at(9.1, -8.85) {\resizebox*{7cm}{1em}{\@title}};
\end{tikzpicture}
% przekreślenia w wersji polskiej
% skreślenie "współautora" - TODO: prace wieloautorskie
\begin{tikzpicture}[remember picture, overlay]
\draw[thick] (3.1,-8.8) -- (4.7,-8.8);
\end{tikzpicture}
% skreślenia nieudzielenia licencji
\ifnum\strcmp{\@grantlicense}{TRUE} = 0
\begin{tikzpicture}[remember picture, overlay]
\draw[thick] (-.2,-9.25) -- (1.8,-9.25);
\end{tikzpicture}
\else % skreślenia udzielenia licencji XD
\begin{tikzpicture}[remember picture, overlay]
\draw[thick] (-1.7,-9.25) -- (-.4,-9.25);
\end{tikzpicture}
\fi
\clearpage
\else % wersja angielska
% podstawowe dane w wersji angielskiej
\begin{tikzpicture}[remember picture, overlay]
\node [anchor=north west, inner sep=0pt] at (current page.north west)
{{\includegraphics[width=\paperwidth]{gfx/licencjaEN-2021-109.pdf}};};
\node[anchor=north west, inner sep=0pt] at(11.4, -1.7) {Warszawa \@longdate};
\node[anchor=north west, inner sep=0pt] at(-0.8, -2.95) {\@author};
\node[anchor=north west, inner sep=0pt] at(-0.8, -4.21) {\@album};
\node[anchor=north west, inner sep=0pt] at(-0.8, -5.45) {\@kierunek};
\node[anchor=north east, inner sep=0pt] at(14.9, -19.5) {\@author};
\node[anchor=south west, inner sep=0pt] at(9.4, -11.7) {\resizebox*{7cm}{1em}{\@title}};
\node[anchor=south west, inner sep=0pt] at(10.2, -13.95) {\resizebox*{1.5cm}{1em}{\@engtitle}};
\end{tikzpicture}
% przekreślenia w wersji angielskiej
% skreślenie "współautora" - TODO: prace wieloautorskie
\begin{tikzpicture}[remember picture, overlay]
\draw[thick] (3.5,-11.6) -- (5.3,-11.6);
\draw[thick] (3.9,-13.8) -- (5.4,-13.8);
\end{tikzpicture}
% skreślenia nieudzielenia licencji
\ifnum\strcmp{\@grantlicense}{TRUE} = 0
\begin{tikzpicture}[remember picture, overlay]
\draw[thick] (.2,-12.05) -- (2.6,-12.05);
\draw[thick] (12.8,-13.8) -- (14.6,-13.8);
\end{tikzpicture}
\else % skreślenia udzielenia licencji XD
\begin{tikzpicture}[remember picture, overlay]
\draw[thick] (-1.3,-12.05) -- (.1,-12.05);
\draw[thick] (11.9,-13.8) -- (12.7,-13.8);
\end{tikzpicture}
\fi
\clearpage
\fi % koniec wersji angielskiej
\cleardoublepage
}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Jedno polecenie - kombajn stron początkowych
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\AtBeginDocument{\addtocontents{toc}{\protect\thispagestyle{empty}}}
\newcommand{\frontpages}{
\counterwithout{lstlisting}{chapter} % hack niestety
\pagestyle{empty}
\maketitle
\abstractpages
% Zgodnie z Zarządzeniem JM Rektora 3/2022, oświadczenia o autorstwie i
% opcjonalne oświadczenie o udzieleniu licencji składane są w systemie USOS
% APD.
% Zgodnie z Zarządzeniem JM Rektora 4/2022 załącznik 1, układ pracy nie obejmuje
% oświadczenia o autorstwie i udzielenia licencji BG PW.
% \authorship
% \licensedthesis
\tableofcontents
\cleardoublepage
\pagestyle{headings}
}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Lista skrótów i symboli
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\newcommand{\acronymslist}{
% \cleardoublepage
\chapter*{\acronymstitle}
\pagestyle{plain}
\addcontentsline{toc}{chapter}{\acronymstitle}
\printglossary[type=\acronymtype,title={}]
\printglossary[type=symbols,title={}]
% Alternatywna lista symboli - do użycia tylko w Overleaf
%\input{symbols}
} %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Załączniki i ich lista
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\newcounter{easyappendix}[chapter]
\newenvironment{easyappendix}[1]{
\cleardoublepage
\refstepcounter{easyappendix}
\addcontentsline{app}{chapter}{\hspace{1em}\theeasyappendix\hspace{1em} #1\dotfill}
\par\bigskip
\Huge{\textbf{\appendixname~\theeasyappendix}}
\par\medskip
\Huge{\textbf{#1}}
\par\bigskip
\normalsize
}{}
\newcommand\easyappendices{
\let\appendixname\appendixprefix
\chapter*{\appendiceslisttitle}
\addcontentsline{toc}{chapter}{\appendiceslisttitle}
\@starttoc{app}
\input{appendices}
}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Jedno polecenie - kombajn stron końcowych (bez bibliografii)
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\newcommand{\tailpages}{
% wykaz symboli i skrótów
\acronymslist
% spis rysunków
\listoffigures
% spis tabel
\listoftables
\easyappendices
}