-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinformator.cls
More file actions
110 lines (82 loc) · 2.68 KB
/
Copy pathinformator.cls
File metadata and controls
110 lines (82 loc) · 2.68 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
\NeedsTeXFormat{LaTeX2e}
\ProvidesClass{Informator}[2017/01/03 v0.7.0 Informator]
\newif\ifmyclass@en
\DeclareOption{en}{\myclass@entrue}
\DeclareOption{pl}{\myclass@enfalse}
\ExecuteOptions{pl}
\ProcessOptions\relax
\ifmyclass@en
\RequirePackage[english]{babel}
\RequirePackage[T1]{fontenc}
\else
\RequirePackage[polish]{babel}
\RequirePackage[T1]{fontenc}
\fi
\RequirePackage[utf8]{inputenc}
\def\@baseclass{report}
\DeclareOption*{\PassOptionsToClass{\CurrentOption}{\@baseclass}}
\PassOptionsToClass{a4paper,twoside,openany,11pt}{\@baseclass}
\ProcessOptions
\LoadClass{\@baseclass}
\textwidth\paperwidth
\advance\textwidth -55mm
\oddsidemargin-1in
\advance\oddsidemargin 30mm
\evensidemargin-1in
\advance\evensidemargin 25mm
\topmargin -1in
\advance\topmargin 2cm
\setlength\textheight{48\baselineskip}
\addtolength\textheight{\topskip}
\marginparwidth15mm
% --- Author Information Section Definition ---
% Define a variable to hold the content
\newcommand{\@authorinfotext}{}
% Define the command users will call in the preamble or document
\newcommand{\authorinfo}[1]{\renewcommand{\@authorinfotext}{#1}}
% Define the command to actually print the page
\newcommand{\makeauthorinfo}{%
\clearpage % Changed from \cleardoublepage
\thispagestyle{empty}
\vspace*{2cm}
\begin{center}
{\Large\bfseries \ifmyclass@en Information from the authors \else Informacje od autorów \fi}
\end{center}
\vspace{1cm}
\noindent\@authorinfotext
\vfill
\clearpage
}
% --- Custom Title Page Definition ---
% 1. Define the internal variable (default is empty)
\newcommand{\@releaseversion}{}
% 2. Define the user command to set the version
\newcommand{\releaseversion}[1]{\renewcommand{\@releaseversion}{#1}}
\renewcommand{\maketitle}{%
\begin{titlepage}
\centering
\vspace*{1cm}
% 2. The Title
{\Huge \bfseries \@title \par}
% 3. Vertical space between Title and the Authors section
\vspace{4cm}
% 4. "Autorzy:" Label (Big and Bold)
% This checks if English option was used, otherwise defaults to Polish
{\LARGE \bfseries \ifmyclass@en Authors: \else Autorzy: \fi \par}
\vspace{0.5cm} % Small gap between "Autorzy:" and the actual names
% 5. The actual Author Names
{\Large \@author \par}
% 6. Push date to the very bottom
\vfill
% 7. The Date
{\Large \@date \par}
% 8. The Release Version (Condition: Only prints if user set a version)
\ifx\@releaseversion\@empty
\relax % Do nothing if version is empty
\else
\vspace{0.25cm} % Small gap between Date and Version
{\large \@releaseversion \par}
\fi
\vspace{2cm} % Bottom margin
\end{titlepage}
}