词汇表问题:书籍和回忆录的页码错误

词汇表问题:书籍和回忆录的页码错误

我正在用 latex 开心地写论文,但发现了一个问题词汇表包返回错误页码参考链接在词汇表索引中。

词汇表索引不指向第 5 页,而是指向回忆录的第 3 页,带有书籍类别,差别只有一页。

经过多次测试和尝试,我找到了在我的系统上进行复制的最低要求——希望你也可以复制它们。请原谅大量的章节和部分,但似乎必要的目录跨越多页以便显示数字问题。

问题都出现在标准書類回忆录课。两者都需要启用 a4paper 选项才会发生此问题。

您可以在这里找到 MWE 以及有关要求的说明。这是我使用 texstudio 创建的 pdf 文件的链接:使用回忆录类的 pdf 文件tex 文件

%\documentclass[12pt,a4paper,openany]{book} % for book class, both a4paper and openany must be given as parameters for the bug to show up
\documentclass[12pt,a4paper]{memoir} % for memoir, only a4paper is necessary; but the bug only shows up, when a title page is there with a pagebreak afterwards 
\usepackage[latin1]{inputenc}
\usepackage[bookmarks, colorlinks]{hyperref}
\usepackage[toc]{glossaries}
\makeglossaries

\newglossaryentry{test}{name={Testing test},description={test description},first={Test (test)}}

\begin{document}
\title{Test} % titepage and pagebreak are only necessary for reproducing the bug with memoir class
\maketitle
\pagebreak

\tableofcontents{} % needed lots of chapter because the wrong number only shows up when the toc is longer than one page

\chapter{chapter 1}
\gls{test}
\section{title 2 - possibly with a very very long title creating a new line indeed}
\section{title 3}
\chapter{chapter inbetween}
\section{title 5}
\section{title 6}
\section{title 8}
\chapter{chapter 2}
\section{title 10 - possibly with a very very long title creating a new line indeed}
\section{title 11}
\section{title 12 - possibly with a very very long title creating a new line indeed}
\section{title 13}
\chapter{chapter 3}
\section{title 15}
\chapter{chapter 4}
\section{title 17}
\section{title 18 - possibly with a long title creating a new line}
\chapter{chapter 5}
\chapter{chapter 6}
\section{title 21}
\section{title 22}
\section{title 23}
\printglossaries
\end{document}

在 TexStudio 中,我使用以下构建序列(如果相关):

txs:///latex | txs:///latex | txs:///latex | txs:///makeglossary | txs:///latex | txs:///bibtex | txs:///latex | txs:///quick

运行乳胶可能有点太频繁了,但据我所知,这只能有帮助,不是吗?

希望你能帮助我解决这个问题,因为我很喜欢使用 LaTeX 的便捷性 :)

如果您还有什么需要,请告诉我!

答案1

可能需要运行(但我在这篇 MWE 中没有看到)

latex latex makeglossary bibtex latex latex makeglossary latex 

因为在您运行 makeglossary 然后运行 ​​latex 之后,词汇表将包含在文档中,这可以更改目录,如果您不幸,它会占用额外的一页,从而更改整个文档的页码,从而使首先生成的词汇表无效,同样运行 bibtex 会导致添加参考书目部分,从而使目录变得更长。

您的 MWE 在 texlive 2012 中对我有用,如果我将其添加\listfiles到序言中,我会得到下面的列表,您可能需要检查您的版本

 *File List*
  memoir.cls    2011/03/06 v3.6j configurable book, report, article document cl
ass
   ifpdf.sty    2011/01/30 v2.3 Provides the ifpdf switch (HO)
  ifetex.sty    2011/12/15 v1.2 ifetex
 ifxetex.sty    2010/09/12 v0.6 Provides ifxetex conditional
ifluatex.sty    2010/03/01 v1.3 Provides the ifluatex switch (HO)
    etex.sty    1998/03/26 v2.0 eTeX basic definition package (PEB)
   mem12.clo    2010/10/19 v0.4b memoir class 12pt size option
mempatch.sty    2009/07/24 v6.0f Patches for memoir class v1.6180339
inputenc.sty    2008/03/30 v1.1d Input encoding file
  latin1.def    2008/03/30 v1.1d Input encoding file
hyperref.sty    2012/05/13 v6.82q Hypertext links for LaTeX
hobsub-hyperref.sty    2012/05/28 v1.13 Bundle oberdiek, subset hyperref (HO)
hobsub-generic.sty    2012/05/28 v1.13 Bundle oberdiek, subset generic (HO)
  hobsub.sty    2012/05/28 v1.13 Construct package bundles (HO)
infwarerr.sty    2010/04/08 v1.3 Providing info/warning/error messages (HO)
 ltxcmds.sty    2011/11/09 v1.22 LaTeX kernel commands for general use (HO)
  ifvtex.sty    2010/03/01 v1.5 Detect VTeX and its facilities (HO)
 intcalc.sty    2007/09/27 v1.1 Expandable calculations with integers (HO)
etexcmds.sty    2011/02/16 v1.5 Avoid name clashes with e-TeX commands (HO)
kvsetkeys.sty    2012/04/25 v1.16 Key value parser (HO)
kvdefinekeys.sty    2011/04/07 v1.3 Define keys (HO)
pdftexcmds.sty    2011/11/29 v0.20 Utility functions of pdfTeX for LuaTeX (HO)
pdfescape.sty    2011/11/25 v1.13 Implements pdfTeX's escape features (HO)
bigintcalc.sty    2012/04/08 v1.3 Expandable calculations on big integers (HO)
  bitset.sty    2011/01/30 v1.1 Handle bit-vector datatype (HO)
uniquecounter.sty    2011/01/30 v1.2 Provide unlimited unique counter (HO)
letltxmacro.sty    2010/09/02 v1.4 Let assignment for LaTeX macros (HO)
 hopatch.sty    2012/05/28 v1.2 Wrapper for package hooks (HO)
xcolor-patch.sty    2011/01/30 xcolor patch
atveryend.sty    2011/06/30 v1.8 Hooks at the very end of document (HO)
atbegshi.sty    2011/10/05 v1.16 At begin shipout hook (HO)
refcount.sty    2011/10/16 v3.4 Data extraction from label references (HO)
 hycolor.sty    2011/01/30 v1.7 Color options for hyperref/bookmark (HO)
  keyval.sty    1999/03/16 v1.13 key=value parser (DPC)
kvoptions.sty    2011/06/30 v3.11 Key value format for package options (HO)
  pd1enc.def    2012/05/13 v6.82q Hyperref: PDFDocEncoding definition (HO)
hyperref.cfg    2002/06/06 v1.2 hyperref configuration of TeXLive
     url.sty    2006/04/12  ver 3.3  Verb mode for urls, etc.
memhfixc.sty    2010/08/17 v1.15 nameref/hyperref package fixes for memoir clas
s
 hpdftex.def    2012/05/13 v6.82q Hyperref driver for pdfTeX
rerunfilecheck.sty    2011/04/15 v1.7 Rerun checks for auxiliary files (HO)
glossaries.sty    2012/05/21 v3.02 (NLCT)
  ifthen.sty    2001/05/26 v1.1c Standard LaTeX ifthen package (DPC)
 xkeyval.sty    2008/08/13 v2.6a package option processing (HA)
 xkeyval.tex    2008/08/13 v2.6a key=value parser (HA)
mfirstuc.sty    2012/05/21 v1.06 (NLCT)
etoolbox.sty    2011/01/03 v2.1 e-TeX tools for LaTeX
    xfor.sty    2009/02/05 v1.05 (NLCT)
  amsgen.sty    1999/11/30 v2.0
glossary-hypernav.sty    2007/07/04 v1.01 (NLCT)
glossary-list.sty    2011/03/28 v3.0 (NLCT)
glossary-long.sty    2011/03/28 v3.0 (NLCT)
longtable.sty    2004/02/01 v4.11 Multi-page Table package (DPC)
glossary-super.sty    2011/03/28 v3.0 (NLCT)
supertabular.sty    2004/02/20 v4.1e the supertabular environment
glossary-tree.sty    2011/03/28 v3.0 (NLCT)
   color.sty    2005/11/14 v1.0j Standard LaTeX Color (DPC)
   color.cfg    2007/01/18 v1.5 color configuration of teTeX/TeXLive
  pdftex.def    2011/05/27 v0.06d Graphics/color for pdfTeX
supp-pdf.mkii
 nameref.sty    2010/04/30 v2.40 Cross-referencing by name of section
gettitlestring.sty    2010/12/03 v1.4 Cleanup title references (HO)
    gl44.out
    gl44.out
    gl44.gls
 ***********

相关内容