Compare commits

...

25 Commits

Author SHA1 Message Date
nuluh
1533a6ce46 fix(latex): add TOC entries for approval and originality sections 2025-05-14 17:59:36 +07:00
nuluh
471eccb12c fix(latex): remove new macro \frontmattersection to manually add \addcontentsline into each frontmatter to make hyperlink ToC jumpt into correct page.
Closes #65
2025-05-14 17:58:06 +07:00
nuluh
74ea4d412c fix(latex): update TOC title to use the correct language dynamically 2025-05-14 17:37:17 +07:00
nuluh
9d526971d9 feat(latex): add polyglossia package and set main language to Bahasa Indonesia 2025-05-14 17:34:56 +07:00
nuluh
49adb273d8 fix(latex): fix equation numbering to include chapter prefix in arabic
Closes #62
2025-05-14 12:21:21 +07:00
nuluh
ee004e55f4 fix(latex): add figure and table numbering prefixes to TOC 2025-05-13 02:02:41 +07:00
nuluh
f97c58e114 feat(latex): add styling for List of Figures and List of Tables titles 2025-05-13 01:42:16 +07:00
nuluh
190cd0904e fix(latex): fix merge conflicts 2025-05-12 00:45:30 +07:00
nuluh
6105da57f0 Merge branch 'latex/57-feat-add-dynamic-page-style-for-chapter-page' into latex/initial-template 2025-05-12 00:36:34 +07:00
nuluh
63da3b6308 fix(latex): remove titlepage environment from frontmattersection macro to make the \frontmatter and \mainmatter pagination number type change properly
Closes #57
2025-05-12 00:31:24 +07:00
nuluh
5634776d26 fix(latex): fix wrong endorsement content by moving it into approval sheet 2025-05-12 00:08:40 +07:00
nuluh
e65026f9ca feat(latex): add originality statement content 2025-05-12 00:06:24 +07:00
nuluh
eb1d2a87b4 refactor(latex): move figure numbering declaration 2025-05-11 23:05:13 +07:00
nuluh
1f275fad42 feat(latex): add figure and table numbering to include chapter numbern arabic despite the chapter number using roman and dummy figures to test 2025-05-11 22:57:26 +07:00
nuluh
07ed6a9a13 fix(latex): reorder document structure by moving \frontmatter and \mainmatter for proper page numbering 2025-05-11 22:54:02 +07:00
nuluh
1b20376700 Merge branch 'latex/initial-template' into latex/57-feat-add-dynamic-page-style-for-chapter-page 2025-05-11 22:15:40 +07:00
nuluh
104b72e624 fix(latex): remove second \hfill in the \cftaftertoctitle to fix the \contentsname with book document class 2025-05-11 22:15:05 +07:00
nuluh
e9568583e4 fix(latex): change document class from report to book for having access to \frontmatter, \mainmatter, and \backmatter 2025-05-11 22:13:46 +07:00
nuluh
ae201d61fa Merge branch 'latex/initial-template' into latex/57-feat-add-dynamic-page-style-for-chapter-page 2025-05-11 21:56:14 +07:00
nuluh
921dc9245c fix(latex): add draft watermark functionality with conditional loading 2025-05-11 19:32:13 +07:00
nuluh
bf3c43639d fix(latex): update page layout margins to 3cm for all sides 2025-05-11 18:26:46 +07:00
nuluh
f38d44df1d fix(latex): add dummy introductory chapter and sections for doing unittest of new implemented page number and chapter numbering 2025-05-11 13:00:53 +07:00
nuluh
5c70d7db51 fix(latex): ensure fancyplain page style preset is applied before content inclusion so it use top right number for non-first-page chapter 2025-05-11 12:54:55 +07:00
nuluh
702760cc5e fix(latex): assign fancyhdr preset page style to frontmatter section macro 2025-05-11 12:52:52 +07:00
nuluh
43a0f40182 fix(latex): creating header and footer styles preset 2025-05-11 12:51:23 +07:00
7 changed files with 230 additions and 95 deletions

View File

@@ -0,0 +1,25 @@
\chapter{PENDAHULUAN}
\section{Latar Belakang}
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nunc consequat lectus dolor, a commodo odio suscipit nec. Aliquam posuere elit eget tellus dapibus, auctor ornare mi porttitor. Donec auctor aliquet nisl, quis convallis ligula rutrum id. Duis tortor ipsum, scelerisque vestibulum viverra eu, maximus vel mi. Nullam volutpat nunc et varius tempor. Vivamus convallis mi eros, aliquam semper dui tincidunt a. Morbi nunc dui, accumsan ac arcu nec, condimentum efficitur mauris. Etiam sed mauris semper, volutpat justo eu, placerat mauris. Suspendisse at erat eu arcu gravida mattis et id nunc. Aliquam malesuada magna odio, ac dictum erat vestibulum a. Mauris vel nisi sit amet elit tempor bibendum sit amet a velit. Morbi dignissim facilisis placerat.\par
\begin{figure}
\centering
\includegraphics[width=0.5\linewidth]{frontmatter/img/slice1.jpg}
\caption{Enter Caption}
\label{fig:enter-label}
\end{figure}
Pellentesque vel accumsan lorem, id vulputate metus. Nulla mollis orci ante, et euismod erat venenatis eget. Proin tempus lobortis feugiat. Fusce vitae sem quis lacus iaculis dignissim ut eget turpis. Vivamus ut nisl in enim porttitor fringilla vel et mauris. Mauris quis porttitor magna. Pellentesque molestie viverra arcu at tincidunt. Maecenas non elit arcu.\par
Etiam feugiat enim sit amet tortor interdum lobortis. Curabitur elementum faucibus sapien. Morbi eget facilisis lorem. In sed suscipit metus. Etiam porttitor, libero sit amet sodales hendrerit, libero dolor hendrerit nulla, sed convallis risus leo posuere metus. Cras gravida ac elit viverra ultrices. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia curae; Maecenas dictum urna elit, nec eleifend nulla mattis sit amet. Pellentesque suscipit metus vitae leo suscipit, a vehicula quam pretium. Sed eu est ut risus convallis hendrerit a vulputate justo. Nulla sollicitudin quam ut risus euismod, quis consequat dui mattis. Mauris id eros varius, pellentesque quam quis, venenatis tellus. Nulla vitae condimentum nisl. Vestibulum suscipit scelerisque dui, non posuere purus finibus nec. Nulla ultrices felis quis vestibulum porta. Suspendisse potenti.\par
Nam tempus tincidunt interdum. Pellentesque at ligula ac massa semper efficitur vitae non ante. Suspendisse potenti. Cras vitae interdum erat, nec facilisis urna. Nulla commodo porttitor tellus non posuere. Vestibulum tristique ut urna quis porttitor. Sed pellentesque lectus sit amet ultrices aliquam. Aliquam erat volutpat. Nam dictum eu erat a mollis. Donec eget nulla vel risus aliquet suscipit sed at libero.\par
Maecenas hendrerit pharetra bibendum. Donec ut tortor ac augue aliquam ullamcorper nec id eros. Quisque consectetur elementum ipsum vitae posuere. Sed ultricies ipsum nibh, vitae volutpat neque bibendum at. Morbi dictum metus eu bibendum malesuada. Nam scelerisque purus erat, id dictum nisl pretium vitae. Curabitur finibus commodo dui ac molestie. In sed sem ac dui dapibus ullamcorper. Aenean molestie nulla eu lorem maximus hendrerit. Vivamus viverra velit dolor, in vehicula eros facilisis at. Vivamus in rhoncus sem.
\section{Lingkup Penelitian}
\section{Tujuan Penelitian}
\section{Manfaat Penelitian}
% \subsubsection{Dolor}

View File

@@ -0,0 +1,14 @@
\chapter{TINJAUAN PUSTAKA DAN LANDASAN TEORI}
\section{Tinjauan Pustaka}
\begin{figure}[!ht]
\centering
\includegraphics[width=0.5\linewidth]{frontmatter/img/slice1.jpg}
\caption{Enter Caption}
\label{fig:enter-label}
\end{figure}
\section{Dasar Teori}
\subsection{Short-Time Fourier Transform}
\subsection{Machine Learning}
% \subsubsection{Dolor}

View File

@@ -0,0 +1,65 @@
% frontmatter/endorsement.tex
\setmainfont{Times New Roman}
\addcontentsline{toc}{chapter}{LEMBAR PERSETUJUAN TUGAS AKHIR}
\begin{center}
\textbf{\Large LEMBAR PERSETUJUAN TUGAS AKHIR} \\[0.5em]
\textit{APPROVAL SHEET}
\end{center}
\vspace{1em}
\renewcommand{\arraystretch}{1.2}
\begin{tabular}{llp{10cm}}
\textbf{Judul} & : & \thesistitle \\
\textit{Title} & & \\
\textbf{Mahasiswa} & : & \studentname \\
\textit{Student} & & \\
\textbf{Nomor Mahasiswa} & : &\studentid \\
\textit{Student ID.} & & \\
\textbf{Dosen Pembimbing} & : & 1. \firstadvisor \\
\textit{Advisors} & & 2. \secondadvisor
\end{tabular}
\vspace{1em}
\textbf{Telah disetujui oleh Tim Penguji:} \\
\textit{Approved by the Committee on Oral Examination}
\vspace{1em}
\begin{tabular}{lp{5cm}}
\textbf{\firstadvisor} &:
% \vspace{2cm} % signature space
% \\[1em] % pull up next row
\\
\textit{Ketua Tim Penguji} &
\noindent\makebox[5cm]{\hrulefill}\\[-0.5em]
\textit{\small Chair} & \small Yogyakarta, \dotfill 2020
\\
\textbf{\secondadvisor} &:
% \vspace{2cm} % signature space
% \\[1em] % pull up next row
\\
\textit{Ketua Tim Penguji} &
\noindent\makebox[5cm]{\hrulefill}\\[-0.5em]
\textit{\small Chair} & \small Yogyakarta, \dotfill 2020 \\
\end{tabular}
\vspace{1em}
\noindent
\textbf{Diterima dan disetujui sebagai persyaratan untuk memperoleh gelar Sarjana Teknik} \\
\textit{Accepted in partial fulfillment of the requirements for the degree of Bachelor of Engineering}
\vspace{2em}
\begin{center}
\textbf{Ketua Program Studi} \\
\textit{Head of Department}
\end{center}
\vspace{3em}
\begin{center}
\textbf{\headdepartement} \\
NIK. \headdepartementid
\end{center}

View File

@@ -1,64 +1,7 @@
% frontmatter/endorsement.tex
\setmainfont{Times New Roman}
\chapter*{LEMBAR PENGESAHAN TUGAS AKHIR}
\begin{center}
\textbf{\Large LEMBAR PENGESAHAN TUGAS AKHIR} \\[0.5em]
\textit{APPROVAL SHEET}
\end{center}
\vspace{1em}
\renewcommand{\arraystretch}{1.2}
\begin{tabular}{llp{10cm}}
\textbf{Judul} & : & \thesistitle \\
\textit{Title} & & \\
\textbf{Mahasiswa} & : & \studentname \\
\textit{Student} & & \\
\textbf{Nomor Mahasiswa} & : &\studentid \\
\textit{Student ID.} & & \\
\textbf{Dosen Pembimbing} & : & 1. \firstadvisor \\
\textit{Advisors} & & 2. \secondadvisor
\end{tabular}
\vspace{1em}
\textbf{Telah disetujui oleh Tim Penguji:} \\
\textit{Approved by the Committee on Oral Examination}
\vspace{1em}
\begin{tabular}{lp{5cm}}
\textbf{\firstadvisor} &:
% \vspace{2cm} % signature space
% \\[1em] % pull up next row
\\
\textit{Ketua Tim Penguji} &
\noindent\makebox[5cm]{\hrulefill}\\[-0.5em]
\textit{\small Chair} & \small Yogyakarta, \dotfill 2020
\\
\textbf{\secondadvisor} &:
% \vspace{2cm} % signature space
% \\[1em] % pull up next row
\\
\textit{Ketua Tim Penguji} &
\noindent\makebox[5cm]{\hrulefill}\\[-0.5em]
\textit{\small Chair} & \small Yogyakarta, \dotfill 2020 \\
\end{tabular}
\vspace{1em}
\noindent
\textbf{Diterima dan disetujui sebagai persyaratan untuk memperoleh gelar Sarjana Teknik} \\
\textit{Accepted in partial fulfillment of the requirements for the degree of Bachelor of Engineering}
\vspace{2em}
\begin{center}
\textbf{Ketua Program Studi} \\
\textit{Head of Department}
\end{center}
\vspace{3em}
\begin{center}
\textbf{\headdepartement} \\
NIK. \headdepartementid
{\normalsize\textit{ENDORSEMENT SHEET}}
\end{center}

View File

@@ -0,0 +1,40 @@
% frontmatter/originality.tex
\setmainfont{Times New Roman}
\chapter*{PERNYATAAN KEASLIAN}
\addcontentsline{toc}{chapter}{PERNYATAAN KEASLIAN}
% \begin{center}
% {\normalsize\textit{ORIGINALITY STATEMENT}}
% \end{center}
Saya yang bertanda tangan di bawah ini:
\renewcommand{\arraystretch}{1.2}
\begin{center}
\begin{tabular}{llp{10cm}}
\textbf{Nama} & : & \studentname \\
\textbf{Nomor Mahasiswa} & : & \studentid \\
\textbf{Judul} & : & \thesistitle \\
\end{tabular}
\end{center}
Menyatakan dengan sebenarnya bahwa tugas akhir ini merupakan karya says sendiri. Apabila terdapat karya orang lain yang saya kutip, maka saya akan mencantumkan sumber secara jelas. Jika dikemudian hari ditemukan dengan ketidakbenaran dalam pernyataan in, maka saya bersedia menerima sanksi dengan aturan yang berlaku. Demikian pernyataan ini saya buat tanpa ada paksaan dari pihak mana pun.\par
\begin{flushright}
\begin{minipage}{0.5\textwidth}
\centering
Yogyakarta, \today \\[1em]
Yang membuat pernyataan, \\[0.5cm] % space for signature
% Materai box
\hspace*{-2cm}% shift the box slightly left
\begin{tabular}{@{}c@{}}
\fbox{
\begin{minipage}[c][2cm][c]{2.5cm}
\centering
Materai\\
6000
\end{minipage}
}
\end{tabular}
\\[1cm]
% \rule{6cm}{0.4pt} % signature line
Rifqi Damar Panuluh
\end{minipage}
\end{flushright}

View File

@@ -1,4 +1,4 @@
\documentclass{thesis}
\documentclass[draftmark]{thesis}
% Title Information
\setthesisinfo
@@ -18,11 +18,14 @@
\begin{document}
\maketitle
\theendorsementpage{toc}
\originalitystatement{toc}
\frontmatter
\input{frontmatter/approval}\clearpage
\input{frontmatter/originality}\clearpage
\input{frontmatter/acknowledgement}\clearpage
\tableofcontents
\clearpage
\mainmatter
\pagestyle{fancyplain}
% Include content
\include{content/abstract}
\include{content/introduction}

View File

@@ -1,9 +1,15 @@
\NeedsTeXFormat{LaTeX2e}
\ProvidesClass{thesis}[2025/05/10 Bachelor Thesis Class]
\LoadClass[a4paper,12pt]{report}
\newif\if@draftmark
\@draftmarkfalse
\DeclareOption{draftmark}{\@draftmarktrue}
\ProcessOptions \relax
\LoadClass[a4paper,12pt,oneside]{book}
% Load common packages
\RequirePackage{polyglossia}
\RequirePackage{fontspec}
\RequirePackage{titlesec}
\RequirePackage{fancyhdr}
@@ -15,8 +21,22 @@
\RequirePackage{tocloft}
\RequirePackage{tocbibind}
% Polyglossia set language
\setmainlanguage{bahasai}
% \setotherlanguage{english}
% Conditionally load the watermark package and settings
\if@draftmark
\RequirePackage{draftwatermark}
\SetWatermarkText{Draft: \today [wip]}
\SetWatermarkColor[gray]{0.7}
\SetWatermarkFontSize{2cm}
\SetWatermarkAngle{90}
\SetWatermarkHorCenter{1.5cm}
\fi
% Page layout
\geometry{margin=1in}
\geometry{left=3cm, top=3cm, right=3cm, bottom=3cm}
\setlength{\parskip}{0.5em}
\setlength{\parindent}{0pt}
\onehalfspacing
@@ -28,7 +48,7 @@
\setmonofont{Courier New}
% Metadata commands
\input{metadata} % Load metadata from external file
\input{metadata}
\newcommand{\setthesisinfo}[7]{%
\renewcommand{\thesistitle}{#1}%
@@ -40,19 +60,35 @@
\renewcommand{\yearofsubmission}{#7}%
}
% Header and footer
\pagestyle{fancy}
\fancyhf{}
\fancyhead[R]{\nouppercase{\rightmark}}
\fancyhead[L]{\nouppercase{\leftmark}}
\fancyfoot[C]{\thepage}
% % Header and footer
\fancypagestyle{fancy}{%
\fancyhf{}
\fancyhead[R]{\nouppercase{\rightmark}}
\fancyhead[L]{\nouppercase{\leftmark}}
\fancyfoot[C]{\thepage}
}
\fancypagestyle{fancyplainfrontmatter}{%
\renewcommand{\headrulewidth}{0pt}
\fancyfoot[C]{\thepage}
}
\fancypagestyle{fancyplain}{%
\fancyhf{}
\renewcommand{\headrulewidth}{0pt}
\fancyhead[R]{\thepage}
}
% Chapter formatting
\titlespacing{\chapter}{0pt}{0pt}{*1.5}
\titleformat{\chapter}[display]
{\bfseries\Large\centering}
{\normalsize\bfseries\centering}
{BAB~\Roman{chapter}} % << display format
{1ex}
{\MakeUppercase}
\titleformat{\section}
{\normalsize\bfseries}{\thesection}{1em}{}
\titleformat{\subsection}
{\normalsize\bfseries}{\thesubsection}{1em}{}
% Ensure chapter reference in TOC matches
\renewcommand{\cftchappresnum}{BAB~}
@@ -64,7 +100,7 @@
\renewcommand{\maketitle}{\input{frontmatter/maketitle}}
% Chapter & Section format
\renewcommand{\cftchapfont}{\bfseries\MakeUppercase}
\renewcommand{\cftchapfont}{\normalsize\MakeUppercase}
% \renewcommand{\cftsecfont}{}
% \renewcommand{\cftsubsecfont}{\itshape}
% \renewcommand{\thesection}{\textup{\Roman{chapter}}.\arabic{section}}
@@ -74,38 +110,47 @@
\setlength{\cftbeforechapskip}{0em}
\setlength{\cftchapindent}{0pt}
\setlength{\cftsecindent}{0em}
\setlength{\cftsubsecindent}{3em}
\setlength{\cftchapnumwidth}{4em}
\setlength{\cftsecnumwidth}{2.5em}
\setlength{\cftsubsecindent}{2.5em}
\setlength{\cftchapnumwidth}{3.5em}
\setlength{\cftsecnumwidth}{3.5em}
\setlength{\cftsubsecnumwidth}{2.5em}
\setlength{\cftfignumwidth}{5em}
\setlength{\cfttabnumwidth}{4em}
\renewcommand \cftchapdotsep{4.5} % https://tex.stackexchange.com/a/273764
\renewcommand{\cftchapleader}{\normalfont\cftdotfill{\cftsecdotsep}}
\renewcommand{\cftchappagefont}{\normalfont}
\renewcommand{\cftfigpresnum}{\figurename~}
\renewcommand{\cfttabpresnum}{\tablename~}
% Ensure TOC and References Respect Custom Numbering
\renewcommand{\thechapter}{\Roman{chapter}}
\renewcommand\thesection{\arabic{chapter}.\arabic{section}}
% Change figure numbering to include chapter (e.g., Figure 1.1, 1.2...)
\renewcommand{\thefigure}{\arabic{chapter}.\arabic{figure}}
\renewcommand{\thetable}{\arabic{chapter}.\arabic{table}}
\renewcommand{\theequation}{\arabic{chapter}.\arabic{equation}}
% Table of Contents (TOC) Title styling
\renewcommand{\contentsname}{DAFTAR ISI}
\renewcommand{\cfttoctitlefont}{\bfseries\MakeUppercase}
\renewcommand{\cftaftertoctitle}{\hfill\hfill} % https://tex.stackexchange.com/a/255699/394075
% Table of Content (TOC) Title styling
\renewcommand{\cfttoctitlefont}{\hfill\bfseries\MakeUppercase}
\renewcommand{\cftaftertoctitle}{\hfill} % https://tex.stackexchange.com/a/255699/394075
% List of Figures (LOF) Title styling
\renewcommand{\cftloftitlefont}{\hfill\bfseries\MakeUppercase}
\renewcommand{\cftafterloftitle}{\hfill}
% List of Tables (LOT) Title styling
\renewcommand{\cftlottitlefont}{\hfill\bfseries\MakeUppercase}
\renewcommand{\cftafterlottitle}{\hfill}
% \renewcommand{\cfttoctitlefont}{\bfseries\MakeUppercase}
% \renewcommand{\cftaftertoctitle}{\vskip 2em}
% Frontmatter Macro (Toggle TOC Inclusion)
\newcommand{\frontmattersection}[3]{%
\begin{titlepage}
\centering
\ifstrequal{#1}{toc}{\addcontentsline{toc}{chapter}{#2}}{\chapter*{#2}}%
\input{frontmatter/#3}
\end{titlepage}
\clearpage
}
% Wrapper Command for Each Page
\newcommand{\theendorsementpage}[1]{\frontmattersection{#1}{Pengesahan}{endorsement}}
\newcommand{\originalitystatement}[1]{\frontmattersection{#1}{Pernyataan Keaslian}{originality}}
% % Apply a custom fancyhdr layout only on the first page of each \chapter, and use no header/footer elsewhere
% % \let\oldchapter\chapter
% % \renewcommand{\chapter}{%
% % \cleardoublepage
% % \pagestyle{fancyplainchapter}%
% % \oldchapter
% % \thispagestyle{fancyplainchapter} % ensure chapter start page uses it
% % \pagestyle{fancyplain}% switch for subsequent pages
% % }
\endinput