[FEAT] Notation Custom Styles #95

Open
opened 2025-06-03 13:51:43 +00:00 by nuluh · 0 comments
nuluh commented 2025-06-03 13:51:43 +00:00 (Migrated from github.com)

Problem Statement

Proposed Solution

% 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
}

Alternatives Considered

No response

Component

LaTeX Document

Priority

Critical (blocks progress)

Implementation Ideas

No response

Expected Benefits

Additional Context

No response

### Problem Statement - ### Proposed Solution ```tex % 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 } ``` ### Alternatives Considered _No response_ ### Component LaTeX Document ### Priority Critical (blocks progress) ### Implementation Ideas _No response_ ### Expected Benefits - ### Additional Context _No response_
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: nuluh/thesis#95