|
1 | | -% ----------------------------------------------------------------------------- |
2 | | -% Formatting.sty - Custom Formatting and Commands for a Modular Resume |
3 | | -% ----------------------------------------------------------------------------- |
4 | | -% Purpose: |
5 | | -% This file provides styling and commands for creating a professional resume. |
6 | | -% It is designed to be modular, allowing easy maintenance and reuse. |
7 | | -% ----------------------------------------------------------------------------- |
| 1 | +\RequirePackage[T1]{fontenc} |
| 2 | +\RequirePackage[utf8]{inputenc} |
| 3 | +\RequirePackage{enumitem} |
| 4 | +\RequirePackage[hidelinks]{hyperref} |
| 5 | +\RequirePackage{hyperxmp} |
| 6 | +\RequirePackage{titlesec} |
| 7 | +\RequirePackage{XCharter} |
| 8 | +\RequirePackage{xstring} |
| 9 | +\RequirePackage{geometry} |
| 10 | +\RequirePackage{fancyhdr} |
| 11 | +\RequirePackage{etoolbox} |
| 12 | +\RequirePackage{microtype} |
| 13 | +\RequirePackage{datetime2} |
| 14 | +\RequirePackage{embedfile} |
8 | 15 |
|
9 | | -% ----------------------------------------------------------------------------- |
10 | | -% Required Packages |
11 | | -% ----------------------------------------------------------------------------- |
12 | | -\RequirePackage[T1]{fontenc} % T1 font encoding for proper hyphenation |
13 | | -\RequirePackage[utf8]{inputenc} % UTF-8 input encoding |
14 | | -\RequirePackage{enumitem} % Customization of list environments |
15 | | -\RequirePackage[hidelinks]{hyperref} % Hyperlinks without visible borders |
16 | | -\RequirePackage{titlesec} % Custom section titles formatting |
17 | | -\RequirePackage{XCharter} % Professional font family (XCharter) |
18 | | -\RequirePackage{xstring} % String manipulation (e.g., URL processing) |
19 | | -\RequirePackage{geometry} % Page layout and margins |
20 | | -\RequirePackage{fancyhdr} % Custom headers and footers |
21 | | -\RequirePackage{etoolbox} % Enhanced conditional and command tools |
| 16 | +\geometry{a4paper, margin=0.5in} |
22 | 17 |
|
23 | | -% ----------------------------------------------------------------------------- |
24 | | -% Page Layout and Margins |
25 | | -% ----------------------------------------------------------------------------- |
26 | | -\geometry{a4paper, margin=0.5in} % A4 paper with 0.5in margins |
| 18 | +\raggedright |
| 19 | +\pagestyle{empty} |
| 20 | +\input{glyphtounicode} |
| 21 | +\pdfgentounicode=1 |
27 | 22 |
|
28 | | -% ----------------------------------------------------------------------------- |
29 | | -% Global Text and Page Settings |
30 | | -% ----------------------------------------------------------------------------- |
31 | | -\raggedright % Left-align text |
32 | | -\pagestyle{empty} % Disable page numbering |
33 | | -\input{glyphtounicode} % Enable machine-readable PDF output |
34 | | -\pdfgentounicode=1 % Unicode output |
| 23 | +% PDF/UA - mark document as tagged for accessibility |
| 24 | +\pdfminorversion=7 |
| 25 | +\pdfobjcompresslevel=0 |
35 | 26 |
|
36 | | -% ----------------------------------------------------------------------------- |
37 | | -% Section Title Formatting |
38 | | -% ----------------------------------------------------------------------------- |
39 | | -\titleformat{\section} % Custom section title format |
40 | | - {\bfseries\large}{}{}{}[\vspace{1pt}\titlerule\vspace{-6.5pt}] % Bold, large section titles with a horizontal line |
| 27 | +\titleformat{\section} |
| 28 | + {\bfseries\large}{}{}{}[\vspace{1pt}\titlerule\vspace{-6.5pt}] |
41 | 29 |
|
42 | | -% ----------------------------------------------------------------------------- |
43 | | -% List Formatting |
44 | | -% ----------------------------------------------------------------------------- |
45 | | -\renewcommand\labelitemi{$\vcenter{\hbox{\small$\bullet$}}$} % Custom bullet for itemized lists |
46 | | -\setlist[itemize]{ % Customization for itemized lists |
47 | | - itemsep=-2pt, % Space between items |
48 | | - leftmargin=12pt, % Indentation |
49 | | - topsep=7pt % Space above list |
| 30 | +\renewcommand\labelitemi{$\vcenter{\hbox{\small$\bullet$}}$} |
| 31 | +\setlist[itemize]{ |
| 32 | + itemsep=-2pt, |
| 33 | + leftmargin=12pt, |
| 34 | + topsep=7pt |
50 | 35 | } |
51 | 36 |
|
52 | | -% ----------------------------------------------------------------------------- |
53 | | -% Spacing Adjustments |
54 | | -% ----------------------------------------------------------------------------- |
55 | | -\setlength{\parskip}{0pt} % No extra space between paragraphs |
56 | | -\setlength{\parindent}{0pt} % No paragraph indentation |
| 37 | +\setlength{\parskip}{0pt} |
| 38 | +\setlength{\parindent}{0pt} |
57 | 39 |
|
58 | | -% ----------------------------------------------------------------------------- |
59 | | -% Custom Commands |
60 | | -% ----------------------------------------------------------------------------- |
61 | | - |
62 | | -% Command: Technologies used in a project |
63 | | -% Usage: \technologies{Tech1, Tech2} |
64 | 40 | \newcommand{\technologies}[1]{\textit{Technologies: #1}} |
65 | 41 |
|
66 | | -% Command: Shortened and Clickable URLs |
67 | | -% Usage: \shorturl{https://example.com} |
68 | 42 | \newcommand{\shorturl}[1]{% |
69 | 43 | \StrSubstitute{#1}{https://}{}[\Result]% |
70 | 44 | \StrSubstitute{\Result}{http://}{}[\Result]% |
71 | 45 | \StrSubstitute{\Result}{mailto:}{}[\Result]% |
72 | | - \href{#1}{\Result} % Converts to clickable link with a clean URL display |
| 46 | + \href{#1}{\Result}% |
73 | 47 | } |
74 | 48 |
|
75 | | -% Command: Skills List |
76 | | -% Usage: \skills{Type}{Skills} |
77 | 49 | \newcommand{\skills}[2]{\textbf{#1:} #2} |
78 | 50 |
|
79 | | -% Command: Project Information Block |
80 | | -% Usage: \project{Project Name}{URL}{Technologies}{Details} |
81 | 51 | \newcommand{\project}[4]{% |
82 | 52 | \textbf{#1} \hfill \shorturl{#2} \\ |
83 | 53 | \vspace{-9pt} |
|
87 | 57 | \end{itemize} |
88 | 58 | } |
89 | 59 |
|
90 | | -% Command: Work Experience Block |
91 | | -% Usage: \experience{Role}{Company}{Time Period}{Location}{Responsibilities} |
92 | 60 | \newcommand{\experience}[5]{% |
93 | 61 | \noindent\textbf{#1,} {#2} -- #3 \hfill #4 \\ |
94 | 62 | \vspace{-9pt} |
|
97 | 65 | \end{itemize} |
98 | 66 | } |
99 | 67 |
|
100 | | -% Command: Education Block |
101 | | -% Usage: \education{Degree}{Institution}{URL}{Graduation Date} |
102 | 68 | \newcommand{\education}[4]{% |
103 | 69 | \textbf{#1} -- \href{#3}{#2} \hfill #4 |
104 | 70 | } |
105 | | - |
106 | | -% ----------------------------------------------------------------------------- |
107 | | -% Documentation for Users |
108 | | -% ----------------------------------------------------------------------------- |
109 | | -% This package provides the following commands: |
110 | | -% - \skills: Creates a list of skills with type and list of skills. |
111 | | -% - \technologies: Displays technologies used in a project. |
112 | | -% - \shorturl: Creates a clickable URL with the protocol stripped out. |
113 | | -% - \project: Defines a project with name, URL, technologies, and details. |
114 | | -% - \experience: Adds work experience with role, company, time period, location, and responsibilities. |
115 | | -% - \education: Adds education details with degree, institution, URL, and graduation date. |
116 | | - |
117 | | -% ----------------------------------------------------------------------------- |
118 | | -% Notes: |
119 | | -% - Adjust spacing, margins, and list styles as needed for different templates. |
120 | | -% - Sections should be imported from separate files for better modularity and reuse. |
121 | | -% ----------------------------------------------------------------------------- |
0 commit comments