.ist 文件对打印索引没有影响

.ist 文件对打印索引没有影响

我正在尝试使用样式.ist文件修改索引。我创建了该.ist文件,将其放在与主文件相同的目录中,然后传递了选项。但是,索引仍然保持不变。

这是我的文件的 MWE .tex

\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}

这是我的.ist文件:

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 "

请看这里的输出是默认输出,这意味着我的.ist 文件没有任何效果:

在此处输入图片描述

为什么文件没有.ist影响输出?我做错了什么?

谢谢你们!

答案1

options只有在没有选项的情况下才能遵守密钥,splitindex因为索引的生成已交给该程序,并且无法自动将选项传递给它。

你可以做

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

当您进行调用时。明显的限制是每个索引只能传递一种样式。

只需删除该splitindex选项imakeidx即可保留所选的样式。

相关内容