-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathszablonPG.cls
More file actions
276 lines (224 loc) · 9.25 KB
/
szablonPG.cls
File metadata and controls
276 lines (224 loc) · 9.25 KB
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
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %
% szablonPG.cls %
% %
% Szablon pracy dyplomowej zgodny z wymaganiami edytorskimi przedstawionymi %
% w Zarządzeniu Rektora PG nr 22/2018 z 20 czerwca 2018 r. %
% %
% (c) 2019 Jakub Maksymiuk %
% Paweł Spławski %
% Paweł Zarembski %
% Kamil Andrzejewski %
% %
% %
% %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%--------------------------------------------------------------------
% Zdeklarowanie opcji
%--------------------------------------------------------------------
\newif\ifnostrict
\DeclareOption{strict}{\nostrictfalse }
\DeclareOption{nostrict}{\nostricttrue }
\ProcessOptions \relax
%--------------------------------------------------------------------
% Pobranie ustawień podstawowej klasy dokumentu - klasa report
%--------------------------------------------------------------------
\LoadClass[
a4paper, % format A4
10pt, % rozmiar czcionki
oneside, % druk jednostronny
notitlepage, % brak strony tytułowej
openright, % orientacja otwierania dokumentu
]{report}
%--------------------------------------------------------------------
% Ustawienie domyślnego języka i kodowania
%--------------------------------------------------------------------
\RequirePackage{polski}
\RequirePackage[T1]{fontenc}
%\RequirePackage[utf8]{inputenc}
%--------------------------------------------------------------------
% Podstawowa czcionka - Helvetica (Zamiennik dla czcionki Arial)
%--------------------------------------------------------------------
\RequirePackage{helvet}
\renewcommand{\familydefault}{\sfdefault}
%--------------------------------------------------------------------
% Ustawienie interlinii
%--------------------------------------------------------------------
\linespread{1.3} % 1.3 odpowiada interlinii 1.5, 1.6 dla interlinii 2
%--------------------------------------------------------------------
% Ustawienie marginesów
%--------------------------------------------------------------------
\RequirePackage[%
margin=2.5cm,
a4paper,
bindingoffset=1cm
]{geometry}
%--------------------------------------------------------------------
% Ustawienia akapitów
%--------------------------------------------------------------------
\RequirePackage{indentfirst}
\setlength{\parindent}{0.9cm}
%--------------------------------------------------------------------
% Numeracja stron
%--------------------------------------------------------------------
\pagenumbering{arabic}
\RequirePackage{fancyhdr}
\fancypagestyle{plain}{
\fancyhf{}
\fancyfoot[C]{\fontsize{9pt}{9pt}\selectfont\thepage}%
\renewcommand{\headrulewidth}{0.0pt}
}
\pagestyle{plain}
%--------------------------------------------------------------------
% Ustawienia nagłówków
%--------------------------------------------------------------------
\RequirePackage[explicit, clearempty]{titlesec}
% konfiguracja dla tytułu rozdziału
\titleformat{\chapter}[hang]
{\bfseries\fontsize{12pt}{24pt}\selectfont}
{\thechapter.\quad}
{0pt}
{\MakeUppercase{#1}}
\titlespacing*{\chapter}{0pt}{0pt}{6pt}
% konfiguracja dla tytułu podrozdziału
\titleformat{\section}
{\fontsize{11pt}{22pt}\selectfont\bfseries\itshape}
{\thesection.\quad}
{0pt}
{#1}
\titlespacing{\section}{0pt}{6pt}{6pt}
% konfiruacja dla pod-podrozdziałów
\titleformat{\subsection}
{\normalfont\bfseries\itshape}
{\thesubsection.\quad}
{0pt}
{#1}
\titlespacing{\subsection}{0pt}{6pt}{6pt}
%--------------------------------------------------------------------
% Spis treści - konfiguracja
%--------------------------------------------------------------------
\RequirePackage{titletoc}
% ustawienia dla rozdziałów w spisie treści
\titlecontents{chapter}
[0em] % no indentation
{}
{\contentslabel[\thecontentslabel.]{1em}}
{\hspace*{-1em}}
{\dotfill\contentspage}
% ustawienia dla podrozdziałów w spisie treści
\titlecontents{section}
[2em] % ie, 1.5em (chapter) + 0.5em
{}
{\contentslabel[\thecontentslabel.]{2em}}
{\hspace*{-2.3em}}
{\dotfill\contentspage}
% ustawienia dla pod-podrozdziałów w spisie treści
\titlecontents{subsection}
[5em] % ie, 2em (section) + 3em
{}
{\contentslabel[\thecontentslabel.]{3em}}
{\hspace*{-2.3em}}
{\dotfill\contentspage}
%--------------------------------------------------------------------
% Konfiguracja list numerowanych i nienumerowanych
%--------------------------------------------------------------------
\RequirePackage{enumitem}
\setenumerate{
topsep=0pt,
nolistsep,
noitemsep,
}
\setenumerate[1]{label=\arabic*.}
\setenumerate[2]{label=\alph*)}
\setitemize{
topsep=0pt,
noitemsep,
nolistsep,
}
%--------------------------------------------------------------------
% Konfiguracja prezentacji aparatu matematycznego
%--------------------------------------------------------------------
\RequirePackage{amsmath}
\RequirePackage{amssymb}
\RequirePackage{amsthm}
%%%%%%%% środowiska twierdzeń %%%%%%%%
\newtheoremstyle{SPPG_th1}% hname
{10pt plus5pt minus2pt}% hSpace above
{10pt plus3pt}% hSpace below
{}% hBody font
{}% hIndent amount
{\bfseries}% hTheorem head font
{.}% hPunctuation after theorem head
{.5em}% hSpace after theorem head
{}% hTheorem head spec
\theoremstyle{SPPG_th1}
\newtheorem{definicja}{Definicja}[chapter]
\newtheorem{twierdzenie}[definicja]{Twierdzenie}
\newtheorem{lemat}[definicja]{Lemat}
\newtheorem{fakt}[definicja]{Fakt}
\newtheorem{wniosek}[definicja]{Wniosek}
\newtheorem{przyklad}[definicja]{Przykład}
%--------------------------------------------------------------------
% Konfiguracja obrazków oraz tabel
%--------------------------------------------------------------------
\RequirePackage{subfig}
\RequirePackage[unicode=true]{hyperref}
\RequirePackage{setspace}
\RequirePackage[skip=2pt]{caption}
\RequirePackage{pdfpages}
\RequirePackage{multicol} % do składu w dwóch kolumnach
\RequirePackage{color}
\RequirePackage{wrapfig}
\RequirePackage{graphicx}
\usepackage{etoolbox}
% Modyfikacja podpisu rysunków i tabel (zmiana na Rys. X niepogrubione)
% Separator po identyfikatorze rysunku
\renewcommand{\figurename}{Rys.}
\DeclareCaptionLabelSeparator{dot}{. }
\captionsetup[figure]{justification=centering,labelfont=md} % centrowanie podpisu rysunku
\captionsetup[figure]{labelsep=dot} % kropka jako separator, bez pogrubiania
\captionsetup[table]{labelsep=dot} % kropka jako separator, bez pogrubiania
% Zmniejszenie czcionki oraz interlinii w podpisach
\captionsetup{font={small,stretch=1.0}}
\setlength{\intextsep}{3mm} % odległości separacji tekstu od rysunków/tabel
\setlength{\textfloatsep}{3mm}
%--------------------------------------------------------------------
% Dodatkowe ustawienia
%--------------------------------------------------------------------
\renewcommand\bibname{Wykaz literatury} % Zamiana na tytuł "Wykaz literatury"
% Zmiana na tytuł "Wykaz rysunków"
\renewcommand{\listfigurename}{Wykaz rysunków}
% Zmiana na tytuł "Wykaz tabel"
\renewcommand{\listtablename}{Wykaz tabel}
% Brak "wdów" i "sierot"
\widowpenalty10000
\clubpenalty10000
% Nazwy rozdziałów w Spisie treści WIELKIMI LITERAMI
\makeatletter
\renewcommand\chapter{\if@openright\cleardoublepage\else\clearpage\fi
\thispagestyle{plain}%
\global\@topnum\z@
\@afterindentfalse
\secdef\@chapter\@schapter}
\def\@chapter[#1]#2{\ifnum \c@secnumdepth >\m@ne
\if@mainmatter
\refstepcounter{chapter}%
\typeout{\@chapapp\space\thechapter.}%
\addcontentsline{toc}{chapter}%
{\protect\numberline{\thechapter}\texorpdfstring{\MakeUppercase{#1}}{#1}}%
\else
\addcontentsline{toc}{chapter}{\texorpdfstring{\MakeUppercase{#1}}{#1}}%
\fi
\else
\addcontentsline{toc}{chapter}{\texorpdfstring{\MakeUppercase{#1}}{#1}}%
\fi
\chaptermark{#1}%
\addtocontents{lof}{\protect\addvspace{10\p@}}%
\addtocontents{lot}{\protect\addvspace{10\p@}}%
\if@twocolumn
\@topnewpage[\@makechapterhead{#2}]%
\else
\@makechapterhead{#2}%
\@afterheading
\fi}
\makeatother