TransWikia.com

Changing index delim_0 does not work on Mactex with Texlive distribution

TeX - LaTeX Asked by Paul BRINZEI on July 8, 2021

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}

Einsteinindex[person]{Einstein}
blindtext
newpage

Heisenbergindex[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?

One Answer

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}

Einsteinindex[person]{Einstein}
blindtext
newpage

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

printindex[person] 
printindex[word] 

end{document}

Correct answer by Kubo on July 8, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP