2

I am trying to compile a book with multiple indexes. I am using indextools package with splitindex. I need to modify the index delimiter so I have created a .ist file with this content:

delim_0 ": \\ "  
delim_1 ": \\ "  
delim_2 ": \\ "  

here is also my functional example:

\documentclass[a4paper,11pt,twoside,openright]{scrbook}
\usepackage[makeindex,splitindex]{indextools}
\makeindex[
      name=person, 
      title=INDEX of Persons, 
      program=makeindex,
      options={-s idxconf.ist},
          ]
\makeindex[
      name=word,
      title=Index of Words,
      program=makeindex,
      options={-s idxconf.ist},
          ]
\usepackage{blindtext}

\begin{document}

Einstein\index[person]{Einstein}
\blindtext
\newpage

Heisenberg\index[person]{Heisenberg} % Person index
\blindtext[3]
\index[word]{foo}\index[person]{Bohr}
\index[word]{bar}
\blindtext

\printindex[person] 
\printindex[word] 

\end{document}

I am using Mactex with Texlive and the delimiter is not changed. Same code compiled on a windows pc is working just fine. Is there a way to make it work on mac?

  • If your aim is to print the entry followed by a colon and a double space, use ": \\ " (colon, space, double backslash, space). Of course, no </br>. – egreg Sep 26 '16 at 17:13
  • I am sorry the </br> was an error from my side while inserting the code. the delim is as you mentioned ": \\ "(quote, colon, space, double blackslash, space, quotes). – Paul BRINZEI Sep 26 '16 at 19:31
  • 1
    Where are you saving idxconf.ist? – egreg Sep 26 '16 at 19:32
  • 2
    Did you use the --shell-escape option when running latex? It doesn't work for me (even on windows) without that. – Dan Sep 26 '16 at 19:36
  • @egreg idxconf.ist is in the same folder with the tex file. – Paul BRINZEI Sep 26 '16 at 19:50
  • @Dan Thank you! it saved my day! I have added the --shell-escape on my Texmaker preferences and now is working as is suppose. – Paul BRINZEI Sep 26 '16 at 20:04

1 Answers1

0

To complete the question: As has been pointed out by Dan and egreg in the comments, you need to make sure that (1) you use the option --shell-escape when running LaTeX and (2) the .ist-file is saved in the same folder as the .tex-file.

Two additional points:

(1) You need --shell-escape because you are invoking an external program. Some infos: What does --shell-escape do?

(2): It can be advisable to wrap the three lines your idxconf.ist in a filecontents-environment so the .ist-file doesn’t straggle the next time you make use of configuring indices for another document.

\documentclass[a4paper,11pt,twoside,openright]{scrbook}
\usepackage[makeindex,splitindex]{indextools}
\makeindex[
  name=person, 
  title=INDEX of Persons, 
  program=makeindex,
  options={-s idxconf.ist},
      ]
\makeindex[
  name=word,
  title=Index of Words,
  program=makeindex,
  options={-s idxconf.ist},
      ]
\usepackage{blindtext}

\begin{filecontents}{idxconf.ist} delim_0 ": \ "
delim_1 ": \ "
delim_2 ": \ "
\end{filecontents}

\begin{document}

Einstein\index[person]{Einstein} \blindtext \newpage

Heisenberg\index[person]{Heisenberg} % Person index \blindtext[3] \index[word]{foo}\index[person]{Bohr} \index[word]{bar} \blindtext

\printindex[person] \printindex[word]

\end{document}

Kubo
  • 368