使用 VSCode 生成修改后的 Index

使用 VSCode 生成修改后的 Index

我正在尝试使用 VSCode 生成一个由单词首字母分隔的索引,如下所示这里 在此处输入图片描述

.ist按建议创建了该文件:

headings_flag 1
heading_prefix "{\\textbf{"
heading_suffix "}}\\nopagebreak\n"

并将.ist文件放入名为“Packages”的文件夹中。

我无法让索引显示如上所示的修改后的设置。您能帮助我获取正确的输出吗?

谢谢!

代码

\documentclass[a4paper,12pt]{book}

\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}

\usepackage{imakeidx}
\makeindex[options=-s ../Packages/myindex.ist, intoc]


\begin{document}

Some text.\index{Apple}\index{Apricot}\index{Avocado}\index{Banana}
\index{Bilberry}\index{Blackberry}\index{Blackcurrant}\index{Blueberry}
\index{Currant}\index{Cherry}\index{Cherimoya}\index{Clementine}
\index{Date}\index{Damson}\index{Dragonfruit}\index{Durian}
\index{Eggplant}\index{Elderberry}\index{Feijoa}\index{Gooseberry}
\index{Grape}\index{Grapefruit}\index{Guava}\index{Huckleberry}
\index{Jackfruit}\index{Jambul}\index{Kiwi fruit}\index{Kumquat}
\index{Legume}\index{Lemon}\index{Lime}\index{Lychee}\index{Mandarine}
\index{Mango}\index{Melon}\index{Nectarine}\index{Orange}\index{Peach}
\index{Pear}\index{Pitaya}\index{Physalis}\index{Plum}\index{Pineapple}
\index{Pomegranate}\index{Purple Mangosteen}\index{Raisin}\index{Raspberry}
\index{Rambutan}\index{Redcurrant}\index{Salal berry}\index{Satsuma}
\index{Star fruit}\index{Strawberry}\index{Tangerine}\index{Tomato}
\index{Ugli fruit}\index{Watermelon}\index{Ziziphus mauritiana}

\newpage
\cleardoublepage
\printindex

\end{document}

相关内容