0

I would like to have a bold letter that accordingly separates the index in memoir. Take a look at this image to illustrate my intention:

enter image description here

This was taken from the memoir document, from which I did not see how to change the style of the index. Any help would be appreciated.

MWE

\documentclass[a4paper,11pt,reqno,oldfontcommands]{memoir}
\usepackage{newpxtext,newpxmath}
\makeindex

\begin{document}

\section{Something about an Index}

I would like to have alphabetic\index{index!alphabetic} headers for all of the index entries. The format\index{index!format} should remain unaffected such that it has items and subitems.

\printindex
\end{document}

I run this in TeXShop (Mac distribution) using the LaTeX compiler, MakeIndex, and then LaTeX again. This is the second part of the question: Is there anyway that I can make this process easier? I.e. combined with the requirement to update my bibliography, I have to run LaTeX > BibTex > MakeIndex > LaTeX > LaTeX.

In my actual document, I do have hyperlinks enabled.

1

Section 17.2 in the manual (> texdoc memman) explains how to do this by using an .ist makeindex style file. Assuming that you have run LaTeX on mybook.tex and this produced raw index commands in mybook.idx and you have a makeindex style file called mybook.ist then running

> makeindex -s mybook.ist -o mybookind.tex mybook

will generate mybookind.tex containing the sorted index entries.

The memoir manual shows an example of a file memman.ist which could be used as the style for the manual's index. However your TeX distribution should include a file called gind.ist which will give bold letters at the start of each batch of entries. So

> makeindex -s gind.ist -o mybookind.tex mybook

See also the makeindex manual (> texdoc makeindex).

Answering your second comment, which I really think you should have made a new question, try creating a simple sid.ist file like:

% MakeIndex style file sid.ist
% Bold head letters
headings_flag 1
heading_prefix "{\\bfseries "
heading_suffix "}"
% end of file

Then

> pdflatex mybook
> makeindex -s sid.ist mybook
> pdflatex mybook

Ask another question about the efficiency of processing indexes and bibliographies.

Fare you well from a GOM.

  • How do I get the mybook.ist file? I have the mybook.idx and mybook.ind files when I run mybook.tex with makeindex. – Sid Sep 30 '18 at 16:05
  • @Sid You have to create your own mybook.ist file. As I said the manual has an example and I suggested using gind.ist. Did you try that? – Peter Wilson Sep 30 '18 at 17:22
  • I ran this command (make index -s kind.ist -o mybookind.tex mybook) in terminal, and it generates the file mybookind.tex. If I open it, it indeed has the boldface headers, but as enteries it has things like: \item operatorannihilation\pfill \hyperpage{10} and ` \item operatorcreation\pfill \hyperpage{10}` which as you can see it combines the operator subheader with annhiliation and creation – Sid Oct 1 '18 at 10:05
  • @Sid Nobody really has any idea what you have done. What is in file kind.ist? I don't have it. If you want any more help then please supply an MWE showing what you have done. It at least needs to go from \documentclass... to \end{document} and include some \index entries. Perhaps you should ask another question. – Peter Wilson Oct 1 '18 at 17:52
  • Due to autocorrection, what I wrote last was simply gibberish. I simply ran your code which was: makeindex -s gind.ist -o mybookind.tex mybook – Sid Oct 2 '18 at 9:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.