MakeIndex, Nomenclature, Glossaries and AcronymsUsing Makeindex in a complex environment

Information and discussion about MakeIndex - the tool to generate subject indices for LaTeX documents.
Post Reply
Leo__
Posts: 28
Joined: Thu Oct 28, 2010 4:33 pm

Using Makeindex in a complex environment

Post by Leo__ »

I am writing a document partly in Hebrew partly in French, plus a little math. I would like to make an index using makeindex but it does not seem to work. Here is my preamble:

\documentclass[12pt,b5paper]{book}
\usepackage{latexsym,amssymb}
\usepackage[hebrew, french]{babel}
\usepackage{graphicx}
\usepackage{fancyhdr}
\usepackage{makeidx}
\makeindex

% .... contents...

\printindex

I suspect that there is a conflict between packages, since I succeed in using makeindex otherwise in a purely math environment or a single language environment.

What I get is no index at all. The .ind is empty and the .ilg says

This is makeindex.exe, version 2.14 [02-Oct-2002] (kpathsea + Thai support).
Scanning input file MYFILE.idx...
!! Input index error (file = MYFILE.idx, line = 1):
-- Illegal space within numerals in second argument.
!! Input index error (file = MYFILE.idx, line = 2):
-- Illegal space within numerals in second argument.
done (0 entries accepted, 2 rejected).
Nothing written in MYFILE.ind.
Transcript written in MYFILE.ilg.

(Above the test for only two entries.)

Any advice would be welcome.

Leo

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org
LaTeX Beginner's Guide LaTeX Cookbook LaTeX TikZ graphics TikZによるLaTeXグラフィックス
User avatar
gmedina
Posts: 2313
Joined: Wed Jul 11, 2007 11:45 pm

Re: Using Makeindex in a complex environment

Post by gmedina »

Hi,

please post complete and minimal code allowing us to reproduce the error.
1,1,2,3,5,8,13,21,34,55,89,144,233,...
Leo__
Posts: 28
Joined: Thu Oct 28, 2010 4:33 pm

Re: Using Makeindex in a complex environment

Post by Leo__ »

Here is a short latex code. Note that it works provided that I do not include a word with French accents.

\documentclass[12pt,b5paper]{book}
\usepackage[hebrew, french]{babel}
\usepackage{makeidx}
\makeindex
\begin{document}
\thispagestyle{empty}

r\'ep\'eter % This is a word with French accents (works well without it).

Un essai \index{essai} d'indexation \index{indexation} dans un
court document \index{document}.
\printindex
\end{document}
User avatar
gmedina
Posts: 2313
Joined: Wed Jul 11, 2007 11:45 pm

Using Makeindex in a complex environment

Post by gmedina »

There seems to be an incompatibility between makeindex and the hebrew option for babel (your code doesn't produce any index when I run it on my system, but as soon as the hebrew option is deleted from your code, everything runs smoothly).

Can't you use the arabtex package instead od the hebrew option? The following code does produce an index:

Code: Select all

\documentclass[12pt,b5paper]{book}
\usepackage[french]{babel}
\usepackage{makeidx}
\usepackage{arabtex}
\makeindex
\begin{document}
\thispagestyle{empty}

r\'ep\'eter 

\selectlanguage{french}
Un essai \index{essai} d'indexation \index{indexation} dans un
court document \index{document}.
\printindex
\end{document}
however I don't know if you still can typeset hebrew text (I've never used arabtex myself).
1,1,2,3,5,8,13,21,34,55,89,144,233,...
Leo__
Posts: 28
Joined: Thu Oct 28, 2010 4:33 pm

Re: Using Makeindex in a complex environment

Post by Leo__ »

Thank you for your help. You understand exactly what the pb is.

It appears that Arabtex will produce Hebrew only from some ASCII encoding or from an ASCII transliteration. And I have lots of Hebrew text already typeset in Hebrew (directly from a Hebrew Keyboard) in the latex document....
Post Reply