-
Notifications
You must be signed in to change notification settings - Fork 0
/
preamble.sty
105 lines (86 loc) · 3.53 KB
/
preamble.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
103
104
105
%============================================================================%
% Custom package that abstracts usepackage
%============================================================================%
\ProvidesPackage{preamble}
%-------------------------------------------------------------------
% ENCODING
%-------------------------------------------------------------------
\usepackage[utf8]{inputenc}
%-------------------------------------------------------------------
% LOGIC
%-------------------------------------------------------------------
\usepackage{xstring, xifthen}
%-------------------------------------------------------------------
% FONT BASICS
%-------------------------------------------------------------------
\usepackage[default]{raleway}
\renewcommand*\familydefault{\sfdefault}
\usepackage[T1]{fontenc}
\usepackage{moresize}
%-------------------------------------------------------------------
% FONT AWESOME ICONS
%-------------------------------------------------------------------
\usepackage{fontawesome}
%-------------------------------------------------------------------
% IMPORT FOR CUSTOM PACKAGES
%-------------------------------------------------------------------
\usepackage{import}
\newcommand{\vcenteredinclude}[1]{\begingroup
\setbox0=\hbox{\includegraphics{#1}}%
\parbox{\wd0}{\box0}\endgroup}
\newcommand*{\vcenteredhbox}[1]{\begingroup
\setbox0=\hbox{#1}\parbox{\wd0}{\box0}\endgroup}
%-------------------------------------------------------------------
% ICON COMMANDS
%-------------------------------------------------------------------
\newcommand{\icon}[3] {
\makebox(#2, #2){\textcolor{maincol}{\csname fa#1\endcsname}}
}
% icon with text shortcut
\newcommand{\icontext}[4]{
\vcenteredhbox{\icon{#1}{#2}{#3}} \hspace{2pt} \parbox{0.9\mpwidth}{\textcolor{#4}{#3}}
}
% icon with website hyperlink
\newcommand{\iconhref}[5]{
\vcenteredhbox{\icon{#1}{#2}{#5}} \hspace{2pt} \href{#4}{\textcolor{#5}{#3}}
}
% icon with external hyperlink
\newcommand{\iconhrefexternal}[5]{
\href{#4}{\textcolor{#5}{#3}} \icon{#1}{#2}{#5}
}
% icon with email hyperlink
\newcommand{\iconemail}[5]{
\vcenteredhbox{\icon{#1}{#2}{#5}} \hspace{2pt} \href{mailto:#4}{\textcolor{#5}{#3}}
}
%-------------------------------------------------------------------
% PAGE LAYOUT DEFINITIONS
%-------------------------------------------------------------------
% \usepackage{showframe} % debug-only
\usepackage{paracol}
\usepackage[a4paper]{geometry}
\geometry{top=1cm, bottom=1cm, left=1cm, right=1cm}
\usepackage{fancyhdr}
\pagestyle{empty}
\setlength{\parindent}{0mm}
%-------------------------------------------------------------------
% TABLE / ARRAY DEFINITIONS
%-------------------------------------------------------------------
\usepackage{array}
\newcolumntype{x}[1]{%
>{\raggedleft\hspace{0pt}}p{#1}}%
%-------------------------------------------------------------------
% GRAPHICS DEFINITIONS
%-------------------------------------------------------------------
\usepackage{graphicx}
\usepackage{tikz}
\usetikzlibrary{shapes, backgrounds,mindmap, trees}
%-------------------------------------------------------------------
% Color DEFINITIONS
%-------------------------------------------------------------------
\usepackage{transparent}
\usepackage{color}
\definecolor{maincol}{RGB}{ 54, 187, 236 } % primary color
\definecolor{darkcol}{RGB}{ 70, 70, 70 } % dark color
\definecolor{lightcol}{RGB}{ 245, 245, 245 } % light color
\usepackage[hidelinks]{hyperref}
\newcommand{\mpwidth}{\linewidth-\fboxsep-\fboxsep}