1

When using different page numberings, the package makeindex first cites the index on roman numbered pages and then on arabic numbered pages. I have an appendix with roman numbering, thus I want to change this sorting: When I have a key word that occurs both in the main part and in the appendix, then the index should first have the pagenumber on the main part, then the pagenumber in the appendix. How can I achieve this?

minimal example:

\documentclass{article}
\usepackage{makeidx}
\makeindex
\begin{document}
Testtext \index{index}
\newpage
\pagenumbering{roman}
Testtext \index{index}
\printindex
\end{document}
2

You must specify the sort order of the page numbers in a makeindex style file. For example

%file romanindex.ist
page_precedence "nraRA"

(n=numeric, r/R=roman lower/upper, a/A= alphabetic lower/upper)

Then run the makeindex command as:

makeindex -s romanindex.ist yourdocument.idx

And run LaTeX again

  • If the MakeIndex style file is named yourdocument.mst (where yourdocument is the actual name of the main TeX file), there's not even need to add the -s option. – egreg Nov 16 '16 at 13:06
  • Thank you for your answer. I am using TeXnic Center on Windows and am not adept with command lines. Can you tell me where I can specify this commands in TeXnic Center? – Martin Nov 16 '16 at 13:27
  • I am really not familiar with TeXnicCenter, but it has a possibility to configure the makeindex arguments. See the picture in tex.stackexchange.com/questions/17183/makeindex-in-texniccenter – Pieter van Oostrum Nov 17 '16 at 0:14
  • I found the arguments to use, it's "%tm.idx" -s indexstyle.ist -t "%tm.ilg" -o "%tm.ind" – Martin Nov 18 '16 at 8:22

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.