8

The standard makeidx package writes ind/idx in LaTeX's internal representation file. The index package writes in utf-8 and works fine with the book, article, report standard classes. But when trying to use the index package with memoir, the output is still like with the makeidx package. Can the makeidx emulation can be turned off or overridden with the index package with memoir?

Here is a minimal example:

\documentclass[a4paper,9pt]{memoir}
\usepackage[T1,T2A]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[english,russian]{babel}
\usepackage{index}
\makeindex
\begin{document}
\section{Indexing something}
\index{здравствуйте}здравствуйте
\printindex
\end{document} 

The idx file content is

\indexentry{\IeC {\cyrz }\IeC {\cyrd }\IeC {\cyrr }\IeC {\cyra }\IeC {\cyrv }\IeC {\cyrs  }
\IeC {\cyrt }\IeC {\cyrv }\IeC {\cyru }\IeC {\cyrishrt }\IeC {\cyrt }\IeC {\cyre }}{1}

Now change memoir to book and rebuild index and document again. Now the idx file content is

\indexentry {здравствуйте}{1}

as expected.

1
  • 3
    Welcome to TeX.sx! Please add a minimal working example (MWE) that illustrates your problem. It will be much easier for us to reproduce your situation and find out what the issue is when we see compilable code, starting with \documentclass{...} and ending with \end{document}.
    – egreg
    Apr 4, 2013 at 10:49

1 Answer 1

8

By default, memoir will prevent any packages (including index) from being loaded if their functionality is emulated by the class. To override this, one must add \DisemulatePackage{index} before \usepackage{index}. The following MWE produces the "expected" .idx file content. (\renewindex is used to correct the index name.)

\documentclass[a4paper,9pt]{memoir}
\usepackage[T1,T2A]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[english,russian]{babel}
\DisemulatePackage{index}
\usepackage{index}
\makeindex
\renewindex{default}{idx}{ind}{Предметный указатель}
\begin{document}
\section{Indexing something}
\index{здравствуйте}здравствуйте
\printindex
\end{document}
0

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.