feat: add user-defined commands for thesis metadata and year extraction

This commit is contained in:
nuluh
2025-05-24 02:37:55 +07:00
parent 6fb3c103c7
commit 3cffc00feb

View File

@@ -16,7 +16,6 @@
\RequirePackage{geometry} \RequirePackage{geometry}
\RequirePackage{setspace} \RequirePackage{setspace}
\RequirePackage{graphicx} \RequirePackage{graphicx}
\RequirePackage{hyperref}
\RequirePackage{etoolbox} \RequirePackage{etoolbox}
\RequirePackage{tocloft} \RequirePackage{tocloft}
\RequirePackage{tocbibind} \RequirePackage{tocbibind}
@@ -24,6 +23,7 @@
\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{hyperref}
% Polyglossia set language % Polyglossia set language
+ \setdefaultlanguage[variant=indonesian]{malay} % Proper Indonesian language setup + \setdefaultlanguage[variant=indonesian]{malay} % Proper Indonesian language setup
@@ -164,15 +164,42 @@
\renewcommand{\cftafterlottitle}{\hfill} \renewcommand{\cftafterlottitle}{\hfill}
% \renewcommand{\cfttoctitlefont}{\bfseries\MakeUppercase} % \renewcommand{\cfttoctitlefont}{\bfseries\MakeUppercase}
% \renewcommand{\cftaftertoctitle}{\vskip 2em} % \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 % Declare internal macros as initially empty
% % \let\oldchapter\chapter \newcommand{\@authorid}{}
% % \renewcommand{\chapter}{% \newcommand{\@firstadvisor}{}
% % \cleardoublepage \newcommand{\@secondadvisor}{}
% % \pagestyle{fancyplainchapter}% \newcommand{\@headdepartement}{}
% % \oldchapter \newcommand{\@headdepartementid}{}
% % \thispagestyle{fancyplainchapter} % ensure chapter start page uses it \newcommand{\@faculty}{}
% % \pagestyle{fancyplain}% switch for subsequent pages \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 \endinput