# xkeyval Error: HEIGHT' ('WIDTH') undefined in families psvectorian'

I'd like to change the title of my glossary, say, List of Symbols, as follows (using some entities borrowed from the psvectorian package).

\hfil\hspace*{-3.5cm}\psvectorian[height=3mm, width=8cm]{88}\hfil\\[\baselineskip]List of Symbols\\[0.9\baselineskip]\hfil\hspace*{-3.5cm}\psvectorian[height=3mm, width=8cm]{88}\hfil\\


Here is my MWE

\documentclass{memoir}

\usepackage{psvectorian}
\usepackage[english]{babel}
\usepackage{tikz}
\usepackage{tocloft}
\usepackage{glossaries}
\usepackage{fontspec}

\renewcommand*\glspostdescription{\dotfill}

\newcommand{\abc}[1]{\hfil\hspace*{-3.5cm}\psvectorian[height=3mm, width=8cm]{88}\hfil\\[\baselineskip]#1\\[0.9\baselineskip]\hfil\hspace*{-3.5cm}\psvectorian[height=3mm, width=8cm]{88}\hfil\\}

\newglossarystyle{mylong}{%
\setglossarystyle{long}%
\renewenvironment{theglossary}%
{\begin{longtable}[l]{@{}p{\dimexpr 2.5cm-\tabcolsep}p{0.8\hsize}}}
{\end{longtable}}%
}

\makenoidxglossaries

\begin{document}

\tableofcontents

\clearpage

\renewcommand{\glossaryname}{\abc{List of Symbols}}

\printnoidxglossary[style=mylong]

\newpage

\gls{sigma} is an event set.
\end{document}


in which gloss-symb.tex just includes

\newglossaryentry{sigma}{name={\ensuremath{\Sigma}}, description={Event set}}


However, I've faced the following errors:

Package xkeyval Error: HEIGHT' undefined in families psvectorian'. \end{document}

Package xkeyval Error: WIDTH' undefined in families psvectorian'. \end{document}


The psvectorian manual (the page 2) already noted that width and height are indeed valid keys. So, what am I doing wrong here?

width and height do in fact exist, but WIDTH and HEIGHT do not. The problem is that at some point when typesetting \glossaryname the macro is expanded and \MakeUppercased, so width becomes WIDTH and you get the error. This is the problem of intermixing code (\psvectorian and such) with text: some code that expects pure text will not behave well with general commands.

One easy way out is to pack the \psvectorian commands into \protected macros so that they don't expand before uppercasing (thus they aren't uppercased either). Dividing your definition of \abc into three parts gets the job done:

\protected\def\abcbefore{\hfil\hspace*{-3.5cm}\psvectorian[height=3mm, width=8cm]{88}\hfil\\[\baselineskip]}
\protected\def\abcafter{\\[0.9\baselineskip]\hfil\hspace*{-3.5cm}\psvectorian[height=3mm, width=8cm]{88}\hfil\\}
\newcommand{\abc}[1]{\abcbefore#1\abcafter}


Compilable code:

\documentclass{memoir}
\usepackage{psvectorian}
\usepackage{glossaries}

\begin{filecontents*}{gloss-symb}
\newglossaryentry{sigma}{name={\ensuremath{\Sigma}}, description={Event set}}
\end{filecontents*}

\renewcommand*\glspostdescription{\dotfill}

\protected\def\abcbefore{\hfil\hspace*{-3.5cm}\psvectorian[height=3mm, width=8cm]{88}\hfil\\[\baselineskip]}
\protected\def\abcafter{\\[0.9\baselineskip]\hfil\hspace*{-3.5cm}\psvectorian[height=3mm, width=8cm]{88}\hfil\\}
\newcommand{\abc}[1]{\abcbefore#1\abcafter}

\newglossarystyle{mylong}{%
\setglossarystyle{long}%
\renewenvironment{theglossary}%
{\begin{longtable}[l]{@{}p{\dimexpr 2.5cm-\tabcolsep}p{0.8\hsize}}}
{\end{longtable}}%
}

\makenoidxglossaries

\begin{document}

\tableofcontents

\clearpage

\renewcommand{\glossaryname}{\abc{List of Symbols}}