我有一個縮寫列表,效果很好,但現在不再顯示了。我不知道我可以改變什麼。它顯示在目錄中,但位置也錯誤。
我的序言:
\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}
但直到我在文檔正文中包含實際文本之前,它根本不起作用。我將根據您發現的其他內容編輯或刪除此答案。