1

I think I'm encountering a bug in some combination of imakeidx, xindy, and hyperref, but I don't know which one. The following minimal example generates an empty index, even though it should have one index entry:

\documentclass{article}
\usepackage[xindy]{imakeidx}
\usepackage{hyperref}
\makeindex
\begin{document}
  Text. 
  \index{A|seealso{B}}
  \printindex
\end{document}

It should have the entry "A, see also B", but it instead generates an empty index. It works fine if you remove the "hyperref" package or move it before "imakeidx", but in either case other index entries then don't have links back to the pages in the pdf.

Am I doing something wrong here? (Obviously this is a minimal example, but it's a problem in real documents that all of my seealso entries disappear.) If not, which package should I report this bug to?

Edit to add: log file:

This is pdfTeX, Version 3.14159265-2.6-1.40.21 (TeX Live 2020/Debian) (preloaded format=pdflatex 2021.2.27)  8 MAR 2021 08:50
entering extended mode
 restricted \write18 enabled.
 %&-line parsing enabled.
**bugtest.tex
(./bugtest.tex
LaTeX2e <2020-10-01> patch level 4
L3 programming layer <2021-01-09> xparse <2020-03-03>
(/usr/share/texlive/texmf-dist/tex/latex/base/article.cls
Document Class: article 2020/04/10 v1.4m Standard LaTeX document class
(/usr/share/texlive/texmf-dist/tex/latex/base/size10.clo
File: size10.clo 2020/04/10 v1.4m Standard LaTeX file (size option)
)
\c@part=\count177
\c@section=\count178
\c@subsection=\count179
\c@subsubsection=\count180
\c@paragraph=\count181
\c@subparagraph=\count182
\c@figure=\count183
\c@table=\count184
\abovecaptionskip=\skip47
\belowcaptionskip=\skip48
\bibindent=\dimen138
)
(/usr/share/texlive/texmf-dist/tex/latex/imakeidx/imakeidx.sty
Package: imakeidx 2016/10/15 v1.3e Package for typesetting indices in a synchro
nous mode

(/usr/share/texlive/texmf-dist/tex/latex/xkeyval/xkeyval.sty
Package: xkeyval 2020/11/20 v2.8 package option processing (HA)

(/usr/share/texlive/texmf-dist/tex/generic/xkeyval/xkeyval.tex
(/usr/share/texlive/texmf-dist/tex/generic/xkeyval/xkvutils.tex
\XKV@toks=\toks15
\XKV@tempa@toks=\toks16

(/usr/share/texlive/texmf-dist/tex/generic/xkeyval/keyval.tex))
\XKV@depth=\count185
File: xkeyval.tex 2014/12/03 v2.7a key=value parser (HA)
))
(/usr/share/texlive/texmf-dist/tex/generic/iftex/ifxetex.sty
Package: ifxetex 2019/10/25 v0.7 ifxetex legacy package. Use iftex instead.

(/usr/share/texlive/texmf-dist/tex/generic/iftex/iftex.sty
Package: iftex 2020/03/06 v1.0d TeX engine tests
))
(/usr/share/texlive/texmf-dist/tex/generic/iftex/ifluatex.sty
Package: ifluatex 2019/10/25 v1.5 ifluatex legacy package. Use iftex instead.
)
(/usr/share/texlive/texmf-dist/tex/latex/tools/multicol.sty
Package: multicol 2019/12/09 v1.8y multicolumn formatting (FMi)
\c@tracingmulticols=\count186
\mult@box=\box47
\multicol@leftmargin=\dimen139
\c@unbalance=\count187
\c@collectmore=\count188
\doublecol@number=\count189
\multicoltolerance=\count190
\multicolpretolerance=\count191
\full@width=\dimen140
\page@free=\dimen141
\premulticols=\dimen142
\postmulticols=\dimen143
\multicolsep=\skip49
\multicolbaselineskip=\skip50
\partial@page=\box48
\last@line=\box49
\maxbalancingoverflow=\dimen144
\mult@rightbox=\box50
\mult@grightbox=\box51
\mult@gfirstbox=\box52
\mult@firstbox=\box53
\@tempa=\box54
\@tempa=\box55
\@tempa=\box56
\@tempa=\box57
\@tempa=\box58
\@tempa=\box59
\@tempa=\box60
\@tempa=\box61
\@tempa=\box62
\@tempa=\box63
\@tempa=\box64
\@tempa=\box65
\@tempa=\box66
\@tempa=\box67
\@tempa=\box68
\@tempa=\box69
\@tempa=\box70
\@tempa=\box71
\@tempa=\box72
\@tempa=\box73
\@tempa=\box74
\@tempa=\box75
\@tempa=\box76
\@tempa=\box77
\@tempa=\box78
\@tempa=\box79
\@tempa=\box80
\@tempa=\box81
\@tempa=\box82
\@tempa=\box83
\@tempa=\box84
\@tempa=\box85
\@tempa=\box86
\@tempa=\box87
\@tempa=\box88
\@tempa=\box89
\@tempa=\box90
\c@minrows=\count192
\c@columnbadness=\count193
\c@finalcolumnbadness=\count194
\last@try=\dimen145
\multicolovershoot=\dimen146
\multicolundershoot=\dimen147
\mult@nat@firstbox=\box91
\colbreak@box=\box92
\mc@col@check@num=\count195
))
(/usr/share/texlive/texmf-dist/tex/latex/hyperref/hyperref.sty
Package: hyperref 2020-05-15 v7.00e Hypertext links for LaTeX

(/usr/share/texlive/texmf-dist/tex/generic/ltxcmds/ltxcmds.sty
Package: ltxcmds 2020-05-10 v1.25 LaTeX kernel commands for general use (HO)
)
(/usr/share/texlive/texmf-dist/tex/generic/pdftexcmds/pdftexcmds.sty
Package: pdftexcmds 2020-06-27 v0.33 Utility functions of pdfTeX for LuaTeX (HO
)

(/usr/share/texlive/texmf-dist/tex/generic/infwarerr/infwarerr.sty
Package: infwarerr 2019/12/03 v1.5 Providing info/warning/error messages (HO)
)
Package pdftexcmds Info: \pdf@primitive is available.
Package pdftexcmds Info: \pdf@ifprimitive is available.
Package pdftexcmds Info: \pdfdraftmode found.
)
(/usr/share/texlive/texmf-dist/tex/generic/kvsetkeys/kvsetkeys.sty
Package: kvsetkeys 2019/12/15 v1.18 Key value parser (HO)
)
(/usr/share/texlive/texmf-dist/tex/generic/kvdefinekeys/kvdefinekeys.sty
Package: kvdefinekeys 2019-12-19 v1.6 Define keys (HO)
)
(/usr/share/texlive/texmf-dist/tex/generic/pdfescape/pdfescape.sty
Package: pdfescape 2019/12/09 v1.15 Implements pdfTeX's escape features (HO)
)
(/usr/share/texlive/texmf-dist/tex/latex/hycolor/hycolor.sty
Package: hycolor 2020-01-27 v1.10 Color options for hyperref/bookmark (HO)
)
(/usr/share/texlive/texmf-dist/tex/latex/letltxmacro/letltxmacro.sty
Package: letltxmacro 2019/12/03 v1.6 Let assignment for LaTeX macros (HO)
)
(/usr/share/texlive/texmf-dist/tex/latex/auxhook/auxhook.sty
Package: auxhook 2019-12-17 v1.6 Hooks for auxiliary files (HO)
)
(/usr/share/texlive/texmf-dist/tex/latex/kvoptions/kvoptions.sty
Package: kvoptions 2020-10-07 v3.14 Key value format for package options (HO)
)
\@linkdim=\dimen148
\Hy@linkcounter=\count196
\Hy@pagecounter=\count197

(/usr/share/texlive/texmf-dist/tex/latex/hyperref/pd1enc.def
File: pd1enc.def 2020-05-15 v7.00e Hyperref: PDFDocEncoding definition (HO)
Now handling font encoding PD1 ...
... no UTF-8 mapping file for font encoding PD1
)
(/usr/share/texlive/texmf-dist/tex/generic/intcalc/intcalc.sty
Package: intcalc 2019/12/15 v1.3 Expandable calculations with integers (HO)
)
(/usr/share/texlive/texmf-dist/tex/generic/etexcmds/etexcmds.sty
Package: etexcmds 2019/12/15 v1.7 Avoid name clashes with e-TeX commands (HO)
)
\Hy@SavedSpaceFactor=\count198
Package hyperref Info: Hyper figures OFF on input line 4464.
Package hyperref Info: Link nesting OFF on input line 4469.
Package hyperref Info: Hyper index ON on input line 4472.
Package hyperref Info: Plain pages OFF on input line 4479.
Package hyperref Info: Backreferencing OFF on input line 4484.
Package hyperref Info: Implicit mode ON; LaTeX internals redefined.
Package hyperref Info: Bookmarks ON on input line 4717.
\c@Hy@tempcnt=\count199

(/usr/share/texlive/texmf-dist/tex/latex/url/url.sty
\Urlmuskip=\muskip16
Package: url 2013/09/16  ver 3.4  Verb mode for urls, etc.
)
LaTeX Info: Redefining \url on input line 5076.
\XeTeXLinkMargin=\dimen149

(/usr/share/texlive/texmf-dist/tex/generic/bitset/bitset.sty
Package: bitset 2019/12/09 v1.3 Handle bit-vector datatype (HO)

(/usr/share/texlive/texmf-dist/tex/generic/bigintcalc/bigintcalc.sty
Package: bigintcalc 2019/12/15 v1.5 Expandable calculations on big integers (HO
)
))
\Fld@menulength=\count266
\Field@Width=\dimen150
\Fld@charsize=\dimen151
Package hyperref Info: Hyper figures OFF on input line 6347.
Package hyperref Info: Link nesting OFF on input line 6352.
Package hyperref Info: Hyper index ON on input line 6355.
Package hyperref Info: backreferencing OFF on input line 6362.
Package hyperref Info: Link coloring OFF on input line 6367.
Package hyperref Info: Link coloring with OCG OFF on input line 6372.
Package hyperref Info: PDF/A mode OFF on input line 6377.
LaTeX Info: Redefining \ref on input line 6417.
LaTeX Info: Redefining \pageref on input line 6421.

(/usr/share/texlive/texmf-dist/tex/latex/base/atbegshi-ltx.sty
Package: atbegshi-ltx 2020/08/17 v1.0a Emulation of the original atbegshi packa
ge
with kernel methods
)
\Hy@abspage=\count267
\c@Item=\count268
\c@Hfootnote=\count269
)
Package hyperref Info: Driver (autodetected): hpdftex.

(/usr/share/texlive/texmf-dist/tex/latex/hyperref/hpdftex.def
File: hpdftex.def 2020-05-15 v7.00e Hyperref driver for pdfTeX

(/usr/share/texlive/texmf-dist/tex/latex/base/atveryend-ltx.sty
Package: atveryend-ltx 2020/08/19 v1.0a Emulation of the original atvery packag
e
with kernel methods
)
\Fld@listcount=\count270
\c@bookmark@seq@number=\count271

(/usr/share/texlive/texmf-dist/tex/latex/rerunfilecheck/rerunfilecheck.sty
Package: rerunfilecheck 2019/12/05 v1.9 Rerun checks for auxiliary files (HO)

(/usr/share/texlive/texmf-dist/tex/generic/uniquecounter/uniquecounter.sty
Package: uniquecounter 2019/12/15 v1.4 Provide unlimited unique counter (HO)
)
Package uniquecounter Info: New unique counter `rerunfilecheck' on input line 2
86.
)
\Hy@SectionHShift=\skip51
)
\bugtest@idxfile=\write3
\openout3 = `bugtest.idx'.


Writing index file bugtest.idx
(/usr/share/texlive/texmf-dist/tex/latex/l3backend/l3backend-pdftex.def
File: l3backend-pdftex.def 2020-01-29 L3 backend support: PDF output (pdfTeX)
\l__color_backend_stack_int=\count272
\l__pdf_internal_box=\box93
)
(./bugtest.aux)
\openout1 = `bugtest.aux'.

LaTeX Font Info:    Checking defaults for OML/cmm/m/it on input line 7.
LaTeX Font Info:    ... okay on input line 7.
LaTeX Font Info:    Checking defaults for OMS/cmsy/m/n on input line 7.
LaTeX Font Info:    ... okay on input line 7.
LaTeX Font Info:    Checking defaults for OT1/cmr/m/n on input line 7.
LaTeX Font Info:    ... okay on input line 7.
LaTeX Font Info:    Checking defaults for T1/cmr/m/n on input line 7.
LaTeX Font Info:    ... okay on input line 7.
LaTeX Font Info:    Checking defaults for TS1/cmr/m/n on input line 7.
LaTeX Font Info:    ... okay on input line 7.
LaTeX Font Info:    Checking defaults for OMX/cmex/m/n on input line 7.
LaTeX Font Info:    ... okay on input line 7.
LaTeX Font Info:    Checking defaults for U/cmr/m/n on input line 7.
LaTeX Font Info:    ... okay on input line 7.
LaTeX Font Info:    Checking defaults for PD1/pdf/m/n on input line 7.
LaTeX Font Info:    ... okay on input line 7.
Package hyperref Info: Link coloring OFF on input line 7.
 (/usr/share/texlive/texmf-dist/tex/latex/hyperref/nameref.sty
Package: nameref 2019/09/16 v2.46 Cross-referencing by name of section

(/usr/share/texlive/texmf-dist/tex/latex/refcount/refcount.sty
Package: refcount 2019/12/15 v3.6 Data extraction from label references (HO)
)
(/usr/share/texlive/texmf-dist/tex/generic/gettitlestring/gettitlestring.sty
Package: gettitlestring 2019/12/15 v1.6 Cleanup title references (HO)
)
\c@section@level=\count273
)
LaTeX Info: Redefining \ref on input line 7.
LaTeX Info: Redefining \pageref on input line 7.
LaTeX Info: Redefining \nameref on input line 7.

(./bugtest.out) (./bugtest.out)
\@outlinefile=\write4
\openout4 = `bugtest.out'.

 [1

{/var/lib/texmf/fonts/map/pdftex/updmap/pdftex.map}] (./bugtest.ind)

Package imakeidx Warning: Remember to run (pdf)latex again after calling
(imakeidx)                `texindy bugtest.idx'.

[2

] (./bugtest.aux)
Package rerunfilecheck Info: File `bugtest.out' has not changed.
(rerunfilecheck)             Checksum: D41D8CD98F00B204E9800998ECF8427E;0.
 ) 
Here is how much of TeX's memory you used:
 4843 strings out of 481176
 77069 string characters out of 5914226
 372483 words of memory out of 5000000
 21735 multiletter control sequences out of 15000+600000
 404035 words of font info for 29 fonts, out of 8000000 for 9000
 59 hyphenation exceptions out of 8191
 71i,4n,74p,234b,315s stack positions out of 5000i,500n,10000p,200000b,80000s
</usr/share/texlive/texmf-dist/fonts/type1/public/amsfonts/cm/cmbx12.pfb></us
r/share/texlive/texmf-dist/fonts/type1/public/amsfonts/cm/cmr10.pfb>
Output written on bugtest.pdf (2 pages, 19849 bytes).
PDF statistics:
 26 PDF objects out of 1000 (max. 8388607)
 19 compressed objects within 1 object stream
 4 named destinations out of 1000 (max. 500000)
 1 words of extra memory for PDF output out of 10000 (max. 10000000)

.idx file:

\indexentry{A|hyperindexformat{\seealso{B}}}{1}

.ind file:

\begin{theindex}
  \providecommand*\lettergroupDefault[1]{}
  \providecommand*\lettergroup[1]{%
      \par\textbf{#1}\par
      \nopagebreak
  }


\end{theindex}
8
  • Suppose your is named main.tex, you have to run: 1) pdflatex main.tex 2) texindy main.idx 3) pdflatex main.tex If you look in the .log file you will find this: "Package imakeidx Warning: Remember to run (pdf)latex again after calling (imakeidx) texindy temp.idx'.
    – Ivan
    Commented Mar 8, 2021 at 13:17
  • how do you call xindy? Commented Mar 8, 2021 at 13:27
  • @Ivan I tried using the command line to run those commands in that order, and the problem still occurs. The index entry is missing. If I remove the hyperref link, it appears. Commented Mar 8, 2021 at 13:52
  • which tex system do you use? Commented Mar 8, 2021 at 14:08
  • @UlrikeFischer This is pdfTeX, Version 3.14159265-2.6-1.40.21 (TeX Live 2020/Debian) (preloaded format=pdflatex)restricted \write18 enabled. xindy release: unknown xindy script version: 1.18 xindy kernel version: 3.0 CLISP version 2.49.92 (2018-02-18) (built on x86-conova-01) architecture: X86_64 Commented Mar 8, 2021 at 14:24

1 Answer 1

2

I'm recording the answer here for posterity.

tldr: This is a known bug in xindy, and seems unlikely to be fixed.

xindy doesn't seem to be actively maintained since 2014. It was originally hosted at https://sourceforge.net/projects/xindy/ . This is still where most xindy bug reports are archived. This bug is recorded at https://sourceforge.net/p/xindy/bugs/62/ , which itself points to a 2009 mailing list post about it.

The most recent version of xindy, 2.5.1, is posted on CTAN, and seems to be built from https://github.com/jschrod/xindy.ctan . There's been a pull request to fix this bug (https://github.com/jschrod/xindy.ctan/pull/6 ) also since 2009.

The debian packaging team maintains a fork for debian packaging at https://github.com/debian-tex/xindy . I may see if they're willing to apply the pull request.

4
  • I have the fix, so probably someone added it to the vanilla texlive. Commented Mar 8, 2021 at 18:20
  • Huh. The Debian people agreed to apply it, too, so. Hopefully that won't cause merging problems or anything later. Commented Mar 10, 2021 at 11:19
  • Sad to see xindy added to the long list of abandoned LaTeX packages! Has any new package arisen to take its place? (I'm not interested in the even older packages that xindy replaced, of course) Commented May 16, 2021 at 11:15
  • It seems like effectively the Debian LaTeX team is maintaining xindy. Commented May 17, 2021 at 13:04

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .