diff --git a/latex/thesis.cls b/latex/thesis.cls index 7aeb853..269f513 100644 --- a/latex/thesis.cls +++ b/latex/thesis.cls @@ -16,7 +16,6 @@ \RequirePackage{geometry} \RequirePackage{setspace} \RequirePackage{graphicx} -\RequirePackage{hyperref} \RequirePackage{etoolbox} \RequirePackage{tocloft} \RequirePackage{tocbibind} @@ -24,6 +23,7 @@ \RequirePackage{svg} % Allows including SVG images directly \RequirePackage{indentfirst} % Makes first paragraph after headings indented \RequirePackage{float} % Provides [H] option to force figure/table placement +\RequirePackage{hyperref} % Polyglossia set language + \setdefaultlanguage[variant=indonesian]{malay} % Proper Indonesian language setup @@ -164,15 +164,42 @@ \renewcommand{\cftafterlottitle}{\hfill} % \renewcommand{\cfttoctitlefont}{\bfseries\MakeUppercase} % \renewcommand{\cftaftertoctitle}{\vskip 2em} +\makeatletter +% Extracting the Year from \today +\newcommand{\theyear}{% + \expandafter\@car\expandafter\@gobble\the\year\@nil +} -% % 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 -% % } +% 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} +\makeatother \endinput \ No newline at end of file