Compare commits

..

17 Commits

Author SHA1 Message Date
nuluh
f5dada1b9c fix(latex): fix image path for flowchart in methodology section 2025-06-04 15:59:13 +07:00
nuluh
37c9a0765a fix(documentclass): remove language option from biblatex package 2025-06-04 15:53:57 +07:00
nuluh
8656289a1c chore(documentclass): comment out table of contents for temporary removal 2025-06-04 15:53:35 +07:00
nuluh
15fe8339ec feat(documentclass): add new glossary for notation 2025-06-04 15:31:00 +07:00
nuluh
44210ef372 chore(latex): comment out maketitle inputs for temporary 2025-06-04 11:27:56 +07:00
nuluh
9192d4c81c chore(documentclass): remove commented-out code for chapter formatting and header layout 2025-06-03 21:37:32 +07:00
nuluh
0373743ca7 fix(documentclass): enhance dot separation in ToC and add prefixes for figures and tables 2025-06-03 21:34:05 +07:00
nuluh
49d6395e6f fix(documentclass): add missing \RequirePackage{titling} for maketitle formatting 2025-06-03 21:16:34 +07:00
nuluh
bf9cca2d90 feat(documentclass): redefine metadata information to main.tex by consdolidate internal command inside thesis.cls and remove metadata.tex
Closes #96
2025-06-03 21:13:28 +07:00
nuluh
08420296e6 fix(documentclass): add missing \makeatother command to properly close the @ symbol 2025-06-03 20:59:11 +07:00
nuluh
1540213eec feat(documentclass): add commands for bilingual terms and acronyms with custom glossary entries 2025-06-03 20:58:18 +07:00
nuluh
6fd4b7465e feat(documentclass): add new glossary style 'supercol' for enhanced acronym formatting
Closes #85
2025-06-03 20:55:26 +07:00
nuluh
85a0aebf36 feat(documentclass): add custom glossary style 'altlong3customheader' for notation with three-column layout
Closes #95
2025-06-03 20:54:45 +07:00
nuluh
8d1edfdbf7 feat(glossaries): add glossary support with custom style for main glossaries entry and location header
Closes 84
2025-06-03 20:52:54 +07:00
nuluh
ff862d9467 fix(documentclass): adjust page layout by increasing left margin to 4cm 2025-06-03 20:39:03 +07:00
nuluh
dfb64db1d8 feat(documentclass): add draft watermark and optional line numbering with 'draftmark' option 2025-06-03 20:37:29 +07:00
Rifqi D. Panuluh
3e3de577ba Merge pull request #94 from nuluh/latex/91-bug-expose-maketitle
Maketitle Replaced with \input for Flexibility when integrated with latexdiff-latexpand Workflow
2025-06-03 20:16:30 +07:00
4 changed files with 210 additions and 43 deletions

View File

@@ -3,7 +3,7 @@ Alur keseluruhan penelitian ini dilakukan melalui tahapan-tahapan sebagai beriku
\begin{figure}[H] \begin{figure}[H]
\centering \centering
\includegraphics[width=0.3\linewidth]{chapters/id/flow.png} \includegraphics[width=0.3\linewidth]{chapters/img/flow.png}
\caption{Diagram alir tahapan penelitian} \caption{Diagram alir tahapan penelitian}
\label{fig:flowchart} \label{fig:flowchart}
\end{figure} \end{figure}

View File

@@ -1,14 +1,18 @@
\documentclass[draftmark]{thesis} \documentclass[draftmark]{thesis}
% Title Information % Metadata
\setthesisinfo \title{Prediksi Lokasi Kerusakan dengan Machine Learning}
{Prediksi Lokasi Kerusakan dengan Machine Learning} \author{Rifqi Damar Panuluh}
{Rifqi Damar Panuluh} \date{\today}
{20210110224} \authorid{20210110224}
{PROGRAM STUDI TEKNIK SIPIL} \firstadvisor{Ir. Muhammad Ibnu Syamsi, Ph.D.}
{FAKULTAS TEKNIK} \secondadvisor{}
{UNIVERSITAS MUHAMMADIYAH YOGYAKARTA} \headdepartement{Puji Harsanto, S.T., M.T., Ph.D.}
{2025} \headdepartementid{19740607201404123064}
\faculty{Fakultas Teknik}
\program{Program Studi Teknik Sipil}
\university{Universitas Muhammadiyah Yogyakarta}
\yearofsubmission{2025}
% Input preamble % Input preamble
\input{preamble/packages} \input{preamble/packages}
@@ -16,13 +20,13 @@
\input{preamble/macros} \input{preamble/macros}
\begin{document} \begin{document}
\input{frontmatter/maketitle} % \input{frontmatter/maketitle}
\input{frontmatter/maketitle_secondary} % \input{frontmatter/maketitle_secondary}
\frontmatter \frontmatter
% \input{frontmatter/approval}\clearpage % \input{frontmatter/approval}\clearpage
% \input{frontmatter/originality}\clearpage % \input{frontmatter/originality}\clearpage
% \input{frontmatter/acknowledgement}\clearpage % \input{frontmatter/acknowledgement}\clearpage
\tableofcontents % \tableofcontents
\clearpage \clearpage
\mainmatter \mainmatter
\pagestyle{fancyplain} \pagestyle{fancyplain}

View File

@@ -1,11 +0,0 @@
\newcommand{\studentname}{Rifqi Damar Panuluh}
\newcommand{\studentid}{20210110224}
\newcommand{\thesistitle}{Prediksi Lokasi Kerusakan dengan Machine Learning}
\newcommand{\firstadvisor}{Ir. Muhammad Ibnu Syamsi, Ph.D.}
\newcommand{\secondadvisor}{}
\newcommand{\headdepartement}{Puji Harsanto, S.T. M.T., Ph.D.}
\newcommand{\headdepartementid}{19740607201404123064}
\newcommand{\faculty}{Fakultas Teknik}
\newcommand{\program}{Teknik Sipil}
\newcommand{\university}{Universitas Muhammadiyah Yogyakarta}
\newcommand{\yearofsubmission}{2025}

View File

@@ -1,7 +1,7 @@
\NeedsTeXFormat{LaTeX2e} \NeedsTeXFormat{LaTeX2e}
\ProvidesClass{thesis}[2025/05/10 Bachelor Thesis Class] \ProvidesClass{thesis}[2025/05/10 Bachelor Thesis Class]
\newif\if@draftmark \newif\if@draftmark \@draftmarkfalse
\@draftmarkfalse \@draftmarkfalse
\DeclareOption{draftmark}{\@draftmarktrue} \DeclareOption{draftmark}{\@draftmarktrue}
@@ -12,6 +12,7 @@
\RequirePackage{polyglossia} \RequirePackage{polyglossia}
\RequirePackage{fontspec} \RequirePackage{fontspec}
\RequirePackage{titlesec} \RequirePackage{titlesec}
\RequirePackage{titling}
\RequirePackage{fancyhdr} \RequirePackage{fancyhdr}
\RequirePackage{geometry} \RequirePackage{geometry}
\RequirePackage{setspace} \RequirePackage{setspace}
@@ -24,7 +25,8 @@
\RequirePackage{svg} % Allows including SVG images directly \RequirePackage{svg} % Allows including SVG images directly
\RequirePackage{indentfirst} % Makes first paragraph after headings indented \RequirePackage{indentfirst} % Makes first paragraph after headings indented
\RequirePackage{float} % Provides [H] option to force figure/table placement \RequirePackage{float} % Provides [H] option to force figure/table placement
\RequirePackage[style=apa, backend=biber, language=indonesian]{biblatex} \RequirePackage[style=apa, backend=biber]{biblatex}
\RequirePackage[acronym, nogroupskip, toc]{glossaries}
% Polyglossia set language % Polyglossia set language
\setdefaultlanguage[variant=indonesian]{malay} % Proper Indonesian language setup \setdefaultlanguage[variant=indonesian]{malay} % Proper Indonesian language setup
\setotherlanguage{english} % Enables English as secondary language \setotherlanguage{english} % Enables English as secondary language
@@ -36,17 +38,18 @@
% Conditionally load the watermark package and settings % Conditionally load the watermark package and settings
\if@draftmark \if@draftmark
\RequirePackage{draftwatermark} \RequirePackage{draftwatermark}
\SetWatermarkText{nuluh/thesis (wip) draft: \today} \SetWatermarkText{nuluh/thesis (wip) [draft: \today]}
\SetWatermarkColor[gray]{0.8} % Opacity: 0.8 = 20% transparent \SetWatermarkColor[gray]{0.8} % Opacity: 0.8 = 20% transparent
\SetWatermarkFontSize{1.5cm} \SetWatermarkFontSize{1.5cm}
\SetWatermarkAngle{90} \SetWatermarkAngle{90}
\SetWatermarkHorCenter{1.5cm} \SetWatermarkHorCenter{1.5cm}
\RequirePackage[left]{lineno}
\linenumbers
\fi \fi
% Page layout % Page layout
\geometry{left=3cm, top=3cm, right=3cm, bottom=3cm} \geometry{left=4cm, top=3cm, right=3cm, bottom=3cm}
\setlength{\parskip}{0.5em} \setlength{\parskip}{0.5em}
\setlength{\parindent}{0pt}
\onehalfspacing \onehalfspacing
% Fonts % Fonts
@@ -55,17 +58,45 @@
\setsansfont{Arial} \setsansfont{Arial}
\setmonofont{Courier New} \setmonofont{Courier New}
\makeatletter
\newcommand{\setthesisinfo}[7]{% % Extracting the Year from \today
\renewcommand{\thesistitle}{#1}% \newcommand{\theyear}{%
\renewcommand{\studentname}{#2}% \expandafter\@car\expandafter\@gobble\the\year\@nil
\renewcommand{\studentid}{#3}%
\renewcommand{\program}{#4}%
\renewcommand{\faculty}{#5}%
\renewcommand{\university}{#6}%
\renewcommand{\yearofsubmission}{#7}%
} }
% Declare internal macros as initially empty
\newcommand{\@authorid}{}
\newcommand{\@firstadvisor}{}
\newcommand{\@secondadvisor}{}
\newcommand{\@headdepartement}{}
\newcommand{\@headdepartementid}{}
\newcommand{\@faculty}{}
\newcommand{\@program}{}
\newcommand{\@university}{}
\newcommand{\@yearofsubmission}{}
% Define user commands to set these values.
\newcommand{\authorid}[1]{\gdef\@authorid{#1}}
\newcommand{\firstadvisor}[1]{\gdef\@firstadvisor{#1}}
\newcommand{\secondadvisor}[1]{\gdef\@secondadvisor{#1}}
\newcommand{\headdepartement}[1]{\gdef\@headdepartement{#1}}
\newcommand{\headdepartementid}[1]{\gdef\@headdepartementid{#1}}
\newcommand{\faculty}[1]{\gdef\@faculty{#1}}
\newcommand{\program}[1]{\gdef\@program{#1}}
\newcommand{\university}[1]{\gdef\@university{#1}}
\newcommand{\yearofsubmission}[1]{\gdef\@yearofsubmission{#1}}
% Now expose robust the getters to access the values
\newcommand{\theauthorid}{\@authorid}
\newcommand{\thefirstadvisor}{\@firstadvisor}
\newcommand{\thesecondadvisor}{\@secondadvisor}
\newcommand{\theheaddepartement}{\@headdepartement}
\newcommand{\theheaddepartementid}{\@headdepartementid}
\newcommand{\thefaculty}{\@faculty}
\newcommand{\theprogram}{\@program}
\newcommand{\theuniversity}{\@university}
\newcommand{\theyearofsubmission}{\@yearofsubmission}
\makeatother
% % Header and footer % % Header and footer
\fancypagestyle{fancy}{% \fancypagestyle{fancy}{%
\fancyhf{} \fancyhf{}
@@ -107,8 +138,6 @@
\renewcommand{\cftchappresnum}{BAB~} \renewcommand{\cftchappresnum}{BAB~}
\renewcommand{\cftchapaftersnum}{\quad} \renewcommand{\cftchapaftersnum}{\quad}
% \titlespacing*{\chapter}{0pt}{-10pt}{20pt}
% Chapter & Section format % Chapter & Section format
\renewcommand{\cftchapfont}{\normalsize\MakeUppercase} \renewcommand{\cftchapfont}{\normalsize\MakeUppercase}
% \renewcommand{\cftsecfont}{} % \renewcommand{\cftsecfont}{}
@@ -130,11 +159,15 @@
\setlength{\cftsubsecnumwidth}{2.5em} \setlength{\cftsubsecnumwidth}{2.5em}
\setlength{\cftfignumwidth}{5em} \setlength{\cftfignumwidth}{5em}
\setlength{\cfttabnumwidth}{4em} \setlength{\cfttabnumwidth}{4em}
\renewcommand \cftchapdotsep{1} % Denser dots (closer together) https://tex.stackexchange.com/a/273764 \renewcommand \cftchapdotsep{1} % https://tex.stackexchange.com/a/273764
\renewcommand \cftsecdotsep{1} % Apply to sections too \renewcommand \cftsecdotsep{1} % https://tex.stackexchange.com/a/273764
\renewcommand \cftsubsecdotsep{1} % Apply to subsections too \renewcommand \cftsubsecdotsep{1} % https://tex.stackexchange.com/a/273764
\renewcommand \cftfigdotsep{1.5} % https://tex.stackexchange.com/a/273764
\renewcommand \cfttabdotsep{1.5} % https://tex.stackexchange.com/a/273764
\renewcommand{\cftchapleader}{\normalfont\cftdotfill{\cftsecdotsep}} \renewcommand{\cftchapleader}{\normalfont\cftdotfill{\cftsecdotsep}}
\renewcommand{\cftchappagefont}{\normalfont} \renewcommand{\cftchappagefont}{\normalfont}
% Add Prefix in the Lof and LoT entries
\renewcommand{\cftfigpresnum}{\figurename~} \renewcommand{\cftfigpresnum}{\figurename~}
\renewcommand{\cfttabpresnum}{\tablename~} \renewcommand{\cfttabpresnum}{\tablename~}
@@ -159,6 +192,147 @@
% \renewcommand{\cfttoctitlefont}{\bfseries\MakeUppercase} % \renewcommand{\cfttoctitlefont}{\bfseries\MakeUppercase}
% \renewcommand{\cftaftertoctitle}{\vskip 2em} % \renewcommand{\cftaftertoctitle}{\vskip 2em}
% Defines a new glossary called notation
\newglossary[nlg]{notation}{not}{ntn}{Notation}
% Define the header for the location column
\providecommand*{\locationname}{Location}
% Define the new glossary style called 'mylistalt' for main glossaries
\makeatletter
\newglossarystyle{mylistalt}{%
% start the list, initializing glossaries internals
\renewenvironment{theglossary}%
{\glslistinit\begin{enumerate}}%
{\end{enumerate}}%
% suppress all headers/groupskips
\renewcommand*{\glossaryheader}{}%
\renewcommand*{\glsgroupheading}[1]{}%
\renewcommand*{\glsgroupskip}{}%
% main entries: let \item produce "1." etc., then break
\renewcommand*{\glossentry}[2]{%
\item \glstarget{##1}{\glossentryname{##1}}%
\mbox{}\\
\glossentrydesc{##1}\space
[##2] % appears on page x
}%
% sub-entries as separate paragraphs, still aligned
\renewcommand*{\subglossentry}[3]{%
\par
\glssubentryitem{##2}%
\glstarget{##2}{\strut}\space
\glossentrydesc{##2}\space ##3%
}%
}
% Define the new glossary style 'altlong3customheader' for notation
\newglossarystyle{altlong3customheader}{%
% The glossary will be a longtable environment with three columns:
% 1. Symbol (left-aligned)
% 2. Description (paragraph, width \glsdescwidth)
% 3. Location (paragraph, width \glspagelistwidth)
\renewenvironment{theglossary}%
{\begin{longtable}{lp{\glsdescwidth}p{\glspagelistwidth}}}%
{\end{longtable}}%
% Define the table header row
\renewcommand*{\symbolname}{Simbol}
\renewcommand*{\descriptionname}{Keterangan}
\renewcommand*{\locationname}{Halaman}
\renewcommand*{\glossaryheader}{%
\bfseries\symbolname & \bfseries\descriptionname & \bfseries\locationname \tabularnewline\endhead}%
% Suppress group headings (e.g., A, B, C...)
\renewcommand*{\glsgroupheading}[1]{}%
% Define how a main glossary entry is displayed
% ##1 is the entry label
% ##2 is the location list (page numbers)
\renewcommand{\glossentry}[2]{%
\glsentryitem{##1}% Inserts entry number if entrycounter option is used
\glstarget{##1}{\glossentryname{##1}} & % Column 1: Symbol (with hyperlink target)
\glossentrydesc{##1}\glspostdescription & % Column 2: Description (with post-description punctuation)
##2\tabularnewline % Column 3: Location list
}%
% Define how a sub-entry is displayed
% ##1 is the sub-entry level (e.g., 1 for first sub-level)
% ##2 is the entry label
% ##3 is the location list
\renewcommand{\subglossentry}[3]{%
& % Column 1 (Symbol) is left blank for sub-entries to create an indented look
\glssubentryitem{##2}% Inserts sub-entry number if subentrycounter is used
\glstarget{##2}{\strut}\glossentrydesc{##2}\glspostdescription & % Column 2: Description (target on strut for hyperlink)
##3\tabularnewline % Column 3: Location list
}%
% Define the skip between letter groups (if group headings were enabled)
% For 3 columns, we need 2 ampersands for a full blank row if not using \multicolumn
\ifglsnogroupskip
\renewcommand*{\glsgroupskip}{}%
\else
\renewcommand*{\glsgroupskip}{& & \tabularnewline}%
\fi
}
% Define a new style 'supercol' based on 'super' for acronyms glossaries
\newglossarystyle{supercol}{%
\setglossarystyle{super}% inherit everything from the original
% override just the main-entry format:
\renewcommand*{\glossentry}[2]{%
\glsentryitem{##1}%
\glstarget{##1}{\glossentryname{##1}}\space % <-- added colon here
&: \glossentrydesc{##1}\glspostdescription\space ##2\tabularnewline
}%
% likewise for subentries, if you want a colon there too:
\renewcommand*{\subglossentry}[3]{%
&:
\glssubentryitem{##2}%
\glstarget{##2}{\strut}\glossentryname{##2}\space % <-- and here
\glossentrydesc{##2}\glspostdescription\space ##3\tabularnewline
}%
}
\makeatother
% A new command that enables us to enter bi-lingual (Bahasa Indonesia and English) terms
% syntax: \addterm[options]{label}{Bahasa Indonesia}{Bahasa Indonesia first use}{English}{Bahasa Indonesia
% description}
\newcommand{\addterm}[6][]{
\newglossaryentry{#2}{
name={#3 (angl.\ #5)},
first={#4 (\emph{#5})},
text={#3},
sort={#3},
description={#6},
#1 % pass additional options to \newglossaryentry
}
}
% A new command that enables us to enter (English) acronyms with bi-lingual
% (Bahasa Indonesia and English) long versions
% syntax: \addacronym[options]{label}{abbreviation}{Bahasa Indonesia long}{Bahasa Indonesia first
% use long}{English long}{Bahasa Indonesia description}
\newcommand{\addacronym}[7][]{
% Create the main glossary entry with \newacronym
% \newacronym[key-val list]{label}{abbrv}{long}
\newacronym[
name={#4 (angl.\ #6,\ #3)},
first={\emph{#5} (angl.\ \emph{#6},\ \emph{#3})},
sort={#4},
description={#7},
#1 % pass additional options to \newglossaryentry
]
{#2}{#3}{#4}
% Create a cross-reference from the abbreviation to the main glossary entry by
% creating an auxiliary glossary entry (note: we set the label of this entry
% to '<original label>_auxiliary' to avoid clashes)
\newglossaryentry{#2_auxiliary}{
name={#3},
sort={#3},
description={\makefirstuc{#6}},
see=[See:]{#2}
}
}
% Change the text of the cross-reference links to the Bahasa Indonesia long version.
\renewcommand*{\glsseeitemformat}[1]{\emph{\acrlong{#1}}.}
% % Apply a custom fancyhdr layout only on the first page of each \chapter, and use no header/footer elsewhere % % Apply a custom fancyhdr layout only on the first page of each \chapter, and use no header/footer elsewhere
% % \let\oldchapter\chapter % % \let\oldchapter\chapter
% % \renewcommand{\chapter}{% % % \renewcommand{\chapter}{%