feat(documentclass): redefine metadata information to main.tex by consdolidate internal command inside thesis.cls and remove metadata.tex

Closes #96
This commit is contained in:
nuluh
2025-06-03 21:13:28 +07:00
parent 08420296e6
commit bf9cca2d90
3 changed files with 50 additions and 36 deletions

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}

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

@@ -57,17 +57,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{}
@@ -319,11 +347,4 @@
% % \pagestyle{fancyplain}% switch for subsequent pages % % \pagestyle{fancyplain}% switch for subsequent pages
% % } % % }
\makeatletter
% Extracting the Year from \today
\newcommand{\theyear}{%
\expandafter\@car\expandafter\@gobble\the\year\@nil
}
\makeatother
\endinput \endinput