-
Notifications
You must be signed in to change notification settings - Fork 0
/
eitilogo.sty
102 lines (87 loc) · 2.67 KB
/
eitilogo.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
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{eitilogo}[2022/08/08 EITI Logo]
\RequirePackage[defaultsans]{opensans}
\RequirePackage{graphicx}
\RequirePackage{calc}
\RequirePackage{geometry}
\RequirePackage{xkeyval,xparse}
\RequirePackage{hyperref}
% The trailing slash is mandatory.
\def\fontPath{assets/}
\newfontfamily{\openSansLightFont}[
UprightFont={* Light}
]{Open Sans}
\newfontfamily{\adagioSlabFont}{Adagio Slab}[
Extension = .otf,
UprightFont = *-Regular,
Path = \fontPath
]
\newfontfamily{\adagioSlabFontExtraSpace}{
Adagio Slab
}[
Extension = .otf,
UprightFont = *-Regular,
LetterSpace = 21.0,
Path = \fontPath
]
\def\eitilogo@pw{Politechnika Warszawska}
\def\eitilogo@wut{Warsaw University of Technology}
\newcommand{\eitilogo@university}[1]{
\fontsize{24pt}{32pt}\adagioSlabFont{
#1
}
}
\newcommand{\PolitechnikaWarszawska}{%
\eitilogo@university{\eitilogo@pw}
}
\newcommand{\eitilogo@facultyEmblemBasic}{%
\includegraphics[width=345pt]{
images/pw.jpg
}
}
\newcommand{\eitilogo@universityEmblem}[1]{%
\begin{minipage}[c]{50pt}
\begin{center}
\includegraphics[height=50pt]{#1}
\end{center}
\end{minipage}
}
\newcommand{\eitilogo@WydzialSpaced}[2]{
\parbox{#1}{
\centering\fontsize{12pt}{12pt}\adagioSlabFontExtraSpace{\MakeUppercase{#2}}
}
}
\newcommand{\eitilogo@UczelniaIWydzialColumn}[2]{%
\begin{tabular}{c}
\eitilogo@university{#1} \\[.25cm]
\eitilogo@WydzialSpaced{
\widthof{\eitilogo@university{#1}}
}{#2}
\end{tabular}
}
\newcommand{\FacultyHeader}[2][Politechnika Warszawska]{
\def\uczelnia{#1}
\def\wydzial{#2}
\begin{tabular}{c c}
\eitilogo@UczelniaIWydzialColumn{\uczelnia}{\wydzial}
& \eitilogo@universityEmblem{assets/PW-logo-uroczysty.pdf}
\end{tabular}
}
\def\defaultUniversity{Politechnika Warszawska}
\def\defaultFaculty{Wydział Elektroniki i~Technik~Informacyjnych}
% Usage and credit: https://tex.stackexchange.com/a/34314
\makeatletter
% ========= KEY DEFINITIONS =========
\define@key{universityandfaculty}{university}{\def\uf@university{#1}}
\define@key{universityandfaculty}{faculty}{\def\uf@faculty{#1}}
\define@key{universityandfaculty}{logo}{\def\uf@logo{#1}}
% ========= KEY DEFAULTS =========
\setkeys{universityandfaculty}{university=\defaultUniversity,faculty=\defaultFaculty,logo=assets/PW-logo-uroczysty.pdf}%
\newcommand{\universityAndFaculty}[1][]{%
\setkeys{universityandfaculty}{#1}% Set new keys
\begin{tabular}{c c}
\eitilogo@UczelniaIWydzialColumn{\uf@university}{\uf@faculty}
& \eitilogo@universityEmblem{\uf@logo}
\end{tabular}
}
\makeatother