-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathformatting.sty
121 lines (106 loc) · 5.65 KB
/
formatting.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
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
% -----------------------------------------------------------------------------
% Formatting.sty - Custom Formatting and Commands for a Modular Resume
% -----------------------------------------------------------------------------
% Purpose:
% This file provides styling and commands for creating a professional resume.
% It is designed to be modular, allowing easy maintenance and reuse.
% -----------------------------------------------------------------------------
% -----------------------------------------------------------------------------
% Required Packages
% -----------------------------------------------------------------------------
\RequirePackage[T1]{fontenc} % T1 font encoding for proper hyphenation
\RequirePackage[utf8]{inputenc} % UTF-8 input encoding
\RequirePackage{enumitem} % Customization of list environments
\RequirePackage[hidelinks]{hyperref} % Hyperlinks without visible borders
\RequirePackage{titlesec} % Custom section titles formatting
\RequirePackage{XCharter} % Professional font family (XCharter)
\RequirePackage{xstring} % String manipulation (e.g., URL processing)
\RequirePackage{geometry} % Page layout and margins
\RequirePackage{fancyhdr} % Custom headers and footers
\RequirePackage{etoolbox} % Enhanced conditional and command tools
% -----------------------------------------------------------------------------
% Page Layout and Margins
% -----------------------------------------------------------------------------
\geometry{a4paper, margin=0.5in} % A4 paper with 0.5in margins
% -----------------------------------------------------------------------------
% Global Text and Page Settings
% -----------------------------------------------------------------------------
\raggedright % Left-align text
\pagestyle{empty} % Disable page numbering
\input{glyphtounicode} % Enable machine-readable PDF output
\pdfgentounicode=1 % Unicode output
% -----------------------------------------------------------------------------
% Section Title Formatting
% -----------------------------------------------------------------------------
\titleformat{\section} % Custom section title format
{\bfseries\large}{}{}{}[\vspace{1pt}\titlerule\vspace{-6.5pt}] % Bold, large section titles with a horizontal line
% -----------------------------------------------------------------------------
% List Formatting
% -----------------------------------------------------------------------------
\renewcommand\labelitemi{$\vcenter{\hbox{\small$\bullet$}}$} % Custom bullet for itemized lists
\setlist[itemize]{ % Customization for itemized lists
itemsep=-2pt, % Space between items
leftmargin=12pt, % Indentation
topsep=7pt % Space above list
}
% -----------------------------------------------------------------------------
% Spacing Adjustments
% -----------------------------------------------------------------------------
\setlength{\parskip}{0pt} % No extra space between paragraphs
\setlength{\parindent}{0pt} % No paragraph indentation
% -----------------------------------------------------------------------------
% Custom Commands
% -----------------------------------------------------------------------------
% Command: Technologies used in a project
% Usage: \technologies{Tech1, Tech2}
\newcommand{\technologies}[1]{\textit{Technologies: #1}}
% Command: Shortened and Clickable URLs
% Usage: \shorturl{https://example.com}
\newcommand{\shorturl}[1]{%
\StrSubstitute{#1}{https://}{}[\Result]%
\StrSubstitute{\Result}{http://}{}[\Result]%
\StrSubstitute{\Result}{mailto:}{}[\Result]%
\href{#1}{\Result} % Converts to clickable link with a clean URL display
}
% Command: Skills List
% Usage: \skills{Type}{Skills}
\newcommand{\skills}[2]{\textbf{#1:} #2}
% Command: Project Information Block
% Usage: \project{Project Name}{URL}{Technologies}{Details}
\newcommand{\project}[4]{%
\textbf{#1} \hfill \shorturl{#2} \\
\vspace{-9pt}
\begin{itemize}
\item \technologies{#3}
#4
\end{itemize}
}
% Command: Work Experience Block
% Usage: \experience{Role}{Company}{Time Period}{Location}{Responsibilities}
\newcommand{\experience}[5]{%
\noindent\textbf{#1,} {#2} -- #3 \hfill #4 \\
\vspace{-9pt}
\begin{itemize}
#5
\end{itemize}
}
% Command: Education Block
% Usage: \education{Degree}{Institution}{URL}{Graduation Date}
\newcommand{\education}[4]{%
\textbf{#1} -- \href{#3}{#2} \hfill #4
}
% -----------------------------------------------------------------------------
% Documentation for Users
% -----------------------------------------------------------------------------
% This package provides the following commands:
% - \skills: Creates a list of skills with type and list of skills.
% - \technologies: Displays technologies used in a project.
% - \shorturl: Creates a clickable URL with the protocol stripped out.
% - \project: Defines a project with name, URL, technologies, and details.
% - \experience: Adds work experience with role, company, time period, location, and responsibilities.
% - \education: Adds education details with degree, institution, URL, and graduation date.
% -----------------------------------------------------------------------------
% Notes:
% - Adjust spacing, margins, and list styles as needed for different templates.
% - Sections should be imported from separate files for better modularity and reuse.
% -----------------------------------------------------------------------------