2

I am trying to modify an index with a style .ist file. I create the .ist file, I place it in the same directory as the main file, and pass the option. However, the index remains the same.

Here there is a MWE of my .tex file:

\documentclass[a4paper]{report}
\usepackage{amsmath, mathtools, amsthm}
\let\proof\relax
\let\endproof\relax
\usepackage{thmtools}
\declaretheoremstyle[headfont=\normalfont\bfseries, notefont=\bfseries, bodyfont=\normalfont, shaded={rulecolor=black,rulewidth=0.5pt,bgcolor={rgb}{1,1,1},margin=5pt,textwidth=11.8cm}, notebraces={}{:}, headpunct={}, postheadspace=1em]{mystyle}
\declaretheorem[style=mystyle]{proposition}
\declaretheoremstyle[headfont=\normalfont\bfseries, numbered=no, notefont=\bfseries, bodyfont=\footnotesize, shaded={rulecolor=gray,rulewidth=0.5pt,bgcolor={rgb}{1,1,1},margin=5pt,textwidth=11.8cm}, qed=\qedsymbol, notebraces={--- }{:}, headpunct={}, postheadspace=1em]{mystyle5}
\declaretheorem[style=mystyle5]{proof}
\declaretheoremstyle[headfont=\normalfont\bfseries, shaded={rulecolor=black,rulewidth=0.5pt,margin=5pt,textwidth=11.8cm}, notebraces={}{:}, headpunct={}, postheadspace=1em]{mystyle3}
\declaretheorem[style=mystyle3]{definition}

\numberwithin{proposition}{section}
\numberwithin{definition}{section}
\numberwithin{figure}{section}
\numberwithin{table}{section}
\numberwithin{equation}{section}

\usepackage[splitindex,nonewpage]{imakeidx}
\makeindex[name=proposition,title=Index of Propositions, options={-s index.ist}]
\makeindex[name=definition,title=Index of Definitions, options={-s index.ist}]
\makeindex[name=figure,title=Index of Figures, options={-s index.ist}]

\renewcommand{\thefigure}{\arabic{chapter}.\arabic{section}.\Roman{figure}.}
\renewcommand{\thedefinition}{\arabic{chapter}.\arabic{section}.\Alph{definition}.}
\renewcommand{\theproposition}{\arabic{chapter}.\arabic{section}.\arabic{proposition}.}

\begin{document}

\begin{proposition}[\textbf{WHATEVER1}]\index[proposition]{prop1}
    BLABLABLA   
\end{proposition}

\begin{proposition}[\textbf{WHATEVER2}]\index[proposition]{prop6}
    BLABLABLA   
\end{proposition}

\begin{definition}[\textbf{LOL1}]\index[definition]{def1}
    LOREM IPSUM 
\end{definition}

\begin{proposition}[\textbf{WHATEVER3}]\index[proposition]{prop5}
    BLABLABLA   
\end{proposition}

\begin{proposition}[\textbf{WHATEVER4}]\index[proposition]{prop4}
    BLABLABLA   
\end{proposition}

\begin{definition}[\textbf{LOL2}]\index[definition]{def4}
    LOREM IPSUM 
\end{definition}

\begin{definition}[\textbf{LOL3}]\index[definition]{def3}
    LOREM IPSUM 
\end{definition}

\begin{proposition}[\textbf{WHATEVER5}]\index[proposition]{prop3}
    BLABLABLA   
\end{proposition}

\begin{proposition}[\textbf{WHATEVER6}]\index[proposition]{prop2}
    BLABLABLA   
\end{proposition}

\begin{definition}[\textbf{LOL4}]\index[definition]{def2}
    LOREM IPSUM 
\end{definition}

\printindex[proposition]
\printindex[definition]

\end{document}

Here goes my .ist file:

headings_flag 1

heading_prefix "\n\\centering\\large\\sffamily\\bfseries%
\\noindent\\textbf{"heading_suffix "}\\par\\nopagebreak\n"

item_0 "\n \\item \\small "

delim_0 " \\hfill "
delim_1 " \\hfill "
delim_2 " \\hfill "

See here how the output is the default one, which means that my .ist file is not having any effect:

enter image description here

Why is NOT the .ist file affecting the output? What am I doing wrong?

Thank you all!

1 Answer 1

4

The options key can only be honored without the splitindex option, because the production of the indices is handed over to that program and there's no way to pass options to it automatically.

You can do

splitindex -m "makeindex -s index" <filename>

when you do the call. The obvious limitation is that just one style can be passed to each index.

Just remove the splitindex option and imakeidx will honor the chosen style.

2
  • 1
    @Héctor Leave out also the nonewpage option: it makes little sense with report.
    – egreg
    Commented Dec 16, 2016 at 18:30
  • Thanks @egreg, I will! However, going back to the original question, if I remove that option and I keep the rest of the code as it is, it produces no index. I am afraid my limited LaTex knowledge does not allow me to fully understand your (quick) reply. How do I get multiple indices with a custom style? That is, what other changes do I need to apply to my code? Please, could you elaborate further on that?
    – EoDmnFOr3q
    Commented Dec 16, 2016 at 18:52

You must log in to answer this question.

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