2

Let us consider Springer's svmono class together with the file svindd.ist supposed to be used by makeindex; cf. Springer's guidelines, which reference the templates. Let us compile the input

\documentclass{svmono}
\usepackage{multicol}
\usepackage{makeidx}
\usepackage{hyperref}
\usepackage{lipsum}
\makeindex
\begin{document}
\pagenumbering{none}%%% Makes sure that if we drop "-s svindd.ist", the hyperlinks point where they should point.
\title{Book's title}
\maketitle
\mainmatter
\chapter{Chapter's title}
\lipsum[1-2]
keyword\index{keyword}
\lipsum[1-2]\section{Section's title}keyword\index{keyword}%%% culprit line
\printindex
\end{document}

stored in book.tex with the standard loop:

pdflatex book && makeindex -s svindd.ist book && pdflatex book

(Remark: of course, the above is only a MWE; a real book uses way more class options, packages, and bibtex in addition.)

What we see on the last page of the output PDF is the index, in which two references are merged into one:

last page of the output

Clicking on the red box gets you to the title page instead of the keyword definitions. In the log you see the warning:

name{page.1,\\relax\040\\hskip\0400.2em\\ignorespaces\0402} has been referenced but does not exist, replaced by a fixed one

One can have two workarounds:

  • remove the culprit line in the source (but you really want to have both pages in the index),

  • drop -s svindd.ist (but that's what German books are supposed to use).

Now, are we using Springer's class files in a wrong way or is svindd.ist erroneous?

The contents of svindd.ist is as follows:

quote '+'
headings_flag 1
heading_prefix "{\\bf "
heading_suffix "}\\nopagebreak%\n \\indexspace\\nopagebreak%"
delim_0 "\\idxquad "
delim_1 "\\idxquad "
delim_2 "\\idxquad "
delim_n ",\\,"
5
  • 1
    What do you expect if you have \pagenumbering{none}??!!
    – cfr
    May 1 '18 at 0:42
  • Please do not link directly to ZIP files!!
    – cfr
    May 1 '18 at 0:44
  • Deleted the files which got downloaded. I don't trust ZIPs from unknown sources. resource-cms.springernature.com is non-site which just provides the standard Apache installation place holder. No idea whether this has anything actually to do with Springer or not.
    – cfr
    May 1 '18 at 0:49
  • Presumably, \mainmatter may include \pagenumbering{arabic}, but I don't have the .cls to check. So maybe that isn't a problem, though \pagenumbering{none} is still not the right way to go.
    – cfr
    May 1 '18 at 0:52
  • I have no idea whether TeX SE has such a policy and never claimed otherwise. I have a policy of avoiding such links, where possible, or deleting downloads immediately, otherwise. Many people are suspicious of such links unless posted by trusted sources. Hence, relying on them effectively reduces the pool of potential helpers. It doesn't matter two hoots what TeX SE says about it: you still need individual members to do the helping. (I don't care if you post a direct link so long as it is labelled and you also give me another way to get the download or, better, the relevant file.)
    – cfr
    May 2 '18 at 2:20
2

hyerrref is trying to split the page list up on , (comma-space) but svindd.ist makes the list be separated by ,\, (comma-thinspace) so you need to adjust the splitting loop, replacing by \,

\documentclass{svmono}
\usepackage{multicol}
\usepackage{makeidx}
\usepackage{hyperref}
\makeatletter
\def\@commahyperpage#1{\@@commahyperpage#1,\,,\\}
\def\@@commahyperpage#1,\,#2,#3\\{%
  \ifx\\#2\\%
    \HyInd@pagelink{#1}%
  \else
    \HyInd@pagelink{#1},\,\HyInd@pagelink{#2}%
  \fi
}
\makeatother
\usepackage{lipsum}
\makeindex
\begin{document}
\pagenumbering{none}
\title{Book's title}
\maketitle
\mainmatter
\chapter{Chapter's title}
\lipsum[1-2]
keyword\index{keyword}
\lipsum[1-2]\section{Section's title}keyword\index{keyword}%%% culprit line
\printindex
\end{document}
2
  • @MdAyquassar hyperref can not know every possible definition by every possible package, the springer class should do this for its German option May 1 '18 at 22:00
  • @MdAyquassar the refguide.pdf that is in the zip has a contact email address on page 2 May 1 '18 at 22:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy