-
Notifications
You must be signed in to change notification settings - Fork 2
/
Thesis-TE-ITS.cls
131 lines (113 loc) · 3.97 KB
/
Thesis-TE-ITS.cls
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
122
123
124
125
126
127
128
129
130
131
\NeedsTeXFormat{LaTeX2e}
\ProvidesClass{Thesis-TE-ITS}[ITS TE Thesis book document class]
\LoadClass[
a4paper, % kertas a4
12pt, % ukuran font standar 12pt
twoside, % bolak-balik
bahasa % bahasa indonesia
]{report}
\usepackage{graphicx} % support gambar
\usepackage{amsmath} % support rumus
\usepackage{algpseudocode} % support pseudocode
\usepackage[bahasa]{babel} % support bahasa indonesia
\usepackage{titlesec} % style section dan chapter
\usepackage{fontspec} % support custom font
\usepackage{indentfirst} % indentasi paragraf pertama
\usepackage{multirow} % support multirow pada tabel
\usepackage{longtable} % support multi-page pada tabel
\usepackage{caption} % support styling caption
\usepackage{booktabs} % support styling border tabel
\usepackage{etoolbox}
\usepackage{float}
\usepackage[bookmarksnumbered,pdfborder={0 0 0}]{hyperref} % clickable pdf tanpa style
\usepackage{setspace}
\usepackage[
top=35mm, % tepi atas 3,5 cm
left=40mm, % tepi kiri 4,0 cm
right=30mm, % tepi kanan 4,0 cm
bottom=30mm % tepi bawah 3,0 cm
]{geometry}
\setmainfont{Times New Roman} % font times new roman
\setlength{\parindent}{1.5cm} % indentasi 1.5 cm
%\renewcommand{\baselinestretch}{1.5} % basis jarak antar baris
\renewcommand{\arraystretch}{1} % tinggi row tabel
\captionsetup{
format=hang, % caption yang melebih satu baris jatuh tepat dibawah text
singlelinecheck=false, % mencegah caption 1 baris menghiraukan settingan
justification=raggedright, % caption rata kiri
labelsep=space, % capton tanpa colon(:)
aboveskip=6pt, % margin vertical caption
}
% daftar isi, gambar, tabel.
\usepackage{titlesec}
\usepackage{titletoc}
%\dottedcontents{chapter}[-12pt]{\vspace{6pt}BAB \hspace{10pt}}{10pt}{3pt}
\dottedcontents{chapter}[0pt]{\vspace{12pt}}{12pt}{3pt}
\dottedcontents{section}[24pt]{\vspace{6pt}}{24pt}{3pt}
\dottedcontents{subsection}[42pt]{\vspace{6pt}}{36pt}{3pt}
\renewcommand{\figurename}{Gambar}
\dottedcontents{figure}[0pt]{Gambar \hspace{24pt}}{24pt}{3pt}
\renewcommand{\tablename}{Tabel}
\dottedcontents{table}[0pt]{Tabel \hspace{24pt}}{24pt}{3pt}
% mencegah hyphen yang tidak perlu
\tolerance=1
\emergencystretch=\maxdimen
\hyphenpenalty=10000
\hbadness=10000
% halaman sengaja dikosongkan
% "Fachri made this, I have no idea how this works" -- Aiei
\def\kosong{
\vspace*{\fill}
\begin{center}\textit{Halaman ini sengaja dikosongkan}\end{center}
\vfill
}
\patchcmd{\cleardoublepage}{\hbox{}}{\kosong}{}{}
\titleformat % format BAB
{\chapter}
[display]
{\bfseries\large} % huruf besar
{BAB \centering\thechapter} % \chapter = bab, rata tengah
{0ex}
{\vspace{0ex}\centering}
[\vspace{0ex}]
\titlespacing*
{\chapter}
{0pt}
{-4ex}
{4ex}
\titleformat{\section}{\bfseries}{\MakeUppercase{\thesection}}{1ex}{}
\titlespacing{\section}{0pt}{3ex}{0pt}
\titleformat{\subsection}{\bfseries}{\MakeUppercase{\thesubsection}}{1ex}{}
\titlespacing{\subsection}{0pt}{3ex}{0pt}
\titleformat{\subsubsection}{}{\MakeUppercase{\thesubsubsection}}{1ex}{}
\titlespacing{\subsubsection}{0pt}{3ex}{0pt}
\setcounter{tocdepth}{2}
\setcounter{secnumdepth}{2}
\raggedbottom % mencegah jarak yang tidak konsisten antar paragraf
\newcommand{\bab}[1]{
\chapter{#1}
}
% syntax bantuan untuk memasukkan gambar.
% \gambar{LOKASI_GAMBAR}{TEXT_CAPTION}{LABEL_REFERENSI}{UKURAN}
\newcommand{\gambar}[4]{
\begin{figure}[H]
\centering
\includegraphics[width=#4\textwidth]{gambar/#1}
\caption{#2}
\label{#3}
\end{figure}
}
% syntax bantuan untuk memasukkan rumus
% \rumus{RUMUS}{LABEL_REFERENSI}
\newcommand{\rumus}[2]{
\begin{equation}
#1
\label{#2}
\end{equation}
}
\newcommand{\heading}[1]{
\begin{center}
\large\textbf{#1}
\end{center}
\vspace{1ex}
}