%EA%B0%80%20%EC%A0%95%EC%9D%98%EB%90%98%EC%A7%80%20%EC%95%8A%EC%95%98%EC%8A%B5%EB%8B%88%EB%8B%A4..png)
내 용어집 제목(예: List of Symbols)을 다음과 같이 변경하고 싶습니다(패키지에서 빌린 일부 엔터티 사용 psvectorian
).
\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\\
여기 나의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}
여기에는 gloss-symb.tex
다음이 포함됩니다.
\newglossaryentry{sigma}{name={\ensuremath{\Sigma}}, description={Event set}}
그러나 다음과 같은 오류에 직면했습니다.
Package xkeyval Error: `HEIGHT' undefined in families `psvectorian'. \end{document}
Package xkeyval Error: `WIDTH' undefined in families `psvectorian'. \end{document}
그만큼psvectorian
수동(2페이지) 이미 와 width
가 height
실제로 유효한 키라고 언급했습니다. 그렇다면 내가 여기서 뭘 잘못하고 있는 걸까요?
답변1
width
height
실제로 존재하지만 존재 하지 WIDTH
않습니다 HEIGHT
. 문제는 \glossaryname
매크로를 조판할 때 어느 시점에서 확장되고 \MakeUppercase
d가 width
되어 WIDTH
오류가 발생한다는 것입니다. 이는 코드(및 기타)를 텍스트와 혼합하는 문제입니다 \psvectorian
. 순수 텍스트를 기대하는 일부 코드는 일반 명령과 잘 작동하지 않습니다.
한 가지 쉬운 방법은 명령이 대문자로 표시되기 전에 확장되지 않도록 명령을 매크로 \psvectorian
로 묶는 것입니다(따라서 대문자로 표시되지도 않음). \protected
정의를 \abc
세 부분으로 나누면 작업이 완료됩니다.
\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}
컴파일 가능한 코드:
\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}