summaryrefslogtreecommitdiff
path: root/general.cls
diff options
context:
space:
mode:
authorWarrick Lo <warrick.s.z.lo@gmail.com>2026-02-11 07:16:45 -0800
committerWarrick Lo <warrick.s.z.lo@gmail.com>2026-02-11 07:16:45 -0800
commitf1a9a85c6138715c3933c957c695d0482b901154 (patch)
treef2d6ca37aa60eb35737f31a4a8ab3a202e07f01c /general.cls
Finish lab report up to Task 2B
Signed-off-by: Warrick Lo <warrick.s.z.lo@gmail.com>
Diffstat (limited to 'general.cls')
-rw-r--r--general.cls56
1 files changed, 56 insertions, 0 deletions
diff --git a/general.cls b/general.cls
new file mode 100644
index 0000000..dc67d63
--- /dev/null
+++ b/general.cls
@@ -0,0 +1,56 @@
+\ProvidesClass{general}
+\LoadClass[oneside]{article}
+
+% Page setup.
+\RequirePackage[a4paper, margin=20mm]{geometry}
+\RequirePackage[T1]{fontenc}
+\RequirePackage[english]{babel}
+
+% Formatting.
+\RequirePackage{parskip}
+\RequirePackage[pdfusetitle, bookmarks=false]{hyperref}
+\RequirePackage{changepage}
+\RequirePackage{titlesec}
+
+% Figures.
+\RequirePackage{float}
+\RequirePackage{graphicx}
+\RequirePackage{caption}
+\RequirePackage{subcaption}
+
+% Tables.
+\RequirePackage{booktabs}
+
+% Mathematics and science.
+\RequirePackage{amsmath}
+\RequirePackage[math-style=ISO, bold-style=ISO]{unicode-math}
+\RequirePackage{siunitx}
+
+% Code listings.
+\RequirePackage{listings}
+\RequirePackage{matlab-prettifier}
+
+\setmainfont{Minion3}[
+ Path=fonts/,
+ Extension=.otf,
+ UprightFont=*-Regular,
+ BoldFont=*-Bold,
+ ItalicFont=*-Italic,
+ BoldItalicFont=*-BoldItalic
+]
+
+\setmathfont[math-style=ISO, bold-style=ISO, partial=upright]{STIX Two Math}
+
+\captionsetup{
+ labelfont=bf,
+ labelsep=period,
+ justification=centering
+}
+
+\sisetup{
+ separate-uncertainty=true
+}
+
+\titleformat{\section}{\Large\bfseries}{}{0pt}{}
+
+\renewcommand{\arraystretch}{1.25}