我正在写一份包含多个章节的报告。我使用 chappg 包按章节对页码进行编号\pagenumbering{bychapter}
。在文档的开头,我想放一个词汇表。问题是,当我打开 chappg 按章节对页码进行编号时,词汇表并没有显示在文档中。我在词汇表文档中搜索了 chappg,反之亦然,但没有任何结果。
我正在使用 pdflatex、makeglossaries、pdflatex、pdflatex 进行编译。
最小代码示例。词汇表可用,但按章节显示页码不可用。如果我切换注释行,则相反。
\documentclass{report}
\usepackage[auto]{chappg} % For chapter separated page numbering
\usepackage{hyperref}
\usepackage[nonumberlist, acronym, toc, section]{glossaries}
\newglossaryentry{glsentry1}{
name=Glossary Entry One,
description={Description of glossary entry}
}
\makeglossaries
\begin{document}
\tableofcontents
\cleardoublepage
% \pagenumbering{arabic} % Glossary doesn't show without this line
\pagenumbering{bychapter} % Glossary doesn't show with this line
\printglossary[style=list,title=Glossary]
\cleardoublepage
\chapter{First}
Chapter text for chapter 1. \gls{glsentry1}
\chapter{Second}
More text.
\end{document}
有没有办法同时拥有词汇表和按章节编排的页码?
main.glg 报告如下错误:
This is makeindex, version 2.15 [MiKTeX 2.9.7250 64-bit] (kpathsea + Thai support).
Scanning style file ./main.ist.............................done (29 attributes redefined, 0 ignored).
Scanning input file main.glo...
!! Input index error (file = main.glo, line = 1):
-- Illegal Arabic digit: position 2 in 1-1.
done (0 entries accepted, 1 rejected).
Nothing written in main.gls.
Transcript written in main.glg.