Im writing a Dissertation and am having problem compiling my table of symbols. I´m using the example provided from How to make a custom list of symbols with separated greek and roman symbols? and have got the minimal example code to run. However, when I adapt it in my thesis I´m getting an error about defining the function \renewcommand{\glslongextraSubNameFmt}
I have the following code in my preamble:
\usepackage[pdftex,plainpages=false,pdfpagelabels]{hyperref}
\usepackage{siunitx} \sisetup{detect-all}
\usepackage[nopostdot, toc, nogroupskip, nomain, indexonlyfirst, acronym, symbols, style=long4col, stylemods={longbooktabs}]{glossaries-extra}
%\GlsXtrEnablePreLocationTag{page~}{pages~}
\glsaddkey
{unit} % new key
{\relax} % default value if "unit" isn't used in \newglossaryentry
{\glsentryunit} % analogous to \glsentrytext
{\Glsentryunit} % analogous to \Glsentrytext
{\glsunit} % analogous to \glstext
{\Glsunit} % analogous to \Glstext
{\GLSunit} % analogous to \GLStext
\makeglossaries
% Define the parent roman and greek symbols
\newglossaryentry{romanletter}{
name={\textbf{Roman letters}},
description={\nopostdesc},
sort={1},
type=symbols,
}
\newglossaryentry{greekletter}{
name={\textbf{Greek letters}},
description={\nopostdesc},
sort={2},
type=symbols,
}
% Don't expand the unit field
\glssetnoexpandfield{unit}
The glossary style is defined as follows:
% Inform glossary about your own key (see manual v1.41, p.60 about its original definition)
\renewcommand{\glslongextraSubNameFmt}[2]{
\glssubentryitem{#2}\glstarget{#2}{\glsentryunit{#2}\strut}
}
% Set the new glossary style
\newglossarystyle{long-sym-desc-unit-loc}{%
\setglossarystyle{long-sym-desc-name}%
\renewenvironment{theglossary}%
{%
\glspatchLToutput
\glslongextraSymLocSetDescWidth
\edef@glslongextra@begintab{%
\noexpand\begin{longtable}{%
\expandonce\glslongextraSymbolAlign
\expandonce\glslongextraDescAlign
\expandonce\glslongextraNameAlign
%\expandonce\glslongextraLocationAlign
}}%
@glslongextra@begintab
} %
{ \end{longtable}
}%
\renewcommand{\glossaryheader}{%
\bfseries Symbol%
& \bfseries \descriptionname %
& \bfseries Unit %
\tabularnewline%
\midrule%
\endhead%
}%
\renewcommand{\glsgroupheading}[1]{\glslongextraGroupHeading{4}{##1}}%
\renewcommand{\glossentry}[2]{%
\tabularnewline
\glslongextraNameFmt{##1} & & %
\tabularnewline
}%
\renewcommand{\subglossentry}[3]{%
\glslongextraSubSymbolFmt{##1}{##2} &
\glslongextraSubDescFmt{##1}{##2} &
\glslongextraSubNameFmt{##1}{##2} %
\tabularnewline
}%
}
I received the following error:
Command \glslongextraSubNameFmt undefined. \renewcommand{\glslongextraSubNameFmt}
Package glossaries-extra Error: Glossary style `long-sym-desc-name' undefined. ...ype=symbols, style=long-sym-desc-unit-loc]
\include should only be used after \begin{document}
I`ve been trying everything for the last 3 hrs and with no sucess. Please help.
Thanks in advance Vivan
articleorreport? That will make it much easier for a helper to analyze. – barbara beeton Dec 20 '22 at 18:06ve usedreport, which complied properly. For the thesis Im using the document classbook– Vivan Dec 20 '22 at 19:14\glslongextraSubNameFmt undefined. \renewcommand{\glslongextraSubNameFmt}and now only get the error! Package glossaries-extra Error: Glossary stylelong-sym-desc-unit' undefined. I've read https://www.dickimaw-books.com/gallery/glossaries-styles/#longextra and it shows Glossary stylelong-sym-desc-unit` is part of glossary-extra package. Any ideas? – Vivan Dec 20 '22 at 19:56