我成功生成了一个词汇表,但不知何故,我在第一个词汇表条目之前,但在词汇表标题之后,得到了一个不正常的“词汇表”元素。以下是相关的示例代码:
\documentclass[10pt,ebook,oneside,openright]{memoir}
\usepackage{graphicx}
\usepackage[scaled]{berasans}
\usepackage[T1]{fontenc}
\usepackage{setspace}
\usepackage[toc,nonumberlist]{glossaries}
\chapterstyle{madsen}
\pagestyle{ruled}
\setsecnumdepth{subsection}
\renewcommand*\familydefault{\sfdefault}
\makeglossaries
\newglossaryentry{ge1}
{
name={Entry 1},
description={My first glossary entry.}
}
\begin{document}
\title{My Fancy Title}
\author{John Smith}
\date{March 2013}
\maketitle
\linespread{1.2}
\frontmatter
\tableofcontents
\mainmatter
\chapter{The House}
It was a dark and stormy night...
\backmatter
\glsaddall
\printglossaries
\end{document}
答案1
问题源于memoir
和之间的不兼容。最简单的解决方法是在加载之前glossaries
移动。\pagestyle{ruled}
glossaries
\documentclass[10pt,ebook,oneside,openright]{memoir}
\pagestyle{ruled}% must be before glossaries is loaded
\usepackage{graphicx}
\usepackage[scaled]{berasans}
\usepackage[T1]{fontenc}
\usepackage{setspace}
\usepackage[toc,nonumberlist]{glossaries}
\chapterstyle{madsen}
\setsecnumdepth{subsection}
\renewcommand*\familydefault{\sfdefault}
\makeglossaries
\newglossaryentry{ge1}
{
name={Entry 1},
description={My first glossary entry.}
}
\begin{document}
\title{My Fancy Title}
\author{John Smith}
\date{March 2013}
\maketitle
\linespread{1.2}
\frontmatter
\tableofcontents
\mainmatter
\chapter{The House}
It was a dark and stormy night...
\backmatter
\glsaddall
\printglossaries
\end{document}