From f561998871cba5ecf76b68807263801f3b69014a Mon Sep 17 00:00:00 2001 From: "Rifqi D. Panuluh" <69516665+nuluh@users.noreply.github.com> Date: Fri, 17 Oct 2025 09:12:53 +0000 Subject: [PATCH] feat(documentclass): enhance keywords macro for abstract to support alphabetical sorting --- latex/frontmatter/abstract.tex | 5 +-- latex/thesis.cls | 69 ++++++++++++++++++++++++++++++---- 2 files changed, 63 insertions(+), 11 deletions(-) diff --git a/latex/frontmatter/abstract.tex b/latex/frontmatter/abstract.tex index 0aa038f..1bf5472 100644 --- a/latex/frontmatter/abstract.tex +++ b/latex/frontmatter/abstract.tex @@ -1,9 +1,8 @@ - \chapter{\abstractname} \singlespacing \noindent Monitoring Kesehatan Struktur (SHM) secara tradisional membutuhkan banyak sensor dan model yang kompleks, sehingga tidak praktikal untuk pengaplikasian di lapangan. Studi ini menginvestigasi apakah sinyal yang direkam hanya pada sensor ujung atas dan bawah dari kolom-kolom grup sensor cukup untuk memberikan informasi yang akurat pada klasifikasi lokasi kerusakan. Pengujian dilakukan pada dataset QUGS, sebuhah struktur \textit{grid} baja dengan jumlah \textit{node} 6$\times$5 terpasang sensor akselerometer dan digetarkan pada \textit{white noise shaker}. Sinyal getaran dikonversi menjadi fitur frekuensi-waktu menggunakan STFT dan lima algoritma \textit{machine learning} digunakan untuk klasifikasi. Setiap kolom grup dievaluasi dengan \textit{cross-validation} untuk menguji generalisasi model. Hasil menunjukkan bahwa dengan jumlah sensor yang tereduksi, lima algoritma \textit{machine learning} mencapai akurasi klasifikasi lebih dari 90\%. Studi ini menunjukkan bahwa posisi sensor yang strategis dan ekstraksi fitur berbasis STFT cukup untuk mendeteksi lokasi kerusakan secara efektif dan menjadi alternatif yang simpel untuk pendekatan monitoring kesehatan struktur yang kompleks. -\keywords{\textit{Structural Health Monitoring, Damage Localization, Support Vector Machine, Short-Time Fourier Transform, Principal Component Analysis}} +\keywords{Structural Health Monitoring, Damage Localization, Support Vector Machine, Short-Time Fourier Transform, Principal Component Analysis} \cleardoublepage % \selectlanguage{english} @@ -11,5 +10,5 @@ \chapter{\textit{\abstractname}} \noindent \textit{Structural Health Monitoring (SHM) traditionally requires dense sensor arrays and complex models, which can be impractical for field deployment. This study investigates whether vibration signals captured from only the top and bottom sensors of grouped structural columns retain sufficient information for accurate damage location classification. Experiments are conducted on the QUGS dataset, which represents a 6$\times$5 steel-frame grid structure under controlled laboratory conditions. Vibration signals are converted into time-frequency features using the Short-Time Fourier Transform (STFT), and five classical machine learning algorithms, including Support Vector Machines (SVM), are used for classification. Each vertical column group is evaluated through cross-validation to test generalisation across paths. Results show that even with reduced sensor input, all five algorithms achieve over 90\% classification accuracy. These findings demonstrate that strategic sensor placement and STFT-based features are sufficient to detect structural damage effectively, offering a simple and interpretable alternative to more complex SHM approaches} -\keywords{\textit{Structural Health Monitoring, Damage Localization, Support Vector Machine, Short-Time Fourier Transform, Principal Component Analysis}} +\keywords{Structural Health Monitoring, Damage Localization, Support Vector Machine, Short-Time Fourier Transform, Principal Component Analysis} \end{otherlanguage} \ No newline at end of file diff --git a/latex/thesis.cls b/latex/thesis.cls index 5e94095..085ea19 100644 --- a/latex/thesis.cls +++ b/latex/thesis.cls @@ -416,16 +416,69 @@ % Keywords command for abstract (polyglossia-compatible) % --- Track main language vs. current language --- +% Thanks to https://tex.stackexchange.com/a/333659 +\def\listterminator{;} +\makeatletter +\newcommand\alphabubblesort[1]{\def\presorted{}\def\sortedlist{}% + \sortlist#1,\listterminator,\relax} +\def\sortlist#1#2,#3#4,#5\relax{% + \if\listterminator#3#4\relax% + \expandafter\def\expandafter\sortedlist\expandafter{\sortedlist#1#2}% + \else + \ifnum\the\lccode`#1<\the\lccode`#3\relax% + \expandafter\expandafter\expandafter\def\expandafter\expandafter% + \expandafter\sortedlist\expandafter\expandafter\expandafter{% + \expandafter\sortedlist\presorted#1#2, }% + \expandafter\def\expandafter\svfirst\expandafter{\presorted#3#4}% + \def\presorted{}% + \expandafter\sortlist\svfirst,#5\relax% + \else% + \ifnum`#1=`#3\relax% + \ifx\relax#2\relax% + \expandafter\expandafter\expandafter\def\expandafter\expandafter% + \expandafter\sortedlist\expandafter\expandafter\expandafter{% + \expandafter\sortedlist\presorted#1#2, }% + \expandafter\def\expandafter\svfirst\expandafter{\presorted#3#4}% + \def\presorted{}% + \expandafter\sortlist\svfirst,#5\relax% + \else% + \ifx\relax#4\relax% + \expandafter\expandafter\expandafter\def\expandafter\expandafter% + \expandafter\sortedlist\expandafter\expandafter\expandafter{% + \expandafter\sortedlist\presorted#3#4, }% + \expandafter\def\expandafter\svfirst\expandafter{\presorted#1#2}% + \def\presorted{}% + \expandafter\sortlist\svfirst,#5\relax% + \else + \g@addto@macro\presorted{#1}% + \sortlist#2,#4,#5\relax% + \fi% + \fi% + \else% + \let\tmp\sortedlist% + \def\sortedlist{}% + \expandafter\def\expandafter\svfirst\expandafter{\presorted#3#4}% + \expandafter\def\expandafter\svsecond\expandafter{\presorted#1#2}% + \def\presorted{}% + \expandafter\expandafter\expandafter\expandafter\expandafter% + \expandafter\expandafter\sortlist\expandafter\expandafter% + \expandafter\tmp\expandafter\svfirst\expandafter,\svsecond,#5\relax% + \fi% + \fi% + \fi% +} +\makeatother + \newcommand{\keywords}[1]{% % \vspace{1em}% - \bigskip - \noindent% - \ifnum\strcmp{\languagename}{malay}=0 - Kata Kunci: #1% - \else - \textit{Keywords:} #1% - \fi -} + \bigskip + \noindent% + \ifnum\strcmp{\languagename}{malay}=0 + Kata Kunci: \alphabubblesort{#1}\sortedlist% + \else + \textit{Keywords:} \alphabubblesort{#1}\sortedlist% + \fi + } %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % Change the text of the cross-reference links to the Slovene long version.