目录内容

目录内容

目录内容

.
├── Makefile
└── template.tex

Makefile

all: make_pdflatex make_glossaries make_pdflatex make_pdflatex
make_pdflatex:
        pdflatex template.tex
make_glossaries:
        makeglossaries template.glo

template.tex内容

\documentclass[a4paper]{article}
\usepackage{cite}
\usepackage{glossaries}
\makeglossaries

\newglossaryentry{T\"UV}
{
  name={T\"UV},
  description={Technischer \"UberwachungsVerein, translated to Technical Inspection Association. Internationally active, independent service companies from Germany and Austria that test, inspect and certify technicak systems, facilities and objects of all kinds in order to minimize hazards and prevent damages}
}


\begin{document}

   \gls{T\"UV}

\clearpage
\printglossaries

\end{document}

问题

当我尝试运行时make all出现以下错误:

! 缺少 \endcsname 插入。\unhbox l.10 }

然而,当我\"U用常规的、非重音的字符替换该字符时,U它就make all起作用了。

我怎样才能将重音\"U字符包含在词汇表条目中并仍能成功编译?谢谢...

答案1

第一个参数应该\newglossaryentry是仅由可打印 ASCII 字符组成的简单标识符。

\documentclass[a4paper]{article}
\usepackage{cite}
\usepackage{glossaries}
\makeglossaries

\newglossaryentry{TUV}
 {
  name={T\"UV},
  description={Technischer \"UberwachungsVerein, translated to 
    Technical Inspection Association. Internationally active, 
    independent service companies from Germany and Austria that test, 
    inspect and certify technicak systems, facilities and objects of all
    kinds in order to minimize hazards and prevent damages
  },
 }


\begin{document}

\gls{TUV} \gls{TUV}

%\clearpage
\printglossaries

\end{document}

在此处输入图片描述

相关内容