我有一个基于 documentclass 的复杂文件记事本。它有很多部分,最后一部分是附录。附录中我用的是章节而不是章节。所有词汇表和参考书目都定义为章节。
我还将索引定义为 doc_class 中的章节:
...
\usepackage{imakeidx}
\makeindex
\indexsetup{level=\chapter,toclevel=chapter,noclearpage}
...
文档结尾如下所示:
...
\appendix
\part{My appendix}
\printglossary[type=\acronymtype,style=long,title=Acronym]
\printglossary[style=altlist,title=Glossary]
\bibliography{Bibliography}
\chapter{CD Contents}
%problem:
\printindex
\end{document}
附录中的所有章节如下所示:
附录(A、B、C、D)
章节名称(缩写、词汇表、参考书目、CD 内容)。
然而该指数只是头条
有“索引”,但缺少“附录 E”。
我能做什么吗?
\printindex
是否使用章节的定义格式?
完整文档结构如下:
\documentclass[
pdftex,
a4paper,
headinclude,
headsepline,
chapterprefix,
appendixprefix,
bibliography=totocnumbered,
openany,
index=totoc,
ngerman
]{scrbook}
\usepackage{scrpage2}
\usepackage{geometry}
\geometry{
a4paper,
top=28mm,
left=25mm,
right=25mm,
bottom=28mm,
headsep=10mm,
footskip=12mm
}
\renewcommand*{\partpagestyle}{empty}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\renewcommand*{\familydefault}{\sfdefault}
\usepackage[toc,page]{appendix}
\usepackage[
bookmarks
]{hyperref}
\usepackage{multicol}
\usepackage[
nonumberlist, % don't show page numbes
acronym,
toc,
section=chapter,
numberedsection=autolabel]
{glossaries}
\makeglossaries
\usepackage{imakeidx}
\makeindex[
intoc,
columnseprule,
columns=3
]
\indexsetup{level=\chapter*,toclevel=chapter*} %,noclearpage
\usepackage[
totoc,
columns=3,
unbalanced,
%font=small
]{idxlayout}
\newacronym{AD}{AD}{Active Directory\protect\glsadd{glos:AD}}
\newglossaryentry{glos:AD}{name=Active Directory, description=
{Active Directory is a Windows-Server-bla bla asdfghjkl.~\cite{MS_AD}}}
\usepackage{blindtext}
\begin{document}
\pagenumbering{roman}
\blindtext
\tableofcontents
\label{chap:Inhalt}
\addcontentsline{toc}{chapter}{Inhalt}
\part{Intro}
\blindtext
Here we are with \gls{AD} for the first time. Here we find \gls{AD} for the second time~\cite{MS_AD}.
\chapter{Introduction}
\blindtext
\chapter{Related Work}
\blindtext
\part{Main}
\blindtext
Effective administration \index{Administration} is important for users \index{Administration!user} and adminstrators index{Administration!adminstration}.
\chapter{Introduction}
\blindtext
\chapter{Related Work}
\blindtext
\appendix
\part{Appendix}
\printglossary[type=\acronymtype,style=altlist,title=Abrev]
\printglossary[style=altlist,title=Glossary]
\bibliographystyle{alphadin}
\bibliography{Bibliography}
\chapter{CD Contents}
\printindex
\end{document}
答案1
你应该
删除
index=totoc
文档类的选项idxlayout
删除不执行任何操作的调用定义
\indexsetup{level=\chapter,toclevel=chapter}
(*
意思是“没有数字”)将调用移至
hyperref
最后加载的包