xkeyval Hatası: `` Psvectorian '' ailelerinde `` HEIGHT '(' WIDTH ') tanımsız

Sep 19 2020

Sözlüğümün başlığını, örneğin Sembol Listesi'ni aşağıdaki gibi değiştirmek istiyorum ( psvectorianpaketten ödünç alınan bazı varlıkları kullanarak ).

\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\\

İşte benim 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\\}

\loadglsentries{gloss-symb}

\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}}
    
        \addcontentsline{toc}{chapter}{List of Symbols}
        \printnoidxglossary[style=mylong]

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

hangi gloss-symb.texsadece içerir

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

Ancak, aşağıdaki hatalarla karşılaştım:

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

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

psvectorian Manuel (sayfa 2) zaten kaydetti widthve heightgerçekten geçerli anahtarları. Peki burada neyi yanlış yapıyorum?

Yanıtlar

1 PhelypeOleinik Sep 19 2020 at 07:36

widthve heightaslında varoldukları için yapmak, ancak WIDTHve HEIGHTyapma. Sorun şu ki \glossaryname, makroyu dizerken bir noktada genişler ve \MakeUppercased, bu yüzden widtholur WIDTHve hata alırsınız. Bu, kodu ( \psvectorianve benzeri) metinle karıştırmanın sorunudur : saf metnin genel komutlarla iyi davranmayacağını bekleyen bazı kodlar.

Kolay bir çıkış yolu, \psvectoriankomutları \protectedmakrolar halinde paketlemektir, böylece büyük harf yapmadan önce genişlemesinler (dolayısıyla üst harf de yapılmaz). Tanımınızı \abcüç bölüme ayırmak işi bitirir:

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

Derlenebilir kod:

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

\loadglsentries{gloss-symb}

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

\addcontentsline{toc}{chapter}{List of Symbols}
\printnoidxglossary[style=mylong]

\newpage

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