未显示缩写列表

未显示缩写列表

我有一个缩写列表,它工作得很好,但现在它不再显示了。我不知道我可以改变什么。它显示在目录中,但也显示在错误的位置。
我的序言:

\newcommand{\Abkuerzung}{
    \printnomenclature
    \newpage
}

应显示的位置:

\addcontentsline{toc}{chapter}{\noname}
\Abkuerzung

我的缩写 \abbrev{dex}{Dalvik Executable} :我如何构建它:

pdflatex file.tex
makeindex file.nlo -s nomencl.ist -o file.nls
pdflatex file.tex
pdflatex file.tex

我的 makeindex 输出:

Scanning style file /usr/share/texmf-dist/makeindex/nomencl/nomencl.ist....done(10 attributes redefined, 3 ignored).
Scanning input file file.nlo...done (0 entries accepted, 0 rejected).
Nothing written in file.nls
Transctipt written in file.ilg

我看到 nls 文件中没有任何内容写入,也没有任何事情发生,但是我该怎么办呢?

编辑

\documentclass[11pt,a4paper]{report}                                           

\usepackage{graphicx}
    \usepackage{a4}
\usepackage[english, ngerman]{babel}
%That Headings have Kapitälchen:
\usepackage[T1]{fontenc}

\usepackage{xcolor}

%%%%%%%%%BIBLIOGRAPHY + PICTURES IN TABLE OF CONTENTS
\usepackage[nottoc]{tocbibind}
\usepackage{breakcites}



%%%%%%%%%%%%%%%%%%%%%%%%%%%%%ABKÜRZUNGEN
\usepackage{nomencl}
\let\abbrev\nomenclature
\renewcommand{\nomname}{List of Abbreviations}
\setlength{\nomlabelwidth}{.25\hsize}
\renewcommand{\nomlabel}[1]{#1 \dotfill}
\setlength{\nomitemsep}{-\parsep}
\makenomenclature 
\newcommand{\Abkuerzung}{
\printnomenclature
\newpage
}



\begin{document}

\include{cover}
\include{title}
\include{abstract}
\include{affidavit}

\selectlanguage{english}
\tableofcontents
\listoffigures
\renewcommand{\lstlistlistingname}{Listings}
\lstlistoflistings
\addcontentsline{toc}{chapter}{Listings}
\newpage
\addcontentsline{toc}{chapter}{\nomname}
\Abkuerzung


%%% Chapters
\include{Chapters/introduction}
\include{Chapters/overview}
\include{Chapters/migration}
\include{Chapters/analysis}
\include{Chapters/conclusion}

%%%%%%%%%%%%%%%%%%BIBLIOGRAPHY%%%%%%%%%%%%%%%%%%%%%
%\nocite{*}
\bibliography{bibliography}{}
%\bibliographystyle{apalike}
\bibliographystyle{abbrv}


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%makeindex thesis.nlo -s nomencl.ist -o thesis.nls
\abbrev{dex}{Dalvik Executable}
\abbrev{XML}{Extensible Markup Language}
\abbrev{VM}{Virtual Machine}
\abbrev{JIT}{Just In Time}
\abbrev{DVM}{Dalvik Virtual Machine}
\abbrev{JVM}{Java Virtual Machine}                                         

\end{document}

答案1

首先,您是否将定义与文本保持一致?由于命名法是一种专业索引,因此它实际上是用于引入新术语,而不是作为文档末尾的一大串项目列表。

话虽如此,只要文档中有正文,您的代码看起来就可以正常工作。如果没有任何包含的内容,则以下内容可以正常工作:

\documentclass{report}                                           

\usepackage{nomencl}
\let\abbrev\nomenclature
\makenomenclature 
\newcommand{\Abkuerzung}{
\printnomenclature
\newpage
}

\begin{document}

\tableofcontents
\listoffigures
\addcontentsline{toc}{chapter}{\nomname}
\Abkuerzung

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%makeindex thesis.nlo -s nomencl.ist -o thesis.nls
Uncomment this text, so the abbrev command will have something to reference. Otherwise, nothing works.
\abbrev{dex}{Dalvik Executable}
\abbrev{XML}{Extensible Markup Language}
\abbrev{VM}{Virtual Machine}
\abbrev{JIT}{Just In Time}
\abbrev{DVM}{Dalvik Virtual Machine}
\abbrev{JVM}{Java Virtual Machine}     
\end{document}

但直到我在文档正文中有了实际文本后,它才起作用。我将根据您发现的其他情况编辑或删除此答案。

相关内容